windrunner 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +15 -0
- package/README.md +233 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.esm.js +3534 -0
- package/dist/index.js +3563 -0
- package/dist/index.min.js +40 -0
- package/package.json +57 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,3563 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/index.js
|
|
20
|
+
var index_exports = {};
|
|
21
|
+
__export(index_exports, {
|
|
22
|
+
compileClass: () => compileClass,
|
|
23
|
+
createWindrunner: () => createWindrunner,
|
|
24
|
+
parseClass: () => parseClass,
|
|
25
|
+
windrunner: () => windrunner
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(index_exports);
|
|
28
|
+
|
|
29
|
+
// src/variants.js
|
|
30
|
+
var variants = {
|
|
31
|
+
accentColor: ["hover", "focus", "not-hover", "not-focus", "not-disabled"],
|
|
32
|
+
accessibility: ["hover", "focus"],
|
|
33
|
+
aspect: ["hover", "focus"],
|
|
34
|
+
backgroundColor: ["hover", "focus", "not-hover", "not-focus", "not-disabled"],
|
|
35
|
+
blur: ["hover", "focus"],
|
|
36
|
+
borderColor: ["hover", "focus", "not-hover", "not-focus", "not-disabled"],
|
|
37
|
+
boxShadow: ["hover", "focus"],
|
|
38
|
+
brightness: ["hover", "focus"],
|
|
39
|
+
caretColor: ["hover", "focus", "not-hover", "not-focus", "not-disabled"],
|
|
40
|
+
contrast: ["hover", "focus"],
|
|
41
|
+
dropShadow: ["hover", "focus"],
|
|
42
|
+
fill: ["hover", "focus", "not-hover", "not-focus", "not-disabled"],
|
|
43
|
+
flexBasis: ["hover", "focus"],
|
|
44
|
+
gradientColorStops: ["hover", "focus", "not-hover", "not-focus", "not-disabled"],
|
|
45
|
+
grayscale: ["hover", "focus"],
|
|
46
|
+
hueRotate: ["hover", "focus"],
|
|
47
|
+
insetRing: ["hover", "focus"],
|
|
48
|
+
insetShadow: ["hover", "focus"],
|
|
49
|
+
invert: ["hover", "focus"],
|
|
50
|
+
opacity: ["hover", "focus"],
|
|
51
|
+
outlineColor: ["hover", "focus", "not-hover", "not-focus", "not-disabled"],
|
|
52
|
+
outlineOffset: ["hover", "focus"],
|
|
53
|
+
outlineStyle: ["hover", "focus"],
|
|
54
|
+
outlineWidth: ["hover", "focus"],
|
|
55
|
+
placeholderColor: ["hover", "focus", "not-hover", "not-focus", "not-disabled"],
|
|
56
|
+
ringColor: ["hover", "focus", "not-hover", "not-focus", "not-disabled"],
|
|
57
|
+
ringOffsetColor: ["hover", "focus", "not-hover", "not-focus", "not-disabled"],
|
|
58
|
+
ringOffsetWidth: ["hover", "focus"],
|
|
59
|
+
ringWidth: ["hover", "focus"],
|
|
60
|
+
rotate: ["hover", "focus"],
|
|
61
|
+
saturate: ["hover", "focus"],
|
|
62
|
+
scale: ["hover", "focus"],
|
|
63
|
+
sepia: ["hover", "focus"],
|
|
64
|
+
skew: ["hover", "focus"],
|
|
65
|
+
stroke: ["hover", "focus", "not-hover", "not-focus", "not-disabled"],
|
|
66
|
+
strokeWidth: ["hover", "focus"],
|
|
67
|
+
textColor: ["hover", "focus", "not-hover", "not-focus", "not-disabled"],
|
|
68
|
+
textDecoration: ["focus", "hover"],
|
|
69
|
+
textDecorationColor: ["focus", "hover", "not-hover", "not-focus", "not-disabled"],
|
|
70
|
+
textDecorationStyle: ["focus", "hover"],
|
|
71
|
+
textDecorationThickness: ["focus", "hover"],
|
|
72
|
+
textShadowBlur: ["hover", "focus"],
|
|
73
|
+
textShadowColor: ["hover", "focus", "not-hover", "not-focus", "not-disabled"],
|
|
74
|
+
textShadowOpacity: ["hover", "focus"],
|
|
75
|
+
textShadowX: ["hover", "focus"],
|
|
76
|
+
textShadowY: ["hover", "focus"],
|
|
77
|
+
touchAction: ["hover", "focus"],
|
|
78
|
+
mask: ["hover", "focus"],
|
|
79
|
+
transform3d: ["hover", "focus"],
|
|
80
|
+
translate: ["hover", "focus"],
|
|
81
|
+
zIndex: ["hover", "focus"]
|
|
82
|
+
};
|
|
83
|
+
var variants_default = variants;
|
|
84
|
+
|
|
85
|
+
// src/theme.js
|
|
86
|
+
var theme = {
|
|
87
|
+
accentColor: ({ theme: theme2 }) => ({
|
|
88
|
+
...theme2("colors"),
|
|
89
|
+
auto: "auto"
|
|
90
|
+
}),
|
|
91
|
+
aspectRatio: {
|
|
92
|
+
auto: "auto",
|
|
93
|
+
square: "1 / 1",
|
|
94
|
+
video: "16 / 9"
|
|
95
|
+
},
|
|
96
|
+
backdropBlur: ({ theme: theme2 }) => theme2("blur"),
|
|
97
|
+
backdropBrightness: ({ theme: theme2 }) => theme2("brightness"),
|
|
98
|
+
backdropContrast: ({ theme: theme2 }) => theme2("contrast"),
|
|
99
|
+
backdropGrayscale: ({ theme: theme2 }) => theme2("grayscale"),
|
|
100
|
+
backdropHueRotate: ({ theme: theme2 }) => theme2("hueRotate"),
|
|
101
|
+
backdropInvert: ({ theme: theme2 }) => theme2("invert"),
|
|
102
|
+
backdropOpacity: ({ theme: theme2 }) => theme2("opacity"),
|
|
103
|
+
backdropSaturate: ({ theme: theme2 }) => theme2("saturate"),
|
|
104
|
+
backdropSepia: ({ theme: theme2 }) => theme2("sepia"),
|
|
105
|
+
backgroundColor: ({ theme: theme2 }) => theme2("colors"),
|
|
106
|
+
backgroundImage: {
|
|
107
|
+
none: "none",
|
|
108
|
+
"linear-to-t": "linear-gradient(to top, var(--tw-gradient-stops))",
|
|
109
|
+
"linear-to-tr": "linear-gradient(to top right, var(--tw-gradient-stops))",
|
|
110
|
+
"linear-to-r": "linear-gradient(to right, var(--tw-gradient-stops))",
|
|
111
|
+
"linear-to-br": "linear-gradient(to bottom right, var(--tw-gradient-stops))",
|
|
112
|
+
"linear-to-b": "linear-gradient(to bottom, var(--tw-gradient-stops))",
|
|
113
|
+
"linear-to-bl": "linear-gradient(to bottom left, var(--tw-gradient-stops))",
|
|
114
|
+
"linear-to-l": "linear-gradient(to left, var(--tw-gradient-stops))",
|
|
115
|
+
"linear-to-tl": "linear-gradient(to top left, var(--tw-gradient-stops))"
|
|
116
|
+
},
|
|
117
|
+
backgroundPosition: {
|
|
118
|
+
bottom: "bottom",
|
|
119
|
+
center: "center",
|
|
120
|
+
left: "left",
|
|
121
|
+
"left-bottom": "left bottom",
|
|
122
|
+
"left-top": "left top",
|
|
123
|
+
right: "right",
|
|
124
|
+
"right-bottom": "right bottom",
|
|
125
|
+
"right-top": "right top",
|
|
126
|
+
top: "top"
|
|
127
|
+
},
|
|
128
|
+
backgroundSize: {
|
|
129
|
+
auto: "auto",
|
|
130
|
+
cover: "cover",
|
|
131
|
+
contain: "contain"
|
|
132
|
+
},
|
|
133
|
+
blur: {
|
|
134
|
+
0: "0",
|
|
135
|
+
none: "0",
|
|
136
|
+
sm: "4px",
|
|
137
|
+
DEFAULT: "8px",
|
|
138
|
+
md: "12px",
|
|
139
|
+
lg: "16px",
|
|
140
|
+
xl: "24px",
|
|
141
|
+
"2xl": "40px",
|
|
142
|
+
"3xl": "64px"
|
|
143
|
+
},
|
|
144
|
+
borderColor: ({ theme: theme2 }) => ({
|
|
145
|
+
...theme2("colors"),
|
|
146
|
+
DEFAULT: "#e5e7eb"
|
|
147
|
+
}),
|
|
148
|
+
borderRadius: {
|
|
149
|
+
none: "0px",
|
|
150
|
+
sm: "0.125rem",
|
|
151
|
+
DEFAULT: "0.25rem",
|
|
152
|
+
md: "0.375rem",
|
|
153
|
+
lg: "0.5rem",
|
|
154
|
+
xl: "0.75rem",
|
|
155
|
+
"2xl": "1rem",
|
|
156
|
+
"3xl": "1.5rem",
|
|
157
|
+
full: "9999px"
|
|
158
|
+
},
|
|
159
|
+
borderSpacing: ({ theme: theme2 }) => ({
|
|
160
|
+
...theme2("spacing")
|
|
161
|
+
}),
|
|
162
|
+
borderWidth: {
|
|
163
|
+
DEFAULT: "1px",
|
|
164
|
+
0: "0px",
|
|
165
|
+
2: "2px",
|
|
166
|
+
4: "4px",
|
|
167
|
+
8: "8px"
|
|
168
|
+
},
|
|
169
|
+
boxShadow: {
|
|
170
|
+
sm: "0 1px 2px 0 rgb(0 0 0 / 0.05)",
|
|
171
|
+
DEFAULT: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",
|
|
172
|
+
md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
|
|
173
|
+
lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
|
|
174
|
+
xl: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",
|
|
175
|
+
"2xl": "0 25px 50px -12px rgb(0 0 0 / 0.25)",
|
|
176
|
+
inner: "inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",
|
|
177
|
+
none: "none"
|
|
178
|
+
},
|
|
179
|
+
boxShadowColor: ({ theme: theme2 }) => theme2("colors"),
|
|
180
|
+
brightness: {
|
|
181
|
+
0: "0",
|
|
182
|
+
50: ".5",
|
|
183
|
+
75: ".75",
|
|
184
|
+
90: ".9",
|
|
185
|
+
95: ".95",
|
|
186
|
+
100: "1",
|
|
187
|
+
105: "1.05",
|
|
188
|
+
110: "1.1",
|
|
189
|
+
125: "1.25",
|
|
190
|
+
150: "1.5",
|
|
191
|
+
200: "2"
|
|
192
|
+
},
|
|
193
|
+
caretColor: ({ theme: theme2 }) => theme2("colors"),
|
|
194
|
+
colors: {
|
|
195
|
+
transparent: "transparent",
|
|
196
|
+
current: "currentColor",
|
|
197
|
+
black: "oklch(0% 0 0)",
|
|
198
|
+
white: "oklch(100% 0 0)",
|
|
199
|
+
slate: {
|
|
200
|
+
50: "oklch(0.984 0.003 247.9)",
|
|
201
|
+
100: "oklch(0.968 0.007 247.9)",
|
|
202
|
+
200: "oklch(0.929 0.013 255.5)",
|
|
203
|
+
300: "oklch(0.869 0.022 252.9)",
|
|
204
|
+
400: "oklch(0.704 0.04 256.8)",
|
|
205
|
+
500: "oklch(0.554 0.046 257.4)",
|
|
206
|
+
600: "oklch(0.446 0.043 257.3)",
|
|
207
|
+
700: "oklch(0.372 0.044 257.4)",
|
|
208
|
+
800: "oklch(0.279 0.041 260.0)",
|
|
209
|
+
900: "oklch(0.208 0.042 265.8)",
|
|
210
|
+
950: "oklch(0.129 0.042 264.7)"
|
|
211
|
+
},
|
|
212
|
+
gray: {
|
|
213
|
+
50: "oklch(0.985 0.002 247.9)",
|
|
214
|
+
100: "oklch(0.967 0.003 264.5)",
|
|
215
|
+
200: "oklch(0.928 0.006 264.5)",
|
|
216
|
+
300: "oklch(0.872 0.010 258.3)",
|
|
217
|
+
400: "oklch(0.707 0.022 261.3)",
|
|
218
|
+
500: "oklch(0.551 0.027 264.4)",
|
|
219
|
+
600: "oklch(0.446 0.030 256.8)",
|
|
220
|
+
700: "oklch(0.373 0.034 259.7)",
|
|
221
|
+
800: "oklch(0.278 0.033 256.8)",
|
|
222
|
+
900: "oklch(0.210 0.034 264.7)",
|
|
223
|
+
950: "oklch(0.130 0.028 261.7)"
|
|
224
|
+
},
|
|
225
|
+
zinc: {
|
|
226
|
+
50: "oklch(0.985 0.000 0.0)",
|
|
227
|
+
100: "oklch(0.967 0.001 286.4)",
|
|
228
|
+
200: "oklch(0.920 0.004 286.3)",
|
|
229
|
+
300: "oklch(0.871 0.006 286.3)",
|
|
230
|
+
400: "oklch(0.705 0.015 286.1)",
|
|
231
|
+
500: "oklch(0.552 0.016 285.9)",
|
|
232
|
+
600: "oklch(0.442 0.017 285.8)",
|
|
233
|
+
700: "oklch(0.370 0.013 285.8)",
|
|
234
|
+
800: "oklch(0.274 0.006 286.0)",
|
|
235
|
+
900: "oklch(0.210 0.006 285.9)",
|
|
236
|
+
950: "oklch(0.141 0.005 285.8)"
|
|
237
|
+
},
|
|
238
|
+
neutral: {
|
|
239
|
+
50: "oklch(0.985 0.000 0.0)",
|
|
240
|
+
100: "oklch(0.970 0.000 0.0)",
|
|
241
|
+
200: "oklch(0.922 0.000 0.0)",
|
|
242
|
+
300: "oklch(0.870 0.000 0.0)",
|
|
243
|
+
400: "oklch(0.708 0.000 0.0)",
|
|
244
|
+
500: "oklch(0.556 0.000 0.0)",
|
|
245
|
+
600: "oklch(0.439 0.000 0.0)",
|
|
246
|
+
700: "oklch(0.371 0.000 0.0)",
|
|
247
|
+
800: "oklch(0.269 0.000 0.0)",
|
|
248
|
+
900: "oklch(0.205 0.000 0.0)",
|
|
249
|
+
950: "oklch(0.145 0.000 0.0)"
|
|
250
|
+
},
|
|
251
|
+
stone: {
|
|
252
|
+
50: "oklch(0.985 0.001 67.4)",
|
|
253
|
+
100: "oklch(0.970 0.002 75.2)",
|
|
254
|
+
200: "oklch(0.923 0.006 75.2)",
|
|
255
|
+
300: "oklch(0.869 0.011 65.3)",
|
|
256
|
+
400: "oklch(0.709 0.023 56.0)",
|
|
257
|
+
500: "oklch(0.553 0.028 50.3)",
|
|
258
|
+
600: "oklch(0.444 0.024 48.7)",
|
|
259
|
+
700: "oklch(0.374 0.020 50.9)",
|
|
260
|
+
800: "oklch(0.268 0.015 52.9)",
|
|
261
|
+
900: "oklch(0.216 0.012 56.0)",
|
|
262
|
+
950: "oklch(0.147 0.009 50.9)"
|
|
263
|
+
},
|
|
264
|
+
red: {
|
|
265
|
+
50: "oklch(0.971 0.013 17.4)",
|
|
266
|
+
100: "oklch(0.936 0.032 17.7)",
|
|
267
|
+
200: "oklch(0.885 0.062 18.3)",
|
|
268
|
+
300: "oklch(0.808 0.114 19.6)",
|
|
269
|
+
400: "oklch(0.704 0.191 22.2)",
|
|
270
|
+
500: "oklch(0.637 0.237 25.3)",
|
|
271
|
+
600: "oklch(0.577 0.245 27.3)",
|
|
272
|
+
700: "oklch(0.505 0.213 27.5)",
|
|
273
|
+
800: "oklch(0.444 0.177 26.3)",
|
|
274
|
+
900: "oklch(0.396 0.141 25.7)",
|
|
275
|
+
950: "oklch(0.258 0.092 26.0)"
|
|
276
|
+
},
|
|
277
|
+
orange: {
|
|
278
|
+
50: "oklch(0.980 0.016 73.7)",
|
|
279
|
+
100: "oklch(0.954 0.038 75.2)",
|
|
280
|
+
200: "oklch(0.901 0.076 70.7)",
|
|
281
|
+
300: "oklch(0.837 0.128 66.3)",
|
|
282
|
+
400: "oklch(0.750 0.183 55.9)",
|
|
283
|
+
500: "oklch(0.705 0.213 47.6)",
|
|
284
|
+
600: "oklch(0.646 0.222 41.1)",
|
|
285
|
+
700: "oklch(0.553 0.195 38.4)",
|
|
286
|
+
800: "oklch(0.470 0.157 37.5)",
|
|
287
|
+
900: "oklch(0.408 0.123 38.1)",
|
|
288
|
+
950: "oklch(0.266 0.079 36.3)"
|
|
289
|
+
},
|
|
290
|
+
amber: {
|
|
291
|
+
50: "oklch(0.987 0.022 95.3)",
|
|
292
|
+
100: "oklch(0.962 0.059 95.6)",
|
|
293
|
+
200: "oklch(0.924 0.120 95.2)",
|
|
294
|
+
300: "oklch(0.879 0.169 91.6)",
|
|
295
|
+
400: "oklch(0.828 0.189 84.6)",
|
|
296
|
+
500: "oklch(0.769 0.188 70.1)",
|
|
297
|
+
600: "oklch(0.666 0.179 58.3)",
|
|
298
|
+
700: "oklch(0.555 0.163 48.9)",
|
|
299
|
+
800: "oklch(0.473 0.137 46.2)",
|
|
300
|
+
900: "oklch(0.414 0.112 45.9)",
|
|
301
|
+
950: "oklch(0.279 0.077 45.2)"
|
|
302
|
+
},
|
|
303
|
+
yellow: {
|
|
304
|
+
50: "oklch(0.987 0.026 102.2)",
|
|
305
|
+
100: "oklch(0.973 0.071 103.2)",
|
|
306
|
+
200: "oklch(0.945 0.129 101.5)",
|
|
307
|
+
300: "oklch(0.905 0.182 98.1)",
|
|
308
|
+
400: "oklch(0.852 0.199 91.3)",
|
|
309
|
+
500: "oklch(0.795 0.184 86.0)",
|
|
310
|
+
600: "oklch(0.681 0.162 75.8)",
|
|
311
|
+
700: "oklch(0.554 0.135 66.4)",
|
|
312
|
+
800: "oklch(0.476 0.114 61.9)",
|
|
313
|
+
900: "oklch(0.421 0.095 57.7)",
|
|
314
|
+
950: "oklch(0.286 0.066 53.8)"
|
|
315
|
+
},
|
|
316
|
+
lime: {
|
|
317
|
+
50: "oklch(0.986 0.031 129.5)",
|
|
318
|
+
100: "oklch(0.967 0.067 130.9)",
|
|
319
|
+
200: "oklch(0.938 0.127 130.7)",
|
|
320
|
+
300: "oklch(0.897 0.196 126.5)",
|
|
321
|
+
400: "oklch(0.841 0.238 128.5)",
|
|
322
|
+
500: "oklch(0.768 0.233 130.9)",
|
|
323
|
+
600: "oklch(0.648 0.200 131.4)",
|
|
324
|
+
700: "oklch(0.532 0.157 131.6)",
|
|
325
|
+
800: "oklch(0.453 0.124 130.9)",
|
|
326
|
+
900: "oklch(0.405 0.101 131.1)",
|
|
327
|
+
950: "oklch(0.274 0.072 132.1)"
|
|
328
|
+
},
|
|
329
|
+
green: {
|
|
330
|
+
50: "oklch(0.982 0.018 155.8)",
|
|
331
|
+
100: "oklch(0.962 0.044 156.7)",
|
|
332
|
+
200: "oklch(0.925 0.084 155.9)",
|
|
333
|
+
300: "oklch(0.871 0.150 154.4)",
|
|
334
|
+
400: "oklch(0.792 0.209 151.7)",
|
|
335
|
+
500: "oklch(0.723 0.219 149.6)",
|
|
336
|
+
600: "oklch(0.627 0.194 149.2)",
|
|
337
|
+
700: "oklch(0.527 0.154 150.1)",
|
|
338
|
+
800: "oklch(0.448 0.119 151.3)",
|
|
339
|
+
900: "oklch(0.393 0.095 152.5)",
|
|
340
|
+
950: "oklch(0.266 0.065 152.9)"
|
|
341
|
+
},
|
|
342
|
+
emerald: {
|
|
343
|
+
50: "oklch(0.979 0.021 166.1)",
|
|
344
|
+
100: "oklch(0.950 0.052 163.1)",
|
|
345
|
+
200: "oklch(0.905 0.093 164.2)",
|
|
346
|
+
300: "oklch(0.845 0.143 164.9)",
|
|
347
|
+
400: "oklch(0.765 0.177 163.2)",
|
|
348
|
+
500: "oklch(0.696 0.170 162.5)",
|
|
349
|
+
600: "oklch(0.596 0.145 163.2)",
|
|
350
|
+
700: "oklch(0.508 0.118 165.6)",
|
|
351
|
+
800: "oklch(0.432 0.095 166.9)",
|
|
352
|
+
900: "oklch(0.378 0.077 168.9)",
|
|
353
|
+
950: "oklch(0.262 0.051 172.6)"
|
|
354
|
+
},
|
|
355
|
+
teal: {
|
|
356
|
+
50: "oklch(0.984 0.014 180.7)",
|
|
357
|
+
100: "oklch(0.953 0.051 180.8)",
|
|
358
|
+
200: "oklch(0.910 0.096 180.4)",
|
|
359
|
+
300: "oklch(0.855 0.138 181.1)",
|
|
360
|
+
400: "oklch(0.777 0.152 181.1)",
|
|
361
|
+
500: "oklch(0.704 0.140 182.5)",
|
|
362
|
+
600: "oklch(0.600 0.118 184.7)",
|
|
363
|
+
700: "oklch(0.511 0.096 186.4)",
|
|
364
|
+
800: "oklch(0.437 0.078 188.2)",
|
|
365
|
+
900: "oklch(0.386 0.063 188.4)",
|
|
366
|
+
950: "oklch(0.277 0.046 192.5)"
|
|
367
|
+
},
|
|
368
|
+
cyan: {
|
|
369
|
+
50: "oklch(0.984 0.019 200.9)",
|
|
370
|
+
100: "oklch(0.956 0.045 203.4)",
|
|
371
|
+
200: "oklch(0.917 0.080 205.0)",
|
|
372
|
+
300: "oklch(0.865 0.127 207.1)",
|
|
373
|
+
400: "oklch(0.789 0.154 211.1)",
|
|
374
|
+
500: "oklch(0.715 0.143 215.2)",
|
|
375
|
+
600: "oklch(0.609 0.126 221.7)",
|
|
376
|
+
700: "oklch(0.520 0.105 223.1)",
|
|
377
|
+
800: "oklch(0.450 0.085 224.3)",
|
|
378
|
+
900: "oklch(0.398 0.070 227.4)",
|
|
379
|
+
950: "oklch(0.302 0.056 229.7)"
|
|
380
|
+
},
|
|
381
|
+
sky: {
|
|
382
|
+
50: "oklch(0.977 0.013 236.6)",
|
|
383
|
+
100: "oklch(0.951 0.026 236.8)",
|
|
384
|
+
200: "oklch(0.901 0.058 230.9)",
|
|
385
|
+
300: "oklch(0.828 0.111 230.3)",
|
|
386
|
+
400: "oklch(0.746 0.160 232.7)",
|
|
387
|
+
500: "oklch(0.685 0.169 237.3)",
|
|
388
|
+
600: "oklch(0.588 0.158 241.9)",
|
|
389
|
+
700: "oklch(0.500 0.134 242.7)",
|
|
390
|
+
800: "oklch(0.443 0.110 240.8)",
|
|
391
|
+
900: "oklch(0.391 0.090 240.9)",
|
|
392
|
+
950: "oklch(0.293 0.066 243.2)"
|
|
393
|
+
},
|
|
394
|
+
blue: {
|
|
395
|
+
50: "oklch(0.970 0.014 254.6)",
|
|
396
|
+
100: "oklch(0.932 0.032 255.6)",
|
|
397
|
+
200: "oklch(0.882 0.059 254.1)",
|
|
398
|
+
300: "oklch(0.809 0.105 251.8)",
|
|
399
|
+
400: "oklch(0.707 0.165 254.6)",
|
|
400
|
+
500: "oklch(0.623 0.214 259.1)",
|
|
401
|
+
600: "oklch(0.546 0.245 262.9)",
|
|
402
|
+
700: "oklch(0.488 0.243 264.4)",
|
|
403
|
+
800: "oklch(0.424 0.199 265.6)",
|
|
404
|
+
900: "oklch(0.379 0.146 265.5)",
|
|
405
|
+
950: "oklch(0.282 0.091 267.9)"
|
|
406
|
+
},
|
|
407
|
+
indigo: {
|
|
408
|
+
50: "oklch(0.962 0.018 272.3)",
|
|
409
|
+
100: "oklch(0.930 0.034 272.8)",
|
|
410
|
+
200: "oklch(0.870 0.065 274.0)",
|
|
411
|
+
300: "oklch(0.785 0.115 274.7)",
|
|
412
|
+
400: "oklch(0.673 0.182 276.9)",
|
|
413
|
+
500: "oklch(0.585 0.233 277.1)",
|
|
414
|
+
600: "oklch(0.511 0.262 276.9)",
|
|
415
|
+
700: "oklch(0.457 0.240 277.0)",
|
|
416
|
+
800: "oklch(0.398 0.195 277.4)",
|
|
417
|
+
900: "oklch(0.359 0.144 278.7)",
|
|
418
|
+
950: "oklch(0.257 0.090 281.3)"
|
|
419
|
+
},
|
|
420
|
+
violet: {
|
|
421
|
+
50: "oklch(0.969 0.016 293.8)",
|
|
422
|
+
100: "oklch(0.943 0.029 294.6)",
|
|
423
|
+
200: "oklch(0.894 0.057 293.3)",
|
|
424
|
+
300: "oklch(0.811 0.111 293.6)",
|
|
425
|
+
400: "oklch(0.702 0.183 293.5)",
|
|
426
|
+
500: "oklch(0.606 0.250 292.7)",
|
|
427
|
+
600: "oklch(0.541 0.281 293.0)",
|
|
428
|
+
700: "oklch(0.491 0.270 292.6)",
|
|
429
|
+
800: "oklch(0.432 0.232 292.8)",
|
|
430
|
+
900: "oklch(0.380 0.189 293.7)",
|
|
431
|
+
950: "oklch(0.283 0.141 291.1)"
|
|
432
|
+
},
|
|
433
|
+
purple: {
|
|
434
|
+
50: "oklch(0.977 0.014 308.3)",
|
|
435
|
+
100: "oklch(0.946 0.033 307.1)",
|
|
436
|
+
200: "oklch(0.902 0.063 306.7)",
|
|
437
|
+
300: "oklch(0.827 0.119 306.3)",
|
|
438
|
+
400: "oklch(0.714 0.203 305.3)",
|
|
439
|
+
500: "oklch(0.627 0.265 303.9)",
|
|
440
|
+
600: "oklch(0.558 0.288 302.3)",
|
|
441
|
+
700: "oklch(0.496 0.265 301.9)",
|
|
442
|
+
800: "oklch(0.438 0.218 303.7)",
|
|
443
|
+
900: "oklch(0.381 0.176 304.1)",
|
|
444
|
+
950: "oklch(0.291 0.149 302.7)"
|
|
445
|
+
},
|
|
446
|
+
fuchsia: {
|
|
447
|
+
50: "oklch(0.977 0.017 320.1)",
|
|
448
|
+
100: "oklch(0.952 0.037 318.9)",
|
|
449
|
+
200: "oklch(0.903 0.076 319.6)",
|
|
450
|
+
300: "oklch(0.833 0.145 321.4)",
|
|
451
|
+
400: "oklch(0.740 0.238 322.2)",
|
|
452
|
+
500: "oklch(0.667 0.295 322.1)",
|
|
453
|
+
600: "oklch(0.591 0.293 321.5)",
|
|
454
|
+
700: "oklch(0.518 0.253 323.1)",
|
|
455
|
+
800: "oklch(0.452 0.211 324.1)",
|
|
456
|
+
900: "oklch(0.401 0.170 325.6)",
|
|
457
|
+
950: "oklch(0.293 0.136 325.7)"
|
|
458
|
+
},
|
|
459
|
+
pink: {
|
|
460
|
+
50: "oklch(0.971 0.014 343.2)",
|
|
461
|
+
100: "oklch(0.948 0.028 342.3)",
|
|
462
|
+
200: "oklch(0.899 0.061 343.2)",
|
|
463
|
+
300: "oklch(0.823 0.120 346.0)",
|
|
464
|
+
400: "oklch(0.718 0.202 349.8)",
|
|
465
|
+
500: "oklch(0.656 0.241 354.3)",
|
|
466
|
+
600: "oklch(0.592 0.249 0.6)",
|
|
467
|
+
700: "oklch(0.525 0.223 3.9)",
|
|
468
|
+
800: "oklch(0.459 0.187 3.8)",
|
|
469
|
+
900: "oklch(0.408 0.153 2.4)",
|
|
470
|
+
950: "oklch(0.284 0.109 3.9)"
|
|
471
|
+
},
|
|
472
|
+
rose: {
|
|
473
|
+
50: "oklch(0.969 0.015 12.4)",
|
|
474
|
+
100: "oklch(0.941 0.030 12.6)",
|
|
475
|
+
200: "oklch(0.892 0.058 10.0)",
|
|
476
|
+
300: "oklch(0.810 0.117 11.6)",
|
|
477
|
+
400: "oklch(0.712 0.194 13.4)",
|
|
478
|
+
500: "oklch(0.645 0.246 16.4)",
|
|
479
|
+
600: "oklch(0.586 0.253 17.6)",
|
|
480
|
+
700: "oklch(0.514 0.222 16.9)",
|
|
481
|
+
800: "oklch(0.455 0.188 13.9)",
|
|
482
|
+
900: "oklch(0.410 0.159 10.9)",
|
|
483
|
+
950: "oklch(0.271 0.105 12.1)"
|
|
484
|
+
},
|
|
485
|
+
mauve: {
|
|
486
|
+
50: "oklch(0.980 0.005 300.0)",
|
|
487
|
+
100: "oklch(0.960 0.010 300.0)",
|
|
488
|
+
200: "oklch(0.920 0.018 300.0)",
|
|
489
|
+
300: "oklch(0.860 0.028 300.0)",
|
|
490
|
+
400: "oklch(0.720 0.040 300.0)",
|
|
491
|
+
500: "oklch(0.580 0.052 300.0)",
|
|
492
|
+
600: "oklch(0.470 0.048 300.0)",
|
|
493
|
+
700: "oklch(0.380 0.040 300.0)",
|
|
494
|
+
800: "oklch(0.280 0.030 300.0)",
|
|
495
|
+
900: "oklch(0.200 0.022 300.0)",
|
|
496
|
+
950: "oklch(0.130 0.015 300.0)"
|
|
497
|
+
},
|
|
498
|
+
olive: {
|
|
499
|
+
50: "oklch(0.980 0.015 90.0)",
|
|
500
|
+
100: "oklch(0.960 0.022 90.0)",
|
|
501
|
+
200: "oklch(0.920 0.032 90.0)",
|
|
502
|
+
300: "oklch(0.860 0.045 90.0)",
|
|
503
|
+
400: "oklch(0.720 0.060 90.0)",
|
|
504
|
+
500: "oklch(0.580 0.072 90.0)",
|
|
505
|
+
600: "oklch(0.470 0.065 90.0)",
|
|
506
|
+
700: "oklch(0.380 0.055 90.0)",
|
|
507
|
+
800: "oklch(0.280 0.040 90.0)",
|
|
508
|
+
900: "oklch(0.200 0.028 90.0)",
|
|
509
|
+
950: "oklch(0.130 0.018 90.0)"
|
|
510
|
+
},
|
|
511
|
+
mist: {
|
|
512
|
+
50: "oklch(0.982 0.008 200.0)",
|
|
513
|
+
100: "oklch(0.962 0.014 200.0)",
|
|
514
|
+
200: "oklch(0.922 0.022 200.0)",
|
|
515
|
+
300: "oklch(0.862 0.034 200.0)",
|
|
516
|
+
400: "oklch(0.722 0.048 200.0)",
|
|
517
|
+
500: "oklch(0.582 0.060 200.0)",
|
|
518
|
+
600: "oklch(0.472 0.055 200.0)",
|
|
519
|
+
700: "oklch(0.382 0.045 200.0)",
|
|
520
|
+
800: "oklch(0.282 0.032 200.0)",
|
|
521
|
+
900: "oklch(0.202 0.022 200.0)",
|
|
522
|
+
950: "oklch(0.128 0.012 200.0)"
|
|
523
|
+
},
|
|
524
|
+
taupe: {
|
|
525
|
+
50: "oklch(0.978 0.008 60.0)",
|
|
526
|
+
100: "oklch(0.958 0.014 60.0)",
|
|
527
|
+
200: "oklch(0.918 0.022 60.0)",
|
|
528
|
+
300: "oklch(0.858 0.034 60.0)",
|
|
529
|
+
400: "oklch(0.718 0.048 60.0)",
|
|
530
|
+
500: "oklch(0.578 0.060 60.0)",
|
|
531
|
+
600: "oklch(0.468 0.055 60.0)",
|
|
532
|
+
700: "oklch(0.378 0.045 60.0)",
|
|
533
|
+
800: "oklch(0.278 0.032 60.0)",
|
|
534
|
+
900: "oklch(0.198 0.022 60.0)",
|
|
535
|
+
950: "oklch(0.128 0.014 60.0)"
|
|
536
|
+
}
|
|
537
|
+
},
|
|
538
|
+
columns: {
|
|
539
|
+
auto: "auto",
|
|
540
|
+
1: "1",
|
|
541
|
+
2: "2",
|
|
542
|
+
3: "3",
|
|
543
|
+
4: "4",
|
|
544
|
+
5: "5",
|
|
545
|
+
6: "6",
|
|
546
|
+
7: "7",
|
|
547
|
+
8: "8",
|
|
548
|
+
9: "9",
|
|
549
|
+
10: "10",
|
|
550
|
+
11: "11",
|
|
551
|
+
12: "12",
|
|
552
|
+
"3xs": "16rem",
|
|
553
|
+
"2xs": "18rem",
|
|
554
|
+
xs: "20rem",
|
|
555
|
+
sm: "24rem",
|
|
556
|
+
md: "28rem",
|
|
557
|
+
lg: "32rem",
|
|
558
|
+
xl: "36rem",
|
|
559
|
+
"2xl": "42rem",
|
|
560
|
+
"3xl": "48rem",
|
|
561
|
+
"4xl": "56rem",
|
|
562
|
+
"5xl": "64rem",
|
|
563
|
+
"6xl": "72rem",
|
|
564
|
+
"7xl": "80rem"
|
|
565
|
+
},
|
|
566
|
+
container: {},
|
|
567
|
+
containers: {
|
|
568
|
+
xs: "20rem",
|
|
569
|
+
// 320px
|
|
570
|
+
sm: "24rem",
|
|
571
|
+
// 384px
|
|
572
|
+
md: "28rem",
|
|
573
|
+
// 448px
|
|
574
|
+
lg: "32rem",
|
|
575
|
+
// 512px
|
|
576
|
+
xl: "36rem",
|
|
577
|
+
// 576px
|
|
578
|
+
"2xl": "42rem",
|
|
579
|
+
// 672px
|
|
580
|
+
"3xl": "48rem",
|
|
581
|
+
// 768px
|
|
582
|
+
"4xl": "56rem",
|
|
583
|
+
// 896px
|
|
584
|
+
"5xl": "64rem",
|
|
585
|
+
// 1024px
|
|
586
|
+
"6xl": "72rem",
|
|
587
|
+
// 1152px
|
|
588
|
+
"7xl": "80rem"
|
|
589
|
+
// 1280px
|
|
590
|
+
},
|
|
591
|
+
content: {
|
|
592
|
+
none: "none"
|
|
593
|
+
},
|
|
594
|
+
contrast: {
|
|
595
|
+
0: "0",
|
|
596
|
+
50: ".5",
|
|
597
|
+
75: ".75",
|
|
598
|
+
100: "1",
|
|
599
|
+
125: "1.25",
|
|
600
|
+
150: "1.5",
|
|
601
|
+
200: "2"
|
|
602
|
+
},
|
|
603
|
+
cursor: {
|
|
604
|
+
auto: "auto",
|
|
605
|
+
default: "default",
|
|
606
|
+
pointer: "pointer",
|
|
607
|
+
wait: "wait",
|
|
608
|
+
text: "text",
|
|
609
|
+
move: "move",
|
|
610
|
+
help: "help",
|
|
611
|
+
"not-allowed": "not-allowed",
|
|
612
|
+
none: "none",
|
|
613
|
+
"context-menu": "context-menu",
|
|
614
|
+
progress: "progress",
|
|
615
|
+
cell: "cell",
|
|
616
|
+
crosshair: "crosshair",
|
|
617
|
+
"vertical-text": "vertical-text",
|
|
618
|
+
alias: "alias",
|
|
619
|
+
copy: "copy",
|
|
620
|
+
"no-drop": "no-drop",
|
|
621
|
+
grab: "grab",
|
|
622
|
+
grabbing: "grabbing",
|
|
623
|
+
"all-scroll": "all-scroll",
|
|
624
|
+
"col-resize": "col-resize",
|
|
625
|
+
"row-resize": "row-resize",
|
|
626
|
+
"n-resize": "n-resize",
|
|
627
|
+
"e-resize": "e-resize",
|
|
628
|
+
"s-resize": "s-resize",
|
|
629
|
+
"w-resize": "w-resize",
|
|
630
|
+
"ne-resize": "ne-resize",
|
|
631
|
+
"nw-resize": "nw-resize",
|
|
632
|
+
"se-resize": "se-resize",
|
|
633
|
+
"sw-resize": "sw-resize",
|
|
634
|
+
"ew-resize": "ew-resize",
|
|
635
|
+
"ns-resize": "ns-resize",
|
|
636
|
+
"nesw-resize": "nesw-resize",
|
|
637
|
+
"nwse-resize": "nwse-resize",
|
|
638
|
+
"zoom-in": "zoom-in",
|
|
639
|
+
"zoom-out": "zoom-out"
|
|
640
|
+
},
|
|
641
|
+
divideColor: ({ theme: theme2 }) => theme2("borderColor"),
|
|
642
|
+
divideWidth: ({ theme: theme2 }) => theme2("borderWidth"),
|
|
643
|
+
dropShadow: {
|
|
644
|
+
sm: "0 1px 1px rgb(0 0 0 / 0.05)",
|
|
645
|
+
DEFAULT: "0 1px 2px rgb(0 0 0 / 0.1) , 0 1px 1px rgb(0 0 0 / 0.06)",
|
|
646
|
+
md: "0 4px 3px rgb(0 0 0 / 0.07) , 0 2px 2px rgb(0 0 0 / 0.06)",
|
|
647
|
+
lg: "0 10px 8px rgb(0 0 0 / 0.04) , 0 4px 3px rgb(0 0 0 / 0.1)",
|
|
648
|
+
xl: "0 20px 13px rgb(0 0 0 / 0.03) , 0 8px 5px rgb(0 0 0 / 0.08)",
|
|
649
|
+
"2xl": "0 25px 25px rgb(0 0 0 / 0.15)",
|
|
650
|
+
none: "0 0 #0000"
|
|
651
|
+
},
|
|
652
|
+
fill: ({ theme: theme2 }) => ({
|
|
653
|
+
none: "none",
|
|
654
|
+
...theme2("colors")
|
|
655
|
+
}),
|
|
656
|
+
flex: {
|
|
657
|
+
1: "1 1 0%",
|
|
658
|
+
auto: "1 1 auto",
|
|
659
|
+
initial: "0 1 auto",
|
|
660
|
+
none: "none"
|
|
661
|
+
},
|
|
662
|
+
flexBasis: ({ theme: theme2 }) => ({
|
|
663
|
+
auto: "auto",
|
|
664
|
+
...theme2("spacing"),
|
|
665
|
+
"1/2": "50%",
|
|
666
|
+
"1/3": "33.333333%",
|
|
667
|
+
"2/3": "66.666667%",
|
|
668
|
+
"1/4": "25%",
|
|
669
|
+
"2/4": "50%",
|
|
670
|
+
"3/4": "75%",
|
|
671
|
+
"1/5": "20%",
|
|
672
|
+
"2/5": "40%",
|
|
673
|
+
"3/5": "60%",
|
|
674
|
+
"4/5": "80%",
|
|
675
|
+
"1/6": "16.666667%",
|
|
676
|
+
"2/6": "33.333333%",
|
|
677
|
+
"3/6": "50%",
|
|
678
|
+
"4/6": "66.666667%",
|
|
679
|
+
"5/6": "83.333333%",
|
|
680
|
+
"1/12": "8.333333%",
|
|
681
|
+
"2/12": "16.666667%",
|
|
682
|
+
"3/12": "25%",
|
|
683
|
+
"4/12": "33.333333%",
|
|
684
|
+
"5/12": "41.666667%",
|
|
685
|
+
"6/12": "50%",
|
|
686
|
+
"7/12": "58.333333%",
|
|
687
|
+
"8/12": "66.666667%",
|
|
688
|
+
"9/12": "75%",
|
|
689
|
+
"10/12": "83.333333%",
|
|
690
|
+
"11/12": "91.666667%",
|
|
691
|
+
full: "100%"
|
|
692
|
+
}),
|
|
693
|
+
flexGrow: {
|
|
694
|
+
0: "0",
|
|
695
|
+
DEFAULT: "1"
|
|
696
|
+
},
|
|
697
|
+
flexShrink: {
|
|
698
|
+
0: "0",
|
|
699
|
+
DEFAULT: "1"
|
|
700
|
+
},
|
|
701
|
+
fontFamily: {
|
|
702
|
+
sans: ["ui-sans-serif", "system-ui", "sans-serif", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"],
|
|
703
|
+
serif: ["ui-serif", "Georgia", "Cambria", "Times New Roman", "Times", "serif"],
|
|
704
|
+
mono: ["ui-monospace", "SFMono-Regular", "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", "monospace"]
|
|
705
|
+
},
|
|
706
|
+
fontSize: {
|
|
707
|
+
xs: "0.75rem",
|
|
708
|
+
sm: "0.875rem",
|
|
709
|
+
base: "1rem",
|
|
710
|
+
lg: "1.125rem",
|
|
711
|
+
xl: "1.25rem",
|
|
712
|
+
"2xl": "1.5rem",
|
|
713
|
+
"3xl": "1.875rem",
|
|
714
|
+
"4xl": "2.25rem",
|
|
715
|
+
"5xl": "3rem",
|
|
716
|
+
"6xl": "3.75rem",
|
|
717
|
+
"7xl": "4.5rem",
|
|
718
|
+
"8xl": "6rem",
|
|
719
|
+
"9xl": "8rem"
|
|
720
|
+
},
|
|
721
|
+
fontWeight: {
|
|
722
|
+
thin: "100",
|
|
723
|
+
extralight: "200",
|
|
724
|
+
light: "300",
|
|
725
|
+
normal: "400",
|
|
726
|
+
medium: "500",
|
|
727
|
+
semibold: "600",
|
|
728
|
+
bold: "700",
|
|
729
|
+
extrabold: "800",
|
|
730
|
+
black: "900"
|
|
731
|
+
},
|
|
732
|
+
gap: ({ theme: theme2 }) => theme2("spacing"),
|
|
733
|
+
gradientColorStops: ({ theme: theme2 }) => theme2("colors"),
|
|
734
|
+
gradientColorStopPositions: {
|
|
735
|
+
"0%": "0%",
|
|
736
|
+
"5%": "5%",
|
|
737
|
+
"10%": "10%",
|
|
738
|
+
"15%": "15%",
|
|
739
|
+
"20%": "20%",
|
|
740
|
+
"25%": "25%",
|
|
741
|
+
"30%": "30%",
|
|
742
|
+
"35%": "35%",
|
|
743
|
+
"40%": "40%",
|
|
744
|
+
"45%": "45%",
|
|
745
|
+
"50%": "50%",
|
|
746
|
+
"55%": "55%",
|
|
747
|
+
"60%": "60%",
|
|
748
|
+
"65%": "65%",
|
|
749
|
+
"70%": "70%",
|
|
750
|
+
"75%": "75%",
|
|
751
|
+
"80%": "80%",
|
|
752
|
+
"85%": "85%",
|
|
753
|
+
"90%": "90%",
|
|
754
|
+
"95%": "95%",
|
|
755
|
+
"100%": "100%"
|
|
756
|
+
},
|
|
757
|
+
grayscale: {
|
|
758
|
+
0: "0",
|
|
759
|
+
DEFAULT: "100%"
|
|
760
|
+
},
|
|
761
|
+
gridAutoColumns: {
|
|
762
|
+
auto: "auto",
|
|
763
|
+
min: "min-content",
|
|
764
|
+
max: "max-content",
|
|
765
|
+
fr: "minmax(0, 1fr)"
|
|
766
|
+
},
|
|
767
|
+
gridAutoRows: {
|
|
768
|
+
auto: "auto",
|
|
769
|
+
min: "min-content",
|
|
770
|
+
max: "max-content",
|
|
771
|
+
fr: "minmax(0, 1fr)"
|
|
772
|
+
},
|
|
773
|
+
gridColumn: {
|
|
774
|
+
auto: "auto",
|
|
775
|
+
"span-1": "span 1 / span 1",
|
|
776
|
+
"span-2": "span 2 / span 2",
|
|
777
|
+
"span-3": "span 3 / span 3",
|
|
778
|
+
"span-4": "span 4 / span 4",
|
|
779
|
+
"span-5": "span 5 / span 5",
|
|
780
|
+
"span-6": "span 6 / span 6",
|
|
781
|
+
"span-7": "span 7 / span 7",
|
|
782
|
+
"span-8": "span 8 / span 8",
|
|
783
|
+
"span-9": "span 9 / span 9",
|
|
784
|
+
"span-10": "span 10 / span 10",
|
|
785
|
+
"span-11": "span 11 / span 11",
|
|
786
|
+
"span-12": "span 12 / span 12",
|
|
787
|
+
"span-full": "1 / -1"
|
|
788
|
+
},
|
|
789
|
+
gridColumnEnd: {
|
|
790
|
+
auto: "auto",
|
|
791
|
+
1: "1",
|
|
792
|
+
2: "2",
|
|
793
|
+
3: "3",
|
|
794
|
+
4: "4",
|
|
795
|
+
5: "5",
|
|
796
|
+
6: "6",
|
|
797
|
+
7: "7",
|
|
798
|
+
8: "8",
|
|
799
|
+
9: "9",
|
|
800
|
+
10: "10",
|
|
801
|
+
11: "11",
|
|
802
|
+
12: "12",
|
|
803
|
+
13: "13"
|
|
804
|
+
},
|
|
805
|
+
gridColumnStart: {
|
|
806
|
+
auto: "auto",
|
|
807
|
+
1: "1",
|
|
808
|
+
2: "2",
|
|
809
|
+
3: "3",
|
|
810
|
+
4: "4",
|
|
811
|
+
5: "5",
|
|
812
|
+
6: "6",
|
|
813
|
+
7: "7",
|
|
814
|
+
8: "8",
|
|
815
|
+
9: "9",
|
|
816
|
+
10: "10",
|
|
817
|
+
11: "11",
|
|
818
|
+
12: "12",
|
|
819
|
+
13: "13"
|
|
820
|
+
},
|
|
821
|
+
gridRow: {
|
|
822
|
+
auto: "auto",
|
|
823
|
+
"span-1": "span 1 / span 1",
|
|
824
|
+
"span-2": "span 2 / span 2",
|
|
825
|
+
"span-3": "span 3 / span 3",
|
|
826
|
+
"span-4": "span 4 / span 4",
|
|
827
|
+
"span-5": "span 5 / span 5",
|
|
828
|
+
"span-6": "span 6 / span 6",
|
|
829
|
+
"span-7": "span 7 / span 7",
|
|
830
|
+
"span-8": "span 8 / span 8",
|
|
831
|
+
"span-9": "span 9 / span 9",
|
|
832
|
+
"span-10": "span 10 / span 10",
|
|
833
|
+
"span-11": "span 11 / span 11",
|
|
834
|
+
"span-12": "span 12 / span 12",
|
|
835
|
+
"span-full": "1 / -1"
|
|
836
|
+
},
|
|
837
|
+
gridRowEnd: {
|
|
838
|
+
auto: "auto",
|
|
839
|
+
1: "1",
|
|
840
|
+
2: "2",
|
|
841
|
+
3: "3",
|
|
842
|
+
4: "4",
|
|
843
|
+
5: "5",
|
|
844
|
+
6: "6",
|
|
845
|
+
7: "7",
|
|
846
|
+
8: "8",
|
|
847
|
+
9: "9",
|
|
848
|
+
10: "10",
|
|
849
|
+
11: "11",
|
|
850
|
+
12: "12",
|
|
851
|
+
13: "13"
|
|
852
|
+
},
|
|
853
|
+
gridRowStart: {
|
|
854
|
+
auto: "auto",
|
|
855
|
+
1: "1",
|
|
856
|
+
2: "2",
|
|
857
|
+
3: "3",
|
|
858
|
+
4: "4",
|
|
859
|
+
5: "5",
|
|
860
|
+
6: "6",
|
|
861
|
+
7: "7",
|
|
862
|
+
8: "8",
|
|
863
|
+
9: "9",
|
|
864
|
+
10: "10",
|
|
865
|
+
11: "11",
|
|
866
|
+
12: "12",
|
|
867
|
+
13: "13"
|
|
868
|
+
},
|
|
869
|
+
gridTemplateColumns: {
|
|
870
|
+
none: "none",
|
|
871
|
+
subgrid: "subgrid",
|
|
872
|
+
1: "repeat(1, minmax(0, 1fr))",
|
|
873
|
+
2: "repeat(2, minmax(0, 1fr))",
|
|
874
|
+
3: "repeat(3, minmax(0, 1fr))",
|
|
875
|
+
4: "repeat(4, minmax(0, 1fr))",
|
|
876
|
+
5: "repeat(5, minmax(0, 1fr))",
|
|
877
|
+
6: "repeat(6, minmax(0, 1fr))",
|
|
878
|
+
7: "repeat(7, minmax(0, 1fr))",
|
|
879
|
+
8: "repeat(8, minmax(0, 1fr))",
|
|
880
|
+
9: "repeat(9, minmax(0, 1fr))",
|
|
881
|
+
10: "repeat(10, minmax(0, 1fr))",
|
|
882
|
+
11: "repeat(11, minmax(0, 1fr))",
|
|
883
|
+
12: "repeat(12, minmax(0, 1fr))"
|
|
884
|
+
},
|
|
885
|
+
gridTemplateRows: {
|
|
886
|
+
none: "none",
|
|
887
|
+
subgrid: "subgrid",
|
|
888
|
+
1: "repeat(1, minmax(0, 1fr))",
|
|
889
|
+
2: "repeat(2, minmax(0, 1fr))",
|
|
890
|
+
3: "repeat(3, minmax(0, 1fr))",
|
|
891
|
+
4: "repeat(4, minmax(0, 1fr))",
|
|
892
|
+
5: "repeat(5, minmax(0, 1fr))",
|
|
893
|
+
6: "repeat(6, minmax(0, 1fr))",
|
|
894
|
+
7: "repeat(7, minmax(0, 1fr))",
|
|
895
|
+
8: "repeat(8, minmax(0, 1fr))",
|
|
896
|
+
9: "repeat(9, minmax(0, 1fr))",
|
|
897
|
+
10: "repeat(10, minmax(0, 1fr))",
|
|
898
|
+
11: "repeat(11, minmax(0, 1fr))",
|
|
899
|
+
12: "repeat(12, minmax(0, 1fr))"
|
|
900
|
+
},
|
|
901
|
+
height: ({ theme: theme2 }) => ({
|
|
902
|
+
auto: "auto",
|
|
903
|
+
...theme2("spacing"),
|
|
904
|
+
"1/2": "50%",
|
|
905
|
+
"1/3": "33.333333%",
|
|
906
|
+
"2/3": "66.666667%",
|
|
907
|
+
"1/4": "25%",
|
|
908
|
+
"2/4": "50%",
|
|
909
|
+
"3/4": "75%",
|
|
910
|
+
"1/5": "20%",
|
|
911
|
+
"2/5": "40%",
|
|
912
|
+
"3/5": "60%",
|
|
913
|
+
"4/5": "80%",
|
|
914
|
+
"1/6": "16.666667%",
|
|
915
|
+
"2/6": "33.333333%",
|
|
916
|
+
"3/6": "50%",
|
|
917
|
+
"4/6": "66.666667%",
|
|
918
|
+
"5/6": "83.333333%",
|
|
919
|
+
full: "100%",
|
|
920
|
+
screen: "100vh",
|
|
921
|
+
svh: "100svh",
|
|
922
|
+
lvh: "100lvh",
|
|
923
|
+
dvh: "100dvh",
|
|
924
|
+
min: "min-content",
|
|
925
|
+
max: "max-content",
|
|
926
|
+
fit: "fit-content"
|
|
927
|
+
}),
|
|
928
|
+
hueRotate: {
|
|
929
|
+
0: "0deg",
|
|
930
|
+
15: "15deg",
|
|
931
|
+
30: "30deg",
|
|
932
|
+
60: "60deg",
|
|
933
|
+
90: "90deg",
|
|
934
|
+
180: "180deg"
|
|
935
|
+
},
|
|
936
|
+
inset: ({ theme: theme2 }) => ({
|
|
937
|
+
auto: "auto",
|
|
938
|
+
...theme2("spacing"),
|
|
939
|
+
"1/2": "50%",
|
|
940
|
+
"1/3": "33.333333%",
|
|
941
|
+
"2/3": "66.666667%",
|
|
942
|
+
"1/4": "25%",
|
|
943
|
+
"2/4": "50%",
|
|
944
|
+
"3/4": "75%",
|
|
945
|
+
full: "100%"
|
|
946
|
+
}),
|
|
947
|
+
invert: {
|
|
948
|
+
0: "0",
|
|
949
|
+
DEFAULT: "100%"
|
|
950
|
+
},
|
|
951
|
+
letterSpacing: {
|
|
952
|
+
tighter: "-0.05em",
|
|
953
|
+
tight: "-0.025em",
|
|
954
|
+
normal: "0em",
|
|
955
|
+
wide: "0.025em",
|
|
956
|
+
wider: "0.05em",
|
|
957
|
+
widest: "0.1em"
|
|
958
|
+
},
|
|
959
|
+
lineClamp: {
|
|
960
|
+
1: "1",
|
|
961
|
+
2: "2",
|
|
962
|
+
3: "3",
|
|
963
|
+
4: "4",
|
|
964
|
+
5: "5",
|
|
965
|
+
6: "6"
|
|
966
|
+
},
|
|
967
|
+
lineHeight: {
|
|
968
|
+
none: "1",
|
|
969
|
+
tight: "1.25",
|
|
970
|
+
snug: "1.375",
|
|
971
|
+
normal: "1.5",
|
|
972
|
+
relaxed: "1.625",
|
|
973
|
+
loose: "2",
|
|
974
|
+
3: ".75rem",
|
|
975
|
+
4: "1rem",
|
|
976
|
+
5: "1.25rem",
|
|
977
|
+
6: "1.5rem",
|
|
978
|
+
7: "1.75rem",
|
|
979
|
+
8: "2rem",
|
|
980
|
+
9: "2.25rem",
|
|
981
|
+
10: "2.5rem"
|
|
982
|
+
},
|
|
983
|
+
listStyleType: {
|
|
984
|
+
none: "none",
|
|
985
|
+
disc: "disc",
|
|
986
|
+
decimal: "decimal"
|
|
987
|
+
},
|
|
988
|
+
margin: ({ theme: theme2 }) => ({
|
|
989
|
+
auto: "auto",
|
|
990
|
+
...theme2("spacing")
|
|
991
|
+
}),
|
|
992
|
+
maxHeight: ({ theme: theme2 }) => ({
|
|
993
|
+
...theme2("spacing"),
|
|
994
|
+
none: "none",
|
|
995
|
+
full: "100%",
|
|
996
|
+
screen: "100vh",
|
|
997
|
+
svh: "100svh",
|
|
998
|
+
lvh: "100lvh",
|
|
999
|
+
dvh: "100dvh",
|
|
1000
|
+
min: "min-content",
|
|
1001
|
+
max: "max-content",
|
|
1002
|
+
fit: "fit-content"
|
|
1003
|
+
}),
|
|
1004
|
+
maxWidth: ({ theme: theme2 }) => ({
|
|
1005
|
+
...theme2("spacing"),
|
|
1006
|
+
none: "none",
|
|
1007
|
+
xs: "20rem",
|
|
1008
|
+
sm: "24rem",
|
|
1009
|
+
md: "28rem",
|
|
1010
|
+
lg: "32rem",
|
|
1011
|
+
xl: "36rem",
|
|
1012
|
+
"2xl": "42rem",
|
|
1013
|
+
"3xl": "48rem",
|
|
1014
|
+
"4xl": "56rem",
|
|
1015
|
+
"5xl": "64rem",
|
|
1016
|
+
"6xl": "72rem",
|
|
1017
|
+
"7xl": "80rem",
|
|
1018
|
+
full: "100%",
|
|
1019
|
+
min: "min-content",
|
|
1020
|
+
max: "max-content",
|
|
1021
|
+
fit: "fit-content",
|
|
1022
|
+
prose: "65ch"
|
|
1023
|
+
}),
|
|
1024
|
+
minHeight: ({ theme: theme2 }) => ({
|
|
1025
|
+
...theme2("spacing"),
|
|
1026
|
+
full: "100%",
|
|
1027
|
+
screen: "100vh",
|
|
1028
|
+
svh: "100svh",
|
|
1029
|
+
lvh: "100lvh",
|
|
1030
|
+
dvh: "100dvh",
|
|
1031
|
+
min: "min-content",
|
|
1032
|
+
max: "max-content",
|
|
1033
|
+
fit: "fit-content"
|
|
1034
|
+
}),
|
|
1035
|
+
minWidth: ({ theme: theme2 }) => ({
|
|
1036
|
+
...theme2("spacing"),
|
|
1037
|
+
full: "100%",
|
|
1038
|
+
min: "min-content",
|
|
1039
|
+
max: "max-content",
|
|
1040
|
+
fit: "fit-content"
|
|
1041
|
+
}),
|
|
1042
|
+
objectPosition: {
|
|
1043
|
+
bottom: "bottom",
|
|
1044
|
+
center: "center",
|
|
1045
|
+
left: "left",
|
|
1046
|
+
"left-bottom": "left bottom",
|
|
1047
|
+
"left-top": "left top",
|
|
1048
|
+
right: "right",
|
|
1049
|
+
"right-bottom": "right bottom",
|
|
1050
|
+
"right-top": "right top",
|
|
1051
|
+
top: "top"
|
|
1052
|
+
},
|
|
1053
|
+
opacity: {
|
|
1054
|
+
0: "0",
|
|
1055
|
+
5: "0.05",
|
|
1056
|
+
10: "0.1",
|
|
1057
|
+
15: "0.15",
|
|
1058
|
+
20: "0.2",
|
|
1059
|
+
25: "0.25",
|
|
1060
|
+
30: "0.3",
|
|
1061
|
+
35: "0.35",
|
|
1062
|
+
40: "0.4",
|
|
1063
|
+
45: "0.45",
|
|
1064
|
+
50: "0.5",
|
|
1065
|
+
55: "0.55",
|
|
1066
|
+
60: "0.6",
|
|
1067
|
+
65: "0.65",
|
|
1068
|
+
70: "0.7",
|
|
1069
|
+
75: "0.75",
|
|
1070
|
+
80: "0.8",
|
|
1071
|
+
85: "0.85",
|
|
1072
|
+
90: "0.9",
|
|
1073
|
+
95: "0.95",
|
|
1074
|
+
100: "1"
|
|
1075
|
+
},
|
|
1076
|
+
order: {
|
|
1077
|
+
first: "-9999",
|
|
1078
|
+
last: "9999",
|
|
1079
|
+
none: "0",
|
|
1080
|
+
1: "1",
|
|
1081
|
+
2: "2",
|
|
1082
|
+
3: "3",
|
|
1083
|
+
4: "4",
|
|
1084
|
+
5: "5",
|
|
1085
|
+
6: "6",
|
|
1086
|
+
7: "7",
|
|
1087
|
+
8: "8",
|
|
1088
|
+
9: "9",
|
|
1089
|
+
10: "10",
|
|
1090
|
+
11: "11",
|
|
1091
|
+
12: "12"
|
|
1092
|
+
},
|
|
1093
|
+
outlineColor: ({ theme: theme2 }) => theme2("colors"),
|
|
1094
|
+
outlineOffset: {
|
|
1095
|
+
0: "0px",
|
|
1096
|
+
1: "1px",
|
|
1097
|
+
2: "2px",
|
|
1098
|
+
4: "4px",
|
|
1099
|
+
8: "8px"
|
|
1100
|
+
},
|
|
1101
|
+
outlineWidth: {
|
|
1102
|
+
0: "0px",
|
|
1103
|
+
1: "1px",
|
|
1104
|
+
2: "2px",
|
|
1105
|
+
4: "4px",
|
|
1106
|
+
8: "8px"
|
|
1107
|
+
},
|
|
1108
|
+
padding: ({ theme: theme2 }) => theme2("spacing"),
|
|
1109
|
+
placeholderColor: ({ theme: theme2 }) => theme2("colors"),
|
|
1110
|
+
ringColor: ({ theme: theme2 }) => ({
|
|
1111
|
+
DEFAULT: "#3b82f6",
|
|
1112
|
+
...theme2("colors")
|
|
1113
|
+
}),
|
|
1114
|
+
ringOffsetColor: ({ theme: theme2 }) => theme2("colors"),
|
|
1115
|
+
ringOffsetWidth: {
|
|
1116
|
+
0: "0px",
|
|
1117
|
+
1: "1px",
|
|
1118
|
+
2: "2px",
|
|
1119
|
+
4: "4px",
|
|
1120
|
+
8: "8px"
|
|
1121
|
+
},
|
|
1122
|
+
ringWidth: {
|
|
1123
|
+
DEFAULT: "3px",
|
|
1124
|
+
0: "0px",
|
|
1125
|
+
1: "1px",
|
|
1126
|
+
2: "2px",
|
|
1127
|
+
4: "4px",
|
|
1128
|
+
8: "8px"
|
|
1129
|
+
},
|
|
1130
|
+
rotate: {
|
|
1131
|
+
0: "0deg",
|
|
1132
|
+
1: "1deg",
|
|
1133
|
+
2: "2deg",
|
|
1134
|
+
3: "3deg",
|
|
1135
|
+
6: "6deg",
|
|
1136
|
+
12: "12deg",
|
|
1137
|
+
45: "45deg",
|
|
1138
|
+
90: "90deg",
|
|
1139
|
+
180: "180deg"
|
|
1140
|
+
},
|
|
1141
|
+
saturate: {
|
|
1142
|
+
0: "0",
|
|
1143
|
+
50: ".5",
|
|
1144
|
+
100: "1",
|
|
1145
|
+
150: "1.5",
|
|
1146
|
+
200: "2"
|
|
1147
|
+
},
|
|
1148
|
+
scale: {
|
|
1149
|
+
0: "0",
|
|
1150
|
+
50: ".5",
|
|
1151
|
+
75: ".75",
|
|
1152
|
+
90: ".9",
|
|
1153
|
+
95: ".95",
|
|
1154
|
+
100: "1",
|
|
1155
|
+
105: "1.05",
|
|
1156
|
+
110: "1.1",
|
|
1157
|
+
125: "1.25",
|
|
1158
|
+
150: "1.5"
|
|
1159
|
+
},
|
|
1160
|
+
screens: {
|
|
1161
|
+
sm: "640px",
|
|
1162
|
+
md: "768px",
|
|
1163
|
+
lg: "1024px",
|
|
1164
|
+
xl: "1280px",
|
|
1165
|
+
"2xl": "1536px"
|
|
1166
|
+
},
|
|
1167
|
+
scrollMargin: ({ theme: theme2 }) => ({
|
|
1168
|
+
...theme2("spacing")
|
|
1169
|
+
}),
|
|
1170
|
+
scrollPadding: ({ theme: theme2 }) => theme2("spacing"),
|
|
1171
|
+
sepia: {
|
|
1172
|
+
0: "0",
|
|
1173
|
+
DEFAULT: "100%"
|
|
1174
|
+
},
|
|
1175
|
+
skew: {
|
|
1176
|
+
0: "0deg",
|
|
1177
|
+
1: "1deg",
|
|
1178
|
+
2: "2deg",
|
|
1179
|
+
3: "3deg",
|
|
1180
|
+
6: "6deg",
|
|
1181
|
+
12: "12deg"
|
|
1182
|
+
},
|
|
1183
|
+
space: ({ theme: theme2 }) => ({
|
|
1184
|
+
...theme2("spacing")
|
|
1185
|
+
}),
|
|
1186
|
+
spacing: {
|
|
1187
|
+
px: "1px",
|
|
1188
|
+
0: "0px",
|
|
1189
|
+
0.5: "0.125rem",
|
|
1190
|
+
1: "0.25rem",
|
|
1191
|
+
1.5: "0.375rem",
|
|
1192
|
+
2: "0.5rem",
|
|
1193
|
+
2.5: "0.625rem",
|
|
1194
|
+
3: "0.75rem",
|
|
1195
|
+
3.5: "0.875rem",
|
|
1196
|
+
4: "1rem",
|
|
1197
|
+
5: "1.25rem",
|
|
1198
|
+
6: "1.5rem",
|
|
1199
|
+
7: "1.75rem",
|
|
1200
|
+
8: "2rem",
|
|
1201
|
+
9: "2.25rem",
|
|
1202
|
+
10: "2.5rem",
|
|
1203
|
+
11: "2.75rem",
|
|
1204
|
+
12: "3rem",
|
|
1205
|
+
14: "3.5rem",
|
|
1206
|
+
16: "4rem",
|
|
1207
|
+
20: "5rem",
|
|
1208
|
+
24: "6rem",
|
|
1209
|
+
28: "7rem",
|
|
1210
|
+
32: "8rem",
|
|
1211
|
+
36: "9rem",
|
|
1212
|
+
40: "10rem",
|
|
1213
|
+
44: "11rem",
|
|
1214
|
+
48: "12rem",
|
|
1215
|
+
52: "13rem",
|
|
1216
|
+
56: "14rem",
|
|
1217
|
+
60: "15rem",
|
|
1218
|
+
64: "16rem",
|
|
1219
|
+
72: "18rem",
|
|
1220
|
+
80: "20rem",
|
|
1221
|
+
96: "24rem",
|
|
1222
|
+
"screen-sm": "640px",
|
|
1223
|
+
"screen-md": "768px",
|
|
1224
|
+
"screen-lg": "1024px",
|
|
1225
|
+
"screen-xl": "1280px",
|
|
1226
|
+
"screen-2xl": "1536px"
|
|
1227
|
+
},
|
|
1228
|
+
stroke: ({ theme: theme2 }) => ({
|
|
1229
|
+
none: "none",
|
|
1230
|
+
...theme2("colors")
|
|
1231
|
+
}),
|
|
1232
|
+
strokeWidth: {
|
|
1233
|
+
0: "0",
|
|
1234
|
+
1: "1",
|
|
1235
|
+
2: "2"
|
|
1236
|
+
},
|
|
1237
|
+
textColor: ({ theme: theme2 }) => theme2("colors"),
|
|
1238
|
+
textDecorationColor: ({ theme: theme2 }) => theme2("colors"),
|
|
1239
|
+
textDecorationThickness: {
|
|
1240
|
+
auto: "auto",
|
|
1241
|
+
"from-font": "from-font",
|
|
1242
|
+
0: "0px",
|
|
1243
|
+
1: "1px",
|
|
1244
|
+
2: "2px",
|
|
1245
|
+
4: "4px",
|
|
1246
|
+
8: "8px"
|
|
1247
|
+
},
|
|
1248
|
+
textIndent: ({ theme: theme2 }) => ({
|
|
1249
|
+
...theme2("spacing")
|
|
1250
|
+
}),
|
|
1251
|
+
textShadowBlur: ({ theme: theme2 }) => theme2("blur"),
|
|
1252
|
+
textShadowColor: ({ theme: theme2 }) => ({
|
|
1253
|
+
...theme2("colors"),
|
|
1254
|
+
DEFAULT: "#e5e7eb"
|
|
1255
|
+
}),
|
|
1256
|
+
textShadowOpacity: ({ theme: theme2 }) => theme2("opacity"),
|
|
1257
|
+
textShadowX: {
|
|
1258
|
+
0: "0px",
|
|
1259
|
+
1: "1px",
|
|
1260
|
+
2: "2px",
|
|
1261
|
+
3: "3px",
|
|
1262
|
+
4: "4px",
|
|
1263
|
+
5: "5px",
|
|
1264
|
+
6: "6px",
|
|
1265
|
+
7: "7px",
|
|
1266
|
+
8: "8px",
|
|
1267
|
+
9: "9px",
|
|
1268
|
+
10: "10px"
|
|
1269
|
+
},
|
|
1270
|
+
textShadowY: ({ theme: theme2 }) => theme2("textShadowX"),
|
|
1271
|
+
textUnderlineOffset: {
|
|
1272
|
+
auto: "auto",
|
|
1273
|
+
0: "0px",
|
|
1274
|
+
1: "1px",
|
|
1275
|
+
2: "2px",
|
|
1276
|
+
4: "4px",
|
|
1277
|
+
8: "8px"
|
|
1278
|
+
},
|
|
1279
|
+
transformOrigin: {
|
|
1280
|
+
center: "center",
|
|
1281
|
+
top: "top",
|
|
1282
|
+
"top-right": "top right",
|
|
1283
|
+
right: "right",
|
|
1284
|
+
"bottom-right": "bottom right",
|
|
1285
|
+
bottom: "bottom",
|
|
1286
|
+
"bottom-left": "bottom left",
|
|
1287
|
+
left: "left",
|
|
1288
|
+
"top-left": "top left"
|
|
1289
|
+
},
|
|
1290
|
+
translate: ({ theme: theme2 }) => ({
|
|
1291
|
+
...theme2("spacing"),
|
|
1292
|
+
"1/2": "50%",
|
|
1293
|
+
"1/3": "33.333333%",
|
|
1294
|
+
"2/3": "66.666667%",
|
|
1295
|
+
"1/4": "25%",
|
|
1296
|
+
"2/4": "50%",
|
|
1297
|
+
"3/4": "75%",
|
|
1298
|
+
full: "100%"
|
|
1299
|
+
}),
|
|
1300
|
+
size: ({ theme: theme2 }) => ({
|
|
1301
|
+
auto: "auto",
|
|
1302
|
+
...theme2("spacing"),
|
|
1303
|
+
"1/2": "50%",
|
|
1304
|
+
"1/3": "33.333333%",
|
|
1305
|
+
"2/3": "66.666667%",
|
|
1306
|
+
"1/4": "25%",
|
|
1307
|
+
"2/4": "50%",
|
|
1308
|
+
"3/4": "75%",
|
|
1309
|
+
"1/5": "20%",
|
|
1310
|
+
"2/5": "40%",
|
|
1311
|
+
"3/5": "60%",
|
|
1312
|
+
"4/5": "80%",
|
|
1313
|
+
"1/6": "16.666667%",
|
|
1314
|
+
"2/6": "33.333333%",
|
|
1315
|
+
"3/6": "50%",
|
|
1316
|
+
"4/6": "66.666667%",
|
|
1317
|
+
"5/6": "83.333333%",
|
|
1318
|
+
"1/12": "8.333333%",
|
|
1319
|
+
"2/12": "16.666667%",
|
|
1320
|
+
"3/12": "25%",
|
|
1321
|
+
"4/12": "33.333333%",
|
|
1322
|
+
"5/12": "41.666667%",
|
|
1323
|
+
"6/12": "50%",
|
|
1324
|
+
"7/12": "58.333333%",
|
|
1325
|
+
"8/12": "66.666667%",
|
|
1326
|
+
"9/12": "75%",
|
|
1327
|
+
"10/12": "83.333333%",
|
|
1328
|
+
"11/12": "91.666667%",
|
|
1329
|
+
full: "100%",
|
|
1330
|
+
min: "min-content",
|
|
1331
|
+
max: "max-content",
|
|
1332
|
+
fit: "fit-content"
|
|
1333
|
+
}),
|
|
1334
|
+
width: ({ theme: theme2 }) => ({
|
|
1335
|
+
auto: "auto",
|
|
1336
|
+
...theme2("spacing"),
|
|
1337
|
+
"1/2": "50%",
|
|
1338
|
+
"1/3": "33.333333%",
|
|
1339
|
+
"2/3": "66.666667%",
|
|
1340
|
+
"1/4": "25%",
|
|
1341
|
+
"2/4": "50%",
|
|
1342
|
+
"3/4": "75%",
|
|
1343
|
+
"1/5": "20%",
|
|
1344
|
+
"2/5": "40%",
|
|
1345
|
+
"3/5": "60%",
|
|
1346
|
+
"4/5": "80%",
|
|
1347
|
+
"1/6": "16.666667%",
|
|
1348
|
+
"2/6": "33.333333%",
|
|
1349
|
+
"3/6": "50%",
|
|
1350
|
+
"4/6": "66.666667%",
|
|
1351
|
+
"5/6": "83.333333%",
|
|
1352
|
+
"1/12": "8.333333%",
|
|
1353
|
+
"2/12": "16.666667%",
|
|
1354
|
+
"3/12": "25%",
|
|
1355
|
+
"4/12": "33.333333%",
|
|
1356
|
+
"5/12": "41.666667%",
|
|
1357
|
+
"6/12": "50%",
|
|
1358
|
+
"7/12": "58.333333%",
|
|
1359
|
+
"8/12": "66.666667%",
|
|
1360
|
+
"9/12": "75%",
|
|
1361
|
+
"10/12": "83.333333%",
|
|
1362
|
+
"11/12": "91.666667%",
|
|
1363
|
+
full: "100%",
|
|
1364
|
+
screen: "100vw",
|
|
1365
|
+
svw: "100svw",
|
|
1366
|
+
lvw: "100lvw",
|
|
1367
|
+
dvw: "100dvw",
|
|
1368
|
+
min: "min-content",
|
|
1369
|
+
max: "max-content",
|
|
1370
|
+
fit: "fit-content"
|
|
1371
|
+
}),
|
|
1372
|
+
textShadow: {
|
|
1373
|
+
"2xs": "0 1px 2px rgb(0 0 0 / 0.10)",
|
|
1374
|
+
xs: "0 1px 2px rgb(0 0 0 / 0.20)",
|
|
1375
|
+
sm: "0 1px 3px rgb(0 0 0 / 0.25)",
|
|
1376
|
+
DEFAULT: "0 1px 3px rgb(0 0 0 / 0.30)",
|
|
1377
|
+
md: "0 2px 4px rgb(0 0 0 / 0.30)",
|
|
1378
|
+
lg: "0 4px 6px rgb(0 0 0 / 0.25)",
|
|
1379
|
+
xl: "0 8px 12px rgb(0 0 0 / 0.20)",
|
|
1380
|
+
"2xl": "0 16px 24px rgb(0 0 0 / 0.15)",
|
|
1381
|
+
none: "none"
|
|
1382
|
+
},
|
|
1383
|
+
willChange: {
|
|
1384
|
+
auto: "auto",
|
|
1385
|
+
scroll: "scroll-position",
|
|
1386
|
+
contents: "contents",
|
|
1387
|
+
transform: "transform"
|
|
1388
|
+
},
|
|
1389
|
+
zoom: {
|
|
1390
|
+
0: "0",
|
|
1391
|
+
50: ".5",
|
|
1392
|
+
75: ".75",
|
|
1393
|
+
90: ".9",
|
|
1394
|
+
95: ".95",
|
|
1395
|
+
100: "1",
|
|
1396
|
+
105: "1.05",
|
|
1397
|
+
110: "1.1",
|
|
1398
|
+
125: "1.25",
|
|
1399
|
+
150: "1.5",
|
|
1400
|
+
200: "2"
|
|
1401
|
+
},
|
|
1402
|
+
zIndex: {
|
|
1403
|
+
0: "0",
|
|
1404
|
+
10: "10",
|
|
1405
|
+
20: "20",
|
|
1406
|
+
30: "30",
|
|
1407
|
+
40: "40",
|
|
1408
|
+
50: "50",
|
|
1409
|
+
60: "60",
|
|
1410
|
+
70: "70",
|
|
1411
|
+
80: "80",
|
|
1412
|
+
90: "90",
|
|
1413
|
+
100: "100",
|
|
1414
|
+
auto: "auto"
|
|
1415
|
+
}
|
|
1416
|
+
};
|
|
1417
|
+
var theme_default = theme;
|
|
1418
|
+
|
|
1419
|
+
// src/vars.js
|
|
1420
|
+
var vars = {
|
|
1421
|
+
transform: `transform: translateX(var(--transform-translate-x, 0)) translateY(var(--transform-translate-y, 0)) rotate(var(--transform-rotate, 0)) skewX(var(--transform-skew-x, 0)) skewY(var(--transform-skew-y, 0)) scaleX(var(--transform-scale-x, 1)) scaleY(var(--transform-scale-y, 1));`,
|
|
1422
|
+
filter: `filter: blur(var(--blur, 0)) brightness(var(--brightness, 1)) contrast(var(--contrast, 1)) grayscale(var(--grayscale, 0)) hue-rotate(var(--hue-rotate, 0deg)) invert(var(--invert, 0)) saturate(var(--saturate, 1)) sepia(var(--sepia, 0)) drop-shadow(var(--drop-shadow, 0 0 #0000));`,
|
|
1423
|
+
backdropFilter: `-webkit-backdrop-filter: blur(var(--backdrop-blur, 0)) brightness(var(--backdrop-brightness, 1)) contrast(var(--backdrop-contrast, 1)) grayscale(var(--backdrop-grayscale, 0)) hue-rotate(var(--backdrop-hue-rotate, 0deg)) invert(var(--backdrop-invert, 0)) opacity(var(--backdrop-opacity, 1)) saturate(var(--backdrop-saturate, 1)) sepia(var(--backdrop-sepia, 0)); backdrop-filter: blur(var(--backdrop-blur, 0)) brightness(var(--backdrop-brightness, 1)) contrast(var(--backdrop-contrast, 1)) grayscale(var(--backdrop-grayscale, 0)) hue-rotate(var(--backdrop-hue-rotate, 0deg)) invert(var(--backdrop-invert, 0)) opacity(var(--backdrop-opacity, 1)) saturate(var(--backdrop-saturate, 1)) sepia(var(--backdrop-sepia, 0));`
|
|
1424
|
+
};
|
|
1425
|
+
var vars_default = vars;
|
|
1426
|
+
|
|
1427
|
+
// src/config.js
|
|
1428
|
+
var configOptions = {
|
|
1429
|
+
variants: variants_default,
|
|
1430
|
+
theme: theme_default,
|
|
1431
|
+
vars: vars_default
|
|
1432
|
+
};
|
|
1433
|
+
var config_default = configOptions;
|
|
1434
|
+
|
|
1435
|
+
// src/utils.js
|
|
1436
|
+
function isFunction(fn) {
|
|
1437
|
+
return fn && {}.toString.call(fn) === "[object Function]";
|
|
1438
|
+
}
|
|
1439
|
+
function getConfigOptions(options = {}, pluginKeys = []) {
|
|
1440
|
+
const { theme: theme2 = {} } = options;
|
|
1441
|
+
const { extend: themeExtend = {} } = theme2;
|
|
1442
|
+
const newTheme = {};
|
|
1443
|
+
const themeKeys = Object.keys(config_default.theme);
|
|
1444
|
+
themeKeys.forEach((key) => {
|
|
1445
|
+
newTheme[key] = theme2[key] || config_default.theme[key];
|
|
1446
|
+
if (isFunction(newTheme[key])) {
|
|
1447
|
+
newTheme[key] = newTheme[key]({
|
|
1448
|
+
theme: (keyRef) => config_default.theme[keyRef]
|
|
1449
|
+
});
|
|
1450
|
+
}
|
|
1451
|
+
});
|
|
1452
|
+
themeKeys.forEach((key) => {
|
|
1453
|
+
if (isFunction(newTheme[key])) {
|
|
1454
|
+
newTheme[key] = newTheme[key]({
|
|
1455
|
+
theme: (keyRef) => newTheme[keyRef]
|
|
1456
|
+
});
|
|
1457
|
+
}
|
|
1458
|
+
if (themeExtend[key]) {
|
|
1459
|
+
newTheme[key] = Object.assign({}, newTheme[key], themeExtend[key]);
|
|
1460
|
+
}
|
|
1461
|
+
});
|
|
1462
|
+
return {
|
|
1463
|
+
...config_default,
|
|
1464
|
+
...options,
|
|
1465
|
+
theme: newTheme
|
|
1466
|
+
};
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1469
|
+
// src/resolvers.js
|
|
1470
|
+
function resolveArbitraryValue(valueKey) {
|
|
1471
|
+
if (valueKey.startsWith("[") && valueKey.endsWith("]")) {
|
|
1472
|
+
return valueKey.slice(1, -1).replace(/_/g, " ");
|
|
1473
|
+
}
|
|
1474
|
+
return void 0;
|
|
1475
|
+
}
|
|
1476
|
+
function resolveThemeValue(scale, valueKey) {
|
|
1477
|
+
if (typeof scale !== "object" || scale === null) return void 0;
|
|
1478
|
+
if (Object.prototype.hasOwnProperty.call(scale, valueKey)) {
|
|
1479
|
+
return scale[valueKey];
|
|
1480
|
+
}
|
|
1481
|
+
const arbitrary = resolveArbitraryValue(valueKey);
|
|
1482
|
+
if (arbitrary !== void 0) return arbitrary;
|
|
1483
|
+
return void 0;
|
|
1484
|
+
}
|
|
1485
|
+
function resolveTimeValue(valueKey) {
|
|
1486
|
+
const arbitrary = resolveArbitraryValue(valueKey);
|
|
1487
|
+
if (arbitrary !== void 0) return arbitrary;
|
|
1488
|
+
if (/^\d+(?:\.\d+)?(?:ms|s)$/.test(valueKey)) return valueKey;
|
|
1489
|
+
if (/^\d+(?:\.\d+)?$/.test(valueKey)) return `${valueKey}ms`;
|
|
1490
|
+
return void 0;
|
|
1491
|
+
}
|
|
1492
|
+
function resolveColorValue(colors, colorKey) {
|
|
1493
|
+
if (!colors || typeof colors !== "object") return void 0;
|
|
1494
|
+
const arbitrary = resolveArbitraryValue(colorKey);
|
|
1495
|
+
if (arbitrary !== void 0) return arbitrary;
|
|
1496
|
+
if (Object.prototype.hasOwnProperty.call(colors, colorKey)) {
|
|
1497
|
+
const direct = colors[colorKey];
|
|
1498
|
+
if (typeof direct === "string") return direct;
|
|
1499
|
+
if (direct && typeof direct === "object" && typeof direct.DEFAULT === "string") {
|
|
1500
|
+
return direct.DEFAULT;
|
|
1501
|
+
}
|
|
1502
|
+
}
|
|
1503
|
+
const segments = colorKey.split("-");
|
|
1504
|
+
let current = colors;
|
|
1505
|
+
for (let i = 0; i < segments.length; i += 1) {
|
|
1506
|
+
const segment = segments[i];
|
|
1507
|
+
if (!current || typeof current !== "object") return void 0;
|
|
1508
|
+
if (!Object.prototype.hasOwnProperty.call(current, segment)) return void 0;
|
|
1509
|
+
current = current[segment];
|
|
1510
|
+
}
|
|
1511
|
+
if (typeof current === "string") return current;
|
|
1512
|
+
if (current && typeof current === "object" && typeof current.DEFAULT === "string") {
|
|
1513
|
+
return current.DEFAULT;
|
|
1514
|
+
}
|
|
1515
|
+
return void 0;
|
|
1516
|
+
}
|
|
1517
|
+
function resolveColorWithOpacity(colors, rawKey) {
|
|
1518
|
+
const slashIdx = rawKey.lastIndexOf("/");
|
|
1519
|
+
if (slashIdx === -1) return resolveColorValue(colors, rawKey);
|
|
1520
|
+
const colorKey = rawKey.slice(0, slashIdx);
|
|
1521
|
+
const opacityStr = rawKey.slice(slashIdx + 1);
|
|
1522
|
+
const color = resolveColorValue(colors, colorKey);
|
|
1523
|
+
if (color === void 0) return void 0;
|
|
1524
|
+
const arbOpacity = resolveArbitraryValue(opacityStr);
|
|
1525
|
+
const opacityVal = arbOpacity !== void 0 ? arbOpacity : String(parseFloat(opacityStr) / 100);
|
|
1526
|
+
if (!opacityVal || opacityVal === "NaN") return void 0;
|
|
1527
|
+
return `color-mix(in oklch, ${color} ${parseFloat(opacityStr)}%, transparent)`;
|
|
1528
|
+
}
|
|
1529
|
+
function escapeCssIdentifier(value) {
|
|
1530
|
+
if (typeof CSS !== "undefined" && typeof CSS.escape === "function") {
|
|
1531
|
+
return CSS.escape(value);
|
|
1532
|
+
}
|
|
1533
|
+
return String(value).replace(/\\/g, "\\\\").replace(/([ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g, "\\$1").replace(/^(\d)/, "\\3$1 ");
|
|
1534
|
+
}
|
|
1535
|
+
function appendImportant(declaration, isImportant) {
|
|
1536
|
+
if (!isImportant) return declaration;
|
|
1537
|
+
const entries = declaration.split(";").map((item) => item.trim()).filter(Boolean).map((item) => item.includes("!important") ? item : `${item} !important`);
|
|
1538
|
+
return `${entries.join("; ")};`;
|
|
1539
|
+
}
|
|
1540
|
+
function splitByVariantDelimiter(token) {
|
|
1541
|
+
const parts = [];
|
|
1542
|
+
let current = "";
|
|
1543
|
+
let bracketDepth = 0;
|
|
1544
|
+
for (let i = 0; i < token.length; i += 1) {
|
|
1545
|
+
const char = token[i];
|
|
1546
|
+
if (char === "[") bracketDepth += 1;
|
|
1547
|
+
if (char === "]") bracketDepth = Math.max(0, bracketDepth - 1);
|
|
1548
|
+
if (char === ":" && bracketDepth === 0) {
|
|
1549
|
+
parts.push(current);
|
|
1550
|
+
current = "";
|
|
1551
|
+
} else {
|
|
1552
|
+
current += char;
|
|
1553
|
+
}
|
|
1554
|
+
}
|
|
1555
|
+
if (current) parts.push(current);
|
|
1556
|
+
return parts;
|
|
1557
|
+
}
|
|
1558
|
+
|
|
1559
|
+
// src/maps/layout.maps.js
|
|
1560
|
+
var DISPLAY_MAP = {
|
|
1561
|
+
block: "display: block;",
|
|
1562
|
+
inline: "display: inline;",
|
|
1563
|
+
"inline-block": "display: inline-block;",
|
|
1564
|
+
flex: "display: flex;",
|
|
1565
|
+
"inline-flex": "display: inline-flex;",
|
|
1566
|
+
grid: "display: grid;",
|
|
1567
|
+
"inline-grid": "display: inline-grid;",
|
|
1568
|
+
hidden: "display: none;",
|
|
1569
|
+
contents: "display: contents;",
|
|
1570
|
+
"flow-root": "display: flow-root;",
|
|
1571
|
+
"list-item": "display: list-item;",
|
|
1572
|
+
table: "display: table;",
|
|
1573
|
+
"inline-table": "display: inline-table;",
|
|
1574
|
+
"table-caption": "display: table-caption;",
|
|
1575
|
+
"table-cell": "display: table-cell;",
|
|
1576
|
+
"table-column": "display: table-column;",
|
|
1577
|
+
"table-column-group": "display: table-column-group;",
|
|
1578
|
+
"table-footer-group": "display: table-footer-group;",
|
|
1579
|
+
"table-header-group": "display: table-header-group;",
|
|
1580
|
+
"table-row-group": "display: table-row-group;",
|
|
1581
|
+
"table-row": "display: table-row;"
|
|
1582
|
+
};
|
|
1583
|
+
var POSITION_MAP = {
|
|
1584
|
+
static: "position: static;",
|
|
1585
|
+
fixed: "position: fixed;",
|
|
1586
|
+
absolute: "position: absolute;",
|
|
1587
|
+
relative: "position: relative;",
|
|
1588
|
+
sticky: "position: sticky;"
|
|
1589
|
+
};
|
|
1590
|
+
var VISIBILITY_MAP = {
|
|
1591
|
+
visible: "visibility: visible;",
|
|
1592
|
+
invisible: "visibility: hidden;",
|
|
1593
|
+
collapse: "visibility: collapse;"
|
|
1594
|
+
};
|
|
1595
|
+
var OVERFLOW_MAP = {
|
|
1596
|
+
auto: "overflow: auto;",
|
|
1597
|
+
hidden: "overflow: hidden;",
|
|
1598
|
+
clip: "overflow: clip;",
|
|
1599
|
+
visible: "overflow: visible;",
|
|
1600
|
+
scroll: "overflow: scroll;"
|
|
1601
|
+
};
|
|
1602
|
+
var OVERFLOW_X_MAP = {
|
|
1603
|
+
auto: "overflow-x: auto;",
|
|
1604
|
+
hidden: "overflow-x: hidden;",
|
|
1605
|
+
clip: "overflow-x: clip;",
|
|
1606
|
+
visible: "overflow-x: visible;",
|
|
1607
|
+
scroll: "overflow-x: scroll;"
|
|
1608
|
+
};
|
|
1609
|
+
var OVERFLOW_Y_MAP = {
|
|
1610
|
+
auto: "overflow-y: auto;",
|
|
1611
|
+
hidden: "overflow-y: hidden;",
|
|
1612
|
+
clip: "overflow-y: clip;",
|
|
1613
|
+
visible: "overflow-y: visible;",
|
|
1614
|
+
scroll: "overflow-y: scroll;"
|
|
1615
|
+
};
|
|
1616
|
+
var OVERSCROLL_MAP = {
|
|
1617
|
+
auto: "overscroll-behavior: auto;",
|
|
1618
|
+
contain: "overscroll-behavior: contain;",
|
|
1619
|
+
none: "overscroll-behavior: none;"
|
|
1620
|
+
};
|
|
1621
|
+
var OVERSCROLL_X_MAP = {
|
|
1622
|
+
auto: "overscroll-behavior-x: auto;",
|
|
1623
|
+
contain: "overscroll-behavior-x: contain;",
|
|
1624
|
+
none: "overscroll-behavior-x: none;"
|
|
1625
|
+
};
|
|
1626
|
+
var OVERSCROLL_Y_MAP = {
|
|
1627
|
+
auto: "overscroll-behavior-y: auto;",
|
|
1628
|
+
contain: "overscroll-behavior-y: contain;",
|
|
1629
|
+
none: "overscroll-behavior-y: none;"
|
|
1630
|
+
};
|
|
1631
|
+
var FLOAT_MAP = {
|
|
1632
|
+
left: "float: left;",
|
|
1633
|
+
right: "float: right;",
|
|
1634
|
+
none: "float: none;",
|
|
1635
|
+
start: "float: inline-start;",
|
|
1636
|
+
end: "float: inline-end;"
|
|
1637
|
+
};
|
|
1638
|
+
var CLEAR_MAP = {
|
|
1639
|
+
left: "clear: left;",
|
|
1640
|
+
right: "clear: right;",
|
|
1641
|
+
both: "clear: both;",
|
|
1642
|
+
none: "clear: none;",
|
|
1643
|
+
start: "clear: inline-start;",
|
|
1644
|
+
end: "clear: inline-end;"
|
|
1645
|
+
};
|
|
1646
|
+
var ISOLATION_MAP = {
|
|
1647
|
+
isolate: "isolation: isolate;",
|
|
1648
|
+
"isolation-auto": "isolation: auto;"
|
|
1649
|
+
};
|
|
1650
|
+
var OBJECT_FIT_MAP = {
|
|
1651
|
+
contain: "object-fit: contain;",
|
|
1652
|
+
cover: "object-fit: cover;",
|
|
1653
|
+
fill: "object-fit: fill;",
|
|
1654
|
+
none: "object-fit: none;",
|
|
1655
|
+
"scale-down": "object-fit: scale-down;"
|
|
1656
|
+
};
|
|
1657
|
+
var TRANSFORM_STYLE_MAP = {
|
|
1658
|
+
"transform-style-flat": "transform-style: flat;",
|
|
1659
|
+
"transform-style-3d": "transform-style: preserve-3d;",
|
|
1660
|
+
"transform-3d": "transform-style: preserve-3d;"
|
|
1661
|
+
};
|
|
1662
|
+
var BACKFACE_MAP = {
|
|
1663
|
+
"backface-visible": "backface-visibility: visible;",
|
|
1664
|
+
"backface-hidden": "backface-visibility: hidden;"
|
|
1665
|
+
};
|
|
1666
|
+
var FIELD_SIZING_MAP = {
|
|
1667
|
+
"field-sizing-fixed": "field-sizing: fixed;",
|
|
1668
|
+
"field-sizing-content": "field-sizing: content;"
|
|
1669
|
+
};
|
|
1670
|
+
var BOX_SIZING_MAP = {
|
|
1671
|
+
border: "box-sizing: border-box;",
|
|
1672
|
+
content: "box-sizing: content-box;"
|
|
1673
|
+
};
|
|
1674
|
+
var TABLE_LAYOUT_MAP = {
|
|
1675
|
+
auto: "table-layout: auto;",
|
|
1676
|
+
fixed: "table-layout: fixed;"
|
|
1677
|
+
};
|
|
1678
|
+
var CAPTION_SIDE_MAP = {
|
|
1679
|
+
top: "caption-side: top;",
|
|
1680
|
+
bottom: "caption-side: bottom;"
|
|
1681
|
+
};
|
|
1682
|
+
var BORDER_COLLAPSE_MAP = {
|
|
1683
|
+
collapse: "border-collapse: collapse;",
|
|
1684
|
+
separate: "border-collapse: separate;"
|
|
1685
|
+
};
|
|
1686
|
+
var SCROLL_BEHAVIOR_MAP = {
|
|
1687
|
+
auto: "scroll-behavior: auto;",
|
|
1688
|
+
smooth: "scroll-behavior: smooth;"
|
|
1689
|
+
};
|
|
1690
|
+
var SIDE_PROPS = {
|
|
1691
|
+
"": [""],
|
|
1692
|
+
t: ["-top"],
|
|
1693
|
+
r: ["-right"],
|
|
1694
|
+
b: ["-bottom"],
|
|
1695
|
+
l: ["-left"],
|
|
1696
|
+
x: ["-left", "-right"],
|
|
1697
|
+
y: ["-top", "-bottom"]
|
|
1698
|
+
};
|
|
1699
|
+
var INSET_AXIS_PROPS = {
|
|
1700
|
+
x: ["left", "right"],
|
|
1701
|
+
y: ["top", "bottom"]
|
|
1702
|
+
};
|
|
1703
|
+
var ROUNDED_PROPS = {
|
|
1704
|
+
"": ["border-radius"],
|
|
1705
|
+
t: ["border-top-left-radius", "border-top-right-radius"],
|
|
1706
|
+
r: ["border-top-right-radius", "border-bottom-right-radius"],
|
|
1707
|
+
b: ["border-bottom-right-radius", "border-bottom-left-radius"],
|
|
1708
|
+
l: ["border-top-left-radius", "border-bottom-left-radius"],
|
|
1709
|
+
tl: ["border-top-left-radius"],
|
|
1710
|
+
tr: ["border-top-right-radius"],
|
|
1711
|
+
br: ["border-bottom-right-radius"],
|
|
1712
|
+
bl: ["border-bottom-left-radius"],
|
|
1713
|
+
ss: ["border-start-start-radius"],
|
|
1714
|
+
se: ["border-start-end-radius"],
|
|
1715
|
+
es: ["border-end-start-radius"],
|
|
1716
|
+
ee: ["border-end-end-radius"]
|
|
1717
|
+
};
|
|
1718
|
+
|
|
1719
|
+
// src/maps/interactivity.maps.js
|
|
1720
|
+
var CURSOR_MAP = {
|
|
1721
|
+
auto: "cursor: auto;",
|
|
1722
|
+
default: "cursor: default;",
|
|
1723
|
+
pointer: "cursor: pointer;",
|
|
1724
|
+
wait: "cursor: wait;",
|
|
1725
|
+
text: "cursor: text;",
|
|
1726
|
+
move: "cursor: move;",
|
|
1727
|
+
help: "cursor: help;",
|
|
1728
|
+
"not-allowed": "cursor: not-allowed;",
|
|
1729
|
+
none: "cursor: none;",
|
|
1730
|
+
"context-menu": "cursor: context-menu;",
|
|
1731
|
+
progress: "cursor: progress;",
|
|
1732
|
+
cell: "cursor: cell;",
|
|
1733
|
+
crosshair: "cursor: crosshair;",
|
|
1734
|
+
"vertical-text": "cursor: vertical-text;",
|
|
1735
|
+
alias: "cursor: alias;",
|
|
1736
|
+
copy: "cursor: copy;",
|
|
1737
|
+
"no-drop": "cursor: no-drop;",
|
|
1738
|
+
grab: "cursor: grab;",
|
|
1739
|
+
grabbing: "cursor: grabbing;",
|
|
1740
|
+
"all-scroll": "cursor: all-scroll;",
|
|
1741
|
+
"zoom-in": "cursor: zoom-in;",
|
|
1742
|
+
"zoom-out": "cursor: zoom-out;"
|
|
1743
|
+
};
|
|
1744
|
+
var POINTER_EVENTS_MAP = {
|
|
1745
|
+
none: "pointer-events: none;",
|
|
1746
|
+
auto: "pointer-events: auto;"
|
|
1747
|
+
};
|
|
1748
|
+
var USER_SELECT_MAP = {
|
|
1749
|
+
none: "user-select: none;",
|
|
1750
|
+
text: "user-select: text;",
|
|
1751
|
+
all: "user-select: all;",
|
|
1752
|
+
auto: "user-select: auto;"
|
|
1753
|
+
};
|
|
1754
|
+
var APPEARANCE_MAP = {
|
|
1755
|
+
none: "appearance: none;",
|
|
1756
|
+
auto: "appearance: auto;"
|
|
1757
|
+
};
|
|
1758
|
+
var TOUCH_ACTION_MAP = {
|
|
1759
|
+
auto: "touch-action: auto;",
|
|
1760
|
+
none: "touch-action: none;",
|
|
1761
|
+
"pan-x": "touch-action: pan-x;",
|
|
1762
|
+
"pan-left": "touch-action: pan-left;",
|
|
1763
|
+
"pan-right": "touch-action: pan-right;",
|
|
1764
|
+
"pan-y": "touch-action: pan-y;",
|
|
1765
|
+
"pan-up": "touch-action: pan-up;",
|
|
1766
|
+
"pan-down": "touch-action: pan-down;",
|
|
1767
|
+
"pinch-zoom": "touch-action: pinch-zoom;",
|
|
1768
|
+
manipulation: "touch-action: manipulation;"
|
|
1769
|
+
};
|
|
1770
|
+
var OUTLINE_STYLE_MAP = {
|
|
1771
|
+
none: "outline: 2px solid transparent; outline-offset: 2px;",
|
|
1772
|
+
solid: "outline-style: solid;",
|
|
1773
|
+
dashed: "outline-style: dashed;",
|
|
1774
|
+
dotted: "outline-style: dotted;",
|
|
1775
|
+
double: "outline-style: double;"
|
|
1776
|
+
};
|
|
1777
|
+
var BORDER_STYLE_MAP = {
|
|
1778
|
+
solid: "border-style: solid;",
|
|
1779
|
+
dashed: "border-style: dashed;",
|
|
1780
|
+
dotted: "border-style: dotted;",
|
|
1781
|
+
double: "border-style: double;",
|
|
1782
|
+
hidden: "border-style: hidden;",
|
|
1783
|
+
none: "border-style: none;"
|
|
1784
|
+
};
|
|
1785
|
+
var TRANSITION_PROPERTY_MAP = {
|
|
1786
|
+
none: "none",
|
|
1787
|
+
all: "all",
|
|
1788
|
+
DEFAULT: "color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",
|
|
1789
|
+
colors: "color, background-color, border-color, text-decoration-color, fill, stroke",
|
|
1790
|
+
opacity: "opacity",
|
|
1791
|
+
shadow: "box-shadow",
|
|
1792
|
+
transform: "transform"
|
|
1793
|
+
};
|
|
1794
|
+
var TRANSITION_TIMING_MAP = {
|
|
1795
|
+
linear: "linear",
|
|
1796
|
+
in: "cubic-bezier(0.4, 0, 1, 1)",
|
|
1797
|
+
out: "cubic-bezier(0, 0, 0.2, 1)",
|
|
1798
|
+
"in-out": "cubic-bezier(0.4, 0, 0.2, 1)"
|
|
1799
|
+
};
|
|
1800
|
+
|
|
1801
|
+
// src/builders/layout.js
|
|
1802
|
+
function buildLayoutDeclaration(baseToken, theme2) {
|
|
1803
|
+
if (baseToken.startsWith("overflow-x-")) return OVERFLOW_X_MAP[baseToken.slice(11)] ?? void 0;
|
|
1804
|
+
if (baseToken.startsWith("overflow-y-")) return OVERFLOW_Y_MAP[baseToken.slice(11)] ?? void 0;
|
|
1805
|
+
if (baseToken.startsWith("overflow-")) return OVERFLOW_MAP[baseToken.slice(9)] ?? void 0;
|
|
1806
|
+
if (baseToken.startsWith("overscroll-x-")) return OVERSCROLL_X_MAP[baseToken.slice(13)] ?? void 0;
|
|
1807
|
+
if (baseToken.startsWith("overscroll-y-")) return OVERSCROLL_Y_MAP[baseToken.slice(13)] ?? void 0;
|
|
1808
|
+
if (baseToken.startsWith("overscroll-")) return OVERSCROLL_MAP[baseToken.slice(11)] ?? void 0;
|
|
1809
|
+
if (baseToken.startsWith("float-")) return FLOAT_MAP[baseToken.slice(6)] ?? void 0;
|
|
1810
|
+
if (baseToken.startsWith("clear-")) return CLEAR_MAP[baseToken.slice(6)] ?? void 0;
|
|
1811
|
+
if (baseToken.startsWith("object-fit-")) return OBJECT_FIT_MAP[baseToken.slice(11)] ?? void 0;
|
|
1812
|
+
if (baseToken.startsWith("object-")) {
|
|
1813
|
+
const val = baseToken.slice(7);
|
|
1814
|
+
if (OBJECT_FIT_MAP[val]) return OBJECT_FIT_MAP[val];
|
|
1815
|
+
const pos = resolveThemeValue(theme2.objectPosition || {}, val);
|
|
1816
|
+
if (pos !== void 0) return `object-position: ${pos};`;
|
|
1817
|
+
}
|
|
1818
|
+
if (baseToken.startsWith("z-") || baseToken.startsWith("-z-")) {
|
|
1819
|
+
const negative = baseToken.startsWith("-");
|
|
1820
|
+
const key = negative ? baseToken.slice(3) : baseToken.slice(2);
|
|
1821
|
+
const val = resolveThemeValue(theme2.zIndex || {}, key);
|
|
1822
|
+
if (val !== void 0) return `z-index: ${negative ? `-${val}` : val};`;
|
|
1823
|
+
const arb = resolveArbitraryValue(negative ? baseToken.slice(3) : baseToken.slice(2));
|
|
1824
|
+
if (arb !== void 0) return `z-index: ${negative ? `-${arb}` : arb};`;
|
|
1825
|
+
}
|
|
1826
|
+
if (baseToken.startsWith("order-")) {
|
|
1827
|
+
const val = resolveThemeValue(theme2.order || {}, baseToken.slice(6));
|
|
1828
|
+
if (val !== void 0) return `order: ${val};`;
|
|
1829
|
+
}
|
|
1830
|
+
if (baseToken.startsWith("aspect-")) {
|
|
1831
|
+
const val = resolveThemeValue(theme2.aspectRatio || {}, baseToken.slice(7));
|
|
1832
|
+
if (val !== void 0) return `aspect-ratio: ${val};`;
|
|
1833
|
+
const arb = resolveArbitraryValue(baseToken.slice(7));
|
|
1834
|
+
if (arb !== void 0) return `aspect-ratio: ${arb};`;
|
|
1835
|
+
}
|
|
1836
|
+
if (baseToken.startsWith("columns-")) {
|
|
1837
|
+
const val = resolveThemeValue(theme2.columns || {}, baseToken.slice(8));
|
|
1838
|
+
if (val !== void 0) return `columns: ${val};`;
|
|
1839
|
+
}
|
|
1840
|
+
if (baseToken.startsWith("box-")) return BOX_SIZING_MAP[baseToken.slice(4)] ?? void 0;
|
|
1841
|
+
if (baseToken.startsWith("table-")) {
|
|
1842
|
+
const key = baseToken.slice(6);
|
|
1843
|
+
if (TABLE_LAYOUT_MAP[key]) return TABLE_LAYOUT_MAP[key];
|
|
1844
|
+
}
|
|
1845
|
+
if (baseToken.startsWith("caption-")) return CAPTION_SIDE_MAP[baseToken.slice(8)] ?? void 0;
|
|
1846
|
+
if (baseToken.startsWith("border-collapse") || baseToken.startsWith("border-separate")) {
|
|
1847
|
+
return BORDER_COLLAPSE_MAP[baseToken.slice(7)] ?? void 0;
|
|
1848
|
+
}
|
|
1849
|
+
if (baseToken.startsWith("scroll-")) {
|
|
1850
|
+
const key = baseToken.slice(7);
|
|
1851
|
+
if (SCROLL_BEHAVIOR_MAP[key]) return SCROLL_BEHAVIOR_MAP[key];
|
|
1852
|
+
const smMatch = baseToken.match(/^scroll-m([trblxy]?)-(.+)$/);
|
|
1853
|
+
if (smMatch) {
|
|
1854
|
+
const [, side, valueKey] = smMatch;
|
|
1855
|
+
const val = resolveThemeValue(theme2.scrollMargin || theme2.spacing || {}, valueKey);
|
|
1856
|
+
if (val === void 0) return void 0;
|
|
1857
|
+
const suffixes = SIDE_PROPS[side] ?? void 0;
|
|
1858
|
+
if (!suffixes) return void 0;
|
|
1859
|
+
return suffixes.map((s) => `scroll-margin${s}: ${val};`).join(" ");
|
|
1860
|
+
}
|
|
1861
|
+
const spMatch = baseToken.match(/^scroll-p([trblxy]?)-(.+)$/);
|
|
1862
|
+
if (spMatch) {
|
|
1863
|
+
const [, side, valueKey] = spMatch;
|
|
1864
|
+
const val = resolveThemeValue(theme2.scrollPadding || theme2.spacing || {}, valueKey);
|
|
1865
|
+
if (val === void 0) return void 0;
|
|
1866
|
+
const suffixes = SIDE_PROPS[side] ?? void 0;
|
|
1867
|
+
if (!suffixes) return void 0;
|
|
1868
|
+
return suffixes.map((s) => `scroll-padding${s}: ${val};`).join(" ");
|
|
1869
|
+
}
|
|
1870
|
+
}
|
|
1871
|
+
if (baseToken.startsWith("will-change-")) {
|
|
1872
|
+
const val = resolveThemeValue(theme2.willChange || {}, baseToken.slice(12));
|
|
1873
|
+
if (val !== void 0) return `will-change: ${val};`;
|
|
1874
|
+
}
|
|
1875
|
+
if (baseToken.startsWith("content-")) {
|
|
1876
|
+
const val = resolveThemeValue(theme2.content || {}, baseToken.slice(8));
|
|
1877
|
+
if (val !== void 0) return `content: "${val}";`;
|
|
1878
|
+
const arb = resolveArbitraryValue(baseToken.slice(8));
|
|
1879
|
+
if (arb !== void 0) return `content: ${arb};`;
|
|
1880
|
+
}
|
|
1881
|
+
if (baseToken.startsWith("size-")) {
|
|
1882
|
+
const val = resolveThemeValue(theme2.size || theme2.spacing || {}, baseToken.slice(5));
|
|
1883
|
+
if (val !== void 0) return `width: ${val}; height: ${val};`;
|
|
1884
|
+
}
|
|
1885
|
+
if (DISPLAY_MAP[baseToken]) return DISPLAY_MAP[baseToken];
|
|
1886
|
+
if (VISIBILITY_MAP[baseToken]) return VISIBILITY_MAP[baseToken];
|
|
1887
|
+
if (ISOLATION_MAP[baseToken]) return ISOLATION_MAP[baseToken];
|
|
1888
|
+
if (TRANSFORM_STYLE_MAP[baseToken]) return TRANSFORM_STYLE_MAP[baseToken];
|
|
1889
|
+
if (BACKFACE_MAP[baseToken]) return BACKFACE_MAP[baseToken];
|
|
1890
|
+
if (FIELD_SIZING_MAP[baseToken]) return FIELD_SIZING_MAP[baseToken];
|
|
1891
|
+
if (baseToken.startsWith("touch-")) {
|
|
1892
|
+
const key = baseToken.slice(6);
|
|
1893
|
+
if (TOUCH_ACTION_MAP[key]) return TOUCH_ACTION_MAP[key];
|
|
1894
|
+
}
|
|
1895
|
+
if (TOUCH_ACTION_MAP[baseToken]) return TOUCH_ACTION_MAP[baseToken];
|
|
1896
|
+
if (APPEARANCE_MAP[baseToken]) return APPEARANCE_MAP[baseToken];
|
|
1897
|
+
return void 0;
|
|
1898
|
+
}
|
|
1899
|
+
function buildPositionInsetDeclaration(baseToken, theme2) {
|
|
1900
|
+
if (POSITION_MAP[baseToken]) return POSITION_MAP[baseToken];
|
|
1901
|
+
const negative = baseToken.startsWith("-");
|
|
1902
|
+
const normalized = negative ? baseToken.slice(1) : baseToken;
|
|
1903
|
+
const insetScale = theme2.inset || theme2.spacing || {};
|
|
1904
|
+
const directionalMatch = normalized.match(/^(top|right|bottom|left)-(.+)$/);
|
|
1905
|
+
if (directionalMatch) {
|
|
1906
|
+
const [, side, valueKey] = directionalMatch;
|
|
1907
|
+
let value = resolveThemeValue(insetScale, valueKey);
|
|
1908
|
+
if (value === void 0) return void 0;
|
|
1909
|
+
if (negative && value !== "auto") value = `-${value}`;
|
|
1910
|
+
return `${side}: ${value};`;
|
|
1911
|
+
}
|
|
1912
|
+
const axisMatch = normalized.match(/^inset-([xy])-(.+)$/);
|
|
1913
|
+
if (axisMatch) {
|
|
1914
|
+
const [, axis, valueKey] = axisMatch;
|
|
1915
|
+
let value = resolveThemeValue(insetScale, valueKey);
|
|
1916
|
+
if (value === void 0) return void 0;
|
|
1917
|
+
if (negative && value !== "auto") value = `-${value}`;
|
|
1918
|
+
const props = INSET_AXIS_PROPS[axis];
|
|
1919
|
+
if (!props) return void 0;
|
|
1920
|
+
return props.map((prop) => `${prop}: ${value};`).join(" ");
|
|
1921
|
+
}
|
|
1922
|
+
const insetMatch = normalized.match(/^inset-(.+)$/);
|
|
1923
|
+
if (insetMatch) {
|
|
1924
|
+
const valueKey = insetMatch[1];
|
|
1925
|
+
let value = resolveThemeValue(insetScale, valueKey);
|
|
1926
|
+
if (value === void 0) return void 0;
|
|
1927
|
+
if (negative && value !== "auto") value = `-${value}`;
|
|
1928
|
+
return `top: ${value}; right: ${value}; bottom: ${value}; left: ${value};`;
|
|
1929
|
+
}
|
|
1930
|
+
return void 0;
|
|
1931
|
+
}
|
|
1932
|
+
|
|
1933
|
+
// src/builders/spacing.js
|
|
1934
|
+
function buildSpacingDeclaration(baseToken, theme2) {
|
|
1935
|
+
const negative = baseToken.startsWith("-");
|
|
1936
|
+
const normalized = negative ? baseToken.slice(1) : baseToken;
|
|
1937
|
+
const match = normalized.match(/^(m|p)([trblxy]?)-(.+)$/);
|
|
1938
|
+
if (!match) return void 0;
|
|
1939
|
+
const [, kind, side, valueKey] = match;
|
|
1940
|
+
const baseProp = kind === "m" ? "margin" : "padding";
|
|
1941
|
+
let value = resolveThemeValue(theme2.spacing || {}, valueKey);
|
|
1942
|
+
if (value === void 0 && kind === "m" && valueKey === "auto") value = "auto";
|
|
1943
|
+
if (value === void 0) return void 0;
|
|
1944
|
+
if (negative && value !== "auto") value = `-${value}`;
|
|
1945
|
+
const suffixes = SIDE_PROPS[side];
|
|
1946
|
+
if (!suffixes) return void 0;
|
|
1947
|
+
return suffixes.map((s) => `${baseProp}${s}: ${value};`).join(" ");
|
|
1948
|
+
}
|
|
1949
|
+
function buildGapDeclaration(baseToken, theme2) {
|
|
1950
|
+
const match = baseToken.match(/^gap(?:-([xy]))?-(.+)$/);
|
|
1951
|
+
if (!match) return void 0;
|
|
1952
|
+
const [, axis = "", valueKey] = match;
|
|
1953
|
+
const gapScale = theme2.gap || theme2.spacing || {};
|
|
1954
|
+
const value = resolveThemeValue(gapScale, valueKey);
|
|
1955
|
+
if (value === void 0) return void 0;
|
|
1956
|
+
if (axis === "x") return `column-gap: ${value};`;
|
|
1957
|
+
if (axis === "y") return `row-gap: ${value};`;
|
|
1958
|
+
return `gap: ${value};`;
|
|
1959
|
+
}
|
|
1960
|
+
function buildDimensionDeclaration(baseToken, theme2) {
|
|
1961
|
+
const patterns = [
|
|
1962
|
+
{ prefix: "min-w-", prop: "min-width", scale: theme2.minWidth || theme2.width || {} },
|
|
1963
|
+
{ prefix: "max-w-", prop: "max-width", scale: theme2.maxWidth || theme2.width || {} },
|
|
1964
|
+
{ prefix: "min-h-", prop: "min-height", scale: theme2.minHeight || theme2.height || {} },
|
|
1965
|
+
{ prefix: "max-h-", prop: "max-height", scale: theme2.maxHeight || theme2.height || {} },
|
|
1966
|
+
{ prefix: "w-", prop: "width", scale: theme2.width || {} },
|
|
1967
|
+
{ prefix: "h-", prop: "height", scale: theme2.height || {} }
|
|
1968
|
+
];
|
|
1969
|
+
for (const pattern of patterns) {
|
|
1970
|
+
if (!baseToken.startsWith(pattern.prefix)) continue;
|
|
1971
|
+
const valueKey = baseToken.slice(pattern.prefix.length);
|
|
1972
|
+
let value = resolveThemeValue(pattern.scale, valueKey);
|
|
1973
|
+
if (value === void 0) value = resolveThemeValue(theme2.spacing || {}, valueKey);
|
|
1974
|
+
if (value === void 0) {
|
|
1975
|
+
const arb = resolveArbitraryValue(valueKey);
|
|
1976
|
+
if (arb !== void 0) return `${pattern.prop}: ${arb};`;
|
|
1977
|
+
return void 0;
|
|
1978
|
+
}
|
|
1979
|
+
return `${pattern.prop}: ${value};`;
|
|
1980
|
+
}
|
|
1981
|
+
return void 0;
|
|
1982
|
+
}
|
|
1983
|
+
|
|
1984
|
+
// src/maps/flexgrid.maps.js
|
|
1985
|
+
var FLEX_DIRECTION_MAP = {
|
|
1986
|
+
row: "flex-direction: row;",
|
|
1987
|
+
"row-reverse": "flex-direction: row-reverse;",
|
|
1988
|
+
col: "flex-direction: column;",
|
|
1989
|
+
"col-reverse": "flex-direction: column-reverse;"
|
|
1990
|
+
};
|
|
1991
|
+
var FLEX_WRAP_MAP = {
|
|
1992
|
+
nowrap: "flex-wrap: nowrap;",
|
|
1993
|
+
wrap: "flex-wrap: wrap;",
|
|
1994
|
+
"wrap-reverse": "flex-wrap: wrap-reverse;"
|
|
1995
|
+
};
|
|
1996
|
+
var ALIGN_CONTENT_MAP = {
|
|
1997
|
+
normal: "align-content: normal;",
|
|
1998
|
+
center: "align-content: center;",
|
|
1999
|
+
start: "align-content: flex-start;",
|
|
2000
|
+
end: "align-content: flex-end;",
|
|
2001
|
+
between: "align-content: space-between;",
|
|
2002
|
+
around: "align-content: space-around;",
|
|
2003
|
+
evenly: "align-content: space-evenly;",
|
|
2004
|
+
baseline: "align-content: baseline;",
|
|
2005
|
+
stretch: "align-content: stretch;"
|
|
2006
|
+
};
|
|
2007
|
+
var ALIGN_SELF_MAP = {
|
|
2008
|
+
auto: "align-self: auto;",
|
|
2009
|
+
start: "align-self: flex-start;",
|
|
2010
|
+
end: "align-self: flex-end;",
|
|
2011
|
+
center: "align-self: center;",
|
|
2012
|
+
stretch: "align-self: stretch;",
|
|
2013
|
+
baseline: "align-self: baseline;"
|
|
2014
|
+
};
|
|
2015
|
+
var ALIGN_ITEMS_MAP = {
|
|
2016
|
+
start: "align-items: flex-start;",
|
|
2017
|
+
end: "align-items: flex-end;",
|
|
2018
|
+
center: "align-items: center;",
|
|
2019
|
+
baseline: "align-items: baseline;",
|
|
2020
|
+
stretch: "align-items: stretch;"
|
|
2021
|
+
};
|
|
2022
|
+
var JUSTIFY_CONTENT_MAP = {
|
|
2023
|
+
normal: "justify-content: normal;",
|
|
2024
|
+
start: "justify-content: flex-start;",
|
|
2025
|
+
end: "justify-content: flex-end;",
|
|
2026
|
+
center: "justify-content: center;",
|
|
2027
|
+
between: "justify-content: space-between;",
|
|
2028
|
+
around: "justify-content: space-around;",
|
|
2029
|
+
evenly: "justify-content: space-evenly;",
|
|
2030
|
+
stretch: "justify-content: stretch;"
|
|
2031
|
+
};
|
|
2032
|
+
var JUSTIFY_ITEMS_MAP = {
|
|
2033
|
+
start: "justify-items: start;",
|
|
2034
|
+
end: "justify-items: end;",
|
|
2035
|
+
center: "justify-items: center;",
|
|
2036
|
+
stretch: "justify-items: stretch;"
|
|
2037
|
+
};
|
|
2038
|
+
var JUSTIFY_SELF_MAP = {
|
|
2039
|
+
auto: "justify-self: auto;",
|
|
2040
|
+
start: "justify-self: start;",
|
|
2041
|
+
end: "justify-self: end;",
|
|
2042
|
+
center: "justify-self: center;",
|
|
2043
|
+
stretch: "justify-self: stretch;"
|
|
2044
|
+
};
|
|
2045
|
+
var PLACE_CONTENT_MAP = {
|
|
2046
|
+
center: "place-content: center;",
|
|
2047
|
+
start: "place-content: start;",
|
|
2048
|
+
end: "place-content: end;",
|
|
2049
|
+
between: "place-content: space-between;",
|
|
2050
|
+
around: "place-content: space-around;",
|
|
2051
|
+
evenly: "place-content: space-evenly;",
|
|
2052
|
+
baseline: "place-content: baseline;",
|
|
2053
|
+
stretch: "place-content: stretch;"
|
|
2054
|
+
};
|
|
2055
|
+
var PLACE_ITEMS_MAP = {
|
|
2056
|
+
start: "place-items: start;",
|
|
2057
|
+
end: "place-items: end;",
|
|
2058
|
+
center: "place-items: center;",
|
|
2059
|
+
baseline: "place-items: baseline;",
|
|
2060
|
+
stretch: "place-items: stretch;"
|
|
2061
|
+
};
|
|
2062
|
+
var PLACE_SELF_MAP = {
|
|
2063
|
+
auto: "place-self: auto;",
|
|
2064
|
+
start: "place-self: start;",
|
|
2065
|
+
end: "place-self: end;",
|
|
2066
|
+
center: "place-self: center;",
|
|
2067
|
+
stretch: "place-self: stretch;"
|
|
2068
|
+
};
|
|
2069
|
+
var GRID_AUTO_FLOW_MAP = {
|
|
2070
|
+
row: "grid-auto-flow: row;",
|
|
2071
|
+
col: "grid-auto-flow: column;",
|
|
2072
|
+
dense: "grid-auto-flow: dense;",
|
|
2073
|
+
"row-dense": "grid-auto-flow: row dense;",
|
|
2074
|
+
"col-dense": "grid-auto-flow: column dense;"
|
|
2075
|
+
};
|
|
2076
|
+
|
|
2077
|
+
// src/builders/flexgrid.js
|
|
2078
|
+
function buildFlexGridDeclaration(baseToken, theme2) {
|
|
2079
|
+
if (baseToken === "grow") return "flex-grow: 1;";
|
|
2080
|
+
if (baseToken === "grow-0") return "flex-grow: 0;";
|
|
2081
|
+
if (baseToken === "shrink") return "flex-shrink: 1;";
|
|
2082
|
+
if (baseToken === "shrink-0") return "flex-shrink: 0;";
|
|
2083
|
+
if (baseToken.startsWith("grow-")) {
|
|
2084
|
+
const val = resolveThemeValue(theme2.flexGrow || {}, baseToken.slice(5));
|
|
2085
|
+
if (val !== void 0) return `flex-grow: ${val};`;
|
|
2086
|
+
}
|
|
2087
|
+
if (baseToken.startsWith("shrink-")) {
|
|
2088
|
+
const val = resolveThemeValue(theme2.flexShrink || {}, baseToken.slice(7));
|
|
2089
|
+
if (val !== void 0) return `flex-shrink: ${val};`;
|
|
2090
|
+
}
|
|
2091
|
+
if (baseToken.startsWith("basis-")) {
|
|
2092
|
+
const val = resolveThemeValue(theme2.flexBasis || theme2.spacing || {}, baseToken.slice(6));
|
|
2093
|
+
if (val !== void 0) return `flex-basis: ${val};`;
|
|
2094
|
+
}
|
|
2095
|
+
if (baseToken === "flex-1") return "flex: 1 1 0%;";
|
|
2096
|
+
if (baseToken === "flex-auto") return "flex: 1 1 auto;";
|
|
2097
|
+
if (baseToken === "flex-initial") return "flex: 0 1 auto;";
|
|
2098
|
+
if (baseToken === "flex-none") return "flex: none;";
|
|
2099
|
+
if (baseToken.startsWith("flex-")) {
|
|
2100
|
+
const value = baseToken.slice(5);
|
|
2101
|
+
if (FLEX_DIRECTION_MAP[value]) return FLEX_DIRECTION_MAP[value];
|
|
2102
|
+
if (FLEX_WRAP_MAP[value]) return FLEX_WRAP_MAP[value];
|
|
2103
|
+
const themeVal = resolveThemeValue(theme2.flex || {}, value);
|
|
2104
|
+
if (themeVal !== void 0) return `flex: ${themeVal};`;
|
|
2105
|
+
}
|
|
2106
|
+
if (baseToken.startsWith("content-")) {
|
|
2107
|
+
const key = baseToken.slice(8);
|
|
2108
|
+
if (ALIGN_CONTENT_MAP[key]) return ALIGN_CONTENT_MAP[key];
|
|
2109
|
+
}
|
|
2110
|
+
if (baseToken.startsWith("self-")) return ALIGN_SELF_MAP[baseToken.slice(5)] ?? void 0;
|
|
2111
|
+
if (baseToken.startsWith("justify-items-")) return JUSTIFY_ITEMS_MAP[baseToken.slice(14)] ?? void 0;
|
|
2112
|
+
if (baseToken.startsWith("justify-self-")) return JUSTIFY_SELF_MAP[baseToken.slice(13)] ?? void 0;
|
|
2113
|
+
if (baseToken.startsWith("justify-")) return JUSTIFY_CONTENT_MAP[baseToken.slice(8)] ?? void 0;
|
|
2114
|
+
if (baseToken.startsWith("items-")) return ALIGN_ITEMS_MAP[baseToken.slice(6)] ?? void 0;
|
|
2115
|
+
if (baseToken.startsWith("place-content-")) return PLACE_CONTENT_MAP[baseToken.slice(14)] ?? void 0;
|
|
2116
|
+
if (baseToken.startsWith("place-items-")) return PLACE_ITEMS_MAP[baseToken.slice(12)] ?? void 0;
|
|
2117
|
+
if (baseToken.startsWith("place-self-")) return PLACE_SELF_MAP[baseToken.slice(11)] ?? void 0;
|
|
2118
|
+
if (baseToken.startsWith("grid-flow-")) return GRID_AUTO_FLOW_MAP[baseToken.slice(10)] ?? void 0;
|
|
2119
|
+
if (baseToken.startsWith("auto-cols-")) {
|
|
2120
|
+
const val = resolveThemeValue(theme2.gridAutoColumns || {}, baseToken.slice(10));
|
|
2121
|
+
if (val !== void 0) return `grid-auto-columns: ${val};`;
|
|
2122
|
+
}
|
|
2123
|
+
if (baseToken.startsWith("auto-rows-")) {
|
|
2124
|
+
const val = resolveThemeValue(theme2.gridAutoRows || {}, baseToken.slice(10));
|
|
2125
|
+
if (val !== void 0) return `grid-auto-rows: ${val};`;
|
|
2126
|
+
}
|
|
2127
|
+
if (baseToken.startsWith("grid-cols-")) {
|
|
2128
|
+
const valueKey = baseToken.slice(10);
|
|
2129
|
+
const direct = resolveThemeValue(theme2.gridTemplateColumns || {}, valueKey);
|
|
2130
|
+
if (direct !== void 0) return `grid-template-columns: ${direct};`;
|
|
2131
|
+
if (/^\d+$/.test(valueKey)) return `grid-template-columns: repeat(${valueKey}, minmax(0, 1fr));`;
|
|
2132
|
+
const arb = resolveArbitraryValue(valueKey);
|
|
2133
|
+
if (arb !== void 0) return `grid-template-columns: ${arb};`;
|
|
2134
|
+
}
|
|
2135
|
+
if (baseToken.startsWith("grid-rows-")) {
|
|
2136
|
+
const valueKey = baseToken.slice(10);
|
|
2137
|
+
const direct = resolveThemeValue(theme2.gridTemplateRows || {}, valueKey);
|
|
2138
|
+
if (direct !== void 0) return `grid-template-rows: ${direct};`;
|
|
2139
|
+
if (/^\d+$/.test(valueKey)) return `grid-template-rows: repeat(${valueKey}, minmax(0, 1fr));`;
|
|
2140
|
+
const arb = resolveArbitraryValue(valueKey);
|
|
2141
|
+
if (arb !== void 0) return `grid-template-rows: ${arb};`;
|
|
2142
|
+
}
|
|
2143
|
+
if (baseToken.startsWith("col-")) {
|
|
2144
|
+
const val = resolveThemeValue(theme2.gridColumn || {}, baseToken.slice(4));
|
|
2145
|
+
if (val !== void 0) return `grid-column: ${val};`;
|
|
2146
|
+
const spanMatch = baseToken.match(/^col-span-(\d+)$/);
|
|
2147
|
+
if (spanMatch) return `grid-column: span ${spanMatch[1]} / span ${spanMatch[1]};`;
|
|
2148
|
+
if (baseToken === "col-auto") return "grid-column: auto;";
|
|
2149
|
+
if (baseToken.startsWith("col-start-")) {
|
|
2150
|
+
const sv = resolveThemeValue(theme2.gridColumnStart || {}, baseToken.slice(10));
|
|
2151
|
+
if (sv !== void 0) return `grid-column-start: ${sv};`;
|
|
2152
|
+
}
|
|
2153
|
+
if (baseToken.startsWith("col-end-")) {
|
|
2154
|
+
const ev = resolveThemeValue(theme2.gridColumnEnd || {}, baseToken.slice(8));
|
|
2155
|
+
if (ev !== void 0) return `grid-column-end: ${ev};`;
|
|
2156
|
+
}
|
|
2157
|
+
}
|
|
2158
|
+
if (baseToken.startsWith("row-")) {
|
|
2159
|
+
const val = resolveThemeValue(theme2.gridRow || {}, baseToken.slice(4));
|
|
2160
|
+
if (val !== void 0) return `grid-row: ${val};`;
|
|
2161
|
+
const spanMatch = baseToken.match(/^row-span-(\d+)$/);
|
|
2162
|
+
if (spanMatch) return `grid-row: span ${spanMatch[1]} / span ${spanMatch[1]};`;
|
|
2163
|
+
if (baseToken === "row-auto") return "grid-row: auto;";
|
|
2164
|
+
if (baseToken.startsWith("row-start-")) {
|
|
2165
|
+
const sv = resolveThemeValue(theme2.gridRowStart || {}, baseToken.slice(10));
|
|
2166
|
+
if (sv !== void 0) return `grid-row-start: ${sv};`;
|
|
2167
|
+
}
|
|
2168
|
+
if (baseToken.startsWith("row-end-")) {
|
|
2169
|
+
const ev = resolveThemeValue(theme2.gridRowEnd || {}, baseToken.slice(8));
|
|
2170
|
+
if (ev !== void 0) return `grid-row-end: ${ev};`;
|
|
2171
|
+
}
|
|
2172
|
+
}
|
|
2173
|
+
return void 0;
|
|
2174
|
+
}
|
|
2175
|
+
|
|
2176
|
+
// src/maps/typography.maps.js
|
|
2177
|
+
var TEXT_ALIGN_MAP = {
|
|
2178
|
+
left: "text-align: left;",
|
|
2179
|
+
center: "text-align: center;",
|
|
2180
|
+
right: "text-align: right;",
|
|
2181
|
+
justify: "text-align: justify;",
|
|
2182
|
+
start: "text-align: start;",
|
|
2183
|
+
end: "text-align: end;"
|
|
2184
|
+
};
|
|
2185
|
+
var TEXT_DECORATION_MAP = {
|
|
2186
|
+
underline: "text-decoration-line: underline;",
|
|
2187
|
+
overline: "text-decoration-line: overline;",
|
|
2188
|
+
"line-through": "text-decoration-line: line-through;",
|
|
2189
|
+
"no-underline": "text-decoration-line: none;"
|
|
2190
|
+
};
|
|
2191
|
+
var TEXT_DECORATION_STYLE_MAP = {
|
|
2192
|
+
solid: "text-decoration-style: solid;",
|
|
2193
|
+
double: "text-decoration-style: double;",
|
|
2194
|
+
dotted: "text-decoration-style: dotted;",
|
|
2195
|
+
dashed: "text-decoration-style: dashed;",
|
|
2196
|
+
wavy: "text-decoration-style: wavy;"
|
|
2197
|
+
};
|
|
2198
|
+
var TEXT_TRANSFORM_MAP = {
|
|
2199
|
+
uppercase: "text-transform: uppercase;",
|
|
2200
|
+
lowercase: "text-transform: lowercase;",
|
|
2201
|
+
capitalize: "text-transform: capitalize;",
|
|
2202
|
+
"normal-case": "text-transform: none;"
|
|
2203
|
+
};
|
|
2204
|
+
var TEXT_OVERFLOW_MAP = {
|
|
2205
|
+
truncate: "overflow: hidden; text-overflow: ellipsis; white-space: nowrap;",
|
|
2206
|
+
"text-ellipsis": "text-overflow: ellipsis;",
|
|
2207
|
+
"text-clip": "text-overflow: clip;"
|
|
2208
|
+
};
|
|
2209
|
+
var WHITESPACE_MAP = {
|
|
2210
|
+
normal: "white-space: normal;",
|
|
2211
|
+
nowrap: "white-space: nowrap;",
|
|
2212
|
+
pre: "white-space: pre;",
|
|
2213
|
+
"pre-line": "white-space: pre-line;",
|
|
2214
|
+
"pre-wrap": "white-space: pre-wrap;",
|
|
2215
|
+
"break-spaces": "white-space: break-spaces;"
|
|
2216
|
+
};
|
|
2217
|
+
var WORD_BREAK_MAP = {
|
|
2218
|
+
"break-normal": "overflow-wrap: normal; word-break: normal;",
|
|
2219
|
+
"break-words": "overflow-wrap: break-word;",
|
|
2220
|
+
"break-all": "word-break: break-all;",
|
|
2221
|
+
"break-keep": "word-break: keep-all;"
|
|
2222
|
+
};
|
|
2223
|
+
var FONT_STYLE_MAP = {
|
|
2224
|
+
italic: "font-style: italic;",
|
|
2225
|
+
"not-italic": "font-style: normal;"
|
|
2226
|
+
};
|
|
2227
|
+
var FONT_SMOOTHING_MAP = {
|
|
2228
|
+
antialiased: "-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;",
|
|
2229
|
+
"subpixel-antialiased": "-webkit-font-smoothing: auto; -moz-osx-font-smoothing: auto;"
|
|
2230
|
+
};
|
|
2231
|
+
var LIST_STYLE_POSITION_MAP = {
|
|
2232
|
+
inside: "list-style-position: inside;",
|
|
2233
|
+
outside: "list-style-position: outside;"
|
|
2234
|
+
};
|
|
2235
|
+
var VERTICAL_ALIGN_MAP = {
|
|
2236
|
+
baseline: "vertical-align: baseline;",
|
|
2237
|
+
top: "vertical-align: top;",
|
|
2238
|
+
middle: "vertical-align: middle;",
|
|
2239
|
+
bottom: "vertical-align: bottom;",
|
|
2240
|
+
"text-top": "vertical-align: text-top;",
|
|
2241
|
+
"text-bottom": "vertical-align: text-bottom;",
|
|
2242
|
+
sub: "vertical-align: sub;",
|
|
2243
|
+
super: "vertical-align: super;"
|
|
2244
|
+
};
|
|
2245
|
+
|
|
2246
|
+
// src/builders/typography.js
|
|
2247
|
+
function buildTypographyDeclaration(baseToken, theme2) {
|
|
2248
|
+
if (TEXT_DECORATION_MAP[baseToken]) return TEXT_DECORATION_MAP[baseToken];
|
|
2249
|
+
if (TEXT_TRANSFORM_MAP[baseToken]) return TEXT_TRANSFORM_MAP[baseToken];
|
|
2250
|
+
if (TEXT_OVERFLOW_MAP[baseToken]) return TEXT_OVERFLOW_MAP[baseToken];
|
|
2251
|
+
if (WORD_BREAK_MAP[baseToken]) return WORD_BREAK_MAP[baseToken];
|
|
2252
|
+
if (FONT_STYLE_MAP[baseToken]) return FONT_STYLE_MAP[baseToken];
|
|
2253
|
+
if (FONT_SMOOTHING_MAP[baseToken]) return FONT_SMOOTHING_MAP[baseToken];
|
|
2254
|
+
if (baseToken.startsWith("text-")) {
|
|
2255
|
+
const valueKey = baseToken.slice(5);
|
|
2256
|
+
if (TEXT_ALIGN_MAP[valueKey]) return TEXT_ALIGN_MAP[valueKey];
|
|
2257
|
+
const fontSize = resolveThemeValue(theme2.fontSize || {}, valueKey);
|
|
2258
|
+
if (fontSize !== void 0) {
|
|
2259
|
+
if (Array.isArray(fontSize)) return `font-size: ${fontSize[0]};`;
|
|
2260
|
+
return `font-size: ${fontSize};`;
|
|
2261
|
+
}
|
|
2262
|
+
const color = resolveColorWithOpacity(theme2.colors || {}, valueKey);
|
|
2263
|
+
if (color !== void 0) return `color: ${color};`;
|
|
2264
|
+
}
|
|
2265
|
+
if (baseToken.startsWith("font-")) {
|
|
2266
|
+
const valueKey = baseToken.slice(5);
|
|
2267
|
+
const fontWeight = resolveThemeValue(theme2.fontWeight || {}, valueKey);
|
|
2268
|
+
if (fontWeight !== void 0) return `font-weight: ${fontWeight};`;
|
|
2269
|
+
const fontFamily = resolveThemeValue(theme2.fontFamily || {}, valueKey);
|
|
2270
|
+
if (fontFamily !== void 0) {
|
|
2271
|
+
if (Array.isArray(fontFamily)) return `font-family: ${fontFamily.join(", ")};`;
|
|
2272
|
+
return `font-family: ${fontFamily};`;
|
|
2273
|
+
}
|
|
2274
|
+
}
|
|
2275
|
+
if (baseToken.startsWith("leading-")) {
|
|
2276
|
+
const val = resolveThemeValue(theme2.lineHeight || {}, baseToken.slice(8));
|
|
2277
|
+
if (val !== void 0) return `line-height: ${val};`;
|
|
2278
|
+
}
|
|
2279
|
+
if (baseToken.startsWith("tracking-")) {
|
|
2280
|
+
const val = resolveThemeValue(theme2.letterSpacing || {}, baseToken.slice(9));
|
|
2281
|
+
if (val !== void 0) return `letter-spacing: ${val};`;
|
|
2282
|
+
}
|
|
2283
|
+
if (baseToken.startsWith("decoration-")) {
|
|
2284
|
+
const key = baseToken.slice(11);
|
|
2285
|
+
if (TEXT_DECORATION_STYLE_MAP[key]) return TEXT_DECORATION_STYLE_MAP[key];
|
|
2286
|
+
const thicknessVal = resolveThemeValue(theme2.textDecorationThickness || {}, key);
|
|
2287
|
+
if (thicknessVal !== void 0) return `text-decoration-thickness: ${thicknessVal};`;
|
|
2288
|
+
const color = resolveColorWithOpacity(theme2.colors || {}, key);
|
|
2289
|
+
if (color !== void 0) return `text-decoration-color: ${color};`;
|
|
2290
|
+
}
|
|
2291
|
+
if (baseToken.startsWith("underline-offset-")) {
|
|
2292
|
+
const val = resolveThemeValue(theme2.textUnderlineOffset || {}, baseToken.slice(17));
|
|
2293
|
+
if (val !== void 0) return `text-underline-offset: ${val};`;
|
|
2294
|
+
}
|
|
2295
|
+
if (baseToken.startsWith("indent-")) {
|
|
2296
|
+
const val = resolveThemeValue(theme2.textIndent || theme2.spacing || {}, baseToken.slice(7));
|
|
2297
|
+
if (val !== void 0) return `text-indent: ${val};`;
|
|
2298
|
+
}
|
|
2299
|
+
if (baseToken.startsWith("list-")) {
|
|
2300
|
+
const key = baseToken.slice(5);
|
|
2301
|
+
if (LIST_STYLE_POSITION_MAP[key]) return LIST_STYLE_POSITION_MAP[key];
|
|
2302
|
+
const val = resolveThemeValue(theme2.listStyleType || {}, key);
|
|
2303
|
+
if (val !== void 0) return `list-style-type: ${val};`;
|
|
2304
|
+
}
|
|
2305
|
+
if (baseToken.startsWith("whitespace-")) {
|
|
2306
|
+
const key = baseToken.slice(11);
|
|
2307
|
+
if (WHITESPACE_MAP[key]) return WHITESPACE_MAP[key];
|
|
2308
|
+
}
|
|
2309
|
+
if (baseToken === "text-wrap") return "text-wrap: wrap;";
|
|
2310
|
+
if (baseToken === "text-nowrap") return "text-wrap: nowrap;";
|
|
2311
|
+
if (baseToken === "text-balance") return "text-wrap: balance;";
|
|
2312
|
+
if (baseToken === "text-pretty") return "text-wrap: pretty;";
|
|
2313
|
+
if (baseToken.startsWith("align-")) {
|
|
2314
|
+
const key = baseToken.slice(6);
|
|
2315
|
+
if (VERTICAL_ALIGN_MAP[key]) return VERTICAL_ALIGN_MAP[key];
|
|
2316
|
+
}
|
|
2317
|
+
if (baseToken === "line-clamp-none") {
|
|
2318
|
+
return "overflow: visible; display: block; -webkit-box-orient: horizontal; -webkit-line-clamp: unset;";
|
|
2319
|
+
}
|
|
2320
|
+
if (baseToken.startsWith("line-clamp-")) {
|
|
2321
|
+
const val = resolveThemeValue(theme2.lineClamp || {}, baseToken.slice(11));
|
|
2322
|
+
if (val !== void 0) {
|
|
2323
|
+
return `overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: ${val};`;
|
|
2324
|
+
}
|
|
2325
|
+
const num = baseToken.slice(11);
|
|
2326
|
+
if (/^\d+$/.test(num)) {
|
|
2327
|
+
return `overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: ${num};`;
|
|
2328
|
+
}
|
|
2329
|
+
}
|
|
2330
|
+
return void 0;
|
|
2331
|
+
}
|
|
2332
|
+
|
|
2333
|
+
// src/builders/colors.js
|
|
2334
|
+
function buildColorDeclaration(baseToken, theme2) {
|
|
2335
|
+
const colors = theme2.colors || {};
|
|
2336
|
+
if (baseToken.startsWith("bg-")) {
|
|
2337
|
+
const key = baseToken.slice(3);
|
|
2338
|
+
const color = resolveColorWithOpacity(colors, key);
|
|
2339
|
+
if (color !== void 0) return `background-color: ${color};`;
|
|
2340
|
+
}
|
|
2341
|
+
if (baseToken.startsWith("border-")) {
|
|
2342
|
+
const key = baseToken.slice(7);
|
|
2343
|
+
const color = resolveColorWithOpacity(colors, key);
|
|
2344
|
+
if (color !== void 0) return `border-color: ${color};`;
|
|
2345
|
+
}
|
|
2346
|
+
if (baseToken.startsWith("fill-")) {
|
|
2347
|
+
const val = resolveColorWithOpacity({ ...colors, none: "none" }, baseToken.slice(5));
|
|
2348
|
+
if (val !== void 0) return `fill: ${val};`;
|
|
2349
|
+
}
|
|
2350
|
+
if (baseToken.startsWith("stroke-")) {
|
|
2351
|
+
const key = baseToken.slice(7);
|
|
2352
|
+
const width = resolveThemeValue(theme2.strokeWidth || {}, key);
|
|
2353
|
+
if (width !== void 0) return `stroke-width: ${width};`;
|
|
2354
|
+
const color = resolveColorWithOpacity({ ...colors, none: "none" }, key);
|
|
2355
|
+
if (color !== void 0) return `stroke: ${color};`;
|
|
2356
|
+
}
|
|
2357
|
+
if (baseToken.startsWith("outline-")) {
|
|
2358
|
+
const key = baseToken.slice(8);
|
|
2359
|
+
if (OUTLINE_STYLE_MAP[key]) return OUTLINE_STYLE_MAP[key];
|
|
2360
|
+
const width = resolveThemeValue(theme2.outlineWidth || {}, key);
|
|
2361
|
+
if (width !== void 0) return `outline-width: ${width};`;
|
|
2362
|
+
const offset = resolveThemeValue(theme2.outlineOffset || {}, key);
|
|
2363
|
+
if (offset !== void 0) return `outline-offset: ${offset};`;
|
|
2364
|
+
const color = resolveColorWithOpacity(theme2.outlineColor || colors, key);
|
|
2365
|
+
if (color !== void 0) return `outline-color: ${color};`;
|
|
2366
|
+
}
|
|
2367
|
+
if (baseToken.startsWith("caret-")) {
|
|
2368
|
+
const color = resolveColorWithOpacity(theme2.caretColor || colors, baseToken.slice(6));
|
|
2369
|
+
if (color !== void 0) return `caret-color: ${color};`;
|
|
2370
|
+
}
|
|
2371
|
+
if (baseToken.startsWith("accent-")) {
|
|
2372
|
+
const color = resolveColorWithOpacity({ ...colors, auto: "auto" }, baseToken.slice(7));
|
|
2373
|
+
if (color !== void 0) return `accent-color: ${color};`;
|
|
2374
|
+
}
|
|
2375
|
+
if (baseToken.startsWith("placeholder-")) {
|
|
2376
|
+
const color = resolveColorWithOpacity(colors, baseToken.slice(12));
|
|
2377
|
+
if (color !== void 0) return `--tw-placeholder-color: ${color};`;
|
|
2378
|
+
}
|
|
2379
|
+
return void 0;
|
|
2380
|
+
}
|
|
2381
|
+
|
|
2382
|
+
// src/builders/borders.js
|
|
2383
|
+
function buildBorderDeclaration(baseToken, theme2) {
|
|
2384
|
+
if (baseToken === "border") {
|
|
2385
|
+
const value = resolveThemeValue(theme2.borderWidth || {}, "DEFAULT") || "1px";
|
|
2386
|
+
return `border-width: ${value};`;
|
|
2387
|
+
}
|
|
2388
|
+
const sideMatch = baseToken.match(/^border-([trblxy])-?(\d+)?$/);
|
|
2389
|
+
if (sideMatch) {
|
|
2390
|
+
const [, side, numVal] = sideMatch;
|
|
2391
|
+
const sideMap = { t: "top", r: "right", b: "bottom", l: "left" };
|
|
2392
|
+
const widthKey = numVal || "DEFAULT";
|
|
2393
|
+
const widthVal = resolveThemeValue(theme2.borderWidth || {}, widthKey);
|
|
2394
|
+
if (widthVal === void 0) return void 0;
|
|
2395
|
+
if (side === "x") return `border-left-width: ${widthVal}; border-right-width: ${widthVal};`;
|
|
2396
|
+
if (side === "y") return `border-top-width: ${widthVal}; border-bottom-width: ${widthVal};`;
|
|
2397
|
+
return `border-${sideMap[side]}-width: ${widthVal};`;
|
|
2398
|
+
}
|
|
2399
|
+
const widthMatch = baseToken.match(/^border-(\d+)$/);
|
|
2400
|
+
if (widthMatch) {
|
|
2401
|
+
const value = resolveThemeValue(theme2.borderWidth || {}, widthMatch[1]);
|
|
2402
|
+
if (value !== void 0) return `border-width: ${value};`;
|
|
2403
|
+
}
|
|
2404
|
+
if (baseToken.startsWith("border-")) {
|
|
2405
|
+
const key = baseToken.slice(7);
|
|
2406
|
+
if (BORDER_STYLE_MAP[key]) return BORDER_STYLE_MAP[key];
|
|
2407
|
+
}
|
|
2408
|
+
return void 0;
|
|
2409
|
+
}
|
|
2410
|
+
function buildBorderRadiusDeclaration(baseToken, theme2) {
|
|
2411
|
+
if (!baseToken.startsWith("rounded")) return void 0;
|
|
2412
|
+
const match = baseToken.match(/^rounded(?:-(tl|tr|br|bl|ss|se|es|ee|t|r|b|l))?(?:-(.+))?$/);
|
|
2413
|
+
if (!match) return void 0;
|
|
2414
|
+
const [, side = "", rawValueKey] = match;
|
|
2415
|
+
const valueKey = rawValueKey || "DEFAULT";
|
|
2416
|
+
const radius = resolveThemeValue(theme2.borderRadius || {}, valueKey);
|
|
2417
|
+
if (radius === void 0) return void 0;
|
|
2418
|
+
const props = ROUNDED_PROPS[side];
|
|
2419
|
+
if (!props) return void 0;
|
|
2420
|
+
return props.map((prop) => `${prop}: ${radius};`).join(" ");
|
|
2421
|
+
}
|
|
2422
|
+
|
|
2423
|
+
// src/maps/effects.maps.js
|
|
2424
|
+
var ANIMATE_MAP = {
|
|
2425
|
+
none: "animation: none;",
|
|
2426
|
+
spin: "animation: spin 1s linear infinite;",
|
|
2427
|
+
ping: "animation: ping 1s cubic-bezier(0,0,0.2,1) infinite;",
|
|
2428
|
+
pulse: "animation: pulse 2s cubic-bezier(0.4,0,0.6,1) infinite;",
|
|
2429
|
+
bounce: "animation: bounce 1s infinite;"
|
|
2430
|
+
};
|
|
2431
|
+
var INSET_SHADOW_SIZES = {
|
|
2432
|
+
none: "box-shadow: none;",
|
|
2433
|
+
xs: "box-shadow: inset 0 1px 1px 0 rgb(0 0 0 / 0.05);",
|
|
2434
|
+
sm: "box-shadow: inset 0 1px 2px 0 rgb(0 0 0 / 0.1);",
|
|
2435
|
+
DEFAULT: "box-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 0.1);",
|
|
2436
|
+
md: "box-shadow: inset 0 2px 6px 0 rgb(0 0 0 / 0.1);",
|
|
2437
|
+
lg: "box-shadow: inset 0 4px 8px 0 rgb(0 0 0 / 0.15);"
|
|
2438
|
+
};
|
|
2439
|
+
var PERSPECTIVE_MAP = {
|
|
2440
|
+
none: "perspective: none;",
|
|
2441
|
+
dramatic: "perspective: 100px;",
|
|
2442
|
+
near: "perspective: 300px;",
|
|
2443
|
+
normal: "perspective: 500px;",
|
|
2444
|
+
midrange: "perspective: 800px;",
|
|
2445
|
+
distant: "perspective: 1200px;"
|
|
2446
|
+
};
|
|
2447
|
+
var MASK_LINEAR_MAP = {
|
|
2448
|
+
"mask-linear-to-t": "mask-image: linear-gradient(to top, black, transparent); -webkit-mask-image: linear-gradient(to top, black, transparent);",
|
|
2449
|
+
"mask-linear-to-tr": "mask-image: linear-gradient(to top right, black, transparent); -webkit-mask-image: linear-gradient(to top right, black, transparent);",
|
|
2450
|
+
"mask-linear-to-r": "mask-image: linear-gradient(to right, black, transparent); -webkit-mask-image: linear-gradient(to right, black, transparent);",
|
|
2451
|
+
"mask-linear-to-br": "mask-image: linear-gradient(to bottom right, black, transparent); -webkit-mask-image: linear-gradient(to bottom right, black, transparent);",
|
|
2452
|
+
"mask-linear-to-b": "mask-image: linear-gradient(to bottom, black, transparent); -webkit-mask-image: linear-gradient(to bottom, black, transparent);",
|
|
2453
|
+
"mask-linear-to-bl": "mask-image: linear-gradient(to bottom left, black, transparent); -webkit-mask-image: linear-gradient(to bottom left, black, transparent);",
|
|
2454
|
+
"mask-linear-to-l": "mask-image: linear-gradient(to left, black, transparent); -webkit-mask-image: linear-gradient(to left, black, transparent);",
|
|
2455
|
+
"mask-linear-to-tl": "mask-image: linear-gradient(to top left, black, transparent); -webkit-mask-image: linear-gradient(to top left, black, transparent);",
|
|
2456
|
+
"mask-none": "mask-image: none; -webkit-mask-image: none;"
|
|
2457
|
+
};
|
|
2458
|
+
var MASK_RADIAL_POSITIONS = {
|
|
2459
|
+
center: "center",
|
|
2460
|
+
top: "top",
|
|
2461
|
+
right: "right",
|
|
2462
|
+
bottom: "bottom",
|
|
2463
|
+
left: "left",
|
|
2464
|
+
"top-right": "top right",
|
|
2465
|
+
"bottom-right": "bottom right",
|
|
2466
|
+
"bottom-left": "bottom left",
|
|
2467
|
+
"top-left": "top left"
|
|
2468
|
+
};
|
|
2469
|
+
var MASK_REPEAT_MAP = {
|
|
2470
|
+
"mask-repeat": "mask-repeat: repeat; -webkit-mask-repeat: repeat;",
|
|
2471
|
+
"mask-no-repeat": "mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat;",
|
|
2472
|
+
"mask-repeat-x": "mask-repeat: repeat-x; -webkit-mask-repeat: repeat-x;",
|
|
2473
|
+
"mask-repeat-y": "mask-repeat: repeat-y; -webkit-mask-repeat: repeat-y;",
|
|
2474
|
+
"mask-repeat-round": "mask-repeat: round; -webkit-mask-repeat: round;",
|
|
2475
|
+
"mask-repeat-space": "mask-repeat: space; -webkit-mask-repeat: space;"
|
|
2476
|
+
};
|
|
2477
|
+
var MASK_SIZE_MAP = {
|
|
2478
|
+
"mask-size-auto": "mask-size: auto; -webkit-mask-size: auto;",
|
|
2479
|
+
"mask-size-cover": "mask-size: cover; -webkit-mask-size: cover;",
|
|
2480
|
+
"mask-size-contain": "mask-size: contain; -webkit-mask-size: contain;"
|
|
2481
|
+
};
|
|
2482
|
+
var BG_ATTACHMENT_MAP = {
|
|
2483
|
+
fixed: "background-attachment: fixed;",
|
|
2484
|
+
local: "background-attachment: local;",
|
|
2485
|
+
scroll: "background-attachment: scroll;"
|
|
2486
|
+
};
|
|
2487
|
+
var BG_CLIP_MAP = {
|
|
2488
|
+
border: "background-clip: border-box;",
|
|
2489
|
+
padding: "background-clip: padding-box;",
|
|
2490
|
+
content: "background-clip: content-box;",
|
|
2491
|
+
text: "background-clip: text; -webkit-background-clip: text;"
|
|
2492
|
+
};
|
|
2493
|
+
var BG_ORIGIN_MAP = {
|
|
2494
|
+
border: "background-origin: border-box;",
|
|
2495
|
+
padding: "background-origin: padding-box;",
|
|
2496
|
+
content: "background-origin: content-box;"
|
|
2497
|
+
};
|
|
2498
|
+
var BG_REPEAT_MAP = {
|
|
2499
|
+
repeat: "background-repeat: repeat;",
|
|
2500
|
+
"no-repeat": "background-repeat: no-repeat;",
|
|
2501
|
+
"repeat-x": "background-repeat: repeat-x;",
|
|
2502
|
+
"repeat-y": "background-repeat: repeat-y;",
|
|
2503
|
+
"repeat-round": "background-repeat: round;",
|
|
2504
|
+
"repeat-space": "background-repeat: space;"
|
|
2505
|
+
};
|
|
2506
|
+
var MIX_BLEND_MAP = {
|
|
2507
|
+
"mix-blend-normal": "mix-blend-mode: normal;",
|
|
2508
|
+
"mix-blend-multiply": "mix-blend-mode: multiply;",
|
|
2509
|
+
"mix-blend-screen": "mix-blend-mode: screen;",
|
|
2510
|
+
"mix-blend-overlay": "mix-blend-mode: overlay;",
|
|
2511
|
+
"mix-blend-darken": "mix-blend-mode: darken;",
|
|
2512
|
+
"mix-blend-lighten": "mix-blend-mode: lighten;",
|
|
2513
|
+
"mix-blend-color-dodge": "mix-blend-mode: color-dodge;",
|
|
2514
|
+
"mix-blend-color-burn": "mix-blend-mode: color-burn;",
|
|
2515
|
+
"mix-blend-hard-light": "mix-blend-mode: hard-light;",
|
|
2516
|
+
"mix-blend-soft-light": "mix-blend-mode: soft-light;",
|
|
2517
|
+
"mix-blend-difference": "mix-blend-mode: difference;",
|
|
2518
|
+
"mix-blend-exclusion": "mix-blend-mode: exclusion;",
|
|
2519
|
+
"mix-blend-hue": "mix-blend-mode: hue;",
|
|
2520
|
+
"mix-blend-saturation": "mix-blend-mode: saturation;",
|
|
2521
|
+
"mix-blend-color": "mix-blend-mode: color;",
|
|
2522
|
+
"mix-blend-luminosity": "mix-blend-mode: luminosity;",
|
|
2523
|
+
"mix-blend-plus-darker": "mix-blend-mode: plus-darker;",
|
|
2524
|
+
"mix-blend-plus-lighter": "mix-blend-mode: plus-lighter;"
|
|
2525
|
+
};
|
|
2526
|
+
var BG_BLEND_MAP = {
|
|
2527
|
+
"bg-blend-normal": "background-blend-mode: normal;",
|
|
2528
|
+
"bg-blend-multiply": "background-blend-mode: multiply;",
|
|
2529
|
+
"bg-blend-screen": "background-blend-mode: screen;",
|
|
2530
|
+
"bg-blend-overlay": "background-blend-mode: overlay;",
|
|
2531
|
+
"bg-blend-darken": "background-blend-mode: darken;",
|
|
2532
|
+
"bg-blend-lighten": "background-blend-mode: lighten;",
|
|
2533
|
+
"bg-blend-color-dodge": "background-blend-mode: color-dodge;",
|
|
2534
|
+
"bg-blend-color-burn": "background-blend-mode: color-burn;",
|
|
2535
|
+
"bg-blend-hard-light": "background-blend-mode: hard-light;",
|
|
2536
|
+
"bg-blend-soft-light": "background-blend-mode: soft-light;",
|
|
2537
|
+
"bg-blend-difference": "background-blend-mode: difference;",
|
|
2538
|
+
"bg-blend-exclusion": "background-blend-mode: exclusion;",
|
|
2539
|
+
"bg-blend-hue": "background-blend-mode: hue;",
|
|
2540
|
+
"bg-blend-saturation": "background-blend-mode: saturation;",
|
|
2541
|
+
"bg-blend-color": "background-blend-mode: color;",
|
|
2542
|
+
"bg-blend-luminosity": "background-blend-mode: luminosity;"
|
|
2543
|
+
};
|
|
2544
|
+
var TEXT_SHADOW_SIZES = {
|
|
2545
|
+
"2xs": "0 1px 2px rgb(0 0 0 / 0.10)",
|
|
2546
|
+
xs: "0 1px 2px rgb(0 0 0 / 0.20)",
|
|
2547
|
+
sm: "0 1px 3px rgb(0 0 0 / 0.25)",
|
|
2548
|
+
DEFAULT: "0 1px 3px rgb(0 0 0 / 0.30)",
|
|
2549
|
+
md: "0 2px 4px rgb(0 0 0 / 0.30)",
|
|
2550
|
+
lg: "0 4px 6px rgb(0 0 0 / 0.25)",
|
|
2551
|
+
xl: "0 8px 12px rgb(0 0 0 / 0.20)",
|
|
2552
|
+
"2xl": "0 16px 24px rgb(0 0 0 / 0.15)",
|
|
2553
|
+
none: "none"
|
|
2554
|
+
};
|
|
2555
|
+
|
|
2556
|
+
// src/builders/effects.js
|
|
2557
|
+
function buildOpacityDeclaration(baseToken, theme2) {
|
|
2558
|
+
if (!baseToken.startsWith("opacity-")) return void 0;
|
|
2559
|
+
const opacity = resolveThemeValue(theme2.opacity || {}, baseToken.slice(8));
|
|
2560
|
+
if (opacity === void 0) return void 0;
|
|
2561
|
+
return `opacity: ${opacity};`;
|
|
2562
|
+
}
|
|
2563
|
+
function buildShadowDeclaration(baseToken, theme2) {
|
|
2564
|
+
if (baseToken === "shadow") {
|
|
2565
|
+
const value2 = resolveThemeValue(theme2.boxShadow || {}, "DEFAULT");
|
|
2566
|
+
if (value2 === void 0) return void 0;
|
|
2567
|
+
return `box-shadow: ${value2};`;
|
|
2568
|
+
}
|
|
2569
|
+
if (!baseToken.startsWith("shadow-")) return void 0;
|
|
2570
|
+
const valueKey = baseToken.slice(7);
|
|
2571
|
+
const color = resolveColorWithOpacity(theme2.colors || {}, valueKey);
|
|
2572
|
+
if (color !== void 0) return `--tw-shadow-color: ${color};`;
|
|
2573
|
+
const value = resolveThemeValue(theme2.boxShadow || {}, valueKey);
|
|
2574
|
+
if (value === void 0) return void 0;
|
|
2575
|
+
return `box-shadow: ${value};`;
|
|
2576
|
+
}
|
|
2577
|
+
function buildInsetShadowDeclaration(baseToken, theme2) {
|
|
2578
|
+
if (baseToken === "inset-shadow") return INSET_SHADOW_SIZES.DEFAULT;
|
|
2579
|
+
if (baseToken.startsWith("inset-shadow-")) {
|
|
2580
|
+
const key = baseToken.slice(13);
|
|
2581
|
+
if (INSET_SHADOW_SIZES[key]) return INSET_SHADOW_SIZES[key];
|
|
2582
|
+
const color = resolveColorWithOpacity(theme2.colors || {}, key);
|
|
2583
|
+
if (color !== void 0) return `--tw-inset-shadow-color: ${color};`;
|
|
2584
|
+
}
|
|
2585
|
+
return void 0;
|
|
2586
|
+
}
|
|
2587
|
+
function buildInsetRingDeclaration(baseToken, theme2) {
|
|
2588
|
+
const ringColors = theme2.ringColor || {};
|
|
2589
|
+
const colors = theme2.colors || {};
|
|
2590
|
+
if (baseToken === "inset-ring") {
|
|
2591
|
+
return `box-shadow: inset 0 0 0 1px var(--tw-inset-ring-color, currentColor);`;
|
|
2592
|
+
}
|
|
2593
|
+
if (baseToken.startsWith("inset-ring-")) {
|
|
2594
|
+
const key = baseToken.slice(11);
|
|
2595
|
+
if (/^\d+$/.test(key)) {
|
|
2596
|
+
return `box-shadow: inset 0 0 0 ${key}px var(--tw-inset-ring-color, currentColor);`;
|
|
2597
|
+
}
|
|
2598
|
+
const color = resolveColorWithOpacity({ ...ringColors, ...colors }, key);
|
|
2599
|
+
if (color !== void 0) return `--tw-inset-ring-color: ${color};`;
|
|
2600
|
+
}
|
|
2601
|
+
return void 0;
|
|
2602
|
+
}
|
|
2603
|
+
function buildRingDeclaration(baseToken, theme2) {
|
|
2604
|
+
const ringColorScale = theme2.ringColor || {};
|
|
2605
|
+
const ringWidthScale = theme2.ringWidth || {};
|
|
2606
|
+
const defaultRingColor = resolveThemeValue(ringColorScale, "DEFAULT") || "#3b82f6";
|
|
2607
|
+
const buildRingWidth = (widthValue2) => `--tw-ring-inset: ; --tw-ring-offset-width: 0px; --tw-ring-offset-color: #fff; --tw-ring-color: ${defaultRingColor}; box-shadow: var(--tw-ring-inset,) 0 0 0 calc(${widthValue2} + var(--tw-ring-offset-width, 0px)) var(--tw-ring-color);`;
|
|
2608
|
+
if (baseToken === "ring") {
|
|
2609
|
+
const widthValue2 = resolveThemeValue(ringWidthScale, "DEFAULT") || "3px";
|
|
2610
|
+
return buildRingWidth(widthValue2);
|
|
2611
|
+
}
|
|
2612
|
+
if (!baseToken.startsWith("ring-")) return void 0;
|
|
2613
|
+
const valueKey = baseToken.slice(5);
|
|
2614
|
+
const widthValue = resolveThemeValue(ringWidthScale, valueKey);
|
|
2615
|
+
if (widthValue !== void 0) return buildRingWidth(widthValue);
|
|
2616
|
+
if (valueKey === "inset") return `--tw-ring-inset: inset;`;
|
|
2617
|
+
const colorValue = resolveColorWithOpacity(ringColorScale, valueKey) || resolveColorWithOpacity(theme2.colors || {}, valueKey);
|
|
2618
|
+
if (colorValue !== void 0) return `--tw-ring-color: ${colorValue};`;
|
|
2619
|
+
return void 0;
|
|
2620
|
+
}
|
|
2621
|
+
function buildTextShadowDeclaration(baseToken, theme2) {
|
|
2622
|
+
if (baseToken === "text-shadow") {
|
|
2623
|
+
const val = (theme2.textShadow || TEXT_SHADOW_SIZES).DEFAULT || TEXT_SHADOW_SIZES.DEFAULT;
|
|
2624
|
+
return `text-shadow: ${val};`;
|
|
2625
|
+
}
|
|
2626
|
+
if (baseToken.startsWith("text-shadow-")) {
|
|
2627
|
+
const key = baseToken.slice(12);
|
|
2628
|
+
const color = resolveColorWithOpacity(theme2.colors || {}, key);
|
|
2629
|
+
if (color !== void 0) return `--tw-text-shadow-color: ${color};`;
|
|
2630
|
+
const scale = theme2.textShadow || TEXT_SHADOW_SIZES;
|
|
2631
|
+
const val = resolveThemeValue(scale, key);
|
|
2632
|
+
if (val !== void 0) return val === "none" ? "text-shadow: none;" : `text-shadow: ${val};`;
|
|
2633
|
+
}
|
|
2634
|
+
return void 0;
|
|
2635
|
+
}
|
|
2636
|
+
function buildRingOffsetDeclaration(baseToken, theme2) {
|
|
2637
|
+
if (!baseToken.startsWith("ring-offset-")) return void 0;
|
|
2638
|
+
const key = baseToken.slice(12);
|
|
2639
|
+
const widthVal = resolveThemeValue(theme2.ringOffsetWidth || {}, key);
|
|
2640
|
+
if (widthVal !== void 0) {
|
|
2641
|
+
return `--tw-ring-offset-width: ${widthVal}; box-shadow: 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color, #fff), var(--tw-ring-shadow, 0 0 #0000);`;
|
|
2642
|
+
}
|
|
2643
|
+
const color = resolveColorWithOpacity(theme2.ringOffsetColor || theme2.colors || {}, key);
|
|
2644
|
+
if (color !== void 0) return `--tw-ring-offset-color: ${color};`;
|
|
2645
|
+
return void 0;
|
|
2646
|
+
}
|
|
2647
|
+
|
|
2648
|
+
// src/builders/backgrounds.js
|
|
2649
|
+
function buildBackgroundDeclaration(baseToken, theme2) {
|
|
2650
|
+
if (!baseToken.startsWith("bg-")) return void 0;
|
|
2651
|
+
const key = baseToken.slice(3);
|
|
2652
|
+
if (BG_ATTACHMENT_MAP[key]) return BG_ATTACHMENT_MAP[key];
|
|
2653
|
+
if (key.startsWith("clip-")) return BG_CLIP_MAP[key.slice(5)] ?? void 0;
|
|
2654
|
+
if (key.startsWith("origin-")) return BG_ORIGIN_MAP[key.slice(7)] ?? void 0;
|
|
2655
|
+
if (BG_REPEAT_MAP[key]) return BG_REPEAT_MAP[key];
|
|
2656
|
+
const bgSize = resolveThemeValue(theme2.backgroundSize || {}, key);
|
|
2657
|
+
if (bgSize !== void 0) return `background-size: ${bgSize};`;
|
|
2658
|
+
const bgPos = resolveThemeValue(theme2.backgroundPosition || {}, key);
|
|
2659
|
+
if (bgPos !== void 0) return `background-position: ${bgPos};`;
|
|
2660
|
+
const bgImage = resolveThemeValue(theme2.backgroundImage || {}, key);
|
|
2661
|
+
if (bgImage !== void 0) return `background-image: ${bgImage};`;
|
|
2662
|
+
return void 0;
|
|
2663
|
+
}
|
|
2664
|
+
function buildGradientDeclaration(baseToken, theme2) {
|
|
2665
|
+
const colors = theme2.gradientColorStops || theme2.colors || {};
|
|
2666
|
+
if (baseToken.startsWith("from-")) {
|
|
2667
|
+
const key = baseToken.slice(5);
|
|
2668
|
+
if (key.endsWith("%")) return `--tw-gradient-from-position: ${key};`;
|
|
2669
|
+
const color = resolveColorWithOpacity(colors, key);
|
|
2670
|
+
if (color !== void 0) {
|
|
2671
|
+
return `--tw-gradient-from: ${color}; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-via, transparent), var(--tw-gradient-to, transparent);`;
|
|
2672
|
+
}
|
|
2673
|
+
}
|
|
2674
|
+
if (baseToken.startsWith("via-")) {
|
|
2675
|
+
const key = baseToken.slice(4);
|
|
2676
|
+
if (key.endsWith("%")) return `--tw-gradient-via-position: ${key};`;
|
|
2677
|
+
const color = resolveColorWithOpacity(colors, key);
|
|
2678
|
+
if (color !== void 0) return `--tw-gradient-via: ${color};`;
|
|
2679
|
+
}
|
|
2680
|
+
if (baseToken.startsWith("to-")) {
|
|
2681
|
+
const key = baseToken.slice(3);
|
|
2682
|
+
if (key.endsWith("%")) return `--tw-gradient-to-position: ${key};`;
|
|
2683
|
+
const color = resolveColorWithOpacity(colors, key);
|
|
2684
|
+
if (color !== void 0) return `--tw-gradient-to: ${color};`;
|
|
2685
|
+
}
|
|
2686
|
+
return void 0;
|
|
2687
|
+
}
|
|
2688
|
+
|
|
2689
|
+
// src/builders/transforms.js
|
|
2690
|
+
function buildTransformDeclaration(baseToken, theme2) {
|
|
2691
|
+
if (baseToken === "transform") {
|
|
2692
|
+
return "--tw-translate-x: 0; --tw-translate-y: 0; --tw-rotate: 0; --tw-skew-x: 0; --tw-skew-y: 0; --tw-scale-x: 1; --tw-scale-y: 1; transform: translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));";
|
|
2693
|
+
}
|
|
2694
|
+
if (baseToken === "transform-none") return "transform: none;";
|
|
2695
|
+
if (baseToken === "transform-gpu") {
|
|
2696
|
+
return "transform: translate3d(var(--tw-translate-x,0), var(--tw-translate-y,0), 0) rotate(var(--tw-rotate,0)) skewX(var(--tw-skew-x,0)) skewY(var(--tw-skew-y,0)) scaleX(var(--tw-scale-x,1)) scaleY(var(--tw-scale-y,1));";
|
|
2697
|
+
}
|
|
2698
|
+
const negative = baseToken.startsWith("-");
|
|
2699
|
+
const normalized = negative ? baseToken.slice(1) : baseToken;
|
|
2700
|
+
if (normalized.startsWith("rotate-")) {
|
|
2701
|
+
const key = normalized.slice(7);
|
|
2702
|
+
const axisMatch = key.match(/^([xyz])-(.+)$/);
|
|
2703
|
+
if (axisMatch) {
|
|
2704
|
+
const [, axis, valueKey] = axisMatch;
|
|
2705
|
+
let val2 = resolveThemeValue(theme2.rotate || {}, valueKey) || resolveArbitraryValue(valueKey);
|
|
2706
|
+
if (val2 === void 0) return void 0;
|
|
2707
|
+
if (negative) val2 = val2.startsWith("-") ? val2.slice(1) : `-${val2}`;
|
|
2708
|
+
return `rotate: ${axis.toUpperCase()}(${val2});`;
|
|
2709
|
+
}
|
|
2710
|
+
let val = resolveThemeValue(theme2.rotate || {}, key) || resolveArbitraryValue(key);
|
|
2711
|
+
if (val === void 0) return void 0;
|
|
2712
|
+
if (negative) val = val.startsWith("-") ? val.slice(1) : `-${val}`;
|
|
2713
|
+
return `--tw-rotate: ${val}; transform: rotate(${val});`;
|
|
2714
|
+
}
|
|
2715
|
+
if (normalized.startsWith("scale-")) {
|
|
2716
|
+
const key = normalized.slice(6);
|
|
2717
|
+
const axisMatch = key.match(/^([xyz])-(.+)$/);
|
|
2718
|
+
if (axisMatch) {
|
|
2719
|
+
const [, axis, valueKey] = axisMatch;
|
|
2720
|
+
let val2 = resolveThemeValue(theme2.scale || {}, valueKey) || resolveArbitraryValue(valueKey);
|
|
2721
|
+
if (val2 === void 0) return void 0;
|
|
2722
|
+
if (negative && val2 !== "0") val2 = `-${val2}`;
|
|
2723
|
+
if (axis === "z") return `--tw-scale-z: ${val2}; scale: var(--tw-scale-x, 1) var(--tw-scale-y, 1) ${val2};`;
|
|
2724
|
+
return `--tw-scale-${axis}: ${val2}; transform: scale${axis.toUpperCase()}(${val2});`;
|
|
2725
|
+
}
|
|
2726
|
+
let val = resolveThemeValue(theme2.scale || {}, key) || resolveArbitraryValue(key);
|
|
2727
|
+
if (val === void 0) return void 0;
|
|
2728
|
+
if (negative && val !== "0") val = `-${val}`;
|
|
2729
|
+
return `--tw-scale-x: ${val}; --tw-scale-y: ${val}; transform: scale(${val});`;
|
|
2730
|
+
}
|
|
2731
|
+
if (normalized.startsWith("translate-")) {
|
|
2732
|
+
const key = normalized.slice(10);
|
|
2733
|
+
const axisMatch = key.match(/^([xyz])-(.+)$/);
|
|
2734
|
+
if (axisMatch) {
|
|
2735
|
+
const [, axis, valueKey] = axisMatch;
|
|
2736
|
+
const scale2 = theme2.translate || theme2.spacing || {};
|
|
2737
|
+
let val2 = resolveThemeValue(scale2, valueKey) || resolveArbitraryValue(valueKey);
|
|
2738
|
+
if (val2 === void 0) return void 0;
|
|
2739
|
+
if (negative && val2 !== "0") val2 = `-${val2}`;
|
|
2740
|
+
if (axis === "z") return `--tw-translate-z: ${val2}; transform: translateZ(${val2});`;
|
|
2741
|
+
return `--tw-translate-${axis}: ${val2}; transform: translate${axis.toUpperCase()}(${val2});`;
|
|
2742
|
+
}
|
|
2743
|
+
const scale = theme2.translate || theme2.spacing || {};
|
|
2744
|
+
let val = resolveThemeValue(scale, key) || resolveArbitraryValue(key);
|
|
2745
|
+
if (val === void 0) return void 0;
|
|
2746
|
+
if (negative && val !== "0") val = `-${val}`;
|
|
2747
|
+
return `--tw-translate-x: ${val}; --tw-translate-y: ${val}; transform: translate(${val}, ${val});`;
|
|
2748
|
+
}
|
|
2749
|
+
if (normalized.startsWith("skew-")) {
|
|
2750
|
+
const key = normalized.slice(5);
|
|
2751
|
+
const axisMatch = key.match(/^([xy])-(.+)$/);
|
|
2752
|
+
if (axisMatch) {
|
|
2753
|
+
const [, axis, valueKey] = axisMatch;
|
|
2754
|
+
let val = resolveThemeValue(theme2.skew || {}, valueKey) || resolveArbitraryValue(valueKey);
|
|
2755
|
+
if (val === void 0) return void 0;
|
|
2756
|
+
if (negative) val = val.startsWith("-") ? val.slice(1) : `-${val}`;
|
|
2757
|
+
return `--tw-skew-${axis}: ${val}; transform: skew${axis.toUpperCase()}(${val});`;
|
|
2758
|
+
}
|
|
2759
|
+
}
|
|
2760
|
+
if (normalized.startsWith("origin-")) {
|
|
2761
|
+
const val = resolveThemeValue(theme2.transformOrigin || {}, normalized.slice(7));
|
|
2762
|
+
if (val !== void 0) return `transform-origin: ${val};`;
|
|
2763
|
+
}
|
|
2764
|
+
if (normalized.startsWith("perspective-")) {
|
|
2765
|
+
const key = normalized.slice(12);
|
|
2766
|
+
if (PERSPECTIVE_MAP[key]) return PERSPECTIVE_MAP[key];
|
|
2767
|
+
const arb = resolveArbitraryValue(key);
|
|
2768
|
+
if (arb !== void 0) return `perspective: ${arb};`;
|
|
2769
|
+
}
|
|
2770
|
+
return void 0;
|
|
2771
|
+
}
|
|
2772
|
+
|
|
2773
|
+
// src/builders/filters.js
|
|
2774
|
+
function buildFilterDeclaration(baseToken, theme2) {
|
|
2775
|
+
const negative = baseToken.startsWith("-");
|
|
2776
|
+
const normalized = negative ? baseToken.slice(1) : baseToken;
|
|
2777
|
+
const isBackdrop = normalized.startsWith("backdrop-");
|
|
2778
|
+
const rest = isBackdrop ? normalized.slice(9) : normalized;
|
|
2779
|
+
const prefix = isBackdrop ? "backdrop-filter" : "filter";
|
|
2780
|
+
const getScale = (key) => {
|
|
2781
|
+
if (isBackdrop) {
|
|
2782
|
+
const backdropKey = `backdrop${key.charAt(0).toUpperCase() + key.slice(1)}`;
|
|
2783
|
+
return theme2[backdropKey] || theme2[key] || {};
|
|
2784
|
+
}
|
|
2785
|
+
return theme2[key] || {};
|
|
2786
|
+
};
|
|
2787
|
+
if (rest === "blur" || rest.startsWith("blur-")) {
|
|
2788
|
+
const key = rest === "blur" ? "DEFAULT" : rest.slice(5);
|
|
2789
|
+
const val = resolveThemeValue(getScale("blur"), key);
|
|
2790
|
+
if (val !== void 0) return `${prefix}: blur(${val});`;
|
|
2791
|
+
}
|
|
2792
|
+
if (rest.startsWith("brightness-")) {
|
|
2793
|
+
const val = resolveThemeValue(getScale("brightness"), rest.slice(11));
|
|
2794
|
+
if (val !== void 0) return `${prefix}: brightness(${val});`;
|
|
2795
|
+
}
|
|
2796
|
+
if (rest.startsWith("contrast-")) {
|
|
2797
|
+
const val = resolveThemeValue(getScale("contrast"), rest.slice(9));
|
|
2798
|
+
if (val !== void 0) return `${prefix}: contrast(${val});`;
|
|
2799
|
+
}
|
|
2800
|
+
if (rest === "grayscale" || rest.startsWith("grayscale-")) {
|
|
2801
|
+
const key = rest === "grayscale" ? "DEFAULT" : rest.slice(10);
|
|
2802
|
+
const val = resolveThemeValue(getScale("grayscale"), key);
|
|
2803
|
+
if (val !== void 0) return `${prefix}: grayscale(${val});`;
|
|
2804
|
+
}
|
|
2805
|
+
if (rest.startsWith("hue-rotate-")) {
|
|
2806
|
+
const val = resolveThemeValue(getScale("hueRotate"), rest.slice(11));
|
|
2807
|
+
if (val !== void 0) {
|
|
2808
|
+
const v = negative ? `-${val}` : val;
|
|
2809
|
+
return `${prefix}: hue-rotate(${v});`;
|
|
2810
|
+
}
|
|
2811
|
+
}
|
|
2812
|
+
if (rest === "invert" || rest.startsWith("invert-")) {
|
|
2813
|
+
const key = rest === "invert" ? "DEFAULT" : rest.slice(7);
|
|
2814
|
+
const val = resolveThemeValue(getScale("invert"), key);
|
|
2815
|
+
if (val !== void 0) return `${prefix}: invert(${val});`;
|
|
2816
|
+
}
|
|
2817
|
+
if (rest.startsWith("saturate-")) {
|
|
2818
|
+
const val = resolveThemeValue(getScale("saturate"), rest.slice(9));
|
|
2819
|
+
if (val !== void 0) return `${prefix}: saturate(${val});`;
|
|
2820
|
+
}
|
|
2821
|
+
if (rest === "sepia" || rest.startsWith("sepia-")) {
|
|
2822
|
+
const key = rest === "sepia" ? "DEFAULT" : rest.slice(6);
|
|
2823
|
+
const val = resolveThemeValue(getScale("sepia"), key);
|
|
2824
|
+
if (val !== void 0) return `${prefix}: sepia(${val});`;
|
|
2825
|
+
}
|
|
2826
|
+
if (!isBackdrop && rest === "drop-shadow") {
|
|
2827
|
+
const val = resolveThemeValue(theme2.dropShadow || {}, "DEFAULT");
|
|
2828
|
+
if (val !== void 0) return `filter: drop-shadow(${val});`;
|
|
2829
|
+
}
|
|
2830
|
+
if (!isBackdrop && rest.startsWith("drop-shadow-")) {
|
|
2831
|
+
const val = resolveThemeValue(theme2.dropShadow || {}, rest.slice(12) || "DEFAULT");
|
|
2832
|
+
if (val !== void 0) return `filter: drop-shadow(${val});`;
|
|
2833
|
+
}
|
|
2834
|
+
if (isBackdrop && rest.startsWith("opacity-")) {
|
|
2835
|
+
const val = resolveThemeValue(theme2.backdropOpacity || theme2.opacity || {}, rest.slice(8));
|
|
2836
|
+
if (val !== void 0) return `backdrop-filter: opacity(${val});`;
|
|
2837
|
+
}
|
|
2838
|
+
return void 0;
|
|
2839
|
+
}
|
|
2840
|
+
|
|
2841
|
+
// src/builders/transitions.js
|
|
2842
|
+
function buildTransitionDeclaration(baseToken) {
|
|
2843
|
+
if (baseToken === "transition") {
|
|
2844
|
+
return `transition-property: ${TRANSITION_PROPERTY_MAP.DEFAULT}; transition-timing-function: ${TRANSITION_TIMING_MAP["in-out"]}; transition-duration: 150ms;`;
|
|
2845
|
+
}
|
|
2846
|
+
if (baseToken.startsWith("transition-")) {
|
|
2847
|
+
const key = baseToken.slice(11);
|
|
2848
|
+
if (Object.prototype.hasOwnProperty.call(TRANSITION_PROPERTY_MAP, key)) {
|
|
2849
|
+
const propertyValue = TRANSITION_PROPERTY_MAP[key];
|
|
2850
|
+
if (propertyValue === "none") return "transition-property: none;";
|
|
2851
|
+
return `transition-property: ${propertyValue}; transition-timing-function: ${TRANSITION_TIMING_MAP["in-out"]}; transition-duration: 150ms;`;
|
|
2852
|
+
}
|
|
2853
|
+
}
|
|
2854
|
+
if (baseToken.startsWith("duration-")) {
|
|
2855
|
+
const value = resolveTimeValue(baseToken.slice(9));
|
|
2856
|
+
if (value !== void 0) return `transition-duration: ${value};`;
|
|
2857
|
+
}
|
|
2858
|
+
if (baseToken.startsWith("delay-")) {
|
|
2859
|
+
const value = resolveTimeValue(baseToken.slice(6));
|
|
2860
|
+
if (value !== void 0) return `transition-delay: ${value};`;
|
|
2861
|
+
}
|
|
2862
|
+
if (baseToken.startsWith("ease-")) {
|
|
2863
|
+
const valueKey = baseToken.slice(5);
|
|
2864
|
+
const value = TRANSITION_TIMING_MAP[valueKey] || resolveArbitraryValue(valueKey);
|
|
2865
|
+
if (value !== void 0) return `transition-timing-function: ${value};`;
|
|
2866
|
+
}
|
|
2867
|
+
return void 0;
|
|
2868
|
+
}
|
|
2869
|
+
|
|
2870
|
+
// src/builders/misc.js
|
|
2871
|
+
function buildAnimationDeclaration(baseToken) {
|
|
2872
|
+
if (!baseToken.startsWith("animate-")) return void 0;
|
|
2873
|
+
const key = baseToken.slice(8);
|
|
2874
|
+
if (ANIMATE_MAP[key]) return ANIMATE_MAP[key];
|
|
2875
|
+
const arb = resolveArbitraryValue(key);
|
|
2876
|
+
if (arb !== void 0) return `animation: ${arb};`;
|
|
2877
|
+
return void 0;
|
|
2878
|
+
}
|
|
2879
|
+
function buildMaskDeclaration(baseToken) {
|
|
2880
|
+
if (MASK_LINEAR_MAP[baseToken]) return MASK_LINEAR_MAP[baseToken];
|
|
2881
|
+
if (MASK_REPEAT_MAP[baseToken]) return MASK_REPEAT_MAP[baseToken];
|
|
2882
|
+
if (MASK_SIZE_MAP[baseToken]) return MASK_SIZE_MAP[baseToken];
|
|
2883
|
+
if (baseToken === "mask-radial") {
|
|
2884
|
+
return "mask-image: radial-gradient(circle at center, black, transparent); -webkit-mask-image: radial-gradient(circle at center, black, transparent);";
|
|
2885
|
+
}
|
|
2886
|
+
if (baseToken.startsWith("mask-radial-at-")) {
|
|
2887
|
+
const pos = MASK_RADIAL_POSITIONS[baseToken.slice(15)];
|
|
2888
|
+
if (pos !== void 0) {
|
|
2889
|
+
return `mask-image: radial-gradient(circle at ${pos}, black, transparent); -webkit-mask-image: radial-gradient(circle at ${pos}, black, transparent);`;
|
|
2890
|
+
}
|
|
2891
|
+
}
|
|
2892
|
+
if (baseToken.startsWith("mask-position-")) {
|
|
2893
|
+
const pos = MASK_RADIAL_POSITIONS[baseToken.slice(14)];
|
|
2894
|
+
if (pos !== void 0) {
|
|
2895
|
+
return `mask-position: ${pos}; -webkit-mask-position: ${pos};`;
|
|
2896
|
+
}
|
|
2897
|
+
}
|
|
2898
|
+
return void 0;
|
|
2899
|
+
}
|
|
2900
|
+
function buildContainerQueryDeclaration(baseToken) {
|
|
2901
|
+
if (baseToken === "@container") return "container-type: inline-size;";
|
|
2902
|
+
if (baseToken.startsWith("@container/")) {
|
|
2903
|
+
const name = baseToken.slice(11);
|
|
2904
|
+
return `container-type: inline-size; container-name: ${name};`;
|
|
2905
|
+
}
|
|
2906
|
+
return void 0;
|
|
2907
|
+
}
|
|
2908
|
+
function buildInteractivityDeclaration(baseToken, theme2) {
|
|
2909
|
+
if (baseToken.startsWith("cursor-")) return CURSOR_MAP[baseToken.slice(7)] ?? void 0;
|
|
2910
|
+
if (baseToken.startsWith("pointer-events-")) return POINTER_EVENTS_MAP[baseToken.slice(15)] ?? void 0;
|
|
2911
|
+
if (baseToken.startsWith("select-")) return USER_SELECT_MAP[baseToken.slice(7)] ?? void 0;
|
|
2912
|
+
if (baseToken.startsWith("appearance-")) {
|
|
2913
|
+
return APPEARANCE_MAP[baseToken.slice(11)] ? `appearance: ${baseToken.slice(11)};` : void 0;
|
|
2914
|
+
}
|
|
2915
|
+
if (baseToken === "resize-none") return "resize: none;";
|
|
2916
|
+
if (baseToken === "resize-y") return "resize: vertical;";
|
|
2917
|
+
if (baseToken === "resize-x") return "resize: horizontal;";
|
|
2918
|
+
if (baseToken === "resize") return "resize: both;";
|
|
2919
|
+
if (baseToken === "outline") return "outline-style: solid;";
|
|
2920
|
+
if (baseToken === "outline-none") return "outline: 2px solid transparent; outline-offset: 2px;";
|
|
2921
|
+
if (baseToken.startsWith("outline-")) {
|
|
2922
|
+
const key = baseToken.slice(8);
|
|
2923
|
+
if (OUTLINE_STYLE_MAP[key]) return OUTLINE_STYLE_MAP[key];
|
|
2924
|
+
if (key.startsWith("offset-")) {
|
|
2925
|
+
const offsetKey = key.slice(7);
|
|
2926
|
+
const offset = resolveThemeValue(theme2.outlineOffset || {}, offsetKey);
|
|
2927
|
+
if (offset !== void 0) return `outline-offset: ${offset};`;
|
|
2928
|
+
const arb = resolveArbitraryValue(offsetKey);
|
|
2929
|
+
if (arb !== void 0) return `outline-offset: ${arb};`;
|
|
2930
|
+
}
|
|
2931
|
+
const width = resolveThemeValue(theme2.outlineWidth || {}, key);
|
|
2932
|
+
if (width !== void 0) return `outline-width: ${width};`;
|
|
2933
|
+
const color = resolveColorWithOpacity(theme2.outlineColor || theme2.colors || {}, key);
|
|
2934
|
+
if (color !== void 0) return `outline-color: ${color};`;
|
|
2935
|
+
}
|
|
2936
|
+
return void 0;
|
|
2937
|
+
}
|
|
2938
|
+
function buildZoomDeclaration(baseToken, theme2) {
|
|
2939
|
+
if (!baseToken.startsWith("zoom-")) return void 0;
|
|
2940
|
+
const key = baseToken.slice(5);
|
|
2941
|
+
const val = resolveThemeValue(theme2.zoom || {}, key);
|
|
2942
|
+
if (val !== void 0) return `zoom: ${val};`;
|
|
2943
|
+
const arb = resolveArbitraryValue(key);
|
|
2944
|
+
if (arb !== void 0) return `zoom: ${arb};`;
|
|
2945
|
+
return void 0;
|
|
2946
|
+
}
|
|
2947
|
+
function buildForcedColorDeclaration(baseToken) {
|
|
2948
|
+
if (baseToken === "forced-color-adjust-auto") return "forced-color-adjust: auto;";
|
|
2949
|
+
if (baseToken === "forced-color-adjust-none") return "forced-color-adjust: none;";
|
|
2950
|
+
return void 0;
|
|
2951
|
+
}
|
|
2952
|
+
function buildBorderSpacingDeclaration(baseToken, theme2) {
|
|
2953
|
+
if (!baseToken.startsWith("border-spacing-")) return void 0;
|
|
2954
|
+
const rest = baseToken.slice(15);
|
|
2955
|
+
const axisMatchX = rest.match(/^x-(.+)$/);
|
|
2956
|
+
if (axisMatchX) {
|
|
2957
|
+
const val2 = resolveThemeValue(theme2.borderSpacing || theme2.spacing || {}, axisMatchX[1]);
|
|
2958
|
+
if (val2 !== void 0) return `--tw-border-spacing-x: ${val2}; border-spacing: var(--tw-border-spacing-x) var(--tw-border-spacing-y, 0);`;
|
|
2959
|
+
}
|
|
2960
|
+
const axisMatchY = rest.match(/^y-(.+)$/);
|
|
2961
|
+
if (axisMatchY) {
|
|
2962
|
+
const val2 = resolveThemeValue(theme2.borderSpacing || theme2.spacing || {}, axisMatchY[1]);
|
|
2963
|
+
if (val2 !== void 0) return `--tw-border-spacing-y: ${val2}; border-spacing: var(--tw-border-spacing-x, 0) var(--tw-border-spacing-y);`;
|
|
2964
|
+
}
|
|
2965
|
+
const val = resolveThemeValue(theme2.borderSpacing || theme2.spacing || {}, rest);
|
|
2966
|
+
if (val !== void 0) return `--tw-border-spacing-x: ${val}; --tw-border-spacing-y: ${val}; border-spacing: ${val};`;
|
|
2967
|
+
const arb = resolveArbitraryValue(rest);
|
|
2968
|
+
if (arb !== void 0) return `--tw-border-spacing-x: ${arb}; --tw-border-spacing-y: ${arb}; border-spacing: ${arb};`;
|
|
2969
|
+
return void 0;
|
|
2970
|
+
}
|
|
2971
|
+
var SNAP_TYPE_MAP = {
|
|
2972
|
+
none: "scroll-snap-type: none;",
|
|
2973
|
+
x: "scroll-snap-type: x var(--tw-scroll-snap-strictness);",
|
|
2974
|
+
y: "scroll-snap-type: y var(--tw-scroll-snap-strictness);",
|
|
2975
|
+
both: "scroll-snap-type: both var(--tw-scroll-snap-strictness);",
|
|
2976
|
+
mandatory: "--tw-scroll-snap-strictness: mandatory;",
|
|
2977
|
+
proximity: "--tw-scroll-snap-strictness: proximity;"
|
|
2978
|
+
};
|
|
2979
|
+
var SNAP_ALIGN_MAP = {
|
|
2980
|
+
start: "scroll-snap-align: start;",
|
|
2981
|
+
end: "scroll-snap-align: end;",
|
|
2982
|
+
center: "scroll-snap-align: center;",
|
|
2983
|
+
"align-none": "scroll-snap-align: none;"
|
|
2984
|
+
};
|
|
2985
|
+
var SNAP_STOP_MAP = {
|
|
2986
|
+
normal: "scroll-snap-stop: normal;",
|
|
2987
|
+
always: "scroll-snap-stop: always;"
|
|
2988
|
+
};
|
|
2989
|
+
function buildScrollSnapDeclaration(baseToken) {
|
|
2990
|
+
if (!baseToken.startsWith("snap-")) return void 0;
|
|
2991
|
+
const key = baseToken.slice(5);
|
|
2992
|
+
if (SNAP_TYPE_MAP[key]) return SNAP_TYPE_MAP[key];
|
|
2993
|
+
if (SNAP_ALIGN_MAP[key]) return SNAP_ALIGN_MAP[key];
|
|
2994
|
+
if (SNAP_STOP_MAP[key]) return SNAP_STOP_MAP[key];
|
|
2995
|
+
return void 0;
|
|
2996
|
+
}
|
|
2997
|
+
function buildAccessibilityDeclaration(baseToken) {
|
|
2998
|
+
if (baseToken === "sr-only") {
|
|
2999
|
+
return "position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0;";
|
|
3000
|
+
}
|
|
3001
|
+
if (baseToken === "not-sr-only") {
|
|
3002
|
+
return "position: static; width: auto; height: auto; padding: 0; margin: 0; overflow: visible; clip: auto; white-space: normal;";
|
|
3003
|
+
}
|
|
3004
|
+
return void 0;
|
|
3005
|
+
}
|
|
3006
|
+
|
|
3007
|
+
// src/builders/blending.js
|
|
3008
|
+
function buildBlendingDeclaration(baseToken) {
|
|
3009
|
+
if (MIX_BLEND_MAP[baseToken]) return MIX_BLEND_MAP[baseToken];
|
|
3010
|
+
if (BG_BLEND_MAP[baseToken]) return BG_BLEND_MAP[baseToken];
|
|
3011
|
+
return void 0;
|
|
3012
|
+
}
|
|
3013
|
+
|
|
3014
|
+
// src/builders/space-divide.js
|
|
3015
|
+
function buildSpaceBetweenDeclaration(baseToken, theme2) {
|
|
3016
|
+
const negative = baseToken.startsWith("-");
|
|
3017
|
+
const normalized = negative ? baseToken.slice(1) : baseToken;
|
|
3018
|
+
if (normalized === "space-x-reverse") return "--tw-space-x-reverse: 1;";
|
|
3019
|
+
if (normalized === "space-y-reverse") return "--tw-space-y-reverse: 1;";
|
|
3020
|
+
const matchX = normalized.match(/^space-x-(.+)$/);
|
|
3021
|
+
if (matchX) {
|
|
3022
|
+
let val = resolveThemeValue(theme2.spacing || {}, matchX[1]);
|
|
3023
|
+
if (val === void 0) return void 0;
|
|
3024
|
+
if (negative && val !== "0") val = `-${val}`;
|
|
3025
|
+
return [
|
|
3026
|
+
`--tw-space-x-reverse: 0;`,
|
|
3027
|
+
`margin-inline-end: calc(${val} * var(--tw-space-x-reverse));`,
|
|
3028
|
+
`margin-inline-start: calc(${val} * calc(1 - var(--tw-space-x-reverse)));`
|
|
3029
|
+
].join(" ");
|
|
3030
|
+
}
|
|
3031
|
+
const matchY = normalized.match(/^space-y-(.+)$/);
|
|
3032
|
+
if (matchY) {
|
|
3033
|
+
let val = resolveThemeValue(theme2.spacing || {}, matchY[1]);
|
|
3034
|
+
if (val === void 0) return void 0;
|
|
3035
|
+
if (negative && val !== "0") val = `-${val}`;
|
|
3036
|
+
return [
|
|
3037
|
+
`--tw-space-y-reverse: 0;`,
|
|
3038
|
+
`margin-bottom: calc(${val} * var(--tw-space-y-reverse));`,
|
|
3039
|
+
`margin-top: calc(${val} * calc(1 - var(--tw-space-y-reverse)));`
|
|
3040
|
+
].join(" ");
|
|
3041
|
+
}
|
|
3042
|
+
return void 0;
|
|
3043
|
+
}
|
|
3044
|
+
function buildDivideDeclaration(baseToken, theme2) {
|
|
3045
|
+
if (!baseToken.startsWith("divide-")) return void 0;
|
|
3046
|
+
const key = baseToken.slice(7);
|
|
3047
|
+
if (key === "x" || key === "x-reverse") {
|
|
3048
|
+
if (key === "x-reverse") return "--tw-divide-x-reverse: 1;";
|
|
3049
|
+
const val = resolveThemeValue(theme2.borderWidth || {}, "DEFAULT") || "1px";
|
|
3050
|
+
return `--tw-divide-x-reverse: 0; border-inline-end-width: calc(${val} * var(--tw-divide-x-reverse)); border-inline-start-width: calc(${val} * calc(1 - var(--tw-divide-x-reverse)));`;
|
|
3051
|
+
}
|
|
3052
|
+
const matchX = key.match(/^x-(\d+)$/);
|
|
3053
|
+
if (matchX) {
|
|
3054
|
+
const val = resolveThemeValue(theme2.borderWidth || {}, matchX[1]);
|
|
3055
|
+
if (val !== void 0) return `--tw-divide-x-reverse: 0; border-inline-end-width: calc(${val} * var(--tw-divide-x-reverse)); border-inline-start-width: calc(${val} * calc(1 - var(--tw-divide-x-reverse)));`;
|
|
3056
|
+
}
|
|
3057
|
+
if (key === "y" || key === "y-reverse") {
|
|
3058
|
+
if (key === "y-reverse") return "--tw-divide-y-reverse: 1;";
|
|
3059
|
+
const val = resolveThemeValue(theme2.borderWidth || {}, "DEFAULT") || "1px";
|
|
3060
|
+
return `--tw-divide-y-reverse: 0; border-bottom-width: calc(${val} * var(--tw-divide-y-reverse)); border-top-width: calc(${val} * calc(1 - var(--tw-divide-y-reverse)));`;
|
|
3061
|
+
}
|
|
3062
|
+
const matchY = key.match(/^y-(\d+)$/);
|
|
3063
|
+
if (matchY) {
|
|
3064
|
+
const val = resolveThemeValue(theme2.borderWidth || {}, matchY[1]);
|
|
3065
|
+
if (val !== void 0) return `--tw-divide-y-reverse: 0; border-bottom-width: calc(${val} * var(--tw-divide-y-reverse)); border-top-width: calc(${val} * calc(1 - var(--tw-divide-y-reverse)));`;
|
|
3066
|
+
}
|
|
3067
|
+
if (BORDER_STYLE_MAP[key]) return `border-style: ${BORDER_STYLE_MAP[key].replace("border-style: ", "").replace(";", "")};`;
|
|
3068
|
+
if (key === "none") return "border-style: none;";
|
|
3069
|
+
if (key === "solid") return "border-style: solid;";
|
|
3070
|
+
if (key === "dashed") return "border-style: dashed;";
|
|
3071
|
+
if (key === "dotted") return "border-style: dotted;";
|
|
3072
|
+
if (key === "double") return "border-style: double;";
|
|
3073
|
+
const colors = theme2.colors || {};
|
|
3074
|
+
const color = resolveColorWithOpacity(theme2.divideColor || colors, key);
|
|
3075
|
+
if (color !== void 0) return `border-color: ${color};`;
|
|
3076
|
+
if (key.startsWith("opacity-")) {
|
|
3077
|
+
const val = resolveThemeValue(theme2.opacity || {}, key.slice(8));
|
|
3078
|
+
if (val !== void 0) return `--tw-divide-opacity: ${val};`;
|
|
3079
|
+
}
|
|
3080
|
+
return void 0;
|
|
3081
|
+
}
|
|
3082
|
+
|
|
3083
|
+
// src/compiler.js
|
|
3084
|
+
function compileBaseToken(baseToken, theme2) {
|
|
3085
|
+
return buildLayoutDeclaration(baseToken, theme2) || buildPositionInsetDeclaration(baseToken, theme2) || buildSpacingDeclaration(baseToken, theme2) || buildSpaceBetweenDeclaration(baseToken, theme2) || buildGapDeclaration(baseToken, theme2) || buildDimensionDeclaration(baseToken, theme2) || buildFlexGridDeclaration(baseToken, theme2) || buildBorderDeclaration(baseToken, theme2) || buildBorderRadiusDeclaration(baseToken, theme2) || buildBorderSpacingDeclaration(baseToken, theme2) || buildDivideDeclaration(baseToken, theme2) || buildOpacityDeclaration(baseToken, theme2) || buildShadowDeclaration(baseToken, theme2) || buildInsetShadowDeclaration(baseToken, theme2) || buildInsetRingDeclaration(baseToken, theme2) || buildRingDeclaration(baseToken, theme2) || buildRingOffsetDeclaration(baseToken, theme2) || buildTextShadowDeclaration(baseToken, theme2) || buildTransitionDeclaration(baseToken) || buildTransformDeclaration(baseToken, theme2) || buildFilterDeclaration(baseToken, theme2) || buildBackgroundDeclaration(baseToken, theme2) || buildGradientDeclaration(baseToken, theme2) || buildColorDeclaration(baseToken, theme2) || buildTypographyDeclaration(baseToken, theme2) || buildBlendingDeclaration(baseToken) || buildInteractivityDeclaration(baseToken, theme2) || buildAnimationDeclaration(baseToken) || buildMaskDeclaration(baseToken) || buildContainerQueryDeclaration(baseToken) || buildScrollSnapDeclaration(baseToken) || buildAccessibilityDeclaration(baseToken) || buildZoomDeclaration(baseToken, theme2) || buildForcedColorDeclaration(baseToken);
|
|
3086
|
+
}
|
|
3087
|
+
function applyVariants(selector, variants2) {
|
|
3088
|
+
let currentSelector = selector;
|
|
3089
|
+
for (const variant of variants2) {
|
|
3090
|
+
switch (variant) {
|
|
3091
|
+
case "dark":
|
|
3092
|
+
currentSelector = `.dark ${currentSelector}`;
|
|
3093
|
+
break;
|
|
3094
|
+
case "hover":
|
|
3095
|
+
currentSelector = `${currentSelector}:hover`;
|
|
3096
|
+
break;
|
|
3097
|
+
case "focus":
|
|
3098
|
+
currentSelector = `${currentSelector}:focus`;
|
|
3099
|
+
break;
|
|
3100
|
+
case "focus-visible":
|
|
3101
|
+
currentSelector = `${currentSelector}:focus-visible`;
|
|
3102
|
+
break;
|
|
3103
|
+
case "focus-within":
|
|
3104
|
+
currentSelector = `${currentSelector}:focus-within`;
|
|
3105
|
+
break;
|
|
3106
|
+
case "active":
|
|
3107
|
+
currentSelector = `${currentSelector}:active`;
|
|
3108
|
+
break;
|
|
3109
|
+
case "visited":
|
|
3110
|
+
currentSelector = `${currentSelector}:visited`;
|
|
3111
|
+
break;
|
|
3112
|
+
case "disabled":
|
|
3113
|
+
currentSelector = `${currentSelector}:disabled`;
|
|
3114
|
+
break;
|
|
3115
|
+
case "checked":
|
|
3116
|
+
currentSelector = `${currentSelector}:checked`;
|
|
3117
|
+
break;
|
|
3118
|
+
case "indeterminate":
|
|
3119
|
+
currentSelector = `${currentSelector}:indeterminate`;
|
|
3120
|
+
break;
|
|
3121
|
+
case "required":
|
|
3122
|
+
currentSelector = `${currentSelector}:required`;
|
|
3123
|
+
break;
|
|
3124
|
+
case "valid":
|
|
3125
|
+
currentSelector = `${currentSelector}:valid`;
|
|
3126
|
+
break;
|
|
3127
|
+
case "invalid":
|
|
3128
|
+
currentSelector = `${currentSelector}:invalid`;
|
|
3129
|
+
break;
|
|
3130
|
+
case "placeholder":
|
|
3131
|
+
currentSelector = `${currentSelector}::placeholder`;
|
|
3132
|
+
break;
|
|
3133
|
+
case "before":
|
|
3134
|
+
currentSelector = `${currentSelector}::before`;
|
|
3135
|
+
break;
|
|
3136
|
+
case "after":
|
|
3137
|
+
currentSelector = `${currentSelector}::after`;
|
|
3138
|
+
break;
|
|
3139
|
+
case "first":
|
|
3140
|
+
currentSelector = `${currentSelector}:first-child`;
|
|
3141
|
+
break;
|
|
3142
|
+
case "last":
|
|
3143
|
+
currentSelector = `${currentSelector}:last-child`;
|
|
3144
|
+
break;
|
|
3145
|
+
case "odd":
|
|
3146
|
+
currentSelector = `${currentSelector}:nth-child(odd)`;
|
|
3147
|
+
break;
|
|
3148
|
+
case "even":
|
|
3149
|
+
currentSelector = `${currentSelector}:nth-child(even)`;
|
|
3150
|
+
break;
|
|
3151
|
+
case "first-of-type":
|
|
3152
|
+
currentSelector = `${currentSelector}:first-of-type`;
|
|
3153
|
+
break;
|
|
3154
|
+
case "last-of-type":
|
|
3155
|
+
currentSelector = `${currentSelector}:last-of-type`;
|
|
3156
|
+
break;
|
|
3157
|
+
case "only":
|
|
3158
|
+
currentSelector = `${currentSelector}:only-child`;
|
|
3159
|
+
break;
|
|
3160
|
+
case "only-of-type":
|
|
3161
|
+
currentSelector = `${currentSelector}:only-of-type`;
|
|
3162
|
+
break;
|
|
3163
|
+
case "empty":
|
|
3164
|
+
currentSelector = `${currentSelector}:empty`;
|
|
3165
|
+
break;
|
|
3166
|
+
case "read-only":
|
|
3167
|
+
currentSelector = `${currentSelector}:read-only`;
|
|
3168
|
+
break;
|
|
3169
|
+
case "open":
|
|
3170
|
+
currentSelector = `${currentSelector}[open]`;
|
|
3171
|
+
break;
|
|
3172
|
+
case "group-hover":
|
|
3173
|
+
currentSelector = `.group:hover ${currentSelector}`;
|
|
3174
|
+
break;
|
|
3175
|
+
case "group-focus":
|
|
3176
|
+
currentSelector = `.group:focus ${currentSelector}`;
|
|
3177
|
+
break;
|
|
3178
|
+
case "group-active":
|
|
3179
|
+
currentSelector = `.group:active ${currentSelector}`;
|
|
3180
|
+
break;
|
|
3181
|
+
case "peer-hover":
|
|
3182
|
+
currentSelector = `.peer:hover ~ ${currentSelector}`;
|
|
3183
|
+
break;
|
|
3184
|
+
case "peer-focus":
|
|
3185
|
+
currentSelector = `.peer:focus ~ ${currentSelector}`;
|
|
3186
|
+
break;
|
|
3187
|
+
case "peer-checked":
|
|
3188
|
+
currentSelector = `.peer:checked ~ ${currentSelector}`;
|
|
3189
|
+
break;
|
|
3190
|
+
case "peer-disabled":
|
|
3191
|
+
currentSelector = `.peer:disabled ~ ${currentSelector}`;
|
|
3192
|
+
break;
|
|
3193
|
+
case "not-hover":
|
|
3194
|
+
currentSelector = `${currentSelector}:not(:hover)`;
|
|
3195
|
+
break;
|
|
3196
|
+
case "not-focus":
|
|
3197
|
+
currentSelector = `${currentSelector}:not(:focus)`;
|
|
3198
|
+
break;
|
|
3199
|
+
case "not-disabled":
|
|
3200
|
+
currentSelector = `${currentSelector}:not(:disabled)`;
|
|
3201
|
+
break;
|
|
3202
|
+
case "not-checked":
|
|
3203
|
+
currentSelector = `${currentSelector}:not(:checked)`;
|
|
3204
|
+
break;
|
|
3205
|
+
case "in-hover":
|
|
3206
|
+
currentSelector = `.group:hover ${currentSelector}`;
|
|
3207
|
+
break;
|
|
3208
|
+
case "in-focus":
|
|
3209
|
+
currentSelector = `.group:focus ${currentSelector}`;
|
|
3210
|
+
break;
|
|
3211
|
+
default:
|
|
3212
|
+
return void 0;
|
|
3213
|
+
}
|
|
3214
|
+
}
|
|
3215
|
+
return currentSelector;
|
|
3216
|
+
}
|
|
3217
|
+
function resolveRuntimeContext(options = {}) {
|
|
3218
|
+
const config = getConfigOptions(options, []);
|
|
3219
|
+
return {
|
|
3220
|
+
config,
|
|
3221
|
+
theme: config.theme || {},
|
|
3222
|
+
screens: config.theme && config.theme.screens || {},
|
|
3223
|
+
containers: config.theme && config.theme.containers || {}
|
|
3224
|
+
};
|
|
3225
|
+
}
|
|
3226
|
+
function getBaseTailwindOptions(options = {}) {
|
|
3227
|
+
const { id, autoStart, compatMode, compatStyleId, compatGenerateCss, ...tailwindOptions } = options;
|
|
3228
|
+
return tailwindOptions;
|
|
3229
|
+
}
|
|
3230
|
+
function parseClass(className, screens = {}, containers = {}) {
|
|
3231
|
+
if (typeof className !== "string") return null;
|
|
3232
|
+
const token = className.trim();
|
|
3233
|
+
if (!token) return null;
|
|
3234
|
+
const important = token.startsWith("!");
|
|
3235
|
+
const normalized = important ? token.slice(1) : token;
|
|
3236
|
+
const parts = splitByVariantDelimiter(normalized);
|
|
3237
|
+
if (parts.length === 0) return null;
|
|
3238
|
+
const baseToken = parts[parts.length - 1];
|
|
3239
|
+
const variants2 = [];
|
|
3240
|
+
let breakpoint = null;
|
|
3241
|
+
let containerBreakpoint = null;
|
|
3242
|
+
let starting = false;
|
|
3243
|
+
for (let i = 0; i < parts.length - 1; i += 1) {
|
|
3244
|
+
const part = parts[i];
|
|
3245
|
+
if (part === "starting") {
|
|
3246
|
+
starting = true;
|
|
3247
|
+
continue;
|
|
3248
|
+
}
|
|
3249
|
+
if (part.startsWith("@")) {
|
|
3250
|
+
const cKey = part.slice(1);
|
|
3251
|
+
if (!containerBreakpoint && containers[cKey]) {
|
|
3252
|
+
containerBreakpoint = cKey;
|
|
3253
|
+
continue;
|
|
3254
|
+
}
|
|
3255
|
+
}
|
|
3256
|
+
if (!breakpoint && screens[part]) {
|
|
3257
|
+
breakpoint = part;
|
|
3258
|
+
continue;
|
|
3259
|
+
}
|
|
3260
|
+
variants2.push(part);
|
|
3261
|
+
}
|
|
3262
|
+
return { original: token, baseToken, variants: variants2, breakpoint, containerBreakpoint, important, starting };
|
|
3263
|
+
}
|
|
3264
|
+
function compileRuntimeClassNameWithContext(className, context) {
|
|
3265
|
+
const parsed = parseClass(className, context.screens, context.containers);
|
|
3266
|
+
if (!parsed) return "";
|
|
3267
|
+
const declaration = compileBaseToken(parsed.baseToken, context.theme);
|
|
3268
|
+
if (!declaration) return "";
|
|
3269
|
+
const selector = `.${escapeCssIdentifier(parsed.original)}`;
|
|
3270
|
+
const variantSelector = applyVariants(selector, parsed.variants);
|
|
3271
|
+
if (!variantSelector) return "";
|
|
3272
|
+
const finalDeclaration = appendImportant(declaration, parsed.important);
|
|
3273
|
+
const needsSpaceChildSelector = parsed.baseToken.startsWith("space-x-") && parsed.baseToken !== "space-x-reverse" || parsed.baseToken.startsWith("space-y-") && parsed.baseToken !== "space-y-reverse";
|
|
3274
|
+
const scopedSelector = needsSpaceChildSelector ? `${variantSelector} > :not(:first-child)` : variantSelector;
|
|
3275
|
+
const ruleBody = `${scopedSelector} { ${finalDeclaration} }`;
|
|
3276
|
+
if (parsed.breakpoint) {
|
|
3277
|
+
return `@media (min-width: ${context.screens[parsed.breakpoint]}) { ${ruleBody} }`;
|
|
3278
|
+
}
|
|
3279
|
+
if (parsed.containerBreakpoint) {
|
|
3280
|
+
return `@container (min-width: ${context.containers[parsed.containerBreakpoint]}) { ${ruleBody} }`;
|
|
3281
|
+
}
|
|
3282
|
+
return ruleBody;
|
|
3283
|
+
if (parsed.starting) {
|
|
3284
|
+
const wrapped = parsed.breakpoint ? `@media (min-width: ${context.screens[parsed.breakpoint]}) { ${rule} }` : parsed.containerBreakpoint ? `@container (min-width: ${context.containers[parsed.containerBreakpoint]}) { ${rule} }` : rule;
|
|
3285
|
+
return `@starting-style { ${wrapped} }`;
|
|
3286
|
+
}
|
|
3287
|
+
if (parsed.breakpoint) {
|
|
3288
|
+
return `@media (min-width: ${context.screens[parsed.breakpoint]}) { ${rule} }`;
|
|
3289
|
+
}
|
|
3290
|
+
if (parsed.containerBreakpoint) {
|
|
3291
|
+
return `@container (min-width: ${context.containers[parsed.containerBreakpoint]}) { ${rule} }`;
|
|
3292
|
+
}
|
|
3293
|
+
return rule;
|
|
3294
|
+
}
|
|
3295
|
+
function compileClass(className, options = {}) {
|
|
3296
|
+
return compileRuntimeClassNameWithContext(className, resolveRuntimeContext(options));
|
|
3297
|
+
}
|
|
3298
|
+
|
|
3299
|
+
// src/preflight.js
|
|
3300
|
+
var preflight = `
|
|
3301
|
+
*,::before,::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}
|
|
3302
|
+
html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:"Inter",ui-sans-serif,system-ui,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}
|
|
3303
|
+
body{margin:0;line-height:inherit}
|
|
3304
|
+
hr{height:0;color:inherit;border-top-width:1px}
|
|
3305
|
+
abbr:where([title]){text-decoration:underline dotted}
|
|
3306
|
+
h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}
|
|
3307
|
+
a{color:inherit;text-decoration:inherit}
|
|
3308
|
+
b,strong{font-weight:bolder}
|
|
3309
|
+
code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}
|
|
3310
|
+
small{font-size:80%}
|
|
3311
|
+
sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}
|
|
3312
|
+
sub{bottom:-0.25em}
|
|
3313
|
+
sup{top:-0.5em}
|
|
3314
|
+
table{text-indent:0;border-color:inherit;border-collapse:collapse}
|
|
3315
|
+
button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}
|
|
3316
|
+
button,select{text-transform:none}
|
|
3317
|
+
button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}
|
|
3318
|
+
:-moz-focusring{outline:auto}
|
|
3319
|
+
:-moz-ui-invalid{box-shadow:none}
|
|
3320
|
+
progress{vertical-align:baseline}
|
|
3321
|
+
::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}
|
|
3322
|
+
[type=search]{-webkit-appearance:textfield;outline-offset:-2px}
|
|
3323
|
+
::-webkit-search-decoration{-webkit-appearance:none}
|
|
3324
|
+
::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}
|
|
3325
|
+
summary{display:list-item}
|
|
3326
|
+
blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}
|
|
3327
|
+
fieldset{margin:0;padding:0}
|
|
3328
|
+
legend{padding:0}
|
|
3329
|
+
ol,ul,menu{list-style:none;margin:0;padding:0}
|
|
3330
|
+
dialog{padding:0}
|
|
3331
|
+
textarea{resize:vertical}
|
|
3332
|
+
input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}
|
|
3333
|
+
button,[role=button]{cursor:pointer}
|
|
3334
|
+
:disabled{cursor:default}
|
|
3335
|
+
img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}
|
|
3336
|
+
img,video{max-width:100%;height:auto}
|
|
3337
|
+
[hidden]:where(:not([hidden=until-found])){display:none}
|
|
3338
|
+
`;
|
|
3339
|
+
var preflight_default = preflight;
|
|
3340
|
+
|
|
3341
|
+
// src/runtime.js
|
|
3342
|
+
function injectPreflight(styleId) {
|
|
3343
|
+
if (typeof document !== "object") return;
|
|
3344
|
+
const prefId = `${styleId}-preflight`;
|
|
3345
|
+
const escapedId = prefId.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
3346
|
+
if (document.querySelector(`style[data-tailwind-preflight="${escapedId}"]`)) return;
|
|
3347
|
+
const style = document.createElement("style");
|
|
3348
|
+
style.setAttribute("type", "text/css");
|
|
3349
|
+
style.setAttribute("data-tailwind-preflight", prefId);
|
|
3350
|
+
style.appendChild(document.createTextNode(preflight_default));
|
|
3351
|
+
const head = document.head || document.getElementsByTagName("head")[0];
|
|
3352
|
+
head.insertBefore(style, head.firstChild);
|
|
3353
|
+
}
|
|
3354
|
+
function findOrCreateRuntimeStyle(id) {
|
|
3355
|
+
if (typeof document !== "object") return null;
|
|
3356
|
+
const escapedId = String(id).replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
3357
|
+
const existing = document.querySelector(`style[data-tailwind-runtime="${escapedId}"]`);
|
|
3358
|
+
if (existing) return existing;
|
|
3359
|
+
const style = document.createElement("style");
|
|
3360
|
+
style.setAttribute("type", "text/css");
|
|
3361
|
+
style.setAttribute("data-tailwind-runtime", id);
|
|
3362
|
+
const head = document.head || document.getElementsByTagName("head")[0];
|
|
3363
|
+
head.appendChild(style);
|
|
3364
|
+
return style;
|
|
3365
|
+
}
|
|
3366
|
+
function createWindrunner(options = {}) {
|
|
3367
|
+
const styleId = options.id || "tailwind-runtime-css";
|
|
3368
|
+
const preflight2 = options.preflight !== false;
|
|
3369
|
+
const compatMode = options.compatMode || "none";
|
|
3370
|
+
const compatStyleId = options.compatStyleId || `${styleId}-full`;
|
|
3371
|
+
const tailwindOptions = getBaseTailwindOptions(options);
|
|
3372
|
+
const context = resolveRuntimeContext(tailwindOptions);
|
|
3373
|
+
const cache = /* @__PURE__ */ new Map();
|
|
3374
|
+
const insertedRules = /* @__PURE__ */ new Set();
|
|
3375
|
+
const pendingElements = /* @__PURE__ */ new Set();
|
|
3376
|
+
let observer = null;
|
|
3377
|
+
let scheduled = false;
|
|
3378
|
+
let styleElement = null;
|
|
3379
|
+
let domReadyHandler = null;
|
|
3380
|
+
let compatLoaded = false;
|
|
3381
|
+
const loadExistingRules = (style) => {
|
|
3382
|
+
if (!style || !style.sheet || insertedRules.size > 0) return;
|
|
3383
|
+
try {
|
|
3384
|
+
const rules = style.sheet.cssRules || [];
|
|
3385
|
+
for (let i = 0; i < rules.length; i += 1) {
|
|
3386
|
+
insertedRules.add(rules[i].cssText);
|
|
3387
|
+
}
|
|
3388
|
+
} catch {
|
|
3389
|
+
}
|
|
3390
|
+
};
|
|
3391
|
+
const ensureCompatStyle = () => {
|
|
3392
|
+
if (compatMode !== "full") return false;
|
|
3393
|
+
if (compatLoaded) return true;
|
|
3394
|
+
if (typeof document !== "object") return false;
|
|
3395
|
+
if (typeof options.compatGenerateCss !== "function") return false;
|
|
3396
|
+
const escapedCompatId = String(compatStyleId).replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
3397
|
+
const existing = document.querySelector(`style[data-tailwind-runtime-compat="${escapedCompatId}"]`);
|
|
3398
|
+
if (existing) {
|
|
3399
|
+
compatLoaded = true;
|
|
3400
|
+
return true;
|
|
3401
|
+
}
|
|
3402
|
+
const cssText = options.compatGenerateCss(tailwindOptions);
|
|
3403
|
+
if (typeof cssText !== "string" || !cssText.trim()) return false;
|
|
3404
|
+
const style = document.createElement("style");
|
|
3405
|
+
style.setAttribute("type", "text/css");
|
|
3406
|
+
style.setAttribute("data-tailwind-runtime-compat", compatStyleId);
|
|
3407
|
+
style.appendChild(document.createTextNode(cssText));
|
|
3408
|
+
const head = document.head || document.getElementsByTagName("head")[0];
|
|
3409
|
+
head.appendChild(style);
|
|
3410
|
+
compatLoaded = true;
|
|
3411
|
+
return true;
|
|
3412
|
+
};
|
|
3413
|
+
const compileWithCache = (className) => {
|
|
3414
|
+
if (cache.has(className)) return cache.get(className);
|
|
3415
|
+
const cssRule = compileRuntimeClassNameWithContext(className, context);
|
|
3416
|
+
cache.set(className, cssRule);
|
|
3417
|
+
return cssRule;
|
|
3418
|
+
};
|
|
3419
|
+
const insertRule = (rule2) => {
|
|
3420
|
+
if (!rule2 || insertedRules.has(rule2)) return;
|
|
3421
|
+
if (typeof document !== "object") return;
|
|
3422
|
+
if (!styleElement) styleElement = findOrCreateRuntimeStyle(styleId);
|
|
3423
|
+
if (styleElement) loadExistingRules(styleElement);
|
|
3424
|
+
if (insertedRules.has(rule2)) return;
|
|
3425
|
+
insertedRules.add(rule2);
|
|
3426
|
+
if (!styleElement || !styleElement.sheet) return;
|
|
3427
|
+
try {
|
|
3428
|
+
styleElement.sheet.insertRule(rule2, styleElement.sheet.cssRules.length);
|
|
3429
|
+
} catch {
|
|
3430
|
+
styleElement.appendChild(document.createTextNode(`${rule2}
|
|
3431
|
+
`));
|
|
3432
|
+
}
|
|
3433
|
+
};
|
|
3434
|
+
const processClassName = (className) => {
|
|
3435
|
+
const cssRule = compileWithCache(className);
|
|
3436
|
+
if (!cssRule) {
|
|
3437
|
+
ensureCompatStyle();
|
|
3438
|
+
} else {
|
|
3439
|
+
insertRule(cssRule);
|
|
3440
|
+
}
|
|
3441
|
+
return cssRule;
|
|
3442
|
+
};
|
|
3443
|
+
const processElement = (element) => {
|
|
3444
|
+
if (!element || !element.classList) return;
|
|
3445
|
+
element.classList.forEach((className) => processClassName(className));
|
|
3446
|
+
};
|
|
3447
|
+
const processClassList = (classList) => {
|
|
3448
|
+
if (!classList) return [];
|
|
3449
|
+
const values = typeof classList === "string" ? classList.split(/\s+/) : Array.isArray(classList) ? classList : typeof classList === "object" && typeof classList.forEach === "function" ? Array.from(classList) : [];
|
|
3450
|
+
return values.filter((item) => typeof item === "string" && item.length > 0).map((item) => processClassName(item)).filter(Boolean);
|
|
3451
|
+
};
|
|
3452
|
+
const scan = (root = document) => {
|
|
3453
|
+
if (typeof document !== "object" || !root) return;
|
|
3454
|
+
if (root.nodeType === 1 && root.classList) processElement(root);
|
|
3455
|
+
const elements = root.querySelectorAll ? root.querySelectorAll("[class]") : [];
|
|
3456
|
+
elements.forEach((element) => processElement(element));
|
|
3457
|
+
};
|
|
3458
|
+
const flushQueue = () => {
|
|
3459
|
+
scheduled = false;
|
|
3460
|
+
pendingElements.forEach((element) => processElement(element));
|
|
3461
|
+
pendingElements.clear();
|
|
3462
|
+
};
|
|
3463
|
+
const flush = () => {
|
|
3464
|
+
if (pendingElements.size > 0) flushQueue();
|
|
3465
|
+
};
|
|
3466
|
+
const scheduleFlush = () => {
|
|
3467
|
+
if (scheduled) return;
|
|
3468
|
+
scheduled = true;
|
|
3469
|
+
if (typeof requestAnimationFrame === "function") {
|
|
3470
|
+
requestAnimationFrame(flushQueue);
|
|
3471
|
+
} else {
|
|
3472
|
+
setTimeout(flushQueue, 0);
|
|
3473
|
+
}
|
|
3474
|
+
};
|
|
3475
|
+
const observe = (root = document.documentElement) => {
|
|
3476
|
+
if (typeof MutationObserver !== "function" || !root) return;
|
|
3477
|
+
if (observer) observer.disconnect();
|
|
3478
|
+
observer = new MutationObserver((mutations) => {
|
|
3479
|
+
mutations.forEach((mutation) => {
|
|
3480
|
+
if (mutation.type === "attributes" && mutation.target) {
|
|
3481
|
+
pendingElements.add(mutation.target);
|
|
3482
|
+
}
|
|
3483
|
+
mutation.addedNodes.forEach((node) => {
|
|
3484
|
+
if (node.nodeType === 1) pendingElements.add(node);
|
|
3485
|
+
});
|
|
3486
|
+
});
|
|
3487
|
+
scheduleFlush();
|
|
3488
|
+
});
|
|
3489
|
+
observer.observe(root, {
|
|
3490
|
+
childList: true,
|
|
3491
|
+
subtree: true,
|
|
3492
|
+
attributes: true,
|
|
3493
|
+
attributeFilter: ["class"]
|
|
3494
|
+
});
|
|
3495
|
+
};
|
|
3496
|
+
const disconnect = () => {
|
|
3497
|
+
pendingElements.clear();
|
|
3498
|
+
scheduled = false;
|
|
3499
|
+
if (observer) {
|
|
3500
|
+
observer.disconnect();
|
|
3501
|
+
observer = null;
|
|
3502
|
+
}
|
|
3503
|
+
if (domReadyHandler && typeof document === "object") {
|
|
3504
|
+
document.removeEventListener("DOMContentLoaded", domReadyHandler);
|
|
3505
|
+
domReadyHandler = null;
|
|
3506
|
+
}
|
|
3507
|
+
};
|
|
3508
|
+
const start = () => {
|
|
3509
|
+
if (typeof document !== "object") return;
|
|
3510
|
+
if (preflight2) injectPreflight(styleId);
|
|
3511
|
+
const fireReady = () => {
|
|
3512
|
+
if (typeof options.onReady !== "function") return;
|
|
3513
|
+
if (typeof requestAnimationFrame === "function") {
|
|
3514
|
+
requestAnimationFrame(() => requestAnimationFrame(() => options.onReady()));
|
|
3515
|
+
} else {
|
|
3516
|
+
setTimeout(() => options.onReady(), 16);
|
|
3517
|
+
}
|
|
3518
|
+
};
|
|
3519
|
+
const runStart = () => {
|
|
3520
|
+
scan();
|
|
3521
|
+
observe();
|
|
3522
|
+
fireReady();
|
|
3523
|
+
};
|
|
3524
|
+
if (document.readyState === "loading") {
|
|
3525
|
+
if (!domReadyHandler) {
|
|
3526
|
+
domReadyHandler = () => {
|
|
3527
|
+
domReadyHandler = null;
|
|
3528
|
+
runStart();
|
|
3529
|
+
};
|
|
3530
|
+
document.addEventListener("DOMContentLoaded", domReadyHandler, { once: true });
|
|
3531
|
+
}
|
|
3532
|
+
return;
|
|
3533
|
+
}
|
|
3534
|
+
runStart();
|
|
3535
|
+
};
|
|
3536
|
+
return {
|
|
3537
|
+
processClassName,
|
|
3538
|
+
processClassList,
|
|
3539
|
+
processElement,
|
|
3540
|
+
scan,
|
|
3541
|
+
observe,
|
|
3542
|
+
flush,
|
|
3543
|
+
start,
|
|
3544
|
+
disconnect,
|
|
3545
|
+
isCompatLoaded: () => compatLoaded,
|
|
3546
|
+
getCacheSize: () => cache.size,
|
|
3547
|
+
getInsertedRuleCount: () => insertedRules.size
|
|
3548
|
+
};
|
|
3549
|
+
}
|
|
3550
|
+
function windrunner(options = {}) {
|
|
3551
|
+
const runtime = createWindrunner(options);
|
|
3552
|
+
if (typeof window === "object" && options.autoStart !== false) {
|
|
3553
|
+
runtime.start();
|
|
3554
|
+
}
|
|
3555
|
+
return runtime;
|
|
3556
|
+
}
|
|
3557
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
3558
|
+
0 && (module.exports = {
|
|
3559
|
+
compileClass,
|
|
3560
|
+
createWindrunner,
|
|
3561
|
+
parseClass,
|
|
3562
|
+
windrunner
|
|
3563
|
+
});
|