@o3r/design 10.0.0-prerelease.23 → 10.0.0-prerelease.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@o3r/design",
3
- "version": "10.0.0-prerelease.23",
3
+ "version": "10.0.0-prerelease.25",
4
4
  "description": "A design framework to generate theme on an Otter application based on Design Tokens.",
5
5
  "keywords": [
6
6
  "design",
@@ -46,9 +46,9 @@
46
46
  "tslib": "^2.5.3"
47
47
  },
48
48
  "peerDependencies": {
49
- "@o3r/core": "^10.0.0-prerelease.23",
50
- "@o3r/schematics": "^10.0.0-prerelease.23",
51
- "@o3r/styling": "^10.0.0-prerelease.23",
49
+ "@o3r/core": "^10.0.0-prerelease.25",
50
+ "@o3r/schematics": "^10.0.0-prerelease.25",
51
+ "@o3r/styling": "^10.0.0-prerelease.25",
52
52
  "chokidar": "^3.5.2",
53
53
  "globby": "^11.1.0",
54
54
  "minimatch": "~9.0.3",
@@ -94,12 +94,12 @@
94
94
  "@nx/eslint-plugin": "~17.2.0",
95
95
  "@nx/jest": "~17.2.0",
96
96
  "@nx/js": "~17.2.0",
97
- "@o3r/build-helpers": "^10.0.0-prerelease.23",
98
- "@o3r/core": "^10.0.0-prerelease.23",
99
- "@o3r/eslint-plugin": "^10.0.0-prerelease.23",
100
- "@o3r/schematics": "^10.0.0-prerelease.23",
101
- "@o3r/styling": "^10.0.0-prerelease.23",
102
- "@o3r/test-helpers": "^10.0.0-prerelease.23",
97
+ "@o3r/build-helpers": "^10.0.0-prerelease.25",
98
+ "@o3r/core": "^10.0.0-prerelease.25",
99
+ "@o3r/eslint-plugin": "^10.0.0-prerelease.25",
100
+ "@o3r/schematics": "^10.0.0-prerelease.25",
101
+ "@o3r/styling": "^10.0.0-prerelease.25",
102
+ "@o3r/test-helpers": "^10.0.0-prerelease.25",
103
103
  "@schematics/angular": "~17.0.3",
104
104
  "@types/jest": "~29.5.2",
105
105
  "@types/minimist": "^1.2.2",
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/extract-token/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAM7D;;;GAGG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,4BAA4B,GAAG,IAAI,CA2FxE"}
@@ -49,7 +49,7 @@ function extractToken(options) {
49
49
  targetNode[name] ||= {};
50
50
  targetNode = targetNode[name];
51
51
  });
52
- const valueWithVariable = [...variable.defaultValue.matchAll(/var\(--([^)])\)/g)]
52
+ const valueWithVariable = [...variable.defaultValue.matchAll(/var\(--([^,)]+),?[^)]*\)/g)]
53
53
  .reduce((acc, [variableString, variableName]) => {
54
54
  return acc.replaceAll(variableString, `{${variableName.replaceAll('-', '.')}}`);
55
55
  }, variable.defaultValue);
@@ -75,6 +75,7 @@ function extractToken(options) {
75
75
  designTokenNode.$extensions.o3rPrivate = isPrivate;
76
76
  designTokenNode.$extensions.o3rTargetFile = node_path_1.posix.join('.', node_path_1.posix.basename(file));
77
77
  });
78
+ tokenSpecification.$schema = 'https://raw.githubusercontent.com/AmadeusITGroup/otter/main/packages/@o3r/design/schemas/design-token.schema.json';
78
79
  tree.create(file.replace(/\.scss$/, '.json'), JSON.stringify(tokenSpecification, null, 2));
79
80
  });
80
81
  return () => tree;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../schematics/extract-token/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAE7D,MAAM,WAAW,4BAA6B,SAAQ,qBAAqB;IACzE;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAE7D,oDAAoD;IACpD,qBAAqB,EAAE,MAAM,EAAE,CAAC;CACjC"}
@@ -38,6 +38,6 @@
38
38
  },
39
39
  "additionalProperties": true,
40
40
  "required": [
41
- "componentFilePattern"
41
+ "componentFilePatterns"
42
42
  ]
43
43
  }
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ngAdd = void 0;
4
4
  const schematics_1 = require("@angular-devkit/schematics");
5
5
  const register_generate_css_1 = require("./register-generate-css");
6
- const _extract_token_1 = require("../ extract-token");
6
+ const extract_token_1 = require("../extract-token");
7
7
  const schematics_2 = require("@o3r/schematics");
8
8
  /**
9
9
  * Add Otter design to an Angular Project
@@ -27,7 +27,7 @@ function ngAdd(options) {
27
27
  useOtterDesignToken: true
28
28
  }
29
29
  }),
30
- options.extractDesignToken ? (0, _extract_token_1.extractToken)({ componentFilePatterns: ['**/*.scss'], includeTags: true }) : schematics_1.noop
30
+ options.extractDesignToken ? (0, extract_token_1.extractToken)({ componentFilePatterns: ['**/*.scss'], includeTags: true }) : schematics_1.noop
31
31
  ]);
32
32
  }
33
33
  exports.ngAdd = ngAdd;
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ extract-token/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAM7D;;;GAGG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,4BAA4B,GAAG,IAAI,CA0FxE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../schematics/ extract-token/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAE7D,MAAM,WAAW,4BAA6B,SAAQ,qBAAqB;IACzE;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAE7D,oDAAoD;IACpD,qBAAqB,EAAE,MAAM,EAAE,CAAC;CACjC"}