@bluepic/embed 0.5.1 → 0.5.5

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.
Files changed (106) hide show
  1. package/dist/bash-DI5WKoY1.cjs +1 -0
  2. package/dist/bash-SfqkqXwO.js +169 -0
  3. package/dist/bluepic-embed.iife.js +240 -271
  4. package/dist/bluepic-embed.umd.js +240 -271
  5. package/dist/c-Bwju34J8.js +176 -0
  6. package/dist/c-CxjdkDqU.cjs +1 -0
  7. package/dist/client-zip-Dl4jBUKQ.cjs +1 -0
  8. package/dist/client-zip-DscsL7SZ.js +254 -0
  9. package/dist/components/BxDatePickerPopover.vue.d.ts +1 -1
  10. package/dist/components/BxInput.vue.d.ts +1 -1
  11. package/dist/components/BxTag.vue.d.ts +1 -1
  12. package/dist/components/TemplateEditor/BatchEditor.vue.d.ts +14 -10
  13. package/dist/components/TemplateEditor/BxTemplateEditor.vue.d.ts +80 -64
  14. package/dist/components/TemplateEditor/TemplateView.vue.d.ts +20 -16
  15. package/dist/cpp-BNKWamrP.js +225 -0
  16. package/dist/cpp-BlYqzAb6.cjs +1 -0
  17. package/dist/css-C6p-exw3.cjs +1 -0
  18. package/dist/css-yWyfM7J9.js +140 -0
  19. package/dist/decompress-3ZSaG6Ii.cjs +15 -0
  20. package/dist/decompress-C88dmWOf.js +643 -0
  21. package/dist/embed/embed.d.ts +4416 -1454
  22. package/dist/go-DnIuztGs.js +140 -0
  23. package/dist/go-RBRkffhh.cjs +1 -0
  24. package/dist/java-CYbswnVa.js +169 -0
  25. package/dist/java-DiqBJCuC.cjs +1 -0
  26. package/dist/javascript-DaG6fU1i.js +436 -0
  27. package/dist/javascript-hWWC5YVO.cjs +1 -0
  28. package/dist/json-CW2SpMXu.cjs +1 -0
  29. package/dist/json-Cu6rbgWf.js +36 -0
  30. package/dist/main.cjs +118 -146
  31. package/dist/main.mjs +73680 -85828
  32. package/dist/markdown-BaDHGYjR.cjs +1 -0
  33. package/dist/markdown-D3Gs6FWn.js +181 -0
  34. package/dist/markdown-it-BOugFJd0.cjs +13 -0
  35. package/dist/markdown-it-bsR6HXzL.js +2875 -0
  36. package/dist/postal-mime-BnhFNwEJ.cjs +28 -0
  37. package/dist/postal-mime-Bsdi2kUR.js +3210 -0
  38. package/dist/python-D1ZXre9G.js +238 -0
  39. package/dist/python-DawLCmeM.cjs +1 -0
  40. package/dist/rolldown-runtime-CEFd7nDs.js +30 -0
  41. package/dist/rolldown-runtime-CPUxUITh.cjs +1 -0
  42. package/dist/rust-B47KpJg8.cjs +1 -0
  43. package/dist/rust-DV3X-6zd.js +169 -0
  44. package/dist/scss-BwEwJffF.cjs +1 -0
  45. package/dist/scss-DVPIh7kT.js +150 -0
  46. package/dist/sql-BsfEDS1M.cjs +1 -0
  47. package/dist/sql-CmVzGP4w.js +118 -0
  48. package/dist/style.css +2 -1
  49. package/dist/theme.cjs +1 -1
  50. package/dist/theme.mjs +1394 -1273
  51. package/dist/typescript-CjqyVRRm.cjs +1 -0
  52. package/dist/typescript-DbET6Hbh.js +521 -0
  53. package/dist/unzipit.module-CWI6YKpy.js +697 -0
  54. package/dist/unzipit.module-DLgVBmhU.cjs +1 -0
  55. package/dist/util/gallery.d.ts +21 -37
  56. package/dist/xlsx-Bm1OL5B8.js +16261 -0
  57. package/dist/xlsx-C9EeNB50.cjs +38 -0
  58. package/dist/xml-Bh8MwSUt.cjs +1 -0
  59. package/dist/xml-Bxh-tO8n.js +166 -0
  60. package/dist/yaml-CIP4hiwy.cjs +1 -0
  61. package/dist/yaml-DT7UV549.js +144 -0
  62. package/package.json +9 -5
  63. package/dist/bash-BHkfQ7MG.cjs +0 -1
  64. package/dist/bash-CPB87Egg.js +0 -377
  65. package/dist/c-B4BAHWS4.cjs +0 -1
  66. package/dist/c-C0DTNf68.js +0 -336
  67. package/dist/cpp-BfO2fOQK.cjs +0 -1
  68. package/dist/cpp-DxGBPWa5.js +0 -538
  69. package/dist/css-Cx1gP-zj.js +0 -934
  70. package/dist/css-DTF39MN3.cjs +0 -1
  71. package/dist/decompress-BGiydwyp.cjs +0 -15
  72. package/dist/decompress-D5RzmD-2.js +0 -566
  73. package/dist/go-By8nj0Vi.cjs +0 -1
  74. package/dist/go-C8VcBUsu.js +0 -156
  75. package/dist/index-C99_zLhc.js +0 -175
  76. package/dist/index-D8N6IfRw.cjs +0 -1
  77. package/dist/java-BoRJOXvw.js +0 -249
  78. package/dist/java-DFXAwvvK.cjs +0 -1
  79. package/dist/javascript-C2jY0XE6.cjs +0 -1
  80. package/dist/javascript-CgRUYx2b.js +0 -660
  81. package/dist/json-C4rahuoJ.cjs +0 -1
  82. package/dist/json-DYK-YbD3.js +0 -44
  83. package/dist/markdown-BmL9j9cU.cjs +0 -1
  84. package/dist/markdown-D19noYwn.js +0 -215
  85. package/dist/markdown-it-5-ieF6Bh.js +0 -3790
  86. package/dist/markdown-it-CLB5Jta6.cjs +0 -16
  87. package/dist/postal-mime-Df-WB8Vq.js +0 -3337
  88. package/dist/postal-mime-_7WF5UBe.cjs +0 -28
  89. package/dist/python-BBUuE3AY.js +0 -404
  90. package/dist/python-Clt6L10q.cjs +0 -1
  91. package/dist/rust-DY-oA2gr.js +0 -319
  92. package/dist/rust-_vvcEGSJ.cjs +0 -1
  93. package/dist/scss-BWo_aR1L.js +0 -919
  94. package/dist/scss-ex7iHSUb.cjs +0 -1
  95. package/dist/sql-BSlOauVK.cjs +0 -1
  96. package/dist/sql-IeKX8fQ8.js +0 -615
  97. package/dist/typescript-BHqLHF13.js +0 -755
  98. package/dist/typescript-DYRnLHqF.cjs +0 -1
  99. package/dist/unzipit.module-4zGfAuq6.cjs +0 -1
  100. package/dist/unzipit.module-qN5XWVVT.js +0 -649
  101. package/dist/xlsx-BopDBbWb.js +0 -24176
  102. package/dist/xlsx-qn1xoUuv.cjs +0 -105
  103. package/dist/xml-Bse49fPV.js +0 -212
  104. package/dist/xml-CVmug_x4.cjs +0 -1
  105. package/dist/yaml-BslECvWp.js +0 -183
  106. package/dist/yaml-C6zsmLZx.cjs +0 -1
package/dist/theme.mjs CHANGED
@@ -1,1313 +1,1434 @@
1
- const dr = [
2
- /* mode */
3
- "color-scheme",
4
- // 'dark' | 'light' — feeds the CSS `color-scheme` property
5
- /* surfaces (elevation ladder; each step is guaranteed to be distinguishable from the previous) */
6
- "surface",
7
- // page / editor background (the user's "background" choice)
8
- "surface-rgb",
9
- "surface-1",
10
- // cards, gallery cards, popups
11
- "surface-1-rgb",
12
- "surface-2",
13
- // popovers, menus, dropdowns, tooltips' neighbours
14
- "surface-2-rgb",
15
- "surface-3",
16
- // nested/raised elements inside popovers
17
- "surface-inverse",
18
- // tooltips, toasts
19
- "scrim",
20
- // modal backdrop
21
- /* ink = the text colour family; alpha-based so it works on every surface step */
22
- "ink",
23
- // solid ink colour (white in dark, near-black in light)
24
- "ink-rgb",
25
- "text",
26
- // primary text
27
- "text-muted",
28
- // labels, descriptions
29
- "text-faint",
30
- // placeholders, disabled
31
- "text-inverse",
32
- // text on surface-inverse
33
- "text-on-surface-rgb",
34
- // legacy `--text-color-base` triplet (= ink-rgb)
35
- "text-on-inverse-rgb",
36
- // legacy `--text-color-alt` triplet
37
- /* borders & dividers */
38
- "border",
39
- // subtle component borders
40
- "border-strong",
41
- // outlined buttons, bordered inputs
42
- "divider",
43
- "border-rgb",
44
- // legacy `--border-color-base` triplet
45
- /* neutral interaction fills (buttons, list hover, inputs) */
46
- "fill",
47
- // tonal neutral fill (secondary button, tag, segment)
48
- "fill-hover",
49
- "fill-active",
50
- "field",
51
- // input / select background
52
- "field-hover",
53
- "field-focus",
54
- "hover",
55
- // transparent→tint hover for ghost elements / list rows
56
- "pressed",
57
- /* primary / brand */
58
- "primary",
59
- "primary-rgb",
60
- "primary-hover",
61
- "primary-active",
62
- "on-primary",
63
- // text/icon on solid primary — auto black/white
64
- "primary-text",
65
- // primary used AS text on `surface` (contrast-corrected)
66
- "primary-border",
67
- // primary used as a 1px border/indicator on `surface` (≥ 3:1)
68
- "primary-soft",
69
- // tinted background (selected menu item, active tab, soft button)
70
- "primary-soft-hover",
71
- "focus-ring",
72
- "focus-ring-width",
73
- "focus-ring-offset",
74
- // derived shades (kept for the component tier's `rgba(var(--primary-color-light), a)` habit)
75
- "primary-dark",
76
- "primary-dark-rgb",
77
- "primary-light",
78
- "primary-light-rgb",
79
- "primary-bright",
80
- "primary-bright-rgb",
81
- /* status — each: base (solid), on (text on solid), text (as text on surface), soft (tint bg), border, + shades */
82
- "success",
83
- "success-rgb",
84
- "on-success",
85
- "success-text",
86
- "success-soft",
87
- "success-border",
88
- "success-dark-rgb",
89
- "success-light-rgb",
90
- "success-darker-rgb",
91
- "warning",
92
- "warning-rgb",
93
- "on-warning",
94
- "warning-text",
95
- "warning-soft",
96
- "warning-border",
97
- "warning-dark-rgb",
98
- "warning-light-rgb",
99
- "warning-darker-rgb",
100
- "error",
101
- "error-rgb",
102
- "on-error",
103
- "error-text",
104
- "error-soft",
105
- "error-border",
106
- "error-dark-rgb",
107
- "error-light-rgb",
108
- "error-darker-rgb",
109
- "info",
110
- "info-rgb",
111
- "on-info",
112
- "info-text",
113
- "info-soft",
114
- "info-border",
115
- "info-dark-rgb",
116
- "info-light-rgb",
117
- "info-bright-rgb",
118
- /* elevation shadows */
119
- "shadow-1",
120
- "shadow-2",
121
- "shadow-3",
122
- /* shape & typography */
123
- "radius-sm",
124
- "radius-md",
125
- "radius-lg",
126
- "radius-full",
127
- "font-family",
128
- // UI font (controls)
129
- "font-family-heading",
130
- // heading / content font ("real text")
131
- "font-size",
132
- // e.g. 14px
133
- "root-font-size",
134
- // legacy unitless number (14)
135
- /* canvas (the template preview area) */
136
- "canvas",
137
- "canvas-image",
138
- "canvas-control",
139
- "canvas-control-hover",
140
- "on-canvas-control",
141
- /* disabled */
142
- "disabled-opacity"
143
- ], br = "--bx-", Lo = [
144
- { label: "Surfaces", tokens: ["surface", "surface-1", "surface-2", "surface-3", "surface-inverse", "scrim"] },
145
- { label: "Text", tokens: ["text", "text-muted", "text-faint", "text-inverse"] },
146
- { label: "Borders", tokens: ["border", "border-strong", "divider"] },
147
- { label: "Neutral fills", tokens: ["fill", "fill-hover", "fill-active", "field", "field-hover", "field-focus", "hover", "pressed"] },
148
- { label: "Primary", tokens: ["primary", "primary-hover", "primary-active", "on-primary", "primary-text", "primary-border", "primary-soft", "primary-soft-hover", "focus-ring"] },
149
- { label: "Success", tokens: ["success", "on-success", "success-text", "success-soft", "success-border"] },
150
- { label: "Warning", tokens: ["warning", "on-warning", "warning-text", "warning-soft", "warning-border"] },
151
- { label: "Error", tokens: ["error", "on-error", "error-text", "error-soft", "error-border"] },
152
- { label: "Info", tokens: ["info", "on-info", "info-text", "info-soft", "info-border"] },
153
- { label: "Shape & type", tokens: ["radius-sm", "radius-md", "radius-lg", "radius-full", "font-family", "font-family-heading", "font-size"] },
154
- { label: "Canvas", tokens: ["canvas", "canvas-control", "on-canvas-control"] }
155
- ], io = {
156
- // Same surfaces as the historical presets so existing campaigns keep their background.
157
- dark: { surface: "#27262e", primary: "#4472c7" },
158
- light: { surface: "#f2f2f2", primary: "#124bba" }
159
- }, Ho = [
160
- { key: "light", label: "Light", description: "Neutral light surfaces, Bluepic blue.", input: { version: 2, preset: "light" } },
161
- { key: "dark", label: "Dark", description: "Neutral dark surfaces, Bluepic blue.", input: { version: 2, preset: "dark" } },
162
- { key: "midnight", label: "Midnight", description: "Near-black with cool, slightly tinted surfaces.", input: { version: 2, surface: "#0f1117", primary: "#7da8f7", tint: 0.35 } },
163
- { key: "paper", label: "Paper", description: "Warm off-white, ink-black actions, crisp corners.", input: { version: 2, surface: "#fbf8f1", primary: "#1f1f1f", radius: "sm" } },
164
- { key: "slate", label: "Slate", description: "Blue-grey dark surfaces with a teal accent.", input: { version: 2, surface: "#1e2530", primary: "#4fd1c5", tint: 0.4 } },
165
- { key: "sand", label: "Sand", description: "Soft sand surfaces with a terracotta accent, rounded.", input: { version: 2, surface: "#f3ede3", primary: "#b5562c", radius: "lg" } },
166
- { key: "forest", label: "Forest", description: "Deep green surfaces with a mint accent.", input: { version: 2, surface: "#0e1f17", primary: "#7ad39a", tint: 0.5 } },
167
- { key: "ocean", label: "Ocean", description: "Cool light surfaces with a deep blue accent, pill shapes.", input: { version: 2, surface: "#eef4fb", primary: "#0b5cad", tint: 0.3, radius: "full" } },
168
- { key: "graphite", label: "Graphite", description: "Pure black, high contrast, sharp corners — signage and dark brands.", input: { version: 2, surface: "#000000", primary: "#ffffff", radius: "none", contrast: "high" } },
169
- { key: "plum", label: "Plum", description: "Deep aubergine surfaces with a warm coral accent.", input: { version: 2, surface: "#1f1423", primary: "#ff7a59", tint: 0.45, radius: "lg" } },
170
- { key: "linen", label: "Linen", description: "Soft white linen with a muted navy accent, rounded.", input: { version: 2, surface: "#f7f7f4", primary: "#2f3e5c", tint: 0.15, radius: "lg" } }
171
- ], lo = {
172
- success: "#28a552",
173
- warning: "#d9a400",
174
- error: "#dc2f2f",
175
- info: "#3b82f6"
176
- }, I = Object.freeze({ r: 255, g: 255, b: 255, a: 1 }), Z = Object.freeze({ r: 0, g: 0, b: 0, a: 1 }), Pr = [I, Object.freeze({ r: 17, g: 17, b: 17, a: 1 })], pr = (o, e, t) => o < e ? e : o > t ? t : o, w = (o) => pr(o, 0, 1), y = (o, e = 0) => Number.isFinite(o) ? o : e, k = (o, e, t, a = 1) => ({ r: o, g: e, b: t, a }), B = (o) => Math.round(pr(y(o), 0, 255)), ur = (o) => B(o).toString(16).padStart(2, "0"), uo = {
177
- aliceblue: 15792383,
178
- antiquewhite: 16444375,
179
- aqua: 65535,
180
- aquamarine: 8388564,
181
- azure: 15794175,
182
- beige: 16119260,
183
- bisque: 16770244,
184
- black: 0,
185
- blanchedalmond: 16772045,
186
- blue: 255,
187
- blueviolet: 9055202,
188
- brown: 10824234,
189
- burlywood: 14596231,
190
- cadetblue: 6266528,
191
- chartreuse: 8388352,
192
- chocolate: 13789470,
193
- coral: 16744272,
194
- cornflowerblue: 6591981,
195
- cornsilk: 16775388,
196
- crimson: 14423100,
197
- cyan: 65535,
198
- darkblue: 139,
199
- darkcyan: 35723,
200
- darkgoldenrod: 12092939,
201
- darkgray: 11119017,
202
- darkgreen: 25600,
203
- darkgrey: 11119017,
204
- darkkhaki: 12433259,
205
- darkmagenta: 9109643,
206
- darkolivegreen: 5597999,
207
- darkorange: 16747520,
208
- darkorchid: 10040012,
209
- darkred: 9109504,
210
- darksalmon: 15308410,
211
- darkseagreen: 9419919,
212
- darkslateblue: 4734347,
213
- darkslategray: 3100495,
214
- darkslategrey: 3100495,
215
- darkturquoise: 52945,
216
- darkviolet: 9699539,
217
- deeppink: 16716947,
218
- deepskyblue: 49151,
219
- dimgray: 6908265,
220
- dimgrey: 6908265,
221
- dodgerblue: 2003199,
222
- firebrick: 11674146,
223
- floralwhite: 16775920,
224
- forestgreen: 2263842,
225
- fuchsia: 16711935,
226
- gainsboro: 14474460,
227
- ghostwhite: 16316671,
228
- gold: 16766720,
229
- goldenrod: 14329120,
230
- gray: 8421504,
231
- green: 32768,
232
- greenyellow: 11403055,
233
- grey: 8421504,
234
- honeydew: 15794160,
235
- hotpink: 16738740,
236
- indianred: 13458524,
237
- indigo: 4915330,
238
- ivory: 16777200,
239
- khaki: 15787660,
240
- lavender: 15132410,
241
- lavenderblush: 16773365,
242
- lawngreen: 8190976,
243
- lemonchiffon: 16775885,
244
- lightblue: 11393254,
245
- lightcoral: 15761536,
246
- lightcyan: 14745599,
247
- lightgoldenrodyellow: 16448210,
248
- lightgray: 13882323,
249
- lightgreen: 9498256,
250
- lightgrey: 13882323,
251
- lightpink: 16758465,
252
- lightsalmon: 16752762,
253
- lightseagreen: 2142890,
254
- lightskyblue: 8900346,
255
- lightslategray: 7833753,
256
- lightslategrey: 7833753,
257
- lightsteelblue: 11584734,
258
- lightyellow: 16777184,
259
- lime: 65280,
260
- limegreen: 3329330,
261
- linen: 16445670,
262
- magenta: 16711935,
263
- maroon: 8388608,
264
- mediumaquamarine: 6737322,
265
- mediumblue: 205,
266
- mediumorchid: 12211667,
267
- mediumpurple: 9662683,
268
- mediumseagreen: 3978097,
269
- mediumslateblue: 8087790,
270
- mediumspringgreen: 64154,
271
- mediumturquoise: 4772300,
272
- mediumvioletred: 13047173,
273
- midnightblue: 1644912,
274
- mintcream: 16121850,
275
- mistyrose: 16770273,
276
- moccasin: 16770229,
277
- navajowhite: 16768685,
278
- navy: 128,
279
- oldlace: 16643558,
280
- olive: 8421376,
281
- olivedrab: 7048739,
282
- orange: 16753920,
283
- orangered: 16729344,
284
- orchid: 14315734,
285
- palegoldenrod: 15657130,
286
- palegreen: 10025880,
287
- paleturquoise: 11529966,
288
- palevioletred: 14381203,
289
- papayawhip: 16773077,
290
- peachpuff: 16767673,
291
- peru: 13468991,
292
- pink: 16761035,
293
- plum: 14524637,
294
- powderblue: 11591910,
295
- purple: 8388736,
296
- rebeccapurple: 6697881,
297
- red: 16711680,
298
- rosybrown: 12357519,
299
- royalblue: 4286945,
300
- saddlebrown: 9127187,
301
- salmon: 16416882,
302
- sandybrown: 16032864,
303
- seagreen: 3050327,
304
- seashell: 16774638,
305
- sienna: 10506797,
306
- silver: 12632256,
307
- skyblue: 8900331,
308
- slateblue: 6970061,
309
- slategray: 7372944,
310
- slategrey: 7372944,
311
- snow: 16775930,
312
- springgreen: 65407,
313
- steelblue: 4620980,
314
- tan: 13808780,
315
- teal: 32896,
316
- thistle: 14204888,
317
- tomato: 16737095,
318
- turquoise: 4251856,
319
- violet: 15631086,
320
- wheat: 16113331,
321
- white: 16777215,
322
- whitesmoke: 16119285,
323
- yellow: 16776960,
324
- yellowgreen: 10145074
325
- }, Br = /^[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?$/, bo = /^([+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?)(deg|turn|rad|grad)?$/, go = /^(rgba?|hsla?)\(\s*(.*?)\s*\)$/;
326
- function xr(o) {
327
- if (o === "none") return { value: 0, percent: !1 };
328
- const e = o.endsWith("%"), t = e ? o.slice(0, -1) : o;
329
- if (!Br.test(t)) return null;
330
- const a = Number(t);
331
- return Number.isFinite(a) ? { value: a, percent: e } : null;
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 hr(o) {
334
- const e = xr(o);
335
- return e ? pr(e.percent ? e.value * 255 / 100 : e.value, 0, 255) : null;
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 fo(o) {
338
- const e = xr(o);
339
- return e ? w(e.percent ? e.value / 100 : e.value) : null;
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 jr(o) {
342
- const e = xr(o);
343
- return e ? w(e.value / 100) : null;
472
+ function ee(e) {
473
+ let t = S(e);
474
+ return t ? p(t.value / 100) : null;
344
475
  }
345
- function po(o) {
346
- if (o === "none") return 0;
347
- const e = bo.exec(o);
348
- if (!e) return null;
349
- let t = Number(e[1]);
350
- if (!Number.isFinite(t)) return null;
351
- switch (e[2]) {
352
- case "turn":
353
- t *= 360;
354
- break;
355
- case "rad":
356
- t *= 180 / Math.PI;
357
- break;
358
- case "grad":
359
- t *= 0.9;
360
- break;
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 ho(o) {
365
- if (o.includes(",")) {
366
- if (o.includes("/")) return null;
367
- const n = o.split(",").map((c) => c.trim());
368
- return n.length !== 3 && n.length !== 4 || n.some((c) => c === "" || /\s/.test(c)) ? null : { ch: [n[0], n[1], n[2]], alpha: n[3] };
369
- }
370
- const e = o.split("/");
371
- if (e.length > 2) return null;
372
- const t = e[0].trim().split(/\s+/);
373
- if (t.length !== 3) return null;
374
- let a;
375
- return e.length === 2 && (a = e[1].trim(), a === "" || /\s/.test(a)) ? null : { ch: [t[0], t[1], t[2]], alpha: a };
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 mo(o, e, t) {
378
- const a = (n) => {
379
- const c = (n + o / 30) % 12, s = e * Math.min(t, 1 - t);
380
- return t - s * Math.max(-1, Math.min(c - 3, 9 - c, 1));
381
- };
382
- return [a(0) * 255, a(8) * 255, a(4) * 255];
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 _(o) {
385
- if (typeof o != "string") return null;
386
- const e = o.trim().toLowerCase();
387
- if (!e) return null;
388
- if (e === "transparent") return k(0, 0, 0, 0);
389
- const t = uo[e];
390
- if (t !== void 0) return k(t >> 16, t >> 8 & 255, t & 255, 1);
391
- if (e[0] === "#") {
392
- const n = e.slice(1);
393
- if (!/^[0-9a-f]+$/.test(n)) return null;
394
- const c = (i) => parseInt(n[i], 16), s = (i) => parseInt(n.slice(i, i + 2), 16);
395
- switch (n.length) {
396
- case 3:
397
- return k(c(0) * 17, c(1) * 17, c(2) * 17, 1);
398
- case 4:
399
- return k(c(0) * 17, c(1) * 17, c(2) * 17, c(3) * 17 / 255);
400
- case 6:
401
- return k(s(0), s(2), s(4), 1);
402
- case 8:
403
- return k(s(0), s(2), s(4), s(6) / 255);
404
- default:
405
- return null;
406
- }
407
- }
408
- const a = go.exec(e);
409
- if (a) {
410
- const n = ho(a[2]);
411
- if (!n) return null;
412
- const c = n.alpha === void 0 ? 1 : fo(n.alpha);
413
- if (c === null) return null;
414
- if (a[1] === "rgb" || a[1] === "rgba") {
415
- const x = hr(n.ch[0]), P = hr(n.ch[1]), p = hr(n.ch[2]);
416
- return x === null || P === null || p === null ? null : k(x, P, p, c);
417
- }
418
- const s = po(n.ch[0]), i = jr(n.ch[1]), d = jr(n.ch[2]);
419
- if (s === null || i === null || d === null) return null;
420
- const [g, C, b] = mo(s, i, d);
421
- return k(g, C, b, c);
422
- }
423
- if (e.includes(",")) {
424
- const n = e.split(",").map((d) => d.trim());
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 q(o) {
432
- const e = w(o);
433
- return e <= 0.04045 ? e / 12.92 : Math.pow((e + 0.055) / 1.055, 2.4);
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 mr(o) {
436
- const e = w(o);
437
- return e <= 31308e-7 ? e * 12.92 : 1.055 * Math.pow(e, 1 / 2.4) - 0.055;
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 vo(o, e, t) {
440
- const a = 0.4122214708 * o + 0.5363325363 * e + 0.0514459929 * t, n = 0.2119034982 * o + 0.6806995451 * e + 0.1073969566 * t, c = 0.0883024619 * o + 0.2817188376 * e + 0.6299787005 * t, s = Math.cbrt(a), i = Math.cbrt(n), d = Math.cbrt(c);
441
- return {
442
- L: 0.2104542553 * s + 0.793617785 * i - 0.0040720468 * d,
443
- a: 1.9779984951 * s - 2.428592205 * i + 0.4505937099 * d,
444
- b: 0.0259040371 * s + 0.7827717662 * i - 0.808675766 * d
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 vr(o, e, t) {
448
- const a = o + 0.3963377774 * e + 0.2158037573 * t, n = o - 0.1055613458 * e - 0.0638541728 * t, c = o - 0.0894841775 * e - 1.291485548 * t, s = a * a * a, i = n * n * n, d = c * c * c;
449
- return [
450
- 4.0767416621 * s - 3.3077115913 * i + 0.2309699292 * d,
451
- -1.2684380046 * s + 2.6097574011 * i - 0.3413193965 * d,
452
- -0.0041960863 * s - 0.7034186147 * i + 1.707614701 * d
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 gr(o) {
456
- return vo(q(o.r / 255), q(o.g / 255), q(o.b / 255));
597
+ function A(e) {
598
+ return re(D(e.r / 255), D(e.g / 255), D(e.b / 255));
457
599
  }
458
- const yo = 1e-6;
459
- function Fr(o) {
460
- const e = Math.hypot(o.a, o.b);
461
- let t = e < yo ? 0 : Math.atan2(o.b, o.a) * 180 / Math.PI;
462
- return t < 0 && (t += 360), t >= 360 && (t -= 360), { l: o.L, c: e, h: t };
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 yr(o, e, t) {
465
- const a = t * Math.PI / 180;
466
- return { L: o, a: e * Math.cos(a), b: e * Math.sin(a) };
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
- const z = 1e-6, Rr = (o) => o[0] >= -z && o[0] <= 1 + z && o[1] >= -z && o[1] <= 1 + z && o[2] >= -z && o[2] <= 1 + z;
469
- function nr(o, e, t, a) {
470
- const n = w(y(o));
471
- let c = Math.max(0, y(e));
472
- const s = y(t);
473
- let i = yr(n, c, s), d = vr(i.L, i.a, i.b);
474
- if (!Rr(d)) {
475
- let g = 0, C = c;
476
- for (let b = 0; b < 24; b++) {
477
- const x = (g + C) / 2, P = yr(n, x, s);
478
- Rr(vr(P.L, P.a, P.b)) ? g = x : C = x;
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 J(o) {
485
- const e = Fr(gr(o));
486
- return { l: e.l, c: e.c, h: e.h, a: w(y(o.a, 1)) };
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 fr(o) {
489
- return nr(o.l, o.c, o.h, o.a);
639
+ function oe(e) {
640
+ return N(e.l, e.c, e.h, e.a);
490
641
  }
491
- function xo(o) {
492
- const e = w(y(o.a, 1)), t = `#${ur(o.r)}${ur(o.g)}${ur(o.b)}`;
493
- return e < 1 ? `${t}${ur(e * 255)}` : t;
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 kr(o) {
496
- const e = w(y(o.a, 1)), t = B(o.r), a = B(o.g), n = B(o.b);
497
- return e >= 1 ? `rgb(${t}, ${a}, ${n})` : `rgba(${t}, ${a}, ${n}, ${Number(e.toFixed(3))})`;
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 Wr(o) {
500
- return `${B(o.r)}, ${B(o.g)}, ${B(o.b)}`;
650
+ function I(e) {
651
+ return `${g(e.r)}, ${g(e.g)}, ${g(e.b)}`;
501
652
  }
502
- function or(o) {
503
- return 0.2126 * q(y(o.r) / 255) + 0.7152 * q(y(o.g) / 255) + 0.0722 * q(y(o.b) / 255);
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 m(o, e) {
506
- const t = e.a >= 1 ? e : k(e.r, e.g, e.b, 1), a = o.a < 1 ? er(o, t) : o, n = or(a), c = or(t), s = Math.max(n, c), i = Math.min(n, c);
507
- return (s + 0.05) / (i + 0.05);
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 er(o, e) {
510
- const t = w(y(o.a, 1)), a = w(y(e.a, 1)), n = t + a * (1 - t);
511
- if (n <= 0) return k(0, 0, 0, 0);
512
- const c = a * (1 - t) / n, s = t / n;
513
- return k(o.r * s + e.r * c, o.g * s + e.g * c, o.b * s + e.b * c, n);
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 tr(o, e, t) {
516
- const a = w(y(t));
517
- if (a <= 0) return k(o.r, o.g, o.b, w(y(o.a, 1)));
518
- if (a >= 1) return k(e.r, e.g, e.b, w(y(e.a, 1)));
519
- const n = w(y(o.a, 1)), c = w(y(e.a, 1)), s = gr(o), i = gr(e), d = n + (c - n) * a, g = d > 0 ? n * (1 - a) / d : 1 - a, C = d > 0 ? c * a / d : a, b = { L: s.L * g + i.L * C, a: s.a * g + i.a * C, b: s.b * g + i.b * C }, x = Fr(b);
520
- return nr(x.l, x.c, x.h, d);
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 D(o, e) {
523
- return k(o.r, o.g, o.b, w(y(e, 1)));
677
+ function V(e, t) {
678
+ return h(e.r, e.g, e.b, p(m(t, 1)));
524
679
  }
525
- function ko(o) {
526
- return gr(o).L;
680
+ function ce(e) {
681
+ return A(e).L;
527
682
  }
528
- function E(o, e) {
529
- const t = J(o);
530
- return nr(w(t.l + y(e)), t.c, t.h, t.a);
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 wo(o, e) {
533
- const t = J(o);
534
- return nr(w(y(e)), t.c, t.h, t.a);
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
- const Io = [1, 0.75, 0.5, 0.25, 0], Mo = 24;
537
- function R(o, e, t, a = "auto") {
538
- const n = y(t, 1);
539
- if (m(o, e) >= n) return o;
540
- const c = J(o), s = k(e.r, e.g, e.b, 1), i = or(s), d = (f, A) => nr(f, A, c.h, c.a), g = (f) => m(f, s), C = (f) => or(f.a < 1 ? er(f, s) : f), b = (f) => k(Math.round(f.r), Math.round(f.g), Math.round(f.b), f.a), x = (f) => {
541
- const A = f === "lighter" ? 1 : 0, j = (L) => f === "lighter" ? C(L) >= i : C(L) <= i, H = (L) => j(L) && g(L) >= n, Y = (L) => H(L) && H(b(L));
542
- let U = null;
543
- for (const L of Io) {
544
- const O = c.c * L, K = d(A, O), ar = g(K);
545
- if ((!U || ar > U.ratio) && (U = { color: K, ratio: ar }), !Y(K)) continue;
546
- let cr = c.l, V = A;
547
- for (let ir = 0; ir < Mo; ir++) {
548
- const F = (cr + V) / 2;
549
- Y(d(F, O)) ? V = F : cr = F;
550
- }
551
- const sr = d(V, O);
552
- return { color: sr, ratio: g(sr) };
553
- }
554
- return U;
555
- };
556
- if (a === "lighter" || a === "darker") return x(a).color;
557
- const P = g(d(1, 0)), p = g(d(0, 0));
558
- return x(P >= p ? "lighter" : "darker").color;
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 zr(o) {
561
- return m(I, o) >= m(Z, o);
724
+ function le(e) {
725
+ return R(l, e) >= R(u, e);
562
726
  }
563
- function Gr(o, e = Pr) {
564
- const t = e.length ? e : Pr;
565
- let a = t[0], n = -1;
566
- for (const c of t) {
567
- const s = m(c, o);
568
- s > n && (n = s, a = c);
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
- const _o = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
573
- __proto__: null,
574
- BLACK: Z,
575
- WHITE: I,
576
- adjustL: E,
577
- bestOn: Gr,
578
- composite: er,
579
- contrastRatio: m,
580
- ensureContrast: R,
581
- formatHex: xo,
582
- formatRgb: kr,
583
- formatTriplet: Wr,
584
- fromOklch: fr,
585
- isDarkSurface: zr,
586
- lightness: ko,
587
- mix: tr,
588
- parseColor: _,
589
- relativeLuminance: or,
590
- setL: wo,
591
- toOklch: J,
592
- withAlpha: D
593
- }, Symbol.toStringTag, { value: "Module" })), So = {
594
- none: ["0px", "0px", "0px", "0px"],
595
- sm: ["3px", "4px", "6px", "9999px"],
596
- md: ["4px", "6px", "10px", "9999px"],
597
- lg: ["6px", "10px", "16px", "9999px"],
598
- full: ["10px", "16px", "24px", "9999px"]
599
- }, $o = "url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxyZWN0IHg9IjAlIiB5PSIwJSIgd2lkdGg9IjUwJSIgaGVpZ2h0PSI1MCUiIHN0eWxlPSJmaWxsOiByZ2JhKDI1NSwgMjU1LCAyNTUsIDAuMDcpOyIgLz4KICA8cmVjdCB4PSI1MCUiIHk9IjAlIiB3aWR0aD0iNTAlIiBoZWlnaHQ9IjUwJSIgc3R5bGU9ImZpbGw6IHJnYmEoMjU1LCAyNTUsIDI1NSwgMCk7IiAvPgogIDxyZWN0IHg9IjUwJSIgeT0iNTAlIiB3aWR0aD0iNTAlIiBoZWlnaHQ9IjUwJSIgc3R5bGU9ImZpbGw6IHJnYmEoMjU1LCAyNTUsIDI1NSwgMC4wNyk7IiAvPgogIDxyZWN0IHg9IjAlIiB5PSI1MCUiIHdpZHRoPSI1MCUiIGhlaWdodD0iNTAlIiBzdHlsZT0iZmlsbDogcmdiYSgyNTUsIDI1NSwgMjU1LCAwKTsiIC8+Cjwvc3ZnPg==')", Ao = "url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxyZWN0IHg9IjAlIiB5PSIwJSIgd2lkdGg9IjUwJSIgaGVpZ2h0PSI1MCUiIHN0eWxlPSJmaWxsOiByZ2JhKDAsIDAsIDAsIDAuMDQ1KTsiIC8+CiAgPHJlY3QgeD0iNTAlIiB5PSI1MCUiIHdpZHRoPSI1MCUiIGhlaWdodD0iNTAlIiBzdHlsZT0iZmlsbDogcmdiYSgwLCAwLCAwLCAwLjA0NSk7IiAvPgo8L3N2Zz4=')";
600
- function To(o, e) {
601
- const t = o === "dark", a = e ? 0.06 : 0;
602
- return {
603
- text: e ? 1 : t ? 0.92 : 0.88,
604
- textMuted: e ? 0.85 : t ? 0.66 : 0.62,
605
- textFaint: e ? 0.68 : t ? 0.46 : 0.42,
606
- border: (t ? 0.12 : 0.1) + (e ? 0.18 : 0),
607
- borderStrong: (t ? 0.28 : 0.22) + (e ? 0.25 : 0),
608
- divider: (t ? 0.1 : 0.08) + (e ? 0.15 : 0),
609
- fill: (t ? 0.09 : 0.06) + a,
610
- fillHover: (t ? 0.14 : 0.1) + a,
611
- fillActive: (t ? 0.2 : 0.15) + a,
612
- field: (t ? 0.07 : 0.04) + a,
613
- fieldHover: (t ? 0.1 : 0.06) + a,
614
- fieldFocus: (t ? 0.1 : 0.05) + a,
615
- hover: (t ? 0.07 : 0.05) + a,
616
- pressed: (t ? 0.12 : 0.09) + a,
617
- soft: (t ? 0.18 : 0.12) + (e ? 0.08 : 0),
618
- softHover: (t ? 0.26 : 0.2) + (e ? 0.08 : 0),
619
- elevationMin: e ? 1.3 : t ? 1.18 : 1.06
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
- const v = (o) => kr(o), M = (o) => Wr(o), $ = (o, e) => kr(D(o, e)), Ur = (o) => ({ r: Math.round(o.r), g: Math.round(o.g), b: Math.round(o.b), a: o.a });
623
- function G(o, e, t, a, n = (c) => c) {
624
- let c = t, s = Ur(n(tr(o, e, c))), i = 0;
625
- for (; m(s, o) < a && c < 1 && i++ < 40; )
626
- c = Math.min(1, c + 0.02), s = Ur(n(tr(o, e, c)));
627
- return D(s, 1);
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 Or(o, e, t) {
630
- if (t <= 0) return o;
631
- const a = J(o), n = J(e);
632
- return fr({ l: a.l, c: Math.min(0.03, 0.03 * t) + a.c * (1 - t), h: n.h, a: a.a });
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 Do(o) {
635
- var Tr, Nr, Cr, Er, Lr, Hr, _r;
636
- const e = { version: 2, ...o ?? {} }, t = io[e.preset ?? "dark"], a = [];
637
- let n = _(e.surface) ?? null;
638
- n || (e.surface && a.push({ token: "surface", reason: `unparsable surface "${e.surface}", using preset` }), n = _(t.surface)), n = D(n, 1);
639
- let c = _(e.primary) ?? null;
640
- c || (e.primary && a.push({ token: "primary", reason: `unparsable primary "${e.primary}", using preset` }), c = _(t.primary)), c = D(c, 1);
641
- const s = zr(n) ? "dark" : "light", i = s === "dark", d = e.contrast === "high", g = To(s, d), C = Math.max(0, Math.min(1, e.tint ?? 0)), b = d ? 7 : 4.5, x = d ? 4.5 : 3, p = Or(i ? I : { r: 17, g: 17, b: 17, a: 1 }, c, C);
642
- let f, A, j;
643
- const H = (l) => Or(l, c, C);
644
- if (i) {
645
- const l = m(I, n) >= 6 ? I : Z;
646
- f = G(n, l, 0.07, g.elevationMin, H), A = G(f, l, 0.05, 1.12, H), j = G(A, l, 0.05, 1.12, H);
647
- } else {
648
- const l = m(I, n);
649
- if (l >= g.elevationMin * 1.01) {
650
- const u = l >= 1.149995 ? 1.1 : g.elevationMin;
651
- f = G(n, I, 0.5, u, H), A = m(I, f) >= 1.03 ? G(f, I, 0.6, 1.03, H) : D(I, 1), j = H(tr(A, Z, 0.035));
652
- }
653
- (!f || m(f, n) < g.elevationMin) && (f = G(n, Z, 0.03, g.elevationMin, H), A = D(I, 1), j = H(tr(A, Z, 0.05)));
654
- }
655
- if (!f || !A || !j) throw new Error("theme: elevation ladder not resolved");
656
- const Y = fr(i ? { l: 0.94, c: 0, h: 0, a: 1 } : { l: 0.28, c: 0, h: 0, a: 1 }), U = Gr(Y), L = (l) => [n, f, A, j].reduce((u, N) => m(l, N) < m(l, u) ? N : u, n), O = (l, u, N) => {
657
- let S = l, W = 0;
658
- for (; m(D(p, S), L(D(p, S))) < u && S < 1 && W++ < 25; ) S = Math.min(1, S + 0.04);
659
- return S !== l && a.push({ token: N, reason: `raised opacity ${l}→${S.toFixed(2)} to reach ${u}:1 on surfaces` }), S;
660
- }, K = O(g.text, b, "text"), ar = O(g.textMuted, b, "text-muted"), cr = O(g.textFaint, x, "text-faint"), V = (() => {
661
- const l = m(I, c), u = m({ r: 17, g: 17, b: 17, a: 1 }, c);
662
- if (l >= b) return I;
663
- const N = u > l ? { r: 17, g: 17, b: 17, a: 1 } : I;
664
- return Math.max(l, u) < b && a.push({ token: "on-primary", reason: `neither white nor black reaches ${b}:1 on primary (best ${Math.max(l, u).toFixed(2)}:1)` }), N;
665
- })(), sr = E(c, i ? 0.06 : -0.06), ir = E(c, i ? 0.1 : -0.1), F = R(c, n, b, "auto");
666
- m(F, n) > m(c, n) + 0.01 && a.push({ token: "primary-text", reason: `primary lightened/darkened to reach ${b}:1 as text on surface` });
667
- const qr = R(c, n, x, "auto"), Jr = R(c, n, x, "auto"), lr = (l) => {
668
- const u = _(lo[l]), N = m(I, u), S = m({ r: 17, g: 17, b: 17, a: 1 }, u), W = N >= b ? I : S > N ? { r: 17, g: 17, b: 17, a: 1 } : I, Q = D(u, g.soft), X = er(Q, n), Dr = (rr) => R(R(u, n, b, rr), X, b, rr), co = R(u, n, b, "auto"), so = [Dr("darker"), Dr("lighter")].find(
669
- (rr) => m(rr, n) >= b && m(rr, X) >= b
670
- );
671
- return {
672
- base: u,
673
- on: W,
674
- text: so ?? co,
675
- soft: Q,
676
- border: R(u, n, x, "auto"),
677
- dark: E(u, -0.1),
678
- light: E(u, 0.12),
679
- darker: E(u, -0.18),
680
- bright: E(u, 0.22)
681
- };
682
- }, Yr = lr("success"), Kr = lr("warning"), Vr = lr("error"), Qr = lr("info"), [Xr, ro, oo, eo] = So[e.radius ?? "md"], wr = "'Inter', sans-serif", Ir = (l) => {
683
- var u;
684
- return (u = l == null ? void 0 : l.name) != null && u.trim() ? `'${l.name.trim().replace(/'/g, "\\'")}', ${wr}` : wr;
685
- }, Mr = Ir((Tr = e.fonts) == null ? void 0 : Tr.ui), to = (Nr = e.fonts) != null && Nr.heading ? Ir(e.fonts.heading) : Mr, no = Array.from(new Set([(Er = (Cr = e.fonts) == null ? void 0 : Cr.ui) == null ? void 0 : Er.src, (Hr = (Lr = e.fonts) == null ? void 0 : Lr.heading) == null ? void 0 : Hr.src].filter((l) => !!l && /^https?:\/\//.test(l)))), Sr = (_r = e.font) != null && _r.size && e.font.size > 0 ? e.font.size : 14, T = {
686
- "color-scheme": s,
687
- surface: v(n),
688
- "surface-rgb": M(n),
689
- "surface-1": v(f),
690
- "surface-1-rgb": M(f),
691
- "surface-2": v(A),
692
- "surface-2-rgb": M(A),
693
- "surface-3": v(j),
694
- "surface-inverse": v(Y),
695
- scrim: "rgba(0, 0, 0, 0.5)",
696
- ink: v(p),
697
- "ink-rgb": M(p),
698
- text: $(p, K),
699
- "text-muted": $(p, ar),
700
- "text-faint": $(p, cr),
701
- "text-inverse": v(U),
702
- "text-on-surface-rgb": M(p),
703
- "text-on-inverse-rgb": M(U),
704
- border: $(p, g.border),
705
- "border-strong": $(p, g.borderStrong),
706
- divider: $(p, g.divider),
707
- "border-rgb": M(p),
708
- fill: $(p, g.fill),
709
- "fill-hover": $(p, g.fillHover),
710
- "fill-active": $(p, g.fillActive),
711
- field: $(p, g.field),
712
- "field-hover": $(p, g.fieldHover),
713
- "field-focus": $(p, g.fieldFocus),
714
- hover: $(p, g.hover),
715
- pressed: $(p, g.pressed),
716
- primary: v(c),
717
- "primary-rgb": M(c),
718
- "primary-hover": v(sr),
719
- "primary-active": v(ir),
720
- "on-primary": v(V),
721
- "primary-text": v(F),
722
- "primary-border": v(qr),
723
- "primary-soft": $(c, g.soft),
724
- "primary-soft-hover": $(c, g.softHover),
725
- "focus-ring": v(Jr),
726
- "focus-ring-width": d ? "3px" : "2px",
727
- "focus-ring-offset": "2px",
728
- "primary-dark": v(E(c, -0.1)),
729
- "primary-dark-rgb": M(E(c, -0.1)),
730
- "primary-light": v(E(c, 0.1)),
731
- "primary-light-rgb": M(E(c, 0.1)),
732
- "primary-bright": v(E(c, 0.2)),
733
- "primary-bright-rgb": M(E(c, 0.2)),
734
- "shadow-1": i ? "0 1px 2px rgba(0, 0, 0, 0.4)" : "0 1px 2px rgba(0, 0, 0, 0.08)",
735
- "shadow-2": i ? "0 6px 20px rgba(0, 0, 0, 0.45)" : "0 6px 20px rgba(0, 0, 0, 0.12)",
736
- "shadow-3": i ? "0 12px 40px rgba(0, 0, 0, 0.5)" : "0 12px 40px rgba(0, 0, 0, 0.16)",
737
- "radius-sm": Xr,
738
- "radius-md": ro,
739
- "radius-lg": oo,
740
- "radius-full": eo,
741
- "font-family": Mr,
742
- "font-family-heading": to,
743
- "font-size": `${Sr}px`,
744
- "root-font-size": String(Sr),
745
- canvas: i ? "rgba(0, 0, 0, 0.25)" : "rgba(0, 0, 0, 0.04)",
746
- "canvas-image": i ? $o : Ao,
747
- // Controls float over arbitrary artwork → mode-independent dark glass + white glyphs.
748
- "canvas-control": "rgba(0, 0, 0, 0.45)",
749
- "canvas-control-hover": "rgba(0, 0, 0, 0.6)",
750
- "on-canvas-control": "#ffffff",
751
- "disabled-opacity": "0.55"
752
- };
753
- for (const [l, u] of [
754
- ["success", Yr],
755
- ["warning", Kr],
756
- ["error", Vr],
757
- ["info", Qr]
758
- ])
759
- T[l] = v(u.base), T[`${l}-rgb`] = M(u.base), T[`on-${l}`] = v(u.on), T[`${l}-text`] = v(u.text), T[`${l}-soft`] = v(u.soft), T[`${l}-border`] = v(u.border), T[`${l}-dark-rgb`] = M(u.dark), T[`${l}-light-rgb`] = M(u.light), l === "info" ? T["info-bright-rgb"] = M(u.bright) : T[`${l}-darker-rgb`] = M(u.darker);
760
- if (e.overrides)
761
- for (const [l, u] of Object.entries(e.overrides)) {
762
- if (!u || !dr.includes(l)) continue;
763
- T[l] = u;
764
- const N = `${l}-rgb`;
765
- if (dr.includes(N)) {
766
- const S = _(u);
767
- S && (T[N] = M(S));
768
- }
769
- }
770
- for (const l of dr) T[l] === void 0 && (T[l] = "");
771
- const $r = T, Ar = (l) => _($r[l]), h = (l, u, N, S) => {
772
- const W = Ar(u), Q = Ar(N), X = W && Q ? m(W, er(Q, n)) : 0;
773
- return { label: l, fg: u, bg: N, ratio: Math.round(X * 100) / 100, min: S, pass: X >= S };
774
- }, ao = [
775
- h("Text on surface", "text", "surface", b),
776
- h("Muted text on surface", "text-muted", "surface", b),
777
- h("Faint text on surface", "text-faint", "surface", x),
778
- h("Text on cards (surface-1)", "text", "surface-1", b),
779
- h("Text on popovers (surface-2)", "text", "surface-2", b),
780
- h("Cards distinguishable from surface", "surface-1", "surface", g.elevationMin),
781
- h("Popovers distinguishable from cards", "surface-2", "surface-1", i ? 1.12 : 1),
782
- h("Strong border on surface", "border-strong", "surface", d ? 3 : 1.5),
783
- h("Text on primary", "on-primary", "primary", b),
784
- h("Primary as text on surface", "primary-text", "surface", b),
785
- h("Primary border on surface", "primary-border", "surface", x),
786
- h("Focus ring on surface", "focus-ring", "surface", x),
787
- h("Success text on surface", "success-text", "surface", b),
788
- h("Warning text on surface", "warning-text", "surface", b),
789
- h("Error text on surface", "error-text", "surface", b),
790
- h("Info text on surface", "info-text", "surface", b),
791
- // Where status text is actually read: on its own tint (alerts, tags, banners).
792
- h("Success text on success tint", "success-text", "success-soft", b),
793
- h("Warning text on warning tint", "warning-text", "warning-soft", b),
794
- h("Error text on error tint", "error-text", "error-soft", b),
795
- h("Info text on info tint", "info-text", "info-soft", b),
796
- h("Text on success", "on-success", "success", b),
797
- h("Text on warning", "on-warning", "warning", b),
798
- h("Text on error", "on-error", "error", b),
799
- h("Text on tooltip", "text-inverse", "surface-inverse", b)
800
- ];
801
- return { input: e, mode: s, tokens: $r, report: { mode: s, checks: ao, adjustments: a }, fontUrls: no };
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
- const r = (o) => `var(${br}${o})`, Zr = {
804
- /* ------------------------------------------------------------------ */
805
- /* Typography & focus ring */
806
- /* ------------------------------------------------------------------ */
807
- "root-font-size": r("root-font-size"),
808
- "font-family": r("font-family"),
809
- "bx-focus-ring-color": r("focus-ring"),
810
- // NOTE: the two below are identical to the semantic tokens (`--bx-focus-ring-width/-offset`).
811
- // Kept for coverage; emitters must skip them (see LEGACY_BRIDGE_IDENTITY_KEYS).
812
- "bx-focus-ring-width": r("focus-ring-width"),
813
- "bx-focus-ring-offset": r("focus-ring-offset"),
814
- /* ------------------------------------------------------------------ */
815
- /* App shell / views */
816
- /* ------------------------------------------------------------------ */
817
- "app-background-color": r("surface"),
818
- "app-background-color-rgb": r("surface-rgb"),
819
- "app-divider-color": r("divider"),
820
- "secondary-color-rgb": r("surface-2-rgb"),
821
- "editor-view-background-color": r("surface"),
822
- "fields-view-background-color": "transparent",
823
- "live-view-background-color": "transparent",
824
- "popup-background-color": r("surface-1"),
825
- "bluepic-embed-editor-border": `1px solid ${r("border")}`,
826
- "bluepic-embed-editor-border-radius": r("radius-lg"),
827
- /* ------------------------------------------------------------------ */
828
- /* Colour triplets (legacy `rgba(var(--x), a)` habit) */
829
- /* ------------------------------------------------------------------ */
830
- "primary-color-base": r("primary-rgb"),
831
- "primary-color-dark": r("primary-dark-rgb"),
832
- "primary-color-light": r("primary-light-rgb"),
833
- "primary-color-bright": r("primary-bright-rgb"),
834
- "info-color-base": r("info-rgb"),
835
- "info-color-dark": r("info-dark-rgb"),
836
- "info-color-light": r("info-light-rgb"),
837
- "info-color-bright": r("info-bright-rgb"),
838
- "success-color-base": r("success-rgb"),
839
- "success-color-light": r("success-light-rgb"),
840
- "success-color-dark": r("success-dark-rgb"),
841
- "success-color-darker": r("success-darker-rgb"),
842
- "error-color-base": r("error-rgb"),
843
- "error-color-light": r("error-light-rgb"),
844
- "error-color-dark": r("error-dark-rgb"),
845
- "error-color-darker": r("error-darker-rgb"),
846
- "warning-color-base": r("warning-rgb"),
847
- "warning-color-light": r("warning-light-rgb"),
848
- "warning-color-dark": r("warning-dark-rgb"),
849
- "warning-color-darker": r("warning-darker-rgb"),
850
- "text-color-base": r("text-on-surface-rgb"),
851
- "text-color-alt": r("text-on-inverse-rgb"),
852
- "border-color-base": r("border-rgb"),
853
- "background-color-base": r("surface-rgb"),
854
- // Historical typos that components still reference — alias them to the intended triplets.
855
- "priinfomary-color-base": r("info-rgb"),
856
- "primainfory-color-bright": r("primary-bright-rgb"),
857
- /* ------------------------------------------------------------------ */
858
- /* Undefined-today aliases (referenced by components, never preset) */
859
- /* ------------------------------------------------------------------ */
860
- "primary-color": r("primary"),
861
- "info-color": r("info"),
862
- "bx-primary-color": r("primary"),
863
- "bx-text-color": r("text"),
864
- "bx-modal-color": r("surface-1"),
865
- "bx-card-color": r("surface-1"),
866
- "upload-background-color": r("field"),
867
- "upload-text-color-title": r("text"),
868
- "upload-text-color-description": r("text-muted"),
869
- /* ------------------------------------------------------------------ */
870
- /* Input */
871
- /* ------------------------------------------------------------------ */
872
- "input-background-color": r("field"),
873
- "input-background-color-hover": r("field-hover"),
874
- "input-background-color-focus": r("field-focus"),
875
- "input-border-color": "transparent",
876
- "input-border-color-hover": "transparent",
877
- "input-border-color-focus": r("primary-border"),
878
- "input-shadow-focus-color": r("focus-ring"),
879
- "input-bordered-border-color": r("border-strong"),
880
- "input-bordered-border-color-hover": r("border-strong"),
881
- "input-bordered-border-color-focus": r("primary-border"),
882
- "input-outline-color-focus": r("focus-ring"),
883
- "input-border-color-disabled": r("border"),
884
- "input-opacity-disabled": r("disabled-opacity"),
885
- "input-ghost-border-color-hover": r("border"),
886
- "input-ghost-border-color-focus": r("primary-border"),
887
- "input-number-ctrl-separator-color": r("divider"),
888
- "input-number-ctrl-color": r("text-muted"),
889
- "input-number-ctrl-color-hover": r("text"),
890
- "input-number-ctrl-background-color-hover": r("hover"),
891
- /* Input states ('active' = primary tokens, others = status tokens) */
892
- "input-state-active-background-color": r("primary-soft"),
893
- "input-state-active-background-color-hover": r("primary-soft"),
894
- "input-state-active-background-color-focus": r("primary-soft"),
895
- "input-state-active-border-color": r("primary-border"),
896
- "input-state-active-border-color-hover": r("primary-border"),
897
- "input-state-active-border-color-focus": r("primary-border"),
898
- "input-state-success-background-color": r("success-soft"),
899
- "input-state-success-background-color-hover": r("success-soft"),
900
- "input-state-success-background-color-focus": r("success-soft"),
901
- "input-state-success-border-color": r("success-border"),
902
- "input-state-success-border-color-hover": r("success-border"),
903
- "input-state-success-border-color-focus": r("success-border"),
904
- "input-state-error-background-color": r("error-soft"),
905
- "input-state-error-background-color-hover": r("error-soft"),
906
- "input-state-error-background-color-focus": r("error-soft"),
907
- "input-state-error-border-color": r("error-border"),
908
- "input-state-error-border-color-hover": r("error-border"),
909
- "input-state-error-border-color-focus": r("error-border"),
910
- "input-state-warning-background-color": r("warning-soft"),
911
- "input-state-warning-background-color-hover": r("warning-soft"),
912
- "input-state-warning-background-color-focus": r("warning-soft"),
913
- "input-state-warning-border-color": r("warning-border"),
914
- "input-state-warning-border-color-hover": r("warning-border"),
915
- "input-state-warning-border-color-focus": r("warning-border"),
916
- /* ------------------------------------------------------------------ */
917
- /* Card */
918
- /* ------------------------------------------------------------------ */
919
- "card-background-color": r("surface-1"),
920
- "card-background-color-hover": r("surface-2"),
921
- "card-border-color": r("border"),
922
- "card-header-divider-color": r("divider"),
923
- "card-footer-divider-color": r("divider"),
924
- "card-footer-background-color": r("hover"),
925
- /* ------------------------------------------------------------------ */
926
- /* Select */
927
- /* ------------------------------------------------------------------ */
928
- "select-background-color": r("field"),
929
- "select-background-color-hover": r("field-hover"),
930
- "select-background-color-focus": r("field-focus"),
931
- "select-border": "1px solid transparent",
932
- "select-border-hover": "1px solid transparent",
933
- "select-border-focus": `1px solid ${r("primary-border")}`,
934
- "select-color": r("text"),
935
- "select-color-hover": r("text"),
936
- "select-color-focus": r("text"),
937
- "select-button-background-color": r("fill"),
938
- "select-button-background-color-hover": r("fill-hover"),
939
- "select-item-border": `2px solid ${r("primary-border")}`,
940
- /* ------------------------------------------------------------------ */
941
- /* Checkbox */
942
- /* ------------------------------------------------------------------ */
943
- "checkbox-background-color": r("field"),
944
- "checkbox-border-color": r("border-strong"),
945
- "checkbox-border-color-hover": r("primary-border"),
946
- "checkbox-outline-color-focus": r("focus-ring"),
947
- "checkbox-border-color-focus": r("primary-border"),
948
- "checkbox-background-color-checked": r("primary"),
949
- "checkbox-border-color-checked": "transparent",
950
- "checkbox-background-color-checked-hover": r("primary-hover"),
951
- "checkbox-border-color-checked-hover": "transparent",
952
- "checkbox-symbol-color": r("text-faint"),
953
- "checkbox-symbol-color-checked": r("on-primary"),
954
- /* Checkbox, secondary (tonal) look */
955
- "checkbox-secondary-background-color": r("fill"),
956
- "checkbox-secondary-background-color-hover": r("fill-hover"),
957
- "checkbox-secondary-background-color-checked": r("fill-active"),
958
- "checkbox-secondary-border": `1px solid ${r("border")}`,
959
- "checkbox-secondary-border-hover": `1px solid ${r("border-strong")}`,
960
- "checkbox-secondary-border-checked": `1px solid ${r("border-strong")}`,
961
- "checkbox-secondary-symbol-color": r("text-muted"),
962
- "checkbox-secondary-symbol-color-checked": r("primary-text"),
963
- /* ------------------------------------------------------------------ */
964
- /* Popover / tooltip */
965
- /* ------------------------------------------------------------------ */
966
- "popover-background-color": r("surface-2"),
967
- "popover-border-color": r("border"),
968
- "popover-border": `1px solid ${r("border")}`,
969
- "popover-arrow-border-color": r("border"),
970
- "popover-without-darkened-bg-background-color": r("surface-2-rgb"),
971
- "popover-without-darkened-bg-box-shadow": r("shadow-2"),
972
- "tooltip-background-color": r("surface-inverse"),
973
- "tooltip-text-color": r("text-inverse"),
974
- "tooltip-border-color": "transparent",
975
- /* ------------------------------------------------------------------ */
976
- /* Menu / label / list / empty */
977
- /* ------------------------------------------------------------------ */
978
- "menu-item-color": r("text"),
979
- "menu-item-color-active": r("primary-text"),
980
- "menu-item-background-color": "transparent",
981
- "menu-item-background-color-active": r("primary-soft"),
982
- "menu-item-background-color-hover": r("hover"),
983
- "menu-item-background-color-active-hover": r("primary-soft-hover"),
984
- "menu-divider": `1px solid ${r("divider")}`,
985
- "labeled-text-color": r("text-muted"),
986
- "label-background-color": r("fill"),
987
- "list-divider": `1px solid ${r("divider")}`,
988
- "list-item-background-color-hover": r("hover"),
989
- "empty-text-color": r("text-faint"),
990
- /* ------------------------------------------------------------------ */
991
- /* Tag */
992
- /* ------------------------------------------------------------------ */
993
- "tag-background-color": r("fill"),
994
- "tag-color": r("text"),
995
- "tag-border-color": r("border"),
996
- "tag-error-background-color": r("error-soft"),
997
- "tag-error-color": r("error-text"),
998
- "tag-error-border-color": r("error-border"),
999
- "tag-success-background-color": r("success-soft"),
1000
- "tag-success-color": r("success-text"),
1001
- "tag-success-border-color": r("success-border"),
1002
- "tag-warning-background-color": r("warning-soft"),
1003
- "tag-warning-color": r("warning-text"),
1004
- "tag-warning-border-color": r("warning-border"),
1005
- "tag-info-background-color": r("info-soft"),
1006
- "tag-info-color": r("info-text"),
1007
- "tag-info-border-color": r("info-border"),
1008
- /* ------------------------------------------------------------------ */
1009
- /* Alert */
1010
- /* ------------------------------------------------------------------ */
1011
- "alert-background-color": r("fill"),
1012
- "alert-color": r("text"),
1013
- "alert-border-color": r("border"),
1014
- "alert-icon-color": r("text-muted"),
1015
- "alert-info-background-color": r("info-soft"),
1016
- "alert-info-color": r("info-text"),
1017
- "alert-info-icon-color": r("info-text"),
1018
- "alert-info-border-color": r("info-border"),
1019
- "alert-success-background-color": r("success-soft"),
1020
- "alert-success-color": r("success-text"),
1021
- "alert-success-icon-color": r("success-text"),
1022
- "alert-success-border-color": r("success-border"),
1023
- "alert-warning-background-color": r("warning-soft"),
1024
- "alert-warning-color": r("warning-text"),
1025
- "alert-warning-icon-color": r("warning-text"),
1026
- "alert-warning-border-color": r("warning-border"),
1027
- "alert-error-background-color": r("error-soft"),
1028
- "alert-error-color": r("error-text"),
1029
- "alert-error-icon-color": r("error-text"),
1030
- "alert-error-border-color": r("error-border"),
1031
- /* ------------------------------------------------------------------ */
1032
- /* Slider / progress */
1033
- /* ------------------------------------------------------------------ */
1034
- "slider-body-background-color": r("fill-active"),
1035
- "slider-body-background-color-hover": r("fill-active"),
1036
- "slider-body-background-color-focus": r("fill-active"),
1037
- "slider-thumb-background-color": r("primary"),
1038
- "slider-thumb-background-color-hover": r("primary-hover"),
1039
- "slider-thumb-background-color-focus": r("primary-hover"),
1040
- "slider-thumb-box-shadow": r("shadow-1"),
1041
- "slider-value-background-color": r("primary"),
1042
- "slider-value-background-color-hover": r("primary"),
1043
- "slider-value-background-color-focus": r("primary"),
1044
- "progress-background-color": r("fill"),
1045
- "progress-value-color": r("primary"),
1046
- /* ------------------------------------------------------------------ */
1047
- /* Tabs */
1048
- /* ------------------------------------------------------------------ */
1049
- "tab-color": r("text-muted"),
1050
- "tab-color-active": r("primary-text"),
1051
- "tab-segment-background-color": r("fill"),
1052
- "tab-segment-background-color-active": r("surface-2"),
1053
- "tab-segment-color": r("text-muted"),
1054
- "tab-segment-color-active": r("text"),
1055
- "tab-inline-item-background-color-hover": r("hover"),
1056
- "tab-item-active-box-shadow": r("shadow-1"),
1057
- /* ------------------------------------------------------------------ */
1058
- /* Switch */
1059
- /* ------------------------------------------------------------------ */
1060
- "switch-background-color": r("fill-active"),
1061
- "switch-border": "none",
1062
- "switch-thumb-background-color": r("surface-3"),
1063
- "switch-thumb-border": "none",
1064
- "switch-thumb-shadow": r("shadow-1"),
1065
- "switch-border-hover": "none",
1066
- "switch-background-color-hover": r("fill-active"),
1067
- // no stronger neutral step exists; acceptable
1068
- "switch-thumb-background-color-hover": r("surface-3"),
1069
- "switch-thumb-border-hover": "none",
1070
- "switch-active-background-color": r("primary"),
1071
- "switch-active-border": "none",
1072
- "switch-active-thumb-background-color": r("on-primary"),
1073
- "switch-active-thumb-border": "none",
1074
- "switch-active-thumb-shadow": r("shadow-1"),
1075
- "switch-active-background-color-hover": r("primary-hover"),
1076
- "switch-active-border-hover": "none",
1077
- "switch-active-thumb-background-color-hover": r("on-primary"),
1078
- "switch-active-thumb-border-hover": "none",
1079
- /* ------------------------------------------------------------------ */
1080
- /* Radio */
1081
- /* ------------------------------------------------------------------ */
1082
- "radio-background-color": "transparent",
1083
- "radio-background-color-active": r("primary"),
1084
- "radio-background-color-hover": "transparent",
1085
- "radio-border": `1px solid ${r("border-strong")}`,
1086
- "radio-border-active": `1px solid ${r("primary")}`,
1087
- "radio-border-color-hover": r("primary-border"),
1088
- "radio-symbol-color": r("on-primary"),
1089
- "radio-label-color": r("text"),
1090
- "radio-label-color-active": r("text"),
1091
- /* ------------------------------------------------------------------ */
1092
- /* Button — default variant (ghost; `.active` = solid primary) */
1093
- /* ------------------------------------------------------------------ */
1094
- "button-background-color": "transparent",
1095
- "button-background-color-hover": r("hover"),
1096
- "button-background-color-focus": r("hover"),
1097
- // A TRANSPARENT 1px border, not `none` — the same placeholder the secondary
1098
- // and tertiary families use. `none` reserves no space, so a button that
1099
- // switches family (ghost ⇄ secondary, or any variant toggling `.active`)
1100
- // would change size by 2px and shove its neighbours around.
1101
- "button-border": "1px solid transparent",
1102
- "button-border-hover": "1px solid transparent",
1103
- "button-border-focus": "1px solid transparent",
1104
- "button-text-color": r("text"),
1105
- "button-text-color-hover": r("text"),
1106
- "button-text-color-focus": r("text"),
1107
- "button-box-shadow": "none",
1108
- "button-box-shadow-hover": "none",
1109
- "button-border-radius": r("radius-md"),
1110
- "button-active-background-color": r("primary"),
1111
- "button-active-text-color": r("on-primary"),
1112
- "button-active-border": "1px solid transparent",
1113
- "button-active-box-shadow": "none",
1114
- "button-active-background-color-hover": r("primary-hover"),
1115
- "button-active-text-color-hover": r("on-primary"),
1116
- "button-active-border-hover": "1px solid transparent",
1117
- "button-active-box-shadow-hover": "none",
1118
- /* ------------------------------------------------------------------ */
1119
- /* Button — secondary (tonal neutral in both modes) */
1120
- /* ------------------------------------------------------------------ */
1121
- "button-secondary-background-color": r("fill"),
1122
- "button-secondary-background-color-hover": r("fill-hover"),
1123
- "button-secondary-background-color-focus": r("fill-hover"),
1124
- "button-secondary-border": "1px solid transparent",
1125
- "button-secondary-border-hover": "1px solid transparent",
1126
- "button-secondary-border-focus": "1px solid transparent",
1127
- "button-secondary-text-color": r("text"),
1128
- "button-secondary-text-color-hover": r("text"),
1129
- "button-secondary-text-color-focus": r("text"),
1130
- "button-secondary-box-shadow": "none",
1131
- "button-secondary-box-shadow-hover": "none",
1132
- "button-secondary-active-background-color": r("fill-active"),
1133
- "button-secondary-active-background-color-hover": r("fill-active"),
1134
- "button-secondary-active-background-color-focus": r("fill-active"),
1135
- "button-secondary-active-border": "1px solid transparent",
1136
- "button-secondary-active-border-hover": "1px solid transparent",
1137
- "button-secondary-active-border-focus": "1px solid transparent",
1138
- "button-secondary-active-text-color": r("text"),
1139
- "button-secondary-active-text-color-hover": r("text"),
1140
- "button-secondary-active-text-color-focus": r("text"),
1141
- "button-secondary-active-box-shadow": "none",
1142
- "button-secondary-active-box-shadow-hover": "none",
1143
- /* ------------------------------------------------------------------ */
1144
- /* Button — tertiary (outlined; `.active` = solid primary) */
1145
- /* ------------------------------------------------------------------ */
1146
- "button-tertiary-background-color": "transparent",
1147
- "button-tertiary-background-color-hover": r("hover"),
1148
- "button-tertiary-background-color-focus": r("hover"),
1149
- "button-tertiary-border": `1px solid ${r("border-strong")}`,
1150
- "button-tertiary-border-hover": `1px solid ${r("border-strong")}`,
1151
- "button-tertiary-border-focus": `1px solid ${r("border-strong")}`,
1152
- "button-tertiary-text-color": r("text"),
1153
- "button-tertiary-text-color-hover": r("text"),
1154
- "button-tertiary-text-color-focus": r("text"),
1155
- "button-tertiary-box-shadow": "none",
1156
- "button-tertiary-box-shadow-hover": "none",
1157
- "button-tertiary-box-shadow-focus": "none",
1158
- "button-tertiary-active-background-color": r("primary"),
1159
- "button-tertiary-active-background-color-hover": r("primary-hover"),
1160
- "button-tertiary-active-background-color-focus": r("primary-hover"),
1161
- "button-tertiary-active-border": `1px solid ${r("primary")}`,
1162
- "button-tertiary-active-border-hover": `1px solid ${r("primary")}`,
1163
- "button-tertiary-active-border-focus": `1px solid ${r("primary")}`,
1164
- "button-tertiary-active-text-color": r("on-primary"),
1165
- "button-tertiary-active-text-color-hover": r("on-primary"),
1166
- "button-tertiary-active-text-color-focus": r("on-primary"),
1167
- "button-tertiary-active-box-shadow": "none",
1168
- "button-tertiary-active-box-shadow-hover": "none",
1169
- "button-tertiary-active-box-shadow-focus": "none",
1170
- /* ------------------------------------------------------------------ */
1171
- /* Button — quaternary (text only) */
1172
- /* ------------------------------------------------------------------ */
1173
- "button-quaternary-background-color": "transparent",
1174
- // `-background-color-hover` was never defined by any preset (→ initial = transparent); keep it.
1175
- "button-quaternary-background-color-hover": "transparent",
1176
- "button-quaternary-text-color": r("text-muted"),
1177
- "button-quaternary-text-color-hover": r("text"),
1178
- "button-quaternary-active-background-color": "transparent",
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 Po(o, e) {
1289
- const t = Array.isArray(e) ? e.join(", ") : e, a = Eo(o), n = Object.entries(a).map(([c, s]) => `${c}: ${s};`).join(" ");
1290
- return `${t} { color-scheme: ${o.mode}; ${n} }`;
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
- function jo(o) {
1293
- return !!o && typeof o == "object" && o.version === 2;
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 Ro(o) {
1296
- const e = o ?? {}, t = e["editor-view-background-color"] || (e["app-background-color-rgb"] ? `rgb(${e["app-background-color-rgb"]})` : void 0) || e["popup-background-color"], a = e["primary-color-base"] ? `rgb(${e["primary-color-base"]})` : void 0, n = _(t) ? t : void 0, c = _(a) ? a : void 0, s = typeof e.key == "string" && e.key.endsWith("-wcag"), i = { version: 2 };
1297
- return n && (i.surface = n), c && (i.primary = c), s && (i.contrast = "high"), typeof e.key == "string" && (i.preset = e.key.startsWith("light") ? "light" : "dark"), i;
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
- export {
1300
- Zr as LEGACY_BRIDGE,
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 };