@o3r/design 12.1.0-prerelease.7 → 12.1.0-prerelease.71
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-css/schema.json +0 -4
- package/builders/generate-jsonschema/index.d.ts +1 -1
- package/builders/generate-jsonschema/schema.json +0 -2
- package/builders/generate-style/index.d.ts +1 -1
- package/builders/generate-style/schema.json +0 -4
- package/package.json +48 -44
- 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/generate-css/schema.json +0 -1
- package/schematics/ng-add/index.d.ts.map +1 -1
- package/schematics/ng-add/index.js +2 -2
- package/schematics/ng-add/schema.json +1 -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
|
|
@@ -42,7 +42,6 @@
|
|
|
42
42
|
},
|
|
43
43
|
"metadataIgnorePrivate": {
|
|
44
44
|
"type": "boolean",
|
|
45
|
-
"default": false,
|
|
46
45
|
"description": "Ignore the private variable in the Metadata generation."
|
|
47
46
|
},
|
|
48
47
|
"rootPath": {
|
|
@@ -51,12 +50,10 @@
|
|
|
51
50
|
},
|
|
52
51
|
"watch": {
|
|
53
52
|
"type": "boolean",
|
|
54
|
-
"default": false,
|
|
55
53
|
"description": "Enable Watch mode"
|
|
56
54
|
},
|
|
57
55
|
"failOnDuplicate": {
|
|
58
56
|
"type": "boolean",
|
|
59
|
-
"default": false,
|
|
60
57
|
"description": "Determine if the process should stop in case of Token duplication"
|
|
61
58
|
},
|
|
62
59
|
"templateFile": {
|
|
@@ -90,7 +87,6 @@
|
|
|
90
87
|
},
|
|
91
88
|
"failOnMissingReference": {
|
|
92
89
|
"type": "boolean",
|
|
93
|
-
"default": false,
|
|
94
90
|
"description": "Determine if the builder should fail if a missing Design Token reference is detected"
|
|
95
91
|
}
|
|
96
92
|
},
|
|
@@ -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
|
|
@@ -21,12 +21,10 @@
|
|
|
21
21
|
},
|
|
22
22
|
"watch": {
|
|
23
23
|
"type": "boolean",
|
|
24
|
-
"default": false,
|
|
25
24
|
"description": "Enable Watch mode"
|
|
26
25
|
},
|
|
27
26
|
"failOnDuplicate": {
|
|
28
27
|
"type": "boolean",
|
|
29
|
-
"default": false,
|
|
30
28
|
"description": "Determine if the process should stop in case of Token duplication"
|
|
31
29
|
},
|
|
32
30
|
"schemaId": {
|
|
@@ -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
|
|
@@ -51,7 +51,6 @@
|
|
|
51
51
|
},
|
|
52
52
|
"metadataIgnorePrivate": {
|
|
53
53
|
"type": "boolean",
|
|
54
|
-
"default": false,
|
|
55
54
|
"description": "Ignore private variables in the metadata generation."
|
|
56
55
|
},
|
|
57
56
|
"rootPath": {
|
|
@@ -60,12 +59,10 @@
|
|
|
60
59
|
},
|
|
61
60
|
"watch": {
|
|
62
61
|
"type": "boolean",
|
|
63
|
-
"default": false,
|
|
64
62
|
"description": "Enable watch mode"
|
|
65
63
|
},
|
|
66
64
|
"failOnDuplicate": {
|
|
67
65
|
"type": "boolean",
|
|
68
|
-
"default": false,
|
|
69
66
|
"description": "Determine if the process should stop in case of Design Token duplication"
|
|
70
67
|
},
|
|
71
68
|
"templateFile": {
|
|
@@ -100,7 +97,6 @@
|
|
|
100
97
|
},
|
|
101
98
|
"failOnMissingReference": {
|
|
102
99
|
"type": "boolean",
|
|
103
|
-
"default": false,
|
|
104
100
|
"description": "Determine if the builder should fail if a missing Design Token reference is detected"
|
|
105
101
|
},
|
|
106
102
|
"sortOrderPatternsFilePath": {
|
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.71",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -30,6 +30,10 @@
|
|
|
30
30
|
"./schemas/*.json": {
|
|
31
31
|
"default": "./schemas/*.json"
|
|
32
32
|
},
|
|
33
|
+
"./builders/*": {
|
|
34
|
+
"types": "./builders/*.d.ts",
|
|
35
|
+
"default": "./builders/*"
|
|
36
|
+
},
|
|
33
37
|
".": {
|
|
34
38
|
"module": "./src/public_api.js",
|
|
35
39
|
"typings": "./src/public_api.d.ts",
|
|
@@ -53,12 +57,12 @@
|
|
|
53
57
|
"tslib": "^2.6.2"
|
|
54
58
|
},
|
|
55
59
|
"peerDependencies": {
|
|
56
|
-
"@angular-devkit/architect": "
|
|
60
|
+
"@angular-devkit/architect": ">=0.1900.0 <0.2000.0-0",
|
|
57
61
|
"@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.
|
|
62
|
+
"@o3r/core": "^12.1.0-prerelease.71",
|
|
63
|
+
"@o3r/schematics": "^12.1.0-prerelease.71",
|
|
64
|
+
"@o3r/styling": "^12.1.0-prerelease.71",
|
|
65
|
+
"@o3r/telemetry": "^12.1.0-prerelease.71",
|
|
62
66
|
"chokidar": "^4.0.3",
|
|
63
67
|
"globby": "^11.1.0",
|
|
64
68
|
"sass": "^1.81.0"
|
|
@@ -93,69 +97,69 @@
|
|
|
93
97
|
}
|
|
94
98
|
},
|
|
95
99
|
"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.
|
|
100
|
+
"@angular-devkit/architect": "~0.1901.0",
|
|
101
|
+
"@angular-devkit/build-angular": "~19.1.0",
|
|
102
|
+
"@angular-devkit/core": "~19.1.0",
|
|
103
|
+
"@angular-devkit/schematics": "~19.1.0",
|
|
104
|
+
"@angular/animations": "~19.1.0",
|
|
105
|
+
"@angular/cli": "~19.1.0",
|
|
106
|
+
"@angular/common": "~19.1.0",
|
|
107
|
+
"@angular/compiler": "~19.1.0",
|
|
108
|
+
"@angular/compiler-cli": "~19.1.0",
|
|
109
|
+
"@angular/core": "~19.1.0",
|
|
110
|
+
"@angular/platform-browser": "~19.1.0",
|
|
111
|
+
"@angular/platform-browser-dynamic": "~19.1.0",
|
|
108
112
|
"@babel/core": "~7.26.0",
|
|
109
113
|
"@babel/preset-typescript": "~7.26.0",
|
|
110
114
|
"@compodoc/compodoc": "^1.1.19",
|
|
111
115
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.0",
|
|
112
|
-
"@nx/eslint": "~20.
|
|
113
|
-
"@nx/eslint-plugin": "~20.
|
|
114
|
-
"@nx/jest": "~20.
|
|
115
|
-
"@nx/js": "~20.
|
|
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.
|
|
124
|
-
"@stylistic/eslint-plugin": "~3.
|
|
116
|
+
"@nx/eslint": "~20.4.0",
|
|
117
|
+
"@nx/eslint-plugin": "~20.4.0",
|
|
118
|
+
"@nx/jest": "~20.4.0",
|
|
119
|
+
"@nx/js": "~20.4.0",
|
|
120
|
+
"@o3r/build-helpers": "^12.1.0-prerelease.71",
|
|
121
|
+
"@o3r/core": "^12.1.0-prerelease.71",
|
|
122
|
+
"@o3r/eslint-plugin": "^12.1.0-prerelease.71",
|
|
123
|
+
"@o3r/schematics": "^12.1.0-prerelease.71",
|
|
124
|
+
"@o3r/styling": "^12.1.0-prerelease.71",
|
|
125
|
+
"@o3r/telemetry": "^12.1.0-prerelease.71",
|
|
126
|
+
"@o3r/test-helpers": "^12.1.0-prerelease.71",
|
|
127
|
+
"@schematics/angular": "~19.1.0",
|
|
128
|
+
"@stylistic/eslint-plugin": "~3.1.0",
|
|
125
129
|
"@swc/helpers": "~0.5.0",
|
|
126
130
|
"@types/jest": "~29.5.2",
|
|
127
131
|
"@types/minimist": "^1.2.2",
|
|
128
132
|
"@types/node": "^20.0.0",
|
|
129
133
|
"@types/semver": "^7.3.13",
|
|
130
|
-
"@typescript-eslint/parser": "~8.
|
|
131
|
-
"angular-eslint": "~19.
|
|
134
|
+
"@typescript-eslint/parser": "~8.25.0",
|
|
135
|
+
"angular-eslint": "~19.1.0",
|
|
132
136
|
"chokidar": "^4.0.3",
|
|
133
137
|
"cpy-cli": "^5.0.0",
|
|
134
|
-
"eslint": "~9.
|
|
135
|
-
"eslint-import-resolver-node": "
|
|
136
|
-
"eslint-import-resolver-typescript": "
|
|
137
|
-
"eslint-plugin-import": "
|
|
138
|
-
"eslint-plugin-import-newlines": "
|
|
138
|
+
"eslint": "~9.21.0",
|
|
139
|
+
"eslint-import-resolver-node": "~0.3.9",
|
|
140
|
+
"eslint-import-resolver-typescript": "~3.8.0",
|
|
141
|
+
"eslint-plugin-import": "~2.31.0",
|
|
142
|
+
"eslint-plugin-import-newlines": "~1.4.0",
|
|
139
143
|
"eslint-plugin-jest": "~28.11.0",
|
|
140
144
|
"eslint-plugin-jsdoc": "~50.6.0",
|
|
141
145
|
"eslint-plugin-prefer-arrow": "~1.2.3",
|
|
142
|
-
"eslint-plugin-unicorn": "
|
|
143
|
-
"eslint-plugin-unused-imports": "
|
|
146
|
+
"eslint-plugin-unicorn": "~56.0.0",
|
|
147
|
+
"eslint-plugin-unused-imports": "~4.1.4",
|
|
144
148
|
"globals": "^15.9.0",
|
|
145
149
|
"globby": "^11.1.0",
|
|
146
150
|
"jest": "~29.7.0",
|
|
147
151
|
"jest-junit": "~16.0.0",
|
|
148
152
|
"jsonc-eslint-parser": "~2.4.0",
|
|
149
|
-
"nx": "~20.
|
|
153
|
+
"nx": "~20.4.0",
|
|
150
154
|
"pid-from-port": "^1.1.3",
|
|
151
155
|
"rxjs": "^7.8.1",
|
|
152
|
-
"sass": "~1.
|
|
156
|
+
"sass": "~1.85.0",
|
|
153
157
|
"semver": "^7.5.2",
|
|
154
158
|
"ts-jest": "~29.2.5",
|
|
155
159
|
"ts-node": "~10.9.2",
|
|
156
160
|
"type-fest": "^4.30.1",
|
|
157
|
-
"typescript": "~5.
|
|
158
|
-
"typescript-eslint": "~8.
|
|
161
|
+
"typescript": "~5.7.3",
|
|
162
|
+
"typescript-eslint": "~8.25.0",
|
|
159
163
|
"zone.js": "~0.15.0"
|
|
160
164
|
},
|
|
161
165
|
"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
|