@digdir/designsystemet 1.1.3 → 1.1.4
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/designsystemet.js +130 -186
- package/dist/src/index.js +88 -145
- package/dist/src/scripts/update-preview-tokens.d.ts +3 -0
- package/dist/src/scripts/update-preview-tokens.d.ts.map +1 -0
- package/dist/src/scripts/update-preview-tokens.js +3446 -0
- 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 +98 -154
- package/dist/src/tokens/create/generators/$designsystemet.js +6 -6
- package/dist/src/tokens/create/write.js +6 -6
- package/dist/src/tokens/format.d.ts +1 -1
- package/dist/src/tokens/format.d.ts.map +1 -1
- package/dist/src/tokens/format.js +88 -145
- package/dist/src/tokens/index.js +88 -145
- package/dist/src/tokens/process/configs/color.js +234 -293
- package/dist/src/tokens/process/configs/semantic.js +509 -113
- package/dist/src/tokens/process/configs/typography.d.ts.map +1 -1
- package/dist/src/tokens/process/configs/typography.js +504 -110
- package/dist/src/tokens/process/configs.d.ts +0 -1
- package/dist/src/tokens/process/configs.d.ts.map +1 -1
- package/dist/src/tokens/process/configs.js +231 -290
- package/dist/src/tokens/process/formats/css/color.d.ts.map +1 -1
- package/dist/src/tokens/process/formats/css/color.js +644 -12
- package/dist/src/tokens/process/formats/css/semantic.d.ts.map +1 -1
- package/dist/src/tokens/process/formats/css/semantic.js +679 -23
- package/dist/src/tokens/process/formats/css/typography.d.ts.map +1 -1
- package/dist/src/tokens/process/formats/css/typography.js +741 -8
- package/dist/src/tokens/process/formats/css.js +549 -38
- package/dist/src/tokens/process/output/declarations.js +60 -121
- package/dist/src/tokens/process/output/theme.js +6 -6
- package/dist/src/tokens/process/platform.d.ts +9 -4
- package/dist/src/tokens/process/platform.d.ts.map +1 -1
- package/dist/src/tokens/process/platform.js +76 -133
- package/dist/src/tokens/process/utils/getMultidimensionalThemes.js +62 -123
- package/package.json +6 -6
- package/dist/src/tokens/process/configs/storefront.d.ts +0 -3
- package/dist/src/tokens/process/configs/storefront.d.ts.map +0 -1
- package/dist/src/tokens/process/configs/storefront.js +0 -234
- package/dist/src/tokens/process/formats/js-tokens.d.ts +0 -6
- package/dist/src/tokens/process/formats/js-tokens.d.ts.map +0 -1
- package/dist/src/tokens/process/formats/js-tokens.js +0 -123
|
@@ -3,7 +3,7 @@ import chalk3 from "chalk";
|
|
|
3
3
|
|
|
4
4
|
// src/tokens/process/platform.ts
|
|
5
5
|
import chalk2 from "chalk";
|
|
6
|
-
import * as
|
|
6
|
+
import * as R10 from "ramda";
|
|
7
7
|
import StyleDictionary2 from "style-dictionary";
|
|
8
8
|
|
|
9
9
|
// src/tokens/types.ts
|
|
@@ -14,7 +14,7 @@ var colorCategories = {
|
|
|
14
14
|
|
|
15
15
|
// src/tokens/process/configs.ts
|
|
16
16
|
import { register } from "@tokens-studio/sd-transforms";
|
|
17
|
-
import * as
|
|
17
|
+
import * as R9 from "ramda";
|
|
18
18
|
import StyleDictionary from "style-dictionary";
|
|
19
19
|
|
|
20
20
|
// src/tokens/utils.ts
|
|
@@ -113,7 +113,11 @@ var colorScheme = {
|
|
|
113
113
|
(t) => !isColorCategoryToken(t)
|
|
114
114
|
])
|
|
115
115
|
);
|
|
116
|
-
const
|
|
116
|
+
const formattedMap = filteredAllTokens.map((token) => ({
|
|
117
|
+
token,
|
|
118
|
+
formatted: format(token)
|
|
119
|
+
}));
|
|
120
|
+
const formattedTokens = formattedMap.map(R2.view(R2.lensProp("formatted"))).join("\n");
|
|
117
121
|
const content = `{
|
|
118
122
|
${formattedTokens}
|
|
119
123
|
${colorSchemeProperty}}
|
|
@@ -131,7 +135,8 @@ var colorCategory = {
|
|
|
131
135
|
name: "ds/css-colorcategory",
|
|
132
136
|
format: async ({ dictionary, options, platform }) => {
|
|
133
137
|
const { outputReferences, usesDtcg } = options;
|
|
134
|
-
const { selector, layer } = platform;
|
|
138
|
+
const { selector, layer, files } = platform;
|
|
139
|
+
const destination = files?.[0]?.destination;
|
|
135
140
|
const format = R2.compose(
|
|
136
141
|
createPropertyFormatter({
|
|
137
142
|
outputReferences,
|
|
@@ -148,7 +153,12 @@ var colorCategory = {
|
|
|
148
153
|
}
|
|
149
154
|
})
|
|
150
155
|
);
|
|
151
|
-
const
|
|
156
|
+
const formattedMap = dictionary.allTokens.map((token) => ({
|
|
157
|
+
token,
|
|
158
|
+
formatted: format(token)
|
|
159
|
+
}));
|
|
160
|
+
buildOptions.buildTokenFormats[destination] = formattedMap;
|
|
161
|
+
const formattedTokens = formattedMap.map(R2.view(R2.lensProp("formatted"))).join("\n");
|
|
152
162
|
const content = `{
|
|
153
163
|
${formattedTokens}
|
|
154
164
|
}
|
|
@@ -179,30 +189,30 @@ var overrideSizingFormula = (format, token) => {
|
|
|
179
189
|
calc
|
|
180
190
|
};
|
|
181
191
|
};
|
|
182
|
-
var formatSizingTokens = (format, tokens) =>
|
|
183
|
-
|
|
184
|
-
(
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
192
|
+
var formatSizingTokens = (format, tokens) => R3.reduce(
|
|
193
|
+
(acc, token) => {
|
|
194
|
+
const { round, calc, name } = overrideSizingFormula(format, token);
|
|
195
|
+
return {
|
|
196
|
+
tokens: [...acc.tokens, token],
|
|
197
|
+
round: [...acc.round, `${name}: ${round};`],
|
|
198
|
+
calc: [...acc.calc, `${name}: ${calc};`]
|
|
199
|
+
};
|
|
200
|
+
},
|
|
201
|
+
{ tokens: [], round: [], calc: [] },
|
|
202
|
+
tokens
|
|
203
|
+
);
|
|
204
|
+
var sizingTemplate = ({ round, calc }) => `
|
|
195
205
|
${calc.join("\n")}
|
|
196
206
|
|
|
197
207
|
@supports (width: round(down, .1em, 1px)) {
|
|
198
208
|
${round.join("\n")}
|
|
199
209
|
}`;
|
|
200
|
-
};
|
|
201
210
|
var semantic = {
|
|
202
211
|
name: "ds/css-semantic",
|
|
203
212
|
format: async ({ dictionary, options, platform }) => {
|
|
204
213
|
const { outputReferences, usesDtcg } = options;
|
|
205
|
-
const { selector, layer } = platform;
|
|
214
|
+
const { selector, layer, files } = platform;
|
|
215
|
+
const destination = files?.[0]?.destination;
|
|
206
216
|
const format = createPropertyFormatter2({
|
|
207
217
|
outputReferences,
|
|
208
218
|
dictionary,
|
|
@@ -215,7 +225,18 @@ var semantic = {
|
|
|
215
225
|
(t) => pathStartsWithOneOf(["_size"], t) && isDigit(t.path[1]),
|
|
216
226
|
filteredTokens
|
|
217
227
|
);
|
|
218
|
-
const
|
|
228
|
+
const formattedSizingTokens = formatSizingTokens(format, sizingTokens);
|
|
229
|
+
const formattedMap = restTokens.map((token) => ({
|
|
230
|
+
token,
|
|
231
|
+
formatted: format(token)
|
|
232
|
+
}));
|
|
233
|
+
const formattedSizingMap = formattedSizingTokens.round.map((t, i) => ({
|
|
234
|
+
token: formattedSizingTokens.tokens[i],
|
|
235
|
+
formatted: t
|
|
236
|
+
}));
|
|
237
|
+
buildOptions.buildTokenFormats[destination] = [...formattedMap, ...formattedSizingMap];
|
|
238
|
+
const sizingSnippet = sizingTemplate(formattedSizingTokens);
|
|
239
|
+
const formattedTokens = formattedMap.map(R3.view(R3.lensProp("formatted"))).concat(sizingSnippet);
|
|
219
240
|
const content = `{
|
|
220
241
|
${formattedTokens.join("\n")}
|
|
221
242
|
}
|
|
@@ -240,7 +261,8 @@ var typography = {
|
|
|
240
261
|
name: "ds/css-typography",
|
|
241
262
|
format: async ({ dictionary, options, platform }) => {
|
|
242
263
|
const { outputReferences, usesDtcg } = options;
|
|
243
|
-
const { selector, layer } = platform;
|
|
264
|
+
const { selector, layer, files } = platform;
|
|
265
|
+
const destination = files?.[0]?.destination;
|
|
244
266
|
const format = createPropertyFormatter3({
|
|
245
267
|
outputReferences,
|
|
246
268
|
dictionary,
|
|
@@ -248,7 +270,12 @@ var typography = {
|
|
|
248
270
|
usesDtcg
|
|
249
271
|
});
|
|
250
272
|
const filteredTokens = R4.reject(typographyFontFamilyPredicate, dictionary.allTokens);
|
|
251
|
-
const
|
|
273
|
+
const formattedMap = filteredTokens.map((token) => ({
|
|
274
|
+
token,
|
|
275
|
+
formatted: format(token)
|
|
276
|
+
}));
|
|
277
|
+
buildOptions.buildTokenFormats[destination] = formattedMap;
|
|
278
|
+
const formattedTokens = formattedMap.map(R4.view(R4.lensProp("formatted"))).join("\n");
|
|
252
279
|
const content = selector ? `${selector} {
|
|
253
280
|
${formattedTokens}
|
|
254
281
|
}` : formattedTokens;
|
|
@@ -455,90 +482,6 @@ var semanticVariables = ({ theme }) => {
|
|
|
455
482
|
};
|
|
456
483
|
};
|
|
457
484
|
|
|
458
|
-
// src/tokens/process/configs/storefront.ts
|
|
459
|
-
import * as R9 from "ramda";
|
|
460
|
-
import { outputReferencesFilter as outputReferencesFilter2 } from "style-dictionary/utils";
|
|
461
|
-
|
|
462
|
-
// src/tokens/process/formats/js-tokens.ts
|
|
463
|
-
import * as R8 from "ramda";
|
|
464
|
-
import { createPropertyFormatter as createPropertyFormatter4, fileHeader } from "style-dictionary/utils";
|
|
465
|
-
var groupByType = R8.groupBy((token) => getType(token));
|
|
466
|
-
var removeUnwatedTokens = R8.pipe(
|
|
467
|
-
R8.reject((token) => isColorCategoryToken(token)),
|
|
468
|
-
R8.reject((token) => R8.any((path) => path.startsWith("_"))(token.path))
|
|
469
|
-
);
|
|
470
|
-
var dissocExtensions = R8.pipe(R8.dissoc("$extensions"), R8.dissocPath(["original", "$extensions"]));
|
|
471
|
-
var removeUnwatedProps = R8.map((token) => dissocExtensions(token));
|
|
472
|
-
var toCssVarName = R8.pipe(R8.split(":"), R8.head, R8.trim);
|
|
473
|
-
var jsTokens = {
|
|
474
|
-
name: "ds/js-tokens",
|
|
475
|
-
format: async ({ dictionary, file, options }) => {
|
|
476
|
-
const { usesDtcg, outputReferences } = options;
|
|
477
|
-
const format = createPropertyFormatter4({
|
|
478
|
-
outputReferences,
|
|
479
|
-
dictionary,
|
|
480
|
-
format: "css",
|
|
481
|
-
usesDtcg
|
|
482
|
-
});
|
|
483
|
-
const formatTokens = R8.map((token) => {
|
|
484
|
-
if (pathStartsWithOneOf(["size", "_size"], token)) {
|
|
485
|
-
const { calc, name } = overrideSizingFormula(format, token);
|
|
486
|
-
return {
|
|
487
|
-
...token,
|
|
488
|
-
name: name.trim(),
|
|
489
|
-
$value: calc.trim()
|
|
490
|
-
};
|
|
491
|
-
}
|
|
492
|
-
return {
|
|
493
|
-
...token,
|
|
494
|
-
name: toCssVarName(format(token))
|
|
495
|
-
};
|
|
496
|
-
});
|
|
497
|
-
const processTokens = R8.pipe(removeUnwatedTokens, removeUnwatedProps, formatTokens, groupByType);
|
|
498
|
-
const tokens = processTokens(inlineTokens(isInlineTokens, dictionary.allTokens));
|
|
499
|
-
const content = Object.entries(tokens).map(
|
|
500
|
-
([name, token]) => `export const ${name} = ${JSON.stringify(token, null, 2).replace(/"([^"]+)":/g, "$1:")}
|
|
501
|
-
`
|
|
502
|
-
).join("\n");
|
|
503
|
-
return fileHeader({ file }).then((fileHeaderText) => fileHeaderText + content);
|
|
504
|
-
}
|
|
505
|
-
};
|
|
506
|
-
|
|
507
|
-
// src/tokens/process/configs/storefront.ts
|
|
508
|
-
var typescriptTokens = ({ "color-scheme": colorScheme2, theme }) => {
|
|
509
|
-
return {
|
|
510
|
-
preprocessors: ["tokens-studio"],
|
|
511
|
-
platforms: {
|
|
512
|
-
ts: {
|
|
513
|
-
prefix,
|
|
514
|
-
basePxFontSize,
|
|
515
|
-
transforms: dsTransformers,
|
|
516
|
-
buildPath: `${theme}/`,
|
|
517
|
-
files: [
|
|
518
|
-
{
|
|
519
|
-
destination: `${colorScheme2}.ts`,
|
|
520
|
-
format: jsTokens.name,
|
|
521
|
-
filter: (token) => {
|
|
522
|
-
if (pathStartsWithOneOf(["border-width", "letter-spacing", "border-radius"], token) && !R9.includes("semantic", token.filePath))
|
|
523
|
-
return false;
|
|
524
|
-
const isSemanticColor = R9.includes("semantic", token.filePath) && typeEquals(["color"], token);
|
|
525
|
-
const wantedTypes = typeEquals(["shadow", "dimension", "typography", "opacity"], token);
|
|
526
|
-
return isSemanticColor || wantedTypes;
|
|
527
|
-
}
|
|
528
|
-
}
|
|
529
|
-
],
|
|
530
|
-
options: {
|
|
531
|
-
outputReferences: (token, options) => {
|
|
532
|
-
const include = pathStartsWithOneOf(["border-radius"], token);
|
|
533
|
-
const isWantedSize = pathStartsWithOneOf(["size", "_size"], token) && isDigit(token.path[1]);
|
|
534
|
-
return (include || isWantedSize) && outputReferencesFilter2(token, options);
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
}
|
|
538
|
-
}
|
|
539
|
-
};
|
|
540
|
-
};
|
|
541
|
-
|
|
542
485
|
// src/tokens/process/configs/typography.ts
|
|
543
486
|
import { expandTypesMap } from "@tokens-studio/sd-transforms";
|
|
544
487
|
var typographyVariables = ({ theme, typography: typography2 }) => {
|
|
@@ -565,6 +508,7 @@ var typographyVariables = ({ theme, typography: typography2 }) => {
|
|
|
565
508
|
sizeRem.name,
|
|
566
509
|
"ts/size/lineheight",
|
|
567
510
|
"ts/typography/fontWeight",
|
|
511
|
+
"ts/size/css/letterspacing",
|
|
568
512
|
typographyName.name
|
|
569
513
|
],
|
|
570
514
|
files: [
|
|
@@ -752,9 +696,9 @@ var TypographyValues;
|
|
|
752
696
|
// src/tokens/process/utils/getMultidimensionalThemes.ts
|
|
753
697
|
import chalk from "chalk";
|
|
754
698
|
import { kebabCase } from "change-case";
|
|
755
|
-
import * as
|
|
699
|
+
import * as R8 from "ramda";
|
|
756
700
|
var processed = Symbol("Type brand for ProcessedThemeObject");
|
|
757
|
-
var hasUnknownProps =
|
|
701
|
+
var hasUnknownProps = R8.pipe(R8.values, R8.none(R8.equals("unknown")), R8.not);
|
|
758
702
|
var getCustomColors = (processed$themes, colorGroups) => processed$themes.filter((x) => {
|
|
759
703
|
if (!x.group) {
|
|
760
704
|
return false;
|
|
@@ -768,7 +712,6 @@ StyleDictionary.registerTransform(sizeRem);
|
|
|
768
712
|
StyleDictionary.registerTransform(typographyName);
|
|
769
713
|
StyleDictionary.registerTransform(resolveMath);
|
|
770
714
|
StyleDictionary.registerTransform(unitless);
|
|
771
|
-
StyleDictionary.registerFormat(jsTokens);
|
|
772
715
|
for (const format of Object.values(formats)) {
|
|
773
716
|
StyleDictionary.registerFormat(format);
|
|
774
717
|
}
|
|
@@ -782,12 +725,15 @@ var configs = {
|
|
|
782
725
|
warningColorVariables: colorCategoryVariables({ category: "builtin", color: "warning" }),
|
|
783
726
|
infoColorVariables: colorCategoryVariables({ category: "builtin", color: "info" }),
|
|
784
727
|
typographyVariables,
|
|
785
|
-
semanticVariables
|
|
786
|
-
typescriptTokens
|
|
728
|
+
semanticVariables
|
|
787
729
|
};
|
|
788
730
|
|
|
789
731
|
// src/tokens/process/platform.ts
|
|
790
|
-
var buildOptions
|
|
732
|
+
var buildOptions = {
|
|
733
|
+
verbose: false,
|
|
734
|
+
processed$themes: [],
|
|
735
|
+
buildTokenFormats: {}
|
|
736
|
+
};
|
|
791
737
|
var sd = new StyleDictionary2();
|
|
792
738
|
var buildConfigs = {
|
|
793
739
|
typography: { getConfig: configs.typographyVariables, dimensions: ["typography"] },
|
|
@@ -820,13 +766,6 @@ var buildConfigs = {
|
|
|
820
766
|
log: ({ permutation: { theme } }) => `${theme} - info`
|
|
821
767
|
},
|
|
822
768
|
semantic: { getConfig: configs.semanticVariables, dimensions: ["semantic"] }
|
|
823
|
-
// storefront: {
|
|
824
|
-
// name: 'Storefront preview tokens',
|
|
825
|
-
// getConfig: configs.typescriptTokens,
|
|
826
|
-
// dimensions: ['color-scheme'],
|
|
827
|
-
// options: { outPath: path.resolve('../../apps/storefront/tokens') },
|
|
828
|
-
// enabled: () => buildOptions?.preview ?? false,
|
|
829
|
-
// },
|
|
830
769
|
};
|
|
831
770
|
|
|
832
771
|
// src/tokens/process/output/declarations.ts
|
|
@@ -849,7 +788,7 @@ import type {} from '@digdir/designsystemet-react/colors';
|
|
|
849
788
|
|
|
850
789
|
declare module '@digdir/designsystemet-react/colors' {
|
|
851
790
|
export interface MainAndSupportColors {
|
|
852
|
-
${colors.map((color) => ` ${color}: never;`).join("\n")}
|
|
791
|
+
${colors.map((color) => ` ${color.includes("-") ? `'${color}'` : color}: never;`).join("\n")}
|
|
853
792
|
}
|
|
854
793
|
}
|
|
855
794
|
`.trimStart();
|
|
@@ -5,11 +5,11 @@ import * as R from "ramda";
|
|
|
5
5
|
// package.json
|
|
6
6
|
var package_default = {
|
|
7
7
|
name: "@digdir/designsystemet",
|
|
8
|
-
version: "1.1.
|
|
8
|
+
version: "1.1.4",
|
|
9
9
|
description: "CLI for Designsystemet",
|
|
10
10
|
author: "Designsystemet team",
|
|
11
11
|
engines: {
|
|
12
|
-
node: ">=22.
|
|
12
|
+
node: ">=22.17.0"
|
|
13
13
|
},
|
|
14
14
|
repository: {
|
|
15
15
|
type: "git",
|
|
@@ -58,6 +58,7 @@ var package_default = {
|
|
|
58
58
|
"digdir:tokens-build": "pnpm run designsystemet tokens build -t ../../internal/design-tokens -o ../../packages/theme/brand --clean --experimental-tailwind",
|
|
59
59
|
"digdir:tokens-create": "pnpm run designsystemet tokens create --config ./configs/digdir.config.json",
|
|
60
60
|
"update:template": "tsx ./src/scripts/update-template.ts",
|
|
61
|
+
"update:preview-tokens": "tsx ./src/scripts/update-preview-tokens.ts",
|
|
61
62
|
"update:theme-digdir": "pnpm digdir:tokens-create && tsx ./src/scripts/update-design-tokens.ts && pnpm digdir:tokens-build",
|
|
62
63
|
verify: "pnpm test && pnpm update:template && pnpm update:theme-digdir && pnpm build:tokens"
|
|
63
64
|
},
|
|
@@ -75,8 +76,8 @@ var package_default = {
|
|
|
75
76
|
"object-hash": "^3.0.0",
|
|
76
77
|
postcss: "^8.5.6",
|
|
77
78
|
ramda: "^0.31.3",
|
|
78
|
-
"style-dictionary": "^5.0.
|
|
79
|
-
zod: "^3.25.
|
|
79
|
+
"style-dictionary": "^5.0.1",
|
|
80
|
+
zod: "^3.25.74",
|
|
80
81
|
"zod-validation-error": "^3.5.2"
|
|
81
82
|
},
|
|
82
83
|
devDependencies: {
|
|
@@ -84,8 +85,7 @@ var package_default = {
|
|
|
84
85
|
"@types/apca-w3": "^0.1.3",
|
|
85
86
|
"@types/chroma-js": "^3.1.1",
|
|
86
87
|
"@types/fs-extra": "^11.0.4",
|
|
87
|
-
"@types/
|
|
88
|
-
"@types/node": "^22.15.32",
|
|
88
|
+
"@types/node": "^22.16.0",
|
|
89
89
|
"@types/object-hash": "^3.0.6",
|
|
90
90
|
"@types/ramda": "^0.30.2",
|
|
91
91
|
"fs-extra": "^11.3.0",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { TransformedToken } from 'style-dictionary/types';
|
|
1
2
|
import type { OutputFile, TokenSet } from '../types.js';
|
|
2
3
|
import { type ThemePermutation } from '../types.js';
|
|
3
4
|
import { type ProcessedThemeObject } from './utils/getMultidimensionalThemes.js';
|
|
@@ -8,12 +9,15 @@ type SharedOptions = {
|
|
|
8
9
|
defaultColor?: string;
|
|
9
10
|
/** Dry run, no files will be written */
|
|
10
11
|
dry?: boolean;
|
|
11
|
-
/** Generate preview tokens */
|
|
12
|
-
preview: boolean;
|
|
13
12
|
/** Token Studio `$themes.json` content */
|
|
14
13
|
processed$themes: ProcessedThemeObject[];
|
|
15
14
|
/** Color groups */
|
|
16
15
|
colorGroups?: string[];
|
|
16
|
+
/** Build token format map */
|
|
17
|
+
buildTokenFormats: Record<string, {
|
|
18
|
+
token: TransformedToken;
|
|
19
|
+
formatted: string;
|
|
20
|
+
}[]>;
|
|
17
21
|
};
|
|
18
22
|
export type BuildOptions = {
|
|
19
23
|
type: 'build';
|
|
@@ -29,14 +33,15 @@ export type FormatOptions = {
|
|
|
29
33
|
/** Tokensets */
|
|
30
34
|
tokenSets: Map<string, TokenSet>;
|
|
31
35
|
} & SharedOptions;
|
|
32
|
-
type ProcessOptions = BuildOptions | FormatOptions;
|
|
36
|
+
export type ProcessOptions = BuildOptions | FormatOptions;
|
|
33
37
|
type ProcessedBuildConfigs<T> = Record<keyof typeof buildConfigs, T>;
|
|
34
38
|
export type ProcessReturn = ProcessedBuildConfigs<BuildResult[]>;
|
|
35
39
|
type BuildResult = {
|
|
36
40
|
permutation: ThemePermutation;
|
|
37
41
|
formatted: OutputFile[];
|
|
42
|
+
tokens: TransformedToken[];
|
|
38
43
|
};
|
|
39
|
-
export declare let buildOptions:
|
|
44
|
+
export declare let buildOptions: SharedOptions;
|
|
40
45
|
declare const buildConfigs: {
|
|
41
46
|
typography: {
|
|
42
47
|
getConfig: import("./configs/shared.js").GetStyleDictionaryConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../../../src/tokens/process/platform.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAqC,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEvF,OAAO,EAAmB,KAAK,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAElG,KAAK,aAAa,GAAG;IACnB,4BAA4B;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,wCAAwC;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wCAAwC;IACxC,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,
|
|
1
|
+
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../../../src/tokens/process/platform.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAqC,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEvF,OAAO,EAAmB,KAAK,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAElG,KAAK,aAAa,GAAG;IACnB,4BAA4B;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,wCAAwC;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wCAAwC;IACxC,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,0CAA0C;IAC1C,gBAAgB,EAAE,oBAAoB,EAAE,CAAC;IACzC,mBAAmB;IACnB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,6BAA6B;IAC7B,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,gBAAgB,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC,CAAC;CACrF,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,OAAO,CAAC;IACd,yBAAyB;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,wCAAwC;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,iCAAiC;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,aAAa,CAAC;AAElB,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,QAAQ,CAAC;IACf,gBAAgB;IAChB,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;CAClC,GAAG,aAAa,CAAC;AAElB,MAAM,MAAM,cAAc,GAAG,YAAY,GAAG,aAAa,CAAC;AAE1D,KAAK,qBAAqB,CAAC,CAAC,IAAI,MAAM,CAAC,MAAM,OAAO,YAAY,EAAE,CAAC,CAAC,CAAC;AAErE,MAAM,MAAM,aAAa,GAAG,qBAAqB,CAAC,WAAW,EAAE,CAAC,CAAC;AAEjE,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,gBAAgB,CAAC;IAC9B,SAAS,EAAE,UAAU,EAAE,CAAC;IACxB,MAAM,EAAE,gBAAgB,EAAE,CAAC;CAC5B,CAAC;AAgBF,eAAO,IAAI,YAAY,EAAE,aAIxB,CAAC;AAOF,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BqB,CAAC;AAExC,wBAAsB,eAAe,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC,CAuIrF"}
|