@digdir/designsystemet 1.0.8 → 1.1.1
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/dist/bin/config.d.ts +3 -3
- package/dist/bin/config.d.ts.map +1 -1
- package/dist/bin/config.js +45 -45
- package/dist/bin/designsystemet.js +827 -748
- package/dist/config.schema.json +4 -4
- package/dist/src/colors/index.d.ts +2 -2
- package/dist/src/colors/index.d.ts.map +1 -1
- package/dist/src/colors/index.js +143 -143
- package/dist/src/colors/theme.d.ts +1 -2
- package/dist/src/colors/theme.d.ts.map +1 -1
- package/dist/src/config.d.ts +6 -21
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/config.js +43 -40
- package/dist/src/index.js +418 -430
- package/dist/src/scripts/createJsonSchema.js +23 -24
- package/dist/src/scripts/update-template.d.ts.map +1 -1
- package/dist/src/tokens/build.d.ts +1 -1
- package/dist/src/tokens/build.d.ts.map +1 -1
- package/dist/src/tokens/build.js +359 -280
- package/dist/src/tokens/create/generators/$designsystemet.js +16 -15
- package/dist/src/tokens/create/generators/color.js +21 -21
- package/dist/src/tokens/create/write.js +17 -16
- package/dist/src/tokens/create.d.ts +1 -0
- package/dist/src/tokens/create.d.ts.map +1 -1
- package/dist/src/tokens/create.js +22 -21
- package/dist/src/tokens/format.d.ts.map +1 -1
- package/dist/src/tokens/format.js +931 -944
- package/dist/src/tokens/index.d.ts +2 -2
- package/dist/src/tokens/index.d.ts.map +1 -1
- package/dist/src/tokens/index.js +295 -307
- package/dist/src/tokens/process/configs/color.d.ts.map +1 -1
- package/dist/src/tokens/process/configs/color.js +5 -5
- package/dist/src/tokens/process/configs/semantic.d.ts.map +1 -1
- package/dist/src/tokens/process/configs/semantic.js +5 -5
- package/dist/src/tokens/process/configs/storefront.d.ts.map +1 -1
- package/dist/src/tokens/process/configs/storefront.js +1 -1
- package/dist/src/tokens/process/configs/typography.d.ts.map +1 -1
- package/dist/src/tokens/process/configs/typography.js +5 -5
- package/dist/src/tokens/process/configs.d.ts.map +1 -1
- package/dist/src/tokens/process/configs.js +5 -5
- package/dist/src/tokens/process/formats/css/color.js +2 -2
- package/dist/src/tokens/process/formats/css/semantic.js +2 -2
- package/dist/src/tokens/process/formats/css/typography.js +1 -1
- package/dist/src/tokens/process/formats/css.js +5 -5
- package/dist/src/tokens/process/formats/js-tokens.js +1 -1
- package/dist/src/tokens/process/output/declarations.d.ts +4 -0
- package/dist/src/tokens/process/output/declarations.d.ts.map +1 -0
- package/dist/src/tokens/process/output/declarations.js +860 -0
- package/dist/src/tokens/process/output/tailwind.d.ts +3 -0
- package/dist/src/tokens/process/output/tailwind.d.ts.map +1 -0
- package/dist/src/tokens/process/output/tailwind.js +59 -0
- package/dist/src/tokens/process/{theme.d.ts → output/theme.d.ts} +2 -2
- package/dist/src/tokens/process/output/theme.d.ts.map +1 -0
- package/dist/src/tokens/process/{theme.js → output/theme.js} +20 -19
- package/dist/src/tokens/process/platform.d.ts +8 -4
- package/dist/src/tokens/process/platform.d.ts.map +1 -1
- package/dist/src/tokens/process/platform.js +27 -56
- package/dist/src/tokens/process/utils/getMultidimensionalThemes.d.ts +1 -0
- package/dist/src/tokens/process/utils/getMultidimensionalThemes.d.ts.map +1 -1
- package/dist/src/tokens/process/utils/getMultidimensionalThemes.js +12 -5
- package/dist/src/tokens/types.d.ts +1 -1
- package/dist/src/tokens/types.d.ts.map +1 -1
- package/dist/src/tokens/utils.d.ts.map +1 -1
- package/package.json +16 -15
- package/dist/src/tokens/process/theme.d.ts.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// package.json
|
|
2
2
|
var package_default = {
|
|
3
3
|
name: "@digdir/designsystemet",
|
|
4
|
-
version: "1.
|
|
4
|
+
version: "1.1.1",
|
|
5
5
|
description: "CLI for Designsystemet",
|
|
6
6
|
author: "Designsystemet team",
|
|
7
7
|
engines: {
|
|
@@ -11,7 +11,7 @@ var package_default = {
|
|
|
11
11
|
type: "git",
|
|
12
12
|
url: "git+https://github.com/digdir/designsystemet.git"
|
|
13
13
|
},
|
|
14
|
-
homepage: "https://github.com/digdir/designsystemet/tree/main/
|
|
14
|
+
homepage: "https://github.com/digdir/designsystemet/tree/main/packages/cli",
|
|
15
15
|
license: "MIT",
|
|
16
16
|
type: "module",
|
|
17
17
|
main: "./dist/src/index.js",
|
|
@@ -36,8 +36,7 @@ var package_default = {
|
|
|
36
36
|
},
|
|
37
37
|
scripts: {
|
|
38
38
|
designsystemet: "tsx ./bin/designsystemet.ts",
|
|
39
|
-
"
|
|
40
|
-
"build:tokens:debug": "tsx --inspect-brk ./bin/designsystemet.ts tokens build -p -t ../../internal/design-tokens -o ../../packages/theme/brand --clean",
|
|
39
|
+
"designsystemet:inspect": "tsx --inspect-brk ./bin/designsystemet.ts",
|
|
41
40
|
build: "tsup && pnpm build:types && pnpm build:json-schema",
|
|
42
41
|
"build:types": "tsc --emitDeclarationOnly --declaration",
|
|
43
42
|
"build:json-schema": "tsx ./src/scripts/createJsonSchema.ts",
|
|
@@ -45,32 +44,36 @@ var package_default = {
|
|
|
45
44
|
"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
45
|
"test:tokens-create-config": "pnpm run designsystemet tokens create --config ./configs/test-tokens.config.json",
|
|
47
46
|
"test:tokens-build": "pnpm run designsystemet tokens build -t ./temp/options/design-tokens -o ./temp/options/build --clean",
|
|
47
|
+
"test:tokens-build-tailwind": "pnpm run designsystemet tokens build -t ./temp/options/design-tokens -o ./temp/options/build --clean --experimental-tailwind",
|
|
48
48
|
"test:tokens-build-config": "pnpm run designsystemet tokens build -t ./temp/config/design-tokens -o ./temp/config/build --clean",
|
|
49
|
+
"test:tokens-build-config:inspect": "pnpm run designsystemet:inspect tokens build -t ./temp/config/design-tokens -o ./temp/config/build --clean",
|
|
50
|
+
"test:tokens-build-config-tailwind": "pnpm run designsystemet tokens build -t ./temp/config/design-tokens -o ./temp/config/build --clean --experimental-tailwind",
|
|
49
51
|
"test:tokens-create-and-build-options": "pnpm test:tokens-create-options && pnpm test:tokens-build",
|
|
50
52
|
"test:tokens-create-and-build-config": "pnpm test:tokens-create-config && pnpm test:tokens-build-config",
|
|
51
53
|
test: "pnpm test:tokens-create-and-build-options && pnpm test:tokens-create-and-build-config",
|
|
54
|
+
"digdir:tokens-build": "pnpm run designsystemet tokens build -t ../../internal/design-tokens -o ../../packages/theme/brand --clean --experimental-tailwind",
|
|
52
55
|
"digdir:tokens-create": "pnpm run designsystemet tokens create --config ./configs/digdir.config.json",
|
|
53
56
|
"update:template": "tsx ./src/scripts/update-template.ts",
|
|
54
|
-
"update:theme-digdir": "pnpm digdir:tokens-create && tsx ./src/scripts/update-design-tokens.ts",
|
|
57
|
+
"update:theme-digdir": "pnpm digdir:tokens-create && tsx ./src/scripts/update-design-tokens.ts && pnpm digdir:tokens-build",
|
|
55
58
|
verify: "pnpm test && pnpm update:template && pnpm update:theme-digdir && pnpm build:tokens"
|
|
56
59
|
},
|
|
57
60
|
dependencies: {
|
|
58
|
-
"@commander-js/extra-typings": "^
|
|
61
|
+
"@commander-js/extra-typings": "^14.0.0",
|
|
59
62
|
"@tokens-studio/sd-transforms": "1.3.0",
|
|
60
63
|
"apca-w3": "^0.1.9",
|
|
61
64
|
chalk: "^5.4.1",
|
|
62
65
|
"change-case": "^5.4.4",
|
|
63
66
|
"chroma-js": "^3.1.2",
|
|
64
67
|
"colorjs.io": "^0.6.0-alpha.1",
|
|
65
|
-
commander: "^
|
|
68
|
+
commander: "^14.0.0",
|
|
66
69
|
"fast-glob": "^3.3.3",
|
|
67
70
|
hsluv: "^1.0.1",
|
|
68
71
|
"object-hash": "^3.0.0",
|
|
69
|
-
postcss: "^8.5.
|
|
72
|
+
postcss: "^8.5.6",
|
|
70
73
|
ramda: "^0.30.1",
|
|
71
|
-
"style-dictionary": "^
|
|
72
|
-
zod: "^3.25.
|
|
73
|
-
"zod-validation-error": "^3.
|
|
74
|
+
"style-dictionary": "^5.0.0",
|
|
75
|
+
zod: "^3.25.67",
|
|
76
|
+
"zod-validation-error": "^3.5.2"
|
|
74
77
|
},
|
|
75
78
|
devDependencies: {
|
|
76
79
|
"@tokens-studio/types": "0.5.2",
|
|
@@ -78,15 +81,13 @@ var package_default = {
|
|
|
78
81
|
"@types/chroma-js": "^3.1.1",
|
|
79
82
|
"@types/fs-extra": "^11.0.4",
|
|
80
83
|
"@types/glob": "^8.1.0",
|
|
81
|
-
"@types/
|
|
82
|
-
"@types/node": "^22.15.21",
|
|
84
|
+
"@types/node": "^22.15.32",
|
|
83
85
|
"@types/object-hash": "^3.0.6",
|
|
84
86
|
"@types/ramda": "^0.30.2",
|
|
85
87
|
"fs-extra": "^11.3.0",
|
|
86
|
-
"ts-toolbelt": "^9.6.0",
|
|
87
88
|
tslib: "^2.8.1",
|
|
88
89
|
tsup: "^8.5.0",
|
|
89
|
-
tsx: "^4.
|
|
90
|
+
tsx: "^4.20.3",
|
|
90
91
|
typescript: "^5.8.3"
|
|
91
92
|
}
|
|
92
93
|
};
|
|
@@ -1,27 +1,6 @@
|
|
|
1
1
|
// src/tokens/create/generators/color.ts
|
|
2
2
|
import * as R3 from "ramda";
|
|
3
3
|
|
|
4
|
-
// src/colors/utils.ts
|
|
5
|
-
import chroma from "chroma-js";
|
|
6
|
-
import Colorjs from "colorjs.io";
|
|
7
|
-
import { Hsluv } from "hsluv";
|
|
8
|
-
var getLuminanceFromLightness = (lightness) => {
|
|
9
|
-
const conv = new Hsluv();
|
|
10
|
-
conv.hsluv_l = lightness;
|
|
11
|
-
conv.hsluvToHex();
|
|
12
|
-
return chroma(conv.hex).luminance();
|
|
13
|
-
};
|
|
14
|
-
var getLightnessFromHex = (hex) => {
|
|
15
|
-
const conv = new Hsluv();
|
|
16
|
-
conv.hex = hex;
|
|
17
|
-
conv.hexToHsluv();
|
|
18
|
-
return conv.hsluv_l;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
// src/colors/theme.ts
|
|
22
|
-
import chroma2 from "chroma-js";
|
|
23
|
-
import * as R2 from "ramda";
|
|
24
|
-
|
|
25
4
|
// src/colors/colorMetadata.ts
|
|
26
5
|
import * as R from "ramda";
|
|
27
6
|
var baseColors = {
|
|
@@ -275,6 +254,27 @@ var colorMetadata = {
|
|
|
275
254
|
};
|
|
276
255
|
var colorMetadataByNumber = R.indexBy((metadata) => metadata.number, Object.values(colorMetadata));
|
|
277
256
|
|
|
257
|
+
// src/colors/theme.ts
|
|
258
|
+
import chroma2 from "chroma-js";
|
|
259
|
+
import * as R2 from "ramda";
|
|
260
|
+
|
|
261
|
+
// src/colors/utils.ts
|
|
262
|
+
import chroma from "chroma-js";
|
|
263
|
+
import Colorjs from "colorjs.io";
|
|
264
|
+
import { Hsluv } from "hsluv";
|
|
265
|
+
var getLuminanceFromLightness = (lightness) => {
|
|
266
|
+
const conv = new Hsluv();
|
|
267
|
+
conv.hsluv_l = lightness;
|
|
268
|
+
conv.hsluvToHex();
|
|
269
|
+
return chroma(conv.hex).luminance();
|
|
270
|
+
};
|
|
271
|
+
var getLightnessFromHex = (hex) => {
|
|
272
|
+
const conv = new Hsluv();
|
|
273
|
+
conv.hex = hex;
|
|
274
|
+
conv.hexToHsluv();
|
|
275
|
+
return conv.hsluv_l;
|
|
276
|
+
};
|
|
277
|
+
|
|
278
278
|
// src/colors/theme.ts
|
|
279
279
|
var generateColorScale = (color, colorScheme) => {
|
|
280
280
|
let interpolationColor = color;
|
|
@@ -46,7 +46,7 @@ var readFile = async (path2, dry, allowFileNotFound) => {
|
|
|
46
46
|
// package.json
|
|
47
47
|
var package_default = {
|
|
48
48
|
name: "@digdir/designsystemet",
|
|
49
|
-
version: "1.
|
|
49
|
+
version: "1.1.1",
|
|
50
50
|
description: "CLI for Designsystemet",
|
|
51
51
|
author: "Designsystemet team",
|
|
52
52
|
engines: {
|
|
@@ -56,7 +56,7 @@ var package_default = {
|
|
|
56
56
|
type: "git",
|
|
57
57
|
url: "git+https://github.com/digdir/designsystemet.git"
|
|
58
58
|
},
|
|
59
|
-
homepage: "https://github.com/digdir/designsystemet/tree/main/
|
|
59
|
+
homepage: "https://github.com/digdir/designsystemet/tree/main/packages/cli",
|
|
60
60
|
license: "MIT",
|
|
61
61
|
type: "module",
|
|
62
62
|
main: "./dist/src/index.js",
|
|
@@ -81,8 +81,7 @@ var package_default = {
|
|
|
81
81
|
},
|
|
82
82
|
scripts: {
|
|
83
83
|
designsystemet: "tsx ./bin/designsystemet.ts",
|
|
84
|
-
"
|
|
85
|
-
"build:tokens:debug": "tsx --inspect-brk ./bin/designsystemet.ts tokens build -p -t ../../internal/design-tokens -o ../../packages/theme/brand --clean",
|
|
84
|
+
"designsystemet:inspect": "tsx --inspect-brk ./bin/designsystemet.ts",
|
|
86
85
|
build: "tsup && pnpm build:types && pnpm build:json-schema",
|
|
87
86
|
"build:types": "tsc --emitDeclarationOnly --declaration",
|
|
88
87
|
"build:json-schema": "tsx ./src/scripts/createJsonSchema.ts",
|
|
@@ -90,32 +89,36 @@ var package_default = {
|
|
|
90
89
|
"test:tokens-create-options": 'pnpm run designsystemet tokens create -m dominant:"#007682" -n "#003333" -b 99 -o ./temp/options/design-tokens --theme options --clean',
|
|
91
90
|
"test:tokens-create-config": "pnpm run designsystemet tokens create --config ./configs/test-tokens.config.json",
|
|
92
91
|
"test:tokens-build": "pnpm run designsystemet tokens build -t ./temp/options/design-tokens -o ./temp/options/build --clean",
|
|
92
|
+
"test:tokens-build-tailwind": "pnpm run designsystemet tokens build -t ./temp/options/design-tokens -o ./temp/options/build --clean --experimental-tailwind",
|
|
93
93
|
"test:tokens-build-config": "pnpm run designsystemet tokens build -t ./temp/config/design-tokens -o ./temp/config/build --clean",
|
|
94
|
+
"test:tokens-build-config:inspect": "pnpm run designsystemet:inspect tokens build -t ./temp/config/design-tokens -o ./temp/config/build --clean",
|
|
95
|
+
"test:tokens-build-config-tailwind": "pnpm run designsystemet tokens build -t ./temp/config/design-tokens -o ./temp/config/build --clean --experimental-tailwind",
|
|
94
96
|
"test:tokens-create-and-build-options": "pnpm test:tokens-create-options && pnpm test:tokens-build",
|
|
95
97
|
"test:tokens-create-and-build-config": "pnpm test:tokens-create-config && pnpm test:tokens-build-config",
|
|
96
98
|
test: "pnpm test:tokens-create-and-build-options && pnpm test:tokens-create-and-build-config",
|
|
99
|
+
"digdir:tokens-build": "pnpm run designsystemet tokens build -t ../../internal/design-tokens -o ../../packages/theme/brand --clean --experimental-tailwind",
|
|
97
100
|
"digdir:tokens-create": "pnpm run designsystemet tokens create --config ./configs/digdir.config.json",
|
|
98
101
|
"update:template": "tsx ./src/scripts/update-template.ts",
|
|
99
|
-
"update:theme-digdir": "pnpm digdir:tokens-create && tsx ./src/scripts/update-design-tokens.ts",
|
|
102
|
+
"update:theme-digdir": "pnpm digdir:tokens-create && tsx ./src/scripts/update-design-tokens.ts && pnpm digdir:tokens-build",
|
|
100
103
|
verify: "pnpm test && pnpm update:template && pnpm update:theme-digdir && pnpm build:tokens"
|
|
101
104
|
},
|
|
102
105
|
dependencies: {
|
|
103
|
-
"@commander-js/extra-typings": "^
|
|
106
|
+
"@commander-js/extra-typings": "^14.0.0",
|
|
104
107
|
"@tokens-studio/sd-transforms": "1.3.0",
|
|
105
108
|
"apca-w3": "^0.1.9",
|
|
106
109
|
chalk: "^5.4.1",
|
|
107
110
|
"change-case": "^5.4.4",
|
|
108
111
|
"chroma-js": "^3.1.2",
|
|
109
112
|
"colorjs.io": "^0.6.0-alpha.1",
|
|
110
|
-
commander: "^
|
|
113
|
+
commander: "^14.0.0",
|
|
111
114
|
"fast-glob": "^3.3.3",
|
|
112
115
|
hsluv: "^1.0.1",
|
|
113
116
|
"object-hash": "^3.0.0",
|
|
114
|
-
postcss: "^8.5.
|
|
117
|
+
postcss: "^8.5.6",
|
|
115
118
|
ramda: "^0.30.1",
|
|
116
|
-
"style-dictionary": "^
|
|
117
|
-
zod: "^3.25.
|
|
118
|
-
"zod-validation-error": "^3.
|
|
119
|
+
"style-dictionary": "^5.0.0",
|
|
120
|
+
zod: "^3.25.67",
|
|
121
|
+
"zod-validation-error": "^3.5.2"
|
|
119
122
|
},
|
|
120
123
|
devDependencies: {
|
|
121
124
|
"@tokens-studio/types": "0.5.2",
|
|
@@ -123,15 +126,13 @@ var package_default = {
|
|
|
123
126
|
"@types/chroma-js": "^3.1.1",
|
|
124
127
|
"@types/fs-extra": "^11.0.4",
|
|
125
128
|
"@types/glob": "^8.1.0",
|
|
126
|
-
"@types/
|
|
127
|
-
"@types/node": "^22.15.21",
|
|
129
|
+
"@types/node": "^22.15.32",
|
|
128
130
|
"@types/object-hash": "^3.0.6",
|
|
129
131
|
"@types/ramda": "^0.30.2",
|
|
130
132
|
"fs-extra": "^11.3.0",
|
|
131
|
-
"ts-toolbelt": "^9.6.0",
|
|
132
133
|
tslib: "^2.8.1",
|
|
133
134
|
tsup: "^8.5.0",
|
|
134
|
-
tsx: "^4.
|
|
135
|
+
tsx: "^4.20.3",
|
|
135
136
|
typescript: "^5.8.3"
|
|
136
137
|
}
|
|
137
138
|
};
|
|
@@ -522,7 +523,7 @@ var writeTokens = async (options) => {
|
|
|
522
523
|
if ($themes2) {
|
|
523
524
|
themeObjects = JSON.parse($themes2);
|
|
524
525
|
}
|
|
525
|
-
} catch (
|
|
526
|
+
} catch (_error) {
|
|
526
527
|
}
|
|
527
528
|
const concatThemeNames = R.pipe(
|
|
528
529
|
R.filter((obj) => R.toLower(obj.group || "") === "theme"),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/tokens/create.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,KAAK,EAAY,SAAS,EAAE,MAAM,YAAY,CAAC;AAE7D,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/tokens/create.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,KAAK,EAAY,SAAS,EAAE,MAAM,YAAY,CAAC;AAE7D,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;CAeb,CAAC;AAEX,eAAO,MAAM,YAAY,GAAU,MAAM,KAAK;;EAiC7C,CAAC"}
|
|
@@ -992,27 +992,6 @@ var getDefaultToken = (tokenPath) => {
|
|
|
992
992
|
// src/tokens/create/generators/color.ts
|
|
993
993
|
import * as R4 from "ramda";
|
|
994
994
|
|
|
995
|
-
// src/colors/utils.ts
|
|
996
|
-
import chroma from "chroma-js";
|
|
997
|
-
import Colorjs from "colorjs.io";
|
|
998
|
-
import { Hsluv } from "hsluv";
|
|
999
|
-
var getLuminanceFromLightness = (lightness) => {
|
|
1000
|
-
const conv = new Hsluv();
|
|
1001
|
-
conv.hsluv_l = lightness;
|
|
1002
|
-
conv.hsluvToHex();
|
|
1003
|
-
return chroma(conv.hex).luminance();
|
|
1004
|
-
};
|
|
1005
|
-
var getLightnessFromHex = (hex) => {
|
|
1006
|
-
const conv = new Hsluv();
|
|
1007
|
-
conv.hex = hex;
|
|
1008
|
-
conv.hexToHsluv();
|
|
1009
|
-
return conv.hsluv_l;
|
|
1010
|
-
};
|
|
1011
|
-
|
|
1012
|
-
// src/colors/theme.ts
|
|
1013
|
-
import chroma2 from "chroma-js";
|
|
1014
|
-
import * as R3 from "ramda";
|
|
1015
|
-
|
|
1016
995
|
// src/colors/colorMetadata.ts
|
|
1017
996
|
import * as R2 from "ramda";
|
|
1018
997
|
var baseColors = {
|
|
@@ -1266,6 +1245,27 @@ var colorMetadata = {
|
|
|
1266
1245
|
};
|
|
1267
1246
|
var colorMetadataByNumber = R2.indexBy((metadata) => metadata.number, Object.values(colorMetadata));
|
|
1268
1247
|
|
|
1248
|
+
// src/colors/theme.ts
|
|
1249
|
+
import chroma2 from "chroma-js";
|
|
1250
|
+
import * as R3 from "ramda";
|
|
1251
|
+
|
|
1252
|
+
// src/colors/utils.ts
|
|
1253
|
+
import chroma from "chroma-js";
|
|
1254
|
+
import Colorjs from "colorjs.io";
|
|
1255
|
+
import { Hsluv } from "hsluv";
|
|
1256
|
+
var getLuminanceFromLightness = (lightness) => {
|
|
1257
|
+
const conv = new Hsluv();
|
|
1258
|
+
conv.hsluv_l = lightness;
|
|
1259
|
+
conv.hsluvToHex();
|
|
1260
|
+
return chroma(conv.hex).luminance();
|
|
1261
|
+
};
|
|
1262
|
+
var getLightnessFromHex = (hex) => {
|
|
1263
|
+
const conv = new Hsluv();
|
|
1264
|
+
conv.hex = hex;
|
|
1265
|
+
conv.hexToHsluv();
|
|
1266
|
+
return conv.hsluv_l;
|
|
1267
|
+
};
|
|
1268
|
+
|
|
1269
1269
|
// src/colors/theme.ts
|
|
1270
1270
|
var generateColorScale = (color, colorScheme) => {
|
|
1271
1271
|
let interpolationColor = color;
|
|
@@ -2043,6 +2043,7 @@ var generateTypography = (themeName, { fontFamily }) => {
|
|
|
2043
2043
|
var cliOptions = {
|
|
2044
2044
|
outDir: "out-dir",
|
|
2045
2045
|
clean: "clean",
|
|
2046
|
+
tailwind: "tailwind",
|
|
2046
2047
|
theme: {
|
|
2047
2048
|
colors: {
|
|
2048
2049
|
main: "main-colors",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../src/tokens/format.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../src/tokens/format.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,aAAa,EAAmB,MAAM,uBAAuB,CAAC;AAE5E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC,eAAO,MAAM,YAAY,GAAU,SAAS,IAAI,CAAC,aAAa,EAAE,MAAM,CAAC,2DAOtE,CAAC;AAEF,eAAO,MAAM,WAAW,GAAU,aAAa,KAAK,2DAcnD,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,GAAU,aAAa,KAAK,oBAItD,CAAC"}
|