@bamboocss/eslint-plugin 1.12.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.
@@ -0,0 +1,4433 @@
1
+ import "@bamboocss/types";
2
+ import { findConfig, loadConfig, mergeConfigs } from "@bamboocss/config";
3
+ import { parseJson, stringifyJson } from "@bamboocss/shared";
4
+ import { Generator } from "@bamboocss/generator";
5
+ import { resolveTsPathPattern } from "@bamboocss/config/ts-path";
6
+ import micromatch from "micromatch";
7
+ import path from "path";
8
+ import { createSyncFn, runAsWorker } from "synckit";
9
+ import { ESLintUtils } from "@typescript-eslint/utils";
10
+ import { join } from "node:path";
11
+ import { fileURLToPath } from "node:url";
12
+
13
+ //#region \0rolldown/runtime.js
14
+ var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
15
+ var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
16
+
17
+ //#endregion
18
+ //#region tests/fixtures/recipes.ts
19
+ var recipes;
20
+ var init_recipes = __esmMin((() => {
21
+ recipes = {
22
+ buttonStyle: {
23
+ base: {
24
+ _hover: {
25
+ backgroundColor: "red.200",
26
+ color: "white",
27
+ fontSize: "3xl"
28
+ },
29
+ alignItems: "center",
30
+ display: "inline-flex",
31
+ justifyContent: "center"
32
+ },
33
+ className: "buttonStyle",
34
+ defaultVariants: {
35
+ size: "md",
36
+ variant: "solid"
37
+ },
38
+ variants: {
39
+ size: {
40
+ md: {
41
+ height: "3rem",
42
+ minWidth: "3rem",
43
+ padding: "0 0.75rem"
44
+ },
45
+ sm: {
46
+ height: "2.5rem",
47
+ minWidth: "2.5rem",
48
+ padding: "0 0.5rem"
49
+ }
50
+ },
51
+ variant: {
52
+ outline: {
53
+ "&[data-disabled]": {
54
+ backgroundColor: "transparent",
55
+ border: "1px solid gray",
56
+ color: "gray"
57
+ },
58
+ _hover: {
59
+ backgroundColor: "blue",
60
+ color: "white"
61
+ },
62
+ backgroundColor: "transparent",
63
+ border: "1px solid blue",
64
+ color: "blue"
65
+ },
66
+ solid: {
67
+ "&[data-disabled]": {
68
+ backgroundColor: "gray",
69
+ color: "black",
70
+ fontSize: "2xl"
71
+ },
72
+ _hover: { backgroundColor: "darkblue" },
73
+ backgroundColor: "blue",
74
+ color: "white"
75
+ }
76
+ }
77
+ }
78
+ },
79
+ cardStyle: {
80
+ className: "card",
81
+ variants: { rounded: { true: { borderRadius: "0.375rem" } } }
82
+ },
83
+ textStyle: {
84
+ base: {
85
+ divideX: "20px",
86
+ fontFamily: "mono"
87
+ },
88
+ className: "textStyle",
89
+ variants: { size: {
90
+ h1: {
91
+ fontSize: "5rem",
92
+ fontWeight: 800,
93
+ lineHeight: "1em"
94
+ },
95
+ h2: {
96
+ fontSize: "3rem",
97
+ fontWeight: 700,
98
+ letterSpacing: "-0.03em",
99
+ lineHeight: "1.2em"
100
+ }
101
+ } }
102
+ },
103
+ tooltipStyle: {
104
+ base: { "&[data-tooltip], & [data-tooltip]": { color: { _dark: "red" } } },
105
+ className: "tooltipStyle"
106
+ }
107
+ };
108
+ }));
109
+
110
+ //#endregion
111
+ //#region tests/fixtures/semantic-tokens.ts
112
+ var semanticTokens;
113
+ var init_semantic_tokens = __esmMin((() => {
114
+ semanticTokens = {
115
+ colors: {
116
+ button: {
117
+ card: {
118
+ body: { value: {
119
+ _dark: "#000",
120
+ base: "#fff"
121
+ } },
122
+ heading: { value: {
123
+ _dark: "#000",
124
+ base: "#fff"
125
+ } }
126
+ },
127
+ thick: { value: {
128
+ _dark: "#000",
129
+ base: "#fff"
130
+ } }
131
+ },
132
+ complex: { value: {
133
+ _dark: { _highContrast: "{colors.red.700}" },
134
+ base: "{colors.red.800}"
135
+ } },
136
+ primary: { value: {
137
+ _dark: "{colors.red.400}",
138
+ base: "{colors.red.500}"
139
+ } },
140
+ secondary: { value: {
141
+ _dark: "{colors.red.700}",
142
+ base: "{colors.red.800}"
143
+ } },
144
+ surface: { value: {
145
+ _materialTheme: {
146
+ _dark: "#m-d",
147
+ base: "#m-b"
148
+ },
149
+ _pastelTheme: {
150
+ _dark: { md: "#p-d" },
151
+ base: "#p-b"
152
+ }
153
+ } }
154
+ },
155
+ spacing: { gutter: { value: {
156
+ base: "{spacing.4}",
157
+ lg: "{spacing.5}"
158
+ } } }
159
+ };
160
+ }));
161
+
162
+ //#endregion
163
+ //#region tests/fixtures/slot-recipes.ts
164
+ var slotRecipes;
165
+ var init_slot_recipes = __esmMin((() => {
166
+ slotRecipes = {
167
+ badge: {
168
+ base: { title: {
169
+ bg: "red.300",
170
+ rounded: "sm"
171
+ } },
172
+ className: "badge",
173
+ compoundVariants: [{
174
+ css: { title: { color: "ButtonHighlight" } },
175
+ raised: true,
176
+ size: "sm"
177
+ }],
178
+ slots: ["title", "body"],
179
+ variants: {
180
+ raised: { true: { title: { shadow: "md" } } },
181
+ size: { sm: {
182
+ body: { color: "red" },
183
+ title: { px: "4" }
184
+ } }
185
+ }
186
+ },
187
+ checkbox: {
188
+ base: {
189
+ control: {
190
+ borderRadius: "sm",
191
+ borderWidth: "1px"
192
+ },
193
+ label: { marginStart: "2" },
194
+ root: {
195
+ alignItems: "center",
196
+ display: "flex",
197
+ gap: "2"
198
+ }
199
+ },
200
+ className: "checkbox",
201
+ defaultVariants: { size: "sm" },
202
+ slots: [
203
+ "root",
204
+ "control",
205
+ "label"
206
+ ],
207
+ variants: { size: {
208
+ lg: {
209
+ control: {
210
+ height: "12",
211
+ width: "12"
212
+ },
213
+ label: { fontSize: "lg" }
214
+ },
215
+ md: {
216
+ control: {
217
+ height: "10",
218
+ width: "10"
219
+ },
220
+ label: { fontSize: "md" }
221
+ },
222
+ sm: {
223
+ control: {
224
+ height: "8",
225
+ textStyle: "headline.h1",
226
+ width: "8"
227
+ },
228
+ label: { fontSize: "sm" }
229
+ }
230
+ } }
231
+ }
232
+ };
233
+ }));
234
+
235
+ //#endregion
236
+ //#region ../preset-base/dist/index.mjs
237
+ function definePattern(config) {
238
+ return config;
239
+ }
240
+ function createFocusRing(selector, className) {
241
+ return {
242
+ className,
243
+ group: "Focus Ring",
244
+ values: [
245
+ "outside",
246
+ "inside",
247
+ "mixed",
248
+ "none"
249
+ ],
250
+ transform(value) {
251
+ const focusRingColor = `var(--focus-ring-color-prop, var(--global-color-focus-ring, #005FCC))`;
252
+ switch (value) {
253
+ case "inside": return {
254
+ "--focus-ring-color": focusRingColor,
255
+ [selector]: {
256
+ outlineOffset: "0px",
257
+ outlineWidth: "var(--focus-ring-width, 1px)",
258
+ outlineColor: "var(--focus-ring-color)",
259
+ outlineStyle: "var(--focus-ring-style, solid)",
260
+ borderColor: "var(--focus-ring-color)"
261
+ }
262
+ };
263
+ case "outside": return {
264
+ "--focus-ring-color": focusRingColor,
265
+ [selector]: {
266
+ outlineWidth: "var(--focus-ring-width, 2px)",
267
+ outlineOffset: "var(--focus-ring-offset, 2px)",
268
+ outlineStyle: "var(--focus-ring-style, solid)",
269
+ outlineColor: "var(--focus-ring-color)"
270
+ }
271
+ };
272
+ case "mixed": return {
273
+ "--focus-ring-color": focusRingColor,
274
+ [selector]: {
275
+ outlineOffset: "0px",
276
+ outlineWidth: "var(--focus-ring-width, 3px)",
277
+ outlineStyle: "var(--focus-ring-style, solid)",
278
+ outlineColor: "color-mix(in srgb, var(--focus-ring-color), transparent 60%)",
279
+ borderColor: "var(--focus-ring-color)"
280
+ }
281
+ };
282
+ case "none": return {
283
+ "--focus-ring-color": focusRingColor,
284
+ [selector]: { outline: "none" }
285
+ };
286
+ default: return {};
287
+ }
288
+ }
289
+ };
290
+ }
291
+ var conditions$1, EMPTY, globalCss, box, flex, stack, vstack, hstack, spacer, circle, square, grid, gridItem, wrap, container$1, center, aspectRatio, divider, patterns, createColorMixTransform, background, border, container, cursor, display, divideColor, divide, effects, flexGrid, focusRing, gradientVia, linearGradientDirectionMap, isGradientShortcut, linearGradientValues, gradientStops, gradientViaStops, backgroundGradients, srMapping, helpers, interactivity, layout, list, outline, polyfill, widthValues, heightValues, sizing, marginValues, spacing$1, svg, tables, positiveFractions, negativeFractions, fractions, transforms, createTransition, transitionMap, transitions, typography, utilities, definePreset$1, preset$1;
292
+ var init_dist$2 = __esmMin((() => {
293
+ conditions$1 = {
294
+ hover: "&:is(:hover, [data-hover])",
295
+ focus: "&:is(:focus, [data-focus])",
296
+ focusWithin: "&:focus-within",
297
+ focusVisible: "&:is(:focus-visible, [data-focus-visible])",
298
+ disabled: "&:is(:disabled, [disabled], [data-disabled], [aria-disabled=true])",
299
+ active: "&:is(:active, [data-active])",
300
+ visited: "&:visited",
301
+ target: "&:target",
302
+ readOnly: "&:is(:read-only, [data-read-only], [aria-readonly=true])",
303
+ readWrite: "&:read-write",
304
+ empty: "&:is(:empty, [data-empty])",
305
+ checked: "&:is(:checked, [data-checked], [aria-checked=true], [data-state=\"checked\"])",
306
+ enabled: "&:enabled",
307
+ expanded: "&:is([aria-expanded=true], [data-expanded], [data-state=\"expanded\"])",
308
+ highlighted: "&[data-highlighted]",
309
+ complete: "&[data-complete]",
310
+ incomplete: "&[data-incomplete]",
311
+ dragging: "&[data-dragging]",
312
+ before: "&::before",
313
+ after: "&::after",
314
+ firstLetter: "&::first-letter",
315
+ firstLine: "&::first-line",
316
+ marker: "&::marker, &::-webkit-details-marker",
317
+ selection: "&::selection",
318
+ file: "&::file-selector-button",
319
+ backdrop: "&::backdrop",
320
+ first: "&:first-child",
321
+ last: "&:last-child",
322
+ only: "&:only-child",
323
+ even: "&:nth-child(even)",
324
+ odd: "&:nth-child(odd)",
325
+ firstOfType: "&:first-of-type",
326
+ lastOfType: "&:last-of-type",
327
+ onlyOfType: "&:only-of-type",
328
+ peerFocus: ".peer:is(:focus, [data-focus]) ~ &",
329
+ peerHover: ".peer:is(:hover, [data-hover]) ~ &",
330
+ peerActive: ".peer:is(:active, [data-active]) ~ &",
331
+ peerFocusWithin: ".peer:focus-within ~ &",
332
+ peerFocusVisible: ".peer:is(:focus-visible, [data-focus-visible]) ~ &",
333
+ peerDisabled: ".peer:is(:disabled, [disabled], [data-disabled], [aria-disabled=true]) ~ &",
334
+ peerChecked: ".peer:is(:checked, [data-checked], [aria-checked=true], [data-state=\"checked\"]) ~ &",
335
+ peerInvalid: ".peer:is(:invalid, [data-invalid], [aria-invalid=true]) ~ &",
336
+ peerExpanded: ".peer:is([aria-expanded=true], [data-expanded], [data-state=\"expanded\"]) ~ &",
337
+ peerPlaceholderShown: ".peer:placeholder-shown ~ &",
338
+ groupFocus: ".group:is(:focus, [data-focus]) &",
339
+ groupHover: ".group:is(:hover, [data-hover]) &",
340
+ groupActive: ".group:is(:active, [data-active]) &",
341
+ groupFocusWithin: ".group:focus-within &",
342
+ groupFocusVisible: ".group:is(:focus-visible, [data-focus-visible]) &",
343
+ groupDisabled: ".group:is(:disabled, [disabled], [data-disabled], [aria-disabled=true]) &",
344
+ groupChecked: ".group:is(:checked, [data-checked], [aria-checked=true], [data-state=\"checked\"]) &",
345
+ groupExpanded: ".group:is([aria-expanded=true], [data-expanded], [data-state=\"expanded\"]) &",
346
+ groupInvalid: ".group:is(:invalid, [data-invalid], [aria-invalid=true]) &",
347
+ indeterminate: "&:is(:indeterminate, [data-indeterminate], [aria-checked=mixed], [data-state=\"indeterminate\"])",
348
+ required: "&:is(:required, [data-required], [aria-required=true])",
349
+ valid: "&:is(:valid, [data-valid])",
350
+ invalid: "&:is(:invalid, [data-invalid], [aria-invalid=true])",
351
+ autofill: "&:autofill",
352
+ inRange: "&:is(:in-range, [data-in-range])",
353
+ outOfRange: "&:is(:out-of-range, [data-outside-range])",
354
+ placeholder: "&::placeholder, &[data-placeholder]",
355
+ placeholderShown: "&:is(:placeholder-shown, [data-placeholder-shown])",
356
+ pressed: "&:is([aria-pressed=true], [data-pressed])",
357
+ selected: "&:is([aria-selected=true], [data-selected])",
358
+ grabbed: "&:is([aria-grabbed=true], [data-grabbed])",
359
+ underValue: "&[data-state=under-value]",
360
+ overValue: "&[data-state=over-value]",
361
+ atValue: "&[data-state=at-value]",
362
+ default: "&:default",
363
+ optional: "&:optional",
364
+ open: "&:is([open], [data-open], [data-state=\"open\"], :popover-open)",
365
+ closed: "&:is([closed], [data-closed], [data-state=\"closed\"])",
366
+ fullscreen: "&:is(:fullscreen, [data-fullscreen])",
367
+ loading: "&:is([data-loading], [aria-busy=true])",
368
+ hidden: "&:is([hidden], [data-hidden])",
369
+ current: "&:is([aria-current=true], [data-current])",
370
+ currentPage: "&[aria-current=page]",
371
+ currentStep: "&[aria-current=step]",
372
+ today: "&[data-today]",
373
+ unavailable: "&[data-unavailable]",
374
+ rangeStart: "&[data-range-start]",
375
+ rangeEnd: "&[data-range-end]",
376
+ now: "&[data-now]",
377
+ topmost: "&[data-topmost]",
378
+ motionReduce: "@media (prefers-reduced-motion: reduce)",
379
+ motionSafe: "@media (prefers-reduced-motion: no-preference)",
380
+ print: "@media print",
381
+ landscape: "@media (orientation: landscape)",
382
+ portrait: "@media (orientation: portrait)",
383
+ dark: ".dark &",
384
+ light: ".light &",
385
+ osDark: "@media (prefers-color-scheme: dark)",
386
+ osLight: "@media (prefers-color-scheme: light)",
387
+ highContrast: "@media (forced-colors: active)",
388
+ lessContrast: "@media (prefers-contrast: less)",
389
+ moreContrast: "@media (prefers-contrast: more)",
390
+ ltr: ":where([dir=ltr], :dir(ltr)) &",
391
+ rtl: ":where([dir=rtl], :dir(rtl)) &",
392
+ scrollbar: "&::-webkit-scrollbar",
393
+ scrollbarThumb: "&::-webkit-scrollbar-thumb",
394
+ scrollbarTrack: "&::-webkit-scrollbar-track",
395
+ horizontal: "&[data-orientation=horizontal]",
396
+ vertical: "&[data-orientation=vertical]",
397
+ icon: "& :where(svg)",
398
+ starting: "@starting-style",
399
+ noscript: "@media (scripting: none)",
400
+ invertedColors: "@media (inverted-colors: inverted)"
401
+ };
402
+ EMPTY = "/*-*/ /*-*/";
403
+ globalCss = { "*, ::before, ::after, ::backdrop": {
404
+ "--blur": EMPTY,
405
+ "--brightness": EMPTY,
406
+ "--contrast": EMPTY,
407
+ "--grayscale": EMPTY,
408
+ "--hue-rotate": EMPTY,
409
+ "--invert": EMPTY,
410
+ "--saturate": EMPTY,
411
+ "--sepia": EMPTY,
412
+ "--drop-shadow": EMPTY,
413
+ "--backdrop-blur": EMPTY,
414
+ "--backdrop-brightness": EMPTY,
415
+ "--backdrop-contrast": EMPTY,
416
+ "--backdrop-grayscale": EMPTY,
417
+ "--backdrop-hue-rotate": EMPTY,
418
+ "--backdrop-invert": EMPTY,
419
+ "--backdrop-opacity": EMPTY,
420
+ "--backdrop-saturate": EMPTY,
421
+ "--backdrop-sepia": EMPTY,
422
+ "--gradient-from-position": EMPTY,
423
+ "--gradient-to-position": EMPTY,
424
+ "--gradient-via-position": EMPTY,
425
+ "--scroll-snap-strictness": "proximity",
426
+ "--border-spacing-x": 0,
427
+ "--border-spacing-y": 0,
428
+ "--translate-x": 0,
429
+ "--translate-y": 0,
430
+ "--rotate": 0,
431
+ "--rotate-x": 0,
432
+ "--rotate-y": 0,
433
+ "--skew-x": 0,
434
+ "--skew-y": 0,
435
+ "--scale-x": 1,
436
+ "--scale-y": 1
437
+ } };
438
+ box = definePattern({ transform(props) {
439
+ return props;
440
+ } });
441
+ flex = definePattern({
442
+ properties: {
443
+ align: {
444
+ type: "property",
445
+ value: "alignItems"
446
+ },
447
+ justify: {
448
+ type: "property",
449
+ value: "justifyContent"
450
+ },
451
+ direction: {
452
+ type: "property",
453
+ value: "flexDirection"
454
+ },
455
+ wrap: {
456
+ type: "property",
457
+ value: "flexWrap"
458
+ },
459
+ basis: {
460
+ type: "property",
461
+ value: "flexBasis"
462
+ },
463
+ grow: {
464
+ type: "property",
465
+ value: "flexGrow"
466
+ },
467
+ shrink: {
468
+ type: "property",
469
+ value: "flexShrink"
470
+ }
471
+ },
472
+ transform(props) {
473
+ const { direction, align, justify, wrap, basis, grow, shrink, ...rest } = props;
474
+ return {
475
+ display: "flex",
476
+ flexDirection: direction,
477
+ alignItems: align,
478
+ justifyContent: justify,
479
+ flexWrap: wrap,
480
+ flexBasis: basis,
481
+ flexGrow: grow,
482
+ flexShrink: shrink,
483
+ ...rest
484
+ };
485
+ }
486
+ });
487
+ stack = definePattern({
488
+ properties: {
489
+ align: {
490
+ type: "property",
491
+ value: "alignItems"
492
+ },
493
+ justify: {
494
+ type: "property",
495
+ value: "justifyContent"
496
+ },
497
+ direction: {
498
+ type: "property",
499
+ value: "flexDirection"
500
+ },
501
+ gap: {
502
+ type: "property",
503
+ value: "gap"
504
+ }
505
+ },
506
+ defaultValues: {
507
+ direction: "column",
508
+ gap: "8px"
509
+ },
510
+ transform(props) {
511
+ const { align, justify, direction, gap, ...rest } = props;
512
+ return {
513
+ display: "flex",
514
+ flexDirection: direction,
515
+ alignItems: align,
516
+ justifyContent: justify,
517
+ gap,
518
+ ...rest
519
+ };
520
+ }
521
+ });
522
+ vstack = definePattern({
523
+ jsxName: "VStack",
524
+ properties: {
525
+ justify: {
526
+ type: "property",
527
+ value: "justifyContent"
528
+ },
529
+ gap: {
530
+ type: "property",
531
+ value: "gap"
532
+ }
533
+ },
534
+ defaultValues: { gap: "8px" },
535
+ transform(props) {
536
+ const { justify, gap, ...rest } = props;
537
+ return {
538
+ display: "flex",
539
+ alignItems: "center",
540
+ justifyContent: justify,
541
+ gap,
542
+ flexDirection: "column",
543
+ ...rest
544
+ };
545
+ }
546
+ });
547
+ hstack = definePattern({
548
+ jsxName: "HStack",
549
+ properties: {
550
+ justify: {
551
+ type: "property",
552
+ value: "justifyContent"
553
+ },
554
+ gap: {
555
+ type: "property",
556
+ value: "gap"
557
+ }
558
+ },
559
+ defaultValues: { gap: "8px" },
560
+ transform(props) {
561
+ const { justify, gap, ...rest } = props;
562
+ return {
563
+ display: "flex",
564
+ alignItems: "center",
565
+ justifyContent: justify,
566
+ gap,
567
+ flexDirection: "row",
568
+ ...rest
569
+ };
570
+ }
571
+ });
572
+ spacer = definePattern({
573
+ properties: { size: {
574
+ type: "token",
575
+ value: "spacing"
576
+ } },
577
+ transform(props, { map, isCssUnit, isCssVar }) {
578
+ const { size, ...rest } = props;
579
+ return {
580
+ alignSelf: "stretch",
581
+ justifySelf: "stretch",
582
+ flex: map(size, (v) => {
583
+ if (v == null) return "1";
584
+ return `0 0 ${isCssUnit(v) || isCssVar(v) ? v : `token(spacing.${v}, ${v})`}`;
585
+ }),
586
+ ...rest
587
+ };
588
+ }
589
+ });
590
+ circle = definePattern({
591
+ properties: { size: {
592
+ type: "property",
593
+ value: "width"
594
+ } },
595
+ transform(props) {
596
+ const { size, ...rest } = props;
597
+ return {
598
+ display: "flex",
599
+ alignItems: "center",
600
+ justifyContent: "center",
601
+ flex: "0 0 auto",
602
+ width: size,
603
+ height: size,
604
+ borderRadius: "9999px",
605
+ ...rest
606
+ };
607
+ }
608
+ });
609
+ square = definePattern({
610
+ properties: { size: {
611
+ type: "property",
612
+ value: "width"
613
+ } },
614
+ transform(props) {
615
+ const { size, ...rest } = props;
616
+ return {
617
+ display: "flex",
618
+ alignItems: "center",
619
+ justifyContent: "center",
620
+ flex: "0 0 auto",
621
+ width: size,
622
+ height: size,
623
+ ...rest
624
+ };
625
+ }
626
+ });
627
+ grid = definePattern({
628
+ properties: {
629
+ gap: {
630
+ type: "property",
631
+ value: "gap"
632
+ },
633
+ columnGap: {
634
+ type: "property",
635
+ value: "gap"
636
+ },
637
+ rowGap: {
638
+ type: "property",
639
+ value: "gap"
640
+ },
641
+ columns: { type: "number" },
642
+ minChildWidth: {
643
+ type: "token",
644
+ value: "sizes",
645
+ property: "width"
646
+ }
647
+ },
648
+ defaultValues(props) {
649
+ return { gap: props.columnGap || props.rowGap ? void 0 : "8px" };
650
+ },
651
+ transform(props, { map, isCssUnit }) {
652
+ const { columnGap, rowGap, gap, columns, minChildWidth, ...rest } = props;
653
+ const getValue = (v) => isCssUnit(v) ? v : `token(sizes.${v}, ${v})`;
654
+ return {
655
+ display: "grid",
656
+ gridTemplateColumns: columns != null ? map(columns, (v) => `repeat(${v}, minmax(0, 1fr))`) : minChildWidth != null ? map(minChildWidth, (v) => `repeat(auto-fit, minmax(${getValue(v)}, 1fr))`) : void 0,
657
+ gap,
658
+ columnGap,
659
+ rowGap,
660
+ ...rest
661
+ };
662
+ }
663
+ });
664
+ gridItem = definePattern({
665
+ properties: {
666
+ colSpan: { type: "number" },
667
+ rowSpan: { type: "number" },
668
+ colStart: { type: "number" },
669
+ rowStart: { type: "number" },
670
+ colEnd: { type: "number" },
671
+ rowEnd: { type: "number" }
672
+ },
673
+ transform(props, { map }) {
674
+ const { colSpan, rowSpan, colStart, rowStart, colEnd, rowEnd, ...rest } = props;
675
+ const spanFn = (v) => v === "auto" ? v : `span ${v}`;
676
+ return {
677
+ gridColumn: colSpan != null ? map(colSpan, spanFn) : void 0,
678
+ gridRow: rowSpan != null ? map(rowSpan, spanFn) : void 0,
679
+ gridColumnStart: colStart,
680
+ gridColumnEnd: colEnd,
681
+ gridRowStart: rowStart,
682
+ gridRowEnd: rowEnd,
683
+ ...rest
684
+ };
685
+ }
686
+ });
687
+ wrap = definePattern({
688
+ properties: {
689
+ gap: {
690
+ type: "property",
691
+ value: "gap"
692
+ },
693
+ rowGap: {
694
+ type: "property",
695
+ value: "gap"
696
+ },
697
+ columnGap: {
698
+ type: "property",
699
+ value: "gap"
700
+ },
701
+ align: {
702
+ type: "property",
703
+ value: "alignItems"
704
+ },
705
+ justify: {
706
+ type: "property",
707
+ value: "justifyContent"
708
+ }
709
+ },
710
+ transform(props) {
711
+ const { columnGap, rowGap, gap = columnGap || rowGap ? void 0 : "8px", align, justify, ...rest } = props;
712
+ return {
713
+ display: "flex",
714
+ flexWrap: "wrap",
715
+ alignItems: align,
716
+ justifyContent: justify,
717
+ gap,
718
+ columnGap,
719
+ rowGap,
720
+ ...rest
721
+ };
722
+ }
723
+ });
724
+ container$1 = definePattern({ transform(props) {
725
+ return {
726
+ position: "relative",
727
+ maxWidth: "8xl",
728
+ mx: "auto",
729
+ px: {
730
+ base: "4",
731
+ md: "6",
732
+ lg: "8"
733
+ },
734
+ ...props
735
+ };
736
+ } });
737
+ center = definePattern({
738
+ properties: { inline: { type: "boolean" } },
739
+ transform(props) {
740
+ const { inline, ...rest } = props;
741
+ return {
742
+ display: inline ? "inline-flex" : "flex",
743
+ alignItems: "center",
744
+ justifyContent: "center",
745
+ ...rest
746
+ };
747
+ }
748
+ });
749
+ aspectRatio = definePattern({
750
+ properties: { ratio: { type: "number" } },
751
+ blocklist: ["aspectRatio"],
752
+ transform(props, { map }) {
753
+ const { ratio = 4 / 3, ...rest } = props;
754
+ return {
755
+ position: "relative",
756
+ _before: {
757
+ content: `""`,
758
+ display: "block",
759
+ height: "0",
760
+ paddingBottom: map(ratio, (r) => `${1 / r * 100}%`)
761
+ },
762
+ "&>*": {
763
+ display: "flex",
764
+ justifyContent: "center",
765
+ alignItems: "center",
766
+ overflow: "hidden",
767
+ position: "absolute",
768
+ inset: "0",
769
+ width: "100%",
770
+ height: "100%"
771
+ },
772
+ "&>img, &>video": { objectFit: "cover" },
773
+ ...rest
774
+ };
775
+ }
776
+ });
777
+ divider = definePattern({
778
+ properties: {
779
+ orientation: {
780
+ type: "enum",
781
+ value: ["horizontal", "vertical"]
782
+ },
783
+ thickness: {
784
+ type: "token",
785
+ value: "sizes",
786
+ property: "borderWidth"
787
+ },
788
+ color: {
789
+ type: "token",
790
+ value: "colors",
791
+ property: "borderColor"
792
+ }
793
+ },
794
+ defaultValues: {
795
+ orientation: "horizontal",
796
+ thickness: "1px"
797
+ },
798
+ transform(props, { map }) {
799
+ const { orientation, thickness, color, ...rest } = props;
800
+ return {
801
+ "--thickness": thickness,
802
+ width: map(orientation, (v) => v === "vertical" ? void 0 : "100%"),
803
+ height: map(orientation, (v) => v === "horizontal" ? void 0 : "100%"),
804
+ borderBlockEndWidth: map(orientation, (v) => v === "horizontal" ? "var(--thickness)" : void 0),
805
+ borderInlineEndWidth: map(orientation, (v) => v === "vertical" ? "var(--thickness)" : void 0),
806
+ borderColor: color,
807
+ ...rest
808
+ };
809
+ }
810
+ });
811
+ patterns = {
812
+ box,
813
+ flex,
814
+ stack,
815
+ vstack,
816
+ hstack,
817
+ spacer,
818
+ square,
819
+ circle,
820
+ center,
821
+ linkOverlay: definePattern({
822
+ jsxElement: "a",
823
+ transform(props) {
824
+ return {
825
+ _before: {
826
+ content: "\"\"",
827
+ position: "absolute",
828
+ inset: "0",
829
+ zIndex: "0",
830
+ ...props["_before"]
831
+ },
832
+ ...props
833
+ };
834
+ }
835
+ }),
836
+ aspectRatio,
837
+ grid,
838
+ gridItem,
839
+ wrap,
840
+ container: container$1,
841
+ divider,
842
+ float: definePattern({
843
+ properties: {
844
+ offsetX: {
845
+ type: "token",
846
+ value: "spacing",
847
+ property: "left"
848
+ },
849
+ offsetY: {
850
+ type: "token",
851
+ value: "spacing",
852
+ property: "top"
853
+ },
854
+ offset: {
855
+ type: "token",
856
+ value: "spacing",
857
+ property: "top"
858
+ },
859
+ placement: {
860
+ type: "enum",
861
+ value: [
862
+ "bottom-end",
863
+ "bottom-start",
864
+ "top-end",
865
+ "top-start",
866
+ "bottom-center",
867
+ "top-center",
868
+ "middle-center",
869
+ "middle-end",
870
+ "middle-start"
871
+ ]
872
+ }
873
+ },
874
+ defaultValues(props) {
875
+ const offset = props.offset || "0";
876
+ return {
877
+ offset,
878
+ offsetX: offset,
879
+ offsetY: offset,
880
+ placement: "top-end"
881
+ };
882
+ },
883
+ transform(props, { map }) {
884
+ const { offset, offsetX, offsetY, placement, ...rest } = props;
885
+ return {
886
+ display: "inline-flex",
887
+ justifyContent: "center",
888
+ alignItems: "center",
889
+ position: "absolute",
890
+ insetBlockStart: map(placement, (v) => {
891
+ const [side] = v.split("-");
892
+ return {
893
+ top: offsetY,
894
+ middle: "50%",
895
+ bottom: "auto"
896
+ }[side];
897
+ }),
898
+ insetBlockEnd: map(placement, (v) => {
899
+ const [side] = v.split("-");
900
+ return {
901
+ top: "auto",
902
+ middle: "50%",
903
+ bottom: offsetY
904
+ }[side];
905
+ }),
906
+ insetInlineStart: map(placement, (v) => {
907
+ const [, align] = v.split("-");
908
+ return {
909
+ start: offsetX,
910
+ center: "50%",
911
+ end: "auto"
912
+ }[align];
913
+ }),
914
+ insetInlineEnd: map(placement, (v) => {
915
+ const [, align] = v.split("-");
916
+ return {
917
+ start: "auto",
918
+ center: "50%",
919
+ end: offsetX
920
+ }[align];
921
+ }),
922
+ translate: map(placement, (v) => {
923
+ const [side, align] = v.split("-");
924
+ return `${{
925
+ start: "-50%",
926
+ center: "-50%",
927
+ end: "50%"
928
+ }[align]} ${{
929
+ top: "-50%",
930
+ middle: "-50%",
931
+ bottom: "50%"
932
+ }[side]}`;
933
+ }),
934
+ ...rest
935
+ };
936
+ }
937
+ }),
938
+ bleed: definePattern({
939
+ properties: {
940
+ inline: {
941
+ type: "property",
942
+ value: "marginInline"
943
+ },
944
+ block: {
945
+ type: "property",
946
+ value: "marginBlock"
947
+ }
948
+ },
949
+ defaultValues: {
950
+ inline: "0",
951
+ block: "0"
952
+ },
953
+ transform(props, { map, isCssUnit, isCssVar }) {
954
+ const { inline, block, ...rest } = props;
955
+ const valueFn = (v) => isCssUnit(v) || isCssVar(v) ? v : `token(spacing.${v}, ${v})`;
956
+ return {
957
+ "--bleed-x": map(inline, valueFn),
958
+ "--bleed-y": map(block, valueFn),
959
+ marginInline: "calc(var(--bleed-x, 0) * -1)",
960
+ marginBlock: "calc(var(--bleed-y, 0) * -1)",
961
+ ...rest
962
+ };
963
+ }
964
+ }),
965
+ visuallyHidden: definePattern({ transform(props) {
966
+ return {
967
+ srOnly: true,
968
+ ...props
969
+ };
970
+ } }),
971
+ cq: definePattern({
972
+ properties: {
973
+ name: {
974
+ type: "token",
975
+ value: "containerNames",
976
+ property: "containerName"
977
+ },
978
+ type: {
979
+ type: "property",
980
+ value: "containerType"
981
+ }
982
+ },
983
+ defaultValues: { type: "inline-size" },
984
+ transform(props) {
985
+ const { name, type, ...rest } = props;
986
+ return {
987
+ containerType: type,
988
+ containerName: name,
989
+ ...rest
990
+ };
991
+ }
992
+ })
993
+ };
994
+ createColorMixTransform = (prop) => (value, args) => {
995
+ const mix = args.utils.colorMix(value);
996
+ if (mix.invalid) return { [prop]: value };
997
+ const cssVar = "--mix-" + prop;
998
+ return {
999
+ [cssVar]: mix.value,
1000
+ [prop]: `var(${cssVar}, ${mix.color})`
1001
+ };
1002
+ };
1003
+ background = {
1004
+ backgroundPosition: {
1005
+ shorthand: "bgPosition",
1006
+ className: "bg-p",
1007
+ group: "Background"
1008
+ },
1009
+ backgroundPositionX: {
1010
+ shorthand: "bgPositionX",
1011
+ className: "bg-p-x",
1012
+ group: "Background"
1013
+ },
1014
+ backgroundPositionY: {
1015
+ shorthand: "bgPositionY",
1016
+ className: "bg-p-y",
1017
+ group: "Background"
1018
+ },
1019
+ backgroundAttachment: {
1020
+ shorthand: "bgAttachment",
1021
+ className: "bg-a",
1022
+ group: "Background"
1023
+ },
1024
+ backgroundClip: {
1025
+ shorthand: "bgClip",
1026
+ className: "bg-cp",
1027
+ group: "Background",
1028
+ transform(value) {
1029
+ return {
1030
+ backgroundClip: value,
1031
+ WebkitBackgroundClip: value
1032
+ };
1033
+ }
1034
+ },
1035
+ background: {
1036
+ shorthand: "bg",
1037
+ className: "bg",
1038
+ values: "colors",
1039
+ group: "Background",
1040
+ transform: createColorMixTransform("background")
1041
+ },
1042
+ backgroundColor: {
1043
+ shorthand: "bgColor",
1044
+ className: "bg-c",
1045
+ values: "colors",
1046
+ group: "Background",
1047
+ transform: createColorMixTransform("backgroundColor")
1048
+ },
1049
+ backgroundOrigin: {
1050
+ shorthand: "bgOrigin",
1051
+ className: "bg-o",
1052
+ group: "Background"
1053
+ },
1054
+ backgroundImage: {
1055
+ shorthand: "bgImage",
1056
+ className: "bg-i",
1057
+ values: "assets",
1058
+ group: "Background"
1059
+ },
1060
+ backgroundRepeat: {
1061
+ shorthand: "bgRepeat",
1062
+ className: "bg-r",
1063
+ group: "Background"
1064
+ },
1065
+ backgroundBlendMode: {
1066
+ shorthand: "bgBlendMode",
1067
+ className: "bg-bm",
1068
+ group: "Background"
1069
+ },
1070
+ backgroundSize: {
1071
+ shorthand: "bgSize",
1072
+ className: "bg-s",
1073
+ group: "Background"
1074
+ }
1075
+ };
1076
+ border = {
1077
+ borderRadius: {
1078
+ className: "bdr",
1079
+ shorthand: "rounded",
1080
+ values: "radii",
1081
+ group: "Border Radius"
1082
+ },
1083
+ borderTopLeftRadius: {
1084
+ className: "bdr-tl",
1085
+ shorthand: "roundedTopLeft",
1086
+ values: "radii",
1087
+ group: "Border Radius"
1088
+ },
1089
+ borderTopRightRadius: {
1090
+ className: "bdr-tr",
1091
+ shorthand: "roundedTopRight",
1092
+ values: "radii",
1093
+ group: "Border Radius"
1094
+ },
1095
+ borderBottomRightRadius: {
1096
+ className: "bdr-br",
1097
+ shorthand: "roundedBottomRight",
1098
+ values: "radii",
1099
+ group: "Border Radius"
1100
+ },
1101
+ borderBottomLeftRadius: {
1102
+ className: "bdr-bl",
1103
+ shorthand: "roundedBottomLeft",
1104
+ values: "radii",
1105
+ group: "Border Radius"
1106
+ },
1107
+ borderTopRadius: {
1108
+ className: "bdr-t",
1109
+ shorthand: "roundedTop",
1110
+ property: "borderRadius",
1111
+ values: "radii",
1112
+ group: "Border Radius",
1113
+ transform(value) {
1114
+ return {
1115
+ borderTopLeftRadius: value,
1116
+ borderTopRightRadius: value
1117
+ };
1118
+ }
1119
+ },
1120
+ borderRightRadius: {
1121
+ className: "bdr-r",
1122
+ shorthand: "roundedRight",
1123
+ property: "borderRadius",
1124
+ values: "radii",
1125
+ group: "Border Radius",
1126
+ transform(value) {
1127
+ return {
1128
+ borderTopRightRadius: value,
1129
+ borderBottomRightRadius: value
1130
+ };
1131
+ }
1132
+ },
1133
+ borderBottomRadius: {
1134
+ className: "bdr-b",
1135
+ shorthand: "roundedBottom",
1136
+ property: "borderRadius",
1137
+ values: "radii",
1138
+ group: "Border Radius",
1139
+ transform(value) {
1140
+ return {
1141
+ borderBottomLeftRadius: value,
1142
+ borderBottomRightRadius: value
1143
+ };
1144
+ }
1145
+ },
1146
+ borderLeftRadius: {
1147
+ className: "bdr-l",
1148
+ shorthand: "roundedLeft",
1149
+ values: "radii",
1150
+ property: "borderRadius",
1151
+ group: "Border Radius",
1152
+ transform(value) {
1153
+ return {
1154
+ borderTopLeftRadius: value,
1155
+ borderBottomLeftRadius: value
1156
+ };
1157
+ }
1158
+ },
1159
+ borderStartStartRadius: {
1160
+ className: "bdr-ss",
1161
+ shorthand: "roundedStartStart",
1162
+ values: "radii",
1163
+ group: "Border Radius"
1164
+ },
1165
+ borderStartEndRadius: {
1166
+ className: "bdr-se",
1167
+ shorthand: "roundedStartEnd",
1168
+ values: "radii",
1169
+ group: "Border Radius"
1170
+ },
1171
+ borderStartRadius: {
1172
+ className: "bdr-s",
1173
+ values: "radii",
1174
+ property: "borderRadius",
1175
+ shorthand: "roundedStart",
1176
+ group: "Border Radius",
1177
+ transform(value) {
1178
+ return {
1179
+ borderStartStartRadius: value,
1180
+ borderEndStartRadius: value
1181
+ };
1182
+ }
1183
+ },
1184
+ borderEndStartRadius: {
1185
+ className: "bdr-es",
1186
+ shorthand: "roundedEndStart",
1187
+ values: "radii",
1188
+ group: "Border Radius"
1189
+ },
1190
+ borderEndEndRadius: {
1191
+ className: "bdr-ee",
1192
+ shorthand: "roundedEndEnd",
1193
+ values: "radii",
1194
+ group: "Border Radius"
1195
+ },
1196
+ borderEndRadius: {
1197
+ className: "bdr-e",
1198
+ shorthand: "roundedEnd",
1199
+ property: "borderRadius",
1200
+ values: "radii",
1201
+ group: "Border Radius",
1202
+ transform(value) {
1203
+ return {
1204
+ borderStartEndRadius: value,
1205
+ borderEndEndRadius: value
1206
+ };
1207
+ }
1208
+ },
1209
+ border: {
1210
+ className: "bd",
1211
+ values: "borders",
1212
+ group: "Border"
1213
+ },
1214
+ borderWidth: {
1215
+ className: "bd-w",
1216
+ values: "borderWidths",
1217
+ group: "Border Radius"
1218
+ },
1219
+ borderTopWidth: {
1220
+ className: "bd-t-w",
1221
+ values: "borderWidths",
1222
+ group: "Border"
1223
+ },
1224
+ borderLeftWidth: {
1225
+ className: "bd-l-w",
1226
+ values: "borderWidths",
1227
+ group: "Border"
1228
+ },
1229
+ borderRightWidth: {
1230
+ className: "bd-r-w",
1231
+ values: "borderWidths",
1232
+ group: "Border"
1233
+ },
1234
+ borderBottomWidth: {
1235
+ className: "bd-b-w",
1236
+ values: "borderWidths",
1237
+ group: "Border"
1238
+ },
1239
+ borderBlockStartWidth: {
1240
+ className: "bd-bs-w",
1241
+ values: "borderWidths",
1242
+ group: "Border Radius"
1243
+ },
1244
+ borderBlockEndWidth: {
1245
+ className: "bd-be-w",
1246
+ values: "borderWidths",
1247
+ group: "Border Radius"
1248
+ },
1249
+ borderColor: {
1250
+ className: "bd-c",
1251
+ values: "colors",
1252
+ group: "Border",
1253
+ transform: createColorMixTransform("borderColor")
1254
+ },
1255
+ borderInline: {
1256
+ className: "bd-x",
1257
+ values: "borders",
1258
+ group: "Border",
1259
+ shorthand: "borderX"
1260
+ },
1261
+ borderInlineWidth: {
1262
+ className: "bd-x-w",
1263
+ values: "borderWidths",
1264
+ group: "Border",
1265
+ shorthand: "borderXWidth"
1266
+ },
1267
+ borderInlineColor: {
1268
+ className: "bd-x-c",
1269
+ values: "colors",
1270
+ group: "Border",
1271
+ shorthand: "borderXColor",
1272
+ transform: createColorMixTransform("borderInlineColor")
1273
+ },
1274
+ borderBlock: {
1275
+ className: "bd-y",
1276
+ values: "borders",
1277
+ group: "Border",
1278
+ shorthand: "borderY"
1279
+ },
1280
+ borderBlockWidth: {
1281
+ className: "bd-y-w",
1282
+ values: "borderWidths",
1283
+ group: "Border",
1284
+ shorthand: "borderYWidth"
1285
+ },
1286
+ borderBlockColor: {
1287
+ className: "bd-y-c",
1288
+ values: "colors",
1289
+ group: "Border",
1290
+ shorthand: "borderYColor",
1291
+ transform: createColorMixTransform("borderBlockColor")
1292
+ },
1293
+ borderLeft: {
1294
+ className: "bd-l",
1295
+ values: "borders",
1296
+ group: "Border"
1297
+ },
1298
+ borderLeftColor: {
1299
+ className: "bd-l-c",
1300
+ values: "colors",
1301
+ group: "Border",
1302
+ transform: createColorMixTransform("borderLeftColor")
1303
+ },
1304
+ borderInlineStart: {
1305
+ className: "bd-s",
1306
+ values: "borders",
1307
+ group: "Border",
1308
+ shorthand: "borderStart"
1309
+ },
1310
+ borderInlineStartWidth: {
1311
+ className: "bd-s-w",
1312
+ values: "borderWidths",
1313
+ group: "Border",
1314
+ shorthand: "borderStartWidth"
1315
+ },
1316
+ borderInlineStartColor: {
1317
+ className: "bd-s-c",
1318
+ values: "colors",
1319
+ group: "Border",
1320
+ shorthand: "borderStartColor",
1321
+ transform: createColorMixTransform("borderInlineStartColor")
1322
+ },
1323
+ borderRight: {
1324
+ className: "bd-r",
1325
+ values: "borders",
1326
+ group: "Border"
1327
+ },
1328
+ borderRightColor: {
1329
+ className: "bd-r-c",
1330
+ values: "colors",
1331
+ group: "Border",
1332
+ transform: createColorMixTransform("borderRightColor")
1333
+ },
1334
+ borderInlineEnd: {
1335
+ className: "bd-e",
1336
+ values: "borders",
1337
+ group: "Border",
1338
+ shorthand: "borderEnd"
1339
+ },
1340
+ borderInlineEndWidth: {
1341
+ className: "bd-e-w",
1342
+ values: "borderWidths",
1343
+ group: "Border",
1344
+ shorthand: "borderEndWidth"
1345
+ },
1346
+ borderInlineEndColor: {
1347
+ className: "bd-e-c",
1348
+ values: "colors",
1349
+ group: "Border",
1350
+ shorthand: "borderEndColor",
1351
+ transform: createColorMixTransform("borderInlineEndColor")
1352
+ },
1353
+ borderTop: {
1354
+ className: "bd-t",
1355
+ values: "borders",
1356
+ group: "Border"
1357
+ },
1358
+ borderTopColor: {
1359
+ className: "bd-t-c",
1360
+ values: "colors",
1361
+ group: "Border",
1362
+ transform: createColorMixTransform("borderTopColor")
1363
+ },
1364
+ borderBottom: {
1365
+ className: "bd-b",
1366
+ values: "borders",
1367
+ group: "Border"
1368
+ },
1369
+ borderBottomColor: {
1370
+ className: "bd-b-c",
1371
+ values: "colors",
1372
+ group: "Border",
1373
+ transform: createColorMixTransform("borderBottomColor")
1374
+ },
1375
+ borderBlockEnd: {
1376
+ className: "bd-be",
1377
+ values: "borders",
1378
+ group: "Border"
1379
+ },
1380
+ borderBlockEndColor: {
1381
+ className: "bd-be-c",
1382
+ values: "colors",
1383
+ group: "Border",
1384
+ transform: createColorMixTransform("borderBlockEndColor")
1385
+ },
1386
+ borderBlockStart: {
1387
+ className: "bd-bs",
1388
+ values: "borders",
1389
+ group: "Border"
1390
+ },
1391
+ borderBlockStartColor: {
1392
+ className: "bd-bs-c",
1393
+ values: "colors",
1394
+ group: "Border",
1395
+ transform: createColorMixTransform("borderBlockStartColor")
1396
+ }
1397
+ };
1398
+ container = {
1399
+ container: {
1400
+ className: "cq",
1401
+ group: "Container"
1402
+ },
1403
+ containerName: {
1404
+ className: "cq-n",
1405
+ property: "containerName",
1406
+ values: "containerNames",
1407
+ group: "Container"
1408
+ },
1409
+ containerType: {
1410
+ className: "cq-t",
1411
+ group: "Container"
1412
+ }
1413
+ };
1414
+ cursor = { cursor: {
1415
+ className: "cursor",
1416
+ values: "cursor",
1417
+ group: "System"
1418
+ } };
1419
+ display = {
1420
+ display: {
1421
+ className: "d",
1422
+ group: "Display"
1423
+ },
1424
+ hideFrom: {
1425
+ className: "hide",
1426
+ values: "breakpoints",
1427
+ group: "Display",
1428
+ transform(value, { raw, token }) {
1429
+ return { [token.raw(`breakpoints.${raw}`) ? `@breakpoint ${raw}` : `@media screen and (min-width: ${value})`]: { display: "none" } };
1430
+ }
1431
+ },
1432
+ hideBelow: {
1433
+ className: "show",
1434
+ values: "breakpoints",
1435
+ group: "Display",
1436
+ transform(value, { raw, token }) {
1437
+ return { [token.raw(`breakpoints.${raw}`) ? `@breakpoint ${raw}Down` : `@media screen and (max-width: ${value})`]: { display: "none" } };
1438
+ }
1439
+ }
1440
+ };
1441
+ divideColor = createColorMixTransform("borderColor");
1442
+ divide = {
1443
+ divideX: {
1444
+ className: "dvd-x",
1445
+ values: "borderWidths",
1446
+ group: "Border",
1447
+ transform(value) {
1448
+ return { "& > :not([hidden]) ~ :not([hidden])": {
1449
+ borderInlineStartWidth: value,
1450
+ borderInlineEndWidth: "0px"
1451
+ } };
1452
+ }
1453
+ },
1454
+ divideY: {
1455
+ className: "dvd-y",
1456
+ values: "borderWidths",
1457
+ group: "Border",
1458
+ transform(value) {
1459
+ return { "& > :not([hidden]) ~ :not([hidden])": {
1460
+ borderTopWidth: value,
1461
+ borderBottomWidth: "0px"
1462
+ } };
1463
+ }
1464
+ },
1465
+ divideColor: {
1466
+ className: "dvd-c",
1467
+ values: "colors",
1468
+ group: "Border",
1469
+ transform(value, args) {
1470
+ return { "& > :not([hidden]) ~ :not([hidden])": divideColor(value, args) };
1471
+ }
1472
+ },
1473
+ divideStyle: {
1474
+ className: "dvd-s",
1475
+ property: "borderStyle",
1476
+ group: "Border",
1477
+ transform(value) {
1478
+ return { "& > :not([hidden]) ~ :not([hidden])": { borderStyle: value } };
1479
+ }
1480
+ }
1481
+ };
1482
+ effects = {
1483
+ opacity: {
1484
+ className: "op",
1485
+ values: "opacity",
1486
+ group: "Background"
1487
+ },
1488
+ boxShadow: {
1489
+ shorthand: "shadow",
1490
+ className: "bx-sh",
1491
+ values: "shadows",
1492
+ group: "Shadow"
1493
+ },
1494
+ boxShadowColor: {
1495
+ shorthand: "shadowColor",
1496
+ className: "bx-sh-c",
1497
+ values: "colors",
1498
+ transform: createColorMixTransform("--shadow-color"),
1499
+ group: "Color"
1500
+ },
1501
+ mixBlendMode: {
1502
+ className: "mix-bm",
1503
+ group: "Effect"
1504
+ },
1505
+ filter: {
1506
+ className: "filter",
1507
+ group: "Effect",
1508
+ values: { auto: "var(--blur, ) var(--brightness, ) var(--contrast, ) var(--grayscale, ) var(--hue-rotate, ) var(--invert, ) var(--saturate, ) var(--sepia, ) var(--drop-shadow, )" }
1509
+ },
1510
+ brightness: {
1511
+ className: "brightness",
1512
+ group: "Effect",
1513
+ transform(value) {
1514
+ return { "--brightness": `brightness(${value})` };
1515
+ }
1516
+ },
1517
+ contrast: {
1518
+ className: "contrast",
1519
+ group: "Effect",
1520
+ transform(value) {
1521
+ return { "--contrast": `contrast(${value})` };
1522
+ }
1523
+ },
1524
+ grayscale: {
1525
+ className: "grayscale",
1526
+ group: "Effect",
1527
+ transform(value) {
1528
+ return { "--grayscale": `grayscale(${value})` };
1529
+ }
1530
+ },
1531
+ hueRotate: {
1532
+ className: "hue-rotate",
1533
+ group: "Effect",
1534
+ transform(value) {
1535
+ return { "--hue-rotate": `hue-rotate(${value})` };
1536
+ }
1537
+ },
1538
+ invert: {
1539
+ className: "invert",
1540
+ group: "Effect",
1541
+ transform(value) {
1542
+ return { "--invert": `invert(${value})` };
1543
+ }
1544
+ },
1545
+ saturate: {
1546
+ className: "saturate",
1547
+ group: "Effect",
1548
+ transform(value) {
1549
+ return { "--saturate": `saturate(${value})` };
1550
+ }
1551
+ },
1552
+ sepia: {
1553
+ className: "sepia",
1554
+ group: "Effect",
1555
+ transform(value) {
1556
+ return { "--sepia": `sepia(${value})` };
1557
+ }
1558
+ },
1559
+ dropShadow: {
1560
+ className: "drop-shadow",
1561
+ group: "Effect",
1562
+ values: "dropShadows",
1563
+ transform(value) {
1564
+ return { "--drop-shadow": value };
1565
+ }
1566
+ },
1567
+ blur: {
1568
+ className: "blur",
1569
+ group: "Effect",
1570
+ values: "blurs",
1571
+ transform(value) {
1572
+ return { "--blur": `blur(${value})` };
1573
+ }
1574
+ },
1575
+ backdropFilter: {
1576
+ className: "bkdp",
1577
+ group: "Effect",
1578
+ values: { auto: "var(--backdrop-blur, ) var(--backdrop-brightness, ) var(--backdrop-contrast, ) var(--backdrop-grayscale, ) var(--backdrop-hue-rotate, ) var(--backdrop-invert, ) var(--backdrop-opacity, ) var(--backdrop-saturate, ) var(--backdrop-sepia, )" },
1579
+ transform(value) {
1580
+ return {
1581
+ backdropFilter: value,
1582
+ WebkitBackdropFilter: value
1583
+ };
1584
+ }
1585
+ },
1586
+ backdropBlur: {
1587
+ className: "bkdp-blur",
1588
+ group: "Effect",
1589
+ values: "blurs",
1590
+ transform(value) {
1591
+ return { "--backdrop-blur": `blur(${value})` };
1592
+ }
1593
+ },
1594
+ backdropBrightness: {
1595
+ className: "bkdp-brightness",
1596
+ group: "Effect",
1597
+ transform(value) {
1598
+ return { "--backdrop-brightness": `brightness(${value})` };
1599
+ }
1600
+ },
1601
+ backdropContrast: {
1602
+ className: "bkdp-contrast",
1603
+ group: "Effect",
1604
+ transform(value) {
1605
+ return { "--backdrop-contrast": `contrast(${value})` };
1606
+ }
1607
+ },
1608
+ backdropGrayscale: {
1609
+ className: "bkdp-grayscale",
1610
+ group: "Effect",
1611
+ transform(value) {
1612
+ return { "--backdrop-grayscale": `grayscale(${value})` };
1613
+ }
1614
+ },
1615
+ backdropHueRotate: {
1616
+ className: "bkdp-hue-rotate",
1617
+ group: "Effect",
1618
+ transform(value) {
1619
+ return { "--backdrop-hue-rotate": `hue-rotate(${value})` };
1620
+ }
1621
+ },
1622
+ backdropInvert: {
1623
+ className: "bkdp-invert",
1624
+ group: "Effect",
1625
+ transform(value) {
1626
+ return { "--backdrop-invert": `invert(${value})` };
1627
+ }
1628
+ },
1629
+ backdropOpacity: {
1630
+ className: "bkdp-opacity",
1631
+ group: "Effect",
1632
+ transform(value) {
1633
+ return { "--backdrop-opacity": value };
1634
+ }
1635
+ },
1636
+ backdropSaturate: {
1637
+ className: "bkdp-saturate",
1638
+ group: "Effect",
1639
+ transform(value) {
1640
+ return { "--backdrop-saturate": `saturate(${value})` };
1641
+ }
1642
+ },
1643
+ backdropSepia: {
1644
+ className: "bkdp-sepia",
1645
+ group: "Effect",
1646
+ transform(value) {
1647
+ return { "--backdrop-sepia": `sepia(${value})` };
1648
+ }
1649
+ }
1650
+ };
1651
+ flexGrid = {
1652
+ flexBasis: {
1653
+ className: "flex-b",
1654
+ group: "Flex Layout",
1655
+ values(theme) {
1656
+ return {
1657
+ ...theme("sizes"),
1658
+ "1/2": "50%",
1659
+ "1/3": "33.333333%",
1660
+ "2/3": "66.666667%",
1661
+ "1/4": "25%",
1662
+ "2/4": "50%",
1663
+ "3/4": "75%",
1664
+ "1/5": "20%",
1665
+ "2/5": "40%",
1666
+ "3/5": "60%",
1667
+ "4/5": "80%",
1668
+ "1/6": "16.666667%",
1669
+ "2/6": "33.333333%",
1670
+ "3/6": "50%",
1671
+ "4/6": "66.666667%",
1672
+ "5/6": "83.333333%",
1673
+ "1/12": "8.333333%",
1674
+ "2/12": "16.666667%",
1675
+ "3/12": "25%",
1676
+ "4/12": "33.333333%",
1677
+ "5/12": "41.666667%",
1678
+ "6/12": "50%",
1679
+ "7/12": "58.333333%",
1680
+ "8/12": "66.666667%",
1681
+ "9/12": "75%",
1682
+ "10/12": "83.333333%",
1683
+ "11/12": "91.666667%",
1684
+ full: "100%"
1685
+ };
1686
+ }
1687
+ },
1688
+ flex: {
1689
+ className: "flex",
1690
+ group: "Flex Layout",
1691
+ values: {
1692
+ "1": "1 1 0%",
1693
+ auto: "1 1 auto",
1694
+ initial: "0 1 auto",
1695
+ none: "none"
1696
+ }
1697
+ },
1698
+ flexDirection: {
1699
+ className: "flex-d",
1700
+ group: "Flex Layout",
1701
+ shorthand: "flexDir"
1702
+ },
1703
+ flexGrow: {
1704
+ className: "flex-g",
1705
+ group: "Flex Layout"
1706
+ },
1707
+ flexShrink: {
1708
+ className: "flex-sh",
1709
+ group: "Flex Layout"
1710
+ },
1711
+ gridTemplateColumns: {
1712
+ className: "grid-tc",
1713
+ group: "Grid Layout"
1714
+ },
1715
+ gridTemplateRows: {
1716
+ className: "grid-tr",
1717
+ group: "Grid Layout"
1718
+ },
1719
+ gridColumn: {
1720
+ className: "grid-c",
1721
+ group: "Grid Layout"
1722
+ },
1723
+ gridRow: {
1724
+ className: "grid-r",
1725
+ group: "Grid Layout"
1726
+ },
1727
+ gridColumnStart: {
1728
+ className: "grid-cs",
1729
+ group: "Grid Layout"
1730
+ },
1731
+ gridColumnEnd: {
1732
+ className: "grid-ce",
1733
+ group: "Grid Layout"
1734
+ },
1735
+ gridAutoFlow: {
1736
+ className: "grid-af",
1737
+ group: "Grid Layout"
1738
+ },
1739
+ gridAutoColumns: {
1740
+ className: "grid-ac",
1741
+ group: "Grid Layout",
1742
+ values: {
1743
+ min: "min-content",
1744
+ max: "max-content",
1745
+ fr: "minmax(0, 1fr)"
1746
+ }
1747
+ },
1748
+ gridAutoRows: {
1749
+ className: "grid-ar",
1750
+ group: "Grid Layout",
1751
+ values: {
1752
+ min: "min-content",
1753
+ max: "max-content",
1754
+ fr: "minmax(0, 1fr)"
1755
+ }
1756
+ },
1757
+ gap: {
1758
+ className: "gap",
1759
+ group: "Flex Layout",
1760
+ values: "spacing"
1761
+ },
1762
+ gridGap: {
1763
+ className: "grid-g",
1764
+ group: "Grid Layout",
1765
+ values: "spacing"
1766
+ },
1767
+ gridRowGap: {
1768
+ className: "grid-rg",
1769
+ group: "Grid Layout",
1770
+ values: "spacing"
1771
+ },
1772
+ gridColumnGap: {
1773
+ className: "grid-cg",
1774
+ group: "Grid Layout",
1775
+ values: "spacing"
1776
+ },
1777
+ rowGap: {
1778
+ className: "rg",
1779
+ group: "Grid Layout",
1780
+ values: "spacing"
1781
+ },
1782
+ columnGap: {
1783
+ className: "cg",
1784
+ group: "Grid Layout",
1785
+ values: "spacing"
1786
+ },
1787
+ justifyContent: {
1788
+ className: "jc",
1789
+ group: "Flex Layout"
1790
+ },
1791
+ alignContent: {
1792
+ className: "ac",
1793
+ group: "Flex Layout"
1794
+ },
1795
+ alignItems: {
1796
+ className: "ai",
1797
+ group: "Flex Layout"
1798
+ },
1799
+ alignSelf: {
1800
+ className: "as",
1801
+ group: "Flex Layout"
1802
+ }
1803
+ };
1804
+ focusRing = {
1805
+ focusRing: createFocusRing("&:is(:focus, [data-focus])", "focus-ring"),
1806
+ focusVisibleRing: createFocusRing("&:is(:focus-visible, [data-focus-visible])", "focus-v-ring"),
1807
+ focusRingColor: {
1808
+ className: "focus-ring-c",
1809
+ values: "colors",
1810
+ group: "Focus Ring",
1811
+ transform(value, { utils }) {
1812
+ const prop = "--focus-ring-color-prop";
1813
+ const mix = utils.colorMix(value);
1814
+ if (mix.invalid) return { [prop]: value };
1815
+ const cssVar = "--mix-" + prop;
1816
+ return {
1817
+ [cssVar]: mix.value,
1818
+ [prop]: `var(${cssVar}, ${mix.color})`
1819
+ };
1820
+ }
1821
+ },
1822
+ focusRingOffset: {
1823
+ className: "focus-ring-o",
1824
+ values: "spacing",
1825
+ group: "Focus Ring",
1826
+ transform: (v) => ({ "--focus-ring-offset": v })
1827
+ },
1828
+ focusRingWidth: {
1829
+ className: "focus-ring-w",
1830
+ values: "borderWidths",
1831
+ property: "outlineWidth",
1832
+ group: "Focus Ring",
1833
+ transform: (v) => ({ "--focus-ring-width": v })
1834
+ },
1835
+ focusRingStyle: {
1836
+ className: "focus-ring-s",
1837
+ values: "borderStyles",
1838
+ property: "outlineStyle",
1839
+ group: "Focus Ring",
1840
+ transform: (v) => ({ "--focus-ring-style": v })
1841
+ }
1842
+ };
1843
+ gradientVia = createColorMixTransform("--gradient-via");
1844
+ linearGradientDirectionMap = new Map([
1845
+ ["to-t", "to top"],
1846
+ ["to-tr", "to top right"],
1847
+ ["to-r", "to right"],
1848
+ ["to-br", "to bottom right"],
1849
+ ["to-b", "to bottom"],
1850
+ ["to-bl", "to bottom left"],
1851
+ ["to-l", "to left"],
1852
+ ["to-tl", "to top left"]
1853
+ ]);
1854
+ isGradientShortcut = (value) => linearGradientDirectionMap.has(value);
1855
+ linearGradientValues = (theme) => {
1856
+ return {
1857
+ ...theme("gradients"),
1858
+ ...Object.fromEntries(linearGradientDirectionMap.entries())
1859
+ };
1860
+ };
1861
+ gradientStops = "var(--gradient-via-stops, var(--gradient-position), var(--gradient-from) var(--gradient-from-position), var(--gradient-to) var(--gradient-to-position))";
1862
+ gradientViaStops = "var(--gradient-position), var(--gradient-from) var(--gradient-from-position), var(--gradient-via) var(--gradient-via-position), var(--gradient-to) var(--gradient-to-position)";
1863
+ backgroundGradients = {
1864
+ backgroundGradient: {
1865
+ shorthand: "bgGradient",
1866
+ className: "bg-grad",
1867
+ group: "Background Gradient",
1868
+ values: linearGradientValues,
1869
+ transform(value, { raw, token }) {
1870
+ const tokenValue = token(`gradients.${raw}`);
1871
+ if (tokenValue) return { backgroundImage: tokenValue };
1872
+ if (!isGradientShortcut(raw)) return { backgroundImage: value };
1873
+ return {
1874
+ "--gradient-stops": gradientStops,
1875
+ "--gradient-position": linearGradientDirectionMap.get(raw),
1876
+ backgroundImage: `linear-gradient(var(--gradient-stops))`
1877
+ };
1878
+ }
1879
+ },
1880
+ backgroundLinear: {
1881
+ shorthand: "bgLinear",
1882
+ className: "bg-linear",
1883
+ group: "Background Gradient",
1884
+ values: linearGradientValues,
1885
+ transform(value, { raw, token }) {
1886
+ const tokenValue = token(`gradients.${raw}`);
1887
+ if (tokenValue) return { backgroundImage: tokenValue };
1888
+ if (!isGradientShortcut(raw)) return { backgroundImage: value };
1889
+ return {
1890
+ "--gradient-stops": gradientStops,
1891
+ "--gradient-position": linearGradientDirectionMap.get(raw),
1892
+ backgroundImage: `linear-gradient(var(--gradient-stops))`
1893
+ };
1894
+ }
1895
+ },
1896
+ backgroundRadial: {
1897
+ shorthand: "bgRadial",
1898
+ className: "bg-radial",
1899
+ group: "Background Gradient",
1900
+ values: "gradients",
1901
+ transform(value, { raw, token }) {
1902
+ const tokenValue = token(`gradients.${raw}`);
1903
+ if (tokenValue) return { backgroundImage: tokenValue };
1904
+ return {
1905
+ "--gradient-stops": gradientStops,
1906
+ "--gradient-position": value,
1907
+ backgroundImage: `radial-gradient(var(--gradient-stops,${value}))`
1908
+ };
1909
+ }
1910
+ },
1911
+ backgroundConic: {
1912
+ shorthand: "bgConic",
1913
+ className: "bg-conic",
1914
+ group: "Background Gradient",
1915
+ transform(value) {
1916
+ return {
1917
+ "--gradient-stops": gradientStops,
1918
+ "--gradient-position": value,
1919
+ backgroundImage: `conic-gradient(var(--gradient-stops))`
1920
+ };
1921
+ }
1922
+ },
1923
+ textGradient: {
1924
+ className: "txt-grad",
1925
+ group: "Background Gradient",
1926
+ values: linearGradientValues,
1927
+ transform(value, { raw, token }) {
1928
+ const tokenValue = token(`gradients.${raw}`);
1929
+ if (tokenValue) return {
1930
+ backgroundImage: tokenValue,
1931
+ WebkitBackgroundClip: "text",
1932
+ color: "transparent"
1933
+ };
1934
+ if (!isGradientShortcut(raw)) return {
1935
+ backgroundImage: value,
1936
+ WebkitBackgroundClip: "text",
1937
+ color: "transparent"
1938
+ };
1939
+ return {
1940
+ "--gradient-stops": gradientStops,
1941
+ "--gradient-position": linearGradientDirectionMap.get(raw),
1942
+ backgroundImage: `linear-gradient(var(--gradient-stops))`,
1943
+ WebkitBackgroundClip: "text",
1944
+ color: "transparent"
1945
+ };
1946
+ }
1947
+ },
1948
+ gradientFromPosition: {
1949
+ className: "grad-from-pos",
1950
+ group: "Background Gradient",
1951
+ transform(value) {
1952
+ return { "--gradient-from-position": value };
1953
+ }
1954
+ },
1955
+ gradientToPosition: {
1956
+ className: "grad-to-pos",
1957
+ group: "Background Gradient",
1958
+ transform(value) {
1959
+ return { "--gradient-to-position": value };
1960
+ }
1961
+ },
1962
+ gradientFrom: {
1963
+ className: "grad-from",
1964
+ values: "colors",
1965
+ group: "Background Gradient",
1966
+ transform: createColorMixTransform("--gradient-from")
1967
+ },
1968
+ gradientTo: {
1969
+ className: "grad-to",
1970
+ values: "colors",
1971
+ group: "Background Gradient",
1972
+ transform: createColorMixTransform("--gradient-to")
1973
+ },
1974
+ gradientVia: {
1975
+ className: "grad-via",
1976
+ values: "colors",
1977
+ group: "Background Gradient",
1978
+ transform(value, args) {
1979
+ return {
1980
+ ...gradientVia(value, args),
1981
+ "--gradient-stops": "var(--gradient-via-stops)",
1982
+ "--gradient-via-stops": gradientViaStops
1983
+ };
1984
+ }
1985
+ },
1986
+ gradientViaPosition: {
1987
+ className: "grad-via-pos",
1988
+ group: "Background Gradient",
1989
+ transform(value) {
1990
+ return { "--gradient-via-position": value };
1991
+ }
1992
+ }
1993
+ };
1994
+ srMapping = {
1995
+ true: {
1996
+ position: "absolute",
1997
+ width: "1px",
1998
+ height: "1px",
1999
+ padding: "0",
2000
+ margin: "-1px",
2001
+ overflow: "hidden",
2002
+ clip: "rect(0, 0, 0, 0)",
2003
+ whiteSpace: "nowrap",
2004
+ borderWidth: "0"
2005
+ },
2006
+ false: {
2007
+ position: "static",
2008
+ width: "auto",
2009
+ height: "auto",
2010
+ padding: "0",
2011
+ margin: "0",
2012
+ overflow: "visible",
2013
+ clip: "auto",
2014
+ whiteSpace: "normal"
2015
+ }
2016
+ };
2017
+ helpers = {
2018
+ srOnly: {
2019
+ className: "sr",
2020
+ values: { type: "boolean" },
2021
+ group: "Other",
2022
+ transform(value) {
2023
+ return srMapping[value] || {};
2024
+ }
2025
+ },
2026
+ debug: {
2027
+ className: "debug",
2028
+ values: { type: "boolean" },
2029
+ group: "Other",
2030
+ transform(value) {
2031
+ if (!value) return {};
2032
+ return {
2033
+ outline: "1px solid blue !important",
2034
+ "&>*": { outline: "1px solid red !important" }
2035
+ };
2036
+ }
2037
+ }
2038
+ };
2039
+ interactivity = {
2040
+ accentColor: {
2041
+ className: "ac-c",
2042
+ values: "colors",
2043
+ transform: createColorMixTransform("accentColor"),
2044
+ group: "Color"
2045
+ },
2046
+ caretColor: {
2047
+ className: "ca-c",
2048
+ values: "colors",
2049
+ group: "Color",
2050
+ transform: createColorMixTransform("caretColor")
2051
+ },
2052
+ scrollBehavior: {
2053
+ className: "scr-bhv",
2054
+ group: "Scroll"
2055
+ },
2056
+ scrollbar: {
2057
+ className: "scr-bar",
2058
+ values: ["visible", "hidden"],
2059
+ group: "Scroll",
2060
+ transform(value) {
2061
+ if (value === "visible") return {
2062
+ msOverflowStyle: "auto",
2063
+ scrollbarWidth: "auto",
2064
+ "&::-webkit-scrollbar": { display: "block" }
2065
+ };
2066
+ if (value === "hidden") return {
2067
+ msOverflowStyle: "none",
2068
+ scrollbarWidth: "none",
2069
+ "&::-webkit-scrollbar": { display: "none" }
2070
+ };
2071
+ }
2072
+ },
2073
+ scrollbarColor: {
2074
+ className: "scr-bar-c",
2075
+ values: "colors",
2076
+ group: "Scroll",
2077
+ transform: createColorMixTransform("scrollbarColor")
2078
+ },
2079
+ scrollbarGutter: {
2080
+ className: "scr-bar-g",
2081
+ group: "Scroll"
2082
+ },
2083
+ scrollbarWidth: {
2084
+ className: "scr-bar-w",
2085
+ values: "sizes",
2086
+ group: "Scroll"
2087
+ },
2088
+ scrollMargin: {
2089
+ className: "scr-m",
2090
+ values: "spacing",
2091
+ group: "Scroll"
2092
+ },
2093
+ scrollMarginLeft: {
2094
+ className: "scr-ml",
2095
+ values: "spacing",
2096
+ group: "Scroll"
2097
+ },
2098
+ scrollMarginRight: {
2099
+ className: "scr-mr",
2100
+ values: "spacing",
2101
+ group: "Scroll"
2102
+ },
2103
+ scrollMarginTop: {
2104
+ className: "scr-mt",
2105
+ values: "spacing",
2106
+ group: "Scroll"
2107
+ },
2108
+ scrollMarginBottom: {
2109
+ className: "scr-mb",
2110
+ values: "spacing",
2111
+ group: "Scroll"
2112
+ },
2113
+ scrollMarginBlock: {
2114
+ className: "scr-my",
2115
+ values: "spacing",
2116
+ group: "Scroll",
2117
+ shorthand: ["scrollMarginY"]
2118
+ },
2119
+ scrollMarginBlockEnd: {
2120
+ className: "scr-mbe",
2121
+ values: "spacing",
2122
+ group: "Scroll"
2123
+ },
2124
+ scrollMarginBlockStart: {
2125
+ className: "scr-mbt",
2126
+ values: "spacing",
2127
+ group: "Scroll"
2128
+ },
2129
+ scrollMarginInline: {
2130
+ className: "scr-mx",
2131
+ values: "spacing",
2132
+ group: "Scroll",
2133
+ shorthand: ["scrollMarginX"]
2134
+ },
2135
+ scrollMarginInlineEnd: {
2136
+ className: "scr-me",
2137
+ values: "spacing",
2138
+ group: "Scroll"
2139
+ },
2140
+ scrollMarginInlineStart: {
2141
+ className: "scr-ms",
2142
+ values: "spacing",
2143
+ group: "Scroll"
2144
+ },
2145
+ scrollPadding: {
2146
+ className: "scr-p",
2147
+ values: "spacing",
2148
+ group: "Scroll"
2149
+ },
2150
+ scrollPaddingBlock: {
2151
+ className: "scr-py",
2152
+ values: "spacing",
2153
+ group: "Scroll",
2154
+ shorthand: ["scrollPaddingY"]
2155
+ },
2156
+ scrollPaddingBlockStart: {
2157
+ className: "scr-pbs",
2158
+ values: "spacing",
2159
+ group: "Scroll"
2160
+ },
2161
+ scrollPaddingBlockEnd: {
2162
+ className: "scr-pbe",
2163
+ values: "spacing",
2164
+ group: "Scroll"
2165
+ },
2166
+ scrollPaddingInline: {
2167
+ className: "scr-px",
2168
+ values: "spacing",
2169
+ group: "Scroll",
2170
+ shorthand: ["scrollPaddingX"]
2171
+ },
2172
+ scrollPaddingInlineEnd: {
2173
+ className: "scr-pe",
2174
+ values: "spacing",
2175
+ group: "Scroll"
2176
+ },
2177
+ scrollPaddingInlineStart: {
2178
+ className: "scr-ps",
2179
+ values: "spacing",
2180
+ group: "Scroll"
2181
+ },
2182
+ scrollPaddingLeft: {
2183
+ className: "scr-pl",
2184
+ values: "spacing",
2185
+ group: "Scroll"
2186
+ },
2187
+ scrollPaddingRight: {
2188
+ className: "scr-pr",
2189
+ values: "spacing",
2190
+ group: "Scroll"
2191
+ },
2192
+ scrollPaddingTop: {
2193
+ className: "scr-pt",
2194
+ values: "spacing",
2195
+ group: "Scroll"
2196
+ },
2197
+ scrollPaddingBottom: {
2198
+ className: "scr-pb",
2199
+ values: "spacing",
2200
+ group: "Scroll"
2201
+ },
2202
+ scrollSnapAlign: {
2203
+ className: "scr-sa",
2204
+ group: "Scroll"
2205
+ },
2206
+ scrollSnapStop: {
2207
+ className: "scrs-s",
2208
+ group: "Scroll"
2209
+ },
2210
+ scrollSnapType: {
2211
+ className: "scrs-t",
2212
+ group: "Scroll",
2213
+ values: {
2214
+ none: "none",
2215
+ x: "x var(--scroll-snap-strictness)",
2216
+ y: "y var(--scroll-snap-strictness)",
2217
+ both: "both var(--scroll-snap-strictness)"
2218
+ }
2219
+ },
2220
+ scrollSnapStrictness: {
2221
+ className: "scrs-strt",
2222
+ values: ["mandatory", "proximity"],
2223
+ group: "Scroll",
2224
+ transform(value) {
2225
+ return { "--scroll-snap-strictness": value };
2226
+ }
2227
+ },
2228
+ scrollSnapMargin: {
2229
+ className: "scrs-m",
2230
+ values: "spacing",
2231
+ group: "Scroll"
2232
+ },
2233
+ scrollSnapMarginTop: {
2234
+ className: "scrs-mt",
2235
+ values: "spacing",
2236
+ group: "Scroll"
2237
+ },
2238
+ scrollSnapMarginBottom: {
2239
+ className: "scrs-mb",
2240
+ values: "spacing",
2241
+ group: "Scroll"
2242
+ },
2243
+ scrollSnapMarginLeft: {
2244
+ className: "scrs-ml",
2245
+ values: "spacing",
2246
+ group: "Scroll"
2247
+ },
2248
+ scrollSnapMarginRight: {
2249
+ className: "scrs-mr",
2250
+ values: "spacing",
2251
+ group: "Scroll"
2252
+ },
2253
+ scrollSnapCoordinate: {
2254
+ className: "scrs-c",
2255
+ group: "Scroll"
2256
+ },
2257
+ scrollSnapDestination: {
2258
+ className: "scrs-d",
2259
+ group: "Scroll"
2260
+ },
2261
+ scrollSnapPointsX: {
2262
+ className: "scrs-px",
2263
+ group: "Scroll"
2264
+ },
2265
+ scrollSnapPointsY: {
2266
+ className: "scrs-py",
2267
+ group: "Scroll"
2268
+ },
2269
+ scrollSnapTypeX: {
2270
+ className: "scrs-tx",
2271
+ group: "Scroll"
2272
+ },
2273
+ scrollSnapTypeY: {
2274
+ className: "scrs-ty",
2275
+ group: "Scroll"
2276
+ },
2277
+ scrollTimeline: {
2278
+ className: "scrtl",
2279
+ group: "Scroll"
2280
+ },
2281
+ scrollTimelineAxis: {
2282
+ className: "scrtl-a",
2283
+ group: "Scroll"
2284
+ },
2285
+ scrollTimelineName: {
2286
+ className: "scrtl-n",
2287
+ group: "Scroll"
2288
+ },
2289
+ touchAction: {
2290
+ className: "tch-a",
2291
+ group: "Interactivity"
2292
+ },
2293
+ userSelect: {
2294
+ className: "us",
2295
+ group: "Interactivity",
2296
+ transform(value) {
2297
+ return {
2298
+ WebkitUserSelect: value,
2299
+ userSelect: value
2300
+ };
2301
+ }
2302
+ },
2303
+ overflow: {
2304
+ className: "ov",
2305
+ group: "Scroll"
2306
+ },
2307
+ overflowWrap: {
2308
+ className: "ov-wrap",
2309
+ group: "Scroll"
2310
+ },
2311
+ overflowX: {
2312
+ className: "ov-x",
2313
+ group: "Scroll"
2314
+ },
2315
+ overflowY: {
2316
+ className: "ov-y",
2317
+ group: "Scroll"
2318
+ },
2319
+ overflowAnchor: {
2320
+ className: "ov-a",
2321
+ group: "Scroll"
2322
+ },
2323
+ overflowBlock: {
2324
+ className: "ov-b",
2325
+ group: "Scroll"
2326
+ },
2327
+ overflowInline: {
2328
+ className: "ov-i",
2329
+ group: "Scroll"
2330
+ },
2331
+ overflowClipBox: {
2332
+ className: "ovcp-bx",
2333
+ group: "Scroll"
2334
+ },
2335
+ overflowClipMargin: {
2336
+ className: "ovcp-m",
2337
+ group: "Scroll"
2338
+ },
2339
+ overscrollBehavior: {
2340
+ className: "ovs-b",
2341
+ group: "Scroll"
2342
+ },
2343
+ overscrollBehaviorX: {
2344
+ className: "ovs-bx",
2345
+ group: "Scroll"
2346
+ },
2347
+ overscrollBehaviorY: {
2348
+ className: "ovs-by",
2349
+ group: "Scroll"
2350
+ },
2351
+ overscrollBehaviorBlock: {
2352
+ className: "ovs-bb",
2353
+ group: "Scroll"
2354
+ },
2355
+ overscrollBehaviorInline: {
2356
+ className: "ovs-bi",
2357
+ group: "Scroll"
2358
+ }
2359
+ };
2360
+ layout = {
2361
+ aspectRatio: {
2362
+ className: "asp",
2363
+ values: "aspectRatios",
2364
+ group: "Layout"
2365
+ },
2366
+ boxDecorationBreak: {
2367
+ className: "bx-db",
2368
+ group: "Layout",
2369
+ transform(value) {
2370
+ return {
2371
+ boxDecorationBreak: value,
2372
+ WebkitBoxDecorationBreak: value
2373
+ };
2374
+ }
2375
+ },
2376
+ zIndex: {
2377
+ className: "z",
2378
+ values: "zIndex",
2379
+ group: "Visibility"
2380
+ },
2381
+ boxSizing: {
2382
+ className: "bx-s",
2383
+ group: "System"
2384
+ },
2385
+ objectPosition: {
2386
+ className: "obj-p",
2387
+ group: "Layout"
2388
+ },
2389
+ objectFit: {
2390
+ className: "obj-f",
2391
+ group: "Layout"
2392
+ },
2393
+ overscrollBehavior: {
2394
+ className: "ovscl",
2395
+ group: "Scroll"
2396
+ },
2397
+ overscrollBehaviorX: {
2398
+ className: "ovscl-x",
2399
+ group: "Scroll"
2400
+ },
2401
+ overscrollBehaviorY: {
2402
+ className: "ovscl-y",
2403
+ group: "Scroll"
2404
+ },
2405
+ position: {
2406
+ className: "pos",
2407
+ shorthand: "pos",
2408
+ group: "Position"
2409
+ },
2410
+ top: {
2411
+ className: "top",
2412
+ values: "spacing",
2413
+ group: "Position"
2414
+ },
2415
+ left: {
2416
+ className: "left",
2417
+ values: "spacing",
2418
+ group: "Position"
2419
+ },
2420
+ inset: {
2421
+ className: "inset",
2422
+ group: "Position",
2423
+ values: (theme) => ({
2424
+ auto: "auto",
2425
+ ...theme("spacing")
2426
+ })
2427
+ },
2428
+ insetInline: {
2429
+ className: "inset-x",
2430
+ values: "spacing",
2431
+ group: "Position",
2432
+ shorthand: ["insetX"]
2433
+ },
2434
+ insetBlock: {
2435
+ className: "inset-y",
2436
+ values: "spacing",
2437
+ group: "Position",
2438
+ shorthand: ["insetY"]
2439
+ },
2440
+ insetBlockEnd: {
2441
+ className: "inset-be",
2442
+ values: "spacing",
2443
+ group: "Position"
2444
+ },
2445
+ insetBlockStart: {
2446
+ className: "inset-bs",
2447
+ values: "spacing",
2448
+ group: "Position"
2449
+ },
2450
+ insetInlineEnd: {
2451
+ className: "inset-e",
2452
+ values: "spacing",
2453
+ group: "Position",
2454
+ shorthand: ["insetEnd", "end"]
2455
+ },
2456
+ insetInlineStart: {
2457
+ className: "inset-s",
2458
+ values: "spacing",
2459
+ group: "Position",
2460
+ shorthand: ["insetStart", "start"]
2461
+ },
2462
+ right: {
2463
+ className: "right",
2464
+ values: "spacing",
2465
+ group: "Position"
2466
+ },
2467
+ bottom: {
2468
+ className: "bottom",
2469
+ values: "spacing",
2470
+ group: "Position"
2471
+ },
2472
+ float: {
2473
+ className: "float",
2474
+ values: ["start", "end"],
2475
+ property: "float",
2476
+ group: "Position",
2477
+ transform(value) {
2478
+ if (value === "start") return {
2479
+ float: "left",
2480
+ "[dir=\"rtl\"] &": { float: "right" }
2481
+ };
2482
+ if (value === "end") return {
2483
+ float: "right",
2484
+ "[dir=\"rtl\"] &": { float: "left" }
2485
+ };
2486
+ return { float: value };
2487
+ }
2488
+ },
2489
+ visibility: {
2490
+ className: "vis",
2491
+ group: "Visibility"
2492
+ }
2493
+ };
2494
+ list = {
2495
+ listStyleType: {
2496
+ className: "li-t",
2497
+ group: "List"
2498
+ },
2499
+ listStylePosition: {
2500
+ className: "li-pos",
2501
+ group: "List"
2502
+ },
2503
+ listStyleImage: {
2504
+ className: "li-img",
2505
+ group: "List",
2506
+ values: "assets"
2507
+ },
2508
+ listStyle: {
2509
+ className: "li-s",
2510
+ group: "List"
2511
+ }
2512
+ };
2513
+ outline = {
2514
+ outlineWidth: {
2515
+ className: "ring-w",
2516
+ shorthand: "ringWidth",
2517
+ values: "borderWidths",
2518
+ group: "Border"
2519
+ },
2520
+ outlineColor: {
2521
+ className: "ring-c",
2522
+ values: "colors",
2523
+ group: "Color",
2524
+ shorthand: "ringColor",
2525
+ transform: createColorMixTransform("outlineColor")
2526
+ },
2527
+ outline: {
2528
+ className: "ring",
2529
+ shorthand: "ring",
2530
+ values: "borders",
2531
+ group: "Border",
2532
+ transform(value) {
2533
+ if (value === "none") return {
2534
+ outline: "2px solid transparent",
2535
+ outlineOffset: "2px"
2536
+ };
2537
+ return { outline: value };
2538
+ }
2539
+ },
2540
+ outlineOffset: {
2541
+ className: "ring-o",
2542
+ shorthand: "ringOffset",
2543
+ values: "spacing",
2544
+ group: "Border"
2545
+ }
2546
+ };
2547
+ polyfill = {
2548
+ appearance: {
2549
+ className: "ap",
2550
+ group: "Visibility",
2551
+ transform(value) {
2552
+ return {
2553
+ appearance: value,
2554
+ WebkitAppearance: value
2555
+ };
2556
+ }
2557
+ },
2558
+ backfaceVisibility: {
2559
+ className: "bfv",
2560
+ group: "Visibility",
2561
+ transform(value) {
2562
+ return {
2563
+ backfaceVisibility: value,
2564
+ WebkitBackfaceVisibility: value
2565
+ };
2566
+ }
2567
+ },
2568
+ clipPath: {
2569
+ className: "cp-path",
2570
+ group: "Other",
2571
+ transform(value) {
2572
+ return {
2573
+ clipPath: value,
2574
+ WebkitClipPath: value
2575
+ };
2576
+ }
2577
+ },
2578
+ hyphens: {
2579
+ className: "hy",
2580
+ group: "Other",
2581
+ transform(value) {
2582
+ return {
2583
+ hyphens: value,
2584
+ WebkitHyphens: value
2585
+ };
2586
+ }
2587
+ },
2588
+ mask: {
2589
+ className: "msk",
2590
+ group: "Other",
2591
+ transform(value) {
2592
+ return {
2593
+ mask: value,
2594
+ WebkitMask: value
2595
+ };
2596
+ }
2597
+ },
2598
+ maskImage: {
2599
+ className: "msk-i",
2600
+ group: "Other",
2601
+ transform(value) {
2602
+ return {
2603
+ maskImage: value,
2604
+ WebkitMaskImage: value
2605
+ };
2606
+ }
2607
+ },
2608
+ maskSize: {
2609
+ className: "msk-s",
2610
+ group: "Other",
2611
+ transform(value) {
2612
+ return {
2613
+ maskSize: value,
2614
+ WebkitMaskSize: value
2615
+ };
2616
+ }
2617
+ },
2618
+ textSizeAdjust: {
2619
+ className: "txt-adj",
2620
+ group: "Typography",
2621
+ transform(value) {
2622
+ return {
2623
+ textSizeAdjust: value,
2624
+ WebkitTextSizeAdjust: value
2625
+ };
2626
+ }
2627
+ }
2628
+ };
2629
+ widthValues = (theme) => ({
2630
+ auto: "auto",
2631
+ ...theme("sizes"),
2632
+ "1/2": "50%",
2633
+ "1/3": "33.333333%",
2634
+ "2/3": "66.666667%",
2635
+ "1/4": "25%",
2636
+ "2/4": "50%",
2637
+ "3/4": "75%",
2638
+ "1/5": "20%",
2639
+ "2/5": "40%",
2640
+ "3/5": "60%",
2641
+ "4/5": "80%",
2642
+ "1/6": "16.666667%",
2643
+ "2/6": "33.333333%",
2644
+ "3/6": "50%",
2645
+ "4/6": "66.666667%",
2646
+ "5/6": "83.333333%",
2647
+ "1/12": "8.333333%",
2648
+ "2/12": "16.666667%",
2649
+ "3/12": "25%",
2650
+ "4/12": "33.333333%",
2651
+ "5/12": "41.666667%",
2652
+ "6/12": "50%",
2653
+ "7/12": "58.333333%",
2654
+ "8/12": "66.666667%",
2655
+ "9/12": "75%",
2656
+ "10/12": "83.333333%",
2657
+ "11/12": "91.666667%",
2658
+ screen: "100vw"
2659
+ });
2660
+ heightValues = (theme) => ({
2661
+ auto: "auto",
2662
+ ...theme("sizes"),
2663
+ svh: "100svh",
2664
+ lvh: "100lvh",
2665
+ dvh: "100dvh",
2666
+ screen: "100vh",
2667
+ "1/2": "50%",
2668
+ "1/3": "33.333333%",
2669
+ "2/3": "66.666667%",
2670
+ "1/4": "25%",
2671
+ "2/4": "50%",
2672
+ "3/4": "75%",
2673
+ "1/5": "20%",
2674
+ "2/5": "40%",
2675
+ "3/5": "60%",
2676
+ "4/5": "80%",
2677
+ "1/6": "16.666667%",
2678
+ "2/6": "33.333333%",
2679
+ "3/6": "50%",
2680
+ "4/6": "66.666667%",
2681
+ "5/6": "83.333333%"
2682
+ });
2683
+ sizing = {
2684
+ width: {
2685
+ shorthand: "w",
2686
+ className: "w",
2687
+ group: "Width",
2688
+ values: widthValues
2689
+ },
2690
+ inlineSize: {
2691
+ className: "w-is",
2692
+ group: "Width",
2693
+ values: widthValues
2694
+ },
2695
+ minWidth: {
2696
+ shorthand: "minW",
2697
+ className: "min-w",
2698
+ group: "Width",
2699
+ values: widthValues
2700
+ },
2701
+ minInlineSize: {
2702
+ className: "min-w-is",
2703
+ group: "Width",
2704
+ values: widthValues
2705
+ },
2706
+ maxWidth: {
2707
+ shorthand: "maxW",
2708
+ className: "max-w",
2709
+ group: "Width",
2710
+ values: widthValues
2711
+ },
2712
+ maxInlineSize: {
2713
+ className: "max-w-is",
2714
+ group: "Width",
2715
+ values: widthValues
2716
+ },
2717
+ height: {
2718
+ shorthand: "h",
2719
+ className: "h",
2720
+ group: "Height",
2721
+ values: heightValues
2722
+ },
2723
+ blockSize: {
2724
+ className: "h-bs",
2725
+ group: "Height",
2726
+ values: heightValues
2727
+ },
2728
+ minHeight: {
2729
+ shorthand: "minH",
2730
+ className: "min-h",
2731
+ group: "Height",
2732
+ values: heightValues
2733
+ },
2734
+ minBlockSize: {
2735
+ className: "min-h-bs",
2736
+ group: "Height",
2737
+ values: heightValues
2738
+ },
2739
+ maxHeight: {
2740
+ shorthand: "maxH",
2741
+ className: "max-h",
2742
+ group: "Height",
2743
+ values: heightValues
2744
+ },
2745
+ maxBlockSize: {
2746
+ className: "max-b",
2747
+ group: "Height",
2748
+ values: heightValues
2749
+ },
2750
+ boxSize: {
2751
+ className: "size",
2752
+ group: "Width",
2753
+ values: widthValues,
2754
+ transform(value) {
2755
+ return {
2756
+ width: value,
2757
+ height: value
2758
+ };
2759
+ }
2760
+ }
2761
+ };
2762
+ marginValues = (theme) => ({
2763
+ auto: "auto",
2764
+ ...theme("spacing")
2765
+ });
2766
+ spacing$1 = {
2767
+ padding: {
2768
+ className: "p",
2769
+ shorthand: "p",
2770
+ values: "spacing",
2771
+ group: "Padding"
2772
+ },
2773
+ paddingLeft: {
2774
+ className: "pl",
2775
+ shorthand: "pl",
2776
+ values: "spacing",
2777
+ group: "Padding"
2778
+ },
2779
+ paddingRight: {
2780
+ className: "pr",
2781
+ shorthand: "pr",
2782
+ values: "spacing",
2783
+ group: "Padding"
2784
+ },
2785
+ paddingTop: {
2786
+ className: "pt",
2787
+ shorthand: "pt",
2788
+ values: "spacing",
2789
+ group: "Padding"
2790
+ },
2791
+ paddingBottom: {
2792
+ className: "pb",
2793
+ shorthand: "pb",
2794
+ values: "spacing",
2795
+ group: "Padding"
2796
+ },
2797
+ paddingBlock: {
2798
+ className: "py",
2799
+ values: "spacing",
2800
+ group: "Padding",
2801
+ shorthand: ["py", "paddingY"]
2802
+ },
2803
+ paddingBlockEnd: {
2804
+ className: "pbe",
2805
+ values: "spacing",
2806
+ group: "Padding"
2807
+ },
2808
+ paddingBlockStart: {
2809
+ className: "pbs",
2810
+ values: "spacing",
2811
+ group: "Padding"
2812
+ },
2813
+ paddingInline: {
2814
+ className: "px",
2815
+ values: "spacing",
2816
+ group: "Padding",
2817
+ shorthand: ["paddingX", "px"]
2818
+ },
2819
+ paddingInlineEnd: {
2820
+ className: "pe",
2821
+ shorthand: ["pe", "paddingEnd"],
2822
+ values: "spacing",
2823
+ group: "Padding"
2824
+ },
2825
+ paddingInlineStart: {
2826
+ className: "ps",
2827
+ shorthand: ["ps", "paddingStart"],
2828
+ values: "spacing",
2829
+ group: "Padding"
2830
+ },
2831
+ marginLeft: {
2832
+ className: "ml",
2833
+ shorthand: "ml",
2834
+ values: marginValues,
2835
+ group: "Margin"
2836
+ },
2837
+ marginRight: {
2838
+ className: "mr",
2839
+ shorthand: "mr",
2840
+ values: marginValues,
2841
+ group: "Margin"
2842
+ },
2843
+ marginTop: {
2844
+ className: "mt",
2845
+ shorthand: "mt",
2846
+ values: marginValues,
2847
+ group: "Margin"
2848
+ },
2849
+ marginBottom: {
2850
+ className: "mb",
2851
+ shorthand: "mb",
2852
+ values: marginValues,
2853
+ group: "Margin"
2854
+ },
2855
+ margin: {
2856
+ className: "m",
2857
+ shorthand: "m",
2858
+ values: marginValues,
2859
+ group: "Margin"
2860
+ },
2861
+ marginBlock: {
2862
+ className: "my",
2863
+ values: marginValues,
2864
+ group: "Margin",
2865
+ shorthand: ["my", "marginY"]
2866
+ },
2867
+ marginBlockEnd: {
2868
+ className: "mbe",
2869
+ values: marginValues,
2870
+ group: "Margin"
2871
+ },
2872
+ marginBlockStart: {
2873
+ className: "mbs",
2874
+ values: marginValues,
2875
+ group: "Margin"
2876
+ },
2877
+ marginInline: {
2878
+ className: "mx",
2879
+ values: marginValues,
2880
+ group: "Margin",
2881
+ shorthand: ["mx", "marginX"]
2882
+ },
2883
+ marginInlineEnd: {
2884
+ className: "me",
2885
+ shorthand: ["me", "marginEnd"],
2886
+ values: marginValues,
2887
+ group: "Margin"
2888
+ },
2889
+ marginInlineStart: {
2890
+ className: "ms",
2891
+ shorthand: ["ms", "marginStart"],
2892
+ values: marginValues,
2893
+ group: "Margin"
2894
+ },
2895
+ spaceX: {
2896
+ className: "sx",
2897
+ values: marginValues,
2898
+ property: "marginInlineStart",
2899
+ group: "Margin",
2900
+ transform(value) {
2901
+ return { "& > :not([hidden]) ~ :not([hidden])": {
2902
+ marginInlineStart: value,
2903
+ marginInlineEnd: "0px"
2904
+ } };
2905
+ }
2906
+ },
2907
+ spaceY: {
2908
+ className: "sy",
2909
+ values: marginValues,
2910
+ property: "marginBlockStart",
2911
+ group: "Margin",
2912
+ transform(value) {
2913
+ return { "& > :not([hidden]) ~ :not([hidden])": {
2914
+ marginTop: value,
2915
+ marginBottom: "0px"
2916
+ } };
2917
+ }
2918
+ }
2919
+ };
2920
+ svg = {
2921
+ fill: {
2922
+ className: "fill",
2923
+ values: "colors",
2924
+ group: "Color",
2925
+ transform: createColorMixTransform("fill")
2926
+ },
2927
+ stroke: {
2928
+ className: "stk",
2929
+ values: "colors",
2930
+ group: "Color",
2931
+ transform: createColorMixTransform("stroke")
2932
+ },
2933
+ strokeWidth: {
2934
+ className: "stk-w",
2935
+ values: "borderWidths",
2936
+ group: "Border"
2937
+ },
2938
+ strokeDasharray: {
2939
+ className: "stk-dsh",
2940
+ group: "Border"
2941
+ },
2942
+ strokeDashoffset: {
2943
+ className: "stk-do",
2944
+ group: "Border"
2945
+ },
2946
+ strokeLinecap: {
2947
+ className: "stk-lc",
2948
+ group: "Border"
2949
+ },
2950
+ strokeLinejoin: {
2951
+ className: "stk-lj",
2952
+ group: "Border"
2953
+ },
2954
+ strokeMiterlimit: {
2955
+ className: "stk-ml",
2956
+ group: "Border"
2957
+ },
2958
+ strokeOpacity: {
2959
+ className: "stk-op",
2960
+ group: "Border"
2961
+ }
2962
+ };
2963
+ tables = {
2964
+ borderCollapse: {
2965
+ className: "bd-cl",
2966
+ group: "Table"
2967
+ },
2968
+ borderSpacing: {
2969
+ className: "bd-sp",
2970
+ group: "Table",
2971
+ values(theme) {
2972
+ return {
2973
+ ...theme("spacing"),
2974
+ auto: "var(--border-spacing-x) var(--border-spacing-y)"
2975
+ };
2976
+ }
2977
+ },
2978
+ borderSpacingX: {
2979
+ className: "bd-sx",
2980
+ values: "spacing",
2981
+ group: "Table",
2982
+ transform(value) {
2983
+ return { "--border-spacing-x": value };
2984
+ }
2985
+ },
2986
+ borderSpacingY: {
2987
+ className: "bd-sy",
2988
+ values: "spacing",
2989
+ group: "Table",
2990
+ transform(value) {
2991
+ return { "--border-spacing-y": value };
2992
+ }
2993
+ },
2994
+ tableLayout: {
2995
+ className: "tbl",
2996
+ group: "Table"
2997
+ }
2998
+ };
2999
+ positiveFractions = {
3000
+ "1/2": "50%",
3001
+ "1/3": "33.333333%",
3002
+ "2/3": "66.666667%",
3003
+ "1/4": "25%",
3004
+ "2/4": "50%",
3005
+ "3/4": "75%",
3006
+ full: "100%"
3007
+ };
3008
+ negativeFractions = Object.fromEntries(Object.entries(positiveFractions).map(([key, value]) => [`-${key}`, `-${value}`]));
3009
+ fractions = {
3010
+ ...positiveFractions,
3011
+ ...negativeFractions
3012
+ };
3013
+ transforms = {
3014
+ transformOrigin: {
3015
+ className: "trf-o",
3016
+ group: "Transform"
3017
+ },
3018
+ transformBox: {
3019
+ className: "trf-b",
3020
+ group: "Transform"
3021
+ },
3022
+ transformStyle: {
3023
+ className: "trf-s",
3024
+ group: "Transform"
3025
+ },
3026
+ transform: {
3027
+ className: "trf",
3028
+ group: "Transform"
3029
+ },
3030
+ rotate: {
3031
+ className: "rotate",
3032
+ group: "Transform",
3033
+ property: "rotate",
3034
+ values: {
3035
+ auto: "var(--rotate-x) var(--rotate-y)",
3036
+ "auto-3d": "var(--rotate-x) var(--rotate-y) var(--rotate-z)"
3037
+ }
3038
+ },
3039
+ rotateX: {
3040
+ className: "rotate-x",
3041
+ group: "Transform",
3042
+ property: "rotate",
3043
+ transform(value) {
3044
+ return { "--rotate-x": value };
3045
+ }
3046
+ },
3047
+ rotateY: {
3048
+ className: "rotate-y",
3049
+ group: "Transform",
3050
+ property: "rotate",
3051
+ transform(value) {
3052
+ return { "--rotate-y": value };
3053
+ }
3054
+ },
3055
+ rotateZ: {
3056
+ className: "rotate-z",
3057
+ group: "Transform",
3058
+ property: "rotate",
3059
+ transform(value) {
3060
+ return { "--rotate-z": value };
3061
+ }
3062
+ },
3063
+ scale: {
3064
+ className: "scale",
3065
+ group: "Transform",
3066
+ property: "scale",
3067
+ values: { auto: "var(--scale-x) var(--scale-y)" }
3068
+ },
3069
+ scaleX: {
3070
+ className: "scale-x",
3071
+ group: "Transform",
3072
+ transform(value) {
3073
+ return { "--scale-x": value };
3074
+ }
3075
+ },
3076
+ scaleY: {
3077
+ className: "scale-y",
3078
+ group: "Transform",
3079
+ transform(value) {
3080
+ return { "--scale-y": value };
3081
+ }
3082
+ },
3083
+ translate: {
3084
+ className: "translate",
3085
+ group: "Transform",
3086
+ property: "translate",
3087
+ values: {
3088
+ auto: "var(--translate-x) var(--translate-y)",
3089
+ "auto-3d": "var(--translate-x) var(--translate-y) var(--translate-z)"
3090
+ }
3091
+ },
3092
+ translateX: {
3093
+ shorthand: "x",
3094
+ className: "translate-x",
3095
+ group: "Transform",
3096
+ values(theme) {
3097
+ return {
3098
+ ...theme("spacing"),
3099
+ ...fractions
3100
+ };
3101
+ },
3102
+ transform(value) {
3103
+ return { "--translate-x": value };
3104
+ }
3105
+ },
3106
+ translateY: {
3107
+ shorthand: "y",
3108
+ className: "translate-y",
3109
+ group: "Transform",
3110
+ values(theme) {
3111
+ return {
3112
+ ...theme("spacing"),
3113
+ ...fractions
3114
+ };
3115
+ },
3116
+ transform(value) {
3117
+ return { "--translate-y": value };
3118
+ }
3119
+ },
3120
+ translateZ: {
3121
+ shorthand: "z",
3122
+ className: "translate-z",
3123
+ group: "Transform",
3124
+ values(theme) {
3125
+ return {
3126
+ ...theme("spacing"),
3127
+ ...fractions
3128
+ };
3129
+ },
3130
+ transform(value) {
3131
+ return { "--translate-z": value };
3132
+ }
3133
+ }
3134
+ };
3135
+ createTransition = (value) => ({
3136
+ transitionProperty: `var(--transition-prop, ${value})`,
3137
+ transitionTimingFunction: "var(--transition-easing, cubic-bezier(0.4, 0, 0.2, 1))",
3138
+ transitionDuration: "var(--transition-duration, 150ms)"
3139
+ });
3140
+ transitionMap = {
3141
+ all: createTransition("all"),
3142
+ common: createTransition("color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter"),
3143
+ size: createTransition("width, height, min-width, max-width, min-height, max-height"),
3144
+ position: createTransition("left, right, top, bottom, inset, inset-inline, inset-block"),
3145
+ background: createTransition("background, background-color, background-image, background-position"),
3146
+ colors: createTransition("color, background-color, border-color, outline-color, text-decoration-color, fill, stroke"),
3147
+ opacity: createTransition("opacity"),
3148
+ shadow: createTransition("box-shadow"),
3149
+ transform: createTransition("transform")
3150
+ };
3151
+ transitions = {
3152
+ transitionTimingFunction: {
3153
+ className: "trs-tmf",
3154
+ values: "easings",
3155
+ group: "Transition",
3156
+ transform(value) {
3157
+ return {
3158
+ "--transition-easing": value,
3159
+ transitionTimingFunction: value
3160
+ };
3161
+ }
3162
+ },
3163
+ transitionDelay: {
3164
+ className: "trs-dly",
3165
+ values: "durations",
3166
+ group: "Transition"
3167
+ },
3168
+ transitionDuration: {
3169
+ className: "trs-dur",
3170
+ values: "durations",
3171
+ group: "Transition",
3172
+ transform(value) {
3173
+ return {
3174
+ "--transition-duration": value,
3175
+ transitionDuration: value
3176
+ };
3177
+ }
3178
+ },
3179
+ transitionProperty: {
3180
+ className: "trs-prop",
3181
+ group: "Transition",
3182
+ values: {
3183
+ common: "color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",
3184
+ colors: "color, background-color, border-color, outline-color, text-decoration-color, fill, stroke",
3185
+ size: "width, height, min-width, max-width, min-height, max-height",
3186
+ position: "left, right, top, bottom, inset, inset-inline, inset-block",
3187
+ background: "background, background-color, background-image, background-position"
3188
+ },
3189
+ transform(value) {
3190
+ return {
3191
+ "--transition-prop": value,
3192
+ transitionProperty: value
3193
+ };
3194
+ }
3195
+ },
3196
+ transition: {
3197
+ className: "trs",
3198
+ values: Object.keys(transitionMap),
3199
+ group: "Transition",
3200
+ transform(value) {
3201
+ return transitionMap[value] ?? { transition: value };
3202
+ }
3203
+ },
3204
+ animation: {
3205
+ className: "anim",
3206
+ values: "animations",
3207
+ group: "Animation"
3208
+ },
3209
+ animationName: {
3210
+ className: "anim-n",
3211
+ values: "keyframes",
3212
+ group: "Animation"
3213
+ },
3214
+ animationTimingFunction: {
3215
+ className: "anim-tmf",
3216
+ values: "easings",
3217
+ group: "Animation"
3218
+ },
3219
+ animationDuration: {
3220
+ className: "anim-dur",
3221
+ values: "durations",
3222
+ group: "Animation"
3223
+ },
3224
+ animationDelay: {
3225
+ className: "anim-dly",
3226
+ values: "durations",
3227
+ group: "Animation"
3228
+ },
3229
+ animationPlayState: {
3230
+ className: "anim-ps",
3231
+ group: "Animation"
3232
+ },
3233
+ animationComposition: {
3234
+ className: "anim-comp",
3235
+ group: "Animation"
3236
+ },
3237
+ animationFillMode: {
3238
+ className: "anim-fm",
3239
+ group: "Animation"
3240
+ },
3241
+ animationDirection: {
3242
+ className: "anim-dir",
3243
+ group: "Animation"
3244
+ },
3245
+ animationIterationCount: {
3246
+ className: "anim-ic",
3247
+ group: "Animation"
3248
+ },
3249
+ animationRange: {
3250
+ className: "anim-r",
3251
+ group: "Animation"
3252
+ },
3253
+ animationState: {
3254
+ className: "anim-s",
3255
+ group: "Animation"
3256
+ },
3257
+ animationRangeStart: {
3258
+ className: "anim-rs",
3259
+ group: "Animation"
3260
+ },
3261
+ animationRangeEnd: {
3262
+ className: "anim-re",
3263
+ group: "Animation"
3264
+ },
3265
+ animationTimeline: {
3266
+ className: "anim-tl",
3267
+ group: "Animation"
3268
+ }
3269
+ };
3270
+ typography = {
3271
+ color: {
3272
+ className: "c",
3273
+ values: "colors",
3274
+ group: "Color",
3275
+ transform: createColorMixTransform("color")
3276
+ },
3277
+ fontFamily: {
3278
+ className: "ff",
3279
+ values: "fonts",
3280
+ group: "Typography"
3281
+ },
3282
+ fontSize: {
3283
+ className: "fs",
3284
+ values: "fontSizes",
3285
+ group: "Typography"
3286
+ },
3287
+ fontSizeAdjust: {
3288
+ className: "fs-a",
3289
+ group: "Typography"
3290
+ },
3291
+ fontPalette: {
3292
+ className: "fp",
3293
+ group: "Typography"
3294
+ },
3295
+ fontKerning: {
3296
+ className: "fk",
3297
+ group: "Typography"
3298
+ },
3299
+ fontFeatureSettings: {
3300
+ className: "ff-s",
3301
+ group: "Typography"
3302
+ },
3303
+ fontWeight: {
3304
+ className: "fw",
3305
+ values: "fontWeights",
3306
+ group: "Typography"
3307
+ },
3308
+ fontSmoothing: {
3309
+ className: "fsmt",
3310
+ group: "Typography",
3311
+ values: {
3312
+ antialiased: "antialiased",
3313
+ "subpixel-antialiased": "auto"
3314
+ },
3315
+ transform(value) {
3316
+ return { WebkitFontSmoothing: value };
3317
+ }
3318
+ },
3319
+ fontVariant: {
3320
+ className: "fv",
3321
+ group: "Typography"
3322
+ },
3323
+ fontVariantAlternates: {
3324
+ className: "fv-alt",
3325
+ group: "Typography"
3326
+ },
3327
+ fontVariantCaps: {
3328
+ className: "fv-caps",
3329
+ group: "Typography"
3330
+ },
3331
+ fontVariationSettings: {
3332
+ className: "fv-s",
3333
+ group: "Typography"
3334
+ },
3335
+ fontVariantNumeric: {
3336
+ className: "fv-num",
3337
+ group: "Typography"
3338
+ },
3339
+ letterSpacing: {
3340
+ className: "ls",
3341
+ values: "letterSpacings",
3342
+ group: "Typography"
3343
+ },
3344
+ lineHeight: {
3345
+ className: "lh",
3346
+ values: "lineHeights",
3347
+ group: "Typography"
3348
+ },
3349
+ textAlign: {
3350
+ className: "ta",
3351
+ group: "Typography"
3352
+ },
3353
+ textDecoration: {
3354
+ className: "td",
3355
+ group: "Typography"
3356
+ },
3357
+ textDecorationColor: {
3358
+ className: "td-c",
3359
+ values: "colors",
3360
+ transform: createColorMixTransform("textDecorationColor"),
3361
+ group: "Typography"
3362
+ },
3363
+ textEmphasisColor: {
3364
+ className: "te-c",
3365
+ values: "colors",
3366
+ transform: createColorMixTransform("textEmphasisColor"),
3367
+ group: "Typography"
3368
+ },
3369
+ textDecorationStyle: {
3370
+ className: "td-s",
3371
+ group: "Typography"
3372
+ },
3373
+ textDecorationThickness: {
3374
+ className: "td-t",
3375
+ group: "Typography"
3376
+ },
3377
+ textUnderlineOffset: {
3378
+ className: "tu-o",
3379
+ group: "Typography"
3380
+ },
3381
+ textTransform: {
3382
+ className: "tt",
3383
+ group: "Typography"
3384
+ },
3385
+ textIndent: {
3386
+ className: "ti",
3387
+ group: "Typography",
3388
+ values: "spacing"
3389
+ },
3390
+ textShadow: {
3391
+ className: "tsh",
3392
+ values: "shadows",
3393
+ group: "Typography"
3394
+ },
3395
+ textShadowColor: {
3396
+ shorthand: "textShadowColor",
3397
+ className: "tsh-c",
3398
+ values: "colors",
3399
+ transform: createColorMixTransform("--text-shadow-color"),
3400
+ group: "Typography"
3401
+ },
3402
+ WebkitTextFillColor: {
3403
+ className: "wktf-c",
3404
+ values: "colors",
3405
+ transform: createColorMixTransform("WebkitTextFillColor"),
3406
+ group: "Typography"
3407
+ },
3408
+ textOverflow: {
3409
+ className: "tov",
3410
+ group: "Typography"
3411
+ },
3412
+ verticalAlign: {
3413
+ className: "va",
3414
+ group: "Typography"
3415
+ },
3416
+ wordBreak: {
3417
+ className: "wb",
3418
+ group: "Typography"
3419
+ },
3420
+ textWrap: {
3421
+ className: "tw",
3422
+ values: [
3423
+ "wrap",
3424
+ "balance",
3425
+ "nowrap"
3426
+ ],
3427
+ group: "Typography",
3428
+ transform(value) {
3429
+ return { textWrap: value };
3430
+ }
3431
+ },
3432
+ truncate: {
3433
+ className: "trunc",
3434
+ values: { type: "boolean" },
3435
+ group: "Typography",
3436
+ transform(value) {
3437
+ if (!value) return {};
3438
+ return {
3439
+ overflow: "hidden",
3440
+ textOverflow: "ellipsis",
3441
+ whiteSpace: "nowrap"
3442
+ };
3443
+ }
3444
+ },
3445
+ lineClamp: {
3446
+ className: "lc",
3447
+ group: "Typography",
3448
+ transform(value) {
3449
+ if (value === "none") return { WebkitLineClamp: "unset" };
3450
+ return {
3451
+ overflow: "hidden",
3452
+ display: "-webkit-box",
3453
+ WebkitLineClamp: value,
3454
+ WebkitBoxOrient: "vertical"
3455
+ };
3456
+ }
3457
+ }
3458
+ };
3459
+ utilities = Object.assign({}, layout, display, flexGrid, spacing$1, outline, focusRing, divide, sizing, typography, list, background, backgroundGradients, border, effects, tables, transitions, transforms, interactivity, svg, helpers, polyfill, container, cursor);
3460
+ definePreset$1 = (preset) => preset;
3461
+ preset$1 = definePreset$1({
3462
+ name: "@bamboocss/preset-base",
3463
+ conditions: conditions$1,
3464
+ utilities,
3465
+ patterns,
3466
+ globalCss
3467
+ });
3468
+ }));
3469
+
3470
+ //#endregion
3471
+ //#region ../preset-bamboo/dist/index.mjs
3472
+ var breakpoints, containerSizes, keyframes, animations, aspectRatios, borders, colors, shadows, spacing, largeSizes, sizes, fontSizes, fontWeights, letterSpacings, lineHeights, fonts, textStyles$1, defineTokens, tokens$1, definePreset, preset;
3473
+ var init_dist$1 = __esmMin((() => {
3474
+ breakpoints = {
3475
+ sm: "640px",
3476
+ md: "768px",
3477
+ lg: "1024px",
3478
+ xl: "1280px",
3479
+ "2xl": "1536px"
3480
+ };
3481
+ containerSizes = {
3482
+ xs: "320px",
3483
+ sm: "384px",
3484
+ md: "448px",
3485
+ lg: "512px",
3486
+ xl: "576px",
3487
+ "2xl": "672px",
3488
+ "3xl": "768px",
3489
+ "4xl": "896px",
3490
+ "5xl": "1024px",
3491
+ "6xl": "1152px",
3492
+ "7xl": "1280px",
3493
+ "8xl": "1440px"
3494
+ };
3495
+ keyframes = {
3496
+ spin: { to: { transform: "rotate(360deg)" } },
3497
+ ping: { "75%, 100%": {
3498
+ transform: "scale(2)",
3499
+ opacity: "0"
3500
+ } },
3501
+ pulse: { "50%": { opacity: ".5" } },
3502
+ bounce: {
3503
+ "0%, 100%": {
3504
+ transform: "translateY(-25%)",
3505
+ animationTimingFunction: "cubic-bezier(0.8,0,1,1)"
3506
+ },
3507
+ "50%": {
3508
+ transform: "none",
3509
+ animationTimingFunction: "cubic-bezier(0,0,0.2,1)"
3510
+ }
3511
+ }
3512
+ };
3513
+ animations = {
3514
+ spin: { value: "spin 1s linear infinite" },
3515
+ ping: { value: "ping 1s cubic-bezier(0, 0, 0.2, 1) infinite" },
3516
+ pulse: { value: "pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite" },
3517
+ bounce: { value: "bounce 1s infinite" }
3518
+ };
3519
+ aspectRatios = {
3520
+ square: { value: "1 / 1" },
3521
+ landscape: { value: "4 / 3" },
3522
+ portrait: { value: "3 / 4" },
3523
+ wide: { value: "16 / 9" },
3524
+ ultrawide: { value: "18 / 5" },
3525
+ golden: { value: "1.618 / 1" }
3526
+ };
3527
+ borders = { none: { value: "none" } };
3528
+ colors = {
3529
+ current: { value: "currentColor" },
3530
+ black: { value: "#000" },
3531
+ white: { value: "#fff" },
3532
+ transparent: { value: "rgb(0 0 0 / 0)" },
3533
+ rose: {
3534
+ 50: { value: "#fff1f2" },
3535
+ 100: { value: "#ffe4e6" },
3536
+ 200: { value: "#fecdd3" },
3537
+ 300: { value: "#fda4af" },
3538
+ 400: { value: "#fb7185" },
3539
+ 500: { value: "#f43f5e" },
3540
+ 600: { value: "#e11d48" },
3541
+ 700: { value: "#be123c" },
3542
+ 800: { value: "#9f1239" },
3543
+ 900: { value: "#881337" },
3544
+ 950: { value: "#4c0519" }
3545
+ },
3546
+ pink: {
3547
+ 50: { value: "#fdf2f8" },
3548
+ 100: { value: "#fce7f3" },
3549
+ 200: { value: "#fbcfe8" },
3550
+ 300: { value: "#f9a8d4" },
3551
+ 400: { value: "#f472b6" },
3552
+ 500: { value: "#ec4899" },
3553
+ 600: { value: "#db2777" },
3554
+ 700: { value: "#be185d" },
3555
+ 800: { value: "#9d174d" },
3556
+ 900: { value: "#831843" },
3557
+ 950: { value: "#500724" }
3558
+ },
3559
+ fuchsia: {
3560
+ 50: { value: "#fdf4ff" },
3561
+ 100: { value: "#fae8ff" },
3562
+ 200: { value: "#f5d0fe" },
3563
+ 300: { value: "#f0abfc" },
3564
+ 400: { value: "#e879f9" },
3565
+ 500: { value: "#d946ef" },
3566
+ 600: { value: "#c026d3" },
3567
+ 700: { value: "#a21caf" },
3568
+ 800: { value: "#86198f" },
3569
+ 900: { value: "#701a75" },
3570
+ 950: { value: "#4a044e" }
3571
+ },
3572
+ purple: {
3573
+ 50: { value: "#faf5ff" },
3574
+ 100: { value: "#f3e8ff" },
3575
+ 200: { value: "#e9d5ff" },
3576
+ 300: { value: "#d8b4fe" },
3577
+ 400: { value: "#c084fc" },
3578
+ 500: { value: "#a855f7" },
3579
+ 600: { value: "#9333ea" },
3580
+ 700: { value: "#7e22ce" },
3581
+ 800: { value: "#6b21a8" },
3582
+ 900: { value: "#581c87" },
3583
+ 950: { value: "#3b0764" }
3584
+ },
3585
+ violet: {
3586
+ 50: { value: "#f5f3ff" },
3587
+ 100: { value: "#ede9fe" },
3588
+ 200: { value: "#ddd6fe" },
3589
+ 300: { value: "#c4b5fd" },
3590
+ 400: { value: "#a78bfa" },
3591
+ 500: { value: "#8b5cf6" },
3592
+ 600: { value: "#7c3aed" },
3593
+ 700: { value: "#6d28d9" },
3594
+ 800: { value: "#5b21b6" },
3595
+ 900: { value: "#4c1d95" },
3596
+ 950: { value: "#2e1065" }
3597
+ },
3598
+ indigo: {
3599
+ 50: { value: "#eef2ff" },
3600
+ 100: { value: "#e0e7ff" },
3601
+ 200: { value: "#c7d2fe" },
3602
+ 300: { value: "#a5b4fc" },
3603
+ 400: { value: "#818cf8" },
3604
+ 500: { value: "#6366f1" },
3605
+ 600: { value: "#4f46e5" },
3606
+ 700: { value: "#4338ca" },
3607
+ 800: { value: "#3730a3" },
3608
+ 900: { value: "#312e81" },
3609
+ 950: { value: "#1e1b4b" }
3610
+ },
3611
+ blue: {
3612
+ 50: { value: "#eff6ff" },
3613
+ 100: { value: "#dbeafe" },
3614
+ 200: { value: "#bfdbfe" },
3615
+ 300: { value: "#93c5fd" },
3616
+ 400: { value: "#60a5fa" },
3617
+ 500: { value: "#3b82f6" },
3618
+ 600: { value: "#2563eb" },
3619
+ 700: { value: "#1d4ed8" },
3620
+ 800: { value: "#1e40af" },
3621
+ 900: { value: "#1e3a8a" },
3622
+ 950: { value: "#172554" }
3623
+ },
3624
+ sky: {
3625
+ 50: { value: "#f0f9ff" },
3626
+ 100: { value: "#e0f2fe" },
3627
+ 200: { value: "#bae6fd" },
3628
+ 300: { value: "#7dd3fc" },
3629
+ 400: { value: "#38bdf8" },
3630
+ 500: { value: "#0ea5e9" },
3631
+ 600: { value: "#0284c7" },
3632
+ 700: { value: "#0369a1" },
3633
+ 800: { value: "#075985" },
3634
+ 900: { value: "#0c4a6e" },
3635
+ 950: { value: "#082f49" }
3636
+ },
3637
+ cyan: {
3638
+ 50: { value: "#ecfeff" },
3639
+ 100: { value: "#cffafe" },
3640
+ 200: { value: "#a5f3fc" },
3641
+ 300: { value: "#67e8f9" },
3642
+ 400: { value: "#22d3ee" },
3643
+ 500: { value: "#06b6d4" },
3644
+ 600: { value: "#0891b2" },
3645
+ 700: { value: "#0e7490" },
3646
+ 800: { value: "#155e75" },
3647
+ 900: { value: "#164e63" },
3648
+ 950: { value: "#083344" }
3649
+ },
3650
+ teal: {
3651
+ 50: { value: "#f0fdfa" },
3652
+ 100: { value: "#ccfbf1" },
3653
+ 200: { value: "#99f6e4" },
3654
+ 300: { value: "#5eead4" },
3655
+ 400: { value: "#2dd4bf" },
3656
+ 500: { value: "#14b8a6" },
3657
+ 600: { value: "#0d9488" },
3658
+ 700: { value: "#0f766e" },
3659
+ 800: { value: "#115e59" },
3660
+ 900: { value: "#134e4a" },
3661
+ 950: { value: "#042f2e" }
3662
+ },
3663
+ emerald: {
3664
+ 50: { value: "#ecfdf5" },
3665
+ 100: { value: "#d1fae5" },
3666
+ 200: { value: "#a7f3d0" },
3667
+ 300: { value: "#6ee7b7" },
3668
+ 400: { value: "#34d399" },
3669
+ 500: { value: "#10b981" },
3670
+ 600: { value: "#059669" },
3671
+ 700: { value: "#047857" },
3672
+ 800: { value: "#065f46" },
3673
+ 900: { value: "#064e3b" },
3674
+ 950: { value: "#022c22" }
3675
+ },
3676
+ green: {
3677
+ 50: { value: "#f0fdf4" },
3678
+ 100: { value: "#dcfce7" },
3679
+ 200: { value: "#bbf7d0" },
3680
+ 300: { value: "#86efac" },
3681
+ 400: { value: "#4ade80" },
3682
+ 500: { value: "#22c55e" },
3683
+ 600: { value: "#16a34a" },
3684
+ 700: { value: "#15803d" },
3685
+ 800: { value: "#166534" },
3686
+ 900: { value: "#14532d" },
3687
+ 950: { value: "#052e16" }
3688
+ },
3689
+ lime: {
3690
+ 50: { value: "#f7fee7" },
3691
+ 100: { value: "#ecfccb" },
3692
+ 200: { value: "#d9f99d" },
3693
+ 300: { value: "#bef264" },
3694
+ 400: { value: "#a3e635" },
3695
+ 500: { value: "#84cc16" },
3696
+ 600: { value: "#65a30d" },
3697
+ 700: { value: "#4d7c0f" },
3698
+ 800: { value: "#3f6212" },
3699
+ 900: { value: "#365314" },
3700
+ 950: { value: "#1a2e05" }
3701
+ },
3702
+ yellow: {
3703
+ 50: { value: "#fefce8" },
3704
+ 100: { value: "#fef9c3" },
3705
+ 200: { value: "#fef08a" },
3706
+ 300: { value: "#fde047" },
3707
+ 400: { value: "#facc15" },
3708
+ 500: { value: "#eab308" },
3709
+ 600: { value: "#ca8a04" },
3710
+ 700: { value: "#a16207" },
3711
+ 800: { value: "#854d0e" },
3712
+ 900: { value: "#713f12" },
3713
+ 950: { value: "#422006" }
3714
+ },
3715
+ amber: {
3716
+ 50: { value: "#fffbeb" },
3717
+ 100: { value: "#fef3c7" },
3718
+ 200: { value: "#fde68a" },
3719
+ 300: { value: "#fcd34d" },
3720
+ 400: { value: "#fbbf24" },
3721
+ 500: { value: "#f59e0b" },
3722
+ 600: { value: "#d97706" },
3723
+ 700: { value: "#b45309" },
3724
+ 800: { value: "#92400e" },
3725
+ 900: { value: "#78350f" },
3726
+ 950: { value: "#451a03" }
3727
+ },
3728
+ orange: {
3729
+ 50: { value: "#fff7ed" },
3730
+ 100: { value: "#ffedd5" },
3731
+ 200: { value: "#fed7aa" },
3732
+ 300: { value: "#fdba74" },
3733
+ 400: { value: "#fb923c" },
3734
+ 500: { value: "#f97316" },
3735
+ 600: { value: "#ea580c" },
3736
+ 700: { value: "#c2410c" },
3737
+ 800: { value: "#9a3412" },
3738
+ 900: { value: "#7c2d12" },
3739
+ 950: { value: "#431407" }
3740
+ },
3741
+ red: {
3742
+ 50: { value: "#fef2f2" },
3743
+ 100: { value: "#fee2e2" },
3744
+ 200: { value: "#fecaca" },
3745
+ 300: { value: "#fca5a5" },
3746
+ 400: { value: "#f87171" },
3747
+ 500: { value: "#ef4444" },
3748
+ 600: { value: "#dc2626" },
3749
+ 700: { value: "#b91c1c" },
3750
+ 800: { value: "#991b1b" },
3751
+ 900: { value: "#7f1d1d" },
3752
+ 950: { value: "#450a0a" }
3753
+ },
3754
+ neutral: {
3755
+ 50: { value: "#fafafa" },
3756
+ 100: { value: "#f5f5f5" },
3757
+ 200: { value: "#e5e5e5" },
3758
+ 300: { value: "#d4d4d4" },
3759
+ 400: { value: "#a3a3a3" },
3760
+ 500: { value: "#737373" },
3761
+ 600: { value: "#525252" },
3762
+ 700: { value: "#404040" },
3763
+ 800: { value: "#262626" },
3764
+ 900: { value: "#171717" },
3765
+ 950: { value: "#0a0a0a" }
3766
+ },
3767
+ stone: {
3768
+ 50: { value: "#fafaf9" },
3769
+ 100: { value: "#f5f5f4" },
3770
+ 200: { value: "#e7e5e4" },
3771
+ 300: { value: "#d6d3d1" },
3772
+ 400: { value: "#a8a29e" },
3773
+ 500: { value: "#78716c" },
3774
+ 600: { value: "#57534e" },
3775
+ 700: { value: "#44403c" },
3776
+ 800: { value: "#292524" },
3777
+ 900: { value: "#1c1917" },
3778
+ 950: { value: "#0c0a09" }
3779
+ },
3780
+ zinc: {
3781
+ 50: { value: "#fafafa" },
3782
+ 100: { value: "#f4f4f5" },
3783
+ 200: { value: "#e4e4e7" },
3784
+ 300: { value: "#d4d4d8" },
3785
+ 400: { value: "#a1a1aa" },
3786
+ 500: { value: "#71717a" },
3787
+ 600: { value: "#52525b" },
3788
+ 700: { value: "#3f3f46" },
3789
+ 800: { value: "#27272a" },
3790
+ 900: { value: "#18181b" },
3791
+ 950: { value: "#09090b" }
3792
+ },
3793
+ gray: {
3794
+ 50: { value: "#f9fafb" },
3795
+ 100: { value: "#f3f4f6" },
3796
+ 200: { value: "#e5e7eb" },
3797
+ 300: { value: "#d1d5db" },
3798
+ 400: { value: "#9ca3af" },
3799
+ 500: { value: "#6b7280" },
3800
+ 600: { value: "#4b5563" },
3801
+ 700: { value: "#374151" },
3802
+ 800: { value: "#1f2937" },
3803
+ 900: { value: "#111827" },
3804
+ 950: { value: "#030712" }
3805
+ },
3806
+ slate: {
3807
+ 50: { value: "#f8fafc" },
3808
+ 100: { value: "#f1f5f9" },
3809
+ 200: { value: "#e2e8f0" },
3810
+ 300: { value: "#cbd5e1" },
3811
+ 400: { value: "#94a3b8" },
3812
+ 500: { value: "#64748b" },
3813
+ 600: { value: "#475569" },
3814
+ 700: { value: "#334155" },
3815
+ 800: { value: "#1e293b" },
3816
+ 900: { value: "#0f172a" },
3817
+ 950: { value: "#020617" }
3818
+ }
3819
+ };
3820
+ shadows = {
3821
+ "2xs": { value: "0 1px rgb(0 0 0 / 0.05)" },
3822
+ xs: { value: "0 1px 2px 0 rgb(0 0 0 / 0.05)" },
3823
+ sm: { value: ["0 1px 3px 0 rgb(0 0 0 / 0.1)", "0 1px 2px -1px rgb(0 0 0 / 0.1)"] },
3824
+ md: { value: ["0 4px 6px -1px rgb(0 0 0 / 0.1)", "0 2px 4px -2px rgb(0 0 0 / 0.1)"] },
3825
+ lg: { value: ["0 10px 15px -3px rgb(0 0 0 / 0.1)", "0 4px 6px -4px rgb(0 0 0 / 0.1)"] },
3826
+ xl: { value: ["0 20px 25px -5px rgb(0 0 0 / 0.1)", "0 8px 10px -6px rgb(0 0 0 / 0.1)"] },
3827
+ "2xl": { value: "0 25px 50px -12px rgb(0 0 0 / 0.25)" },
3828
+ "inset-2xs": { value: "inset 0 1px rgb(0 0 0 / 0.05)" },
3829
+ "inset-xs": { value: "inset 0 1px 1px rgb(0 0 0 / 0.05)" },
3830
+ "inset-sm": { value: "inset 0 2px 4px rgb(0 0 0 / 0.05)" }
3831
+ };
3832
+ spacing = {
3833
+ 0: { value: "0rem" },
3834
+ .5: { value: "0.125rem" },
3835
+ 1: { value: "0.25rem" },
3836
+ 1.5: { value: "0.375rem" },
3837
+ 2: { value: "0.5rem" },
3838
+ 2.5: { value: "0.625rem" },
3839
+ 3: { value: "0.75rem" },
3840
+ 3.5: { value: "0.875rem" },
3841
+ 4: { value: "1rem" },
3842
+ 4.5: { value: "1.125rem" },
3843
+ 5: { value: "1.25rem" },
3844
+ 5.5: { value: "1.375rem" },
3845
+ 6: { value: "1.5rem" },
3846
+ 7: { value: "1.75rem" },
3847
+ 8: { value: "2rem" },
3848
+ 9: { value: "2.25rem" },
3849
+ 10: { value: "2.5rem" },
3850
+ 11: { value: "2.75rem" },
3851
+ 12: { value: "3rem" },
3852
+ 14: { value: "3.5rem" },
3853
+ 16: { value: "4rem" },
3854
+ 20: { value: "5rem" },
3855
+ 24: { value: "6rem" },
3856
+ 28: { value: "7rem" },
3857
+ 32: { value: "8rem" },
3858
+ 36: { value: "9rem" },
3859
+ 40: { value: "10rem" },
3860
+ 44: { value: "11rem" },
3861
+ 48: { value: "12rem" },
3862
+ 52: { value: "13rem" },
3863
+ 56: { value: "14rem" },
3864
+ 60: { value: "15rem" },
3865
+ 64: { value: "16rem" },
3866
+ 72: { value: "18rem" },
3867
+ 80: { value: "20rem" },
3868
+ 96: { value: "24rem" }
3869
+ };
3870
+ largeSizes = {
3871
+ xs: { value: "20rem" },
3872
+ sm: { value: "24rem" },
3873
+ md: { value: "28rem" },
3874
+ lg: { value: "32rem" },
3875
+ xl: { value: "36rem" },
3876
+ "2xl": { value: "42rem" },
3877
+ "3xl": { value: "48rem" },
3878
+ "4xl": { value: "56rem" },
3879
+ "5xl": { value: "64rem" },
3880
+ "6xl": { value: "72rem" },
3881
+ "7xl": { value: "80rem" },
3882
+ "8xl": { value: "90rem" },
3883
+ prose: { value: "65ch" }
3884
+ };
3885
+ sizes = {
3886
+ ...spacing,
3887
+ ...largeSizes,
3888
+ full: { value: "100%" },
3889
+ min: { value: "min-content" },
3890
+ max: { value: "max-content" },
3891
+ fit: { value: "fit-content" }
3892
+ };
3893
+ fontSizes = {
3894
+ "2xs": { value: "0.5rem" },
3895
+ xs: { value: "0.75rem" },
3896
+ sm: { value: "0.875rem" },
3897
+ md: { value: "1rem" },
3898
+ lg: { value: "1.125rem" },
3899
+ xl: { value: "1.25rem" },
3900
+ "2xl": { value: "1.5rem" },
3901
+ "3xl": { value: "1.875rem" },
3902
+ "4xl": { value: "2.25rem" },
3903
+ "5xl": { value: "3rem" },
3904
+ "6xl": { value: "3.75rem" },
3905
+ "7xl": { value: "4.5rem" },
3906
+ "8xl": { value: "6rem" },
3907
+ "9xl": { value: "8rem" }
3908
+ };
3909
+ fontWeights = {
3910
+ thin: { value: "100" },
3911
+ extralight: { value: "200" },
3912
+ light: { value: "300" },
3913
+ normal: { value: "400" },
3914
+ medium: { value: "500" },
3915
+ semibold: { value: "600" },
3916
+ bold: { value: "700" },
3917
+ extrabold: { value: "800" },
3918
+ black: { value: "900" }
3919
+ };
3920
+ letterSpacings = {
3921
+ tighter: { value: "-0.05em" },
3922
+ tight: { value: "-0.025em" },
3923
+ normal: { value: "0em" },
3924
+ wide: { value: "0.025em" },
3925
+ wider: { value: "0.05em" },
3926
+ widest: { value: "0.1em" }
3927
+ };
3928
+ lineHeights = {
3929
+ none: { value: "1" },
3930
+ tight: { value: "1.25" },
3931
+ snug: { value: "1.375" },
3932
+ normal: { value: "1.5" },
3933
+ relaxed: { value: "1.625" },
3934
+ loose: { value: "2" }
3935
+ };
3936
+ fonts = {
3937
+ sans: { value: [
3938
+ "ui-sans-serif",
3939
+ "system-ui",
3940
+ "-apple-system",
3941
+ "BlinkMacSystemFont",
3942
+ "\"Segoe UI\"",
3943
+ "Roboto",
3944
+ "\"Helvetica Neue\"",
3945
+ "Arial",
3946
+ "\"Noto Sans\"",
3947
+ "sans-serif",
3948
+ "\"Apple Color Emoji\"",
3949
+ "\"Segoe UI Emoji\"",
3950
+ "\"Segoe UI Symbol\"",
3951
+ "\"Noto Color Emoji\""
3952
+ ] },
3953
+ serif: { value: [
3954
+ "ui-serif",
3955
+ "Georgia",
3956
+ "Cambria",
3957
+ "\"Times New Roman\"",
3958
+ "Times",
3959
+ "serif"
3960
+ ] },
3961
+ mono: { value: [
3962
+ "ui-monospace",
3963
+ "SFMono-Regular",
3964
+ "Menlo",
3965
+ "Monaco",
3966
+ "Consolas",
3967
+ "\"Liberation Mono\"",
3968
+ "\"Courier New\"",
3969
+ "monospace"
3970
+ ] }
3971
+ };
3972
+ textStyles$1 = {
3973
+ xs: { value: {
3974
+ fontSize: "0.75rem",
3975
+ lineHeight: "calc(1 / 0.75)"
3976
+ } },
3977
+ sm: { value: {
3978
+ fontSize: "0.875rem",
3979
+ lineHeight: "calc(1.25 / 0.875)"
3980
+ } },
3981
+ md: { value: {
3982
+ fontSize: "1rem",
3983
+ lineHeight: "calc(1.5 / 1)"
3984
+ } },
3985
+ lg: { value: {
3986
+ fontSize: "1.125rem",
3987
+ lineHeight: "calc(1.75 / 1.125)"
3988
+ } },
3989
+ xl: { value: {
3990
+ fontSize: "1.25rem",
3991
+ lineHeight: "calc(1.75 / 1.25)"
3992
+ } },
3993
+ "2xl": { value: {
3994
+ fontSize: "1.5rem",
3995
+ lineHeight: "calc(2 / 1.5)"
3996
+ } },
3997
+ "3xl": { value: {
3998
+ fontSize: "1.875rem",
3999
+ lineHeight: "calc(2.25 / 1.875)"
4000
+ } },
4001
+ "4xl": { value: {
4002
+ fontSize: "2.25rem",
4003
+ lineHeight: "calc(2.5 / 2.25)"
4004
+ } },
4005
+ "5xl": { value: {
4006
+ fontSize: "3rem",
4007
+ lineHeight: "1"
4008
+ } },
4009
+ "6xl": { value: {
4010
+ fontSize: "3.75rem",
4011
+ lineHeight: "1"
4012
+ } },
4013
+ "7xl": { value: {
4014
+ fontSize: "4.5rem",
4015
+ lineHeight: "1"
4016
+ } },
4017
+ "8xl": { value: {
4018
+ fontSize: "6rem",
4019
+ lineHeight: "1"
4020
+ } },
4021
+ "9xl": { value: {
4022
+ fontSize: "8rem",
4023
+ lineHeight: "1"
4024
+ } }
4025
+ };
4026
+ defineTokens = (v) => v;
4027
+ tokens$1 = defineTokens({
4028
+ aspectRatios,
4029
+ borders,
4030
+ easings: {
4031
+ default: { value: "cubic-bezier(0.4, 0, 0.2, 1)" },
4032
+ linear: { value: "linear" },
4033
+ in: { value: "cubic-bezier(0.4, 0, 1, 1)" },
4034
+ out: { value: "cubic-bezier(0, 0, 0.2, 1)" },
4035
+ "in-out": { value: "cubic-bezier(0.4, 0, 0.2, 1)" }
4036
+ },
4037
+ durations: {
4038
+ fastest: { value: "50ms" },
4039
+ faster: { value: "100ms" },
4040
+ fast: { value: "150ms" },
4041
+ normal: { value: "200ms" },
4042
+ slow: { value: "300ms" },
4043
+ slower: { value: "400ms" },
4044
+ slowest: { value: "500ms" }
4045
+ },
4046
+ radii: {
4047
+ xs: { value: "0.125rem" },
4048
+ sm: { value: "0.25rem" },
4049
+ md: { value: "0.375rem" },
4050
+ lg: { value: "0.5rem" },
4051
+ xl: { value: "0.75rem" },
4052
+ "2xl": { value: "1rem" },
4053
+ "3xl": { value: "1.5rem" },
4054
+ "4xl": { value: "2rem" },
4055
+ full: { value: "9999px" }
4056
+ },
4057
+ fontWeights,
4058
+ lineHeights,
4059
+ fonts,
4060
+ letterSpacings,
4061
+ fontSizes,
4062
+ shadows,
4063
+ colors,
4064
+ blurs: {
4065
+ xs: { value: "4px" },
4066
+ sm: { value: "8px" },
4067
+ md: { value: "12px" },
4068
+ lg: { value: "16px" },
4069
+ xl: { value: "24px" },
4070
+ "2xl": { value: "40px" },
4071
+ "3xl": { value: "64px" }
4072
+ },
4073
+ spacing,
4074
+ sizes,
4075
+ animations
4076
+ });
4077
+ definePreset = (config) => config;
4078
+ preset = definePreset({
4079
+ name: "@bamboocss/preset-bamboo",
4080
+ theme: {
4081
+ keyframes,
4082
+ breakpoints,
4083
+ tokens: tokens$1,
4084
+ textStyles: textStyles$1,
4085
+ containerSizes
4086
+ }
4087
+ });
4088
+ }));
4089
+
4090
+ //#endregion
4091
+ //#region tests/fixtures/config.ts
4092
+ var conditions, theme, tokens, textStyles, fixturePreset;
4093
+ var init_config = __esmMin((() => {
4094
+ init_recipes();
4095
+ init_semantic_tokens();
4096
+ init_slot_recipes();
4097
+ init_dist$2();
4098
+ init_dist$1();
4099
+ conditions = {
4100
+ ...preset$1.conditions,
4101
+ dark: "[data-theme=dark] &, .dark &, &.dark, &[data-theme=dark]",
4102
+ light: "[data-theme=light] &, .light &, &.light, &[data-theme=light]",
4103
+ materialTheme: "[data-color=material] &",
4104
+ pastelTheme: "[data-color=pastel] &"
4105
+ };
4106
+ theme = preset.theme;
4107
+ tokens = {
4108
+ ...theme.tokens,
4109
+ colors: {
4110
+ ...theme.tokens?.colors,
4111
+ deep: { test: {
4112
+ pool: {
4113
+ poller: { value: "#fff" },
4114
+ tall: { value: "$dfdf" }
4115
+ },
4116
+ yam: { value: "%555" }
4117
+ } }
4118
+ }
4119
+ };
4120
+ textStyles = { headline: {
4121
+ h1: { value: {
4122
+ fontSize: "2rem",
4123
+ fontWeight: "bold"
4124
+ } },
4125
+ h2: { value: {
4126
+ fontSize: {
4127
+ base: "1.5rem",
4128
+ lg: "2rem"
4129
+ },
4130
+ fontWeight: "bold"
4131
+ } }
4132
+ } };
4133
+ fixturePreset = {
4134
+ ...preset$1,
4135
+ conditions,
4136
+ theme: {
4137
+ ...theme,
4138
+ recipes,
4139
+ semanticTokens,
4140
+ slotRecipes,
4141
+ textStyles,
4142
+ tokens
4143
+ }
4144
+ };
4145
+ }));
4146
+
4147
+ //#endregion
4148
+ //#region ../cli/dist/index.mjs
4149
+ function defineConfig(config) {
4150
+ return Object.assign(config, { name: "__bamboo.config__" });
4151
+ }
4152
+ var init_dist = __esmMin((() => {}));
4153
+
4154
+ //#endregion
4155
+ //#region tests/fixtures/create-context.ts
4156
+ var sandboxConfig, config, fixtureDefaults, createGeneratorContext;
4157
+ var init_create_context = __esmMin((() => {
4158
+ init_config();
4159
+ init_dist();
4160
+ sandboxConfig = defineConfig({
4161
+ exclude: [],
4162
+ globalCss: {
4163
+ "*": {
4164
+ fontFamily: "Inter",
4165
+ margin: "0"
4166
+ },
4167
+ a: {
4168
+ color: "inherit",
4169
+ textDecoration: "none"
4170
+ }
4171
+ },
4172
+ include: ["./src/**/*.{tsx,jsx}", "./pages/**/*.{jsx,tsx}"],
4173
+ jsxFactory: "bamboo",
4174
+ jsxFramework: "react",
4175
+ outdir: "styled-system",
4176
+ preflight: true,
4177
+ theme: { extend: {
4178
+ recipes: { button: {
4179
+ base: { fontSize: "lg" },
4180
+ className: "button",
4181
+ compoundVariants: [{
4182
+ css: { fontSize: "12px" },
4183
+ size: "sm",
4184
+ variant: "primary"
4185
+ }, {
4186
+ css: {
4187
+ fontSize: "24px",
4188
+ fontWeight: "bold",
4189
+ padding: 4
4190
+ },
4191
+ state: "focused",
4192
+ variant: ["primary", "danger"]
4193
+ }],
4194
+ description: "A button styles",
4195
+ jsx: [
4196
+ "Button",
4197
+ "ListedButton",
4198
+ /WithRegex$/,
4199
+ "PrimaryButtonLike"
4200
+ ],
4201
+ variants: {
4202
+ rounded: { true: { borderRadius: "md" } },
4203
+ size: {
4204
+ md: {
4205
+ borderRadius: "md",
4206
+ padding: "4"
4207
+ },
4208
+ sm: {
4209
+ borderRadius: "sm",
4210
+ padding: "2"
4211
+ }
4212
+ },
4213
+ state: {
4214
+ focused: { color: "green" },
4215
+ hovered: { color: "pink.400" }
4216
+ },
4217
+ variant: {
4218
+ danger: {
4219
+ backgroundColor: "red.500",
4220
+ color: "white"
4221
+ },
4222
+ primary: {
4223
+ backgroundColor: "blue.500",
4224
+ color: "white"
4225
+ },
4226
+ purple: {
4227
+ backgroundColor: "purple.500",
4228
+ color: "amber.300"
4229
+ },
4230
+ secondary: {
4231
+ backgroundColor: "green.500",
4232
+ color: "pink.300"
4233
+ }
4234
+ }
4235
+ }
4236
+ } },
4237
+ semanticTokens: { colors: {
4238
+ bg: { value: {
4239
+ _osDark: "{colors.gray.400}",
4240
+ base: "{colors.gray.600}"
4241
+ } },
4242
+ text: { value: {
4243
+ _osDark: "{colors.gray.400}",
4244
+ base: "{colors.gray.600}"
4245
+ } }
4246
+ } },
4247
+ tokens: { colors: { red: { "400": {
4248
+ deprecated: true,
4249
+ description: "red color",
4250
+ value: "#ff0000"
4251
+ } } } }
4252
+ } }
4253
+ });
4254
+ config = {
4255
+ ...fixturePreset,
4256
+ cssVarRoot: ":where(html)",
4257
+ cwd: "",
4258
+ include: [],
4259
+ jsxFramework: "react",
4260
+ outdir: "styled-system"
4261
+ };
4262
+ fixtureDefaults = {
4263
+ config,
4264
+ dependencies: [],
4265
+ deserialize: () => parseJson(stringifyJson(config)),
4266
+ hooks: {},
4267
+ path: "",
4268
+ serialized: stringifyJson(config)
4269
+ };
4270
+ createGeneratorContext = (userConfig) => {
4271
+ const resolvedConfig = mergeConfigs([
4272
+ fixtureDefaults.config,
4273
+ sandboxConfig,
4274
+ { importMap: "./bamboo" },
4275
+ ...userConfig ? [userConfig] : []
4276
+ ]);
4277
+ return new Generator({
4278
+ ...fixtureDefaults,
4279
+ config: resolvedConfig
4280
+ });
4281
+ };
4282
+ }));
4283
+
4284
+ //#endregion
4285
+ //#region src/utils/worker.ts
4286
+ async function getContext(options) {
4287
+ if (process.env.NODE_ENV === "test") return createGeneratorContext({
4288
+ exclude: ["**/Invalid.tsx", "**/bamboo.config.ts"],
4289
+ importMap: "./bamboo",
4290
+ include: ["**/*"],
4291
+ jsxFactory: "styled"
4292
+ });
4293
+ else {
4294
+ const configPath = findConfig({ cwd: options.configPath ?? options.currentFile });
4295
+ if (!contextCache[configPath]) contextCache[configPath] = _getContext(configPath);
4296
+ return contextCache[configPath];
4297
+ }
4298
+ }
4299
+ async function _getContext(configPath) {
4300
+ if (!configPath) throw new Error("Invalid config path");
4301
+ return new Generator(await loadConfig({
4302
+ cwd: path.dirname(configPath),
4303
+ file: configPath
4304
+ }));
4305
+ }
4306
+ function run(action, options, ...args) {
4307
+ return runAsync(action, options, ...args);
4308
+ }
4309
+ async function runAsync(action, options, ...args) {
4310
+ const context = await getContext(options);
4311
+ switch (action) {
4312
+ case "filterDeprecatedTokens": return filterDeprecatedTokens(context, ...args);
4313
+ case "filterImports": return filterImports(context, ...args);
4314
+ case "filterInvalidTokens": return filterInvalidTokens(context, ...args);
4315
+ case "getJsxFactory": return getJsxFactory(context);
4316
+ case "getPropCategory": return getPropertyCategory(context, ...args);
4317
+ case "isColorAttribute": return isColorAttribute(context, ...args);
4318
+ case "isColorToken": return isColorToken(context, ...args);
4319
+ case "isValidFile": return isValidFile(context, options.currentFile);
4320
+ case "isValidProperty": return isValidProperty(context, ...args);
4321
+ case "matchFile": return matchFile(context, ...args);
4322
+ case "matchImports": return matchImports(context, ...args);
4323
+ case "resolveLongHand": return resolveLongHand(context, ...args);
4324
+ case "resolveShorthands": return resolveShorthands(context, ...args);
4325
+ }
4326
+ }
4327
+ var contextCache, filterDeprecatedTokens, filterInvalidTokens, getPropertyCategory, isColorAttribute, isColorToken, isValidFile, isValidProperty, matchFile, matchImports, filterImports, reverseShorthandsMapCache, getReverseShorthandsMap, resolveLongHand, resolveShorthands, getJsxFactory;
4328
+ var init_worker = __esmMin((() => {
4329
+ init_utils();
4330
+ init_create_context();
4331
+ contextCache = {};
4332
+ filterDeprecatedTokens = (context, tokens) => {
4333
+ return tokens.filter((token) => {
4334
+ const value = typeof token === "string" ? token : token.category + "." + token.value;
4335
+ return context.utility.tokens.isDeprecated(value);
4336
+ });
4337
+ };
4338
+ filterInvalidTokens = (context, paths) => {
4339
+ return paths.filter((path) => !context.utility.tokens.view.get(path));
4340
+ };
4341
+ getPropertyCategory = (context, _attribute) => {
4342
+ const attribute = resolveLongHand(context, _attribute) || _attribute;
4343
+ const attributeConfig = context.utility.config[attribute];
4344
+ return typeof attributeConfig?.values === "string" ? attributeConfig.values : void 0;
4345
+ };
4346
+ isColorAttribute = (context, _attribute) => {
4347
+ return getPropertyCategory(context, _attribute) === "colors";
4348
+ };
4349
+ isColorToken = (context, value) => {
4350
+ return Boolean(context.utility.tokens.view.categoryMap.get("colors")?.get(value));
4351
+ };
4352
+ isValidFile = (context, fileName) => {
4353
+ const { exclude, include } = context.config;
4354
+ const cwd = context.config.cwd || process.cwd();
4355
+ const relativePath = path.isAbsolute(fileName) ? path.relative(cwd, fileName) : fileName;
4356
+ return micromatch.isMatch(relativePath, include, {
4357
+ dot: true,
4358
+ ignore: exclude
4359
+ });
4360
+ };
4361
+ isValidProperty = (context, name, patternName) => {
4362
+ if (context.isValidProperty(name)) return true;
4363
+ if (!patternName) return false;
4364
+ if (patternName === context.config.jsxFactory) return false;
4365
+ const pattern = context.patterns.details.find((p) => p.baseName === patternName || p.jsx.includes(patternName))?.config.properties;
4366
+ if (!pattern) return false;
4367
+ return Object.keys(pattern).includes(name);
4368
+ };
4369
+ matchFile = (context, name, imports) => {
4370
+ return context.imports.file(imports).match(name);
4371
+ };
4372
+ matchImports = (context, result) => {
4373
+ return context.imports.match(result, (module_) => {
4374
+ const { tsOptions } = context.parserOptions;
4375
+ if (!tsOptions?.pathMappings) return;
4376
+ return resolveTsPathPattern(tsOptions.pathMappings, module_);
4377
+ });
4378
+ };
4379
+ filterImports = (context, imports) => {
4380
+ return imports.filter((imp) => context.imports.match(imp, (module_) => {
4381
+ const { tsOptions } = context.parserOptions;
4382
+ if (!tsOptions?.pathMappings) return;
4383
+ return resolveTsPathPattern(tsOptions.pathMappings, module_);
4384
+ }));
4385
+ };
4386
+ reverseShorthandsMapCache = /* @__PURE__ */ new WeakMap();
4387
+ getReverseShorthandsMap = (context) => {
4388
+ let reverseMap = reverseShorthandsMapCache.get(context);
4389
+ if (!reverseMap) {
4390
+ reverseMap = /* @__PURE__ */ new Map();
4391
+ const shorthands = context.utility.getPropShorthandsMap();
4392
+ for (const [key, values] of shorthands) for (const value of values) reverseMap.set(value, key);
4393
+ reverseShorthandsMapCache.set(context, reverseMap);
4394
+ }
4395
+ return reverseMap;
4396
+ };
4397
+ resolveLongHand = (context, name) => {
4398
+ return getReverseShorthandsMap(context).get(name);
4399
+ };
4400
+ resolveShorthands = (context, name) => {
4401
+ return context.utility.getPropShorthandsMap().get(name);
4402
+ };
4403
+ getJsxFactory = (context) => {
4404
+ return context.config.jsxFactory;
4405
+ };
4406
+ runAsWorker(run);
4407
+ }));
4408
+
4409
+ //#endregion
4410
+ //#region src/utils/index.ts
4411
+ var createRule, isBase, _syncAction, cache, syncAction;
4412
+ var init_utils = __esmMin((() => {
4413
+ createRule = ESLintUtils.RuleCreator((name) => `https://github.com/bamboocss/bamboo/blob/main/packages/eslint-plugin/docs/rules/${name}.md`);
4414
+ isBase = process.env.NODE_ENV !== "test" || import.meta.url.endsWith("dist/index.js");
4415
+ _syncAction = createSyncFn(join(fileURLToPath(new URL(isBase ? "./" : "../../dist", import.meta.url)), "utils/worker.mjs"));
4416
+ cache = /* @__PURE__ */ new Map();
4417
+ syncAction = ((...args) => {
4418
+ const cacheKey = JSON.stringify(args);
4419
+ if (cache.has(cacheKey)) return cache.get(cacheKey);
4420
+ try {
4421
+ const result = _syncAction(...args);
4422
+ cache.set(cacheKey, result);
4423
+ return result;
4424
+ } catch (error) {
4425
+ console.error("syncAction error:", error);
4426
+ return;
4427
+ }
4428
+ });
4429
+ }));
4430
+
4431
+ //#endregion
4432
+ export { init_worker as a, __commonJSMin as c, getContext as i, __esmMin as l, init_utils as n, run as o, syncAction as r, runAsync as s, createRule as t };
4433
+ //# sourceMappingURL=utils-CwjhPHe9.mjs.map