@o3r/design 12.1.0-prerelease.3 → 12.1.0-prerelease.30
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/builders/generate-css/index.d.ts +1 -1
- package/builders/generate-jsonschema/index.d.ts +1 -1
- package/builders/generate-style/index.d.ts +1 -1
- package/package.json +30 -30
- package/schematics/design-token-to-component/index.js +4 -6
- package/schematics/extract-token/index.js +6 -8
- package/schematics/generate-css/index.js +4 -6
- package/schematics/ng-add/index.d.ts.map +1 -1
- package/schematics/ng-add/index.js +2 -2
- package/schematics/ng-update/index.d.ts +1 -1
- package/schematics/ng-update/index.d.ts.map +1 -1
- package/schematics/ng-update/index.js +1 -1
|
@@ -3,6 +3,6 @@ import type { GenerateCssSchematicsSchema } from './schema';
|
|
|
3
3
|
* Generate CSS from Design Token files
|
|
4
4
|
* @param options
|
|
5
5
|
*/
|
|
6
|
-
declare const _default: import("@angular-devkit/architect
|
|
6
|
+
declare const _default: import("@angular-devkit/architect").Builder<GenerateCssSchematicsSchema & import("@angular-devkit/core").JsonObject>;
|
|
7
7
|
export default _default;
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -3,6 +3,6 @@ import type { GenerateJsonSchemaSchematicsSchema } from './schema';
|
|
|
3
3
|
* Generate Json Schema from Design Token files
|
|
4
4
|
* @param options
|
|
5
5
|
*/
|
|
6
|
-
declare const _default: import("@angular-devkit/architect
|
|
6
|
+
declare const _default: import("@angular-devkit/architect").Builder<GenerateJsonSchemaSchematicsSchema & import("@angular-devkit/core").JsonObject>;
|
|
7
7
|
export default _default;
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -3,6 +3,6 @@ import type { GenerateStyleSchematicsSchema } from './schema';
|
|
|
3
3
|
* Generate CSS from Design Token files
|
|
4
4
|
* @param options
|
|
5
5
|
*/
|
|
6
|
-
declare const _default: import("@angular-devkit/architect
|
|
6
|
+
declare const _default: import("@angular-devkit/architect").Builder<GenerateStyleSchematicsSchema & import("@angular-devkit/core").JsonObject>;
|
|
7
7
|
export default _default;
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@o3r/design",
|
|
3
|
-
"version": "12.1.0-prerelease.
|
|
3
|
+
"version": "12.1.0-prerelease.30",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -53,12 +53,12 @@
|
|
|
53
53
|
"tslib": "^2.6.2"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@angular-devkit/architect": "
|
|
56
|
+
"@angular-devkit/architect": ">=0.1900.0 <0.2000.0-0",
|
|
57
57
|
"@angular-devkit/schematics": "^19.0.0",
|
|
58
|
-
"@o3r/core": "^12.1.0-prerelease.
|
|
59
|
-
"@o3r/schematics": "^12.1.0-prerelease.
|
|
60
|
-
"@o3r/styling": "^12.1.0-prerelease.
|
|
61
|
-
"@o3r/telemetry": "^12.1.0-prerelease.
|
|
58
|
+
"@o3r/core": "^12.1.0-prerelease.30",
|
|
59
|
+
"@o3r/schematics": "^12.1.0-prerelease.30",
|
|
60
|
+
"@o3r/styling": "^12.1.0-prerelease.30",
|
|
61
|
+
"@o3r/telemetry": "^12.1.0-prerelease.30",
|
|
62
62
|
"chokidar": "^4.0.3",
|
|
63
63
|
"globby": "^11.1.0",
|
|
64
64
|
"sass": "^1.81.0"
|
|
@@ -93,18 +93,18 @@
|
|
|
93
93
|
}
|
|
94
94
|
},
|
|
95
95
|
"devDependencies": {
|
|
96
|
-
"@angular-devkit/architect": "~0.
|
|
97
|
-
"@angular-devkit/build-angular": "~19.
|
|
98
|
-
"@angular-devkit/core": "~19.
|
|
99
|
-
"@angular-devkit/schematics": "~19.
|
|
100
|
-
"@angular/animations": "~19.
|
|
101
|
-
"@angular/cli": "~19.
|
|
102
|
-
"@angular/common": "~19.
|
|
103
|
-
"@angular/compiler": "~19.
|
|
104
|
-
"@angular/compiler-cli": "~19.
|
|
105
|
-
"@angular/core": "~19.
|
|
106
|
-
"@angular/platform-browser": "~19.
|
|
107
|
-
"@angular/platform-browser-dynamic": "~19.
|
|
96
|
+
"@angular-devkit/architect": "~0.1901.0",
|
|
97
|
+
"@angular-devkit/build-angular": "~19.1.0",
|
|
98
|
+
"@angular-devkit/core": "~19.1.0",
|
|
99
|
+
"@angular-devkit/schematics": "~19.1.0",
|
|
100
|
+
"@angular/animations": "~19.1.0",
|
|
101
|
+
"@angular/cli": "~19.1.0",
|
|
102
|
+
"@angular/common": "~19.1.0",
|
|
103
|
+
"@angular/compiler": "~19.1.0",
|
|
104
|
+
"@angular/compiler-cli": "~19.1.0",
|
|
105
|
+
"@angular/core": "~19.1.0",
|
|
106
|
+
"@angular/platform-browser": "~19.1.0",
|
|
107
|
+
"@angular/platform-browser-dynamic": "~19.1.0",
|
|
108
108
|
"@babel/core": "~7.26.0",
|
|
109
109
|
"@babel/preset-typescript": "~7.26.0",
|
|
110
110
|
"@compodoc/compodoc": "^1.1.19",
|
|
@@ -113,21 +113,21 @@
|
|
|
113
113
|
"@nx/eslint-plugin": "~20.2.0",
|
|
114
114
|
"@nx/jest": "~20.2.0",
|
|
115
115
|
"@nx/js": "~20.2.0",
|
|
116
|
-
"@o3r/build-helpers": "^12.1.0-prerelease.
|
|
117
|
-
"@o3r/core": "^12.1.0-prerelease.
|
|
118
|
-
"@o3r/eslint-plugin": "^12.1.0-prerelease.
|
|
119
|
-
"@o3r/schematics": "^12.1.0-prerelease.
|
|
120
|
-
"@o3r/styling": "^12.1.0-prerelease.
|
|
121
|
-
"@o3r/telemetry": "^12.1.0-prerelease.
|
|
122
|
-
"@o3r/test-helpers": "^12.1.0-prerelease.
|
|
123
|
-
"@schematics/angular": "~19.
|
|
116
|
+
"@o3r/build-helpers": "^12.1.0-prerelease.30",
|
|
117
|
+
"@o3r/core": "^12.1.0-prerelease.30",
|
|
118
|
+
"@o3r/eslint-plugin": "^12.1.0-prerelease.30",
|
|
119
|
+
"@o3r/schematics": "^12.1.0-prerelease.30",
|
|
120
|
+
"@o3r/styling": "^12.1.0-prerelease.30",
|
|
121
|
+
"@o3r/telemetry": "^12.1.0-prerelease.30",
|
|
122
|
+
"@o3r/test-helpers": "^12.1.0-prerelease.30",
|
|
123
|
+
"@schematics/angular": "~19.1.0",
|
|
124
124
|
"@stylistic/eslint-plugin": "~3.0.0",
|
|
125
125
|
"@swc/helpers": "~0.5.0",
|
|
126
126
|
"@types/jest": "~29.5.2",
|
|
127
127
|
"@types/minimist": "^1.2.2",
|
|
128
128
|
"@types/node": "^20.0.0",
|
|
129
129
|
"@types/semver": "^7.3.13",
|
|
130
|
-
"@typescript-eslint/parser": "~8.
|
|
130
|
+
"@typescript-eslint/parser": "~8.24.0",
|
|
131
131
|
"angular-eslint": "~19.0.0",
|
|
132
132
|
"chokidar": "^4.0.3",
|
|
133
133
|
"cpy-cli": "^5.0.0",
|
|
@@ -149,13 +149,13 @@
|
|
|
149
149
|
"nx": "~20.2.0",
|
|
150
150
|
"pid-from-port": "^1.1.3",
|
|
151
151
|
"rxjs": "^7.8.1",
|
|
152
|
-
"sass": "~1.
|
|
152
|
+
"sass": "~1.84.0",
|
|
153
153
|
"semver": "^7.5.2",
|
|
154
154
|
"ts-jest": "~29.2.5",
|
|
155
155
|
"ts-node": "~10.9.2",
|
|
156
156
|
"type-fest": "^4.30.1",
|
|
157
|
-
"typescript": "~5.
|
|
158
|
-
"typescript-eslint": "~8.
|
|
157
|
+
"typescript": "~5.7.3",
|
|
158
|
+
"typescript-eslint": "~8.24.0",
|
|
159
159
|
"zone.js": "~0.15.0"
|
|
160
160
|
},
|
|
161
161
|
"engines": {
|
|
@@ -27,17 +27,15 @@ function ngAddDesignTokenFn(options) {
|
|
|
27
27
|
* @param options
|
|
28
28
|
*/
|
|
29
29
|
const ngAddDesignToken = (options) => async () => {
|
|
30
|
-
let
|
|
30
|
+
let createOtterSchematicWrapper = (fn) => fn;
|
|
31
31
|
try {
|
|
32
|
-
|
|
32
|
+
const { createOtterSchematic: wrapper } = await Promise.resolve().then(() => require('@o3r/schematics'));
|
|
33
|
+
createOtterSchematicWrapper = wrapper;
|
|
33
34
|
}
|
|
34
35
|
catch {
|
|
35
36
|
// No @o3r/schematics detected
|
|
36
37
|
}
|
|
37
|
-
|
|
38
|
-
return ngAddDesignTokenFn(options);
|
|
39
|
-
}
|
|
40
|
-
return createSchematicWithMetrics(ngAddDesignTokenFn)(options);
|
|
38
|
+
return createOtterSchematicWrapper(ngAddDesignTokenFn)(options);
|
|
41
39
|
};
|
|
42
40
|
exports.ngAddDesignToken = ngAddDesignToken;
|
|
43
41
|
//# sourceMappingURL=index.js.map
|
|
@@ -29,12 +29,12 @@ function extractTokenFn(options) {
|
|
|
29
29
|
const { filter } = await Promise.resolve().then(() => require('minimatch'));
|
|
30
30
|
const filterFunctions = options.componentFilePatterns.map((pattern) => filter('/' + pattern.replace(/[/\\]+/g, '/'), { dot: true }));
|
|
31
31
|
const sassParser = new CssVariableExtractor();
|
|
32
|
-
tree.visit((file) => {
|
|
32
|
+
tree.visit(async (file) => {
|
|
33
33
|
if (!filterFunctions.some((filterFunction) => filterFunction(file))) {
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
36
|
const content = tree.readText(file);
|
|
37
|
-
const variables = sassParser.extractFileContent((0, node_path_1.resolve)(tree.root.path, file), content);
|
|
37
|
+
const variables = await sassParser.extractFileContent((0, node_path_1.resolve)(tree.root.path, file), content);
|
|
38
38
|
if (variables.length > 0 && options.includeTags) {
|
|
39
39
|
const newContent = updateFileContent(content);
|
|
40
40
|
tree.overwrite(file, newContent);
|
|
@@ -94,17 +94,15 @@ function extractTokenFn(options) {
|
|
|
94
94
|
* @param options
|
|
95
95
|
*/
|
|
96
96
|
const extractToken = (options) => async () => {
|
|
97
|
-
let
|
|
97
|
+
let createOtterSchematicWrapper = (fn) => fn;
|
|
98
98
|
try {
|
|
99
|
-
|
|
99
|
+
const { createOtterSchematic: wrapper } = await Promise.resolve().then(() => require('@o3r/schematics'));
|
|
100
|
+
createOtterSchematicWrapper = wrapper;
|
|
100
101
|
}
|
|
101
102
|
catch {
|
|
102
103
|
// No @o3r/schematics detected
|
|
103
104
|
}
|
|
104
|
-
|
|
105
|
-
return extractTokenFn(options);
|
|
106
|
-
}
|
|
107
|
-
return createSchematicWithMetrics(extractTokenFn)(options);
|
|
105
|
+
return createOtterSchematicWrapper(extractTokenFn)(options);
|
|
108
106
|
};
|
|
109
107
|
exports.extractToken = extractToken;
|
|
110
108
|
//# sourceMappingURL=index.js.map
|
|
@@ -50,17 +50,15 @@ function generateCssFn(options) {
|
|
|
50
50
|
* @param options
|
|
51
51
|
*/
|
|
52
52
|
const generateCss = (options) => async () => {
|
|
53
|
-
let
|
|
53
|
+
let createOtterSchematicWrapper = (fn) => fn;
|
|
54
54
|
try {
|
|
55
|
-
|
|
55
|
+
const { createOtterSchematic: wrapper } = await Promise.resolve().then(() => require('@o3r/schematics'));
|
|
56
|
+
createOtterSchematicWrapper = wrapper;
|
|
56
57
|
}
|
|
57
58
|
catch {
|
|
58
59
|
// No @o3r/schematics detected
|
|
59
60
|
}
|
|
60
|
-
|
|
61
|
-
return generateCssFn(options);
|
|
62
|
-
}
|
|
63
|
-
return createSchematicWithMetrics(generateCssFn)(options);
|
|
61
|
+
return createOtterSchematicWrapper(generateCssFn)(options);
|
|
64
62
|
};
|
|
65
63
|
exports.generateCss = generateCss;
|
|
66
64
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,IAAI,EACV,MAAM,4BAA4B,CAAC;AAOpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAIlB;;;GAGG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,qBAAqB,GAAG,IAAI,CAqB5D;AAED;;;GAGG;AACH,eAAO,MAAM,KAAK,YAAa,qBAAqB,KAAG,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,IAAI,EACV,MAAM,4BAA4B,CAAC;AAOpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAIlB;;;GAGG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,qBAAqB,GAAG,IAAI,CAqB5D;AAED;;;GAGG;AACH,eAAO,MAAM,KAAK,YAAa,qBAAqB,KAAG,IAkBtD,CAAC"}
|
|
@@ -40,10 +40,10 @@ function ngAddFn(options) {
|
|
|
40
40
|
const ngAdd = (options) => async (_, { logger }) => {
|
|
41
41
|
const missingSchematicDependencyMessage = 'Missing @o3r/schematics';
|
|
42
42
|
try {
|
|
43
|
-
const {
|
|
43
|
+
const { createOtterSchematic } = await Promise.resolve().then(() => require('@o3r/schematics')).catch(() => {
|
|
44
44
|
throw new Error(missingSchematicDependencyMessage);
|
|
45
45
|
});
|
|
46
|
-
return
|
|
46
|
+
return createOtterSchematic(ngAddFn)(options);
|
|
47
47
|
}
|
|
48
48
|
catch (err) {
|
|
49
49
|
if (err instanceof Error && err.message === missingSchematicDependencyMessage) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-update/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,IAAI,EAGL,MAAM,4BAA4B,CAAC;AAsBpC;;GAEG;AAEH,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-update/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,IAAI,EAGL,MAAM,4BAA4B,CAAC;AAsBpC;;GAEG;AAEH,eAAO,MAAM,WAAW,wBAAsC,CAAC"}
|
|
@@ -20,5 +20,5 @@ function updateV11_3Fn() {
|
|
|
20
20
|
* Update of Otter library V11.3
|
|
21
21
|
*/
|
|
22
22
|
// eslint-disable-next-line @typescript-eslint/naming-convention -- function name contains the version number
|
|
23
|
-
exports.updateV11_3 = (0, schematics_2.
|
|
23
|
+
exports.updateV11_3 = (0, schematics_2.createOtterSchematic)(updateV11_3Fn);
|
|
24
24
|
//# sourceMappingURL=index.js.map
|