@bluepic/embed 0.5.1 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bash-DI5WKoY1.cjs +1 -0
- package/dist/bash-SfqkqXwO.js +169 -0
- package/dist/bluepic-embed.iife.js +240 -271
- package/dist/bluepic-embed.umd.js +240 -271
- package/dist/c-Bwju34J8.js +176 -0
- package/dist/c-CxjdkDqU.cjs +1 -0
- package/dist/client-zip-Dl4jBUKQ.cjs +1 -0
- package/dist/client-zip-DscsL7SZ.js +254 -0
- package/dist/components/BxDatePickerPopover.vue.d.ts +1 -1
- package/dist/components/BxInput.vue.d.ts +1 -1
- package/dist/components/BxTag.vue.d.ts +1 -1
- package/dist/components/TemplateEditor/BatchEditor.vue.d.ts +14 -10
- package/dist/components/TemplateEditor/BxTemplateEditor.vue.d.ts +80 -64
- package/dist/components/TemplateEditor/TemplateView.vue.d.ts +20 -16
- package/dist/cpp-BNKWamrP.js +225 -0
- package/dist/cpp-BlYqzAb6.cjs +1 -0
- package/dist/css-C6p-exw3.cjs +1 -0
- package/dist/css-yWyfM7J9.js +140 -0
- package/dist/decompress-3ZSaG6Ii.cjs +15 -0
- package/dist/decompress-C88dmWOf.js +643 -0
- package/dist/embed/embed.d.ts +4416 -1454
- package/dist/go-DnIuztGs.js +140 -0
- package/dist/go-RBRkffhh.cjs +1 -0
- package/dist/java-CYbswnVa.js +169 -0
- package/dist/java-DiqBJCuC.cjs +1 -0
- package/dist/javascript-DaG6fU1i.js +436 -0
- package/dist/javascript-hWWC5YVO.cjs +1 -0
- package/dist/json-CW2SpMXu.cjs +1 -0
- package/dist/json-Cu6rbgWf.js +36 -0
- package/dist/main.cjs +118 -146
- package/dist/main.mjs +73680 -85828
- package/dist/markdown-BaDHGYjR.cjs +1 -0
- package/dist/markdown-D3Gs6FWn.js +181 -0
- package/dist/markdown-it-BOugFJd0.cjs +13 -0
- package/dist/markdown-it-bsR6HXzL.js +2875 -0
- package/dist/postal-mime-BnhFNwEJ.cjs +28 -0
- package/dist/postal-mime-Bsdi2kUR.js +3210 -0
- package/dist/python-D1ZXre9G.js +238 -0
- package/dist/python-DawLCmeM.cjs +1 -0
- package/dist/rolldown-runtime-CEFd7nDs.js +30 -0
- package/dist/rolldown-runtime-CPUxUITh.cjs +1 -0
- package/dist/rust-B47KpJg8.cjs +1 -0
- package/dist/rust-DV3X-6zd.js +169 -0
- package/dist/scss-BwEwJffF.cjs +1 -0
- package/dist/scss-DVPIh7kT.js +150 -0
- package/dist/sql-BsfEDS1M.cjs +1 -0
- package/dist/sql-CmVzGP4w.js +118 -0
- package/dist/style.css +2 -1
- package/dist/theme.cjs +1 -1
- package/dist/theme.mjs +1394 -1273
- package/dist/typescript-CjqyVRRm.cjs +1 -0
- package/dist/typescript-DbET6Hbh.js +521 -0
- package/dist/unzipit.module-CWI6YKpy.js +697 -0
- package/dist/unzipit.module-DLgVBmhU.cjs +1 -0
- package/dist/util/gallery.d.ts +21 -37
- package/dist/xlsx-Bm1OL5B8.js +16261 -0
- package/dist/xlsx-C9EeNB50.cjs +38 -0
- package/dist/xml-Bh8MwSUt.cjs +1 -0
- package/dist/xml-Bxh-tO8n.js +166 -0
- package/dist/yaml-CIP4hiwy.cjs +1 -0
- package/dist/yaml-DT7UV549.js +144 -0
- package/package.json +9 -5
- package/dist/bash-BHkfQ7MG.cjs +0 -1
- package/dist/bash-CPB87Egg.js +0 -377
- package/dist/c-B4BAHWS4.cjs +0 -1
- package/dist/c-C0DTNf68.js +0 -336
- package/dist/cpp-BfO2fOQK.cjs +0 -1
- package/dist/cpp-DxGBPWa5.js +0 -538
- package/dist/css-Cx1gP-zj.js +0 -934
- package/dist/css-DTF39MN3.cjs +0 -1
- package/dist/decompress-BGiydwyp.cjs +0 -15
- package/dist/decompress-D5RzmD-2.js +0 -566
- package/dist/go-By8nj0Vi.cjs +0 -1
- package/dist/go-C8VcBUsu.js +0 -156
- package/dist/index-C99_zLhc.js +0 -175
- package/dist/index-D8N6IfRw.cjs +0 -1
- package/dist/java-BoRJOXvw.js +0 -249
- package/dist/java-DFXAwvvK.cjs +0 -1
- package/dist/javascript-C2jY0XE6.cjs +0 -1
- package/dist/javascript-CgRUYx2b.js +0 -660
- package/dist/json-C4rahuoJ.cjs +0 -1
- package/dist/json-DYK-YbD3.js +0 -44
- package/dist/markdown-BmL9j9cU.cjs +0 -1
- package/dist/markdown-D19noYwn.js +0 -215
- package/dist/markdown-it-5-ieF6Bh.js +0 -3790
- package/dist/markdown-it-CLB5Jta6.cjs +0 -16
- package/dist/postal-mime-Df-WB8Vq.js +0 -3337
- package/dist/postal-mime-_7WF5UBe.cjs +0 -28
- package/dist/python-BBUuE3AY.js +0 -404
- package/dist/python-Clt6L10q.cjs +0 -1
- package/dist/rust-DY-oA2gr.js +0 -319
- package/dist/rust-_vvcEGSJ.cjs +0 -1
- package/dist/scss-BWo_aR1L.js +0 -919
- package/dist/scss-ex7iHSUb.cjs +0 -1
- package/dist/sql-BSlOauVK.cjs +0 -1
- package/dist/sql-IeKX8fQ8.js +0 -615
- package/dist/typescript-BHqLHF13.js +0 -755
- package/dist/typescript-DYRnLHqF.cjs +0 -1
- package/dist/unzipit.module-4zGfAuq6.cjs +0 -1
- package/dist/unzipit.module-qN5XWVVT.js +0 -649
- package/dist/xlsx-BopDBbWb.js +0 -24176
- package/dist/xlsx-qn1xoUuv.cjs +0 -105
- package/dist/xml-Bse49fPV.js +0 -212
- package/dist/xml-CVmug_x4.cjs +0 -1
- package/dist/yaml-BslECvWp.js +0 -183
- package/dist/yaml-C6zsmLZx.cjs +0 -1
package/dist/theme.mjs
CHANGED
|
@@ -1,1313 +1,1434 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var e = Object.defineProperty, t = (t, n) => {
|
|
3
|
+
let r = {};
|
|
4
|
+
for (var i in t) e(r, i, {
|
|
5
|
+
get: t[i],
|
|
6
|
+
enumerable: !0
|
|
7
|
+
});
|
|
8
|
+
return n || e(r, Symbol.toStringTag, { value: "Module" }), r;
|
|
9
|
+
}, n = /* @__PURE__ */ "color-scheme.surface.surface-rgb.surface-1.surface-1-rgb.surface-2.surface-2-rgb.surface-3.surface-inverse.scrim.ink.ink-rgb.text.text-muted.text-faint.text-inverse.text-on-surface-rgb.text-on-inverse-rgb.border.border-strong.divider.border-rgb.fill.fill-hover.fill-active.field.field-hover.field-focus.hover.pressed.primary.primary-rgb.primary-hover.primary-active.on-primary.primary-text.primary-border.primary-soft.primary-soft-hover.focus-ring.focus-ring-width.focus-ring-offset.primary-dark.primary-dark-rgb.primary-light.primary-light-rgb.primary-bright.primary-bright-rgb.success.success-rgb.on-success.success-text.success-soft.success-border.success-dark-rgb.success-light-rgb.success-darker-rgb.warning.warning-rgb.on-warning.warning-text.warning-soft.warning-border.warning-dark-rgb.warning-light-rgb.warning-darker-rgb.error.error-rgb.on-error.error-text.error-soft.error-border.error-dark-rgb.error-light-rgb.error-darker-rgb.info.info-rgb.on-info.info-text.info-soft.info-border.info-dark-rgb.info-light-rgb.info-bright-rgb.shadow-1.shadow-2.shadow-3.radius-sm.radius-md.radius-lg.radius-full.font-family.font-family-heading.font-size.root-font-size.canvas.canvas-image.canvas-control.canvas-control-hover.on-canvas-control.disabled-opacity".split("."), r = "--bx-", i = [
|
|
10
|
+
{
|
|
11
|
+
label: "Surfaces",
|
|
12
|
+
tokens: [
|
|
13
|
+
"surface",
|
|
14
|
+
"surface-1",
|
|
15
|
+
"surface-2",
|
|
16
|
+
"surface-3",
|
|
17
|
+
"surface-inverse",
|
|
18
|
+
"scrim"
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
label: "Text",
|
|
23
|
+
tokens: [
|
|
24
|
+
"text",
|
|
25
|
+
"text-muted",
|
|
26
|
+
"text-faint",
|
|
27
|
+
"text-inverse"
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
label: "Borders",
|
|
32
|
+
tokens: [
|
|
33
|
+
"border",
|
|
34
|
+
"border-strong",
|
|
35
|
+
"divider"
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
label: "Neutral fills",
|
|
40
|
+
tokens: [
|
|
41
|
+
"fill",
|
|
42
|
+
"fill-hover",
|
|
43
|
+
"fill-active",
|
|
44
|
+
"field",
|
|
45
|
+
"field-hover",
|
|
46
|
+
"field-focus",
|
|
47
|
+
"hover",
|
|
48
|
+
"pressed"
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
label: "Primary",
|
|
53
|
+
tokens: [
|
|
54
|
+
"primary",
|
|
55
|
+
"primary-hover",
|
|
56
|
+
"primary-active",
|
|
57
|
+
"on-primary",
|
|
58
|
+
"primary-text",
|
|
59
|
+
"primary-border",
|
|
60
|
+
"primary-soft",
|
|
61
|
+
"primary-soft-hover",
|
|
62
|
+
"focus-ring"
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
label: "Success",
|
|
67
|
+
tokens: [
|
|
68
|
+
"success",
|
|
69
|
+
"on-success",
|
|
70
|
+
"success-text",
|
|
71
|
+
"success-soft",
|
|
72
|
+
"success-border"
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
label: "Warning",
|
|
77
|
+
tokens: [
|
|
78
|
+
"warning",
|
|
79
|
+
"on-warning",
|
|
80
|
+
"warning-text",
|
|
81
|
+
"warning-soft",
|
|
82
|
+
"warning-border"
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
label: "Error",
|
|
87
|
+
tokens: [
|
|
88
|
+
"error",
|
|
89
|
+
"on-error",
|
|
90
|
+
"error-text",
|
|
91
|
+
"error-soft",
|
|
92
|
+
"error-border"
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
label: "Info",
|
|
97
|
+
tokens: [
|
|
98
|
+
"info",
|
|
99
|
+
"on-info",
|
|
100
|
+
"info-text",
|
|
101
|
+
"info-soft",
|
|
102
|
+
"info-border"
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
label: "Shape & type",
|
|
107
|
+
tokens: [
|
|
108
|
+
"radius-sm",
|
|
109
|
+
"radius-md",
|
|
110
|
+
"radius-lg",
|
|
111
|
+
"radius-full",
|
|
112
|
+
"font-family",
|
|
113
|
+
"font-family-heading",
|
|
114
|
+
"font-size"
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
label: "Canvas",
|
|
119
|
+
tokens: [
|
|
120
|
+
"canvas",
|
|
121
|
+
"canvas-control",
|
|
122
|
+
"on-canvas-control"
|
|
123
|
+
]
|
|
124
|
+
}
|
|
125
|
+
], a = {
|
|
126
|
+
dark: {
|
|
127
|
+
surface: "#27262e",
|
|
128
|
+
primary: "#4472c7"
|
|
129
|
+
},
|
|
130
|
+
light: {
|
|
131
|
+
surface: "#f2f2f2",
|
|
132
|
+
primary: "#124bba"
|
|
133
|
+
}
|
|
134
|
+
}, o = [
|
|
135
|
+
{
|
|
136
|
+
key: "light",
|
|
137
|
+
label: "Light",
|
|
138
|
+
description: "Neutral light surfaces, Bluepic blue.",
|
|
139
|
+
input: {
|
|
140
|
+
version: 2,
|
|
141
|
+
preset: "light"
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
key: "dark",
|
|
146
|
+
label: "Dark",
|
|
147
|
+
description: "Neutral dark surfaces, Bluepic blue.",
|
|
148
|
+
input: {
|
|
149
|
+
version: 2,
|
|
150
|
+
preset: "dark"
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
key: "midnight",
|
|
155
|
+
label: "Midnight",
|
|
156
|
+
description: "Near-black with cool, slightly tinted surfaces.",
|
|
157
|
+
input: {
|
|
158
|
+
version: 2,
|
|
159
|
+
surface: "#0f1117",
|
|
160
|
+
primary: "#7da8f7",
|
|
161
|
+
tint: .35
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
key: "paper",
|
|
166
|
+
label: "Paper",
|
|
167
|
+
description: "Warm off-white, ink-black actions, crisp corners.",
|
|
168
|
+
input: {
|
|
169
|
+
version: 2,
|
|
170
|
+
surface: "#fbf8f1",
|
|
171
|
+
primary: "#1f1f1f",
|
|
172
|
+
radius: "sm"
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
key: "slate",
|
|
177
|
+
label: "Slate",
|
|
178
|
+
description: "Blue-grey dark surfaces with a teal accent.",
|
|
179
|
+
input: {
|
|
180
|
+
version: 2,
|
|
181
|
+
surface: "#1e2530",
|
|
182
|
+
primary: "#4fd1c5",
|
|
183
|
+
tint: .4
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
key: "sand",
|
|
188
|
+
label: "Sand",
|
|
189
|
+
description: "Soft sand surfaces with a terracotta accent, rounded.",
|
|
190
|
+
input: {
|
|
191
|
+
version: 2,
|
|
192
|
+
surface: "#f3ede3",
|
|
193
|
+
primary: "#b5562c",
|
|
194
|
+
radius: "lg"
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
key: "forest",
|
|
199
|
+
label: "Forest",
|
|
200
|
+
description: "Deep green surfaces with a mint accent.",
|
|
201
|
+
input: {
|
|
202
|
+
version: 2,
|
|
203
|
+
surface: "#0e1f17",
|
|
204
|
+
primary: "#7ad39a",
|
|
205
|
+
tint: .5
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
key: "ocean",
|
|
210
|
+
label: "Ocean",
|
|
211
|
+
description: "Cool light surfaces with a deep blue accent, pill shapes.",
|
|
212
|
+
input: {
|
|
213
|
+
version: 2,
|
|
214
|
+
surface: "#eef4fb",
|
|
215
|
+
primary: "#0b5cad",
|
|
216
|
+
tint: .3,
|
|
217
|
+
radius: "full"
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
key: "graphite",
|
|
222
|
+
label: "Graphite",
|
|
223
|
+
description: "Pure black, high contrast, sharp corners — signage and dark brands.",
|
|
224
|
+
input: {
|
|
225
|
+
version: 2,
|
|
226
|
+
surface: "#000000",
|
|
227
|
+
primary: "#ffffff",
|
|
228
|
+
radius: "none",
|
|
229
|
+
contrast: "high"
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
key: "plum",
|
|
234
|
+
label: "Plum",
|
|
235
|
+
description: "Deep aubergine surfaces with a warm coral accent.",
|
|
236
|
+
input: {
|
|
237
|
+
version: 2,
|
|
238
|
+
surface: "#1f1423",
|
|
239
|
+
primary: "#ff7a59",
|
|
240
|
+
tint: .45,
|
|
241
|
+
radius: "lg"
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
key: "linen",
|
|
246
|
+
label: "Linen",
|
|
247
|
+
description: "Soft white linen with a muted navy accent, rounded.",
|
|
248
|
+
input: {
|
|
249
|
+
version: 2,
|
|
250
|
+
surface: "#f7f7f4",
|
|
251
|
+
primary: "#2f3e5c",
|
|
252
|
+
tint: .15,
|
|
253
|
+
radius: "lg"
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
], s = {
|
|
257
|
+
success: "#28a552",
|
|
258
|
+
warning: "#d9a400",
|
|
259
|
+
error: "#dc2f2f",
|
|
260
|
+
info: "#3b82f6"
|
|
261
|
+
}, c = /* @__PURE__ */ t({
|
|
262
|
+
BLACK: () => u,
|
|
263
|
+
WHITE: () => l,
|
|
264
|
+
adjustL: () => H,
|
|
265
|
+
bestOn: () => ue,
|
|
266
|
+
composite: () => z,
|
|
267
|
+
contrastRatio: () => R,
|
|
268
|
+
ensureContrast: () => K,
|
|
269
|
+
formatHex: () => se,
|
|
270
|
+
formatRgb: () => F,
|
|
271
|
+
formatTriplet: () => I,
|
|
272
|
+
fromOklch: () => oe,
|
|
273
|
+
isDarkSurface: () => le,
|
|
274
|
+
lightness: () => ce,
|
|
275
|
+
mix: () => B,
|
|
276
|
+
parseColor: () => E,
|
|
277
|
+
relativeLuminance: () => L,
|
|
278
|
+
setL: () => U,
|
|
279
|
+
toOklch: () => P,
|
|
280
|
+
withAlpha: () => V
|
|
281
|
+
}), l = Object.freeze({
|
|
282
|
+
r: 255,
|
|
283
|
+
g: 255,
|
|
284
|
+
b: 255,
|
|
285
|
+
a: 1
|
|
286
|
+
}), u = Object.freeze({
|
|
287
|
+
r: 0,
|
|
288
|
+
g: 0,
|
|
289
|
+
b: 0,
|
|
290
|
+
a: 1
|
|
291
|
+
}), d = [l, Object.freeze({
|
|
292
|
+
r: 17,
|
|
293
|
+
g: 17,
|
|
294
|
+
b: 17,
|
|
295
|
+
a: 1
|
|
296
|
+
})], f = (e, t, n) => e < t ? t : e > n ? n : e, p = (e) => f(e, 0, 1), m = (e, t = 0) => Number.isFinite(e) ? e : t, h = (e, t, n, r = 1) => ({
|
|
297
|
+
r: e,
|
|
298
|
+
g: t,
|
|
299
|
+
b: n,
|
|
300
|
+
a: r
|
|
301
|
+
}), g = (e) => Math.round(f(m(e), 0, 255)), _ = (e) => g(e).toString(16).padStart(2, "0"), v = {
|
|
302
|
+
aliceblue: 15792383,
|
|
303
|
+
antiquewhite: 16444375,
|
|
304
|
+
aqua: 65535,
|
|
305
|
+
aquamarine: 8388564,
|
|
306
|
+
azure: 15794175,
|
|
307
|
+
beige: 16119260,
|
|
308
|
+
bisque: 16770244,
|
|
309
|
+
black: 0,
|
|
310
|
+
blanchedalmond: 16772045,
|
|
311
|
+
blue: 255,
|
|
312
|
+
blueviolet: 9055202,
|
|
313
|
+
brown: 10824234,
|
|
314
|
+
burlywood: 14596231,
|
|
315
|
+
cadetblue: 6266528,
|
|
316
|
+
chartreuse: 8388352,
|
|
317
|
+
chocolate: 13789470,
|
|
318
|
+
coral: 16744272,
|
|
319
|
+
cornflowerblue: 6591981,
|
|
320
|
+
cornsilk: 16775388,
|
|
321
|
+
crimson: 14423100,
|
|
322
|
+
cyan: 65535,
|
|
323
|
+
darkblue: 139,
|
|
324
|
+
darkcyan: 35723,
|
|
325
|
+
darkgoldenrod: 12092939,
|
|
326
|
+
darkgray: 11119017,
|
|
327
|
+
darkgreen: 25600,
|
|
328
|
+
darkgrey: 11119017,
|
|
329
|
+
darkkhaki: 12433259,
|
|
330
|
+
darkmagenta: 9109643,
|
|
331
|
+
darkolivegreen: 5597999,
|
|
332
|
+
darkorange: 16747520,
|
|
333
|
+
darkorchid: 10040012,
|
|
334
|
+
darkred: 9109504,
|
|
335
|
+
darksalmon: 15308410,
|
|
336
|
+
darkseagreen: 9419919,
|
|
337
|
+
darkslateblue: 4734347,
|
|
338
|
+
darkslategray: 3100495,
|
|
339
|
+
darkslategrey: 3100495,
|
|
340
|
+
darkturquoise: 52945,
|
|
341
|
+
darkviolet: 9699539,
|
|
342
|
+
deeppink: 16716947,
|
|
343
|
+
deepskyblue: 49151,
|
|
344
|
+
dimgray: 6908265,
|
|
345
|
+
dimgrey: 6908265,
|
|
346
|
+
dodgerblue: 2003199,
|
|
347
|
+
firebrick: 11674146,
|
|
348
|
+
floralwhite: 16775920,
|
|
349
|
+
forestgreen: 2263842,
|
|
350
|
+
fuchsia: 16711935,
|
|
351
|
+
gainsboro: 14474460,
|
|
352
|
+
ghostwhite: 16316671,
|
|
353
|
+
gold: 16766720,
|
|
354
|
+
goldenrod: 14329120,
|
|
355
|
+
gray: 8421504,
|
|
356
|
+
green: 32768,
|
|
357
|
+
greenyellow: 11403055,
|
|
358
|
+
grey: 8421504,
|
|
359
|
+
honeydew: 15794160,
|
|
360
|
+
hotpink: 16738740,
|
|
361
|
+
indianred: 13458524,
|
|
362
|
+
indigo: 4915330,
|
|
363
|
+
ivory: 16777200,
|
|
364
|
+
khaki: 15787660,
|
|
365
|
+
lavender: 15132410,
|
|
366
|
+
lavenderblush: 16773365,
|
|
367
|
+
lawngreen: 8190976,
|
|
368
|
+
lemonchiffon: 16775885,
|
|
369
|
+
lightblue: 11393254,
|
|
370
|
+
lightcoral: 15761536,
|
|
371
|
+
lightcyan: 14745599,
|
|
372
|
+
lightgoldenrodyellow: 16448210,
|
|
373
|
+
lightgray: 13882323,
|
|
374
|
+
lightgreen: 9498256,
|
|
375
|
+
lightgrey: 13882323,
|
|
376
|
+
lightpink: 16758465,
|
|
377
|
+
lightsalmon: 16752762,
|
|
378
|
+
lightseagreen: 2142890,
|
|
379
|
+
lightskyblue: 8900346,
|
|
380
|
+
lightslategray: 7833753,
|
|
381
|
+
lightslategrey: 7833753,
|
|
382
|
+
lightsteelblue: 11584734,
|
|
383
|
+
lightyellow: 16777184,
|
|
384
|
+
lime: 65280,
|
|
385
|
+
limegreen: 3329330,
|
|
386
|
+
linen: 16445670,
|
|
387
|
+
magenta: 16711935,
|
|
388
|
+
maroon: 8388608,
|
|
389
|
+
mediumaquamarine: 6737322,
|
|
390
|
+
mediumblue: 205,
|
|
391
|
+
mediumorchid: 12211667,
|
|
392
|
+
mediumpurple: 9662683,
|
|
393
|
+
mediumseagreen: 3978097,
|
|
394
|
+
mediumslateblue: 8087790,
|
|
395
|
+
mediumspringgreen: 64154,
|
|
396
|
+
mediumturquoise: 4772300,
|
|
397
|
+
mediumvioletred: 13047173,
|
|
398
|
+
midnightblue: 1644912,
|
|
399
|
+
mintcream: 16121850,
|
|
400
|
+
mistyrose: 16770273,
|
|
401
|
+
moccasin: 16770229,
|
|
402
|
+
navajowhite: 16768685,
|
|
403
|
+
navy: 128,
|
|
404
|
+
oldlace: 16643558,
|
|
405
|
+
olive: 8421376,
|
|
406
|
+
olivedrab: 7048739,
|
|
407
|
+
orange: 16753920,
|
|
408
|
+
orangered: 16729344,
|
|
409
|
+
orchid: 14315734,
|
|
410
|
+
palegoldenrod: 15657130,
|
|
411
|
+
palegreen: 10025880,
|
|
412
|
+
paleturquoise: 11529966,
|
|
413
|
+
palevioletred: 14381203,
|
|
414
|
+
papayawhip: 16773077,
|
|
415
|
+
peachpuff: 16767673,
|
|
416
|
+
peru: 13468991,
|
|
417
|
+
pink: 16761035,
|
|
418
|
+
plum: 14524637,
|
|
419
|
+
powderblue: 11591910,
|
|
420
|
+
purple: 8388736,
|
|
421
|
+
rebeccapurple: 6697881,
|
|
422
|
+
red: 16711680,
|
|
423
|
+
rosybrown: 12357519,
|
|
424
|
+
royalblue: 4286945,
|
|
425
|
+
saddlebrown: 9127187,
|
|
426
|
+
salmon: 16416882,
|
|
427
|
+
sandybrown: 16032864,
|
|
428
|
+
seagreen: 3050327,
|
|
429
|
+
seashell: 16774638,
|
|
430
|
+
sienna: 10506797,
|
|
431
|
+
silver: 12632256,
|
|
432
|
+
skyblue: 8900331,
|
|
433
|
+
slateblue: 6970061,
|
|
434
|
+
slategray: 7372944,
|
|
435
|
+
slategrey: 7372944,
|
|
436
|
+
snow: 16775930,
|
|
437
|
+
springgreen: 65407,
|
|
438
|
+
steelblue: 4620980,
|
|
439
|
+
tan: 13808780,
|
|
440
|
+
teal: 32896,
|
|
441
|
+
thistle: 14204888,
|
|
442
|
+
tomato: 16737095,
|
|
443
|
+
turquoise: 4251856,
|
|
444
|
+
violet: 15631086,
|
|
445
|
+
wheat: 16113331,
|
|
446
|
+
white: 16777215,
|
|
447
|
+
whitesmoke: 16119285,
|
|
448
|
+
yellow: 16776960,
|
|
449
|
+
yellowgreen: 10145074
|
|
450
|
+
}, y = /^[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?$/, b = /^([+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?)(deg|turn|rad|grad)?$/, x = /^(rgba?|hsla?)\(\s*(.*?)\s*\)$/;
|
|
451
|
+
function S(e) {
|
|
452
|
+
if (e === "none") return {
|
|
453
|
+
value: 0,
|
|
454
|
+
percent: !1
|
|
455
|
+
};
|
|
456
|
+
let t = e.endsWith("%"), n = t ? e.slice(0, -1) : e;
|
|
457
|
+
if (!y.test(n)) return null;
|
|
458
|
+
let r = Number(n);
|
|
459
|
+
return Number.isFinite(r) ? {
|
|
460
|
+
value: r,
|
|
461
|
+
percent: t
|
|
462
|
+
} : null;
|
|
332
463
|
}
|
|
333
|
-
function
|
|
334
|
-
|
|
335
|
-
|
|
464
|
+
function C(e) {
|
|
465
|
+
let t = S(e);
|
|
466
|
+
return t ? f(t.percent ? t.value * 255 / 100 : t.value, 0, 255) : null;
|
|
336
467
|
}
|
|
337
|
-
function
|
|
338
|
-
|
|
339
|
-
|
|
468
|
+
function w(e) {
|
|
469
|
+
let t = S(e);
|
|
470
|
+
return t ? p(t.percent ? t.value / 100 : t.value) : null;
|
|
340
471
|
}
|
|
341
|
-
function
|
|
342
|
-
|
|
343
|
-
|
|
472
|
+
function ee(e) {
|
|
473
|
+
let t = S(e);
|
|
474
|
+
return t ? p(t.value / 100) : null;
|
|
344
475
|
}
|
|
345
|
-
function
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
}
|
|
362
|
-
return t %= 360, t < 0 && (t += 360), t;
|
|
476
|
+
function T(e) {
|
|
477
|
+
if (e === "none") return 0;
|
|
478
|
+
let t = b.exec(e);
|
|
479
|
+
if (!t) return null;
|
|
480
|
+
let n = Number(t[1]);
|
|
481
|
+
if (!Number.isFinite(n)) return null;
|
|
482
|
+
switch (t[2]) {
|
|
483
|
+
case "turn":
|
|
484
|
+
n *= 360;
|
|
485
|
+
break;
|
|
486
|
+
case "rad":
|
|
487
|
+
n *= 180 / Math.PI;
|
|
488
|
+
break;
|
|
489
|
+
case "grad": n *= .9;
|
|
490
|
+
}
|
|
491
|
+
return n %= 360, n < 0 && (n += 360), n;
|
|
363
492
|
}
|
|
364
|
-
function
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
493
|
+
function te(e) {
|
|
494
|
+
if (e.includes(",")) {
|
|
495
|
+
if (e.includes("/")) return null;
|
|
496
|
+
let t = e.split(",").map((e) => e.trim());
|
|
497
|
+
return t.length !== 3 && t.length !== 4 || t.some((e) => e === "" || /\s/.test(e)) ? null : {
|
|
498
|
+
ch: [
|
|
499
|
+
t[0],
|
|
500
|
+
t[1],
|
|
501
|
+
t[2]
|
|
502
|
+
],
|
|
503
|
+
alpha: t[3]
|
|
504
|
+
};
|
|
505
|
+
}
|
|
506
|
+
let t = e.split("/");
|
|
507
|
+
if (t.length > 2) return null;
|
|
508
|
+
let n = t[0].trim().split(/\s+/);
|
|
509
|
+
if (n.length !== 3) return null;
|
|
510
|
+
let r;
|
|
511
|
+
return t.length === 2 && (r = t[1].trim(), r === "" || /\s/.test(r)) ? null : {
|
|
512
|
+
ch: [
|
|
513
|
+
n[0],
|
|
514
|
+
n[1],
|
|
515
|
+
n[2]
|
|
516
|
+
],
|
|
517
|
+
alpha: r
|
|
518
|
+
};
|
|
376
519
|
}
|
|
377
|
-
function
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
520
|
+
function ne(e, t, n) {
|
|
521
|
+
let r = (r) => {
|
|
522
|
+
let i = (r + e / 30) % 12;
|
|
523
|
+
return n - t * Math.min(n, 1 - n) * Math.max(-1, Math.min(i - 3, 9 - i, 1));
|
|
524
|
+
};
|
|
525
|
+
return [
|
|
526
|
+
r(0) * 255,
|
|
527
|
+
r(8) * 255,
|
|
528
|
+
r(4) * 255
|
|
529
|
+
];
|
|
383
530
|
}
|
|
384
|
-
function
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
if (n.length !== 3 || !n.every((d) => Br.test(d))) return null;
|
|
426
|
-
const [c, s, i] = n.map((d) => pr(Number(d), 0, 255));
|
|
427
|
-
return k(c, s, i, 1);
|
|
428
|
-
}
|
|
429
|
-
return null;
|
|
531
|
+
function E(e) {
|
|
532
|
+
if (typeof e != "string") return null;
|
|
533
|
+
let t = e.trim().toLowerCase();
|
|
534
|
+
if (!t) return null;
|
|
535
|
+
if (t === "transparent") return h(0, 0, 0, 0);
|
|
536
|
+
let n = v[t];
|
|
537
|
+
if (n !== void 0) return h(n >> 16, n >> 8 & 255, n & 255, 1);
|
|
538
|
+
if (t[0] === "#") {
|
|
539
|
+
let e = t.slice(1);
|
|
540
|
+
if (!/^[0-9a-f]+$/.test(e)) return null;
|
|
541
|
+
let n = (t) => parseInt(e[t], 16), r = (t) => parseInt(e.slice(t, t + 2), 16);
|
|
542
|
+
switch (e.length) {
|
|
543
|
+
case 3: return h(n(0) * 17, n(1) * 17, n(2) * 17, 1);
|
|
544
|
+
case 4: return h(n(0) * 17, n(1) * 17, n(2) * 17, n(3) * 17 / 255);
|
|
545
|
+
case 6: return h(r(0), r(2), r(4), 1);
|
|
546
|
+
case 8: return h(r(0), r(2), r(4), r(6) / 255);
|
|
547
|
+
default: return null;
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
let r = x.exec(t);
|
|
551
|
+
if (r) {
|
|
552
|
+
let e = te(r[2]);
|
|
553
|
+
if (!e) return null;
|
|
554
|
+
let t = e.alpha === void 0 ? 1 : w(e.alpha);
|
|
555
|
+
if (t === null) return null;
|
|
556
|
+
if (r[1] === "rgb" || r[1] === "rgba") {
|
|
557
|
+
let n = C(e.ch[0]), r = C(e.ch[1]), i = C(e.ch[2]);
|
|
558
|
+
return n === null || r === null || i === null ? null : h(n, r, i, t);
|
|
559
|
+
}
|
|
560
|
+
let n = T(e.ch[0]), i = ee(e.ch[1]), a = ee(e.ch[2]);
|
|
561
|
+
if (n === null || i === null || a === null) return null;
|
|
562
|
+
let [o, s, c] = ne(n, i, a);
|
|
563
|
+
return h(o, s, c, t);
|
|
564
|
+
}
|
|
565
|
+
if (t.includes(",")) {
|
|
566
|
+
let e = t.split(",").map((e) => e.trim());
|
|
567
|
+
if (e.length !== 3 || !e.every((e) => y.test(e))) return null;
|
|
568
|
+
let [n, r, i] = e.map((e) => f(Number(e), 0, 255));
|
|
569
|
+
return h(n, r, i, 1);
|
|
570
|
+
}
|
|
571
|
+
return null;
|
|
430
572
|
}
|
|
431
|
-
function
|
|
432
|
-
|
|
433
|
-
|
|
573
|
+
function D(e) {
|
|
574
|
+
let t = p(e);
|
|
575
|
+
return t <= .04045 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
|
|
434
576
|
}
|
|
435
|
-
function
|
|
436
|
-
|
|
437
|
-
|
|
577
|
+
function O(e) {
|
|
578
|
+
let t = p(e);
|
|
579
|
+
return t <= .0031308 ? t * 12.92 : 1.055 * t ** (1 / 2.4) - .055;
|
|
438
580
|
}
|
|
439
|
-
function
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
581
|
+
function re(e, t, n) {
|
|
582
|
+
let r = .4122214708 * e + .5363325363 * t + .0514459929 * n, i = .2119034982 * e + .6806995451 * t + .1073969566 * n, a = .0883024619 * e + .2817188376 * t + .6299787005 * n, o = Math.cbrt(r), s = Math.cbrt(i), c = Math.cbrt(a);
|
|
583
|
+
return {
|
|
584
|
+
L: .2104542553 * o + .793617785 * s - .0040720468 * c,
|
|
585
|
+
a: 1.9779984951 * o - 2.428592205 * s + .4505937099 * c,
|
|
586
|
+
b: .0259040371 * o + .7827717662 * s - .808675766 * c
|
|
587
|
+
};
|
|
446
588
|
}
|
|
447
|
-
function
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
589
|
+
function k(e, t, n) {
|
|
590
|
+
let r = e + .3963377774 * t + .2158037573 * n, i = e - .1055613458 * t - .0638541728 * n, a = e - .0894841775 * t - 1.291485548 * n, o = r * r * r, s = i * i * i, c = a * a * a;
|
|
591
|
+
return [
|
|
592
|
+
4.0767416621 * o - 3.3077115913 * s + .2309699292 * c,
|
|
593
|
+
-1.2684380046 * o + 2.6097574011 * s - .3413193965 * c,
|
|
594
|
+
-.0041960863 * o - .7034186147 * s + 1.707614701 * c
|
|
595
|
+
];
|
|
454
596
|
}
|
|
455
|
-
function
|
|
456
|
-
|
|
597
|
+
function A(e) {
|
|
598
|
+
return re(D(e.r / 255), D(e.g / 255), D(e.b / 255));
|
|
457
599
|
}
|
|
458
|
-
|
|
459
|
-
function
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
600
|
+
var ie = 1e-6;
|
|
601
|
+
function j(e) {
|
|
602
|
+
let t = Math.hypot(e.a, e.b), n = t < ie ? 0 : Math.atan2(e.b, e.a) * 180 / Math.PI;
|
|
603
|
+
return n < 0 && (n += 360), n >= 360 && (n -= 360), {
|
|
604
|
+
l: e.L,
|
|
605
|
+
c: t,
|
|
606
|
+
h: n
|
|
607
|
+
};
|
|
463
608
|
}
|
|
464
|
-
function
|
|
465
|
-
|
|
466
|
-
|
|
609
|
+
function M(e, t, n) {
|
|
610
|
+
let r = n * Math.PI / 180;
|
|
611
|
+
return {
|
|
612
|
+
L: e,
|
|
613
|
+
a: t * Math.cos(r),
|
|
614
|
+
b: t * Math.sin(r)
|
|
615
|
+
};
|
|
467
616
|
}
|
|
468
|
-
|
|
469
|
-
function
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
c = g, i = yr(n, c, s), d = vr(i.L, i.a, i.b);
|
|
481
|
-
}
|
|
482
|
-
return k(mr(d[0]) * 255, mr(d[1]) * 255, mr(d[2]) * 255, w(y(a, 1)));
|
|
617
|
+
var ae = (e) => e[0] >= -1e-6 && e[0] <= 1.000001 && e[1] >= -1e-6 && e[1] <= 1.000001 && e[2] >= -1e-6 && e[2] <= 1.000001;
|
|
618
|
+
function N(e, t, n, r) {
|
|
619
|
+
let i = p(m(e)), a = Math.max(0, m(t)), o = m(n), s = M(i, a, o), c = k(s.L, s.a, s.b);
|
|
620
|
+
if (!ae(c)) {
|
|
621
|
+
let e = 0, t = a;
|
|
622
|
+
for (let n = 0; n < 24; n++) {
|
|
623
|
+
let n = (e + t) / 2, r = M(i, n, o);
|
|
624
|
+
ae(k(r.L, r.a, r.b)) ? e = n : t = n;
|
|
625
|
+
}
|
|
626
|
+
a = e, s = M(i, a, o), c = k(s.L, s.a, s.b);
|
|
627
|
+
}
|
|
628
|
+
return h(O(c[0]) * 255, O(c[1]) * 255, O(c[2]) * 255, p(m(r, 1)));
|
|
483
629
|
}
|
|
484
|
-
function
|
|
485
|
-
|
|
486
|
-
|
|
630
|
+
function P(e) {
|
|
631
|
+
let t = j(A(e));
|
|
632
|
+
return {
|
|
633
|
+
l: t.l,
|
|
634
|
+
c: t.c,
|
|
635
|
+
h: t.h,
|
|
636
|
+
a: p(m(e.a, 1))
|
|
637
|
+
};
|
|
487
638
|
}
|
|
488
|
-
function
|
|
489
|
-
|
|
639
|
+
function oe(e) {
|
|
640
|
+
return N(e.l, e.c, e.h, e.a);
|
|
490
641
|
}
|
|
491
|
-
function
|
|
492
|
-
|
|
493
|
-
|
|
642
|
+
function se(e) {
|
|
643
|
+
let t = p(m(e.a, 1)), n = `#${_(e.r)}${_(e.g)}${_(e.b)}`;
|
|
644
|
+
return t < 1 ? `${n}${_(t * 255)}` : n;
|
|
494
645
|
}
|
|
495
|
-
function
|
|
496
|
-
|
|
497
|
-
|
|
646
|
+
function F(e) {
|
|
647
|
+
let t = p(m(e.a, 1)), n = g(e.r), r = g(e.g), i = g(e.b);
|
|
648
|
+
return t >= 1 ? `rgb(${n}, ${r}, ${i})` : `rgba(${n}, ${r}, ${i}, ${Number(t.toFixed(3))})`;
|
|
498
649
|
}
|
|
499
|
-
function
|
|
500
|
-
|
|
650
|
+
function I(e) {
|
|
651
|
+
return `${g(e.r)}, ${g(e.g)}, ${g(e.b)}`;
|
|
501
652
|
}
|
|
502
|
-
function
|
|
503
|
-
|
|
653
|
+
function L(e) {
|
|
654
|
+
return .2126 * D(m(e.r) / 255) + .7152 * D(m(e.g) / 255) + .0722 * D(m(e.b) / 255);
|
|
504
655
|
}
|
|
505
|
-
function
|
|
506
|
-
|
|
507
|
-
|
|
656
|
+
function R(e, t) {
|
|
657
|
+
let n = t.a >= 1 ? t : h(t.r, t.g, t.b, 1), r = L(e.a < 1 ? z(e, n) : e), i = L(n), a = Math.max(r, i), o = Math.min(r, i);
|
|
658
|
+
return (a + .05) / (o + .05);
|
|
508
659
|
}
|
|
509
|
-
function
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
660
|
+
function z(e, t) {
|
|
661
|
+
let n = p(m(e.a, 1)), r = p(m(t.a, 1)), i = n + r * (1 - n);
|
|
662
|
+
if (i <= 0) return h(0, 0, 0, 0);
|
|
663
|
+
let a = r * (1 - n) / i, o = n / i;
|
|
664
|
+
return h(e.r * o + t.r * a, e.g * o + t.g * a, e.b * o + t.b * a, i);
|
|
514
665
|
}
|
|
515
|
-
function
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
666
|
+
function B(e, t, n) {
|
|
667
|
+
let r = p(m(n));
|
|
668
|
+
if (r <= 0) return h(e.r, e.g, e.b, p(m(e.a, 1)));
|
|
669
|
+
if (r >= 1) return h(t.r, t.g, t.b, p(m(t.a, 1)));
|
|
670
|
+
let i = p(m(e.a, 1)), a = p(m(t.a, 1)), o = A(e), s = A(t), c = i + (a - i) * r, l = c > 0 ? i * (1 - r) / c : 1 - r, u = c > 0 ? a * r / c : r, d = j({
|
|
671
|
+
L: o.L * l + s.L * u,
|
|
672
|
+
a: o.a * l + s.a * u,
|
|
673
|
+
b: o.b * l + s.b * u
|
|
674
|
+
});
|
|
675
|
+
return N(d.l, d.c, d.h, c);
|
|
521
676
|
}
|
|
522
|
-
function
|
|
523
|
-
|
|
677
|
+
function V(e, t) {
|
|
678
|
+
return h(e.r, e.g, e.b, p(m(t, 1)));
|
|
524
679
|
}
|
|
525
|
-
function
|
|
526
|
-
|
|
680
|
+
function ce(e) {
|
|
681
|
+
return A(e).L;
|
|
527
682
|
}
|
|
528
|
-
function
|
|
529
|
-
|
|
530
|
-
|
|
683
|
+
function H(e, t) {
|
|
684
|
+
let n = P(e);
|
|
685
|
+
return N(p(n.l + m(t)), n.c, n.h, n.a);
|
|
531
686
|
}
|
|
532
|
-
function
|
|
533
|
-
|
|
534
|
-
|
|
687
|
+
function U(e, t) {
|
|
688
|
+
let n = P(e);
|
|
689
|
+
return N(p(m(t)), n.c, n.h, n.a);
|
|
535
690
|
}
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
691
|
+
var W = [
|
|
692
|
+
1,
|
|
693
|
+
.75,
|
|
694
|
+
.5,
|
|
695
|
+
.25,
|
|
696
|
+
0
|
|
697
|
+
], G = 24;
|
|
698
|
+
function K(e, t, n, r = "auto") {
|
|
699
|
+
let i = m(n, 1);
|
|
700
|
+
if (R(e, t) >= i) return e;
|
|
701
|
+
let a = P(e), o = h(t.r, t.g, t.b, 1), s = L(o), c = (e, t) => N(e, t, a.h, a.a), l = (e) => R(e, o), u = (e) => L(e.a < 1 ? z(e, o) : e), d = (e) => h(Math.round(e.r), Math.round(e.g), Math.round(e.b), e.a), f = (e) => {
|
|
702
|
+
let t = +(e === "lighter"), n = (t) => e === "lighter" ? u(t) >= s : u(t) <= s, r = (e) => n(e) && l(e) >= i, o = (e) => r(e) && r(d(e)), f = null;
|
|
703
|
+
for (let e of W) {
|
|
704
|
+
let n = a.c * e, r = c(t, n), i = l(r);
|
|
705
|
+
if ((!f || i > f.ratio) && (f = {
|
|
706
|
+
color: r,
|
|
707
|
+
ratio: i
|
|
708
|
+
}), !o(r)) continue;
|
|
709
|
+
let s = a.l, u = t;
|
|
710
|
+
for (let e = 0; e < G; e++) {
|
|
711
|
+
let e = (s + u) / 2;
|
|
712
|
+
o(c(e, n)) ? u = e : s = e;
|
|
713
|
+
}
|
|
714
|
+
let d = c(u, n);
|
|
715
|
+
return {
|
|
716
|
+
color: d,
|
|
717
|
+
ratio: l(d)
|
|
718
|
+
};
|
|
719
|
+
}
|
|
720
|
+
return f;
|
|
721
|
+
};
|
|
722
|
+
return r === "lighter" || r === "darker" ? f(r).color : f(l(c(1, 0)) >= l(c(0, 0)) ? "lighter" : "darker").color;
|
|
559
723
|
}
|
|
560
|
-
function
|
|
561
|
-
|
|
724
|
+
function le(e) {
|
|
725
|
+
return R(l, e) >= R(u, e);
|
|
562
726
|
}
|
|
563
|
-
function
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
return k(a.r, a.g, a.b, a.a);
|
|
727
|
+
function ue(e, t = d) {
|
|
728
|
+
let n = t.length ? t : d, r = n[0], i = -1;
|
|
729
|
+
for (let t of n) {
|
|
730
|
+
let n = R(t, e);
|
|
731
|
+
n > i && (i = n, r = t);
|
|
732
|
+
}
|
|
733
|
+
return h(r.r, r.g, r.b, r.a);
|
|
571
734
|
}
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
735
|
+
//#endregion
|
|
736
|
+
//#region src/theme/resolve.ts
|
|
737
|
+
var de = {
|
|
738
|
+
none: [
|
|
739
|
+
"0px",
|
|
740
|
+
"0px",
|
|
741
|
+
"0px",
|
|
742
|
+
"0px"
|
|
743
|
+
],
|
|
744
|
+
sm: [
|
|
745
|
+
"3px",
|
|
746
|
+
"4px",
|
|
747
|
+
"6px",
|
|
748
|
+
"9999px"
|
|
749
|
+
],
|
|
750
|
+
md: [
|
|
751
|
+
"4px",
|
|
752
|
+
"6px",
|
|
753
|
+
"10px",
|
|
754
|
+
"9999px"
|
|
755
|
+
],
|
|
756
|
+
lg: [
|
|
757
|
+
"6px",
|
|
758
|
+
"10px",
|
|
759
|
+
"16px",
|
|
760
|
+
"9999px"
|
|
761
|
+
],
|
|
762
|
+
full: [
|
|
763
|
+
"10px",
|
|
764
|
+
"16px",
|
|
765
|
+
"24px",
|
|
766
|
+
"9999px"
|
|
767
|
+
]
|
|
768
|
+
}, fe = "url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxyZWN0IHg9IjAlIiB5PSIwJSIgd2lkdGg9IjUwJSIgaGVpZ2h0PSI1MCUiIHN0eWxlPSJmaWxsOiByZ2JhKDI1NSwgMjU1LCAyNTUsIDAuMDcpOyIgLz4KICA8cmVjdCB4PSI1MCUiIHk9IjAlIiB3aWR0aD0iNTAlIiBoZWlnaHQ9IjUwJSIgc3R5bGU9ImZpbGw6IHJnYmEoMjU1LCAyNTUsIDI1NSwgMCk7IiAvPgogIDxyZWN0IHg9IjUwJSIgeT0iNTAlIiB3aWR0aD0iNTAlIiBoZWlnaHQ9IjUwJSIgc3R5bGU9ImZpbGw6IHJnYmEoMjU1LCAyNTUsIDI1NSwgMC4wNyk7IiAvPgogIDxyZWN0IHg9IjAlIiB5PSI1MCUiIHdpZHRoPSI1MCUiIGhlaWdodD0iNTAlIiBzdHlsZT0iZmlsbDogcmdiYSgyNTUsIDI1NSwgMjU1LCAwKTsiIC8+Cjwvc3ZnPg==')", pe = "url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxyZWN0IHg9IjAlIiB5PSIwJSIgd2lkdGg9IjUwJSIgaGVpZ2h0PSI1MCUiIHN0eWxlPSJmaWxsOiByZ2JhKDAsIDAsIDAsIDAuMDQ1KTsiIC8+CiAgPHJlY3QgeD0iNTAlIiB5PSI1MCUiIHdpZHRoPSI1MCUiIGhlaWdodD0iNTAlIiBzdHlsZT0iZmlsbDogcmdiYSgwLCAwLCAwLCAwLjA0NSk7IiAvPgo8L3N2Zz4=')";
|
|
769
|
+
function me(e, t) {
|
|
770
|
+
let n = e === "dark", r = t ? .06 : 0;
|
|
771
|
+
return {
|
|
772
|
+
text: t ? 1 : n ? .92 : .88,
|
|
773
|
+
textMuted: t ? .85 : n ? .66 : .62,
|
|
774
|
+
textFaint: t ? .68 : n ? .46 : .42,
|
|
775
|
+
border: (n ? .12 : .1) + (t ? .18 : 0),
|
|
776
|
+
borderStrong: (n ? .28 : .22) + (t ? .25 : 0),
|
|
777
|
+
divider: (n ? .1 : .08) + (t ? .15 : 0),
|
|
778
|
+
fill: (n ? .09 : .06) + r,
|
|
779
|
+
fillHover: (n ? .14 : .1) + r,
|
|
780
|
+
fillActive: (n ? .2 : .15) + r,
|
|
781
|
+
field: (n ? .07 : .04) + r,
|
|
782
|
+
fieldHover: (n ? .1 : .06) + r,
|
|
783
|
+
fieldFocus: (n ? .1 : .05) + r,
|
|
784
|
+
hover: (n ? .07 : .05) + r,
|
|
785
|
+
pressed: (n ? .12 : .09) + r,
|
|
786
|
+
soft: (n ? .18 : .12) + (t ? .08 : 0),
|
|
787
|
+
softHover: (n ? .26 : .2) + (t ? .08 : 0),
|
|
788
|
+
elevationMin: t ? 1.3 : n ? 1.18 : 1.06
|
|
789
|
+
};
|
|
621
790
|
}
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
791
|
+
var q = (e) => F(e), J = (e) => I(e), Y = (e, t) => F(V(e, t)), he = (e) => ({
|
|
792
|
+
r: Math.round(e.r),
|
|
793
|
+
g: Math.round(e.g),
|
|
794
|
+
b: Math.round(e.b),
|
|
795
|
+
a: e.a
|
|
796
|
+
});
|
|
797
|
+
function X(e, t, n, r, i = (e) => e) {
|
|
798
|
+
let a = n, o = he(i(B(e, t, a))), s = 0;
|
|
799
|
+
for (; R(o, e) < r && a < 1 && s++ < 40;) a = Math.min(1, a + .02), o = he(i(B(e, t, a)));
|
|
800
|
+
return V(o, 1);
|
|
628
801
|
}
|
|
629
|
-
function
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
802
|
+
function ge(e, t, n) {
|
|
803
|
+
if (n <= 0) return e;
|
|
804
|
+
let r = P(e), i = P(t);
|
|
805
|
+
return oe({
|
|
806
|
+
l: r.l,
|
|
807
|
+
c: Math.min(.03, .03 * n) + r.c * (1 - n),
|
|
808
|
+
h: i.h,
|
|
809
|
+
a: r.a
|
|
810
|
+
});
|
|
633
811
|
}
|
|
634
|
-
function
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
812
|
+
function _e(e) {
|
|
813
|
+
let t = {
|
|
814
|
+
version: 2,
|
|
815
|
+
...e ?? {}
|
|
816
|
+
}, r = a[t.preset ?? "dark"], i = [], o = E(t.surface) ?? null;
|
|
817
|
+
o ||= (t.surface && i.push({
|
|
818
|
+
token: "surface",
|
|
819
|
+
reason: `unparsable surface "${t.surface}", using preset`
|
|
820
|
+
}), E(r.surface)), o = V(o, 1);
|
|
821
|
+
let c = E(t.primary) ?? null;
|
|
822
|
+
c ||= (t.primary && i.push({
|
|
823
|
+
token: "primary",
|
|
824
|
+
reason: `unparsable primary "${t.primary}", using preset`
|
|
825
|
+
}), E(r.primary)), c = V(c, 1);
|
|
826
|
+
let d = le(o) ? "dark" : "light", f = d === "dark", p = t.contrast === "high", m = me(d, p), h = Math.max(0, Math.min(1, t.tint ?? 0)), g = p ? 7 : 4.5, _ = p ? 4.5 : 3, v = ge(f ? l : {
|
|
827
|
+
r: 17,
|
|
828
|
+
g: 17,
|
|
829
|
+
b: 17,
|
|
830
|
+
a: 1
|
|
831
|
+
}, c, h), y, b, x, S = (e) => ge(e, c, h);
|
|
832
|
+
if (f) {
|
|
833
|
+
let e = R(l, o) >= 6 ? l : u;
|
|
834
|
+
y = X(o, e, .07, m.elevationMin, S), b = X(y, e, .05, 1.12, S), x = X(b, e, .05, 1.12, S);
|
|
835
|
+
} else {
|
|
836
|
+
let e = R(l, o);
|
|
837
|
+
if (e >= m.elevationMin * 1.01) {
|
|
838
|
+
let t = e >= 1.149995 ? 1.1 : m.elevationMin;
|
|
839
|
+
y = X(o, l, .5, t, S), b = R(l, y) >= 1.03 ? X(y, l, .6, 1.03, S) : V(l, 1), x = S(B(b, u, .035));
|
|
840
|
+
}
|
|
841
|
+
(!y || R(y, o) < m.elevationMin) && (y = X(o, u, .03, m.elevationMin, S), b = V(l, 1), x = S(B(b, u, .05)));
|
|
842
|
+
}
|
|
843
|
+
if (!y || !b || !x) throw Error("theme: elevation ladder not resolved");
|
|
844
|
+
let C = oe(f ? {
|
|
845
|
+
l: .94,
|
|
846
|
+
c: 0,
|
|
847
|
+
h: 0,
|
|
848
|
+
a: 1
|
|
849
|
+
} : {
|
|
850
|
+
l: .28,
|
|
851
|
+
c: 0,
|
|
852
|
+
h: 0,
|
|
853
|
+
a: 1
|
|
854
|
+
}), w = ue(C), ee = (e) => [
|
|
855
|
+
o,
|
|
856
|
+
y,
|
|
857
|
+
b,
|
|
858
|
+
x
|
|
859
|
+
].reduce((t, n) => R(e, n) < R(e, t) ? n : t, o), T = (e, t, n) => {
|
|
860
|
+
let r = e, a = 0;
|
|
861
|
+
for (; R(V(v, r), ee(V(v, r))) < t && r < 1 && a++ < 25;) r = Math.min(1, r + .04);
|
|
862
|
+
return r !== e && i.push({
|
|
863
|
+
token: n,
|
|
864
|
+
reason: `raised opacity ${e}→${r.toFixed(2)} to reach ${t}:1 on surfaces`
|
|
865
|
+
}), r;
|
|
866
|
+
}, te = T(m.text, g, "text"), ne = T(m.textMuted, g, "text-muted"), D = T(m.textFaint, _, "text-faint"), O = (() => {
|
|
867
|
+
let e = R(l, c), t = R({
|
|
868
|
+
r: 17,
|
|
869
|
+
g: 17,
|
|
870
|
+
b: 17,
|
|
871
|
+
a: 1
|
|
872
|
+
}, c);
|
|
873
|
+
if (e >= g) return l;
|
|
874
|
+
let n = t > e ? {
|
|
875
|
+
r: 17,
|
|
876
|
+
g: 17,
|
|
877
|
+
b: 17,
|
|
878
|
+
a: 1
|
|
879
|
+
} : l;
|
|
880
|
+
return Math.max(e, t) < g && i.push({
|
|
881
|
+
token: "on-primary",
|
|
882
|
+
reason: `neither white nor black reaches ${g}:1 on primary (best ${Math.max(e, t).toFixed(2)}:1)`
|
|
883
|
+
}), n;
|
|
884
|
+
})(), re = H(c, f ? .06 : -.06), k = H(c, f ? .1 : -.1), A = K(c, o, g, "auto");
|
|
885
|
+
R(A, o) > R(c, o) + .01 && i.push({
|
|
886
|
+
token: "primary-text",
|
|
887
|
+
reason: `primary lightened/darkened to reach ${g}:1 as text on surface`
|
|
888
|
+
});
|
|
889
|
+
let ie = K(c, o, _, "auto"), j = K(c, o, _, "auto"), M = (e) => {
|
|
890
|
+
let t = E(s[e]), n = R(l, t), r = R({
|
|
891
|
+
r: 17,
|
|
892
|
+
g: 17,
|
|
893
|
+
b: 17,
|
|
894
|
+
a: 1
|
|
895
|
+
}, t), i = n >= g ? l : r > n ? {
|
|
896
|
+
r: 17,
|
|
897
|
+
g: 17,
|
|
898
|
+
b: 17,
|
|
899
|
+
a: 1
|
|
900
|
+
} : l, a = V(t, m.soft), c = z(a, o), u = (e) => K(K(t, o, g, e), c, g, e), d = K(t, o, g, "auto");
|
|
901
|
+
return {
|
|
902
|
+
base: t,
|
|
903
|
+
on: i,
|
|
904
|
+
text: [u("darker"), u("lighter")].find((e) => R(e, o) >= g && R(e, c) >= g) ?? d,
|
|
905
|
+
soft: a,
|
|
906
|
+
border: K(t, o, _, "auto"),
|
|
907
|
+
dark: H(t, -.1),
|
|
908
|
+
light: H(t, .12),
|
|
909
|
+
darker: H(t, -.18),
|
|
910
|
+
bright: H(t, .22)
|
|
911
|
+
};
|
|
912
|
+
}, ae = M("success"), N = M("warning"), P = M("error"), se = M("info"), [F, I, L, ce] = de[t.radius ?? "md"], U = "'Inter', sans-serif", W = (e) => e?.name?.trim() ? `'${e.name.trim().replace(/'/g, "\\'")}', ${U}` : U, G = W(t.fonts?.ui), he = t.fonts?.heading ? W(t.fonts.heading) : G, _e = Array.from(new Set([t.fonts?.ui?.src, t.fonts?.heading?.src].filter((e) => !!e && /^https?:\/\//.test(e)))), Z = t.font?.size && t.font.size > 0 ? t.font.size : 14, Q = {
|
|
913
|
+
"color-scheme": d,
|
|
914
|
+
surface: q(o),
|
|
915
|
+
"surface-rgb": J(o),
|
|
916
|
+
"surface-1": q(y),
|
|
917
|
+
"surface-1-rgb": J(y),
|
|
918
|
+
"surface-2": q(b),
|
|
919
|
+
"surface-2-rgb": J(b),
|
|
920
|
+
"surface-3": q(x),
|
|
921
|
+
"surface-inverse": q(C),
|
|
922
|
+
scrim: "rgba(0, 0, 0, 0.5)",
|
|
923
|
+
ink: q(v),
|
|
924
|
+
"ink-rgb": J(v),
|
|
925
|
+
text: Y(v, te),
|
|
926
|
+
"text-muted": Y(v, ne),
|
|
927
|
+
"text-faint": Y(v, D),
|
|
928
|
+
"text-inverse": q(w),
|
|
929
|
+
"text-on-surface-rgb": J(v),
|
|
930
|
+
"text-on-inverse-rgb": J(w),
|
|
931
|
+
border: Y(v, m.border),
|
|
932
|
+
"border-strong": Y(v, m.borderStrong),
|
|
933
|
+
divider: Y(v, m.divider),
|
|
934
|
+
"border-rgb": J(v),
|
|
935
|
+
fill: Y(v, m.fill),
|
|
936
|
+
"fill-hover": Y(v, m.fillHover),
|
|
937
|
+
"fill-active": Y(v, m.fillActive),
|
|
938
|
+
field: Y(v, m.field),
|
|
939
|
+
"field-hover": Y(v, m.fieldHover),
|
|
940
|
+
"field-focus": Y(v, m.fieldFocus),
|
|
941
|
+
hover: Y(v, m.hover),
|
|
942
|
+
pressed: Y(v, m.pressed),
|
|
943
|
+
primary: q(c),
|
|
944
|
+
"primary-rgb": J(c),
|
|
945
|
+
"primary-hover": q(re),
|
|
946
|
+
"primary-active": q(k),
|
|
947
|
+
"on-primary": q(O),
|
|
948
|
+
"primary-text": q(A),
|
|
949
|
+
"primary-border": q(ie),
|
|
950
|
+
"primary-soft": Y(c, m.soft),
|
|
951
|
+
"primary-soft-hover": Y(c, m.softHover),
|
|
952
|
+
"focus-ring": q(j),
|
|
953
|
+
"focus-ring-width": p ? "3px" : "2px",
|
|
954
|
+
"focus-ring-offset": "2px",
|
|
955
|
+
"primary-dark": q(H(c, -.1)),
|
|
956
|
+
"primary-dark-rgb": J(H(c, -.1)),
|
|
957
|
+
"primary-light": q(H(c, .1)),
|
|
958
|
+
"primary-light-rgb": J(H(c, .1)),
|
|
959
|
+
"primary-bright": q(H(c, .2)),
|
|
960
|
+
"primary-bright-rgb": J(H(c, .2)),
|
|
961
|
+
"shadow-1": f ? "0 1px 2px rgba(0, 0, 0, 0.4)" : "0 1px 2px rgba(0, 0, 0, 0.08)",
|
|
962
|
+
"shadow-2": f ? "0 6px 20px rgba(0, 0, 0, 0.45)" : "0 6px 20px rgba(0, 0, 0, 0.12)",
|
|
963
|
+
"shadow-3": f ? "0 12px 40px rgba(0, 0, 0, 0.5)" : "0 12px 40px rgba(0, 0, 0, 0.16)",
|
|
964
|
+
"radius-sm": F,
|
|
965
|
+
"radius-md": I,
|
|
966
|
+
"radius-lg": L,
|
|
967
|
+
"radius-full": ce,
|
|
968
|
+
"font-family": G,
|
|
969
|
+
"font-family-heading": he,
|
|
970
|
+
"font-size": `${Z}px`,
|
|
971
|
+
"root-font-size": String(Z),
|
|
972
|
+
canvas: f ? "rgba(0, 0, 0, 0.25)" : "rgba(0, 0, 0, 0.04)",
|
|
973
|
+
"canvas-image": f ? fe : pe,
|
|
974
|
+
"canvas-control": "rgba(0, 0, 0, 0.45)",
|
|
975
|
+
"canvas-control-hover": "rgba(0, 0, 0, 0.6)",
|
|
976
|
+
"on-canvas-control": "#ffffff",
|
|
977
|
+
"disabled-opacity": "0.55"
|
|
978
|
+
};
|
|
979
|
+
for (let [e, t] of [
|
|
980
|
+
["success", ae],
|
|
981
|
+
["warning", N],
|
|
982
|
+
["error", P],
|
|
983
|
+
["info", se]
|
|
984
|
+
]) Q[e] = q(t.base), Q[`${e}-rgb`] = J(t.base), Q[`on-${e}`] = q(t.on), Q[`${e}-text`] = q(t.text), Q[`${e}-soft`] = q(t.soft), Q[`${e}-border`] = q(t.border), Q[`${e}-dark-rgb`] = J(t.dark), Q[`${e}-light-rgb`] = J(t.light), e === "info" ? Q["info-bright-rgb"] = J(t.bright) : Q[`${e}-darker-rgb`] = J(t.darker);
|
|
985
|
+
if (t.overrides) for (let [e, r] of Object.entries(t.overrides)) {
|
|
986
|
+
if (!r || !n.includes(e)) continue;
|
|
987
|
+
Q[e] = r;
|
|
988
|
+
let t = `${e}-rgb`;
|
|
989
|
+
if (n.includes(t)) {
|
|
990
|
+
let e = E(r);
|
|
991
|
+
e && (Q[t] = J(e));
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
for (let e of n) Q[e] === void 0 && (Q[e] = "");
|
|
995
|
+
let ve = Q, ye = (e) => E(ve[e]), $ = (e, t, n, r) => {
|
|
996
|
+
let i = ye(t), a = ye(n), s = i && a ? R(i, z(a, o)) : 0;
|
|
997
|
+
return {
|
|
998
|
+
label: e,
|
|
999
|
+
fg: t,
|
|
1000
|
+
bg: n,
|
|
1001
|
+
ratio: Math.round(s * 100) / 100,
|
|
1002
|
+
min: r,
|
|
1003
|
+
pass: s >= r
|
|
1004
|
+
};
|
|
1005
|
+
};
|
|
1006
|
+
return {
|
|
1007
|
+
input: t,
|
|
1008
|
+
mode: d,
|
|
1009
|
+
tokens: ve,
|
|
1010
|
+
report: {
|
|
1011
|
+
mode: d,
|
|
1012
|
+
checks: [
|
|
1013
|
+
$("Text on surface", "text", "surface", g),
|
|
1014
|
+
$("Muted text on surface", "text-muted", "surface", g),
|
|
1015
|
+
$("Faint text on surface", "text-faint", "surface", _),
|
|
1016
|
+
$("Text on cards (surface-1)", "text", "surface-1", g),
|
|
1017
|
+
$("Text on popovers (surface-2)", "text", "surface-2", g),
|
|
1018
|
+
$("Cards distinguishable from surface", "surface-1", "surface", m.elevationMin),
|
|
1019
|
+
$("Popovers distinguishable from cards", "surface-2", "surface-1", f ? 1.12 : 1),
|
|
1020
|
+
$("Strong border on surface", "border-strong", "surface", p ? 3 : 1.5),
|
|
1021
|
+
$("Text on primary", "on-primary", "primary", g),
|
|
1022
|
+
$("Primary as text on surface", "primary-text", "surface", g),
|
|
1023
|
+
$("Primary border on surface", "primary-border", "surface", _),
|
|
1024
|
+
$("Focus ring on surface", "focus-ring", "surface", _),
|
|
1025
|
+
$("Success text on surface", "success-text", "surface", g),
|
|
1026
|
+
$("Warning text on surface", "warning-text", "surface", g),
|
|
1027
|
+
$("Error text on surface", "error-text", "surface", g),
|
|
1028
|
+
$("Info text on surface", "info-text", "surface", g),
|
|
1029
|
+
$("Success text on success tint", "success-text", "success-soft", g),
|
|
1030
|
+
$("Warning text on warning tint", "warning-text", "warning-soft", g),
|
|
1031
|
+
$("Error text on error tint", "error-text", "error-soft", g),
|
|
1032
|
+
$("Info text on info tint", "info-text", "info-soft", g),
|
|
1033
|
+
$("Text on success", "on-success", "success", g),
|
|
1034
|
+
$("Text on warning", "on-warning", "warning", g),
|
|
1035
|
+
$("Text on error", "on-error", "error", g),
|
|
1036
|
+
$("Text on tooltip", "text-inverse", "surface-inverse", g)
|
|
1037
|
+
],
|
|
1038
|
+
adjustments: i
|
|
1039
|
+
},
|
|
1040
|
+
fontUrls: _e
|
|
1041
|
+
};
|
|
802
1042
|
}
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
"button-quaternary-active-background-color-hover": "transparent",
|
|
1180
|
-
"button-quaternary-active-text-color": r("text"),
|
|
1181
|
-
"button-quaternary-active-text-color-hover": r("text"),
|
|
1182
|
-
/* ------------------------------------------------------------------ */
|
|
1183
|
-
/* Button states (active = primary tokens, success/error/warning = */
|
|
1184
|
-
/* status tokens). See BxButton.vue `@each $state` block: */
|
|
1185
|
-
/* -background-color / -hover tinted bg (secondary, hovers) */
|
|
1186
|
-
/* -background-color-active / -hover stronger tint (sec./tert. .active)*/
|
|
1187
|
-
/* -background-color-solid / -hover solid fill (default .active) */
|
|
1188
|
-
/* -border-color / -hover coloured border (tertiary) */
|
|
1189
|
-
/* -text-color text on EVERY variant */
|
|
1190
|
-
/* -text-color-tertiary text on the outlined variant */
|
|
1191
|
-
/* LIMITATION: `-text-color` is applied by BxButton on both the tinted */
|
|
1192
|
-
/* (soft) and the solid fills. We pick `<X>-text` (contrast-correct on */
|
|
1193
|
-
/* surface + soft); on the solid `.active` default fill the ideal would */
|
|
1194
|
-
/* be `on-<X>` — BxButton needs a dedicated var for that to be perfect. */
|
|
1195
|
-
/* Status tokens have no `-soft-hover` / `-hover` step: hovers reuse */
|
|
1196
|
-
/* `<status>-soft` / `<status>` (only `active` has primary-soft-hover */
|
|
1197
|
-
/* and primary-hover). */
|
|
1198
|
-
/* ------------------------------------------------------------------ */
|
|
1199
|
-
"button-state-active-background-color": r("primary-soft"),
|
|
1200
|
-
"button-state-active-background-color-hover": r("primary-soft-hover"),
|
|
1201
|
-
"button-state-active-background-color-active": r("primary-soft"),
|
|
1202
|
-
"button-state-active-background-color-active-hover": r("primary-soft-hover"),
|
|
1203
|
-
"button-state-active-background-color-solid": r("primary"),
|
|
1204
|
-
"button-state-active-background-color-solid-hover": r("primary-hover"),
|
|
1205
|
-
"button-state-active-border-color": r("primary-border"),
|
|
1206
|
-
"button-state-active-border-color-hover": r("primary-border"),
|
|
1207
|
-
"button-state-active-text-color": r("primary-text"),
|
|
1208
|
-
"button-state-active-text-color-tertiary": r("primary-text"),
|
|
1209
|
-
"button-state-success-background-color": r("success-soft"),
|
|
1210
|
-
"button-state-success-background-color-hover": r("success-soft"),
|
|
1211
|
-
"button-state-success-background-color-active": r("success-soft"),
|
|
1212
|
-
"button-state-success-background-color-active-hover": r("success-soft"),
|
|
1213
|
-
"button-state-success-background-color-solid": r("success"),
|
|
1214
|
-
"button-state-success-background-color-solid-hover": r("success"),
|
|
1215
|
-
"button-state-success-border-color": r("success-border"),
|
|
1216
|
-
"button-state-success-border-color-hover": r("success-border"),
|
|
1217
|
-
"button-state-success-text-color": r("success-text"),
|
|
1218
|
-
"button-state-success-text-color-tertiary": r("success-text"),
|
|
1219
|
-
"button-state-error-background-color": r("error-soft"),
|
|
1220
|
-
"button-state-error-background-color-hover": r("error-soft"),
|
|
1221
|
-
"button-state-error-background-color-active": r("error-soft"),
|
|
1222
|
-
"button-state-error-background-color-active-hover": r("error-soft"),
|
|
1223
|
-
"button-state-error-background-color-solid": r("error"),
|
|
1224
|
-
"button-state-error-background-color-solid-hover": r("error"),
|
|
1225
|
-
"button-state-error-border-color": r("error-border"),
|
|
1226
|
-
"button-state-error-border-color-hover": r("error-border"),
|
|
1227
|
-
"button-state-error-text-color": r("error-text"),
|
|
1228
|
-
"button-state-error-text-color-tertiary": r("error-text"),
|
|
1229
|
-
"button-state-warning-background-color": r("warning-soft"),
|
|
1230
|
-
"button-state-warning-background-color-hover": r("warning-soft"),
|
|
1231
|
-
"button-state-warning-background-color-active": r("warning-soft"),
|
|
1232
|
-
"button-state-warning-background-color-active-hover": r("warning-soft"),
|
|
1233
|
-
"button-state-warning-background-color-solid": r("warning"),
|
|
1234
|
-
"button-state-warning-background-color-solid-hover": r("warning"),
|
|
1235
|
-
"button-state-warning-border-color": r("warning-border"),
|
|
1236
|
-
"button-state-warning-border-color-hover": r("warning-border"),
|
|
1237
|
-
"button-state-warning-text-color": r("warning-text"),
|
|
1238
|
-
"button-state-warning-text-color-tertiary": r("warning-text"),
|
|
1239
|
-
/* ------------------------------------------------------------------ */
|
|
1240
|
-
/* Message */
|
|
1241
|
-
/* ------------------------------------------------------------------ */
|
|
1242
|
-
"message-body-background-color": r("surface-2"),
|
|
1243
|
-
"message-body-text-color": r("text"),
|
|
1244
|
-
"message-body-border": `1px solid ${r("border")}`,
|
|
1245
|
-
/* ------------------------------------------------------------------ */
|
|
1246
|
-
/* Canvas (template preview area) */
|
|
1247
|
-
/* ------------------------------------------------------------------ */
|
|
1248
|
-
"canvas-background-color": r("canvas"),
|
|
1249
|
-
"canvas-background-image": r("canvas-image"),
|
|
1250
|
-
"canvas-btn-background-color": r("canvas-control"),
|
|
1251
|
-
"canvas-btn-background-color-hover": r("canvas-control-hover"),
|
|
1252
|
-
"canvas-btn-color": r("on-canvas-control"),
|
|
1253
|
-
"btn-color": r("on-canvas-control"),
|
|
1254
|
-
/* ------------------------------------------------------------------ */
|
|
1255
|
-
/* Gallery (bx-template) */
|
|
1256
|
-
/* ------------------------------------------------------------------ */
|
|
1257
|
-
"gallery-card-background-color": r("surface-1"),
|
|
1258
|
-
"gallery-card-background-color-hover": r("surface-2"),
|
|
1259
|
-
"gallery-card-border": `1px solid ${r("border")}`,
|
|
1260
|
-
"gallery-action-btn-background-color": r("scrim"),
|
|
1261
|
-
// The ONLY colour literal in the bridge: the action button sits on `scrim`, which is dark in
|
|
1262
|
-
// every mode, so white text is correct regardless of theme.
|
|
1263
|
-
"gallery-action-btn-color": "#ffffff",
|
|
1264
|
-
"gallery-card-name-text-color": r("text"),
|
|
1265
|
-
"gallery-card-description-text-color": r("text-muted"),
|
|
1266
|
-
/* ------------------------------------------------------------------ */
|
|
1267
|
-
/* Misc */
|
|
1268
|
-
/* ------------------------------------------------------------------ */
|
|
1269
|
-
"spinner-color": r("text")
|
|
1270
|
-
}, No = new Set(
|
|
1271
|
-
Object.keys(Zr).filter(
|
|
1272
|
-
(o) => `--${o}`.startsWith(br) && dr.includes(`--${o}`.slice(br.length))
|
|
1273
|
-
)
|
|
1274
|
-
), Co = Object.entries(
|
|
1275
|
-
Zr
|
|
1276
|
-
).filter(([o]) => !No.has(o));
|
|
1277
|
-
function Eo(o) {
|
|
1278
|
-
const e = {};
|
|
1279
|
-
for (const [t, a] of Object.entries(o.tokens))
|
|
1280
|
-
a !== "" && (e[`${br}${t}`] = a);
|
|
1281
|
-
for (const [t, a] of Co)
|
|
1282
|
-
e[`--${t}`] = a;
|
|
1283
|
-
if (o.input.customStyle)
|
|
1284
|
-
for (const [t, a] of Object.entries(o.input.customStyle))
|
|
1285
|
-
t === "key" || a == null || a === "" || (e[t.startsWith("--") ? t : `--${t}`] = String(a));
|
|
1286
|
-
return e;
|
|
1043
|
+
//#endregion
|
|
1044
|
+
//#region src/theme/bridge.ts
|
|
1045
|
+
var Z = (e) => `var(${r}${e})`, Q = {
|
|
1046
|
+
"root-font-size": Z("root-font-size"),
|
|
1047
|
+
"font-family": Z("font-family"),
|
|
1048
|
+
"bx-focus-ring-color": Z("focus-ring"),
|
|
1049
|
+
"bx-focus-ring-width": Z("focus-ring-width"),
|
|
1050
|
+
"bx-focus-ring-offset": Z("focus-ring-offset"),
|
|
1051
|
+
"app-background-color": Z("surface"),
|
|
1052
|
+
"app-background-color-rgb": Z("surface-rgb"),
|
|
1053
|
+
"app-divider-color": Z("divider"),
|
|
1054
|
+
"secondary-color-rgb": Z("surface-2-rgb"),
|
|
1055
|
+
"editor-view-background-color": Z("surface"),
|
|
1056
|
+
"fields-view-background-color": "transparent",
|
|
1057
|
+
"live-view-background-color": "transparent",
|
|
1058
|
+
"popup-background-color": Z("surface-1"),
|
|
1059
|
+
"bluepic-embed-editor-border": `1px solid ${Z("border")}`,
|
|
1060
|
+
"bluepic-embed-editor-border-radius": Z("radius-lg"),
|
|
1061
|
+
"primary-color-base": Z("primary-rgb"),
|
|
1062
|
+
"primary-color-dark": Z("primary-dark-rgb"),
|
|
1063
|
+
"primary-color-light": Z("primary-light-rgb"),
|
|
1064
|
+
"primary-color-bright": Z("primary-bright-rgb"),
|
|
1065
|
+
"info-color-base": Z("info-rgb"),
|
|
1066
|
+
"info-color-dark": Z("info-dark-rgb"),
|
|
1067
|
+
"info-color-light": Z("info-light-rgb"),
|
|
1068
|
+
"info-color-bright": Z("info-bright-rgb"),
|
|
1069
|
+
"success-color-base": Z("success-rgb"),
|
|
1070
|
+
"success-color-light": Z("success-light-rgb"),
|
|
1071
|
+
"success-color-dark": Z("success-dark-rgb"),
|
|
1072
|
+
"success-color-darker": Z("success-darker-rgb"),
|
|
1073
|
+
"error-color-base": Z("error-rgb"),
|
|
1074
|
+
"error-color-light": Z("error-light-rgb"),
|
|
1075
|
+
"error-color-dark": Z("error-dark-rgb"),
|
|
1076
|
+
"error-color-darker": Z("error-darker-rgb"),
|
|
1077
|
+
"warning-color-base": Z("warning-rgb"),
|
|
1078
|
+
"warning-color-light": Z("warning-light-rgb"),
|
|
1079
|
+
"warning-color-dark": Z("warning-dark-rgb"),
|
|
1080
|
+
"warning-color-darker": Z("warning-darker-rgb"),
|
|
1081
|
+
"text-color-base": Z("text-on-surface-rgb"),
|
|
1082
|
+
"text-color-alt": Z("text-on-inverse-rgb"),
|
|
1083
|
+
"border-color-base": Z("border-rgb"),
|
|
1084
|
+
"background-color-base": Z("surface-rgb"),
|
|
1085
|
+
"priinfomary-color-base": Z("info-rgb"),
|
|
1086
|
+
"primainfory-color-bright": Z("primary-bright-rgb"),
|
|
1087
|
+
"primary-color": Z("primary"),
|
|
1088
|
+
"info-color": Z("info"),
|
|
1089
|
+
"bx-primary-color": Z("primary"),
|
|
1090
|
+
"bx-text-color": Z("text"),
|
|
1091
|
+
"bx-modal-color": Z("surface-1"),
|
|
1092
|
+
"bx-card-color": Z("surface-1"),
|
|
1093
|
+
"upload-background-color": Z("field"),
|
|
1094
|
+
"upload-text-color-title": Z("text"),
|
|
1095
|
+
"upload-text-color-description": Z("text-muted"),
|
|
1096
|
+
"input-background-color": Z("field"),
|
|
1097
|
+
"input-background-color-hover": Z("field-hover"),
|
|
1098
|
+
"input-background-color-focus": Z("field-focus"),
|
|
1099
|
+
"input-border-color": "transparent",
|
|
1100
|
+
"input-border-color-hover": "transparent",
|
|
1101
|
+
"input-border-color-focus": Z("primary-border"),
|
|
1102
|
+
"input-shadow-focus-color": Z("focus-ring"),
|
|
1103
|
+
"input-bordered-border-color": Z("border-strong"),
|
|
1104
|
+
"input-bordered-border-color-hover": Z("border-strong"),
|
|
1105
|
+
"input-bordered-border-color-focus": Z("primary-border"),
|
|
1106
|
+
"input-outline-color-focus": Z("focus-ring"),
|
|
1107
|
+
"input-border-color-disabled": Z("border"),
|
|
1108
|
+
"input-opacity-disabled": Z("disabled-opacity"),
|
|
1109
|
+
"input-ghost-border-color-hover": Z("border"),
|
|
1110
|
+
"input-ghost-border-color-focus": Z("primary-border"),
|
|
1111
|
+
"input-number-ctrl-separator-color": Z("divider"),
|
|
1112
|
+
"input-number-ctrl-color": Z("text-muted"),
|
|
1113
|
+
"input-number-ctrl-color-hover": Z("text"),
|
|
1114
|
+
"input-number-ctrl-background-color-hover": Z("hover"),
|
|
1115
|
+
"input-state-active-background-color": Z("primary-soft"),
|
|
1116
|
+
"input-state-active-background-color-hover": Z("primary-soft"),
|
|
1117
|
+
"input-state-active-background-color-focus": Z("primary-soft"),
|
|
1118
|
+
"input-state-active-border-color": Z("primary-border"),
|
|
1119
|
+
"input-state-active-border-color-hover": Z("primary-border"),
|
|
1120
|
+
"input-state-active-border-color-focus": Z("primary-border"),
|
|
1121
|
+
"input-state-success-background-color": Z("success-soft"),
|
|
1122
|
+
"input-state-success-background-color-hover": Z("success-soft"),
|
|
1123
|
+
"input-state-success-background-color-focus": Z("success-soft"),
|
|
1124
|
+
"input-state-success-border-color": Z("success-border"),
|
|
1125
|
+
"input-state-success-border-color-hover": Z("success-border"),
|
|
1126
|
+
"input-state-success-border-color-focus": Z("success-border"),
|
|
1127
|
+
"input-state-error-background-color": Z("error-soft"),
|
|
1128
|
+
"input-state-error-background-color-hover": Z("error-soft"),
|
|
1129
|
+
"input-state-error-background-color-focus": Z("error-soft"),
|
|
1130
|
+
"input-state-error-border-color": Z("error-border"),
|
|
1131
|
+
"input-state-error-border-color-hover": Z("error-border"),
|
|
1132
|
+
"input-state-error-border-color-focus": Z("error-border"),
|
|
1133
|
+
"input-state-warning-background-color": Z("warning-soft"),
|
|
1134
|
+
"input-state-warning-background-color-hover": Z("warning-soft"),
|
|
1135
|
+
"input-state-warning-background-color-focus": Z("warning-soft"),
|
|
1136
|
+
"input-state-warning-border-color": Z("warning-border"),
|
|
1137
|
+
"input-state-warning-border-color-hover": Z("warning-border"),
|
|
1138
|
+
"input-state-warning-border-color-focus": Z("warning-border"),
|
|
1139
|
+
"card-background-color": Z("surface-1"),
|
|
1140
|
+
"card-background-color-hover": Z("surface-2"),
|
|
1141
|
+
"card-border-color": Z("border"),
|
|
1142
|
+
"card-header-divider-color": Z("divider"),
|
|
1143
|
+
"card-footer-divider-color": Z("divider"),
|
|
1144
|
+
"card-footer-background-color": Z("hover"),
|
|
1145
|
+
"select-background-color": Z("field"),
|
|
1146
|
+
"select-background-color-hover": Z("field-hover"),
|
|
1147
|
+
"select-background-color-focus": Z("field-focus"),
|
|
1148
|
+
"select-border": "1px solid transparent",
|
|
1149
|
+
"select-border-hover": "1px solid transparent",
|
|
1150
|
+
"select-border-focus": `1px solid ${Z("primary-border")}`,
|
|
1151
|
+
"select-color": Z("text"),
|
|
1152
|
+
"select-color-hover": Z("text"),
|
|
1153
|
+
"select-color-focus": Z("text"),
|
|
1154
|
+
"select-button-background-color": Z("fill"),
|
|
1155
|
+
"select-button-background-color-hover": Z("fill-hover"),
|
|
1156
|
+
"select-item-border": `2px solid ${Z("primary-border")}`,
|
|
1157
|
+
"checkbox-background-color": Z("field"),
|
|
1158
|
+
"checkbox-border-color": Z("border-strong"),
|
|
1159
|
+
"checkbox-border-color-hover": Z("primary-border"),
|
|
1160
|
+
"checkbox-outline-color-focus": Z("focus-ring"),
|
|
1161
|
+
"checkbox-border-color-focus": Z("primary-border"),
|
|
1162
|
+
"checkbox-background-color-checked": Z("primary"),
|
|
1163
|
+
"checkbox-border-color-checked": "transparent",
|
|
1164
|
+
"checkbox-background-color-checked-hover": Z("primary-hover"),
|
|
1165
|
+
"checkbox-border-color-checked-hover": "transparent",
|
|
1166
|
+
"checkbox-symbol-color": Z("text-faint"),
|
|
1167
|
+
"checkbox-symbol-color-checked": Z("on-primary"),
|
|
1168
|
+
"checkbox-secondary-background-color": Z("fill"),
|
|
1169
|
+
"checkbox-secondary-background-color-hover": Z("fill-hover"),
|
|
1170
|
+
"checkbox-secondary-background-color-checked": Z("fill-active"),
|
|
1171
|
+
"checkbox-secondary-border": `1px solid ${Z("border")}`,
|
|
1172
|
+
"checkbox-secondary-border-hover": `1px solid ${Z("border-strong")}`,
|
|
1173
|
+
"checkbox-secondary-border-checked": `1px solid ${Z("border-strong")}`,
|
|
1174
|
+
"checkbox-secondary-symbol-color": Z("text-muted"),
|
|
1175
|
+
"checkbox-secondary-symbol-color-checked": Z("primary-text"),
|
|
1176
|
+
"popover-background-color": Z("surface-2"),
|
|
1177
|
+
"popover-border-color": Z("border"),
|
|
1178
|
+
"popover-border": `1px solid ${Z("border")}`,
|
|
1179
|
+
"popover-arrow-border-color": Z("border"),
|
|
1180
|
+
"popover-without-darkened-bg-background-color": Z("surface-2-rgb"),
|
|
1181
|
+
"popover-without-darkened-bg-box-shadow": Z("shadow-2"),
|
|
1182
|
+
"tooltip-background-color": Z("surface-inverse"),
|
|
1183
|
+
"tooltip-text-color": Z("text-inverse"),
|
|
1184
|
+
"tooltip-border-color": "transparent",
|
|
1185
|
+
"menu-item-color": Z("text"),
|
|
1186
|
+
"menu-item-color-active": Z("primary-text"),
|
|
1187
|
+
"menu-item-background-color": "transparent",
|
|
1188
|
+
"menu-item-background-color-active": Z("primary-soft"),
|
|
1189
|
+
"menu-item-background-color-hover": Z("hover"),
|
|
1190
|
+
"menu-item-background-color-active-hover": Z("primary-soft-hover"),
|
|
1191
|
+
"menu-divider": `1px solid ${Z("divider")}`,
|
|
1192
|
+
"labeled-text-color": Z("text-muted"),
|
|
1193
|
+
"label-background-color": Z("fill"),
|
|
1194
|
+
"list-divider": `1px solid ${Z("divider")}`,
|
|
1195
|
+
"list-item-background-color-hover": Z("hover"),
|
|
1196
|
+
"empty-text-color": Z("text-faint"),
|
|
1197
|
+
"tag-background-color": Z("fill"),
|
|
1198
|
+
"tag-color": Z("text"),
|
|
1199
|
+
"tag-border-color": Z("border"),
|
|
1200
|
+
"tag-error-background-color": Z("error-soft"),
|
|
1201
|
+
"tag-error-color": Z("error-text"),
|
|
1202
|
+
"tag-error-border-color": Z("error-border"),
|
|
1203
|
+
"tag-success-background-color": Z("success-soft"),
|
|
1204
|
+
"tag-success-color": Z("success-text"),
|
|
1205
|
+
"tag-success-border-color": Z("success-border"),
|
|
1206
|
+
"tag-warning-background-color": Z("warning-soft"),
|
|
1207
|
+
"tag-warning-color": Z("warning-text"),
|
|
1208
|
+
"tag-warning-border-color": Z("warning-border"),
|
|
1209
|
+
"tag-info-background-color": Z("info-soft"),
|
|
1210
|
+
"tag-info-color": Z("info-text"),
|
|
1211
|
+
"tag-info-border-color": Z("info-border"),
|
|
1212
|
+
"alert-background-color": Z("fill"),
|
|
1213
|
+
"alert-color": Z("text"),
|
|
1214
|
+
"alert-border-color": Z("border"),
|
|
1215
|
+
"alert-icon-color": Z("text-muted"),
|
|
1216
|
+
"alert-info-background-color": Z("info-soft"),
|
|
1217
|
+
"alert-info-color": Z("info-text"),
|
|
1218
|
+
"alert-info-icon-color": Z("info-text"),
|
|
1219
|
+
"alert-info-border-color": Z("info-border"),
|
|
1220
|
+
"alert-success-background-color": Z("success-soft"),
|
|
1221
|
+
"alert-success-color": Z("success-text"),
|
|
1222
|
+
"alert-success-icon-color": Z("success-text"),
|
|
1223
|
+
"alert-success-border-color": Z("success-border"),
|
|
1224
|
+
"alert-warning-background-color": Z("warning-soft"),
|
|
1225
|
+
"alert-warning-color": Z("warning-text"),
|
|
1226
|
+
"alert-warning-icon-color": Z("warning-text"),
|
|
1227
|
+
"alert-warning-border-color": Z("warning-border"),
|
|
1228
|
+
"alert-error-background-color": Z("error-soft"),
|
|
1229
|
+
"alert-error-color": Z("error-text"),
|
|
1230
|
+
"alert-error-icon-color": Z("error-text"),
|
|
1231
|
+
"alert-error-border-color": Z("error-border"),
|
|
1232
|
+
"slider-body-background-color": Z("fill-active"),
|
|
1233
|
+
"slider-body-background-color-hover": Z("fill-active"),
|
|
1234
|
+
"slider-body-background-color-focus": Z("fill-active"),
|
|
1235
|
+
"slider-thumb-background-color": Z("primary"),
|
|
1236
|
+
"slider-thumb-background-color-hover": Z("primary-hover"),
|
|
1237
|
+
"slider-thumb-background-color-focus": Z("primary-hover"),
|
|
1238
|
+
"slider-thumb-box-shadow": Z("shadow-1"),
|
|
1239
|
+
"slider-value-background-color": Z("primary"),
|
|
1240
|
+
"slider-value-background-color-hover": Z("primary"),
|
|
1241
|
+
"slider-value-background-color-focus": Z("primary"),
|
|
1242
|
+
"progress-background-color": Z("fill"),
|
|
1243
|
+
"progress-value-color": Z("primary"),
|
|
1244
|
+
"tab-color": Z("text-muted"),
|
|
1245
|
+
"tab-color-active": Z("primary-text"),
|
|
1246
|
+
"tab-segment-background-color": Z("fill"),
|
|
1247
|
+
"tab-segment-background-color-active": Z("surface-2"),
|
|
1248
|
+
"tab-segment-color": Z("text-muted"),
|
|
1249
|
+
"tab-segment-color-active": Z("text"),
|
|
1250
|
+
"tab-inline-item-background-color-hover": Z("hover"),
|
|
1251
|
+
"tab-item-active-box-shadow": Z("shadow-1"),
|
|
1252
|
+
"switch-background-color": Z("fill-active"),
|
|
1253
|
+
"switch-border": "none",
|
|
1254
|
+
"switch-thumb-background-color": Z("surface-3"),
|
|
1255
|
+
"switch-thumb-border": "none",
|
|
1256
|
+
"switch-thumb-shadow": Z("shadow-1"),
|
|
1257
|
+
"switch-border-hover": "none",
|
|
1258
|
+
"switch-background-color-hover": Z("fill-active"),
|
|
1259
|
+
"switch-thumb-background-color-hover": Z("surface-3"),
|
|
1260
|
+
"switch-thumb-border-hover": "none",
|
|
1261
|
+
"switch-active-background-color": Z("primary"),
|
|
1262
|
+
"switch-active-border": "none",
|
|
1263
|
+
"switch-active-thumb-background-color": Z("on-primary"),
|
|
1264
|
+
"switch-active-thumb-border": "none",
|
|
1265
|
+
"switch-active-thumb-shadow": Z("shadow-1"),
|
|
1266
|
+
"switch-active-background-color-hover": Z("primary-hover"),
|
|
1267
|
+
"switch-active-border-hover": "none",
|
|
1268
|
+
"switch-active-thumb-background-color-hover": Z("on-primary"),
|
|
1269
|
+
"switch-active-thumb-border-hover": "none",
|
|
1270
|
+
"radio-background-color": "transparent",
|
|
1271
|
+
"radio-background-color-active": Z("primary"),
|
|
1272
|
+
"radio-background-color-hover": "transparent",
|
|
1273
|
+
"radio-border": `1px solid ${Z("border-strong")}`,
|
|
1274
|
+
"radio-border-active": `1px solid ${Z("primary")}`,
|
|
1275
|
+
"radio-border-color-hover": Z("primary-border"),
|
|
1276
|
+
"radio-symbol-color": Z("on-primary"),
|
|
1277
|
+
"radio-label-color": Z("text"),
|
|
1278
|
+
"radio-label-color-active": Z("text"),
|
|
1279
|
+
"button-background-color": "transparent",
|
|
1280
|
+
"button-background-color-hover": Z("hover"),
|
|
1281
|
+
"button-background-color-focus": Z("hover"),
|
|
1282
|
+
"button-border": "1px solid transparent",
|
|
1283
|
+
"button-border-hover": "1px solid transparent",
|
|
1284
|
+
"button-border-focus": "1px solid transparent",
|
|
1285
|
+
"button-text-color": Z("text"),
|
|
1286
|
+
"button-text-color-hover": Z("text"),
|
|
1287
|
+
"button-text-color-focus": Z("text"),
|
|
1288
|
+
"button-box-shadow": "none",
|
|
1289
|
+
"button-box-shadow-hover": "none",
|
|
1290
|
+
"button-border-radius": Z("radius-md"),
|
|
1291
|
+
"button-active-background-color": Z("primary"),
|
|
1292
|
+
"button-active-text-color": Z("on-primary"),
|
|
1293
|
+
"button-active-border": "1px solid transparent",
|
|
1294
|
+
"button-active-box-shadow": "none",
|
|
1295
|
+
"button-active-background-color-hover": Z("primary-hover"),
|
|
1296
|
+
"button-active-text-color-hover": Z("on-primary"),
|
|
1297
|
+
"button-active-border-hover": "1px solid transparent",
|
|
1298
|
+
"button-active-box-shadow-hover": "none",
|
|
1299
|
+
"button-secondary-background-color": Z("fill"),
|
|
1300
|
+
"button-secondary-background-color-hover": Z("fill-hover"),
|
|
1301
|
+
"button-secondary-background-color-focus": Z("fill-hover"),
|
|
1302
|
+
"button-secondary-border": "1px solid transparent",
|
|
1303
|
+
"button-secondary-border-hover": "1px solid transparent",
|
|
1304
|
+
"button-secondary-border-focus": "1px solid transparent",
|
|
1305
|
+
"button-secondary-text-color": Z("text"),
|
|
1306
|
+
"button-secondary-text-color-hover": Z("text"),
|
|
1307
|
+
"button-secondary-text-color-focus": Z("text"),
|
|
1308
|
+
"button-secondary-box-shadow": "none",
|
|
1309
|
+
"button-secondary-box-shadow-hover": "none",
|
|
1310
|
+
"button-secondary-active-background-color": Z("fill-active"),
|
|
1311
|
+
"button-secondary-active-background-color-hover": Z("fill-active"),
|
|
1312
|
+
"button-secondary-active-background-color-focus": Z("fill-active"),
|
|
1313
|
+
"button-secondary-active-border": "1px solid transparent",
|
|
1314
|
+
"button-secondary-active-border-hover": "1px solid transparent",
|
|
1315
|
+
"button-secondary-active-border-focus": "1px solid transparent",
|
|
1316
|
+
"button-secondary-active-text-color": Z("text"),
|
|
1317
|
+
"button-secondary-active-text-color-hover": Z("text"),
|
|
1318
|
+
"button-secondary-active-text-color-focus": Z("text"),
|
|
1319
|
+
"button-secondary-active-box-shadow": "none",
|
|
1320
|
+
"button-secondary-active-box-shadow-hover": "none",
|
|
1321
|
+
"button-tertiary-background-color": "transparent",
|
|
1322
|
+
"button-tertiary-background-color-hover": Z("hover"),
|
|
1323
|
+
"button-tertiary-background-color-focus": Z("hover"),
|
|
1324
|
+
"button-tertiary-border": `1px solid ${Z("border-strong")}`,
|
|
1325
|
+
"button-tertiary-border-hover": `1px solid ${Z("border-strong")}`,
|
|
1326
|
+
"button-tertiary-border-focus": `1px solid ${Z("border-strong")}`,
|
|
1327
|
+
"button-tertiary-text-color": Z("text"),
|
|
1328
|
+
"button-tertiary-text-color-hover": Z("text"),
|
|
1329
|
+
"button-tertiary-text-color-focus": Z("text"),
|
|
1330
|
+
"button-tertiary-box-shadow": "none",
|
|
1331
|
+
"button-tertiary-box-shadow-hover": "none",
|
|
1332
|
+
"button-tertiary-box-shadow-focus": "none",
|
|
1333
|
+
"button-tertiary-active-background-color": Z("primary"),
|
|
1334
|
+
"button-tertiary-active-background-color-hover": Z("primary-hover"),
|
|
1335
|
+
"button-tertiary-active-background-color-focus": Z("primary-hover"),
|
|
1336
|
+
"button-tertiary-active-border": `1px solid ${Z("primary")}`,
|
|
1337
|
+
"button-tertiary-active-border-hover": `1px solid ${Z("primary")}`,
|
|
1338
|
+
"button-tertiary-active-border-focus": `1px solid ${Z("primary")}`,
|
|
1339
|
+
"button-tertiary-active-text-color": Z("on-primary"),
|
|
1340
|
+
"button-tertiary-active-text-color-hover": Z("on-primary"),
|
|
1341
|
+
"button-tertiary-active-text-color-focus": Z("on-primary"),
|
|
1342
|
+
"button-tertiary-active-box-shadow": "none",
|
|
1343
|
+
"button-tertiary-active-box-shadow-hover": "none",
|
|
1344
|
+
"button-tertiary-active-box-shadow-focus": "none",
|
|
1345
|
+
"button-quaternary-background-color": "transparent",
|
|
1346
|
+
"button-quaternary-background-color-hover": "transparent",
|
|
1347
|
+
"button-quaternary-text-color": Z("text-muted"),
|
|
1348
|
+
"button-quaternary-text-color-hover": Z("text"),
|
|
1349
|
+
"button-quaternary-active-background-color": "transparent",
|
|
1350
|
+
"button-quaternary-active-background-color-hover": "transparent",
|
|
1351
|
+
"button-quaternary-active-text-color": Z("text"),
|
|
1352
|
+
"button-quaternary-active-text-color-hover": Z("text"),
|
|
1353
|
+
"button-state-active-background-color": Z("primary-soft"),
|
|
1354
|
+
"button-state-active-background-color-hover": Z("primary-soft-hover"),
|
|
1355
|
+
"button-state-active-background-color-active": Z("primary-soft"),
|
|
1356
|
+
"button-state-active-background-color-active-hover": Z("primary-soft-hover"),
|
|
1357
|
+
"button-state-active-background-color-solid": Z("primary"),
|
|
1358
|
+
"button-state-active-background-color-solid-hover": Z("primary-hover"),
|
|
1359
|
+
"button-state-active-border-color": Z("primary-border"),
|
|
1360
|
+
"button-state-active-border-color-hover": Z("primary-border"),
|
|
1361
|
+
"button-state-active-text-color": Z("primary-text"),
|
|
1362
|
+
"button-state-active-text-color-tertiary": Z("primary-text"),
|
|
1363
|
+
"button-state-success-background-color": Z("success-soft"),
|
|
1364
|
+
"button-state-success-background-color-hover": Z("success-soft"),
|
|
1365
|
+
"button-state-success-background-color-active": Z("success-soft"),
|
|
1366
|
+
"button-state-success-background-color-active-hover": Z("success-soft"),
|
|
1367
|
+
"button-state-success-background-color-solid": Z("success"),
|
|
1368
|
+
"button-state-success-background-color-solid-hover": Z("success"),
|
|
1369
|
+
"button-state-success-border-color": Z("success-border"),
|
|
1370
|
+
"button-state-success-border-color-hover": Z("success-border"),
|
|
1371
|
+
"button-state-success-text-color": Z("success-text"),
|
|
1372
|
+
"button-state-success-text-color-tertiary": Z("success-text"),
|
|
1373
|
+
"button-state-error-background-color": Z("error-soft"),
|
|
1374
|
+
"button-state-error-background-color-hover": Z("error-soft"),
|
|
1375
|
+
"button-state-error-background-color-active": Z("error-soft"),
|
|
1376
|
+
"button-state-error-background-color-active-hover": Z("error-soft"),
|
|
1377
|
+
"button-state-error-background-color-solid": Z("error"),
|
|
1378
|
+
"button-state-error-background-color-solid-hover": Z("error"),
|
|
1379
|
+
"button-state-error-border-color": Z("error-border"),
|
|
1380
|
+
"button-state-error-border-color-hover": Z("error-border"),
|
|
1381
|
+
"button-state-error-text-color": Z("error-text"),
|
|
1382
|
+
"button-state-error-text-color-tertiary": Z("error-text"),
|
|
1383
|
+
"button-state-warning-background-color": Z("warning-soft"),
|
|
1384
|
+
"button-state-warning-background-color-hover": Z("warning-soft"),
|
|
1385
|
+
"button-state-warning-background-color-active": Z("warning-soft"),
|
|
1386
|
+
"button-state-warning-background-color-active-hover": Z("warning-soft"),
|
|
1387
|
+
"button-state-warning-background-color-solid": Z("warning"),
|
|
1388
|
+
"button-state-warning-background-color-solid-hover": Z("warning"),
|
|
1389
|
+
"button-state-warning-border-color": Z("warning-border"),
|
|
1390
|
+
"button-state-warning-border-color-hover": Z("warning-border"),
|
|
1391
|
+
"button-state-warning-text-color": Z("warning-text"),
|
|
1392
|
+
"button-state-warning-text-color-tertiary": Z("warning-text"),
|
|
1393
|
+
"message-body-background-color": Z("surface-2"),
|
|
1394
|
+
"message-body-text-color": Z("text"),
|
|
1395
|
+
"message-body-border": `1px solid ${Z("border")}`,
|
|
1396
|
+
"canvas-background-color": Z("canvas"),
|
|
1397
|
+
"canvas-background-image": Z("canvas-image"),
|
|
1398
|
+
"canvas-btn-background-color": Z("canvas-control"),
|
|
1399
|
+
"canvas-btn-background-color-hover": Z("canvas-control-hover"),
|
|
1400
|
+
"canvas-btn-color": Z("on-canvas-control"),
|
|
1401
|
+
"btn-color": Z("on-canvas-control"),
|
|
1402
|
+
"gallery-card-background-color": Z("surface-1"),
|
|
1403
|
+
"gallery-card-background-color-hover": Z("surface-2"),
|
|
1404
|
+
"gallery-card-border": `1px solid ${Z("border")}`,
|
|
1405
|
+
"gallery-action-btn-background-color": Z("scrim"),
|
|
1406
|
+
"gallery-action-btn-color": "#ffffff",
|
|
1407
|
+
"gallery-card-name-text-color": Z("text"),
|
|
1408
|
+
"gallery-card-description-text-color": Z("text-muted"),
|
|
1409
|
+
"spinner-color": Z("text")
|
|
1410
|
+
}, ve = new Set(Object.keys(Q).filter((e) => `--${e}`.startsWith("--bx-") && n.includes(`--${e}`.slice(5)))), ye = Object.entries(Q).filter(([e]) => !ve.has(e));
|
|
1411
|
+
//#endregion
|
|
1412
|
+
//#region src/theme/css.ts
|
|
1413
|
+
function $(e) {
|
|
1414
|
+
let t = {};
|
|
1415
|
+
for (let [n, i] of Object.entries(e.tokens)) i !== "" && (t[`${r}${n}`] = i);
|
|
1416
|
+
for (let [e, n] of ye) t[`--${e}`] = n;
|
|
1417
|
+
if (e.input.customStyle) for (let [n, r] of Object.entries(e.input.customStyle)) n !== "key" && r != null && r !== "" && (t[n.startsWith("--") ? n : `--${n}`] = String(r));
|
|
1418
|
+
return t;
|
|
1287
1419
|
}
|
|
1288
|
-
function
|
|
1289
|
-
|
|
1290
|
-
|
|
1420
|
+
function be(e, t) {
|
|
1421
|
+
let n = Array.isArray(t) ? t.join(", ") : t, r = $(e), i = Object.entries(r).map(([e, t]) => `${e}: ${t};`).join(" ");
|
|
1422
|
+
return `${n} { color-scheme: ${e.mode}; ${i} }`;
|
|
1291
1423
|
}
|
|
1292
|
-
|
|
1293
|
-
|
|
1424
|
+
//#endregion
|
|
1425
|
+
//#region src/theme/legacy.ts
|
|
1426
|
+
function xe(e) {
|
|
1427
|
+
return !!e && typeof e == "object" && e.version === 2;
|
|
1294
1428
|
}
|
|
1295
|
-
function
|
|
1296
|
-
|
|
1297
|
-
|
|
1429
|
+
function Se(e) {
|
|
1430
|
+
let t = e ?? {}, n = t["editor-view-background-color"] || (t["app-background-color-rgb"] ? `rgb(${t["app-background-color-rgb"]})` : void 0) || t["popup-background-color"], r = t["primary-color-base"] ? `rgb(${t["primary-color-base"]})` : void 0, i = E(n) ? n : void 0, a = E(r) ? r : void 0, o = typeof t.key == "string" && t.key.endsWith("-wcag"), s = { version: 2 };
|
|
1431
|
+
return i && (s.surface = i), a && (s.primary = a), o && (s.contrast = "high"), typeof t.key == "string" && (s.preset = t.key.startsWith("light") ? "light" : "dark"), s;
|
|
1298
1432
|
}
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
br as SEMANTIC_PREFIX,
|
|
1302
|
-
Lo as SEMANTIC_TOKEN_GROUPS,
|
|
1303
|
-
dr as SEMANTIC_TOKEN_NAMES,
|
|
1304
|
-
lo as STATUS_BASES,
|
|
1305
|
-
Ho as THEME_HOUSE_PRESETS,
|
|
1306
|
-
io as THEME_PRESETS,
|
|
1307
|
-
jo as looksLikeThemeInput,
|
|
1308
|
-
Do as resolveTheme,
|
|
1309
|
-
_o as themeColor,
|
|
1310
|
-
Ro as themeInputFromLegacyCustomStyle,
|
|
1311
|
-
Po as themeToCssText,
|
|
1312
|
-
Eo as themeToCssVars
|
|
1313
|
-
};
|
|
1433
|
+
//#endregion
|
|
1434
|
+
export { Q as LEGACY_BRIDGE, r as SEMANTIC_PREFIX, i as SEMANTIC_TOKEN_GROUPS, n as SEMANTIC_TOKEN_NAMES, s as STATUS_BASES, o as THEME_HOUSE_PRESETS, a as THEME_PRESETS, xe as looksLikeThemeInput, _e as resolveTheme, c as themeColor, Se as themeInputFromLegacyCustomStyle, be as themeToCssText, $ as themeToCssVars };
|