@digdir/designsystemet 1.0.6 → 1.0.7
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/configs/digdir.config.json +59 -0
- package/configs/test-tokens.config.json +45 -0
- package/dist/bin/designsystemet.js +45 -58
- package/dist/config.schema.json +38 -27
- package/dist/src/config.d.ts +24 -176
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/config.js +22 -32
- package/dist/src/index.js +17 -20
- package/dist/src/migrations/beta-to-v1.js +2 -2
- package/dist/src/migrations/codemods/css/run.js +2 -2
- package/dist/src/migrations/color-rename-next49.js +2 -2
- package/dist/src/migrations/index.js +2 -2
- package/dist/src/scripts/createJsonSchema.js +32 -1292
- package/dist/src/scripts/update-design-tokens.js +4 -4
- package/dist/src/scripts/update-template.js +7 -7
- package/dist/src/tokens/build.js +20 -23
- package/dist/src/tokens/create/generators/$designsystemet.js +17 -17
- package/dist/src/tokens/create/write.js +19 -19
- package/dist/src/tokens/format.js +17 -20
- package/dist/src/tokens/index.js +17 -20
- package/dist/src/tokens/process/theme.d.ts.map +1 -1
- package/dist/src/tokens/process/theme.js +17 -20
- package/dist/src/utils.js +1 -1
- package/package.json +17 -17
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// src/scripts/update-design-tokens.ts
|
|
2
|
-
import path from "
|
|
2
|
+
import path from "path";
|
|
3
3
|
|
|
4
4
|
// src/utils.ts
|
|
5
|
-
import fs from "
|
|
5
|
+
import fs from "fs/promises";
|
|
6
6
|
import chalk from "chalk";
|
|
7
7
|
var cp = async (src, dest, dry, filter) => {
|
|
8
8
|
if (dry) {
|
|
@@ -14,8 +14,8 @@ var cp = async (src, dest, dry, filter) => {
|
|
|
14
14
|
|
|
15
15
|
// src/scripts/update-design-tokens.ts
|
|
16
16
|
var DIRNAME = import.meta.dirname || __dirname;
|
|
17
|
-
var TARGET = path.join(DIRNAME, "../../../../design-tokens");
|
|
18
|
-
var INTERNAL = path.join(DIRNAME, "../../
|
|
17
|
+
var TARGET = path.join(DIRNAME, "../../../../internal/design-tokens");
|
|
18
|
+
var INTERNAL = path.join(DIRNAME, "../../temp/digdir/design-tokens");
|
|
19
19
|
async function updateDesignTokens() {
|
|
20
20
|
console.log("\n\u{1F4C1} Copying design tokens");
|
|
21
21
|
await cp(path.join(INTERNAL, "primitives/modes/color-scheme"), path.join(TARGET, "primitives/modes/color-scheme"));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// src/scripts/update-template.ts
|
|
2
|
-
import path from "
|
|
2
|
+
import path from "path";
|
|
3
3
|
import chalk2 from "chalk";
|
|
4
4
|
import * as R from "ramda";
|
|
5
5
|
|
|
6
|
-
// ../../design-tokens/semantic/color.json
|
|
6
|
+
// ../../internal/design-tokens/semantic/color.json
|
|
7
7
|
var color_default = {
|
|
8
8
|
color: {
|
|
9
9
|
accent: {
|
|
@@ -621,7 +621,7 @@ var color_default = {
|
|
|
621
621
|
}
|
|
622
622
|
};
|
|
623
623
|
|
|
624
|
-
// ../../design-tokens/semantic/modes/main-color/accent.json
|
|
624
|
+
// ../../internal/design-tokens/semantic/modes/main-color/accent.json
|
|
625
625
|
var accent_default = {
|
|
626
626
|
color: {
|
|
627
627
|
main: {
|
|
@@ -693,7 +693,7 @@ var accent_default = {
|
|
|
693
693
|
}
|
|
694
694
|
};
|
|
695
695
|
|
|
696
|
-
// ../../design-tokens/themes/digdir.json
|
|
696
|
+
// ../../internal/design-tokens/themes/digdir.json
|
|
697
697
|
var digdir_default = {
|
|
698
698
|
color: {
|
|
699
699
|
accent: {
|
|
@@ -1082,7 +1082,7 @@ var digdir_default = {
|
|
|
1082
1082
|
};
|
|
1083
1083
|
|
|
1084
1084
|
// src/utils.ts
|
|
1085
|
-
import fs from "
|
|
1085
|
+
import fs from "fs/promises";
|
|
1086
1086
|
import chalk from "chalk";
|
|
1087
1087
|
var mkdir = async (dir, dry) => {
|
|
1088
1088
|
if (dry) {
|
|
@@ -1132,9 +1132,9 @@ var readFile = async (path2, dry) => {
|
|
|
1132
1132
|
|
|
1133
1133
|
// src/scripts/update-template.ts
|
|
1134
1134
|
var DIRNAME = import.meta.dirname || __dirname;
|
|
1135
|
-
var SOURCE_FILES_PATH = path.join(DIRNAME, "../../../../design-tokens");
|
|
1135
|
+
var SOURCE_FILES_PATH = path.join(DIRNAME, "../../../../internal/design-tokens");
|
|
1136
1136
|
var TEMPLATE_FILES_PATH = path.join(DIRNAME, "../tokens/template/design-tokens");
|
|
1137
|
-
var designTokensPath = (_path) => path.join(
|
|
1137
|
+
var designTokensPath = (_path) => path.join(SOURCE_FILES_PATH, _path);
|
|
1138
1138
|
var argsFromToPaths = (path_) => [
|
|
1139
1139
|
path.join(SOURCE_FILES_PATH, path_),
|
|
1140
1140
|
path.join(TEMPLATE_FILES_PATH, path_)
|
package/dist/src/tokens/build.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// src/tokens/build.ts
|
|
2
|
-
import path from "
|
|
2
|
+
import path from "path";
|
|
3
3
|
import chalk5 from "chalk";
|
|
4
4
|
import * as R14 from "ramda";
|
|
5
5
|
|
|
6
6
|
// src/utils.ts
|
|
7
|
-
import fs from "
|
|
7
|
+
import fs from "fs/promises";
|
|
8
8
|
import chalk from "chalk";
|
|
9
9
|
var mkdir = async (dir, dry) => {
|
|
10
10
|
if (dry) {
|
|
@@ -52,11 +52,11 @@ import chalk2 from "chalk";
|
|
|
52
52
|
// package.json
|
|
53
53
|
var package_default = {
|
|
54
54
|
name: "@digdir/designsystemet",
|
|
55
|
-
version: "1.0.
|
|
55
|
+
version: "1.0.7",
|
|
56
56
|
description: "CLI for Designsystemet",
|
|
57
57
|
author: "Designsystemet team",
|
|
58
58
|
engines: {
|
|
59
|
-
node: ">=22.
|
|
59
|
+
node: ">=22.16.0"
|
|
60
60
|
},
|
|
61
61
|
repository: {
|
|
62
62
|
type: "git",
|
|
@@ -67,7 +67,8 @@ var package_default = {
|
|
|
67
67
|
type: "module",
|
|
68
68
|
main: "./dist/src/index.js",
|
|
69
69
|
files: [
|
|
70
|
-
"./dist/**"
|
|
70
|
+
"./dist/**",
|
|
71
|
+
"./configs/**"
|
|
71
72
|
],
|
|
72
73
|
bin: "dist/bin/designsystemet.js",
|
|
73
74
|
exports: {
|
|
@@ -86,22 +87,22 @@ var package_default = {
|
|
|
86
87
|
},
|
|
87
88
|
scripts: {
|
|
88
89
|
designsystemet: "tsx ./bin/designsystemet.ts",
|
|
89
|
-
"build:tokens": "pnpm run designsystemet tokens build -p -t ../../design-tokens -o ../../packages/theme/brand --clean",
|
|
90
|
-
"build:tokens:debug": "tsx --inspect-brk ./bin/designsystemet.ts tokens build -p -t ../../design-tokens -o ../../packages/theme/brand --clean",
|
|
90
|
+
"build:tokens": "pnpm run designsystemet tokens build -p -t ../../internal/design-tokens -o ../../packages/theme/brand --clean",
|
|
91
|
+
"build:tokens:debug": "tsx --inspect-brk ./bin/designsystemet.ts tokens build -p -t ../../internal/design-tokens -o ../../packages/theme/brand --clean",
|
|
91
92
|
build: "tsup && pnpm build:types && pnpm build:json-schema",
|
|
92
93
|
"build:types": "tsc --emitDeclarationOnly --declaration",
|
|
93
94
|
"build:json-schema": "tsx ./src/scripts/createJsonSchema.ts",
|
|
94
95
|
types: "tsc --noEmit",
|
|
95
|
-
"test:tokens-create-options": 'pnpm run designsystemet tokens create -m dominant:"#007682" -n "#003333" -b 99 -o ./
|
|
96
|
-
"test:tokens-create-config": "pnpm run designsystemet tokens create --config ./
|
|
97
|
-
"test:tokens-build": "pnpm run designsystemet tokens build -t ./
|
|
98
|
-
"test:tokens-build-config": "pnpm run designsystemet tokens build -t ./
|
|
96
|
+
"test:tokens-create-options": 'pnpm run designsystemet tokens create -m dominant:"#007682" -n "#003333" -b 99 -o ./temp/options/design-tokens --theme options --clean',
|
|
97
|
+
"test:tokens-create-config": "pnpm run designsystemet tokens create --config ./configs/test-tokens.config.json",
|
|
98
|
+
"test:tokens-build": "pnpm run designsystemet tokens build -t ./temp/options/design-tokens -o ./temp/options/build --clean",
|
|
99
|
+
"test:tokens-build-config": "pnpm run designsystemet tokens build -t ./temp/config/design-tokens -o ./temp/config/build --clean",
|
|
99
100
|
"test:tokens-create-and-build-options": "pnpm test:tokens-create-options && pnpm test:tokens-build",
|
|
100
101
|
"test:tokens-create-and-build-config": "pnpm test:tokens-create-config && pnpm test:tokens-build-config",
|
|
101
102
|
test: "pnpm test:tokens-create-and-build-options && pnpm test:tokens-create-and-build-config",
|
|
102
|
-
"
|
|
103
|
+
"digdir:tokens-create": "pnpm run designsystemet tokens create --config ./configs/digdir.config.json",
|
|
103
104
|
"update:template": "tsx ./src/scripts/update-template.ts",
|
|
104
|
-
"update:design-tokens": "pnpm
|
|
105
|
+
"update:design-tokens": "pnpm digdir:tokens-create && tsx ./src/scripts/update-design-tokens.ts",
|
|
105
106
|
verify: "pnpm test && pnpm update:template && pnpm update:design-tokens"
|
|
106
107
|
},
|
|
107
108
|
dependencies: {
|
|
@@ -119,8 +120,8 @@ var package_default = {
|
|
|
119
120
|
postcss: "^8.5.3",
|
|
120
121
|
ramda: "^0.30.1",
|
|
121
122
|
"style-dictionary": "^4.4.0",
|
|
122
|
-
zod: "^3.
|
|
123
|
-
"zod-validation-error": "^3.4.
|
|
123
|
+
zod: "^3.25.30",
|
|
124
|
+
"zod-validation-error": "^3.4.1"
|
|
124
125
|
},
|
|
125
126
|
devDependencies: {
|
|
126
127
|
"@tokens-studio/types": "0.5.2",
|
|
@@ -129,16 +130,15 @@ var package_default = {
|
|
|
129
130
|
"@types/fs-extra": "^11.0.4",
|
|
130
131
|
"@types/glob": "^8.1.0",
|
|
131
132
|
"@types/jscodeshift": "^0.12.0",
|
|
132
|
-
"@types/node": "^22.15.
|
|
133
|
+
"@types/node": "^22.15.21",
|
|
133
134
|
"@types/object-hash": "^3.0.6",
|
|
134
135
|
"@types/ramda": "^0.30.2",
|
|
135
136
|
"fs-extra": "^11.3.0",
|
|
136
137
|
"ts-toolbelt": "^9.6.0",
|
|
137
138
|
tslib: "^2.8.1",
|
|
138
|
-
tsup: "^8.
|
|
139
|
+
tsup: "^8.5.0",
|
|
139
140
|
tsx: "^4.19.4",
|
|
140
|
-
typescript: "^5.8.3"
|
|
141
|
-
"zod-to-json-schema": "^3.24.5"
|
|
141
|
+
typescript: "^5.8.3"
|
|
142
142
|
}
|
|
143
143
|
};
|
|
144
144
|
|
|
@@ -192,9 +192,6 @@ order may change due to nondeterminism.`.trim()
|
|
|
192
192
|
return sortIndex;
|
|
193
193
|
});
|
|
194
194
|
const header = `@charset "UTF-8";
|
|
195
|
-
|
|
196
|
-
@layer ds.theme, ds.base, ds.utilities, ds.components;
|
|
197
|
-
|
|
198
195
|
/*
|
|
199
196
|
${fileHeader2}
|
|
200
197
|
*/
|
|
@@ -1349,7 +1346,7 @@ var buildTokens = async (options) => {
|
|
|
1349
1346
|
const fileHeader2 = R14.join("")([
|
|
1350
1347
|
defaultFileHeader,
|
|
1351
1348
|
$designsystemet ? `
|
|
1352
|
-
design-tokens: v${$designsystemet.version}
|
|
1349
|
+
design-tokens: v${$designsystemet.version}` : ""
|
|
1353
1350
|
]);
|
|
1354
1351
|
await write(createThemeCSSFiles({ processedBuilds, fileHeader: fileHeader2 }), outDir, options.dry);
|
|
1355
1352
|
console.log(`
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// package.json
|
|
2
2
|
var package_default = {
|
|
3
3
|
name: "@digdir/designsystemet",
|
|
4
|
-
version: "1.0.
|
|
4
|
+
version: "1.0.7",
|
|
5
5
|
description: "CLI for Designsystemet",
|
|
6
6
|
author: "Designsystemet team",
|
|
7
7
|
engines: {
|
|
8
|
-
node: ">=22.
|
|
8
|
+
node: ">=22.16.0"
|
|
9
9
|
},
|
|
10
10
|
repository: {
|
|
11
11
|
type: "git",
|
|
@@ -16,7 +16,8 @@ var package_default = {
|
|
|
16
16
|
type: "module",
|
|
17
17
|
main: "./dist/src/index.js",
|
|
18
18
|
files: [
|
|
19
|
-
"./dist/**"
|
|
19
|
+
"./dist/**",
|
|
20
|
+
"./configs/**"
|
|
20
21
|
],
|
|
21
22
|
bin: "dist/bin/designsystemet.js",
|
|
22
23
|
exports: {
|
|
@@ -35,22 +36,22 @@ var package_default = {
|
|
|
35
36
|
},
|
|
36
37
|
scripts: {
|
|
37
38
|
designsystemet: "tsx ./bin/designsystemet.ts",
|
|
38
|
-
"build:tokens": "pnpm run designsystemet tokens build -p -t ../../design-tokens -o ../../packages/theme/brand --clean",
|
|
39
|
-
"build:tokens:debug": "tsx --inspect-brk ./bin/designsystemet.ts tokens build -p -t ../../design-tokens -o ../../packages/theme/brand --clean",
|
|
39
|
+
"build:tokens": "pnpm run designsystemet tokens build -p -t ../../internal/design-tokens -o ../../packages/theme/brand --clean",
|
|
40
|
+
"build:tokens:debug": "tsx --inspect-brk ./bin/designsystemet.ts tokens build -p -t ../../internal/design-tokens -o ../../packages/theme/brand --clean",
|
|
40
41
|
build: "tsup && pnpm build:types && pnpm build:json-schema",
|
|
41
42
|
"build:types": "tsc --emitDeclarationOnly --declaration",
|
|
42
43
|
"build:json-schema": "tsx ./src/scripts/createJsonSchema.ts",
|
|
43
44
|
types: "tsc --noEmit",
|
|
44
|
-
"test:tokens-create-options": 'pnpm run designsystemet tokens create -m dominant:"#007682" -n "#003333" -b 99 -o ./
|
|
45
|
-
"test:tokens-create-config": "pnpm run designsystemet tokens create --config ./
|
|
46
|
-
"test:tokens-build": "pnpm run designsystemet tokens build -t ./
|
|
47
|
-
"test:tokens-build-config": "pnpm run designsystemet tokens build -t ./
|
|
45
|
+
"test:tokens-create-options": 'pnpm run designsystemet tokens create -m dominant:"#007682" -n "#003333" -b 99 -o ./temp/options/design-tokens --theme options --clean',
|
|
46
|
+
"test:tokens-create-config": "pnpm run designsystemet tokens create --config ./configs/test-tokens.config.json",
|
|
47
|
+
"test:tokens-build": "pnpm run designsystemet tokens build -t ./temp/options/design-tokens -o ./temp/options/build --clean",
|
|
48
|
+
"test:tokens-build-config": "pnpm run designsystemet tokens build -t ./temp/config/design-tokens -o ./temp/config/build --clean",
|
|
48
49
|
"test:tokens-create-and-build-options": "pnpm test:tokens-create-options && pnpm test:tokens-build",
|
|
49
50
|
"test:tokens-create-and-build-config": "pnpm test:tokens-create-config && pnpm test:tokens-build-config",
|
|
50
51
|
test: "pnpm test:tokens-create-and-build-options && pnpm test:tokens-create-and-build-config",
|
|
51
|
-
"
|
|
52
|
+
"digdir:tokens-create": "pnpm run designsystemet tokens create --config ./configs/digdir.config.json",
|
|
52
53
|
"update:template": "tsx ./src/scripts/update-template.ts",
|
|
53
|
-
"update:design-tokens": "pnpm
|
|
54
|
+
"update:design-tokens": "pnpm digdir:tokens-create && tsx ./src/scripts/update-design-tokens.ts",
|
|
54
55
|
verify: "pnpm test && pnpm update:template && pnpm update:design-tokens"
|
|
55
56
|
},
|
|
56
57
|
dependencies: {
|
|
@@ -68,8 +69,8 @@ var package_default = {
|
|
|
68
69
|
postcss: "^8.5.3",
|
|
69
70
|
ramda: "^0.30.1",
|
|
70
71
|
"style-dictionary": "^4.4.0",
|
|
71
|
-
zod: "^3.
|
|
72
|
-
"zod-validation-error": "^3.4.
|
|
72
|
+
zod: "^3.25.30",
|
|
73
|
+
"zod-validation-error": "^3.4.1"
|
|
73
74
|
},
|
|
74
75
|
devDependencies: {
|
|
75
76
|
"@tokens-studio/types": "0.5.2",
|
|
@@ -78,16 +79,15 @@ var package_default = {
|
|
|
78
79
|
"@types/fs-extra": "^11.0.4",
|
|
79
80
|
"@types/glob": "^8.1.0",
|
|
80
81
|
"@types/jscodeshift": "^0.12.0",
|
|
81
|
-
"@types/node": "^22.15.
|
|
82
|
+
"@types/node": "^22.15.21",
|
|
82
83
|
"@types/object-hash": "^3.0.6",
|
|
83
84
|
"@types/ramda": "^0.30.2",
|
|
84
85
|
"fs-extra": "^11.3.0",
|
|
85
86
|
"ts-toolbelt": "^9.6.0",
|
|
86
87
|
tslib: "^2.8.1",
|
|
87
|
-
tsup: "^8.
|
|
88
|
+
tsup: "^8.5.0",
|
|
88
89
|
tsx: "^4.19.4",
|
|
89
|
-
typescript: "^5.8.3"
|
|
90
|
-
"zod-to-json-schema": "^3.24.5"
|
|
90
|
+
typescript: "^5.8.3"
|
|
91
91
|
}
|
|
92
92
|
};
|
|
93
93
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// src/tokens/create/write.ts
|
|
2
|
-
import path from "
|
|
2
|
+
import path from "path";
|
|
3
3
|
import chalk2 from "chalk";
|
|
4
4
|
import * as R from "ramda";
|
|
5
5
|
|
|
6
6
|
// src/utils.ts
|
|
7
|
-
import fs from "
|
|
7
|
+
import fs from "fs/promises";
|
|
8
8
|
import chalk from "chalk";
|
|
9
9
|
var mkdir = async (dir, dry) => {
|
|
10
10
|
if (dry) {
|
|
@@ -39,11 +39,11 @@ var readFile = async (path2, dry) => {
|
|
|
39
39
|
// package.json
|
|
40
40
|
var package_default = {
|
|
41
41
|
name: "@digdir/designsystemet",
|
|
42
|
-
version: "1.0.
|
|
42
|
+
version: "1.0.7",
|
|
43
43
|
description: "CLI for Designsystemet",
|
|
44
44
|
author: "Designsystemet team",
|
|
45
45
|
engines: {
|
|
46
|
-
node: ">=22.
|
|
46
|
+
node: ">=22.16.0"
|
|
47
47
|
},
|
|
48
48
|
repository: {
|
|
49
49
|
type: "git",
|
|
@@ -54,7 +54,8 @@ var package_default = {
|
|
|
54
54
|
type: "module",
|
|
55
55
|
main: "./dist/src/index.js",
|
|
56
56
|
files: [
|
|
57
|
-
"./dist/**"
|
|
57
|
+
"./dist/**",
|
|
58
|
+
"./configs/**"
|
|
58
59
|
],
|
|
59
60
|
bin: "dist/bin/designsystemet.js",
|
|
60
61
|
exports: {
|
|
@@ -73,22 +74,22 @@ var package_default = {
|
|
|
73
74
|
},
|
|
74
75
|
scripts: {
|
|
75
76
|
designsystemet: "tsx ./bin/designsystemet.ts",
|
|
76
|
-
"build:tokens": "pnpm run designsystemet tokens build -p -t ../../design-tokens -o ../../packages/theme/brand --clean",
|
|
77
|
-
"build:tokens:debug": "tsx --inspect-brk ./bin/designsystemet.ts tokens build -p -t ../../design-tokens -o ../../packages/theme/brand --clean",
|
|
77
|
+
"build:tokens": "pnpm run designsystemet tokens build -p -t ../../internal/design-tokens -o ../../packages/theme/brand --clean",
|
|
78
|
+
"build:tokens:debug": "tsx --inspect-brk ./bin/designsystemet.ts tokens build -p -t ../../internal/design-tokens -o ../../packages/theme/brand --clean",
|
|
78
79
|
build: "tsup && pnpm build:types && pnpm build:json-schema",
|
|
79
80
|
"build:types": "tsc --emitDeclarationOnly --declaration",
|
|
80
81
|
"build:json-schema": "tsx ./src/scripts/createJsonSchema.ts",
|
|
81
82
|
types: "tsc --noEmit",
|
|
82
|
-
"test:tokens-create-options": 'pnpm run designsystemet tokens create -m dominant:"#007682" -n "#003333" -b 99 -o ./
|
|
83
|
-
"test:tokens-create-config": "pnpm run designsystemet tokens create --config ./
|
|
84
|
-
"test:tokens-build": "pnpm run designsystemet tokens build -t ./
|
|
85
|
-
"test:tokens-build-config": "pnpm run designsystemet tokens build -t ./
|
|
83
|
+
"test:tokens-create-options": 'pnpm run designsystemet tokens create -m dominant:"#007682" -n "#003333" -b 99 -o ./temp/options/design-tokens --theme options --clean',
|
|
84
|
+
"test:tokens-create-config": "pnpm run designsystemet tokens create --config ./configs/test-tokens.config.json",
|
|
85
|
+
"test:tokens-build": "pnpm run designsystemet tokens build -t ./temp/options/design-tokens -o ./temp/options/build --clean",
|
|
86
|
+
"test:tokens-build-config": "pnpm run designsystemet tokens build -t ./temp/config/design-tokens -o ./temp/config/build --clean",
|
|
86
87
|
"test:tokens-create-and-build-options": "pnpm test:tokens-create-options && pnpm test:tokens-build",
|
|
87
88
|
"test:tokens-create-and-build-config": "pnpm test:tokens-create-config && pnpm test:tokens-build-config",
|
|
88
89
|
test: "pnpm test:tokens-create-and-build-options && pnpm test:tokens-create-and-build-config",
|
|
89
|
-
"
|
|
90
|
+
"digdir:tokens-create": "pnpm run designsystemet tokens create --config ./configs/digdir.config.json",
|
|
90
91
|
"update:template": "tsx ./src/scripts/update-template.ts",
|
|
91
|
-
"update:design-tokens": "pnpm
|
|
92
|
+
"update:design-tokens": "pnpm digdir:tokens-create && tsx ./src/scripts/update-design-tokens.ts",
|
|
92
93
|
verify: "pnpm test && pnpm update:template && pnpm update:design-tokens"
|
|
93
94
|
},
|
|
94
95
|
dependencies: {
|
|
@@ -106,8 +107,8 @@ var package_default = {
|
|
|
106
107
|
postcss: "^8.5.3",
|
|
107
108
|
ramda: "^0.30.1",
|
|
108
109
|
"style-dictionary": "^4.4.0",
|
|
109
|
-
zod: "^3.
|
|
110
|
-
"zod-validation-error": "^3.4.
|
|
110
|
+
zod: "^3.25.30",
|
|
111
|
+
"zod-validation-error": "^3.4.1"
|
|
111
112
|
},
|
|
112
113
|
devDependencies: {
|
|
113
114
|
"@tokens-studio/types": "0.5.2",
|
|
@@ -116,16 +117,15 @@ var package_default = {
|
|
|
116
117
|
"@types/fs-extra": "^11.0.4",
|
|
117
118
|
"@types/glob": "^8.1.0",
|
|
118
119
|
"@types/jscodeshift": "^0.12.0",
|
|
119
|
-
"@types/node": "^22.15.
|
|
120
|
+
"@types/node": "^22.15.21",
|
|
120
121
|
"@types/object-hash": "^3.0.6",
|
|
121
122
|
"@types/ramda": "^0.30.2",
|
|
122
123
|
"fs-extra": "^11.3.0",
|
|
123
124
|
"ts-toolbelt": "^9.6.0",
|
|
124
125
|
tslib: "^2.8.1",
|
|
125
|
-
tsup: "^8.
|
|
126
|
+
tsup: "^8.5.0",
|
|
126
127
|
tsx: "^4.19.4",
|
|
127
|
-
typescript: "^5.8.3"
|
|
128
|
-
"zod-to-json-schema": "^3.24.5"
|
|
128
|
+
typescript: "^5.8.3"
|
|
129
129
|
}
|
|
130
130
|
};
|
|
131
131
|
|
|
@@ -3341,11 +3341,11 @@ import chalk3 from "chalk";
|
|
|
3341
3341
|
// package.json
|
|
3342
3342
|
var package_default = {
|
|
3343
3343
|
name: "@digdir/designsystemet",
|
|
3344
|
-
version: "1.0.
|
|
3344
|
+
version: "1.0.7",
|
|
3345
3345
|
description: "CLI for Designsystemet",
|
|
3346
3346
|
author: "Designsystemet team",
|
|
3347
3347
|
engines: {
|
|
3348
|
-
node: ">=22.
|
|
3348
|
+
node: ">=22.16.0"
|
|
3349
3349
|
},
|
|
3350
3350
|
repository: {
|
|
3351
3351
|
type: "git",
|
|
@@ -3356,7 +3356,8 @@ var package_default = {
|
|
|
3356
3356
|
type: "module",
|
|
3357
3357
|
main: "./dist/src/index.js",
|
|
3358
3358
|
files: [
|
|
3359
|
-
"./dist/**"
|
|
3359
|
+
"./dist/**",
|
|
3360
|
+
"./configs/**"
|
|
3360
3361
|
],
|
|
3361
3362
|
bin: "dist/bin/designsystemet.js",
|
|
3362
3363
|
exports: {
|
|
@@ -3375,22 +3376,22 @@ var package_default = {
|
|
|
3375
3376
|
},
|
|
3376
3377
|
scripts: {
|
|
3377
3378
|
designsystemet: "tsx ./bin/designsystemet.ts",
|
|
3378
|
-
"build:tokens": "pnpm run designsystemet tokens build -p -t ../../design-tokens -o ../../packages/theme/brand --clean",
|
|
3379
|
-
"build:tokens:debug": "tsx --inspect-brk ./bin/designsystemet.ts tokens build -p -t ../../design-tokens -o ../../packages/theme/brand --clean",
|
|
3379
|
+
"build:tokens": "pnpm run designsystemet tokens build -p -t ../../internal/design-tokens -o ../../packages/theme/brand --clean",
|
|
3380
|
+
"build:tokens:debug": "tsx --inspect-brk ./bin/designsystemet.ts tokens build -p -t ../../internal/design-tokens -o ../../packages/theme/brand --clean",
|
|
3380
3381
|
build: "tsup && pnpm build:types && pnpm build:json-schema",
|
|
3381
3382
|
"build:types": "tsc --emitDeclarationOnly --declaration",
|
|
3382
3383
|
"build:json-schema": "tsx ./src/scripts/createJsonSchema.ts",
|
|
3383
3384
|
types: "tsc --noEmit",
|
|
3384
|
-
"test:tokens-create-options": 'pnpm run designsystemet tokens create -m dominant:"#007682" -n "#003333" -b 99 -o ./
|
|
3385
|
-
"test:tokens-create-config": "pnpm run designsystemet tokens create --config ./
|
|
3386
|
-
"test:tokens-build": "pnpm run designsystemet tokens build -t ./
|
|
3387
|
-
"test:tokens-build-config": "pnpm run designsystemet tokens build -t ./
|
|
3385
|
+
"test:tokens-create-options": 'pnpm run designsystemet tokens create -m dominant:"#007682" -n "#003333" -b 99 -o ./temp/options/design-tokens --theme options --clean',
|
|
3386
|
+
"test:tokens-create-config": "pnpm run designsystemet tokens create --config ./configs/test-tokens.config.json",
|
|
3387
|
+
"test:tokens-build": "pnpm run designsystemet tokens build -t ./temp/options/design-tokens -o ./temp/options/build --clean",
|
|
3388
|
+
"test:tokens-build-config": "pnpm run designsystemet tokens build -t ./temp/config/design-tokens -o ./temp/config/build --clean",
|
|
3388
3389
|
"test:tokens-create-and-build-options": "pnpm test:tokens-create-options && pnpm test:tokens-build",
|
|
3389
3390
|
"test:tokens-create-and-build-config": "pnpm test:tokens-create-config && pnpm test:tokens-build-config",
|
|
3390
3391
|
test: "pnpm test:tokens-create-and-build-options && pnpm test:tokens-create-and-build-config",
|
|
3391
|
-
"
|
|
3392
|
+
"digdir:tokens-create": "pnpm run designsystemet tokens create --config ./configs/digdir.config.json",
|
|
3392
3393
|
"update:template": "tsx ./src/scripts/update-template.ts",
|
|
3393
|
-
"update:design-tokens": "pnpm
|
|
3394
|
+
"update:design-tokens": "pnpm digdir:tokens-create && tsx ./src/scripts/update-design-tokens.ts",
|
|
3394
3395
|
verify: "pnpm test && pnpm update:template && pnpm update:design-tokens"
|
|
3395
3396
|
},
|
|
3396
3397
|
dependencies: {
|
|
@@ -3408,8 +3409,8 @@ var package_default = {
|
|
|
3408
3409
|
postcss: "^8.5.3",
|
|
3409
3410
|
ramda: "^0.30.1",
|
|
3410
3411
|
"style-dictionary": "^4.4.0",
|
|
3411
|
-
zod: "^3.
|
|
3412
|
-
"zod-validation-error": "^3.4.
|
|
3412
|
+
zod: "^3.25.30",
|
|
3413
|
+
"zod-validation-error": "^3.4.1"
|
|
3413
3414
|
},
|
|
3414
3415
|
devDependencies: {
|
|
3415
3416
|
"@tokens-studio/types": "0.5.2",
|
|
@@ -3418,16 +3419,15 @@ var package_default = {
|
|
|
3418
3419
|
"@types/fs-extra": "^11.0.4",
|
|
3419
3420
|
"@types/glob": "^8.1.0",
|
|
3420
3421
|
"@types/jscodeshift": "^0.12.0",
|
|
3421
|
-
"@types/node": "^22.15.
|
|
3422
|
+
"@types/node": "^22.15.21",
|
|
3422
3423
|
"@types/object-hash": "^3.0.6",
|
|
3423
3424
|
"@types/ramda": "^0.30.2",
|
|
3424
3425
|
"fs-extra": "^11.3.0",
|
|
3425
3426
|
"ts-toolbelt": "^9.6.0",
|
|
3426
3427
|
tslib: "^2.8.1",
|
|
3427
|
-
tsup: "^8.
|
|
3428
|
+
tsup: "^8.5.0",
|
|
3428
3429
|
tsx: "^4.19.4",
|
|
3429
|
-
typescript: "^5.8.3"
|
|
3430
|
-
"zod-to-json-schema": "^3.24.5"
|
|
3430
|
+
typescript: "^5.8.3"
|
|
3431
3431
|
}
|
|
3432
3432
|
};
|
|
3433
3433
|
|
|
@@ -3481,9 +3481,6 @@ order may change due to nondeterminism.`.trim()
|
|
|
3481
3481
|
return sortIndex;
|
|
3482
3482
|
});
|
|
3483
3483
|
const header = `@charset "UTF-8";
|
|
3484
|
-
|
|
3485
|
-
@layer ds.theme, ds.base, ds.utilities, ds.components;
|
|
3486
|
-
|
|
3487
3484
|
/*
|
|
3488
3485
|
${fileHeader2}
|
|
3489
3486
|
*/
|
package/dist/src/tokens/index.js
CHANGED
|
@@ -3356,11 +3356,11 @@ import chalk3 from "chalk";
|
|
|
3356
3356
|
// package.json
|
|
3357
3357
|
var package_default = {
|
|
3358
3358
|
name: "@digdir/designsystemet",
|
|
3359
|
-
version: "1.0.
|
|
3359
|
+
version: "1.0.7",
|
|
3360
3360
|
description: "CLI for Designsystemet",
|
|
3361
3361
|
author: "Designsystemet team",
|
|
3362
3362
|
engines: {
|
|
3363
|
-
node: ">=22.
|
|
3363
|
+
node: ">=22.16.0"
|
|
3364
3364
|
},
|
|
3365
3365
|
repository: {
|
|
3366
3366
|
type: "git",
|
|
@@ -3371,7 +3371,8 @@ var package_default = {
|
|
|
3371
3371
|
type: "module",
|
|
3372
3372
|
main: "./dist/src/index.js",
|
|
3373
3373
|
files: [
|
|
3374
|
-
"./dist/**"
|
|
3374
|
+
"./dist/**",
|
|
3375
|
+
"./configs/**"
|
|
3375
3376
|
],
|
|
3376
3377
|
bin: "dist/bin/designsystemet.js",
|
|
3377
3378
|
exports: {
|
|
@@ -3390,22 +3391,22 @@ var package_default = {
|
|
|
3390
3391
|
},
|
|
3391
3392
|
scripts: {
|
|
3392
3393
|
designsystemet: "tsx ./bin/designsystemet.ts",
|
|
3393
|
-
"build:tokens": "pnpm run designsystemet tokens build -p -t ../../design-tokens -o ../../packages/theme/brand --clean",
|
|
3394
|
-
"build:tokens:debug": "tsx --inspect-brk ./bin/designsystemet.ts tokens build -p -t ../../design-tokens -o ../../packages/theme/brand --clean",
|
|
3394
|
+
"build:tokens": "pnpm run designsystemet tokens build -p -t ../../internal/design-tokens -o ../../packages/theme/brand --clean",
|
|
3395
|
+
"build:tokens:debug": "tsx --inspect-brk ./bin/designsystemet.ts tokens build -p -t ../../internal/design-tokens -o ../../packages/theme/brand --clean",
|
|
3395
3396
|
build: "tsup && pnpm build:types && pnpm build:json-schema",
|
|
3396
3397
|
"build:types": "tsc --emitDeclarationOnly --declaration",
|
|
3397
3398
|
"build:json-schema": "tsx ./src/scripts/createJsonSchema.ts",
|
|
3398
3399
|
types: "tsc --noEmit",
|
|
3399
|
-
"test:tokens-create-options": 'pnpm run designsystemet tokens create -m dominant:"#007682" -n "#003333" -b 99 -o ./
|
|
3400
|
-
"test:tokens-create-config": "pnpm run designsystemet tokens create --config ./
|
|
3401
|
-
"test:tokens-build": "pnpm run designsystemet tokens build -t ./
|
|
3402
|
-
"test:tokens-build-config": "pnpm run designsystemet tokens build -t ./
|
|
3400
|
+
"test:tokens-create-options": 'pnpm run designsystemet tokens create -m dominant:"#007682" -n "#003333" -b 99 -o ./temp/options/design-tokens --theme options --clean',
|
|
3401
|
+
"test:tokens-create-config": "pnpm run designsystemet tokens create --config ./configs/test-tokens.config.json",
|
|
3402
|
+
"test:tokens-build": "pnpm run designsystemet tokens build -t ./temp/options/design-tokens -o ./temp/options/build --clean",
|
|
3403
|
+
"test:tokens-build-config": "pnpm run designsystemet tokens build -t ./temp/config/design-tokens -o ./temp/config/build --clean",
|
|
3403
3404
|
"test:tokens-create-and-build-options": "pnpm test:tokens-create-options && pnpm test:tokens-build",
|
|
3404
3405
|
"test:tokens-create-and-build-config": "pnpm test:tokens-create-config && pnpm test:tokens-build-config",
|
|
3405
3406
|
test: "pnpm test:tokens-create-and-build-options && pnpm test:tokens-create-and-build-config",
|
|
3406
|
-
"
|
|
3407
|
+
"digdir:tokens-create": "pnpm run designsystemet tokens create --config ./configs/digdir.config.json",
|
|
3407
3408
|
"update:template": "tsx ./src/scripts/update-template.ts",
|
|
3408
|
-
"update:design-tokens": "pnpm
|
|
3409
|
+
"update:design-tokens": "pnpm digdir:tokens-create && tsx ./src/scripts/update-design-tokens.ts",
|
|
3409
3410
|
verify: "pnpm test && pnpm update:template && pnpm update:design-tokens"
|
|
3410
3411
|
},
|
|
3411
3412
|
dependencies: {
|
|
@@ -3423,8 +3424,8 @@ var package_default = {
|
|
|
3423
3424
|
postcss: "^8.5.3",
|
|
3424
3425
|
ramda: "^0.30.1",
|
|
3425
3426
|
"style-dictionary": "^4.4.0",
|
|
3426
|
-
zod: "^3.
|
|
3427
|
-
"zod-validation-error": "^3.4.
|
|
3427
|
+
zod: "^3.25.30",
|
|
3428
|
+
"zod-validation-error": "^3.4.1"
|
|
3428
3429
|
},
|
|
3429
3430
|
devDependencies: {
|
|
3430
3431
|
"@tokens-studio/types": "0.5.2",
|
|
@@ -3433,16 +3434,15 @@ var package_default = {
|
|
|
3433
3434
|
"@types/fs-extra": "^11.0.4",
|
|
3434
3435
|
"@types/glob": "^8.1.0",
|
|
3435
3436
|
"@types/jscodeshift": "^0.12.0",
|
|
3436
|
-
"@types/node": "^22.15.
|
|
3437
|
+
"@types/node": "^22.15.21",
|
|
3437
3438
|
"@types/object-hash": "^3.0.6",
|
|
3438
3439
|
"@types/ramda": "^0.30.2",
|
|
3439
3440
|
"fs-extra": "^11.3.0",
|
|
3440
3441
|
"ts-toolbelt": "^9.6.0",
|
|
3441
3442
|
tslib: "^2.8.1",
|
|
3442
|
-
tsup: "^8.
|
|
3443
|
+
tsup: "^8.5.0",
|
|
3443
3444
|
tsx: "^4.19.4",
|
|
3444
|
-
typescript: "^5.8.3"
|
|
3445
|
-
"zod-to-json-schema": "^3.24.5"
|
|
3445
|
+
typescript: "^5.8.3"
|
|
3446
3446
|
}
|
|
3447
3447
|
};
|
|
3448
3448
|
|
|
@@ -3496,9 +3496,6 @@ order may change due to nondeterminism.`.trim()
|
|
|
3496
3496
|
return sortIndex;
|
|
3497
3497
|
});
|
|
3498
3498
|
const header = `@charset "UTF-8";
|
|
3499
|
-
|
|
3500
|
-
@layer ds.theme, ds.base, ds.utilities, ds.components;
|
|
3501
|
-
|
|
3502
3499
|
/*
|
|
3503
3500
|
${fileHeader2}
|
|
3504
3501
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../src/tokens/process/theme.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,eAAO,MAAM,iBAAiB,QAA2B,CAAC;AAE1D,KAAK,mBAAmB,GAAG;IACzB,6GAA6G;IAC7G,eAAe,EAAE,aAAa,CAAC;IAC/B,iEAAiE;IACjE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,mBAAmB,GAAI,kCAGjC,mBAAmB,KAAG,UAAU,
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../src/tokens/process/theme.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,eAAO,MAAM,iBAAiB,QAA2B,CAAC;AAE1D,KAAK,mBAAmB,GAAG;IACzB,6GAA6G;IAC7G,eAAe,EAAE,aAAa,CAAC;IAC/B,iEAAiE;IACjE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,mBAAmB,GAAI,kCAGjC,mBAAmB,KAAG,UAAU,EA8ElC,CAAC"}
|