@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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../../../../src/tokens/process/configs/color.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAKrE,OAAO,
|
|
1
|
+
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../../../../src/tokens/process/configs/color.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAKrE,OAAO,EAAkB,KAAK,wBAAwB,EAAU,MAAM,aAAa,CAAC;AAEpF,eAAO,MAAM,oBAAoB,EAAE,wBA8BlC,CAAC;AAEF,KAAK,iBAAiB,GAAG;IAAE,QAAQ,EAAE,eAAe,CAAA;CAAE,GAAG;IAAE,QAAQ,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,aAAa,CAAA;CAAE,CAAC;AAEvG,eAAO,MAAM,sBAAsB,GAChC,MAAM,iBAAiB,KAAG,wBAgD1B,CAAC"}
|
|
@@ -76,7 +76,7 @@ var prefersColorScheme = (colorScheme2, content) => `
|
|
|
76
76
|
`;
|
|
77
77
|
var colorScheme = {
|
|
78
78
|
name: "ds/css-colorscheme",
|
|
79
|
-
format: async ({ dictionary,
|
|
79
|
+
format: async ({ dictionary, options, platform }) => {
|
|
80
80
|
const { allTokens } = dictionary;
|
|
81
81
|
const { outputReferences, usesDtcg } = options;
|
|
82
82
|
const { selector, colorScheme: colorScheme2, layer } = platform;
|
|
@@ -118,7 +118,7 @@ ${selector} ${content} ${autoSelectorContent}
|
|
|
118
118
|
};
|
|
119
119
|
var colorCategory = {
|
|
120
120
|
name: "ds/css-colorcategory",
|
|
121
|
-
format: async ({ dictionary,
|
|
121
|
+
format: async ({ dictionary, options, platform }) => {
|
|
122
122
|
const { outputReferences, usesDtcg } = options;
|
|
123
123
|
const { selector, layer } = platform;
|
|
124
124
|
const format = R2.compose(
|
|
@@ -161,7 +161,7 @@ var isInlineTokens = R3.anyPass([isNumericBorderRadiusToken, isNumericSizeToken,
|
|
|
161
161
|
var overrideSizingFormula = (format, token) => {
|
|
162
162
|
const [name, value] = format(token).split(":");
|
|
163
163
|
const calc = value.replace(`var(--ds-size-mode-font-size)`, "1em").replace(/floor\((.*)\);/, "calc($1)");
|
|
164
|
-
const round = `round(down, ${calc},
|
|
164
|
+
const round = `round(down, ${calc}, 1px)`;
|
|
165
165
|
return {
|
|
166
166
|
name,
|
|
167
167
|
round,
|
|
@@ -189,7 +189,7 @@ ${round.join("\n")}
|
|
|
189
189
|
};
|
|
190
190
|
var semantic = {
|
|
191
191
|
name: "ds/css-semantic",
|
|
192
|
-
format: async ({ dictionary,
|
|
192
|
+
format: async ({ dictionary, options, platform }) => {
|
|
193
193
|
const { outputReferences, usesDtcg } = options;
|
|
194
194
|
const { selector, layer } = platform;
|
|
195
195
|
const format = createPropertyFormatter2({
|
|
@@ -227,7 +227,7 @@ var typographyFontFamilyPredicate = R4.allPass([
|
|
|
227
227
|
]);
|
|
228
228
|
var typography = {
|
|
229
229
|
name: "ds/css-typography",
|
|
230
|
-
format: async ({ dictionary,
|
|
230
|
+
format: async ({ dictionary, options, platform }) => {
|
|
231
231
|
const { outputReferences, usesDtcg } = options;
|
|
232
232
|
const { selector, layer } = platform;
|
|
233
233
|
const format = createPropertyFormatter3({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"semantic.d.ts","sourceRoot":"","sources":["../../../../../src/tokens/process/configs/semantic.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"semantic.d.ts","sourceRoot":"","sources":["../../../../../src/tokens/process/configs/semantic.ts"],"names":[],"mappings":"AAKA,OAAO,EAAkC,KAAK,wBAAwB,EAAU,MAAM,aAAa,CAAC;AAEpG,eAAO,MAAM,iBAAiB,EAAE,wBA0C/B,CAAC"}
|
|
@@ -74,7 +74,7 @@ var prefersColorScheme = (colorScheme2, content) => `
|
|
|
74
74
|
`;
|
|
75
75
|
var colorScheme = {
|
|
76
76
|
name: "ds/css-colorscheme",
|
|
77
|
-
format: async ({ dictionary,
|
|
77
|
+
format: async ({ dictionary, options, platform }) => {
|
|
78
78
|
const { allTokens } = dictionary;
|
|
79
79
|
const { outputReferences, usesDtcg } = options;
|
|
80
80
|
const { selector, colorScheme: colorScheme2, layer } = platform;
|
|
@@ -116,7 +116,7 @@ ${selector} ${content} ${autoSelectorContent}
|
|
|
116
116
|
};
|
|
117
117
|
var colorCategory = {
|
|
118
118
|
name: "ds/css-colorcategory",
|
|
119
|
-
format: async ({ dictionary,
|
|
119
|
+
format: async ({ dictionary, options, platform }) => {
|
|
120
120
|
const { outputReferences, usesDtcg } = options;
|
|
121
121
|
const { selector, layer } = platform;
|
|
122
122
|
const format = R2.compose(
|
|
@@ -159,7 +159,7 @@ var isInlineTokens = R3.anyPass([isNumericBorderRadiusToken, isNumericSizeToken,
|
|
|
159
159
|
var overrideSizingFormula = (format, token) => {
|
|
160
160
|
const [name, value] = format(token).split(":");
|
|
161
161
|
const calc = value.replace(`var(--ds-size-mode-font-size)`, "1em").replace(/floor\((.*)\);/, "calc($1)");
|
|
162
|
-
const round = `round(down, ${calc},
|
|
162
|
+
const round = `round(down, ${calc}, 1px)`;
|
|
163
163
|
return {
|
|
164
164
|
name,
|
|
165
165
|
round,
|
|
@@ -187,7 +187,7 @@ ${round.join("\n")}
|
|
|
187
187
|
};
|
|
188
188
|
var semantic = {
|
|
189
189
|
name: "ds/css-semantic",
|
|
190
|
-
format: async ({ dictionary,
|
|
190
|
+
format: async ({ dictionary, options, platform }) => {
|
|
191
191
|
const { outputReferences, usesDtcg } = options;
|
|
192
192
|
const { selector, layer } = platform;
|
|
193
193
|
const format = createPropertyFormatter2({
|
|
@@ -225,7 +225,7 @@ var typographyFontFamilyPredicate = R4.allPass([
|
|
|
225
225
|
]);
|
|
226
226
|
var typography = {
|
|
227
227
|
name: "ds/css-typography",
|
|
228
|
-
format: async ({ dictionary,
|
|
228
|
+
format: async ({ dictionary, options, platform }) => {
|
|
229
229
|
const { outputReferences, usesDtcg } = options;
|
|
230
230
|
const { selector, layer } = platform;
|
|
231
231
|
const format = createPropertyFormatter3({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storefront.d.ts","sourceRoot":"","sources":["../../../../../src/tokens/process/configs/storefront.ts"],"names":[],"mappings":"AAMA,OAAO,
|
|
1
|
+
{"version":3,"file":"storefront.d.ts","sourceRoot":"","sources":["../../../../../src/tokens/process/configs/storefront.ts"],"names":[],"mappings":"AAMA,OAAO,EAAkC,KAAK,wBAAwB,EAAU,MAAM,aAAa,CAAC;AAEpG,eAAO,MAAM,gBAAgB,EAAE,wBAqC9B,CAAC"}
|
|
@@ -72,7 +72,7 @@ var isInlineTokens = R2.anyPass([isNumericBorderRadiusToken, isNumericSizeToken,
|
|
|
72
72
|
var overrideSizingFormula = (format, token) => {
|
|
73
73
|
const [name, value] = format(token).split(":");
|
|
74
74
|
const calc = value.replace(`var(--ds-size-mode-font-size)`, "1em").replace(/floor\((.*)\);/, "calc($1)");
|
|
75
|
-
const round = `round(down, ${calc},
|
|
75
|
+
const round = `round(down, ${calc}, 1px)`;
|
|
76
76
|
return {
|
|
77
77
|
name,
|
|
78
78
|
round,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../../../../../src/tokens/process/configs/typography.ts"],"names":[],"mappings":"AAKA,OAAO,
|
|
1
|
+
{"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../../../../../src/tokens/process/configs/typography.ts"],"names":[],"mappings":"AAKA,OAAO,EAAkB,KAAK,wBAAwB,EAAU,MAAM,aAAa,CAAC;AAEpF,eAAO,MAAM,mBAAmB,EAAE,wBAkDjC,CAAC"}
|
|
@@ -73,7 +73,7 @@ var prefersColorScheme = (colorScheme2, content) => `
|
|
|
73
73
|
`;
|
|
74
74
|
var colorScheme = {
|
|
75
75
|
name: "ds/css-colorscheme",
|
|
76
|
-
format: async ({ dictionary,
|
|
76
|
+
format: async ({ dictionary, options, platform }) => {
|
|
77
77
|
const { allTokens } = dictionary;
|
|
78
78
|
const { outputReferences, usesDtcg } = options;
|
|
79
79
|
const { selector, colorScheme: colorScheme2, layer } = platform;
|
|
@@ -115,7 +115,7 @@ ${selector} ${content} ${autoSelectorContent}
|
|
|
115
115
|
};
|
|
116
116
|
var colorCategory = {
|
|
117
117
|
name: "ds/css-colorcategory",
|
|
118
|
-
format: async ({ dictionary,
|
|
118
|
+
format: async ({ dictionary, options, platform }) => {
|
|
119
119
|
const { outputReferences, usesDtcg } = options;
|
|
120
120
|
const { selector, layer } = platform;
|
|
121
121
|
const format = R2.compose(
|
|
@@ -158,7 +158,7 @@ var isInlineTokens = R3.anyPass([isNumericBorderRadiusToken, isNumericSizeToken,
|
|
|
158
158
|
var overrideSizingFormula = (format, token) => {
|
|
159
159
|
const [name, value] = format(token).split(":");
|
|
160
160
|
const calc = value.replace(`var(--ds-size-mode-font-size)`, "1em").replace(/floor\((.*)\);/, "calc($1)");
|
|
161
|
-
const round = `round(down, ${calc},
|
|
161
|
+
const round = `round(down, ${calc}, 1px)`;
|
|
162
162
|
return {
|
|
163
163
|
name,
|
|
164
164
|
round,
|
|
@@ -186,7 +186,7 @@ ${round.join("\n")}
|
|
|
186
186
|
};
|
|
187
187
|
var semantic = {
|
|
188
188
|
name: "ds/css-semantic",
|
|
189
|
-
format: async ({ dictionary,
|
|
189
|
+
format: async ({ dictionary, options, platform }) => {
|
|
190
190
|
const { outputReferences, usesDtcg } = options;
|
|
191
191
|
const { selector, layer } = platform;
|
|
192
192
|
const format = createPropertyFormatter2({
|
|
@@ -224,7 +224,7 @@ var typographyFontFamilyPredicate = R4.allPass([
|
|
|
224
224
|
]);
|
|
225
225
|
var typography = {
|
|
226
226
|
name: "ds/css-typography",
|
|
227
|
-
format: async ({ dictionary,
|
|
227
|
+
format: async ({ dictionary, options, platform }) => {
|
|
228
228
|
const { outputReferences, usesDtcg } = options;
|
|
229
229
|
const { selector, layer } = platform;
|
|
230
230
|
const format = createPropertyFormatter3({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configs.d.ts","sourceRoot":"","sources":["../../../../src/tokens/process/configs.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,2BAA2B,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAInG,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAOpE,OAAO,
|
|
1
|
+
{"version":3,"file":"configs.d.ts","sourceRoot":"","sources":["../../../../src/tokens/process/configs.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,2BAA2B,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAInG,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAOpE,OAAO,EAA6B,KAAK,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAc5G,eAAO,MAAM,OAAO;;;;;;;;;;;;CAYnB,CAAC;AAEF,eAAO,MAAM,4BAA4B,GACvC,WAAW,wBAAwB,EACnC,kBAAkB,oBAAoB,EAAE,EACxC,YAAY,cAAc,EAAE,EAC5B,SAAS,kBAAkB,KAC1B,2BAA2B,EAoD7B,CAAC"}
|
|
@@ -93,7 +93,7 @@ var prefersColorScheme = (colorScheme2, content) => `
|
|
|
93
93
|
`;
|
|
94
94
|
var colorScheme = {
|
|
95
95
|
name: "ds/css-colorscheme",
|
|
96
|
-
format: async ({ dictionary,
|
|
96
|
+
format: async ({ dictionary, options, platform }) => {
|
|
97
97
|
const { allTokens } = dictionary;
|
|
98
98
|
const { outputReferences, usesDtcg } = options;
|
|
99
99
|
const { selector, colorScheme: colorScheme2, layer } = platform;
|
|
@@ -135,7 +135,7 @@ ${selector} ${content} ${autoSelectorContent}
|
|
|
135
135
|
};
|
|
136
136
|
var colorCategory = {
|
|
137
137
|
name: "ds/css-colorcategory",
|
|
138
|
-
format: async ({ dictionary,
|
|
138
|
+
format: async ({ dictionary, options, platform }) => {
|
|
139
139
|
const { outputReferences, usesDtcg } = options;
|
|
140
140
|
const { selector, layer } = platform;
|
|
141
141
|
const format = R2.compose(
|
|
@@ -178,7 +178,7 @@ var isInlineTokens = R3.anyPass([isNumericBorderRadiusToken, isNumericSizeToken,
|
|
|
178
178
|
var overrideSizingFormula = (format, token) => {
|
|
179
179
|
const [name, value] = format(token).split(":");
|
|
180
180
|
const calc = value.replace(`var(--ds-size-mode-font-size)`, "1em").replace(/floor\((.*)\);/, "calc($1)");
|
|
181
|
-
const round = `round(down, ${calc},
|
|
181
|
+
const round = `round(down, ${calc}, 1px)`;
|
|
182
182
|
return {
|
|
183
183
|
name,
|
|
184
184
|
round,
|
|
@@ -206,7 +206,7 @@ ${round.join("\n")}
|
|
|
206
206
|
};
|
|
207
207
|
var semantic = {
|
|
208
208
|
name: "ds/css-semantic",
|
|
209
|
-
format: async ({ dictionary,
|
|
209
|
+
format: async ({ dictionary, options, platform }) => {
|
|
210
210
|
const { outputReferences, usesDtcg } = options;
|
|
211
211
|
const { selector, layer } = platform;
|
|
212
212
|
const format = createPropertyFormatter2({
|
|
@@ -244,7 +244,7 @@ var typographyFontFamilyPredicate = R4.allPass([
|
|
|
244
244
|
]);
|
|
245
245
|
var typography = {
|
|
246
246
|
name: "ds/css-typography",
|
|
247
|
-
format: async ({ dictionary,
|
|
247
|
+
format: async ({ dictionary, options, platform }) => {
|
|
248
248
|
const { outputReferences, usesDtcg } = options;
|
|
249
249
|
const { selector, layer } = platform;
|
|
250
250
|
const format = createPropertyFormatter3({
|
|
@@ -54,7 +54,7 @@ var prefersColorScheme = (colorScheme2, content) => `
|
|
|
54
54
|
`;
|
|
55
55
|
var colorScheme = {
|
|
56
56
|
name: "ds/css-colorscheme",
|
|
57
|
-
format: async ({ dictionary,
|
|
57
|
+
format: async ({ dictionary, options, platform }) => {
|
|
58
58
|
const { allTokens } = dictionary;
|
|
59
59
|
const { outputReferences, usesDtcg } = options;
|
|
60
60
|
const { selector, colorScheme: colorScheme2, layer } = platform;
|
|
@@ -96,7 +96,7 @@ ${selector} ${content} ${autoSelectorContent}
|
|
|
96
96
|
};
|
|
97
97
|
var colorCategory = {
|
|
98
98
|
name: "ds/css-colorcategory",
|
|
99
|
-
format: async ({ dictionary,
|
|
99
|
+
format: async ({ dictionary, options, platform }) => {
|
|
100
100
|
const { outputReferences, usesDtcg } = options;
|
|
101
101
|
const { selector, layer } = platform;
|
|
102
102
|
const format = R2.compose(
|
|
@@ -50,7 +50,7 @@ var isInlineTokens = R2.anyPass([isNumericBorderRadiusToken, isNumericSizeToken,
|
|
|
50
50
|
var overrideSizingFormula = (format, token) => {
|
|
51
51
|
const [name, value] = format(token).split(":");
|
|
52
52
|
const calc = value.replace(`var(--ds-size-mode-font-size)`, "1em").replace(/floor\((.*)\);/, "calc($1)");
|
|
53
|
-
const round = `round(down, ${calc},
|
|
53
|
+
const round = `round(down, ${calc}, 1px)`;
|
|
54
54
|
return {
|
|
55
55
|
name,
|
|
56
56
|
round,
|
|
@@ -78,7 +78,7 @@ ${round.join("\n")}
|
|
|
78
78
|
};
|
|
79
79
|
var semantic = {
|
|
80
80
|
name: "ds/css-semantic",
|
|
81
|
-
format: async ({ dictionary,
|
|
81
|
+
format: async ({ dictionary, options, platform }) => {
|
|
82
82
|
const { outputReferences, usesDtcg } = options;
|
|
83
83
|
const { selector, layer } = platform;
|
|
84
84
|
const format = createPropertyFormatter({
|
|
@@ -7,7 +7,7 @@ var typographyFontFamilyPredicate = R.allPass([
|
|
|
7
7
|
]);
|
|
8
8
|
var typography = {
|
|
9
9
|
name: "ds/css-typography",
|
|
10
|
-
format: async ({ dictionary,
|
|
10
|
+
format: async ({ dictionary, options, platform }) => {
|
|
11
11
|
const { outputReferences, usesDtcg } = options;
|
|
12
12
|
const { selector, layer } = platform;
|
|
13
13
|
const format = createPropertyFormatter({
|
|
@@ -70,7 +70,7 @@ var prefersColorScheme = (colorScheme2, content) => `
|
|
|
70
70
|
`;
|
|
71
71
|
var colorScheme = {
|
|
72
72
|
name: "ds/css-colorscheme",
|
|
73
|
-
format: async ({ dictionary,
|
|
73
|
+
format: async ({ dictionary, options, platform }) => {
|
|
74
74
|
const { allTokens } = dictionary;
|
|
75
75
|
const { outputReferences, usesDtcg } = options;
|
|
76
76
|
const { selector, colorScheme: colorScheme2, layer } = platform;
|
|
@@ -112,7 +112,7 @@ ${selector} ${content} ${autoSelectorContent}
|
|
|
112
112
|
};
|
|
113
113
|
var colorCategory = {
|
|
114
114
|
name: "ds/css-colorcategory",
|
|
115
|
-
format: async ({ dictionary,
|
|
115
|
+
format: async ({ dictionary, options, platform }) => {
|
|
116
116
|
const { outputReferences, usesDtcg } = options;
|
|
117
117
|
const { selector, layer } = platform;
|
|
118
118
|
const format = R2.compose(
|
|
@@ -155,7 +155,7 @@ var isInlineTokens = R3.anyPass([isNumericBorderRadiusToken, isNumericSizeToken,
|
|
|
155
155
|
var overrideSizingFormula = (format, token) => {
|
|
156
156
|
const [name, value] = format(token).split(":");
|
|
157
157
|
const calc = value.replace(`var(--ds-size-mode-font-size)`, "1em").replace(/floor\((.*)\);/, "calc($1)");
|
|
158
|
-
const round = `round(down, ${calc},
|
|
158
|
+
const round = `round(down, ${calc}, 1px)`;
|
|
159
159
|
return {
|
|
160
160
|
name,
|
|
161
161
|
round,
|
|
@@ -183,7 +183,7 @@ ${round.join("\n")}
|
|
|
183
183
|
};
|
|
184
184
|
var semantic = {
|
|
185
185
|
name: "ds/css-semantic",
|
|
186
|
-
format: async ({ dictionary,
|
|
186
|
+
format: async ({ dictionary, options, platform }) => {
|
|
187
187
|
const { outputReferences, usesDtcg } = options;
|
|
188
188
|
const { selector, layer } = platform;
|
|
189
189
|
const format = createPropertyFormatter2({
|
|
@@ -221,7 +221,7 @@ var typographyFontFamilyPredicate = R4.allPass([
|
|
|
221
221
|
]);
|
|
222
222
|
var typography = {
|
|
223
223
|
name: "ds/css-typography",
|
|
224
|
-
format: async ({ dictionary,
|
|
224
|
+
format: async ({ dictionary, options, platform }) => {
|
|
225
225
|
const { outputReferences, usesDtcg } = options;
|
|
226
226
|
const { selector, layer } = platform;
|
|
227
227
|
const format = createPropertyFormatter3({
|
|
@@ -68,7 +68,7 @@ var isInlineTokens = R2.anyPass([isNumericBorderRadiusToken, isNumericSizeToken,
|
|
|
68
68
|
var overrideSizingFormula = (format, token) => {
|
|
69
69
|
const [name, value] = format(token).split(":");
|
|
70
70
|
const calc = value.replace(`var(--ds-size-mode-font-size)`, "1em").replace(/floor\((.*)\);/, "calc($1)");
|
|
71
|
-
const round = `round(down, ${calc},
|
|
71
|
+
const round = `round(down, ${calc}, 1px)`;
|
|
72
72
|
return {
|
|
73
73
|
name,
|
|
74
74
|
round,
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { OutputFile } from '../../types.js';
|
|
2
|
+
import { type ProcessedThemeObject } from '../utils/getMultidimensionalThemes.js';
|
|
3
|
+
export declare const createTypeDeclarationFiles: (processed$themes: ProcessedThemeObject[]) => OutputFile[];
|
|
4
|
+
//# sourceMappingURL=declarations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"declarations.d.ts","sourceRoot":"","sources":["../../../../../src/tokens/process/output/declarations.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,EAAmB,KAAK,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAEnG,eAAO,MAAM,0BAA0B,GAAI,kBAAkB,oBAAoB,EAAE,KAAG,UAAU,EAW/F,CAAC"}
|