@tokenami/config 0.0.52 → 0.0.54

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/index.js CHANGED
@@ -22,136 +22,136 @@ var defaultConfig = {
22
22
  disabled: "&:disabled"
23
23
  },
24
24
  properties: {
25
- "accent-color": ["color"],
26
- animation: ["anim"],
27
- "animation-timing-function": ["ease"],
28
- background: ["color", "surface"],
29
- "background-color": ["color"],
30
- "background-image": ["surface"],
31
- "background-position": ["grid"],
32
- "background-position-x": ["grid"],
33
- "background-position-y": ["grid"],
34
- "block-size": ["grid", "size"],
35
- border: ["border"],
36
- "border-block": ["border"],
37
- "border-block-color": ["color"],
38
- "border-block-end": ["border"],
39
- "border-block-end-color": ["color"],
40
- "border-block-end-style": ["line-style"],
41
- "border-block-start": ["border"],
42
- "border-block-start-color": ["color"],
43
- "border-block-start-style": ["line-style"],
44
- "border-block-style": ["line-style"],
45
- "border-bottom": ["border"],
46
- "border-bottom-color": ["color"],
47
- "border-bottom-left-radius": ["radii"],
48
- "border-bottom-right-radius": ["radii"],
49
- "border-bottom-style": ["line-style"],
50
- "border-color": ["color"],
51
- "border-end-end-radius": ["radii"],
52
- "border-end-start-radius": ["radii"],
53
- "border-inline": ["border"],
54
- "border-inline-color": ["color"],
55
- "border-inline-end": ["border"],
56
- "border-inline-end-color": ["color"],
57
- "border-inline-end-style": ["line-style"],
58
- "border-inline-start": ["border"],
59
- "border-inline-start-color": ["color"],
60
- "border-inline-start-style": ["line-style"],
61
- "border-inline-style": ["line-style"],
62
- "border-left": ["border"],
63
- "border-left-color": ["color"],
64
- "border-left-style": ["line-style"],
65
- "border-radius": ["radii"],
66
- "border-right": ["border"],
67
- "border-right-color": ["color"],
68
- "border-right-style": ["line-style"],
69
- "border-start-end-radius": ["radii"],
70
- "border-start-start-radius": ["radii"],
71
- "border-style": ["line-style"],
72
- "border-top": ["border"],
73
- "border-top-color": ["color"],
74
- "border-top-left-radius": ["radii"],
75
- "border-top-right-radius": ["radii"],
76
- "border-top-style": ["line-style"],
77
- bottom: ["grid"],
78
- "box-shadow": ["shadow"],
79
- "caret-color": ["color"],
80
- color: ["color"],
81
- "column-gap": ["grid"],
82
- "column-rule-color": ["color"],
83
- "column-rule-width": ["grid"],
84
- "column-width": ["grid", "size"],
85
- fill: ["color"],
86
- "flex-basis": ["grid", "size"],
87
- "font-family": ["font"],
88
- "font-size": ["font-size"],
89
- "font-weight": ["weight"],
90
- gap: ["grid"],
91
- height: ["grid", "size"],
92
- "inline-size": ["grid", "size"],
93
- inset: ["grid"],
94
- "inset-block": ["grid"],
95
- "inset-block-end": ["grid"],
96
- "inset-block-start": ["grid"],
97
- "inset-inline": ["grid"],
98
- "inset-inline-end": ["grid"],
99
- "inset-inline-start": ["grid"],
100
- left: ["grid"],
101
- "letter-spacing": ["tracking"],
102
- "line-height": ["leading"],
103
- margin: ["grid"],
104
- "margin-block": ["grid"],
105
- "margin-block-end": ["grid"],
106
- "margin-block-start": ["grid"],
107
- "margin-bottom": ["grid"],
108
- "margin-inline": ["grid"],
109
- "margin-inline-end": ["grid"],
110
- "margin-inline-start": ["grid"],
111
- "margin-left": ["grid"],
112
- "margin-right": ["grid"],
113
- "margin-top": ["grid"],
114
- "max-block-size": ["grid", "size"],
115
- "max-height": ["grid", "size"],
116
- "max-inline-size": ["grid", "size"],
117
- "max-width": ["grid", "size"],
118
- "min-block-size": ["grid", "size"],
119
- "min-height": ["grid", "size"],
120
- "min-inline-size": ["grid", "size"],
121
- "min-width": ["grid", "size"],
122
- opacity: ["alpha"],
123
- "outline-color": ["color"],
124
- padding: ["grid"],
125
- "padding-block": ["grid"],
126
- "padding-block-end": ["grid"],
127
- "padding-block-start": ["grid"],
128
- "padding-bottom": ["grid"],
129
- "padding-inline": ["grid"],
130
- "padding-inline-end": ["grid"],
131
- "padding-inline-start": ["grid"],
132
- "padding-left": ["grid"],
133
- "padding-right": ["grid"],
134
- "padding-top": ["grid"],
135
- right: ["grid"],
136
- "row-gap": ["grid"],
137
- "scroll-margin": ["grid"],
138
- "scroll-margin-bottom": ["grid"],
139
- "scroll-margin-left": ["grid"],
140
- "scroll-margin-right": ["grid"],
141
- "scroll-margin-top": ["grid"],
142
- "scroll-padding": ["grid"],
143
- "scroll-padding-bottom": ["grid"],
144
- "scroll-padding-left": ["grid"],
145
- "scroll-padding-right": ["grid"],
146
- "scroll-padding-top": ["grid"],
147
- stroke: ["color"],
148
- "text-decoration-color": ["color"],
149
- "text-shadow": ["shadow"],
150
- top: ["grid"],
151
- transition: ["transition"],
152
- "transition-timing-function": ["ease"],
153
- width: ["grid", "size"],
154
- "z-index": ["z"]
25
+ "--accent-color": ["color"],
26
+ "--animation": ["anim"],
27
+ "--animation-timing-function": ["ease"],
28
+ "--background": ["color", "surface"],
29
+ "--background-color": ["color"],
30
+ "--background-image": ["surface"],
31
+ "--background-position": ["grid"],
32
+ "--background-position-x": ["grid"],
33
+ "--background-position-y": ["grid"],
34
+ "--block-size": ["grid", "size"],
35
+ "--border": ["border"],
36
+ "--border-block": ["border"],
37
+ "--border-block-color": ["color"],
38
+ "--border-block-end": ["border"],
39
+ "--border-block-end-color": ["color"],
40
+ "--border-block-end-style": ["line-style"],
41
+ "--border-block-start": ["border"],
42
+ "--border-block-start-color": ["color"],
43
+ "--border-block-start-style": ["line-style"],
44
+ "--border-block-style": ["line-style"],
45
+ "--border-bottom": ["border"],
46
+ "--border-bottom-color": ["color"],
47
+ "--border-bottom-left-radius": ["radii"],
48
+ "--border-bottom-right-radius": ["radii"],
49
+ "--border-bottom-style": ["line-style"],
50
+ "--border-color": ["color"],
51
+ "--border-end-end-radius": ["radii"],
52
+ "--border-end-start-radius": ["radii"],
53
+ "--border-inline": ["border"],
54
+ "--border-inline-color": ["color"],
55
+ "--border-inline-end": ["border"],
56
+ "--border-inline-end-color": ["color"],
57
+ "--border-inline-end-style": ["line-style"],
58
+ "--border-inline-start": ["border"],
59
+ "--border-inline-start-color": ["color"],
60
+ "--border-inline-start-style": ["line-style"],
61
+ "--border-inline-style": ["line-style"],
62
+ "--border-left": ["border"],
63
+ "--border-left-color": ["color"],
64
+ "--border-left-style": ["line-style"],
65
+ "--border-radius": ["radii"],
66
+ "--border-right": ["border"],
67
+ "--border-right-color": ["color"],
68
+ "--border-right-style": ["line-style"],
69
+ "--border-start-end-radius": ["radii"],
70
+ "--border-start-start-radius": ["radii"],
71
+ "--border-style": ["line-style"],
72
+ "--border-top": ["border"],
73
+ "--border-top-color": ["color"],
74
+ "--border-top-left-radius": ["radii"],
75
+ "--border-top-right-radius": ["radii"],
76
+ "--border-top-style": ["line-style"],
77
+ "--bottom": ["grid"],
78
+ "--box-shadow": ["shadow"],
79
+ "--caret-color": ["color"],
80
+ "--color": ["color"],
81
+ "--column-gap": ["grid"],
82
+ "--column-rule-color": ["color"],
83
+ "--column-rule-width": ["grid"],
84
+ "--column-width": ["grid", "size"],
85
+ "--fill": ["color"],
86
+ "--flex-basis": ["grid", "size"],
87
+ "--font-family": ["font"],
88
+ "--font-size": ["font-size"],
89
+ "--font-weight": ["weight"],
90
+ "--gap": ["grid"],
91
+ "--height": ["grid", "size"],
92
+ "--inline-size": ["grid", "size"],
93
+ "--inset": ["grid"],
94
+ "--inset-block": ["grid"],
95
+ "--inset-block-end": ["grid"],
96
+ "--inset-block-start": ["grid"],
97
+ "--inset-inline": ["grid"],
98
+ "--inset-inline-end": ["grid"],
99
+ "--inset-inline-start": ["grid"],
100
+ "--left": ["grid"],
101
+ "--letter-spacing": ["tracking"],
102
+ "--line-height": ["leading"],
103
+ "--margin": ["grid"],
104
+ "--margin-block": ["grid"],
105
+ "--margin-block-end": ["grid"],
106
+ "--margin-block-start": ["grid"],
107
+ "--margin-bottom": ["grid"],
108
+ "--margin-inline": ["grid"],
109
+ "--margin-inline-end": ["grid"],
110
+ "--margin-inline-start": ["grid"],
111
+ "--margin-left": ["grid"],
112
+ "--margin-right": ["grid"],
113
+ "--margin-top": ["grid"],
114
+ "--max-block-size": ["grid", "size"],
115
+ "--max-height": ["grid", "size"],
116
+ "--max-inline-size": ["grid", "size"],
117
+ "--max-width": ["grid", "size"],
118
+ "--min-block-size": ["grid", "size"],
119
+ "--min-height": ["grid", "size"],
120
+ "--min-inline-size": ["grid", "size"],
121
+ "--min-width": ["grid", "size"],
122
+ "--opacity": ["alpha"],
123
+ "--outline-color": ["color"],
124
+ "--padding": ["grid"],
125
+ "--padding-block": ["grid"],
126
+ "--padding-block-end": ["grid"],
127
+ "--padding-block-start": ["grid"],
128
+ "--padding-bottom": ["grid"],
129
+ "--padding-inline": ["grid"],
130
+ "--padding-inline-end": ["grid"],
131
+ "--padding-inline-start": ["grid"],
132
+ "--padding-left": ["grid"],
133
+ "--padding-right": ["grid"],
134
+ "--padding-top": ["grid"],
135
+ "--right": ["grid"],
136
+ "--row-gap": ["grid"],
137
+ "--scroll-margin": ["grid"],
138
+ "--scroll-margin-bottom": ["grid"],
139
+ "--scroll-margin-left": ["grid"],
140
+ "--scroll-margin-right": ["grid"],
141
+ "--scroll-margin-top": ["grid"],
142
+ "--scroll-padding": ["grid"],
143
+ "--scroll-padding-bottom": ["grid"],
144
+ "--scroll-padding-left": ["grid"],
145
+ "--scroll-padding-right": ["grid"],
146
+ "--scroll-padding-top": ["grid"],
147
+ "--stroke": ["color"],
148
+ "--text-decoration-color": ["color"],
149
+ "--text-shadow": ["shadow"],
150
+ "--top": ["grid"],
151
+ "--transition": ["transition"],
152
+ "--transition-timing-function": ["ease"],
153
+ "--width": ["grid", "size"],
154
+ "--z-index": ["z"]
155
155
  }
156
156
  };
157
157
  function createConfig(obj) {
@@ -171,14 +171,16 @@ var gridValueRegex = /^\d+/;
171
171
  var GridValue = {
172
172
  safeParse: (input) => validate(gridValueRegex, input)
173
173
  };
174
- var charClass = `A-Za-z0-9!#$%&()*+,./:;<=>?@[\\]^_{|}~`;
175
- var tokenPropertyRegex = new RegExp(`(?<!var\\()--[${charClass}]([${charClass}-]+)?`);
174
+ var tokenPropertyRegex = /(?<!var\()--(?:[\w-]+|\{[^\{\}]*\})+/g;
176
175
  var TokenProperty = {
177
176
  safeParse: (input) => validate(tokenPropertyRegex, input)
178
177
  };
179
178
  function tokenProperty(name) {
180
179
  return `--${name}`;
181
180
  }
181
+ function parsedTokenProperty(name) {
182
+ return parseProperty(tokenProperty(name));
183
+ }
182
184
  var variantPropertyRegex = /(?<!var\()--((\w)([\w-]+)_([\w-]+))/;
183
185
  var VariantProperty = {
184
186
  safeParse: (input) => validate(variantPropertyRegex, input)
@@ -186,6 +188,9 @@ var VariantProperty = {
186
188
  function variantProperty(variant, name) {
187
189
  return `--${variant}_${name}`;
188
190
  }
191
+ function parsedVariantProperty(variant, name) {
192
+ return parseProperty(variantProperty(variant, name));
193
+ }
189
194
  var tokenValueRegex = /var\((--([\w-]+)_([\w-]+))\)/;
190
195
  var TokenValue = {
191
196
  safeParse: (input) => validate(tokenValueRegex, input)
@@ -216,24 +221,36 @@ function getTokenPropertyName(property) {
216
221
  const propertyPrefix = tokenProperty("");
217
222
  return property.replace(propertyPrefix, "");
218
223
  }
224
+ var propertySplitRegex = /_(?![^{}]*\])/;
219
225
  function getTokenPropertySplit(property) {
220
226
  const name = getTokenPropertyName(property);
221
- const [alias, ...variants] = name.split("_").reverse();
227
+ const [alias, ...variants] = name.split(propertySplitRegex).reverse();
222
228
  return { alias, variants: variants.reverse() };
223
229
  }
224
230
  function getTokenPropertyParts(tokenProperty2, config) {
225
- var _a, _b, _c;
231
+ var _a;
226
232
  const { alias, variants } = getTokenPropertySplit(tokenProperty2);
227
233
  const [firstVariant, secondVariant] = variants;
228
- const firstSelector = ((_a = config.selectors) == null ? void 0 : _a[firstVariant]) && firstVariant;
229
- const secondSelector = ((_b = config.selectors) == null ? void 0 : _b[secondVariant]) && secondVariant;
230
- const responsive = ((_c = config.responsive) == null ? void 0 : _c[firstVariant]) && firstVariant;
234
+ const firstSelector = getValidSelector(firstVariant, config);
235
+ const secondSelector = getValidSelector(secondVariant, config);
236
+ const responsive = ((_a = config.responsive) == null ? void 0 : _a[firstVariant]) && firstVariant;
231
237
  const selector = firstSelector || secondSelector;
232
238
  const validVariant = [responsive, selector].filter(Boolean).join("_");
233
- if (firstVariant && variantProperty(validVariant, alias) !== tokenProperty2)
239
+ const variantProp = variantProperty(validVariant, alias);
240
+ if (firstVariant && variantProp !== tokenProperty2)
234
241
  return null;
235
242
  return { alias, responsive, selector, variant: validVariant };
236
243
  }
244
+ function getValidSelector(selector, config) {
245
+ var _a;
246
+ if (!selector)
247
+ return;
248
+ return (getArbitrarySelector(selector) || ((_a = config.selectors) == null ? void 0 : _a[selector])) && selector;
249
+ }
250
+ function getArbitrarySelector(selector) {
251
+ const [, arbitrarySelector] = (selector == null ? void 0 : selector.match(/^{(.+)}$/)) || [];
252
+ return arbitrarySelector ? decodeColon(arbitrarySelector) : void 0;
253
+ }
237
254
  function getTokenValueParts(tokenValue2) {
238
255
  const [, property, themeKey, token] = tokenValue2.split(tokenValueRegex);
239
256
  return { property, themeKey, token };
@@ -241,240 +258,92 @@ function getTokenValueParts(tokenValue2) {
241
258
  function getCSSPropertiesForAlias(alias, aliases) {
242
259
  return (aliases == null ? void 0 : aliases[alias]) || [alias];
243
260
  }
261
+ var escapeSpecialCharsRegex = /[&#.:;>~*[\]=,"'()+{}]/g;
262
+ function parseProperty(str, options) {
263
+ const { escapeSpecialChars = true } = options || {};
264
+ const noColon = encodeColon(str);
265
+ if (!escapeSpecialChars)
266
+ return noColon;
267
+ return noColon.replace(escapeSpecialCharsRegex, (match) => `\\${match}`);
268
+ }
269
+ var encodeColon = (str) => str.replace(/:/g, ";");
270
+ var decodeColon = (str) => str.replace(/;/g, ":");
244
271
 
245
272
  // src/shorthands.ts
246
- var mapShorthandToLonghands = {
247
- all: [],
248
- animation: [
249
- "animation-name",
250
- "animation-duration",
251
- "animation-timing-function",
252
- "animation-delay",
253
- "animation-iteration-count",
254
- "animation-direction",
255
- "animation-fill-mode",
256
- "animation-play-state",
257
- "animation-timeline"
258
- ],
259
- background: [
260
- "background-attachment",
261
- "background-clip",
262
- "background-color",
263
- "background-image",
264
- "background-position",
265
- "background-repeat",
266
- "background-size"
267
- ],
268
- "background-position": ["background-position-x", "background-position-y"],
269
- border: [
270
- "border-top",
271
- "border-right",
272
- "border-bottom",
273
- "border-left",
274
- "border-color",
275
- "border-style",
276
- "border-width",
277
- "border-image",
278
- "border-block",
279
- "border-inline"
280
- ],
281
- "border-top": ["border-top-width", "border-top-style", "border-top-color"],
282
- "border-right": ["border-right-width", "border-right-style", "border-right-color"],
283
- "border-bottom": ["border-bottom-width", "border-bottom-style", "border-bottom-color"],
284
- "border-left": ["border-left-width", "border-left-style", "border-left-color"],
285
- "border-color": [
286
- "border-top-color",
287
- "border-right-color",
288
- "border-bottom-color",
289
- "border-left-color"
290
- ],
291
- "border-style": [
292
- "border-top-style",
293
- "border-right-style",
294
- "border-bottom-style",
295
- "border-left-style"
296
- ],
297
- "border-width": [
298
- "border-top-width",
299
- "border-right-width",
300
- "border-bottom-width",
301
- "border-left-width"
302
- ],
303
- "border-image": [
304
- "border-image-source",
305
- "border-image-slice",
306
- "border-image-width",
307
- "border-image-outset",
308
- "border-image-repeat"
309
- ],
310
- "border-radius": [
311
- "border-top-left-radius",
312
- "border-top-right-radius",
313
- "border-bottom-right-radius",
314
- "border-bottom-left-radius"
315
- ],
316
- "border-block": [
317
- "border-block-width",
318
- "border-block-style",
319
- "border-block-color",
320
- "border-block-start",
321
- "border-block-end"
322
- ],
323
- "border-block-width": ["border-block-start-width", "border-block-end-width"],
324
- "border-block-style": ["border-block-start-style", "border-block-end-style"],
325
- "border-block-color": ["border-block-start-color", "border-block-end-color"],
326
- "border-block-start": [
327
- "border-block-start-width",
328
- "border-block-start-style",
329
- "border-block-start-color"
330
- ],
331
- "border-block-end": [
332
- "border-block-end-width",
333
- "border-block-end-style",
334
- "border-block-end-color"
335
- ],
336
- "border-inline": [
337
- "border-inline-width",
338
- "border-inline-style",
339
- "border-inline-color",
340
- "border-inline-start",
341
- "border-inline-end"
342
- ],
343
- "border-inline-width": ["border-inline-start-width", "border-inline-end-width"],
344
- "border-inline-style": ["border-inline-start-style", "border-inline-end-style"],
345
- "border-inline-color": ["border-inline-start-color", "border-inline-end-color"],
346
- "border-inline-start": [
347
- "border-inline-start-width",
348
- "border-inline-start-style",
349
- "border-inline-start-color"
350
- ],
351
- "border-inline-end": [
352
- "border-inline-end-width",
353
- "border-inline-end-style",
354
- "border-inline-end-color"
355
- ],
356
- "column-rule": ["column-rule-width", "column-rule-style", "column-rule-color"],
357
- columns: ["column-width", "column-count"],
358
- container: ["container-name", "container-type"],
359
- "contain-intrinsic-size": ["contain-intrinsic-width", "contain-intrinsic-height"],
360
- flex: ["flex-grow", "flex-shrink", "flex-basis"],
361
- "flex-flow": ["flex-direction", "flex-wrap"],
362
- font: [
363
- "font-style",
364
- "font-variant",
365
- "font-weight",
366
- "font-stretch",
367
- "font-size",
368
- "line-height",
369
- "font-family"
370
- ],
371
- "font-variant": [
372
- "font-variant-alternates",
373
- "font-variant-caps",
374
- "font-variant-east-asian",
375
- "font-variant-emoji",
376
- "font-variant-ligatures",
377
- "font-variant-numeric",
378
- "font-variant-position"
379
- ],
380
- gap: ["row-gap", "column-gap"],
381
- grid: [
382
- "grid-auto-columns",
383
- "grid-auto-flow",
384
- "grid-auto-rows",
385
- "grid-template-areas",
386
- "grid-template-columns",
387
- "grid-template-rows"
388
- ],
389
- "grid-area": ["grid-row-start", "grid-column-start", "grid-row-end", "grid-column-end"],
390
- "grid-column": ["grid-column-start", "grid-column-end"],
391
- "grid-row": ["grid-row-start", "grid-row-end"],
392
- "grid-template": ["grid-template-rows", "grid-template-columns", "grid-template-areas"],
393
- inset: ["top", "right", "bottom", "left"],
394
- "list-style": ["list-style-type", "list-style-position", "list-style-image"],
395
- "inset-block": ["inset-block-start", "inset-block-end"],
396
- "inset-inline": ["inset-inline-start", "inset-inline-end"],
397
- margin: ["margin-top", "margin-right", "margin-bottom", "margin-left"],
398
- "margin-block": ["margin-block-start", "margin-block-end"],
399
- "margin-inline": ["margin-inline-start", "margin-inline-end"],
400
- mask: [
401
- "mask-image",
402
- "mask-mode",
403
- "mask-position",
404
- "mask-size",
405
- "mask-repeat",
406
- "mask-origin",
407
- "mask-clip",
408
- "mask-composite",
409
- "mask-type"
410
- ],
411
- "mask-border": [
412
- "mask-border-mode",
413
- "mask-border-outset",
414
- "mask-border-repeat",
415
- "mask-border-slice",
416
- "mask-border-source",
417
- "mask-border-width"
418
- ],
419
- offset: ["offset-position", "offset-path", "offset-distance", "offset-anchor", "offset-rotate"],
420
- outline: ["outline-color", "outline-style", "outline-width"],
421
- overflow: ["overflow-x", "overflow-y"],
422
- "overscroll-behavior": ["overscroll-behavior-x", "overscroll-behavior-y"],
423
- padding: ["padding-top", "padding-right", "padding-bottom", "padding-left"],
424
- "padding-block": ["padding-block-start", "padding-block-end"],
425
- "padding-inline": ["padding-inline-start", "padding-inline-end"],
426
- "place-content": ["align-content", "justify-content"],
427
- "place-items": ["align-items", "justify-items"],
428
- "place-self": ["align-self", "justify-self"],
429
- "scroll-margin": [
430
- "scroll-margin-top",
431
- "scroll-margin-right",
432
- "scroll-margin-bottom",
433
- "scroll-margin-left"
434
- ],
435
- "scroll-margin-block": ["scroll-margin-block-start", "scroll-margin-block-end"],
436
- "scroll-margin-inline": ["scroll-margin-inline-start", "scroll-margin-inline-end"],
437
- "scroll-padding": [
438
- "scroll-padding-top",
439
- "scroll-padding-right",
440
- "scroll-padding-bottom",
441
- "scroll-padding-left"
442
- ],
443
- "scroll-padding-block": ["scroll-padding-block-start", "scroll-padding-block-end"],
444
- "scroll-padding-inline": ["scroll-padding-inline-start", "scroll-padding-inline-end"],
445
- "scroll-timeline": ["scroll-timeline-name", "scroll-timeline-axis"],
446
- "text-decoration": [
447
- "text-decoration-line",
448
- "text-decoration-style",
449
- "text-decoration-color",
450
- "text-decoration-thickness"
451
- ],
452
- "text-emphasis": ["text-emphasis-style", "text-emphasis-color"],
453
- transition: [
454
- "transition-delay",
455
- "transition-duration",
456
- "transition-property",
457
- "transition-timing-function"
458
- ]
459
- };
460
- export {
461
- ArbitraryValue,
462
- GridProperty,
463
- GridValue,
464
- TokenProperty,
465
- TokenValue,
466
- VariantProperty,
467
- arbitraryValue,
468
- createConfig,
469
- defaultConfig,
470
- getCSSPropertiesForAlias,
471
- getTokenPropertyName,
472
- getTokenPropertyParts,
473
- getTokenPropertySplit,
474
- getTokenValueParts,
475
- gridProperty,
476
- mapShorthandToLonghands,
477
- tokenProperty,
478
- tokenValue,
479
- variantProperty
480
- };
273
+ var shorthandsToLonghands = [
274
+ ["all", []],
275
+ ["animation", ["&-name", "&-duration", "&-timing-function", "&-delay", "&-iteration-count", "&-direction", "&-fill-mode", "&-play-state", "&-timeline"]],
276
+ ["background", ["&-attachment", "&-clip", "&-color", "&-image", "&-position", "&-repeat", "&-size"]],
277
+ ["background-position", ["&-x", "&-y"]],
278
+ ["border", ["&-top", "&-right", "&-bottom", "&-left", "&-color", "&-style", "&-width", "&-image", "&-block", "&-inline"]],
279
+ ["border-top", ["&-width", "&-style", "&-color"]],
280
+ ["border-right", ["&-width", "&-style", "&-color"]],
281
+ ["border-bottom", ["&-width", "&-style", "&-color"]],
282
+ ["border-left", ["&-width", "&-style", "&-color"]],
283
+ ["border-color", ["border-top-color", "border-right-color", "border-bottom-color", "border-left-color"]],
284
+ ["border-style", ["border-top-style", "border-right-style", "border-bottom-style", "border-left-style"]],
285
+ ["border-width", ["border-top-width", "border-right-width", "border-bottom-width", "border-left-width"]],
286
+ ["border-image", ["&-source", "&-slice", "&-width", "&-outset", "&-repeat"]],
287
+ ["border-radius", ["border-top-left-radius", "border-top-right-radius", "border-bottom-right-radius", "border-bottom-left-radius"]],
288
+ ["border-block", ["&-width", "&-style", "&-color", "&-start", "&-end"]],
289
+ ["border-block-width", ["border-block-start-width", "border-block-end-width"]],
290
+ ["border-block-style", ["border-block-start-style", "border-block-end-style"]],
291
+ ["border-block-color", ["border-block-start-color", "border-block-end-color"]],
292
+ ["border-block-start", ["&-width", "&-style", "&-color"]],
293
+ ["border-block-end", ["&-width", "&-style", "&-color"]],
294
+ ["border-inline", ["&-width", "&-style", "&-color", "&-start", "&-end"]],
295
+ ["border-inline-width", ["border-inline-start-width", "border-inline-end-width"]],
296
+ ["border-inline-style", ["border-inline-start-style", "border-inline-end-style"]],
297
+ ["border-inline-color", ["border-inline-start-color", "border-inline-end-color"]],
298
+ ["border-inline-start", ["&-width", "&-style", "&-color"]],
299
+ ["border-inline-end", ["&-width", "&-style", "&-color"]],
300
+ ["column-rule", ["&-width", "&-style", "&-color"]],
301
+ ["columns", ["column-width", "column-count"]],
302
+ ["container", ["&-name", "&-type"]],
303
+ ["contain-intrinsic-size", ["contain-intrinsic-width", "contain-intrinsic-height"]],
304
+ ["flex", ["&-grow", "&-shrink", "&-basis"]],
305
+ ["flex-flow", ["flex-direction", "flex-wrap"]],
306
+ ["font", ["&-style", "&-variant", "&-weight", "&-stretch", "&-size", "line-height", "&-family"]],
307
+ ["font-variant", ["&-alternates", "&-caps", "&-east-asian", "&-emoji", "&-ligatures", "&-numeric", "&-position"]],
308
+ ["gap", ["row-gap", "column-gap"]],
309
+ ["grid", ["&-auto-columns", "&-auto-flow", "&-auto-rows", "&-template-areas", "&-template-columns", "&-template-rows"]],
310
+ ["grid-area", ["grid-row-start", "grid-column-start", "grid-row-end", "grid-column-end"]],
311
+ ["grid-column", ["&-start", "&-end"]],
312
+ ["grid-row", ["&-start", "&-end"]],
313
+ ["grid-template", ["&-rows", "&-columns", "&-areas"]],
314
+ ["inset", ["top", "right", "bottom", "left"]],
315
+ ["list-style", ["&-type", "&-position", "&-image"]],
316
+ ["inset-block", ["&-start", "&-end"]],
317
+ ["inset-inline", ["&-start", "&-end"]],
318
+ ["margin", ["&-top", "&-right", "&-bottom", "&-left"]],
319
+ ["margin-block", ["&-start", "&-end"]],
320
+ ["margin-inline", ["&-start", "&-end"]],
321
+ ["mask", ["&-image", "&-mode", "&-position", "&-size", "&-repeat", "&-origin", "&-clip", "&-composite", "&-type"]],
322
+ ["mask-border", ["&-mode", "&-outset", "&-repeat", "&-slice", "&-source", "&-width"]],
323
+ ["offset", ["&-position", "&-path", "&-distance", "&-anchor", "&-rotate"]],
324
+ ["outline", ["&-color", "&-style", "&-width"]],
325
+ ["overflow", ["&-x", "&-y"]],
326
+ ["overscroll-behavior", ["&-x", "&-y"]],
327
+ ["padding", ["&-top", "&-right", "&-bottom", "&-left"]],
328
+ ["padding-block", ["&-start", "&-end"]],
329
+ ["padding-inline", ["&-start", "&-end"]],
330
+ ["place-content", ["align-content", "justify-content"]],
331
+ ["place-items", ["align-items", "justify-items"]],
332
+ ["place-self", ["align-self", "justify-self"]],
333
+ ["scroll-margin", ["&-top", "&-right", "&-bottom", "&-left"]],
334
+ ["scroll-margin-block", ["&-start", "&-end"]],
335
+ ["scroll-margin-inline", ["&-start", "&-end"]],
336
+ ["scroll-padding", ["&-top", "&-right", "&-bottom", "&-left"]],
337
+ ["scroll-padding-block", ["&-start", "&-end"]],
338
+ ["scroll-padding-inline", ["&-start", "&-end"]],
339
+ ["scroll-timeline", ["&-name", "&-axis"]],
340
+ ["text-decoration", ["&-line", "&-style", "&-color", "&-thickness"]],
341
+ ["text-emphasis", ["&-style", "&-color"]],
342
+ ["transition", ["&-delay", "&-duration", "&-property", "&-timing-function"]]
343
+ ];
344
+ var replacedAmpersands = shorthandsToLonghands.map(
345
+ ([key, values]) => [key, values.map((value) => value.replace("&", key))]
346
+ );
347
+ var mapShorthandToLonghands = new Map(replacedAmpersands);
348
+
349
+ export { ArbitraryValue, GridProperty, GridValue, TokenProperty, TokenValue, VariantProperty, arbitraryValue, createConfig, defaultConfig, getArbitrarySelector, getCSSPropertiesForAlias, getTokenPropertyName, getTokenPropertyParts, getTokenPropertySplit, getTokenValueParts, gridProperty, mapShorthandToLonghands, parseProperty, parsedTokenProperty, parsedVariantProperty, tokenProperty, tokenValue, variantProperty };