design-token-library 0.1.0 → 0.3.0
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/CHANGELOG.md +79 -1
- package/README.md +39 -3
- package/dist/lib/css-reflector.d.ts +230 -9
- package/dist/lib/css-reflector.js +217 -29
- package/dist/lib/css-reflector.js.map +1 -1
- package/dist/lib/design-token.d.ts +225 -46
- package/dist/lib/design-token.js +1 -1
- package/dist/lib/design-token.js.map +1 -1
- package/dist/lib/index.d.ts +5 -2
- package/dist/lib/index.js +5 -2
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/library.d.ts +581 -28
- package/dist/lib/library.js +695 -125
- package/dist/lib/library.js.map +1 -1
- package/dist/lib/notifier.js.map +1 -1
- package/dist/lib/public.d.ts +1405 -0
- package/dist/lib/queue.js +10 -1
- package/dist/lib/queue.js.map +1 -1
- package/dist/lib/recipe.d.ts +81 -0
- package/dist/lib/recipe.js +101 -0
- package/dist/lib/recipe.js.map +1 -0
- package/dist/lib/ref.d.ts +91 -0
- package/dist/lib/ref.js +114 -0
- package/dist/lib/ref.js.map +1 -0
- package/dist/lib/tsconfig.tsbuildinfo +1 -0
- package/dist/lib/tsdoc-metadata.json +11 -0
- package/dist/lib/utilities.d.ts +10 -4
- package/dist/lib/utilities.js +10 -0
- package/dist/lib/utilities.js.map +1 -1
- package/dist/lib/values.d.ts +34 -0
- package/dist/lib/values.js +64 -0
- package/dist/lib/values.js.map +1 -0
- package/dist/lib/watcher.js.map +1 -1
- package/package.json +53 -40
- package/design-token-library-0.0.0.tgz +0 -0
|
@@ -1,27 +1,96 @@
|
|
|
1
1
|
import { DesignToken } from "./design-token.js";
|
|
2
|
+
import { isToken } from "./utilities.js";
|
|
2
3
|
/**
|
|
4
|
+
* Convert a library to CSS custom property declarations.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* Libraries with custom token types must provide a converter for each
|
|
8
|
+
* custom type, or `false` to leave tokens of that type out of the CSS.
|
|
9
|
+
* A converter for a standard type is used in place of the one of the library.
|
|
10
|
+
*
|
|
3
11
|
* @public
|
|
4
12
|
*/
|
|
5
|
-
export function toCSS(library) {
|
|
6
|
-
|
|
13
|
+
export function toCSS(library, ...[options]) {
|
|
14
|
+
// Converters are checked by `ToCSSArgs`; at runtime they're keyed by type.
|
|
15
|
+
const converters = options?.converters ?? {};
|
|
16
|
+
return recurseToCss(library.tokens, converters, options?.name ?? defaultName);
|
|
7
17
|
}
|
|
8
18
|
/**
|
|
9
|
-
*
|
|
19
|
+
* `$` cannot begin a CSS identifier, so a group's `$root` token is named for
|
|
20
|
+
* the group: `color.$root` is `--color`.
|
|
21
|
+
*/
|
|
22
|
+
const defaultName = (token) => token.name.replace(/\.\$root$/, "").replaceAll(".", "-");
|
|
23
|
+
/**
|
|
24
|
+
* The values of a token's properties. A value that isn't a record, such as a
|
|
25
|
+
* number, which a standard type without a converter has, is written as a
|
|
26
|
+
* string, as it was before a converter could return a record.
|
|
27
|
+
*/
|
|
28
|
+
const valuesOf = (value) => isValues(value) ? value : { "": String(value) };
|
|
29
|
+
// A converter's result is typed by `CSSConverter`, so an object is a record.
|
|
30
|
+
const isValues = (value) => typeof value === "object" && value !== null;
|
|
31
|
+
/**
|
|
32
|
+
* The custom property of a token named `name` for a key of its
|
|
33
|
+
* {@link CSSValues}.
|
|
34
|
+
*/
|
|
35
|
+
const propertyName = (name, suffix) => suffix === "" ? `--${name}` : `--${name}-${suffix}`;
|
|
36
|
+
/**
|
|
37
|
+
* Construct an {@link CSSPropertiesLibrary} from a {@link (Library:namespace).Library}.
|
|
38
|
+
*
|
|
39
|
+
* @remarks
|
|
40
|
+
* Pass the same `converters` given to {@link toCSS} to leave out the tokens it does
|
|
41
|
+
* not write (a custom type whose converter is `false`). They are still in the
|
|
42
|
+
* {@link CSSPropertiesLibrary} type, but missing at runtime.
|
|
43
|
+
*
|
|
44
|
+
* A token whose type has a converter in `converters` has a property for each
|
|
45
|
+
* key of the {@link CSSValues} it returns, so this reads the token's value to
|
|
46
|
+
* call it. Its own property is `var` and `property`, as for any token, and
|
|
47
|
+
* the one for `hover` is at `hover`, so a converter's keys can't be `var` or
|
|
48
|
+
* `property`.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* const properties = toProperties(library, {
|
|
53
|
+
* converters: {
|
|
54
|
+
* states: (value: States) => ({
|
|
55
|
+
* "": convert("color", value.rest),
|
|
56
|
+
* hover: convert("color", value.hover),
|
|
57
|
+
* }),
|
|
58
|
+
* },
|
|
59
|
+
* });
|
|
60
|
+
* properties.fill.var; // "var(--fill)"
|
|
61
|
+
* properties.fill.hover.var; // "var(--fill-hover)"
|
|
62
|
+
* ```
|
|
63
|
+
*
|
|
10
64
|
* @public
|
|
11
65
|
*/
|
|
12
|
-
export function toProperties(library) {
|
|
66
|
+
export function toProperties(library, options = {}) {
|
|
67
|
+
const getName = options.name ?? defaultName;
|
|
68
|
+
const converters = options.converters ?? {};
|
|
13
69
|
const recurse = (section, properties) => {
|
|
14
70
|
for (const key in section) {
|
|
15
71
|
const sectionValue = section[key];
|
|
16
72
|
if (isToken(sectionValue)) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
73
|
+
const converter = converters[sectionValue.$type];
|
|
74
|
+
// `toCSS` doesn't write a token whose type is `false`.
|
|
75
|
+
if (converter === false) {
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
78
|
+
const tokenName = getName(sectionValue);
|
|
79
|
+
const values = valuesOf(converter?.(sectionValue.$value, sectionValue) ?? "");
|
|
80
|
+
const propertyValues = {};
|
|
81
|
+
for (const suffix of Object.keys(values)) {
|
|
82
|
+
if (suffix === "var" || suffix === "property") {
|
|
83
|
+
throw new Error(`The converter of '${sectionValue.$type}' returns a value for '${suffix}' for token '${sectionValue.name}', which is the name of a field of its properties.`);
|
|
84
|
+
}
|
|
85
|
+
const name = propertyName(tokenName, suffix);
|
|
86
|
+
propertyValues[suffix] = Object.freeze({
|
|
87
|
+
var: `var(${name})`,
|
|
88
|
+
property: name,
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
const { "": own, ...others } = propertyValues;
|
|
23
92
|
Reflect.defineProperty(properties, key, {
|
|
24
|
-
value:
|
|
93
|
+
value: Object.freeze({ ...own, ...others }),
|
|
25
94
|
enumerable: true,
|
|
26
95
|
});
|
|
27
96
|
}
|
|
@@ -37,37 +106,88 @@ export function toProperties(library) {
|
|
|
37
106
|
};
|
|
38
107
|
const properties = {};
|
|
39
108
|
recurse(library.tokens, properties);
|
|
40
|
-
return properties;
|
|
109
|
+
return Object.freeze(properties);
|
|
41
110
|
}
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
};
|
|
45
|
-
const recurseToCss = (librarySection) => {
|
|
111
|
+
const standardTypes = new Set(Object.values(DesignToken.Type));
|
|
112
|
+
const recurseToCss = (librarySection, customConverters, getName) => {
|
|
46
113
|
let result = "";
|
|
47
114
|
for (const key in librarySection) {
|
|
48
115
|
const tokenOrGroup = librarySection[key];
|
|
49
116
|
if (isToken(tokenOrGroup)) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
117
|
+
const { $type: type, name } = tokenOrGroup;
|
|
118
|
+
let value = tokenOrGroup.$value;
|
|
119
|
+
if (Reflect.has(customConverters, type)) {
|
|
120
|
+
const converter = customConverters[type];
|
|
121
|
+
if (converter === false) {
|
|
122
|
+
continue;
|
|
123
|
+
}
|
|
124
|
+
value = converter(value, tokenOrGroup);
|
|
125
|
+
}
|
|
126
|
+
else if (Reflect.has(TokenConverters, type)) {
|
|
127
|
+
value = Reflect.get(TokenConverters, type)(value);
|
|
128
|
+
}
|
|
129
|
+
else if (!standardTypes.has(type)) {
|
|
130
|
+
throw new Error(`No CSS converter provided for custom type '${type}' of token '${name}'.`);
|
|
131
|
+
}
|
|
132
|
+
const tokenName = getName(tokenOrGroup);
|
|
133
|
+
for (const [suffix, declared] of Object.entries(valuesOf(value))) {
|
|
134
|
+
result += `${propertyName(tokenName, suffix)}:${declared};`;
|
|
54
135
|
}
|
|
55
|
-
result += `--${tokenOrGroup.name}:${value};`;
|
|
56
136
|
}
|
|
57
137
|
else {
|
|
58
|
-
result
|
|
138
|
+
result += recurseToCss(tokenOrGroup, customConverters, getName);
|
|
59
139
|
}
|
|
60
140
|
}
|
|
61
141
|
return result;
|
|
62
142
|
};
|
|
63
|
-
const
|
|
64
|
-
return value.
|
|
143
|
+
const dimensionConverter = (value) => {
|
|
144
|
+
return `${value.value}${value.unit}`;
|
|
145
|
+
};
|
|
146
|
+
const durationConverter = (value) => {
|
|
147
|
+
return `${value.value}${value.unit}`;
|
|
148
|
+
};
|
|
149
|
+
const percent = (component) => {
|
|
150
|
+
return component === "none" ? "none" : `${component}%`;
|
|
151
|
+
};
|
|
152
|
+
const hexByte = (component) => {
|
|
153
|
+
const byte = Math.min(255, Math.max(0, Math.round(component * 255)));
|
|
154
|
+
return byte.toString(16).padStart(2, "0");
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* Convert a color to CSS. An sRGB color becomes hex, and the other color
|
|
158
|
+
* spaces become the CSS color function for the space.
|
|
159
|
+
*/
|
|
160
|
+
const colorConverter = (value) => {
|
|
161
|
+
const alpha = value.alpha ?? 1;
|
|
162
|
+
const components = value.components;
|
|
163
|
+
const slash = alpha === 1 ? "" : ` / ${alpha}`;
|
|
164
|
+
const [a, b, c] = components;
|
|
165
|
+
switch (value.colorSpace) {
|
|
166
|
+
case "srgb":
|
|
167
|
+
if (components.every((component) => component !== "none")) {
|
|
168
|
+
return `#${components.map(hexByte).join("")}${alpha === 1 ? "" : hexByte(alpha)}`;
|
|
169
|
+
}
|
|
170
|
+
break;
|
|
171
|
+
case "hsl":
|
|
172
|
+
return `hsl(${a} ${percent(b)} ${percent(c)}${slash})`;
|
|
173
|
+
case "hwb":
|
|
174
|
+
return `hwb(${a} ${percent(b)} ${percent(c)}${slash})`;
|
|
175
|
+
case "lab":
|
|
176
|
+
case "lch":
|
|
177
|
+
case "oklab":
|
|
178
|
+
case "oklch":
|
|
179
|
+
return `${value.colorSpace}(${components.join(" ")}${slash})`;
|
|
180
|
+
}
|
|
181
|
+
return `color(${value.colorSpace} ${components.join(" ")}${slash})`;
|
|
65
182
|
};
|
|
66
183
|
/**
|
|
67
184
|
* Convert a border value to CSS
|
|
68
185
|
*/
|
|
69
186
|
const borderConverter = (value) => {
|
|
70
|
-
return `${value.width} ${value.style} ${value.color}`;
|
|
187
|
+
return `${dimensionConverter(value.width)} ${strokeStyleConverter(value.style)} ${colorConverter(value.color)}`;
|
|
188
|
+
};
|
|
189
|
+
const cubicBezierConverter = (value) => {
|
|
190
|
+
return `cubic-bezier(${value.join(", ")})`;
|
|
71
191
|
};
|
|
72
192
|
const fontFamilyConverter = (value) => {
|
|
73
193
|
return typeof value === "string"
|
|
@@ -82,29 +202,97 @@ const fontFamilyQuoter = (value) => {
|
|
|
82
202
|
}
|
|
83
203
|
return value.includes(" ") ? `"${value}"` : value;
|
|
84
204
|
};
|
|
205
|
+
const fontWeights = {
|
|
206
|
+
thin: 100,
|
|
207
|
+
hairline: 100,
|
|
208
|
+
"extra-light": 200,
|
|
209
|
+
"ultra-light": 200,
|
|
210
|
+
light: 300,
|
|
211
|
+
normal: 400,
|
|
212
|
+
regular: 400,
|
|
213
|
+
book: 400,
|
|
214
|
+
medium: 500,
|
|
215
|
+
"semi-bold": 600,
|
|
216
|
+
"demi-bold": 600,
|
|
217
|
+
bold: 700,
|
|
218
|
+
"extra-bold": 800,
|
|
219
|
+
"ultra-bold": 800,
|
|
220
|
+
black: 900,
|
|
221
|
+
heavy: 900,
|
|
222
|
+
"extra-black": 950,
|
|
223
|
+
"ultra-black": 950,
|
|
224
|
+
};
|
|
225
|
+
const fontWeightConverter = (value) => {
|
|
226
|
+
return String(typeof value === "number" ? value : fontWeights[value]);
|
|
227
|
+
};
|
|
85
228
|
const gradientReducer = (accumulated, value) => {
|
|
86
|
-
|
|
229
|
+
// Round away float artifacts, e.g. 0.07 * 100 is 7.000000000000001.
|
|
230
|
+
const position = Number((value.position * 100).toPrecision(12));
|
|
231
|
+
return accumulated + `${colorConverter(value.color)} ${position}%,`;
|
|
87
232
|
};
|
|
88
233
|
const gradientConverter = (value) => {
|
|
89
234
|
return value.reduce(gradientReducer, "").replace(/,$/, "");
|
|
90
235
|
};
|
|
91
236
|
const shadowConverter = (value) => {
|
|
92
|
-
return
|
|
237
|
+
return (Array.isArray(value) ? value : [value])
|
|
238
|
+
.map((layer) => `${layer.inset ? "inset " : ""}${dimensionConverter(layer.offsetX)} ${dimensionConverter(layer.offsetY)} ${dimensionConverter(layer.blur)} ${dimensionConverter(layer.spread)} ${colorConverter(layer.color)}`)
|
|
239
|
+
.join(", ");
|
|
93
240
|
};
|
|
94
241
|
const strokeStyleConverter = (value) => {
|
|
95
242
|
// CSS doesn't support customizing dashed borders at the time of authoring.
|
|
96
243
|
return typeof value === "string" ? value : "dashed";
|
|
97
244
|
};
|
|
98
245
|
const transitionConverter = (value) => {
|
|
99
|
-
return `${value.duration} ${value.
|
|
246
|
+
return `${durationConverter(value.duration)} ${cubicBezierConverter(value.timingFunction)} ${durationConverter(value.delay)}`;
|
|
247
|
+
};
|
|
248
|
+
/**
|
|
249
|
+
* Convert typography to the CSS `font` shorthand. `letterSpacing` cannot be
|
|
250
|
+
* expressed in the shorthand, so it is omitted.
|
|
251
|
+
*/
|
|
252
|
+
const typographyConverter = (value) => {
|
|
253
|
+
return `${fontWeightConverter(value.fontWeight)} ${dimensionConverter(value.fontSize)}/${value.lineHeight} ${fontFamilyConverter(value.fontFamily)}`;
|
|
100
254
|
};
|
|
101
255
|
const TokenConverters = {
|
|
102
256
|
[DesignToken.Type.Border]: borderConverter,
|
|
103
|
-
[DesignToken.Type.
|
|
257
|
+
[DesignToken.Type.Color]: colorConverter,
|
|
258
|
+
[DesignToken.Type.CubicBezier]: cubicBezierConverter,
|
|
259
|
+
[DesignToken.Type.Dimension]: dimensionConverter,
|
|
260
|
+
[DesignToken.Type.Duration]: durationConverter,
|
|
104
261
|
[DesignToken.Type.FontFamily]: fontFamilyConverter,
|
|
262
|
+
[DesignToken.Type.FontWeight]: fontWeightConverter,
|
|
105
263
|
[DesignToken.Type.Gradient]: gradientConverter,
|
|
106
264
|
[DesignToken.Type.Shadow]: shadowConverter,
|
|
107
265
|
[DesignToken.Type.StrokeStyle]: strokeStyleConverter,
|
|
108
266
|
[DesignToken.Type.Transition]: transitionConverter,
|
|
267
|
+
[DesignToken.Type.Typography]: typographyConverter,
|
|
109
268
|
};
|
|
269
|
+
/**
|
|
270
|
+
* Converts a value of a standard type to CSS, the way {@link toCSS} does for a
|
|
271
|
+
* token of the type, without a converter for the type in `converters`.
|
|
272
|
+
*
|
|
273
|
+
* @remarks
|
|
274
|
+
* A converter for a custom type that has values of standard types uses it for
|
|
275
|
+
* each of them, and a converter for a standard type can use it for what it
|
|
276
|
+
* keeps.
|
|
277
|
+
*
|
|
278
|
+
* @example
|
|
279
|
+
* ```ts
|
|
280
|
+
* toCSS(library, {
|
|
281
|
+
* converters: {
|
|
282
|
+
* elevation: (value) =>
|
|
283
|
+
* `${convert("dimension", value.offset)} ${convert("color", value.color)}`,
|
|
284
|
+
* },
|
|
285
|
+
* });
|
|
286
|
+
* ```
|
|
287
|
+
*
|
|
288
|
+
* @param type - The type, like `"color"`
|
|
289
|
+
* @param value - The value of a token of the type
|
|
290
|
+
* @returns The value as it is written to CSS
|
|
291
|
+
*
|
|
292
|
+
* @public
|
|
293
|
+
*/
|
|
294
|
+
export function convert(type, value) {
|
|
295
|
+
const converter = TokenConverters[type];
|
|
296
|
+
return converter ? converter(value) : String(value);
|
|
297
|
+
}
|
|
110
298
|
//# sourceMappingURL=css-reflector.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css-reflector.js","sourceRoot":"","sources":["../../src/lib/css-reflector.ts"],"names":[],"mappings":"AA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