@acmekit/admin-bundler 2.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.js +1646 -0
- package/package.json +39 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,1646 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
9
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
|
+
};
|
|
11
|
+
var __export = (target, all) => {
|
|
12
|
+
for (var name in all)
|
|
13
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
14
|
+
};
|
|
15
|
+
var __copyProps = (to, from, except, desc) => {
|
|
16
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
17
|
+
for (let key of __getOwnPropNames(from))
|
|
18
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
19
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
20
|
+
}
|
|
21
|
+
return to;
|
|
22
|
+
};
|
|
23
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
24
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
25
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
26
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
27
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
28
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
29
|
+
mod
|
|
30
|
+
));
|
|
31
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
|
+
|
|
33
|
+
// ../../../node_modules/tailwindcss-animate/index.js
|
|
34
|
+
var require_tailwindcss_animate = __commonJS({
|
|
35
|
+
"../../../node_modules/tailwindcss-animate/index.js"(exports2, module2) {
|
|
36
|
+
"use strict";
|
|
37
|
+
var plugin2 = require("tailwindcss/plugin");
|
|
38
|
+
function filterDefault(values) {
|
|
39
|
+
return Object.fromEntries(
|
|
40
|
+
Object.entries(values).filter(([key]) => key !== "DEFAULT")
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
module2.exports = plugin2(
|
|
44
|
+
({ addUtilities, matchUtilities, theme }) => {
|
|
45
|
+
addUtilities({
|
|
46
|
+
"@keyframes enter": theme("keyframes.enter"),
|
|
47
|
+
"@keyframes exit": theme("keyframes.exit"),
|
|
48
|
+
".animate-in": {
|
|
49
|
+
animationName: "enter",
|
|
50
|
+
animationDuration: theme("animationDuration.DEFAULT"),
|
|
51
|
+
"--tw-enter-opacity": "initial",
|
|
52
|
+
"--tw-enter-scale": "initial",
|
|
53
|
+
"--tw-enter-rotate": "initial",
|
|
54
|
+
"--tw-enter-translate-x": "initial",
|
|
55
|
+
"--tw-enter-translate-y": "initial"
|
|
56
|
+
},
|
|
57
|
+
".animate-out": {
|
|
58
|
+
animationName: "exit",
|
|
59
|
+
animationDuration: theme("animationDuration.DEFAULT"),
|
|
60
|
+
"--tw-exit-opacity": "initial",
|
|
61
|
+
"--tw-exit-scale": "initial",
|
|
62
|
+
"--tw-exit-rotate": "initial",
|
|
63
|
+
"--tw-exit-translate-x": "initial",
|
|
64
|
+
"--tw-exit-translate-y": "initial"
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
matchUtilities(
|
|
68
|
+
{
|
|
69
|
+
"fade-in": (value) => ({ "--tw-enter-opacity": value }),
|
|
70
|
+
"fade-out": (value) => ({ "--tw-exit-opacity": value })
|
|
71
|
+
},
|
|
72
|
+
{ values: theme("animationOpacity") }
|
|
73
|
+
);
|
|
74
|
+
matchUtilities(
|
|
75
|
+
{
|
|
76
|
+
"zoom-in": (value) => ({ "--tw-enter-scale": value }),
|
|
77
|
+
"zoom-out": (value) => ({ "--tw-exit-scale": value })
|
|
78
|
+
},
|
|
79
|
+
{ values: theme("animationScale") }
|
|
80
|
+
);
|
|
81
|
+
matchUtilities(
|
|
82
|
+
{
|
|
83
|
+
"spin-in": (value) => ({ "--tw-enter-rotate": value }),
|
|
84
|
+
"spin-out": (value) => ({ "--tw-exit-rotate": value })
|
|
85
|
+
},
|
|
86
|
+
{ values: theme("animationRotate") }
|
|
87
|
+
);
|
|
88
|
+
matchUtilities(
|
|
89
|
+
{
|
|
90
|
+
"slide-in-from-top": (value) => ({
|
|
91
|
+
"--tw-enter-translate-y": `-${value}`
|
|
92
|
+
}),
|
|
93
|
+
"slide-in-from-bottom": (value) => ({
|
|
94
|
+
"--tw-enter-translate-y": value
|
|
95
|
+
}),
|
|
96
|
+
"slide-in-from-left": (value) => ({
|
|
97
|
+
"--tw-enter-translate-x": `-${value}`
|
|
98
|
+
}),
|
|
99
|
+
"slide-in-from-right": (value) => ({
|
|
100
|
+
"--tw-enter-translate-x": value
|
|
101
|
+
}),
|
|
102
|
+
"slide-out-to-top": (value) => ({
|
|
103
|
+
"--tw-exit-translate-y": `-${value}`
|
|
104
|
+
}),
|
|
105
|
+
"slide-out-to-bottom": (value) => ({
|
|
106
|
+
"--tw-exit-translate-y": value
|
|
107
|
+
}),
|
|
108
|
+
"slide-out-to-left": (value) => ({
|
|
109
|
+
"--tw-exit-translate-x": `-${value}`
|
|
110
|
+
}),
|
|
111
|
+
"slide-out-to-right": (value) => ({
|
|
112
|
+
"--tw-exit-translate-x": value
|
|
113
|
+
})
|
|
114
|
+
},
|
|
115
|
+
{ values: theme("animationTranslate") }
|
|
116
|
+
);
|
|
117
|
+
matchUtilities(
|
|
118
|
+
{ duration: (value) => ({ animationDuration: value }) },
|
|
119
|
+
{ values: filterDefault(theme("animationDuration")) }
|
|
120
|
+
);
|
|
121
|
+
matchUtilities(
|
|
122
|
+
{ delay: (value) => ({ animationDelay: value }) },
|
|
123
|
+
{ values: theme("animationDelay") }
|
|
124
|
+
);
|
|
125
|
+
matchUtilities(
|
|
126
|
+
{ ease: (value) => ({ animationTimingFunction: value }) },
|
|
127
|
+
{ values: filterDefault(theme("animationTimingFunction")) }
|
|
128
|
+
);
|
|
129
|
+
addUtilities({
|
|
130
|
+
".running": { animationPlayState: "running" },
|
|
131
|
+
".paused": { animationPlayState: "paused" }
|
|
132
|
+
});
|
|
133
|
+
matchUtilities(
|
|
134
|
+
{ "fill-mode": (value) => ({ animationFillMode: value }) },
|
|
135
|
+
{ values: theme("animationFillMode") }
|
|
136
|
+
);
|
|
137
|
+
matchUtilities(
|
|
138
|
+
{ direction: (value) => ({ animationDirection: value }) },
|
|
139
|
+
{ values: theme("animationDirection") }
|
|
140
|
+
);
|
|
141
|
+
matchUtilities(
|
|
142
|
+
{ repeat: (value) => ({ animationIterationCount: value }) },
|
|
143
|
+
{ values: theme("animationRepeat") }
|
|
144
|
+
);
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
theme: {
|
|
148
|
+
extend: {
|
|
149
|
+
animationDelay: ({ theme }) => ({
|
|
150
|
+
...theme("transitionDelay")
|
|
151
|
+
}),
|
|
152
|
+
animationDuration: ({ theme }) => ({
|
|
153
|
+
0: "0ms",
|
|
154
|
+
...theme("transitionDuration")
|
|
155
|
+
}),
|
|
156
|
+
animationTimingFunction: ({ theme }) => ({
|
|
157
|
+
...theme("transitionTimingFunction")
|
|
158
|
+
}),
|
|
159
|
+
animationFillMode: {
|
|
160
|
+
none: "none",
|
|
161
|
+
forwards: "forwards",
|
|
162
|
+
backwards: "backwards",
|
|
163
|
+
both: "both"
|
|
164
|
+
},
|
|
165
|
+
animationDirection: {
|
|
166
|
+
normal: "normal",
|
|
167
|
+
reverse: "reverse",
|
|
168
|
+
alternate: "alternate",
|
|
169
|
+
"alternate-reverse": "alternate-reverse"
|
|
170
|
+
},
|
|
171
|
+
animationOpacity: ({ theme }) => ({
|
|
172
|
+
DEFAULT: 0,
|
|
173
|
+
...theme("opacity")
|
|
174
|
+
}),
|
|
175
|
+
animationTranslate: ({ theme }) => ({
|
|
176
|
+
DEFAULT: "100%",
|
|
177
|
+
...theme("translate")
|
|
178
|
+
}),
|
|
179
|
+
animationScale: ({ theme }) => ({
|
|
180
|
+
DEFAULT: 0,
|
|
181
|
+
...theme("scale")
|
|
182
|
+
}),
|
|
183
|
+
animationRotate: ({ theme }) => ({
|
|
184
|
+
DEFAULT: "30deg",
|
|
185
|
+
...theme("rotate")
|
|
186
|
+
}),
|
|
187
|
+
animationRepeat: {
|
|
188
|
+
0: "0",
|
|
189
|
+
1: "1",
|
|
190
|
+
infinite: "infinite"
|
|
191
|
+
},
|
|
192
|
+
keyframes: {
|
|
193
|
+
enter: {
|
|
194
|
+
from: {
|
|
195
|
+
opacity: "var(--tw-enter-opacity, 1)",
|
|
196
|
+
transform: "translate3d(var(--tw-enter-translate-x, 0), var(--tw-enter-translate-y, 0), 0) scale3d(var(--tw-enter-scale, 1), var(--tw-enter-scale, 1), var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))"
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
exit: {
|
|
200
|
+
to: {
|
|
201
|
+
opacity: "var(--tw-exit-opacity, 1)",
|
|
202
|
+
transform: "translate3d(var(--tw-exit-translate-x, 0), var(--tw-exit-translate-y, 0), 0) scale3d(var(--tw-exit-scale, 1), var(--tw-exit-scale, 1), var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))"
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
);
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
// ../../design-system/ui-preset/dist/index.js
|
|
214
|
+
var require_dist = __commonJS({
|
|
215
|
+
"../../design-system/ui-preset/dist/index.js"(exports2, module2) {
|
|
216
|
+
"use strict";
|
|
217
|
+
var __create2 = Object.create;
|
|
218
|
+
var __defProp2 = Object.defineProperty;
|
|
219
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
220
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
221
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
|
222
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
223
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
224
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
225
|
+
for (let key of __getOwnPropNames2(from))
|
|
226
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
227
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
228
|
+
}
|
|
229
|
+
return to;
|
|
230
|
+
};
|
|
231
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
232
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
233
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
234
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
235
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
236
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
|
237
|
+
mod
|
|
238
|
+
));
|
|
239
|
+
var import_plugin2 = __toESM2(require("tailwindcss/plugin"));
|
|
240
|
+
var tailwindFontFamily = {
|
|
241
|
+
sans: [
|
|
242
|
+
"ui-sans-serif",
|
|
243
|
+
"system-ui",
|
|
244
|
+
"sans-serif",
|
|
245
|
+
'"Apple Color Emoji"',
|
|
246
|
+
'"Segoe UI Emoji"',
|
|
247
|
+
'"Segoe UI Symbol"',
|
|
248
|
+
'"Noto Color Emoji"'
|
|
249
|
+
],
|
|
250
|
+
serif: [
|
|
251
|
+
"ui-serif",
|
|
252
|
+
"Georgia",
|
|
253
|
+
"Cambria",
|
|
254
|
+
'"Times New Roman"',
|
|
255
|
+
"Times",
|
|
256
|
+
"serif"
|
|
257
|
+
],
|
|
258
|
+
mono: [
|
|
259
|
+
"ui-monospace",
|
|
260
|
+
"SFMono-Regular",
|
|
261
|
+
"Menlo",
|
|
262
|
+
"Monaco",
|
|
263
|
+
"Consolas",
|
|
264
|
+
'"Liberation Mono"',
|
|
265
|
+
'"Courier New"',
|
|
266
|
+
"monospace"
|
|
267
|
+
]
|
|
268
|
+
};
|
|
269
|
+
var FONT_FAMILY_SANS = ["Inter", ...tailwindFontFamily.sans];
|
|
270
|
+
var FONT_FAMILY_MONO = ["Roboto Mono", ...tailwindFontFamily.mono];
|
|
271
|
+
var theme = {
|
|
272
|
+
"extend": {
|
|
273
|
+
"colors": {
|
|
274
|
+
"ui": {
|
|
275
|
+
"tag": {
|
|
276
|
+
"neutral": {
|
|
277
|
+
"border": {
|
|
278
|
+
"DEFAULT": "var(--tag-neutral-border)"
|
|
279
|
+
},
|
|
280
|
+
"icon": {
|
|
281
|
+
"DEFAULT": "var(--tag-neutral-icon)"
|
|
282
|
+
},
|
|
283
|
+
"text": {
|
|
284
|
+
"DEFAULT": "var(--tag-neutral-text)"
|
|
285
|
+
},
|
|
286
|
+
"bg": {
|
|
287
|
+
"hover": {
|
|
288
|
+
"DEFAULT": "var(--tag-neutral-bg-hover)"
|
|
289
|
+
},
|
|
290
|
+
"DEFAULT": "var(--tag-neutral-bg)"
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
"red": {
|
|
294
|
+
"text": {
|
|
295
|
+
"DEFAULT": "var(--tag-red-text)"
|
|
296
|
+
},
|
|
297
|
+
"bg": {
|
|
298
|
+
"DEFAULT": "var(--tag-red-bg)",
|
|
299
|
+
"hover": {
|
|
300
|
+
"DEFAULT": "var(--tag-red-bg-hover)"
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
"border": {
|
|
304
|
+
"DEFAULT": "var(--tag-red-border)"
|
|
305
|
+
},
|
|
306
|
+
"icon": {
|
|
307
|
+
"DEFAULT": "var(--tag-red-icon)"
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
"blue": {
|
|
311
|
+
"text": {
|
|
312
|
+
"DEFAULT": "var(--tag-blue-text)"
|
|
313
|
+
},
|
|
314
|
+
"border": {
|
|
315
|
+
"DEFAULT": "var(--tag-blue-border)"
|
|
316
|
+
},
|
|
317
|
+
"bg": {
|
|
318
|
+
"DEFAULT": "var(--tag-blue-bg)",
|
|
319
|
+
"hover": {
|
|
320
|
+
"DEFAULT": "var(--tag-blue-bg-hover)"
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
"icon": {
|
|
324
|
+
"DEFAULT": "var(--tag-blue-icon)"
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
"orange": {
|
|
328
|
+
"text": {
|
|
329
|
+
"DEFAULT": "var(--tag-orange-text)"
|
|
330
|
+
},
|
|
331
|
+
"border": {
|
|
332
|
+
"DEFAULT": "var(--tag-orange-border)"
|
|
333
|
+
},
|
|
334
|
+
"icon": {
|
|
335
|
+
"DEFAULT": "var(--tag-orange-icon)"
|
|
336
|
+
},
|
|
337
|
+
"bg": {
|
|
338
|
+
"hover": {
|
|
339
|
+
"DEFAULT": "var(--tag-orange-bg-hover)"
|
|
340
|
+
},
|
|
341
|
+
"DEFAULT": "var(--tag-orange-bg)"
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
"green": {
|
|
345
|
+
"icon": {
|
|
346
|
+
"DEFAULT": "var(--tag-green-icon)"
|
|
347
|
+
},
|
|
348
|
+
"border": {
|
|
349
|
+
"DEFAULT": "var(--tag-green-border)"
|
|
350
|
+
},
|
|
351
|
+
"text": {
|
|
352
|
+
"DEFAULT": "var(--tag-green-text)"
|
|
353
|
+
},
|
|
354
|
+
"bg": {
|
|
355
|
+
"hover": {
|
|
356
|
+
"DEFAULT": "var(--tag-green-bg-hover)"
|
|
357
|
+
},
|
|
358
|
+
"DEFAULT": "var(--tag-green-bg)"
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
"purple": {
|
|
362
|
+
"bg": {
|
|
363
|
+
"DEFAULT": "var(--tag-purple-bg)",
|
|
364
|
+
"hover": {
|
|
365
|
+
"DEFAULT": "var(--tag-purple-bg-hover)"
|
|
366
|
+
}
|
|
367
|
+
},
|
|
368
|
+
"text": {
|
|
369
|
+
"DEFAULT": "var(--tag-purple-text)"
|
|
370
|
+
},
|
|
371
|
+
"icon": {
|
|
372
|
+
"DEFAULT": "var(--tag-purple-icon)"
|
|
373
|
+
},
|
|
374
|
+
"border": {
|
|
375
|
+
"DEFAULT": "var(--tag-purple-border)"
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
"bg": {
|
|
380
|
+
"switch": {
|
|
381
|
+
"off": {
|
|
382
|
+
"hover": {
|
|
383
|
+
"DEFAULT": "var(--bg-switch-off-hover)"
|
|
384
|
+
},
|
|
385
|
+
"DEFAULT": "var(--bg-switch-off)"
|
|
386
|
+
}
|
|
387
|
+
},
|
|
388
|
+
"subtle": {
|
|
389
|
+
"hover": {
|
|
390
|
+
"DEFAULT": "var(--bg-subtle-hover)"
|
|
391
|
+
},
|
|
392
|
+
"DEFAULT": "var(--bg-subtle)",
|
|
393
|
+
"pressed": {
|
|
394
|
+
"DEFAULT": "var(--bg-subtle-pressed)"
|
|
395
|
+
}
|
|
396
|
+
},
|
|
397
|
+
"field": {
|
|
398
|
+
"component": {
|
|
399
|
+
"hover": {
|
|
400
|
+
"DEFAULT": "var(--bg-field-component-hover)"
|
|
401
|
+
},
|
|
402
|
+
"DEFAULT": "var(--bg-field-component)"
|
|
403
|
+
},
|
|
404
|
+
"DEFAULT": "var(--bg-field)",
|
|
405
|
+
"hover": {
|
|
406
|
+
"DEFAULT": "var(--bg-field-hover)"
|
|
407
|
+
}
|
|
408
|
+
},
|
|
409
|
+
"base": {
|
|
410
|
+
"pressed": {
|
|
411
|
+
"DEFAULT": "var(--bg-base-pressed)"
|
|
412
|
+
},
|
|
413
|
+
"hover": {
|
|
414
|
+
"DEFAULT": "var(--bg-base-hover)"
|
|
415
|
+
},
|
|
416
|
+
"DEFAULT": "var(--bg-base)"
|
|
417
|
+
},
|
|
418
|
+
"highlight": {
|
|
419
|
+
"DEFAULT": "var(--bg-highlight)",
|
|
420
|
+
"hover": {
|
|
421
|
+
"DEFAULT": "var(--bg-highlight-hover)"
|
|
422
|
+
}
|
|
423
|
+
},
|
|
424
|
+
"component": {
|
|
425
|
+
"pressed": {
|
|
426
|
+
"DEFAULT": "var(--bg-component-pressed)"
|
|
427
|
+
},
|
|
428
|
+
"DEFAULT": "var(--bg-component)",
|
|
429
|
+
"hover": {
|
|
430
|
+
"DEFAULT": "var(--bg-component-hover)"
|
|
431
|
+
}
|
|
432
|
+
},
|
|
433
|
+
"interactive": {
|
|
434
|
+
"DEFAULT": "var(--bg-interactive)"
|
|
435
|
+
},
|
|
436
|
+
"disabled": {
|
|
437
|
+
"DEFAULT": "var(--bg-disabled)"
|
|
438
|
+
},
|
|
439
|
+
"overlay": {
|
|
440
|
+
"DEFAULT": "var(--bg-overlay)"
|
|
441
|
+
}
|
|
442
|
+
},
|
|
443
|
+
"border": {
|
|
444
|
+
"menu": {
|
|
445
|
+
"bot": {
|
|
446
|
+
"DEFAULT": "var(--border-menu-bot)"
|
|
447
|
+
},
|
|
448
|
+
"top": {
|
|
449
|
+
"DEFAULT": "var(--border-menu-top)"
|
|
450
|
+
}
|
|
451
|
+
},
|
|
452
|
+
"strong": {
|
|
453
|
+
"DEFAULT": "var(--border-strong)"
|
|
454
|
+
},
|
|
455
|
+
"interactive": {
|
|
456
|
+
"DEFAULT": "var(--border-interactive)"
|
|
457
|
+
},
|
|
458
|
+
"base": {
|
|
459
|
+
"DEFAULT": "var(--border-base)"
|
|
460
|
+
},
|
|
461
|
+
"danger": {
|
|
462
|
+
"DEFAULT": "var(--border-danger)"
|
|
463
|
+
},
|
|
464
|
+
"error": {
|
|
465
|
+
"DEFAULT": "var(--border-error)"
|
|
466
|
+
},
|
|
467
|
+
"transparent": {
|
|
468
|
+
"DEFAULT": "var(--border-transparent)"
|
|
469
|
+
}
|
|
470
|
+
},
|
|
471
|
+
"contrast": {
|
|
472
|
+
"fg": {
|
|
473
|
+
"primary": {
|
|
474
|
+
"DEFAULT": "var(--contrast-fg-primary)"
|
|
475
|
+
},
|
|
476
|
+
"secondary": {
|
|
477
|
+
"DEFAULT": "var(--contrast-fg-secondary)"
|
|
478
|
+
}
|
|
479
|
+
},
|
|
480
|
+
"bg": {
|
|
481
|
+
"base": {
|
|
482
|
+
"pressed": {
|
|
483
|
+
"DEFAULT": "var(--contrast-bg-base-pressed)"
|
|
484
|
+
},
|
|
485
|
+
"DEFAULT": "var(--contrast-bg-base)",
|
|
486
|
+
"hover": {
|
|
487
|
+
"DEFAULT": "var(--contrast-bg-base-hover)"
|
|
488
|
+
}
|
|
489
|
+
},
|
|
490
|
+
"subtle": {
|
|
491
|
+
"DEFAULT": "var(--contrast-bg-subtle)"
|
|
492
|
+
}
|
|
493
|
+
},
|
|
494
|
+
"border": {
|
|
495
|
+
"base": {
|
|
496
|
+
"DEFAULT": "var(--contrast-border-base)"
|
|
497
|
+
},
|
|
498
|
+
"bot": {
|
|
499
|
+
"DEFAULT": "var(--contrast-border-bot)"
|
|
500
|
+
},
|
|
501
|
+
"top": {
|
|
502
|
+
"DEFAULT": "var(--contrast-border-top)"
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
},
|
|
506
|
+
"button": {
|
|
507
|
+
"inverted": {
|
|
508
|
+
"pressed": {
|
|
509
|
+
"DEFAULT": "var(--button-inverted-pressed)"
|
|
510
|
+
},
|
|
511
|
+
"hover": {
|
|
512
|
+
"DEFAULT": "var(--button-inverted-hover)"
|
|
513
|
+
},
|
|
514
|
+
"DEFAULT": "var(--button-inverted)"
|
|
515
|
+
},
|
|
516
|
+
"transparent": {
|
|
517
|
+
"DEFAULT": "var(--button-transparent)",
|
|
518
|
+
"hover": {
|
|
519
|
+
"DEFAULT": "var(--button-transparent-hover)"
|
|
520
|
+
},
|
|
521
|
+
"pressed": {
|
|
522
|
+
"DEFAULT": "var(--button-transparent-pressed)"
|
|
523
|
+
}
|
|
524
|
+
},
|
|
525
|
+
"danger": {
|
|
526
|
+
"pressed": {
|
|
527
|
+
"DEFAULT": "var(--button-danger-pressed)"
|
|
528
|
+
},
|
|
529
|
+
"DEFAULT": "var(--button-danger)",
|
|
530
|
+
"hover": {
|
|
531
|
+
"DEFAULT": "var(--button-danger-hover)"
|
|
532
|
+
}
|
|
533
|
+
},
|
|
534
|
+
"neutral": {
|
|
535
|
+
"DEFAULT": "var(--button-neutral)",
|
|
536
|
+
"hover": {
|
|
537
|
+
"DEFAULT": "var(--button-neutral-hover)"
|
|
538
|
+
},
|
|
539
|
+
"pressed": {
|
|
540
|
+
"DEFAULT": "var(--button-neutral-pressed)"
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
},
|
|
544
|
+
"fg": {
|
|
545
|
+
"on": {
|
|
546
|
+
"color": {
|
|
547
|
+
"DEFAULT": "var(--fg-on-color)"
|
|
548
|
+
},
|
|
549
|
+
"inverted": {
|
|
550
|
+
"DEFAULT": "var(--fg-on-inverted)"
|
|
551
|
+
}
|
|
552
|
+
},
|
|
553
|
+
"interactive": {
|
|
554
|
+
"hover": {
|
|
555
|
+
"DEFAULT": "var(--fg-interactive-hover)"
|
|
556
|
+
},
|
|
557
|
+
"DEFAULT": "var(--fg-interactive)"
|
|
558
|
+
},
|
|
559
|
+
"error": {
|
|
560
|
+
"DEFAULT": "var(--fg-error)"
|
|
561
|
+
},
|
|
562
|
+
"subtle": {
|
|
563
|
+
"DEFAULT": "var(--fg-subtle)"
|
|
564
|
+
},
|
|
565
|
+
"base": {
|
|
566
|
+
"DEFAULT": "var(--fg-base)"
|
|
567
|
+
},
|
|
568
|
+
"disabled": {
|
|
569
|
+
"DEFAULT": "var(--fg-disabled)"
|
|
570
|
+
},
|
|
571
|
+
"muted": {
|
|
572
|
+
"DEFAULT": "var(--fg-muted)"
|
|
573
|
+
}
|
|
574
|
+
},
|
|
575
|
+
"alpha": {
|
|
576
|
+
"250": {
|
|
577
|
+
"DEFAULT": "var(--alpha-250)"
|
|
578
|
+
},
|
|
579
|
+
"400": {
|
|
580
|
+
"DEFAULT": "var(--alpha-400)"
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
},
|
|
585
|
+
"boxShadow": {
|
|
586
|
+
"buttons-danger-focus": "var(--buttons-danger-focus)",
|
|
587
|
+
"details-contrast-on-bg-interactive": "var(--details-contrast-on-bg-interactive)",
|
|
588
|
+
"borders-error": "var(--borders-error)",
|
|
589
|
+
"borders-focus": "var(--borders-focus)",
|
|
590
|
+
"buttons-danger": "var(--buttons-danger)",
|
|
591
|
+
"buttons-inverted-focus": "var(--buttons-inverted-focus)",
|
|
592
|
+
"elevation-card-hover": "var(--elevation-card-hover)",
|
|
593
|
+
"details-switch-handle": "var(--details-switch-handle)",
|
|
594
|
+
"buttons-neutral": "var(--buttons-neutral)",
|
|
595
|
+
"borders-base": "var(--borders-base)",
|
|
596
|
+
"elevation-card-rest": "var(--elevation-card-rest)",
|
|
597
|
+
"buttons-neutral-focus": "var(--buttons-neutral-focus)",
|
|
598
|
+
"details-switch-background-focus": "var(--details-switch-background-focus)",
|
|
599
|
+
"details-switch-background": "var(--details-switch-background)",
|
|
600
|
+
"elevation-flyout": "var(--elevation-flyout)",
|
|
601
|
+
"elevation-tooltip": "var(--elevation-tooltip)",
|
|
602
|
+
"elevation-modal": "var(--elevation-modal)",
|
|
603
|
+
"elevation-code-block": "var(--elevation-code-block)",
|
|
604
|
+
"buttons-inverted": "var(--buttons-inverted)",
|
|
605
|
+
"elevation-commandbar": "var(--elevation-commandbar)",
|
|
606
|
+
"borders-interactive-with-focus": "var(--borders-interactive-with-focus)",
|
|
607
|
+
"borders-interactive-with-shadow": "var(--borders-interactive-with-shadow)",
|
|
608
|
+
"borders-interactive-with-active": "var(--borders-interactive-with-active)"
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
};
|
|
612
|
+
var colors = {
|
|
613
|
+
"dark": {
|
|
614
|
+
"--button-danger-pressed": "rgba(225, 29, 72, 1)",
|
|
615
|
+
"--bg-base-pressed": "rgba(63, 63, 70, 1)",
|
|
616
|
+
"--bg-component-hover": "rgba(255, 255, 255, 0.1)",
|
|
617
|
+
"--border-interactive": "rgba(96, 165, 250, 1)",
|
|
618
|
+
"--button-neutral": "rgba(255, 255, 255, 0.04)",
|
|
619
|
+
"--tag-orange-border": "rgba(124, 45, 18, 1)",
|
|
620
|
+
"--tag-blue-text": "rgba(147, 197, 253, 1)",
|
|
621
|
+
"--bg-highlight": "rgba(23, 37, 84, 1)",
|
|
622
|
+
"--tag-neutral-icon": "rgba(113, 113, 122, 1)",
|
|
623
|
+
"--bg-switch-off-hover": "rgba(82, 82, 91, 1)",
|
|
624
|
+
"--fg-on-color": "rgba(255, 255, 255, 1)",
|
|
625
|
+
"--button-inverted-pressed": "rgba(161, 161, 170, 1)",
|
|
626
|
+
"--fg-interactive-hover": "rgba(147, 197, 253, 1)",
|
|
627
|
+
"--fg-error": "rgba(251, 113, 133, 1)",
|
|
628
|
+
"--bg-switch-off": "rgba(63, 63, 70, 1)",
|
|
629
|
+
"--border-strong": "rgba(255, 255, 255, 0.16)",
|
|
630
|
+
"--border-error": "rgba(251, 113, 133, 1)",
|
|
631
|
+
"--fg-subtle": "rgba(161, 161, 170, 1)",
|
|
632
|
+
"--bg-highlight-hover": "rgba(30, 58, 138, 1)",
|
|
633
|
+
"--button-inverted": "rgba(82, 82, 91, 1)",
|
|
634
|
+
"--tag-orange-text": "rgba(253, 186, 116, 1)",
|
|
635
|
+
"--fg-base": "rgba(244, 244, 245, 1)",
|
|
636
|
+
"--fg-disabled": "rgba(82, 82, 91, 1)",
|
|
637
|
+
"--button-danger": "rgba(159, 18, 57, 1)",
|
|
638
|
+
"--tag-neutral-border": "rgba(255, 255, 255, 0.06)",
|
|
639
|
+
"--tag-blue-border": "rgba(30, 58, 138, 1)",
|
|
640
|
+
"--tag-neutral-text": "rgba(212, 212, 216, 1)",
|
|
641
|
+
"--tag-purple-border": "rgba(91, 33, 182, 1)",
|
|
642
|
+
"--tag-green-text": "rgba(52, 211, 153, 1)",
|
|
643
|
+
"--button-inverted-hover": "rgba(113, 113, 122, 1)",
|
|
644
|
+
"--bg-component-pressed": "rgba(255, 255, 255, 0.16)",
|
|
645
|
+
"--contrast-border-bot": "rgba(255, 255, 255, 0.08)",
|
|
646
|
+
"--tag-blue-icon": "rgba(96, 165, 250, 1)",
|
|
647
|
+
"--bg-field": "rgba(255, 255, 255, 0.04)",
|
|
648
|
+
"--tag-neutral-bg": "rgba(255, 255, 255, 0.08)",
|
|
649
|
+
"--tag-green-border": "rgba(6, 78, 59, 1)",
|
|
650
|
+
"--tag-red-icon": "rgba(251, 113, 133, 1)",
|
|
651
|
+
"--tag-red-text": "rgba(253, 164, 175, 1)",
|
|
652
|
+
"--tag-purple-icon": "rgba(167, 139, 250, 1)",
|
|
653
|
+
"--bg-interactive": "rgba(96, 165, 250, 1)",
|
|
654
|
+
"--bg-field-hover": "rgba(255, 255, 255, 0.08)",
|
|
655
|
+
"--border-transparent": "rgba(255, 255, 255, 0)",
|
|
656
|
+
"--tag-orange-icon": "rgba(251, 146, 60, 1)",
|
|
657
|
+
"--tag-purple-bg": "rgba(46, 16, 101, 1)",
|
|
658
|
+
"--bg-base-hover": "rgba(39, 39, 42, 1)",
|
|
659
|
+
"--tag-blue-bg": "rgba(23, 37, 84, 1)",
|
|
660
|
+
"--tag-green-bg": "rgba(2, 44, 34, 1)",
|
|
661
|
+
"--tag-purple-text": "rgba(196, 181, 253, 1)",
|
|
662
|
+
"--tag-red-border": "rgba(136, 19, 55, 1)",
|
|
663
|
+
"--border-danger": "rgba(190, 18, 60, 1)",
|
|
664
|
+
"--tag-green-icon": "rgba(16, 185, 129, 1)",
|
|
665
|
+
"--tag-red-bg": "rgba(76, 5, 25, 1)",
|
|
666
|
+
"--fg-interactive": "rgba(96, 165, 250, 1)",
|
|
667
|
+
"--tag-orange-bg": "rgba(67, 20, 7, 1)",
|
|
668
|
+
"--button-danger-hover": "rgba(190, 18, 60, 1)",
|
|
669
|
+
"--bg-component": "rgba(39, 39, 42, 1)",
|
|
670
|
+
"--bg-disabled": "rgba(39, 39, 42, 1)",
|
|
671
|
+
"--button-transparent": "rgba(255, 255, 255, 0)",
|
|
672
|
+
"--border-menu-bot": "rgba(255, 255, 255, 0.08)",
|
|
673
|
+
"--tag-purple-bg-hover": "rgba(91, 33, 182, 1)",
|
|
674
|
+
"--tag-orange-bg-hover": "rgba(124, 45, 18, 1)",
|
|
675
|
+
"--tag-blue-bg-hover": "rgba(30, 58, 138, 1)",
|
|
676
|
+
"--tag-red-bg-hover": "rgba(136, 19, 55, 1)",
|
|
677
|
+
"--tag-green-bg-hover": "rgba(6, 78, 59, 1)",
|
|
678
|
+
"--border-menu-top": "rgba(33, 33, 36, 1)",
|
|
679
|
+
"--bg-base": "rgba(33, 33, 36, 1)",
|
|
680
|
+
"--contrast-border-top": "rgba(33, 33, 36, 1)",
|
|
681
|
+
"--bg-field-component": "rgba(33, 33, 36, 1)",
|
|
682
|
+
"--bg-subtle-hover": "rgba(33, 33, 36, 1)",
|
|
683
|
+
"--bg-subtle": "rgba(24, 24, 27, 1)",
|
|
684
|
+
"--fg-on-inverted": "rgba(24, 24, 27, 1)",
|
|
685
|
+
"--bg-overlay": "rgba(24, 24, 27, 0.72)",
|
|
686
|
+
"--button-transparent-hover": "rgba(255, 255, 255, 0.08)",
|
|
687
|
+
"--contrast-fg-secondary": "rgba(255, 255, 255, 0.56)",
|
|
688
|
+
"--contrast-border-base": "rgba(255, 255, 255, 0.16)",
|
|
689
|
+
"--contrast-bg-base-pressed": "rgba(82, 82, 91, 1)",
|
|
690
|
+
"--button-neutral-pressed": "rgba(255, 255, 255, 0.12)",
|
|
691
|
+
"--border-base": "rgba(255, 255, 255, 0.08)",
|
|
692
|
+
"--contrast-fg-primary": "rgba(255, 255, 255, 0.88)",
|
|
693
|
+
"--button-neutral-hover": "rgba(255, 255, 255, 0.08)",
|
|
694
|
+
"--contrast-bg-base": "rgba(39, 39, 42, 1)",
|
|
695
|
+
"--tag-neutral-bg-hover": "rgba(255, 255, 255, 0.12)",
|
|
696
|
+
"--contrast-bg-subtle": "rgba(255, 255, 255, 0.04)",
|
|
697
|
+
"--contrast-bg-base-hover": "rgba(63, 63, 70, 1)",
|
|
698
|
+
"--bg-field-component-hover": "rgba(39, 39, 42, 1)",
|
|
699
|
+
"--bg-subtle-pressed": "rgba(39, 39, 42, 1)",
|
|
700
|
+
"--button-transparent-pressed": "rgba(255, 255, 255, 0.12)",
|
|
701
|
+
"--fg-muted": "rgba(113, 113, 122, 1)",
|
|
702
|
+
"--alpha-400": "rgba(255, 255, 255, 0.24)",
|
|
703
|
+
"--alpha-250": "rgba(255, 255, 255, 0.1)"
|
|
704
|
+
},
|
|
705
|
+
"light": {
|
|
706
|
+
"--tag-neutral-border": "rgba(228, 228, 231, 1)",
|
|
707
|
+
"--tag-neutral-icon": "rgba(161, 161, 170, 1)",
|
|
708
|
+
"--bg-switch-off-hover": "rgba(212, 212, 216, 1)",
|
|
709
|
+
"--border-menu-bot": "rgba(255, 255, 255, 1)",
|
|
710
|
+
"--border-menu-top": "rgba(228, 228, 231, 1)",
|
|
711
|
+
"--bg-subtle-hover": "rgba(244, 244, 245, 1)",
|
|
712
|
+
"--contrast-fg-primary": "rgba(255, 255, 255, 0.88)",
|
|
713
|
+
"--bg-switch-off": "rgba(228, 228, 231, 1)",
|
|
714
|
+
"--contrast-bg-base-pressed": "rgba(63, 63, 70, 1)",
|
|
715
|
+
"--bg-field-component-hover": "rgba(250, 250, 250, 1)",
|
|
716
|
+
"--bg-base-pressed": "rgba(228, 228, 231, 1)",
|
|
717
|
+
"--tag-neutral-text": "rgba(82, 82, 91, 1)",
|
|
718
|
+
"--tag-red-text": "rgba(159, 18, 57, 1)",
|
|
719
|
+
"--contrast-bg-base": "rgba(24, 24, 27, 1)",
|
|
720
|
+
"--border-strong": "rgba(212, 212, 216, 1)",
|
|
721
|
+
"--contrast-border-base": "rgba(255, 255, 255, 0.15)",
|
|
722
|
+
"--bg-field": "rgba(250, 250, 250, 1)",
|
|
723
|
+
"--tag-blue-text": "rgba(30, 64, 175, 1)",
|
|
724
|
+
"--button-inverted-pressed": "rgba(82, 82, 91, 1)",
|
|
725
|
+
"--border-interactive": "rgba(59, 130, 246, 1)",
|
|
726
|
+
"--bg-base-hover": "rgba(244, 244, 245, 1)",
|
|
727
|
+
"--contrast-bg-subtle": "rgba(39, 39, 42, 1)",
|
|
728
|
+
"--bg-highlight": "rgba(239, 246, 255, 1)",
|
|
729
|
+
"--contrast-fg-secondary": "rgba(255, 255, 255, 0.56)",
|
|
730
|
+
"--tag-red-bg": "rgba(255, 228, 230, 1)",
|
|
731
|
+
"--button-transparent": "rgba(255, 255, 255, 0)",
|
|
732
|
+
"--button-danger-pressed": "rgba(159, 18, 57, 1)",
|
|
733
|
+
"--fg-on-color": "rgba(255, 255, 255, 1)",
|
|
734
|
+
"--button-inverted-hover": "rgba(63, 63, 70, 1)",
|
|
735
|
+
"--bg-field-component": "rgba(255, 255, 255, 1)",
|
|
736
|
+
"--tag-orange-text": "rgba(154, 52, 18, 1)",
|
|
737
|
+
"--tag-green-icon": "rgba(16, 185, 129, 1)",
|
|
738
|
+
"--border-base": "rgba(228, 228, 231, 1)",
|
|
739
|
+
"--bg-base": "rgba(255, 255, 255, 1)",
|
|
740
|
+
"--tag-orange-border": "rgba(254, 215, 170, 1)",
|
|
741
|
+
"--tag-red-border": "rgba(254, 205, 211, 1)",
|
|
742
|
+
"--tag-green-border": "rgba(167, 243, 208, 1)",
|
|
743
|
+
"--tag-green-text": "rgba(6, 95, 70, 1)",
|
|
744
|
+
"--button-neutral": "rgba(255, 255, 255, 1)",
|
|
745
|
+
"--tag-blue-border": "rgba(191, 219, 254, 1)",
|
|
746
|
+
"--fg-interactive-hover": "rgba(37, 99, 235, 1)",
|
|
747
|
+
"--tag-orange-icon": "rgba(249, 115, 22, 1)",
|
|
748
|
+
"--button-neutral-hover": "rgba(244, 244, 245, 1)",
|
|
749
|
+
"--fg-interactive": "rgba(59, 130, 246, 1)",
|
|
750
|
+
"--bg-component-pressed": "rgba(228, 228, 231, 1)",
|
|
751
|
+
"--tag-purple-bg": "rgba(237, 233, 254, 1)",
|
|
752
|
+
"--contrast-bg-base-hover": "rgba(39, 39, 42, 1)",
|
|
753
|
+
"--bg-component": "rgba(250, 250, 250, 1)",
|
|
754
|
+
"--bg-subtle": "rgba(250, 250, 250, 1)",
|
|
755
|
+
"--tag-purple-text": "rgba(91, 33, 182, 1)",
|
|
756
|
+
"--contrast-border-bot": "rgba(255, 255, 255, 0.1)",
|
|
757
|
+
"--button-inverted": "rgba(39, 39, 42, 1)",
|
|
758
|
+
"--tag-red-icon": "rgba(244, 63, 94, 1)",
|
|
759
|
+
"--button-transparent-hover": "rgba(244, 244, 245, 1)",
|
|
760
|
+
"--button-neutral-pressed": "rgba(228, 228, 231, 1)",
|
|
761
|
+
"--tag-purple-icon": "rgba(167, 139, 250, 1)",
|
|
762
|
+
"--bg-field-hover": "rgba(244, 244, 245, 1)",
|
|
763
|
+
"--fg-on-inverted": "rgba(255, 255, 255, 1)",
|
|
764
|
+
"--bg-interactive": "rgba(59, 130, 246, 1)",
|
|
765
|
+
"--border-danger": "rgba(190, 18, 60, 1)",
|
|
766
|
+
"--button-transparent-pressed": "rgba(228, 228, 231, 1)",
|
|
767
|
+
"--tag-purple-border": "rgba(221, 214, 254, 1)",
|
|
768
|
+
"--bg-highlight-hover": "rgba(219, 234, 254, 1)",
|
|
769
|
+
"--border-error": "rgba(225, 29, 72, 1)",
|
|
770
|
+
"--button-danger": "rgba(225, 29, 72, 1)",
|
|
771
|
+
"--tag-blue-bg": "rgba(219, 234, 254, 1)",
|
|
772
|
+
"--border-transparent": "rgba(255, 255, 255, 0)",
|
|
773
|
+
"--button-danger-hover": "rgba(190, 18, 60, 1)",
|
|
774
|
+
"--bg-subtle-pressed": "rgba(228, 228, 231, 1)",
|
|
775
|
+
"--fg-error": "rgba(225, 29, 72, 1)",
|
|
776
|
+
"--bg-component-hover": "rgba(244, 244, 245, 1)",
|
|
777
|
+
"--bg-disabled": "rgba(244, 244, 245, 1)",
|
|
778
|
+
"--tag-blue-icon": "rgba(96, 165, 250, 1)",
|
|
779
|
+
"--fg-subtle": "rgba(82, 82, 91, 1)",
|
|
780
|
+
"--tag-orange-bg-hover": "rgba(254, 215, 170, 1)",
|
|
781
|
+
"--tag-green-bg-hover": "rgba(167, 243, 208, 1)",
|
|
782
|
+
"--tag-red-bg-hover": "rgba(254, 205, 211, 1)",
|
|
783
|
+
"--tag-purple-bg-hover": "rgba(221, 214, 254, 1)",
|
|
784
|
+
"--tag-neutral-bg-hover": "rgba(228, 228, 231, 1)",
|
|
785
|
+
"--tag-blue-bg-hover": "rgba(191, 219, 254, 1)",
|
|
786
|
+
"--tag-green-bg": "rgba(209, 250, 229, 1)",
|
|
787
|
+
"--tag-neutral-bg": "rgba(244, 244, 245, 1)",
|
|
788
|
+
"--tag-orange-bg": "rgba(255, 237, 213, 1)",
|
|
789
|
+
"--fg-base": "rgba(24, 24, 27, 1)",
|
|
790
|
+
"--contrast-border-top": "rgba(24, 24, 27, 1)",
|
|
791
|
+
"--bg-overlay": "rgba(24, 24, 27, 0.4)",
|
|
792
|
+
"--fg-disabled": "rgba(161, 161, 170, 1)",
|
|
793
|
+
"--fg-muted": "rgba(113, 113, 122, 1)",
|
|
794
|
+
"--alpha-250": "rgba(24, 24, 27, 0.1)",
|
|
795
|
+
"--alpha-400": "rgba(24, 24, 27, 0.24)"
|
|
796
|
+
}
|
|
797
|
+
};
|
|
798
|
+
var components = {
|
|
799
|
+
"dark": {},
|
|
800
|
+
"light": {}
|
|
801
|
+
};
|
|
802
|
+
var effects = {
|
|
803
|
+
"dark": {
|
|
804
|
+
"--details-contrast-on-bg-interactive": "0px 1px 2px 0px rgba(30, 58, 138, 0.6)",
|
|
805
|
+
"--details-switch-handle": "0px 0px 2px 1px rgba(255, 255, 255, 1) inset, 0px 1px 0px 0px rgba(255, 255, 255, 1) inset, 0px 0px 0px 0.5px rgba(0, 0, 0, 0.16), 0px 5px 4px 0px rgba(0, 0, 0, 0.1), 0px 3px 3px 0px rgba(0, 0, 0, 0.1), 0px 1px 2px 0px rgba(0, 0, 0, 0.1), 0px 0px 1px 0px rgba(0, 0, 0, 0.1)",
|
|
806
|
+
"--borders-interactive-with-active": "0px 0px 0px 1px rgba(96, 165, 250, 1), 0px 0px 0px 4px rgba(59, 130, 246, 0.25)",
|
|
807
|
+
"--borders-focus": "0px 0px 0px 1px rgba(24, 24, 27, 1), 0px 0px 0px 3px rgba(96, 165, 250, 0.8)",
|
|
808
|
+
"--details-switch-background-focus": "0px 0px 0px 1px rgba(24, 24, 27, 1), 0px 0px 0px 3px rgba(96, 165, 250, 0.8), 0px 1px 1px 0px rgba(0, 0, 0, 0.1) inset, 0px 2px 4px 0px rgba(0, 0, 0, 0.1) inset, 0px 0px 0px 0.75px rgba(255, 255, 255, 0.12) inset, 0px 0px 8px 0px rgba(0, 0, 0, 0.1) inset",
|
|
809
|
+
"--buttons-danger": "0px -1px 0px 0px rgba(255, 255, 255, 0.16), 0px 0px 0px 1px rgba(255, 255, 255, 0.12), 0px 0px 0px 1px rgba(159, 18, 57, 1), 0px 0px 1px 1.5px rgba(0, 0, 0, 0.24), 0px 2px 2px 0px rgba(0, 0, 0, 0.24)",
|
|
810
|
+
"--buttons-danger-focus": "0px -1px 0px 0px rgba(255, 255, 255, 0.16), 0px 0px 0px 1px rgba(255, 255, 255, 0.12), 0px 0px 0px 1px rgba(159, 18, 57, 1), 0px 0px 0px 2px rgba(24, 24, 27, 1), 0px 0px 0px 4px rgba(96, 165, 250, 0.8)",
|
|
811
|
+
"--details-switch-background": "0px 1px 1px 0px rgba(0, 0, 0, 0.1) inset, 0px 2px 4px 0px rgba(0, 0, 0, 0.1) inset, 0px 0px 0px 0.75px rgba(255, 255, 255, 0.12) inset, 0px 0px 8px 0px rgba(0, 0, 0, 0.1) inset",
|
|
812
|
+
"--buttons-inverted-focus": "0px -1px 0px 0px rgba(255, 255, 255, 0.12), 0px 0px 0px 1px rgba(255, 255, 255, 0.12), 0px 0px 0px 1px rgba(82, 82, 91, 1), 0px 0px 0px 2px rgba(24, 24, 27, 1), 0px 0px 0px 4px rgba(96, 165, 250, 0.8)",
|
|
813
|
+
"--elevation-flyout": "0px -1px 0px 0px rgba(255, 255, 255, 0.04), 0px 0px 0px 1px rgba(255, 255, 255, 0.1), 0px 4px 8px 0px rgba(0, 0, 0, 0.32), 0px 8px 16px 0px rgba(0, 0, 0, 0.32)",
|
|
814
|
+
"--borders-error": "0px 0px 0px 1px rgba(244, 63, 94, 1), 0px 0px 0px 3px rgba(225, 29, 72, 0.25)",
|
|
815
|
+
"--buttons-inverted": "0px -1px 0px 0px rgba(255, 255, 255, 0.12), 0px 0px 0px 1px rgba(255, 255, 255, 0.1), 0px 0px 0px 1px rgba(82, 82, 91, 1), 0px 0px 1px 1.5px rgba(0, 0, 0, 0.24), 0px 2px 2px 0px rgba(0, 0, 0, 0.24)",
|
|
816
|
+
"--borders-base": "0px -1px 0px 0px rgba(255, 255, 255, 0.06), 0px 0px 0px 1px rgba(255, 255, 255, 0.06), 0px 0px 0px 1px rgba(39, 39, 42, 1), 0px 0px 1px 1.5px rgba(0, 0, 0, 0.24), 0px 2px 2px 0px rgba(0, 0, 0, 0.24)",
|
|
817
|
+
"--elevation-card-hover": "0px -1px 0px 0px rgba(255, 255, 255, 0.06), 0px 0px 0px 1px rgba(255, 255, 255, 0.06), 0px 0px 0px 1px rgba(39, 39, 42, 1), 0px 1px 4px 0px rgba(0, 0, 0, 0.48), 0px 2px 8px 0px rgba(0, 0, 0, 0.48)",
|
|
818
|
+
"--elevation-card-rest": "0px -1px 0px 0px rgba(255, 255, 255, 0.06), 0px 0px 0px 1px rgba(255, 255, 255, 0.06), 0px 0px 0px 1px rgba(39, 39, 42, 1), 0px 1px 2px 0px rgba(0, 0, 0, 0.32), 0px 2px 4px 0px rgba(0, 0, 0, 0.32)",
|
|
819
|
+
"--buttons-neutral": "0px -1px 0px 0px rgba(255, 255, 255, 0.06), 0px 0px 0px 1px rgba(255, 255, 255, 0.06), 0px 0px 0px 1px rgba(39, 39, 42, 1), 0px 0px 1px 1.5px rgba(0, 0, 0, 0.24), 0px 2px 2px 0px rgba(0, 0, 0, 0.24)",
|
|
820
|
+
"--elevation-code-block": "0px -1px 0px 0px rgba(255, 255, 255, 0.06), 0px 0px 0px 1px rgba(255, 255, 255, 0.06), 0px 0px 0px 1px rgba(39, 39, 42, 1), 0px 1px 2px 0px rgba(0, 0, 0, 0.32), 0px 2px 4px 0px rgba(0, 0, 0, 0.32)",
|
|
821
|
+
"--buttons-neutral-focus": "0px -1px 0px 0px rgba(255, 255, 255, 0.06), 0px 0px 0px 1px rgba(255, 255, 255, 0.06), 0px 0px 0px 1px rgba(39, 39, 42, 1), 0px 0px 0px 2px rgba(24, 24, 27, 1), 0px 0px 0px 4px rgba(96, 165, 250, 0.8)",
|
|
822
|
+
"--elevation-modal": "0px 0px 0px 1px rgba(24, 24, 27, 1) inset, 0px 0px 0px 1.5px rgba(255, 255, 255, 0.06) inset, 0px -1px 0px 0px rgba(255, 255, 255, 0.04), 0px 0px 0px 1px rgba(255, 255, 255, 0.1), 0px 4px 8px 0px rgba(0, 0, 0, 0.32), 0px 8px 16px 0px rgba(0, 0, 0, 0.32)",
|
|
823
|
+
"--elevation-commandbar": "0px 0px 0px 0.75px rgba(24, 24, 27, 1) inset, 0px 0px 0px 1.25px rgba(255, 255, 255, 0.1) inset, 0px 4px 8px 0px rgba(0, 0, 0, 0.32), 0px 8px 16px 0px rgba(0, 0, 0, 0.32)",
|
|
824
|
+
"--elevation-tooltip": "0px -1px 0px 0px rgba(255, 255, 255, 0.04), 0px 2px 4px 0px rgba(0, 0, 0, 0.32), 0px 0px 0px 1px rgba(255, 255, 255, 0.1), 0px 4px 8px 0px rgba(0, 0, 0, 0.32)",
|
|
825
|
+
"--borders-interactive-with-focus": "0px -1px 2px 0px rgba(219, 234, 254, 0.5), 0px 0px 0px 1px rgba(96, 165, 250, 1), 0px 0px 0px 2px rgba(24, 24, 27, 1), 0px 0px 0px 4px rgba(96, 165, 250, 0.8)",
|
|
826
|
+
"--borders-interactive-with-shadow": "0px -1px 2px 0px rgba(219, 234, 254, 0.5), 0px 0px 0px 1px rgba(96, 165, 250, 1)"
|
|
827
|
+
},
|
|
828
|
+
"light": {
|
|
829
|
+
"--buttons-danger-focus": "0px 0.75px 0px 0px rgba(255, 255, 255, 0.2) inset, 0px 1px 2px 0px rgba(190, 18, 60, 0.4), 0px 0px 0px 1px rgba(190, 18, 60, 1), 0px 0px 0px 2px rgba(255, 255, 255, 1), 0px 0px 0px 4px rgba(59, 130, 246, 0.6)",
|
|
830
|
+
"--details-contrast-on-bg-interactive": "0px 1px 2px 0px rgba(30, 58, 138, 0.6)",
|
|
831
|
+
"--borders-error": "0px 0px 0px 1px rgba(225, 29, 72, 1), 0px 0px 0px 3px rgba(225, 29, 72, 0.15)",
|
|
832
|
+
"--borders-focus": "0px 0px 0px 1px rgba(255, 255, 255, 1), 0px 0px 0px 3px rgba(59, 130, 246, 0.6)",
|
|
833
|
+
"--buttons-danger": "0px 0.75px 0px 0px rgba(255, 255, 255, 0.2) inset, 0px 1px 2px 0px rgba(190, 18, 60, 0.4), 0px 0px 0px 1px rgba(190, 18, 60, 1)",
|
|
834
|
+
"--buttons-inverted-focus": "0px 0.75px 0px 0px rgba(255, 255, 255, 0.2) inset, 0px 1px 2px 0px rgba(0, 0, 0, 0.4), 0px 0px 0px 1px rgba(24, 24, 27, 1), 0px 0px 0px 2px rgba(255, 255, 255, 1), 0px 0px 0px 4px rgba(59, 130, 246, 0.6)",
|
|
835
|
+
"--elevation-card-hover": "0px 0px 0px 1px rgba(0, 0, 0, 0.08), 0px 1px 2px -1px rgba(0, 0, 0, 0.08), 0px 2px 8px 0px rgba(0, 0, 0, 0.1)",
|
|
836
|
+
"--details-switch-handle": "0px 0px 2px 1px rgba(255, 255, 255, 1) inset, 0px 1px 0px 0px rgba(255, 255, 255, 1) inset, 0px 0px 0px 0.5px rgba(0, 0, 0, 0.02), 0px 5px 4px 0px rgba(0, 0, 0, 0.02), 0px 3px 3px 0px rgba(0, 0, 0, 0.04), 0px 1px 2px 0px rgba(0, 0, 0, 0.12), 0px 0px 1px 0px rgba(0, 0, 0, 0.08)",
|
|
837
|
+
"--buttons-neutral": "0px 1px 2px 0px rgba(0, 0, 0, 0.12), 0px 0px 0px 1px rgba(0, 0, 0, 0.08)",
|
|
838
|
+
"--borders-base": "0px 1px 2px 0px rgba(0, 0, 0, 0.12), 0px 0px 0px 1px rgba(0, 0, 0, 0.08)",
|
|
839
|
+
"--elevation-card-rest": "0px 0px 0px 1px rgba(0, 0, 0, 0.08), 0px 1px 2px -1px rgba(0, 0, 0, 0.08), 0px 2px 4px 0px rgba(0, 0, 0, 0.04)",
|
|
840
|
+
"--buttons-neutral-focus": "0px 1px 2px 0px rgba(0, 0, 0, 0.12), 0px 0px 0px 1px rgba(0, 0, 0, 0.08), 0px 0px 0px 2px rgba(255, 255, 255, 1), 0px 0px 0px 4px rgba(59, 130, 246, 0.6)",
|
|
841
|
+
"--details-switch-background-focus": "0px 0px 0px 1px rgba(255, 255, 255, 1), 0px 0px 0px 3px rgba(59, 130, 246, 0.6), 0px 1px 1px 0px rgba(0, 0, 0, 0.04) inset, 0px 2px 4px 0px rgba(0, 0, 0, 0.04) inset, 0px 0px 0px 0.75px rgba(0, 0, 0, 0.06) inset, 0px 0px 8px 0px rgba(0, 0, 0, 0.02) inset, 0px 2px 4px 0px rgba(0, 0, 0, 0.04)",
|
|
842
|
+
"--details-switch-background": "0px 1px 1px 0px rgba(0, 0, 0, 0.04) inset, 0px 2px 4px 0px rgba(0, 0, 0, 0.04) inset, 0px 0px 0px 0.75px rgba(0, 0, 0, 0.06) inset, 0px 0px 8px 0px rgba(0, 0, 0, 0.02) inset, 0px 2px 4px 0px rgba(0, 0, 0, 0.04)",
|
|
843
|
+
"--elevation-flyout": "0px 0px 0px 1px rgba(0, 0, 0, 0.08), 0px 4px 8px 0px rgba(0, 0, 0, 0.08), 0px 8px 16px 0px rgba(0, 0, 0, 0.08)",
|
|
844
|
+
"--elevation-tooltip": "0px 0px 0px 1px rgba(0, 0, 0, 0.08), 0px 2px 4px 0px rgba(0, 0, 0, 0.08), 0px 4px 8px 0px rgba(0, 0, 0, 0.08)",
|
|
845
|
+
"--elevation-modal": "0px 0px 0px 1px rgba(255, 255, 255, 1) inset, 0px 0px 0px 1.5px rgba(228, 228, 231, 0.6) inset, 0px 0px 0px 1px rgba(0, 0, 0, 0.08), 0px 8px 16px 0px rgba(0, 0, 0, 0.08), 0px 16px 32px 0px rgba(0, 0, 0, 0.08)",
|
|
846
|
+
"--elevation-code-block": "0px 0px 0px 1px rgba(24, 24, 27, 1) inset, 0px 0px 0px 1.5px rgba(255, 255, 255, 0.2) inset",
|
|
847
|
+
"--buttons-inverted": "0px 0.75px 0px 0px rgba(255, 255, 255, 0.2) inset, 0px 1px 2px 0px rgba(0, 0, 0, 0.4), 0px 0px 0px 1px rgba(24, 24, 27, 1)",
|
|
848
|
+
"--elevation-commandbar": "0px 0px 0px 0.75px rgba(39, 39, 42, 1) inset, 0px 0px 0px 1.25px rgba(255, 255, 255, 0.3) inset, 0px 8px 16px 0px rgba(0, 0, 0, 0.08), 0px 16px 32px 0px rgba(0, 0, 0, 0.08)",
|
|
849
|
+
"--borders-interactive-with-focus": "0px 1px 2px 0px rgba(30, 58, 138, 0.5), 0px 0px 0px 1px rgba(37, 99, 235, 1), 0px 0px 0px 2px rgba(255, 255, 255, 1), 0px 0px 0px 4px rgba(37, 99, 235, 0.6)",
|
|
850
|
+
"--borders-interactive-with-shadow": "0px 1px 2px 0px rgba(30, 58, 138, 0.5), 0px 0px 0px 1px rgba(37, 99, 235, 1)",
|
|
851
|
+
"--borders-interactive-with-active": "0px 0px 0px 4px rgba(37, 99, 235, 0.2), 0px 0px 0px 1px rgba(37, 99, 235, 1)"
|
|
852
|
+
}
|
|
853
|
+
};
|
|
854
|
+
var typography = {
|
|
855
|
+
".h1-webs": {
|
|
856
|
+
"fontSize": "4rem",
|
|
857
|
+
"lineHeight": "4.400000095367432rem",
|
|
858
|
+
"fontWeight": "500",
|
|
859
|
+
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
|
|
860
|
+
},
|
|
861
|
+
".h2-webs": {
|
|
862
|
+
"fontSize": "3.5rem",
|
|
863
|
+
"lineHeight": "3.8500001430511475rem",
|
|
864
|
+
"fontWeight": "500",
|
|
865
|
+
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
|
|
866
|
+
},
|
|
867
|
+
".h3-webs": {
|
|
868
|
+
"fontSize": "2.5rem",
|
|
869
|
+
"lineHeight": "2.75rem",
|
|
870
|
+
"fontWeight": "500",
|
|
871
|
+
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
|
|
872
|
+
},
|
|
873
|
+
".txt-compact-xlarge-plus": {
|
|
874
|
+
"fontSize": "1.125rem",
|
|
875
|
+
"lineHeight": "1.25rem",
|
|
876
|
+
"fontWeight": "500",
|
|
877
|
+
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
|
|
878
|
+
},
|
|
879
|
+
".txt-compact-xsmall": {
|
|
880
|
+
"fontSize": "0.75rem",
|
|
881
|
+
"lineHeight": "1.25rem",
|
|
882
|
+
"fontWeight": "400",
|
|
883
|
+
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
|
|
884
|
+
},
|
|
885
|
+
".txt-compact-xsmall-plus": {
|
|
886
|
+
"fontSize": "0.75rem",
|
|
887
|
+
"lineHeight": "1.25rem",
|
|
888
|
+
"fontWeight": "500",
|
|
889
|
+
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
|
|
890
|
+
},
|
|
891
|
+
".txt-compact-small-plus": {
|
|
892
|
+
"fontSize": "0.8125rem",
|
|
893
|
+
"lineHeight": "1.25rem",
|
|
894
|
+
"fontWeight": "500",
|
|
895
|
+
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
|
|
896
|
+
},
|
|
897
|
+
".txt-compact-medium": {
|
|
898
|
+
"fontSize": "0.875rem",
|
|
899
|
+
"lineHeight": "1.25rem",
|
|
900
|
+
"fontWeight": "400",
|
|
901
|
+
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
|
|
902
|
+
},
|
|
903
|
+
".txt-compact-large-plus": {
|
|
904
|
+
"fontSize": "1rem",
|
|
905
|
+
"lineHeight": "1.25rem",
|
|
906
|
+
"fontWeight": "500",
|
|
907
|
+
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
|
|
908
|
+
},
|
|
909
|
+
".txt-compact-large": {
|
|
910
|
+
"fontSize": "1rem",
|
|
911
|
+
"lineHeight": "1.25rem",
|
|
912
|
+
"fontWeight": "400",
|
|
913
|
+
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
|
|
914
|
+
},
|
|
915
|
+
".txt-compact-medium-plus": {
|
|
916
|
+
"fontSize": "0.875rem",
|
|
917
|
+
"lineHeight": "1.25rem",
|
|
918
|
+
"fontWeight": "500",
|
|
919
|
+
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
|
|
920
|
+
},
|
|
921
|
+
".txt-compact-xlarge": {
|
|
922
|
+
"fontSize": "1.125rem",
|
|
923
|
+
"lineHeight": "1.25rem",
|
|
924
|
+
"fontWeight": "400",
|
|
925
|
+
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
|
|
926
|
+
},
|
|
927
|
+
".txt-compact-small": {
|
|
928
|
+
"fontSize": "0.8125rem",
|
|
929
|
+
"lineHeight": "1.25rem",
|
|
930
|
+
"fontWeight": "400",
|
|
931
|
+
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
|
|
932
|
+
},
|
|
933
|
+
".h4-webs": {
|
|
934
|
+
"fontSize": "1.5rem",
|
|
935
|
+
"lineHeight": "1.875rem",
|
|
936
|
+
"fontWeight": "500",
|
|
937
|
+
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
|
|
938
|
+
},
|
|
939
|
+
".h2-core": {
|
|
940
|
+
"fontSize": "1rem",
|
|
941
|
+
"lineHeight": "1.5rem",
|
|
942
|
+
"fontWeight": "500",
|
|
943
|
+
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
|
|
944
|
+
},
|
|
945
|
+
".h3-core": {
|
|
946
|
+
"fontSize": "0.875rem",
|
|
947
|
+
"lineHeight": "1.25rem",
|
|
948
|
+
"fontWeight": "500",
|
|
949
|
+
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
|
|
950
|
+
},
|
|
951
|
+
".h1-core": {
|
|
952
|
+
"fontSize": "1.125rem",
|
|
953
|
+
"lineHeight": "1.75rem",
|
|
954
|
+
"fontWeight": "500",
|
|
955
|
+
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
|
|
956
|
+
},
|
|
957
|
+
".h1-docs": {
|
|
958
|
+
"fontSize": "1.5rem",
|
|
959
|
+
"lineHeight": "1.875rem",
|
|
960
|
+
"fontWeight": "500",
|
|
961
|
+
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
|
|
962
|
+
},
|
|
963
|
+
".h4-docs": {
|
|
964
|
+
"fontSize": "0.875rem",
|
|
965
|
+
"lineHeight": "1.399999976158142rem",
|
|
966
|
+
"fontWeight": "500",
|
|
967
|
+
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
|
|
968
|
+
},
|
|
969
|
+
".code-label-plus": {
|
|
970
|
+
"fontSize": "0.75rem",
|
|
971
|
+
"lineHeight": "0.9375rem",
|
|
972
|
+
"fontWeight": "500",
|
|
973
|
+
"fontFamily": "Roboto Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace"
|
|
974
|
+
},
|
|
975
|
+
".code-label": {
|
|
976
|
+
"fontSize": "0.75rem",
|
|
977
|
+
"lineHeight": "0.9375rem",
|
|
978
|
+
"fontWeight": "400",
|
|
979
|
+
"fontFamily": "Roboto Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace"
|
|
980
|
+
},
|
|
981
|
+
".code-paragraph": {
|
|
982
|
+
"fontSize": "0.75rem",
|
|
983
|
+
"lineHeight": "1.2000000476837158rem",
|
|
984
|
+
"fontWeight": "400",
|
|
985
|
+
"fontFamily": "Roboto Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace"
|
|
986
|
+
},
|
|
987
|
+
".code-paragraph-plus": {
|
|
988
|
+
"fontSize": "0.75rem",
|
|
989
|
+
"lineHeight": "1.2000000476837158rem",
|
|
990
|
+
"fontWeight": "500",
|
|
991
|
+
"fontFamily": "Roboto Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace"
|
|
992
|
+
},
|
|
993
|
+
".txt-xsmall-plus": {
|
|
994
|
+
"fontSize": "0.75rem",
|
|
995
|
+
"lineHeight": "1.2000000476837158rem",
|
|
996
|
+
"fontWeight": "500",
|
|
997
|
+
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
|
|
998
|
+
},
|
|
999
|
+
".txt-small": {
|
|
1000
|
+
"fontSize": "0.8125rem",
|
|
1001
|
+
"lineHeight": "1.3000000715255737rem",
|
|
1002
|
+
"fontWeight": "400",
|
|
1003
|
+
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
|
|
1004
|
+
},
|
|
1005
|
+
".h2-docs": {
|
|
1006
|
+
"fontSize": "1.125rem",
|
|
1007
|
+
"lineHeight": "1.8000000715255737rem",
|
|
1008
|
+
"fontWeight": "500",
|
|
1009
|
+
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
|
|
1010
|
+
},
|
|
1011
|
+
".txt-medium": {
|
|
1012
|
+
"fontSize": "0.875rem",
|
|
1013
|
+
"lineHeight": "1.399999976158142rem",
|
|
1014
|
+
"fontWeight": "400",
|
|
1015
|
+
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
|
|
1016
|
+
},
|
|
1017
|
+
".txt-small-plus": {
|
|
1018
|
+
"fontSize": "0.8125rem",
|
|
1019
|
+
"lineHeight": "1.3000000715255737rem",
|
|
1020
|
+
"fontWeight": "500",
|
|
1021
|
+
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
|
|
1022
|
+
},
|
|
1023
|
+
".txt-large": {
|
|
1024
|
+
"fontSize": "1rem",
|
|
1025
|
+
"lineHeight": "1.600000023841858rem",
|
|
1026
|
+
"fontWeight": "400",
|
|
1027
|
+
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
|
|
1028
|
+
},
|
|
1029
|
+
".txt-medium-plus": {
|
|
1030
|
+
"fontSize": "0.875rem",
|
|
1031
|
+
"lineHeight": "1.399999976158142rem",
|
|
1032
|
+
"fontWeight": "500",
|
|
1033
|
+
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
|
|
1034
|
+
},
|
|
1035
|
+
".txt-xsmall": {
|
|
1036
|
+
"fontSize": "0.75rem",
|
|
1037
|
+
"lineHeight": "1.2000000476837158rem",
|
|
1038
|
+
"fontWeight": "400",
|
|
1039
|
+
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
|
|
1040
|
+
},
|
|
1041
|
+
".h3-docs": {
|
|
1042
|
+
"fontSize": "1rem",
|
|
1043
|
+
"lineHeight": "1.600000023841858rem",
|
|
1044
|
+
"fontWeight": "500",
|
|
1045
|
+
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
|
|
1046
|
+
},
|
|
1047
|
+
".txt-xlarge-plus": {
|
|
1048
|
+
"fontSize": "1.125rem",
|
|
1049
|
+
"lineHeight": "1.8000000715255737rem",
|
|
1050
|
+
"fontWeight": "500",
|
|
1051
|
+
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
|
|
1052
|
+
},
|
|
1053
|
+
".txt-large-plus": {
|
|
1054
|
+
"fontSize": "1rem",
|
|
1055
|
+
"lineHeight": "1.600000023841858rem",
|
|
1056
|
+
"fontWeight": "500",
|
|
1057
|
+
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
|
|
1058
|
+
},
|
|
1059
|
+
".txt-xlarge": {
|
|
1060
|
+
"fontSize": "1.125rem",
|
|
1061
|
+
"lineHeight": "1.8000000715255737rem",
|
|
1062
|
+
"fontWeight": "400",
|
|
1063
|
+
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"
|
|
1064
|
+
}
|
|
1065
|
+
};
|
|
1066
|
+
var plugin_default = (0, import_plugin2.default)(
|
|
1067
|
+
function acmekitUi({ addBase, addComponents, config }) {
|
|
1068
|
+
const [darkMode, className = ".dark"] = [].concat(
|
|
1069
|
+
config("darkMode", "media")
|
|
1070
|
+
);
|
|
1071
|
+
addBase({
|
|
1072
|
+
"*": {
|
|
1073
|
+
borderColor: "var(--border-base)"
|
|
1074
|
+
}
|
|
1075
|
+
});
|
|
1076
|
+
addComponents(typography);
|
|
1077
|
+
addBase({
|
|
1078
|
+
":root": { ...colors.light, ...effects.light },
|
|
1079
|
+
...components.light
|
|
1080
|
+
});
|
|
1081
|
+
if (darkMode === "class") {
|
|
1082
|
+
addBase({
|
|
1083
|
+
[className]: { ...colors.dark, ...effects.dark }
|
|
1084
|
+
});
|
|
1085
|
+
} else {
|
|
1086
|
+
addBase({
|
|
1087
|
+
"@media (prefers-color-scheme: dark)": {
|
|
1088
|
+
":root": { ...colors.dark, ...effects.dark },
|
|
1089
|
+
...components.dark
|
|
1090
|
+
}
|
|
1091
|
+
});
|
|
1092
|
+
}
|
|
1093
|
+
},
|
|
1094
|
+
{
|
|
1095
|
+
theme: {
|
|
1096
|
+
extend: {
|
|
1097
|
+
...theme.extend,
|
|
1098
|
+
fontFamily: {
|
|
1099
|
+
sans: FONT_FAMILY_SANS,
|
|
1100
|
+
mono: FONT_FAMILY_MONO
|
|
1101
|
+
},
|
|
1102
|
+
transitionProperty: {
|
|
1103
|
+
fg: "color, background-color, border-color, box-shadow, opacity"
|
|
1104
|
+
},
|
|
1105
|
+
keyframes: {
|
|
1106
|
+
"accordion-down": {
|
|
1107
|
+
from: { height: "0px" },
|
|
1108
|
+
to: { height: "var(--radix-accordion-content-height)" }
|
|
1109
|
+
},
|
|
1110
|
+
"accordion-up": {
|
|
1111
|
+
from: { height: "var(--radix-accordion-content-height)" },
|
|
1112
|
+
to: { height: "0px" }
|
|
1113
|
+
}
|
|
1114
|
+
},
|
|
1115
|
+
animation: {
|
|
1116
|
+
"accordion-down": "accordion-down 0.2s ease-out",
|
|
1117
|
+
"accordion-up": "accordion-up 0.2s ease-out"
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1122
|
+
);
|
|
1123
|
+
var preset = {
|
|
1124
|
+
content: [],
|
|
1125
|
+
plugins: [plugin_default, require_tailwindcss_animate()]
|
|
1126
|
+
};
|
|
1127
|
+
module2.exports = preset;
|
|
1128
|
+
}
|
|
1129
|
+
});
|
|
1130
|
+
|
|
1131
|
+
// src/index.ts
|
|
1132
|
+
var index_exports = {};
|
|
1133
|
+
__export(index_exports, {
|
|
1134
|
+
build: () => build,
|
|
1135
|
+
develop: () => develop,
|
|
1136
|
+
plugin: () => plugin,
|
|
1137
|
+
serve: () => serve
|
|
1138
|
+
});
|
|
1139
|
+
module.exports = __toCommonJS(index_exports);
|
|
1140
|
+
|
|
1141
|
+
// src/utils/config.ts
|
|
1142
|
+
var import_admin_shared = require("@acmekit/admin-shared");
|
|
1143
|
+
var import_path = __toESM(require("path"));
|
|
1144
|
+
|
|
1145
|
+
// src/plugins/inject-tailwindcss.ts
|
|
1146
|
+
var import_node_path = __toESM(require("path"));
|
|
1147
|
+
var injectTailwindCSS = (options) => {
|
|
1148
|
+
return {
|
|
1149
|
+
name: "acmekit:inject-tailwindcss",
|
|
1150
|
+
config: () => ({
|
|
1151
|
+
css: {
|
|
1152
|
+
postcss: {
|
|
1153
|
+
plugins: [
|
|
1154
|
+
require("tailwindcss")({
|
|
1155
|
+
config: createTailwindConfig(
|
|
1156
|
+
options.entry,
|
|
1157
|
+
options.sources,
|
|
1158
|
+
options.plugins
|
|
1159
|
+
)
|
|
1160
|
+
})
|
|
1161
|
+
]
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
})
|
|
1165
|
+
};
|
|
1166
|
+
};
|
|
1167
|
+
function createTailwindConfig(entry, sources = [], plugins = []) {
|
|
1168
|
+
const root = import_node_path.default.join(entry, "**/*.{js,ts,jsx,tsx}");
|
|
1169
|
+
const html = import_node_path.default.join(entry, "index.html");
|
|
1170
|
+
let dashboard = "";
|
|
1171
|
+
try {
|
|
1172
|
+
dashboard = import_node_path.default.join(
|
|
1173
|
+
import_node_path.default.dirname(require.resolve("@acmekit/dashboard")),
|
|
1174
|
+
"**/*.{js,ts,jsx,tsx}"
|
|
1175
|
+
);
|
|
1176
|
+
} catch (_e) {
|
|
1177
|
+
}
|
|
1178
|
+
let ui = "";
|
|
1179
|
+
try {
|
|
1180
|
+
ui = import_node_path.default.join(
|
|
1181
|
+
import_node_path.default.dirname(require.resolve("@acmekit/ui")),
|
|
1182
|
+
"**/*.{js,ts,jsx,tsx}"
|
|
1183
|
+
);
|
|
1184
|
+
} catch (_e) {
|
|
1185
|
+
}
|
|
1186
|
+
const sourceExtensions = sources.map(
|
|
1187
|
+
(s) => import_node_path.default.join(s, "**/*.{js,ts,jsx,tsx}")
|
|
1188
|
+
);
|
|
1189
|
+
const pluginExtensions = [];
|
|
1190
|
+
for (const plugin2 of plugins) {
|
|
1191
|
+
try {
|
|
1192
|
+
const pluginPath = import_node_path.default.join(
|
|
1193
|
+
import_node_path.default.dirname(require.resolve(plugin2)),
|
|
1194
|
+
"**/*.{js,ts,jsx,tsx}"
|
|
1195
|
+
);
|
|
1196
|
+
pluginExtensions.push(pluginPath);
|
|
1197
|
+
} catch (_e) {
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
const config = {
|
|
1201
|
+
presets: [require_dist()],
|
|
1202
|
+
content: [
|
|
1203
|
+
html,
|
|
1204
|
+
root,
|
|
1205
|
+
dashboard,
|
|
1206
|
+
ui,
|
|
1207
|
+
...sourceExtensions,
|
|
1208
|
+
...pluginExtensions
|
|
1209
|
+
],
|
|
1210
|
+
darkMode: "class"
|
|
1211
|
+
};
|
|
1212
|
+
return config;
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1215
|
+
// src/utils/write-static-files.ts
|
|
1216
|
+
var import_promises = require("fs/promises");
|
|
1217
|
+
var import_node_path2 = require("path");
|
|
1218
|
+
var import_outdent = __toESM(require("outdent"));
|
|
1219
|
+
async function writeStaticFiles(plugins) {
|
|
1220
|
+
const outDir = (0, import_node_path2.join)(process.cwd(), ".acmekit/client");
|
|
1221
|
+
await (0, import_promises.mkdir)(outDir, { recursive: true });
|
|
1222
|
+
const promises = [
|
|
1223
|
+
writeCSSFile(outDir),
|
|
1224
|
+
writeEntryFile(outDir, plugins),
|
|
1225
|
+
writeHTMLFile(outDir)
|
|
1226
|
+
];
|
|
1227
|
+
await Promise.all(promises);
|
|
1228
|
+
}
|
|
1229
|
+
async function writeCSSFile(outDir) {
|
|
1230
|
+
const css = import_outdent.default`
|
|
1231
|
+
@import "@acmekit/dashboard/css";
|
|
1232
|
+
|
|
1233
|
+
@tailwind base;
|
|
1234
|
+
@tailwind components;
|
|
1235
|
+
@tailwind utilities;
|
|
1236
|
+
`;
|
|
1237
|
+
await (0, import_promises.writeFile)((0, import_node_path2.join)(outDir, "index.css"), css);
|
|
1238
|
+
}
|
|
1239
|
+
function getPluginName(index) {
|
|
1240
|
+
return `plugin${index}`;
|
|
1241
|
+
}
|
|
1242
|
+
async function writeEntryFile(outDir, plugins) {
|
|
1243
|
+
const entry = import_outdent.default`
|
|
1244
|
+
import App from "@acmekit/dashboard";
|
|
1245
|
+
import React from "react";
|
|
1246
|
+
import ReactDOM from "react-dom/client";
|
|
1247
|
+
import "./index.css";
|
|
1248
|
+
|
|
1249
|
+
${plugins?.map((plugin2, idx) => `import ${getPluginName(idx)} from "${plugin2}"`).join("\n")}
|
|
1250
|
+
|
|
1251
|
+
let root = null
|
|
1252
|
+
|
|
1253
|
+
if (!root) {
|
|
1254
|
+
root = ReactDOM.createRoot(document.getElementById("acmekit"))
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
|
|
1258
|
+
root.render(
|
|
1259
|
+
<React.StrictMode>
|
|
1260
|
+
<App plugins={[${plugins?.map((_, idx) => getPluginName(idx)).join(", ")}]} />
|
|
1261
|
+
</React.StrictMode>
|
|
1262
|
+
)
|
|
1263
|
+
|
|
1264
|
+
|
|
1265
|
+
if (import.meta.hot) {
|
|
1266
|
+
import.meta.hot.accept()
|
|
1267
|
+
}
|
|
1268
|
+
`;
|
|
1269
|
+
await (0, import_promises.writeFile)((0, import_node_path2.join)(outDir, "entry.jsx"), entry);
|
|
1270
|
+
}
|
|
1271
|
+
async function writeHTMLFile(outDir) {
|
|
1272
|
+
const html = import_outdent.default`
|
|
1273
|
+
<!DOCTYPE html>
|
|
1274
|
+
<html>
|
|
1275
|
+
<head>
|
|
1276
|
+
<meta
|
|
1277
|
+
http-equiv="Content-Type"
|
|
1278
|
+
content="text/html; charset=UTF-8"
|
|
1279
|
+
/>
|
|
1280
|
+
<meta
|
|
1281
|
+
name="viewport"
|
|
1282
|
+
content="width=device-width, initial-scale=1, user-scalable=no"
|
|
1283
|
+
/>
|
|
1284
|
+
<link rel="icon" href="data:," data-placeholder-favicon />
|
|
1285
|
+
</head>
|
|
1286
|
+
|
|
1287
|
+
<body>
|
|
1288
|
+
<div id="acmekit"></div>
|
|
1289
|
+
<script type="module" src="./entry.jsx"></script>
|
|
1290
|
+
</body>
|
|
1291
|
+
</html>
|
|
1292
|
+
`;
|
|
1293
|
+
await (0, import_promises.writeFile)((0, import_node_path2.join)(outDir, "index.html"), html);
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1296
|
+
// src/plugins/write-static-files.ts
|
|
1297
|
+
var writeStaticFiles2 = (options) => {
|
|
1298
|
+
return {
|
|
1299
|
+
name: "acmekit:write-static-files",
|
|
1300
|
+
buildStart: async (ctx) => {
|
|
1301
|
+
await writeStaticFiles(options.plugins);
|
|
1302
|
+
}
|
|
1303
|
+
};
|
|
1304
|
+
};
|
|
1305
|
+
|
|
1306
|
+
// src/utils/config.ts
|
|
1307
|
+
async function getViteConfig(options) {
|
|
1308
|
+
const { searchForWorkspaceRoot, mergeConfig } = await import("vite");
|
|
1309
|
+
const { default: react } = await import("@vitejs/plugin-react");
|
|
1310
|
+
const { default: acmekit } = await import("@acmekit/admin-vite-plugin");
|
|
1311
|
+
const getPort = await import("get-port");
|
|
1312
|
+
const hmrPort = process.env.HMR_PORT ? parseInt(process.env.HMR_PORT) : await getPort.default();
|
|
1313
|
+
const hmrOptions = getHmrConfig(hmrPort);
|
|
1314
|
+
const allowedHosts = getAllowedHosts();
|
|
1315
|
+
const root = import_path.default.resolve(process.cwd(), ".acmekit/client");
|
|
1316
|
+
const backendUrl = options.backendUrl ?? "";
|
|
1317
|
+
const storefrontUrl = options.storefrontUrl ?? "";
|
|
1318
|
+
const authType = process.env.ADMIN_AUTH_TYPE ?? void 0;
|
|
1319
|
+
const jwtTokenStorageKey = process.env.ADMIN_JWT_TOKEN_STORAGE_KEY ?? void 0;
|
|
1320
|
+
const baseConfig = {
|
|
1321
|
+
root,
|
|
1322
|
+
base: options.path,
|
|
1323
|
+
build: {
|
|
1324
|
+
emptyOutDir: true,
|
|
1325
|
+
outDir: import_path.default.resolve(process.cwd(), options.outDir)
|
|
1326
|
+
},
|
|
1327
|
+
optimizeDeps: {
|
|
1328
|
+
include: [
|
|
1329
|
+
"react",
|
|
1330
|
+
"react/jsx-runtime",
|
|
1331
|
+
"react-dom/client",
|
|
1332
|
+
"react-router-dom",
|
|
1333
|
+
"react-i18next",
|
|
1334
|
+
"@acmekit/ui",
|
|
1335
|
+
"@acmekit/dashboard",
|
|
1336
|
+
"@acmekit/js-sdk",
|
|
1337
|
+
"@tanstack/react-query"
|
|
1338
|
+
],
|
|
1339
|
+
exclude: [...import_admin_shared.VIRTUAL_MODULES]
|
|
1340
|
+
},
|
|
1341
|
+
define: {
|
|
1342
|
+
__BASE__: JSON.stringify(options.path),
|
|
1343
|
+
__BACKEND_URL__: JSON.stringify(backendUrl),
|
|
1344
|
+
__AUTH_TYPE__: JSON.stringify(authType),
|
|
1345
|
+
__JWT_TOKEN_STORAGE_KEY__: JSON.stringify(jwtTokenStorageKey),
|
|
1346
|
+
__STOREFRONT_URL__: JSON.stringify(storefrontUrl)
|
|
1347
|
+
},
|
|
1348
|
+
server: {
|
|
1349
|
+
fs: {
|
|
1350
|
+
allow: [searchForWorkspaceRoot(process.cwd())]
|
|
1351
|
+
},
|
|
1352
|
+
hmr: hmrOptions,
|
|
1353
|
+
...allowedHosts && { allowedHosts }
|
|
1354
|
+
},
|
|
1355
|
+
plugins: [
|
|
1356
|
+
writeStaticFiles2({
|
|
1357
|
+
plugins: options.plugins
|
|
1358
|
+
}),
|
|
1359
|
+
injectTailwindCSS({
|
|
1360
|
+
entry: root,
|
|
1361
|
+
sources: options.sources,
|
|
1362
|
+
plugins: options.plugins
|
|
1363
|
+
}),
|
|
1364
|
+
react(),
|
|
1365
|
+
acmekit({
|
|
1366
|
+
sources: options.sources
|
|
1367
|
+
})
|
|
1368
|
+
]
|
|
1369
|
+
};
|
|
1370
|
+
const pluginEnv = {
|
|
1371
|
+
BACKEND_URL: backendUrl
|
|
1372
|
+
};
|
|
1373
|
+
for (const [key, value] of Object.entries(process.env)) {
|
|
1374
|
+
if (key.startsWith("PLUGIN_")) {
|
|
1375
|
+
pluginEnv[key.replace(/^PLUGIN_/, "")] = value;
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1378
|
+
baseConfig.define["process.env"] = JSON.stringify(pluginEnv);
|
|
1379
|
+
let finalConfig = baseConfig;
|
|
1380
|
+
if (options.vite) {
|
|
1381
|
+
const customConfig = options.vite(baseConfig);
|
|
1382
|
+
finalConfig = mergeConfig(baseConfig, customConfig);
|
|
1383
|
+
}
|
|
1384
|
+
if (process.env.HMR_BIND_HOST) {
|
|
1385
|
+
if (finalConfig.server?.hmr && typeof finalConfig.server.hmr === "object" && finalConfig.server.hmr.server) {
|
|
1386
|
+
console.warn(
|
|
1387
|
+
"HMR_BIND_HOST is set but a custom hmr.server is already configured. HMR_BIND_HOST will be ignored."
|
|
1388
|
+
);
|
|
1389
|
+
} else {
|
|
1390
|
+
const { createServer } = require("http");
|
|
1391
|
+
const hmrServer = createServer();
|
|
1392
|
+
hmrServer.listen(hmrPort, process.env.HMR_BIND_HOST);
|
|
1393
|
+
if (!finalConfig.server) {
|
|
1394
|
+
finalConfig.server = {};
|
|
1395
|
+
}
|
|
1396
|
+
if (!finalConfig.server.hmr || typeof finalConfig.server.hmr !== "object") {
|
|
1397
|
+
finalConfig.server.hmr = {};
|
|
1398
|
+
}
|
|
1399
|
+
finalConfig.server.hmr.server = hmrServer;
|
|
1400
|
+
}
|
|
1401
|
+
}
|
|
1402
|
+
return finalConfig;
|
|
1403
|
+
}
|
|
1404
|
+
function getAllowedHosts() {
|
|
1405
|
+
const hosts = process.env.__MEDUSA_ADMIN_ADDITIONAL_ALLOWED_HOSTS;
|
|
1406
|
+
if (!hosts) {
|
|
1407
|
+
return void 0;
|
|
1408
|
+
}
|
|
1409
|
+
return hosts.split(",").map((host) => host.trim());
|
|
1410
|
+
}
|
|
1411
|
+
function getHmrConfig(hmrPort) {
|
|
1412
|
+
const options = {
|
|
1413
|
+
port: hmrPort
|
|
1414
|
+
};
|
|
1415
|
+
if (process.env.HMR_PROTOCOL) {
|
|
1416
|
+
options.protocol = process.env.HMR_PROTOCOL;
|
|
1417
|
+
}
|
|
1418
|
+
if (process.env.HMR_HOST) {
|
|
1419
|
+
options.host = process.env.HMR_HOST;
|
|
1420
|
+
}
|
|
1421
|
+
if (process.env.HMR_CLIENT_PORT) {
|
|
1422
|
+
options.clientPort = parseInt(process.env.HMR_CLIENT_PORT);
|
|
1423
|
+
}
|
|
1424
|
+
return options;
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1427
|
+
// src/commands/build.ts
|
|
1428
|
+
async function build(options) {
|
|
1429
|
+
const vite = await import("vite");
|
|
1430
|
+
const viteConfig = await getViteConfig(options);
|
|
1431
|
+
const buildConfig = {
|
|
1432
|
+
mode: "production",
|
|
1433
|
+
logLevel: "error"
|
|
1434
|
+
};
|
|
1435
|
+
await vite.build(vite.mergeConfig(viteConfig, buildConfig));
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1438
|
+
// src/commands/develop.ts
|
|
1439
|
+
var import_express = __toESM(require("express"));
|
|
1440
|
+
var import_fs = __toESM(require("fs"));
|
|
1441
|
+
var import_path2 = __toESM(require("path"));
|
|
1442
|
+
var router = import_express.default.Router();
|
|
1443
|
+
function findTemplateFilePath(reqPath, root) {
|
|
1444
|
+
if (reqPath.endsWith(".html")) {
|
|
1445
|
+
const pathToTest = import_path2.default.join(root, reqPath);
|
|
1446
|
+
if (import_fs.default.existsSync(pathToTest)) {
|
|
1447
|
+
return pathToTest;
|
|
1448
|
+
}
|
|
1449
|
+
}
|
|
1450
|
+
const basePath = reqPath.slice(0, reqPath.lastIndexOf("/"));
|
|
1451
|
+
const dirs = basePath.split("/");
|
|
1452
|
+
while (dirs.length > 0) {
|
|
1453
|
+
const pathToTest = import_path2.default.join(root, ...dirs, "index.html");
|
|
1454
|
+
if (import_fs.default.existsSync(pathToTest)) {
|
|
1455
|
+
return pathToTest;
|
|
1456
|
+
}
|
|
1457
|
+
dirs.pop();
|
|
1458
|
+
}
|
|
1459
|
+
return void 0;
|
|
1460
|
+
}
|
|
1461
|
+
async function injectViteMiddleware(router3, middleware) {
|
|
1462
|
+
router3.use((req, res, next) => {
|
|
1463
|
+
req.path.endsWith(".html") ? next() : middleware(req, res, next);
|
|
1464
|
+
});
|
|
1465
|
+
}
|
|
1466
|
+
async function injectHtmlMiddleware(router3, server) {
|
|
1467
|
+
router3.use(async (req, res, next) => {
|
|
1468
|
+
if (req.method !== "GET") {
|
|
1469
|
+
return next();
|
|
1470
|
+
}
|
|
1471
|
+
const templateFilePath = findTemplateFilePath(req.path, server.config.root);
|
|
1472
|
+
if (!templateFilePath) {
|
|
1473
|
+
return next();
|
|
1474
|
+
}
|
|
1475
|
+
const template = import_fs.default.readFileSync(templateFilePath, "utf8");
|
|
1476
|
+
const html = await server.transformIndexHtml(
|
|
1477
|
+
templateFilePath,
|
|
1478
|
+
template,
|
|
1479
|
+
req.originalUrl
|
|
1480
|
+
);
|
|
1481
|
+
res.send(html);
|
|
1482
|
+
});
|
|
1483
|
+
}
|
|
1484
|
+
async function develop(options) {
|
|
1485
|
+
const vite = await import("vite");
|
|
1486
|
+
try {
|
|
1487
|
+
const viteConfig = await getViteConfig(options);
|
|
1488
|
+
const developConfig = {
|
|
1489
|
+
mode: "development",
|
|
1490
|
+
logLevel: "error",
|
|
1491
|
+
appType: "spa",
|
|
1492
|
+
server: {
|
|
1493
|
+
middlewareMode: true
|
|
1494
|
+
}
|
|
1495
|
+
};
|
|
1496
|
+
const mergedConfig = vite.mergeConfig(viteConfig, developConfig);
|
|
1497
|
+
const server = await vite.createServer(mergedConfig);
|
|
1498
|
+
await injectViteMiddleware(router, server.middlewares);
|
|
1499
|
+
await injectHtmlMiddleware(router, server);
|
|
1500
|
+
} catch (error) {
|
|
1501
|
+
console.error(error);
|
|
1502
|
+
throw new Error(
|
|
1503
|
+
"Failed to start admin development server. See error above."
|
|
1504
|
+
);
|
|
1505
|
+
}
|
|
1506
|
+
return router;
|
|
1507
|
+
}
|
|
1508
|
+
|
|
1509
|
+
// src/commands/plugin.ts
|
|
1510
|
+
var import_fs2 = require("fs");
|
|
1511
|
+
var import_node_module = require("module");
|
|
1512
|
+
var import_path3 = __toESM(require("path"));
|
|
1513
|
+
|
|
1514
|
+
// src/plugins/clear-plugin-build.ts
|
|
1515
|
+
var import_promises2 = require("fs/promises");
|
|
1516
|
+
var import_node_path3 = __toESM(require("path"));
|
|
1517
|
+
var clearPluginBuild = (options) => ({
|
|
1518
|
+
name: "acmekit:clear-plugin-build",
|
|
1519
|
+
buildStart: async () => {
|
|
1520
|
+
const adminDir = import_node_path3.default.join(options.outDir, "admin");
|
|
1521
|
+
try {
|
|
1522
|
+
await (0, import_promises2.rm)(adminDir, { recursive: true, force: true });
|
|
1523
|
+
} catch (e) {
|
|
1524
|
+
}
|
|
1525
|
+
}
|
|
1526
|
+
});
|
|
1527
|
+
|
|
1528
|
+
// src/commands/plugin.ts
|
|
1529
|
+
async function plugin(options) {
|
|
1530
|
+
const vite = await import("vite");
|
|
1531
|
+
const react = (await import("@vitejs/plugin-react")).default;
|
|
1532
|
+
const acmekit = (await import("@acmekit/admin-vite-plugin")).default;
|
|
1533
|
+
const pkg = JSON.parse(
|
|
1534
|
+
(0, import_fs2.readFileSync)(import_path3.default.resolve(options.root, "package.json"), "utf-8")
|
|
1535
|
+
);
|
|
1536
|
+
const external = /* @__PURE__ */ new Set([
|
|
1537
|
+
...Object.keys(pkg.dependencies || {}),
|
|
1538
|
+
...Object.keys(pkg.peerDependencies || {}),
|
|
1539
|
+
...Object.keys(pkg.devDependencies || {}),
|
|
1540
|
+
"react",
|
|
1541
|
+
"react/jsx-runtime",
|
|
1542
|
+
"react-router-dom",
|
|
1543
|
+
"react-i18next",
|
|
1544
|
+
"@acmekit/js-sdk",
|
|
1545
|
+
"@acmekit/admin-sdk",
|
|
1546
|
+
"@tanstack/react-query"
|
|
1547
|
+
]);
|
|
1548
|
+
const outDir = import_path3.default.resolve(options.root, options.outDir, "src/admin");
|
|
1549
|
+
const entryPoint = import_path3.default.resolve(
|
|
1550
|
+
options.root,
|
|
1551
|
+
"src/admin/__admin-extensions__.js"
|
|
1552
|
+
);
|
|
1553
|
+
const originalNodeEnv = process.env.NODE_ENV;
|
|
1554
|
+
process.env.NODE_ENV = "production";
|
|
1555
|
+
const pluginConfig = {
|
|
1556
|
+
build: {
|
|
1557
|
+
lib: {
|
|
1558
|
+
entry: entryPoint,
|
|
1559
|
+
formats: ["es", "cjs"],
|
|
1560
|
+
fileName: "index"
|
|
1561
|
+
},
|
|
1562
|
+
emptyOutDir: false,
|
|
1563
|
+
minify: false,
|
|
1564
|
+
outDir,
|
|
1565
|
+
rollupOptions: {
|
|
1566
|
+
external: (id, importer) => {
|
|
1567
|
+
if (!importer) {
|
|
1568
|
+
const idParts2 = id.split("/");
|
|
1569
|
+
const name2 = idParts2[0]?.startsWith("@") ? `${idParts2[0]}/${idParts2[1]}` : idParts2[0];
|
|
1570
|
+
const builtinModulesWithNodePrefix = [
|
|
1571
|
+
...import_node_module.builtinModules,
|
|
1572
|
+
...import_node_module.builtinModules.map((modName) => `node:${modName}`)
|
|
1573
|
+
];
|
|
1574
|
+
return Boolean(
|
|
1575
|
+
name2 && external.has(name2) || name2 && builtinModulesWithNodePrefix.includes(name2)
|
|
1576
|
+
);
|
|
1577
|
+
}
|
|
1578
|
+
const idParts = id.split("/");
|
|
1579
|
+
const name = idParts[0]?.startsWith("@") ? `${idParts[0]}/${idParts[1]}` : idParts[0];
|
|
1580
|
+
return Boolean(name && external.has(name));
|
|
1581
|
+
},
|
|
1582
|
+
output: {
|
|
1583
|
+
preserveModules: false,
|
|
1584
|
+
interop: "auto",
|
|
1585
|
+
chunkFileNames: () => {
|
|
1586
|
+
return `_chunks/[name]-[hash]`;
|
|
1587
|
+
}
|
|
1588
|
+
}
|
|
1589
|
+
}
|
|
1590
|
+
},
|
|
1591
|
+
plugins: [
|
|
1592
|
+
react(),
|
|
1593
|
+
acmekit({
|
|
1594
|
+
pluginMode: true,
|
|
1595
|
+
sources: [import_path3.default.resolve(options.root, "src/admin")]
|
|
1596
|
+
}),
|
|
1597
|
+
clearPluginBuild({ outDir })
|
|
1598
|
+
],
|
|
1599
|
+
logLevel: "silent",
|
|
1600
|
+
clearScreen: false
|
|
1601
|
+
};
|
|
1602
|
+
await vite.build(pluginConfig);
|
|
1603
|
+
process.env.NODE_ENV = originalNodeEnv;
|
|
1604
|
+
}
|
|
1605
|
+
|
|
1606
|
+
// src/commands/serve.ts
|
|
1607
|
+
var import_compression = __toESM(require("compression"));
|
|
1608
|
+
var import_express2 = require("express");
|
|
1609
|
+
var import_fs3 = __toESM(require("fs"));
|
|
1610
|
+
var import_path4 = __toESM(require("path"));
|
|
1611
|
+
var router2 = (0, import_express2.Router)();
|
|
1612
|
+
async function serve(options) {
|
|
1613
|
+
const htmlPath = import_path4.default.resolve(options.outDir, "index.html");
|
|
1614
|
+
const indexExists = import_fs3.default.existsSync(htmlPath);
|
|
1615
|
+
if (!indexExists) {
|
|
1616
|
+
throw new Error(
|
|
1617
|
+
`Could not find index.html in the admin build directory. Make sure to run 'acmekit build' before starting the server.`
|
|
1618
|
+
);
|
|
1619
|
+
}
|
|
1620
|
+
const html = import_fs3.default.readFileSync(htmlPath, "utf-8");
|
|
1621
|
+
const sendHtml = (_req, res) => {
|
|
1622
|
+
res.setHeader("Cache-Control", "no-cache");
|
|
1623
|
+
res.setHeader("Vary", "Origin, Cache-Control");
|
|
1624
|
+
res.send(html);
|
|
1625
|
+
};
|
|
1626
|
+
const setStaticHeaders = (res) => {
|
|
1627
|
+
res.setHeader("Cache-Control", "max-age=31536000, immutable");
|
|
1628
|
+
res.setHeader("Vary", "Origin, Cache-Control");
|
|
1629
|
+
};
|
|
1630
|
+
router2.use((0, import_compression.default)());
|
|
1631
|
+
router2.get("/", sendHtml);
|
|
1632
|
+
router2.use(
|
|
1633
|
+
(0, import_express2.static)(options.outDir, {
|
|
1634
|
+
setHeaders: setStaticHeaders
|
|
1635
|
+
})
|
|
1636
|
+
);
|
|
1637
|
+
router2.get(`/*`, sendHtml);
|
|
1638
|
+
return router2;
|
|
1639
|
+
}
|
|
1640
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
1641
|
+
0 && (module.exports = {
|
|
1642
|
+
build,
|
|
1643
|
+
develop,
|
|
1644
|
+
plugin,
|
|
1645
|
+
serve
|
|
1646
|
+
});
|