From 3f865b3f696f57b00432677ee44af805aea93913 Mon Sep 17 00:00:00 2001 From: Corinne PAULVE Date: Mon, 8 Jul 2024 09:53:22 +0200 Subject: [PATCH] chore: fix comment --- .yarn/sdks/eslint/bin/eslint.js | 9 +++++++- .yarn/sdks/eslint/lib/api.js | 9 +++++++- .yarn/sdks/eslint/lib/unsupported-api.js | 9 +++++++- .yarn/sdks/typescript/bin/tsc | 9 +++++++- .yarn/sdks/typescript/bin/tsserver | 9 +++++++- .yarn/sdks/typescript/lib/tsc.js | 9 +++++++- .yarn/sdks/typescript/lib/tsserver.js | 9 +++++++- .yarn/sdks/typescript/lib/tsserverlibrary.js | 9 +++++++- .yarn/sdks/typescript/lib/typescript.js | 9 +++++++- apps/chrome-devtools/package.json | 2 +- .../chrome-devtools/schemas/state.schema.json | 6 +++++ .../src/app-devtools/app.component.html | 2 +- .../src/app-devtools/app.component.ts | 2 +- .../localization-panel-pres.component.ts | 7 +++--- .../state-panel/state-panel.component.ts | 23 +++++++++++++++++++ .../src/extension/background.ts | 20 ++++++++++++++-- .../src/services/localization.service.ts | 2 +- apps/github-cascading-app/package.json | 2 +- .../styling/builders/style-extractor/index.ts | 2 -- .../scss/theming/otter-theme/_functions.scss | 4 ++-- .../scss/theming/otter-theme/_material.scss | 4 ++++ 21 files changed, 134 insertions(+), 23 deletions(-) diff --git a/.yarn/sdks/eslint/bin/eslint.js b/.yarn/sdks/eslint/bin/eslint.js index 9ef98e400b..42eab99331 100755 --- a/.yarn/sdks/eslint/bin/eslint.js +++ b/.yarn/sdks/eslint/bin/eslint.js @@ -1,18 +1,25 @@ #!/usr/bin/env node const {existsSync} = require(`fs`); -const {createRequire} = require(`module`); +const {createRequire, register} = require(`module`); const {resolve} = require(`path`); +const {pathToFileURL} = require(`url`); const relPnpApiPath = "../../../../.pnp.cjs"; const absPnpApiPath = resolve(__dirname, relPnpApiPath); const absRequire = createRequire(absPnpApiPath); +const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`); +const isPnpLoaderEnabled = existsSync(absPnpLoaderPath); + if (existsSync(absPnpApiPath)) { if (!process.versions.pnp) { // Setup the environment to be able to require eslint/bin/eslint.js require(absPnpApiPath).setup(); + if (isPnpLoaderEnabled && register) { + register(pathToFileURL(absPnpLoaderPath)); + } } } diff --git a/.yarn/sdks/eslint/lib/api.js b/.yarn/sdks/eslint/lib/api.js index 653b22bae0..ea2b46a70b 100644 --- a/.yarn/sdks/eslint/lib/api.js +++ b/.yarn/sdks/eslint/lib/api.js @@ -1,18 +1,25 @@ #!/usr/bin/env node const {existsSync} = require(`fs`); -const {createRequire} = require(`module`); +const {createRequire, register} = require(`module`); const {resolve} = require(`path`); +const {pathToFileURL} = require(`url`); const relPnpApiPath = "../../../../.pnp.cjs"; const absPnpApiPath = resolve(__dirname, relPnpApiPath); const absRequire = createRequire(absPnpApiPath); +const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`); +const isPnpLoaderEnabled = existsSync(absPnpLoaderPath); + if (existsSync(absPnpApiPath)) { if (!process.versions.pnp) { // Setup the environment to be able to require eslint require(absPnpApiPath).setup(); + if (isPnpLoaderEnabled && register) { + register(pathToFileURL(absPnpLoaderPath)); + } } } diff --git a/.yarn/sdks/eslint/lib/unsupported-api.js b/.yarn/sdks/eslint/lib/unsupported-api.js index 30fdf158b4..f5f8e24d0e 100644 --- a/.yarn/sdks/eslint/lib/unsupported-api.js +++ b/.yarn/sdks/eslint/lib/unsupported-api.js @@ -1,18 +1,25 @@ #!/usr/bin/env node const {existsSync} = require(`fs`); -const {createRequire} = require(`module`); +const {createRequire, register} = require(`module`); const {resolve} = require(`path`); +const {pathToFileURL} = require(`url`); const relPnpApiPath = "../../../../.pnp.cjs"; const absPnpApiPath = resolve(__dirname, relPnpApiPath); const absRequire = createRequire(absPnpApiPath); +const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`); +const isPnpLoaderEnabled = existsSync(absPnpLoaderPath); + if (existsSync(absPnpApiPath)) { if (!process.versions.pnp) { // Setup the environment to be able to require eslint/use-at-your-own-risk require(absPnpApiPath).setup(); + if (isPnpLoaderEnabled && register) { + register(pathToFileURL(absPnpLoaderPath)); + } } } diff --git a/.yarn/sdks/typescript/bin/tsc b/.yarn/sdks/typescript/bin/tsc index 454b950b7e..a6bb0e2c16 100755 --- a/.yarn/sdks/typescript/bin/tsc +++ b/.yarn/sdks/typescript/bin/tsc @@ -1,18 +1,25 @@ #!/usr/bin/env node const {existsSync} = require(`fs`); -const {createRequire} = require(`module`); +const {createRequire, register} = require(`module`); const {resolve} = require(`path`); +const {pathToFileURL} = require(`url`); const relPnpApiPath = "../../../../.pnp.cjs"; const absPnpApiPath = resolve(__dirname, relPnpApiPath); const absRequire = createRequire(absPnpApiPath); +const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`); +const isPnpLoaderEnabled = existsSync(absPnpLoaderPath); + if (existsSync(absPnpApiPath)) { if (!process.versions.pnp) { // Setup the environment to be able to require typescript/bin/tsc require(absPnpApiPath).setup(); + if (isPnpLoaderEnabled && register) { + register(pathToFileURL(absPnpLoaderPath)); + } } } diff --git a/.yarn/sdks/typescript/bin/tsserver b/.yarn/sdks/typescript/bin/tsserver index d7a605684d..957bed2001 100755 --- a/.yarn/sdks/typescript/bin/tsserver +++ b/.yarn/sdks/typescript/bin/tsserver @@ -1,18 +1,25 @@ #!/usr/bin/env node const {existsSync} = require(`fs`); -const {createRequire} = require(`module`); +const {createRequire, register} = require(`module`); const {resolve} = require(`path`); +const {pathToFileURL} = require(`url`); const relPnpApiPath = "../../../../.pnp.cjs"; const absPnpApiPath = resolve(__dirname, relPnpApiPath); const absRequire = createRequire(absPnpApiPath); +const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`); +const isPnpLoaderEnabled = existsSync(absPnpLoaderPath); + if (existsSync(absPnpApiPath)) { if (!process.versions.pnp) { // Setup the environment to be able to require typescript/bin/tsserver require(absPnpApiPath).setup(); + if (isPnpLoaderEnabled && register) { + register(pathToFileURL(absPnpLoaderPath)); + } } } diff --git a/.yarn/sdks/typescript/lib/tsc.js b/.yarn/sdks/typescript/lib/tsc.js index 2f62fc96c0..a262a77d0f 100644 --- a/.yarn/sdks/typescript/lib/tsc.js +++ b/.yarn/sdks/typescript/lib/tsc.js @@ -1,18 +1,25 @@ #!/usr/bin/env node const {existsSync} = require(`fs`); -const {createRequire} = require(`module`); +const {createRequire, register} = require(`module`); const {resolve} = require(`path`); +const {pathToFileURL} = require(`url`); const relPnpApiPath = "../../../../.pnp.cjs"; const absPnpApiPath = resolve(__dirname, relPnpApiPath); const absRequire = createRequire(absPnpApiPath); +const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`); +const isPnpLoaderEnabled = existsSync(absPnpLoaderPath); + if (existsSync(absPnpApiPath)) { if (!process.versions.pnp) { // Setup the environment to be able to require typescript/lib/tsc.js require(absPnpApiPath).setup(); + if (isPnpLoaderEnabled && register) { + register(pathToFileURL(absPnpLoaderPath)); + } } } diff --git a/.yarn/sdks/typescript/lib/tsserver.js b/.yarn/sdks/typescript/lib/tsserver.js index ed800750cc..1dae54c1ab 100644 --- a/.yarn/sdks/typescript/lib/tsserver.js +++ b/.yarn/sdks/typescript/lib/tsserver.js @@ -1,18 +1,25 @@ #!/usr/bin/env node const {existsSync} = require(`fs`); -const {createRequire} = require(`module`); +const {createRequire, register} = require(`module`); const {resolve} = require(`path`); +const {pathToFileURL} = require(`url`); const relPnpApiPath = "../../../../.pnp.cjs"; const absPnpApiPath = resolve(__dirname, relPnpApiPath); const absRequire = createRequire(absPnpApiPath); +const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`); +const isPnpLoaderEnabled = existsSync(absPnpLoaderPath); + if (existsSync(absPnpApiPath)) { if (!process.versions.pnp) { // Setup the environment to be able to require typescript/lib/tsserver.js require(absPnpApiPath).setup(); + if (isPnpLoaderEnabled && register) { + register(pathToFileURL(absPnpLoaderPath)); + } } } diff --git a/.yarn/sdks/typescript/lib/tsserverlibrary.js b/.yarn/sdks/typescript/lib/tsserverlibrary.js index 4d99766952..7f9d7f964f 100644 --- a/.yarn/sdks/typescript/lib/tsserverlibrary.js +++ b/.yarn/sdks/typescript/lib/tsserverlibrary.js @@ -1,18 +1,25 @@ #!/usr/bin/env node const {existsSync} = require(`fs`); -const {createRequire} = require(`module`); +const {createRequire, register} = require(`module`); const {resolve} = require(`path`); +const {pathToFileURL} = require(`url`); const relPnpApiPath = "../../../../.pnp.cjs"; const absPnpApiPath = resolve(__dirname, relPnpApiPath); const absRequire = createRequire(absPnpApiPath); +const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`); +const isPnpLoaderEnabled = existsSync(absPnpLoaderPath); + if (existsSync(absPnpApiPath)) { if (!process.versions.pnp) { // Setup the environment to be able to require typescript/lib/tsserverlibrary.js require(absPnpApiPath).setup(); + if (isPnpLoaderEnabled && register) { + register(pathToFileURL(absPnpLoaderPath)); + } } } diff --git a/.yarn/sdks/typescript/lib/typescript.js b/.yarn/sdks/typescript/lib/typescript.js index b5f4db25be..317b60b4c0 100644 --- a/.yarn/sdks/typescript/lib/typescript.js +++ b/.yarn/sdks/typescript/lib/typescript.js @@ -1,18 +1,25 @@ #!/usr/bin/env node const {existsSync} = require(`fs`); -const {createRequire} = require(`module`); +const {createRequire, register} = require(`module`); const {resolve} = require(`path`); +const {pathToFileURL} = require(`url`); const relPnpApiPath = "../../../../.pnp.cjs"; const absPnpApiPath = resolve(__dirname, relPnpApiPath); const absRequire = createRequire(absPnpApiPath); +const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`); +const isPnpLoaderEnabled = existsSync(absPnpLoaderPath); + if (existsSync(absPnpApiPath)) { if (!process.versions.pnp) { // Setup the environment to be able to require typescript require(absPnpApiPath).setup(); + if (isPnpLoaderEnabled && register) { + register(pathToFileURL(absPnpLoaderPath)); + } } } diff --git a/apps/chrome-devtools/package.json b/apps/chrome-devtools/package.json index b8cbd5b995..64cd6b3bab 100644 --- a/apps/chrome-devtools/package.json +++ b/apps/chrome-devtools/package.json @@ -1,6 +1,6 @@ { "name": "@o3r/chrome-devtools", - "version": "0.0.0-placeholder", + "version": "0.0.0", "publishConfig": { "access": "public" }, diff --git a/apps/chrome-devtools/schemas/state.schema.json b/apps/chrome-devtools/schemas/state.schema.json index 5faed105fa..9af49b2d7a 100644 --- a/apps/chrome-devtools/schemas/state.schema.json +++ b/apps/chrome-devtools/schemas/state.schema.json @@ -10,22 +10,27 @@ ], "properties": { "color": { + "description": "Background color to identify the state in the selection widget.", "type": "string" }, "colorContrast": { + "description": "Text color for the state in the selection widget in contrast with the background color.", "type": "string" }, "name": { + "description": "User friendly name to identify the state in the Chrome Extension state panel.", "type": "string" }, "configurations": { "type": "object", + "description": "List of the configuration-override to apply on the application.", "additionalProperties": { "type": "object" } }, "localizations": { "type": "object", + "description": "List of the localization-override to apply on the application.", "additionalProperties": { "type": "object", "additionalProperties": { @@ -34,6 +39,7 @@ } }, "stylingVariables": { + "description": "List of the css-variable-override to apply on the application.", "type": "object", "additionalProperties": { "type": "string" diff --git a/apps/chrome-devtools/src/app-devtools/app.component.html b/apps/chrome-devtools/src/app-devtools/app.component.html index 461e3e9ec5..7b1e51916c 100644 --- a/apps/chrome-devtools/src/app-devtools/app.component.html +++ b/apps/chrome-devtools/src/app-devtools/app.component.html @@ -44,7 +44,7 @@ -
+
{ acc.variables[item.name] = item; - // Why do we delete this item name? - // delete (acc.variables[item.name] as any).name; }); return acc; }, previousMetadata); diff --git a/packages/@o3r/styling/scss/theming/otter-theme/_functions.scss b/packages/@o3r/styling/scss/theming/otter-theme/_functions.scss index ef10b6aefb..41557d37a2 100644 --- a/packages/@o3r/styling/scss/theming/otter-theme/_functions.scss +++ b/packages/@o3r/styling/scss/theming/otter-theme/_functions.scss @@ -17,8 +17,8 @@ @each $key, $value in $meta-theme { $new-key: if($root-name != '', '#{$root-name}-#{$key}', $key); - $new-value: _meta-theme-to-otter($value, $new-key); - $ret: map.merge($ret, ($key: $new-value)); + // We do not extract the metadata as (variable, value) pair + $new-value: if($key != details, _meta-theme-to-otter($value, $new-key), $value); $ret: map.merge($ret, ($key: $new-value)); } @return $ret; diff --git a/packages/@o3r/styling/scss/theming/otter-theme/_material.scss b/packages/@o3r/styling/scss/theming/otter-theme/_material.scss index 3b454396d9..23ad911c6a 100644 --- a/packages/@o3r/styling/scss/theming/otter-theme/_material.scss +++ b/packages/@o3r/styling/scss/theming/otter-theme/_material.scss @@ -141,6 +141,10 @@ @return $meta-theme; } + @if (map.has-key($meta-theme, value) and map.has-key($meta-theme, details)) { + @return _meta-theme-to-material(map.get($meta-theme, value), $root-name, $enable-css-var); + } + @else { $ret: $meta-theme;