@floegence/floe-webapp-core 0.102.1 → 0.103.2

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.
@@ -1469,7 +1469,7 @@ function cn(t) {
1469
1469
  if (p && c === l.length - 1 && b && g && f && !/[\n\r]/u.test(h)) {
1470
1470
  const k = g, T = b.tokens.at(-1), I = T?.type === "text" && k.from === b.tokens.length - 1 && !W(h) && !k.extensionPending && !/[\\\x60*_[\]<>~&:/.@;|="'()-]/u.test(h) && !/[\\\x60*_[\]<>~&:/.@;|="'()-]$/u.test(k.lastChar);
1471
1471
  if (b.raw += h, b.text += h, I) {
1472
- const R = T, B = k.unresolved ? -1 : h.lastIndexOf(" "), D = B > 0 ? h.slice(0, B) : B === 0 ? "" : h, he = [], pe = b.tokens.length - 1;
1472
+ const R = T, B = !k.unresolved && k.source.length + h.length >= 256 ? h.lastIndexOf(" ") : -1, D = B > 0 ? h.slice(0, B) : B === 0 ? "" : h, he = [], pe = b.tokens.length - 1;
1473
1473
  if (D && (R.raw += D, R.text += D, he.push({
1474
1474
  kind: "append_text",
1475
1475
  id: p.id,
@@ -1,7 +1,7 @@
1
1
  function e() {
2
2
  return new Worker(new URL(
3
3
  /* @vite-ignore */
4
- "" + new URL("../../../assets/markdown.worker-CDm-uCXT.js", import.meta.url).href,
4
+ "" + new URL("../../../assets/markdown.worker-C0gQHRqQ.js", import.meta.url).href,
5
5
  import.meta.url
6
6
  ), { type: "module" });
7
7
  }
@@ -181,7 +181,7 @@ function X(k) {
181
181
  if (t && o === a.length - 1 && i && O && S && !/[\n\r]/u.test(e)) {
182
182
  const s = O, l = i.tokens.at(-1), p = l?.type === "text" && s.from === i.tokens.length - 1 && !z(e) && !s.extensionPending && !/[\\\x60*_[\]<>~&:/.@;|="'()-]/u.test(e) && !/[\\\x60*_[\]<>~&:/.@;|="'()-]$/u.test(s.lastChar);
183
183
  if (i.raw += e, i.text += e, p) {
184
- const c = l, h = s.unresolved ? -1 : e.lastIndexOf(" "), x = h > 0 ? e.slice(0, h) : h === 0 ? "" : e, T = [], A = i.tokens.length - 1;
184
+ const c = l, h = !s.unresolved && s.source.length + e.length >= 256 ? e.lastIndexOf(" ") : -1, x = h > 0 ? e.slice(0, h) : h === 0 ? "" : e, T = [], A = i.tokens.length - 1;
185
185
  if (x && (c.raw += x, c.text += x, T.push({
186
186
  kind: "append_text",
187
187
  id: t.id,
@@ -1,4 +1,4 @@
1
- import { type JSX } from 'solid-js';
1
+ import { type Accessor, type JSX } from 'solid-js';
2
2
  import { type FloeThemePreset, type PortableShellTheme } from '../../themes';
3
3
  import { type ThemeFieldLabel } from './ThemeFields';
4
4
  export type ThemeStudioLabel = ThemeFieldLabel | 'blank' | 'light' | 'dark' | 'compare' | 'create' | 'edit' | 'import' | 'export' | 'generate' | 'name' | 'colors' | 'advanced' | 'save' | 'cancel' | 'invalid' | 'failed' | 'background' | 'foreground' | 'primary' | 'card' | 'sidebar' | 'border';
@@ -7,7 +7,7 @@ export interface ThemeStudioProps {
7
7
  current: PortableShellTheme;
8
8
  parts?: readonly string[];
9
9
  features?: readonly string[];
10
- renderPreview?: (preset: FloeThemePreset, inspect: (group: 'colors' | 'parts' | 'editor' | 'terminal', role: string) => void) => JSX.Element;
10
+ renderPreview?: (preset: Accessor<FloeThemePreset>, inspect: (group: 'colors' | 'parts' | 'editor' | 'terminal', role: string) => void) => JSX.Element;
11
11
  currentID?: string;
12
12
  label: (key: ThemeStudioLabel) => string;
13
13
  save: (document: PortableShellTheme, existingID?: string) => Promise<void>;
@@ -1,104 +1,104 @@
1
- import { insert as l, createComponent as n, memo as B, effect as O, setAttribute as $e, setStyleProperty as w, template as $, use as we, delegateEvents as ye } from "solid-js/web";
2
- import { createSignal as f, createEffect as le, onCleanup as Ce, createMemo as U, Show as k, For as W } from "solid-js";
3
- import { Plus as Se, Pencil as Te, Upload as xe, Download as Ee, Sparkles as ie, ChevronLeft as Oe, ChevronRight as Le, Eye as ze, Check as Ne } from "../icons/index.js";
1
+ import { insert as l, createComponent as n, memo as U, setStyleProperty as $, effect as L, setAttribute as ie, template as w, use as Ce, delegateEvents as Se } from "solid-js/web";
2
+ import { createSignal as h, createEffect as ae, onCleanup as Te, createMemo as A, Show as k, For as W } from "solid-js";
3
+ import { Plus as xe, Pencil as Ee, Upload as Oe, Download as Le, Sparkles as ce, ChevronLeft as ze, ChevronRight as Ne, Eye as Ie, Check as Je } from "../icons/index.js";
4
4
  import { Button as v } from "./Button.js";
5
- import { Input as Ie, Textarea as Je } from "./Input.js";
6
- import { Dialog as Pe } from "./Dialog.js";
7
- import { readPortableShellTheme as ae, resolvePortableShellTheme as Re, portableContrastIssue as je, PORTABLE_THEME_LIMIT as Fe, createBlankShellTheme as Be } from "../../styles/themes/portableTheme.js";
8
- import { ThemeFields as Ue } from "./ThemeFields.js";
9
- var Ae = /* @__PURE__ */ $("<div class=floe-theme-studio__actions><input hidden type=file accept=.json,application/json>"), ce = /* @__PURE__ */ $("<p role=alert class=floe-theme-picker__error>"), De = /* @__PURE__ */ $("<div class=floe-theme-studio__actions><select>"), Me = /* @__PURE__ */ $("<div class=floe-theme-studio__body><label></label><fieldset><legend></legend><div class=floe-theme-studio__swatches></div></fieldset><div class=floe-theme-studio__actions></div><details><summary>"), He = /* @__PURE__ */ $("<option>"), Ke = /* @__PURE__ */ $("<div class=floe-theme-studio__sample aria-hidden=true><aside><i></i><i></i><i></i></aside><div><strong>Aa</strong><span></span><section>"), qe = /* @__PURE__ */ $("<i>"), Ge = /* @__PURE__ */ $("<label><input type=color>");
10
- function tt(e) {
11
- const [L, C] = f(!1), [u, X] = f(!1), [m, z] = f(""), [A, oe] = f(), [N, S] = f(""), [D, M] = f(""), [de, ue] = f(), [H, Y] = f(!1), [se, Z] = f();
12
- let K, _ = 0;
13
- const [T, I] = f([]), [J, P] = f([]), y = (t) => {
14
- t !== m() && (I([...T().slice(-39), m()]), P([]), z(t));
15
- }, ge = () => {
16
- const t = T().at(-1);
17
- t !== void 0 && (P([...J(), m()]), I(T().slice(0, -1)), z(t));
18
- }, ve = () => {
19
- const t = J().at(-1);
20
- t !== void 0 && (I([...T(), m()]), P(J().slice(0, -1)), z(t));
5
+ import { Input as Pe, Textarea as Re } from "./Input.js";
6
+ import { Dialog as je } from "./Dialog.js";
7
+ import { readPortableShellTheme as oe, resolvePortableShellTheme as Fe, portableContrastIssue as Be, PORTABLE_THEME_LIMIT as Ue, createBlankShellTheme as Ae } from "../../styles/themes/portableTheme.js";
8
+ import { ThemeFields as De } from "./ThemeFields.js";
9
+ var Me = /* @__PURE__ */ w("<div class=floe-theme-studio__actions><input hidden type=file accept=.json,application/json>"), de = /* @__PURE__ */ w("<p role=alert class=floe-theme-picker__error>"), He = /* @__PURE__ */ w('<div class="floe-theme-studio__actions floe-theme-studio__origin"><select>'), Ke = /* @__PURE__ */ w("<div class=floe-theme-studio__body><div class=floe-theme-studio__preview></div><div class=floe-theme-studio__controls><label></label><fieldset><legend></legend><div class=floe-theme-studio__swatches></div></fieldset><div class=floe-theme-studio__actions></div><details><summary>"), qe = /* @__PURE__ */ w("<div class=floe-theme-studio__sample aria-hidden=true><aside><i></i><i></i><i></i></aside><div><strong>Aa</strong><span></span><section>"), Ge = /* @__PURE__ */ w("<i>"), Qe = /* @__PURE__ */ w("<option>"), Ve = /* @__PURE__ */ w("<label><input type=color>");
10
+ function nt(e) {
11
+ const [z, T] = h(!1), [u, X] = h(!1), [m, N] = h(""), [D, ue] = h(), [I, x] = h(""), [M, H] = h(""), [se, ge] = h(), [K, Y] = h(!1), [ve, Z] = h();
12
+ let q, _ = 0;
13
+ const [E, J] = h([]), [P, R] = h([]), y = (t) => {
14
+ t !== m() && (J([...E().slice(-39), m()]), R([]), N(t));
15
+ }, fe = () => {
16
+ const t = E().at(-1);
17
+ t !== void 0 && (R([...P(), m()]), J(E().slice(0, -1)), N(t));
18
+ }, he = () => {
19
+ const t = P().at(-1);
20
+ t !== void 0 && (J([...E(), m()]), R(P().slice(0, -1)), N(t));
21
21
  };
22
- le(() => {
23
- e.active || (_++, C(!1), S(""));
24
- }), Ce(() => {
22
+ ae(() => {
23
+ e.active || (_++, T(!1), x(""));
24
+ }), Te(() => {
25
25
  _++;
26
26
  });
27
- const g = U(() => {
27
+ const g = A(() => {
28
28
  try {
29
29
  return {
30
- doc: ae(m())
30
+ doc: oe(m())
31
31
  };
32
32
  } catch (t) {
33
33
  return {
34
34
  issue: t instanceof SyntaxError ? "JSON" : t.message
35
35
  };
36
36
  }
37
- }), h = U(() => {
38
- const t = H() ? de() : g().doc;
39
- return t && Re("draft", t);
37
+ }), b = A(() => {
38
+ const t = K() ? se() : g().doc;
39
+ return t && Fe("draft", t);
40
40
  });
41
- le(() => {
42
- m(), M("");
41
+ ae(() => {
42
+ m(), H("");
43
43
  });
44
- const R = U(() => {
44
+ const j = A(() => {
45
45
  const t = g().doc;
46
- return D() || (t ? je(t) : g().issue);
47
- }), j = U(() => {
46
+ return M() || (t ? Be(t) : g().issue);
47
+ }), F = A(() => {
48
48
  try {
49
49
  return JSON.parse(m());
50
50
  } catch {
51
51
  return null;
52
52
  }
53
- }), q = (t, i) => {
54
- I([]), P([]), M(""), ue(t), Y(!1), Z(void 0), oe(i), z(JSON.stringify(t, null, 2)), S(""), C(!0);
53
+ }), G = (t, c) => {
54
+ J([]), R([]), H(""), ge(t), Y(!1), Z(void 0), ue(c), N(JSON.stringify(t, null, 2)), x(""), T(!0);
55
55
  }, be = async (t) => {
56
56
  if (!t || !e.active) return;
57
- const i = ++_;
57
+ const c = ++_;
58
58
  try {
59
- if (t.size > Fe) throw new Error("128 KiB");
60
- const o = ae(await t.text());
61
- i === _ && e.active && q(o);
59
+ if (t.size > Ue) throw new Error("128 KiB");
60
+ const o = oe(await t.text());
61
+ c === _ && e.active && G(o);
62
62
  } catch (o) {
63
- i === _ && S(`${e.label("invalid")}: ${o instanceof SyntaxError ? "JSON" : o.message}`);
63
+ c === _ && x(`${e.label("invalid")}: ${o instanceof SyntaxError ? "JSON" : o.message}`);
64
64
  }
65
- }, fe = () => {
66
- const t = e.current, i = URL.createObjectURL(new Blob([JSON.stringify(t, null, 2) + `
65
+ }, me = () => {
66
+ const t = e.current, c = URL.createObjectURL(new Blob([JSON.stringify(t, null, 2) + `
67
67
  `], {
68
68
  type: "application/json"
69
69
  })), o = document.createElement("a");
70
- o.download = `${t.name.replace(/[^\p{L}\p{N}_-]+/gu, "-").slice(0, 64)}.floe-theme.json`, o.href = i, o.click(), setTimeout(() => URL.revokeObjectURL(i), 1e3);
71
- }, he = async () => {
70
+ o.download = `${t.name.replace(/[^\p{L}\p{N}_-]+/gu, "-").slice(0, 64)}.floe-theme.json`, o.href = c, o.click(), setTimeout(() => URL.revokeObjectURL(c), 1e3);
71
+ }, _e = async () => {
72
72
  const t = g().doc;
73
- if (!t || R() || !L() || !e.active || u()) return;
74
- X(!0), S("");
75
- const i = _;
73
+ if (!t || j() || !z() || !e.active || u()) return;
74
+ X(!0), x("");
75
+ const c = _;
76
76
  try {
77
- await e.save(t, A()), i === _ && C(!1);
77
+ await e.save(t, D()), c === _ && T(!1);
78
78
  } catch {
79
- i === _ && S(e.label("failed"));
79
+ c === _ && x(e.label("failed"));
80
80
  } finally {
81
81
  X(!1);
82
82
  }
83
- }, me = ["background", "card", "sidebar", "foreground", "primary", "border"], G = (t) => {
84
- const i = g().doc;
85
- e.active && L() && !u() && i && !D() && t(i);
83
+ }, ke = ["background", "card", "sidebar", "foreground", "primary", "border"], Q = (t) => {
84
+ const c = g().doc;
85
+ e.active && z() && !u() && c && !M() && t(c);
86
86
  };
87
87
  return [(() => {
88
- var t = Ae(), i = t.firstChild;
89
- i.addEventListener("change", (x) => {
90
- const Q = x.currentTarget.files?.[0];
91
- x.currentTarget.value = "", be(Q);
88
+ var t = Me(), c = t.firstChild;
89
+ c.addEventListener("change", (C) => {
90
+ const S = C.currentTarget.files?.[0];
91
+ C.currentTarget.value = "", be(S);
92
92
  });
93
- var o = K;
94
- return typeof o == "function" ? we(o, i) : K = i, l(t, n(v, {
93
+ var o = q;
94
+ return typeof o == "function" ? Ce(o, c) : q = c, l(t, n(v, {
95
95
  size: "sm",
96
- icon: Se,
96
+ icon: xe,
97
97
  variant: "outline",
98
98
  get disabled() {
99
99
  return !e.active;
100
100
  },
101
- onClick: () => q({
101
+ onClick: () => G({
102
102
  ...e.current,
103
103
  name: e.label("create")
104
104
  }),
@@ -112,7 +112,7 @@ function tt(e) {
112
112
  get children() {
113
113
  return n(v, {
114
114
  size: "icon",
115
- icon: Te,
115
+ icon: Ee,
116
116
  get disabled() {
117
117
  return !e.active;
118
118
  },
@@ -123,12 +123,12 @@ function tt(e) {
123
123
  get title() {
124
124
  return e.label("edit");
125
125
  },
126
- onClick: () => q(e.current, e.currentID)
126
+ onClick: () => G(e.current, e.currentID)
127
127
  });
128
128
  }
129
129
  }), null), l(t, n(v, {
130
130
  size: "icon",
131
- icon: xe,
131
+ icon: Oe,
132
132
  get disabled() {
133
133
  return !e.active;
134
134
  },
@@ -139,10 +139,10 @@ function tt(e) {
139
139
  get title() {
140
140
  return e.label("import");
141
141
  },
142
- onClick: () => K.click()
142
+ onClick: () => q.click()
143
143
  }), null), l(t, n(v, {
144
144
  size: "icon",
145
- icon: Ee,
145
+ icon: Le,
146
146
  get disabled() {
147
147
  return !e.active;
148
148
  },
@@ -153,7 +153,7 @@ function tt(e) {
153
153
  get title() {
154
154
  return e.label("export");
155
155
  },
156
- onClick: fe
156
+ onClick: me
157
157
  }), null), l(t, n(k, {
158
158
  get when() {
159
159
  return e.generate;
@@ -161,7 +161,7 @@ function tt(e) {
161
161
  get children() {
162
162
  return n(v, {
163
163
  size: "sm",
164
- icon: ie,
164
+ icon: ce,
165
165
  get disabled() {
166
166
  return !e.active;
167
167
  },
@@ -175,25 +175,25 @@ function tt(e) {
175
175
  }), null), t;
176
176
  })(), n(k, {
177
177
  get when() {
178
- return B(() => !!N())() && !L();
178
+ return U(() => !!I())() && !z();
179
179
  },
180
180
  get children() {
181
- var t = ce();
182
- return l(t, N), t;
181
+ var t = de();
182
+ return l(t, I), t;
183
183
  }
184
- }), n(Pe, {
184
+ }), n(je, {
185
185
  class: "floe-theme-studio",
186
186
  get open() {
187
- return B(() => !!e.active)() && L();
187
+ return U(() => !!e.active)() && z();
188
188
  },
189
189
  get title() {
190
- return e.label(A() ? "edit" : "create");
190
+ return e.label(D() ? "edit" : "create");
191
191
  },
192
192
  get closeLabel() {
193
193
  return e.label("cancel");
194
194
  },
195
195
  onOpenChange: (t) => {
196
- u() || C(t);
196
+ u() || T(t);
197
197
  },
198
198
  get footer() {
199
199
  return [n(v, {
@@ -201,20 +201,20 @@ function tt(e) {
201
201
  get disabled() {
202
202
  return u();
203
203
  },
204
- onClick: () => C(!1),
204
+ onClick: () => T(!1),
205
205
  get children() {
206
206
  return e.label("cancel");
207
207
  }
208
208
  }), n(v, {
209
- icon: Ne,
209
+ icon: Je,
210
210
  get loading() {
211
211
  return u();
212
212
  },
213
213
  get disabled() {
214
- return !!R();
214
+ return !!j();
215
215
  },
216
216
  onClick: () => {
217
- he();
217
+ _e();
218
218
  },
219
219
  get children() {
220
220
  return e.label("save");
@@ -222,39 +222,71 @@ function tt(e) {
222
222
  })];
223
223
  },
224
224
  get children() {
225
- var t = Me(), i = t.firstChild, o = i.nextSibling, x = o.firstChild, Q = x.nextSibling, F = o.nextSibling, V = F.nextSibling, _e = V.firstChild;
226
- return l(i, () => e.label("name"), null), l(i, n(Ie, {
225
+ var t = Ke(), c = t.firstChild, o = c.nextSibling, C = o.firstChild, S = C.nextSibling, p = S.firstChild, we = p.nextSibling, B = S.nextSibling, V = B.nextSibling, $e = V.firstChild;
226
+ return l(c, n(k, {
227
+ get when() {
228
+ return U(() => !!e.renderPreview)() && b();
229
+ },
230
+ get fallback() {
231
+ return (() => {
232
+ var r = qe(), a = r.firstChild, i = a.nextSibling, s = i.firstChild, f = s.nextSibling, ye = f.nextSibling;
233
+ return l(ye, n(W, {
234
+ get each() {
235
+ return b()?.preview?.colors;
236
+ },
237
+ children: (d) => (() => {
238
+ var O = Ge();
239
+ return $(O, "background", d), O;
240
+ })()
241
+ })), L((d) => {
242
+ var O = b()?.preview?.background, ee = b()?.semanticTokens?.["--foreground"], te = b()?.preview?.border, re = b()?.preview?.sidebar, ne = b()?.preview?.surface, le = b()?.preview?.primary;
243
+ return O !== d.e && $(r, "background", d.e = O), ee !== d.t && $(r, "color", d.t = ee), te !== d.a && $(r, "border-color", d.a = te), re !== d.o && $(a, "background", d.o = re), ne !== d.i && $(i, "background", d.i = ne), le !== d.n && $(f, "background", d.n = le), d;
244
+ }, {
245
+ e: void 0,
246
+ t: void 0,
247
+ a: void 0,
248
+ o: void 0,
249
+ i: void 0,
250
+ n: void 0
251
+ }), r;
252
+ })();
253
+ },
254
+ children: (r) => e.renderPreview(r, (a, i) => Z({
255
+ group: a,
256
+ role: i
257
+ }))
258
+ })), l(C, () => e.label("name"), null), l(C, n(Pe, {
227
259
  maxLength: 80,
228
260
  get value() {
229
- return B(() => typeof j()?.name == "string")() ? j().name : "";
261
+ return U(() => typeof F()?.name == "string")() ? F().name : "";
230
262
  },
231
263
  get disabled() {
232
- return u() || !j();
264
+ return u() || !F();
233
265
  },
234
266
  onInput: (r) => {
235
- const c = j();
236
- c && y(JSON.stringify({
237
- ...c,
267
+ const a = F();
268
+ a && y(JSON.stringify({
269
+ ...a,
238
270
  name: r.currentTarget.value
239
271
  }, null, 2));
240
272
  }
241
- }), null), l(t, n(k, {
273
+ }), null), l(o, n(k, {
242
274
  get when() {
243
- return !A();
275
+ return !D();
244
276
  },
245
277
  get children() {
246
- var r = De(), c = r.firstChild;
247
- return c.addEventListener("change", (a) => {
248
- const s = a.currentTarget.value;
249
- (s === "light" || s === "dark") && G((b) => y(JSON.stringify({
250
- ...b,
278
+ var r = He(), a = r.firstChild;
279
+ return a.addEventListener("change", (i) => {
280
+ const s = i.currentTarget.value;
281
+ (s === "light" || s === "dark") && Q((f) => y(JSON.stringify({
282
+ ...f,
251
283
  mode: s
252
284
  }, null, 2)));
253
- }), l(c, n(W, {
285
+ }), l(a, n(W, {
254
286
  each: ["light", "dark"],
255
- children: (a) => (() => {
256
- var s = He();
257
- return s.value = a, l(s, () => e.label(a)), s;
287
+ children: (i) => (() => {
288
+ var s = Qe();
289
+ return s.value = i, l(s, () => e.label(i)), s;
258
290
  })()
259
291
  })), l(r, n(v, {
260
292
  size: "sm",
@@ -262,68 +294,36 @@ function tt(e) {
262
294
  get disabled() {
263
295
  return u() || !g().doc;
264
296
  },
265
- onClick: () => G((a) => y(JSON.stringify(Be(a.mode, a.name), null, 2))),
297
+ onClick: () => Q((i) => y(JSON.stringify(Ae(i.mode, i.name), null, 2))),
266
298
  get children() {
267
299
  return e.label("blank");
268
300
  }
269
- }), null), O((a) => {
270
- var s = e.label("settings"), b = u() || !g().doc;
271
- return s !== a.e && $e(c, "aria-label", a.e = s), b !== a.t && (c.disabled = a.t = b), a;
301
+ }), null), L((i) => {
302
+ var s = e.label("settings"), f = u() || !g().doc;
303
+ return s !== i.e && ie(a, "aria-label", i.e = s), f !== i.t && (a.disabled = i.t = f), i;
272
304
  }, {
273
305
  e: void 0,
274
306
  t: void 0
275
- }), O(() => c.value = g().doc?.mode), r;
307
+ }), L(() => a.value = g().doc?.mode), r;
276
308
  }
277
- }), o), l(t, n(k, {
278
- get when() {
279
- return B(() => !!e.renderPreview)() && h();
280
- },
281
- get fallback() {
282
- return (() => {
283
- var r = Ke(), c = r.firstChild, a = c.nextSibling, s = a.firstChild, b = s.nextSibling, ke = b.nextSibling;
284
- return l(ke, n(W, {
285
- get each() {
286
- return h()?.preview?.colors;
287
- },
288
- children: (d) => (() => {
289
- var E = qe();
290
- return w(E, "background", d), E;
291
- })()
292
- })), O((d) => {
293
- var E = h()?.preview?.background, p = h()?.semanticTokens?.["--foreground"], ee = h()?.preview?.border, te = h()?.preview?.sidebar, ne = h()?.preview?.surface, re = h()?.preview?.primary;
294
- return E !== d.e && w(r, "background", d.e = E), p !== d.t && w(r, "color", d.t = p), ee !== d.a && w(r, "border-color", d.a = ee), te !== d.o && w(c, "background", d.o = te), ne !== d.i && w(a, "background", d.i = ne), re !== d.n && w(b, "background", d.n = re), d;
295
- }, {
296
- e: void 0,
297
- t: void 0,
298
- a: void 0,
299
- o: void 0,
300
- i: void 0,
301
- n: void 0
302
- }), r;
303
- })();
304
- },
305
- children: (r) => e.renderPreview(r(), (c, a) => Z({
306
- group: c,
307
- role: a
308
- }))
309
- }), o), l(x, () => e.label("colors")), l(Q, n(W, {
310
- each: me,
309
+ }), S), l(p, () => e.label("colors")), l(we, n(W, {
310
+ each: ke,
311
311
  children: (r) => (() => {
312
- var c = Ge(), a = c.firstChild;
313
- return a.$$input = (s) => {
314
- const b = g().doc;
315
- b && y(JSON.stringify({
316
- ...b,
312
+ var a = Ve(), i = a.firstChild;
313
+ return i.$$input = (s) => {
314
+ const f = g().doc;
315
+ f && y(JSON.stringify({
316
+ ...f,
317
317
  colors: {
318
- ...b.colors,
318
+ ...f.colors,
319
319
  [`--${r}`]: s.currentTarget.value
320
320
  }
321
321
  }, null, 2));
322
- }, l(c, () => e.label(r), null), O(() => a.value = h()?.semanticTokens?.[`--${r}`]?.slice(0, 7)), c;
322
+ }, l(a, () => e.label(r), null), L(() => i.value = b()?.semanticTokens?.[`--${r}`]?.slice(0, 7)), a;
323
323
  })()
324
- })), l(F, n(v, {
324
+ })), l(B, n(v, {
325
325
  size: "icon",
326
- icon: Oe,
326
+ icon: ze,
327
327
  variant: "ghost",
328
328
  get title() {
329
329
  return e.label("undo");
@@ -332,12 +332,12 @@ function tt(e) {
332
332
  return e.label("undo");
333
333
  },
334
334
  get disabled() {
335
- return u() || !T().length;
335
+ return u() || !E().length;
336
336
  },
337
- onClick: ge
338
- }), null), l(F, n(v, {
337
+ onClick: fe
338
+ }), null), l(B, n(v, {
339
339
  size: "icon",
340
- icon: Le,
340
+ icon: Ne,
341
341
  variant: "ghost",
342
342
  get title() {
343
343
  return e.label("redo");
@@ -346,12 +346,12 @@ function tt(e) {
346
346
  return e.label("redo");
347
347
  },
348
348
  get disabled() {
349
- return u() || !J().length;
349
+ return u() || !P().length;
350
350
  },
351
- onClick: ve
352
- }), null), l(F, n(v, {
351
+ onClick: he
352
+ }), null), l(B, n(v, {
353
353
  size: "icon",
354
- icon: ze,
354
+ icon: Ie,
355
355
  variant: "ghost",
356
356
  get "aria-label"() {
357
357
  return e.label("compare");
@@ -360,14 +360,14 @@ function tt(e) {
360
360
  return e.label("compare");
361
361
  },
362
362
  get "aria-pressed"() {
363
- return H();
363
+ return K();
364
364
  },
365
- onClick: () => Y(!H())
366
- }), null), l(t, n(k, {
365
+ onClick: () => Y(!K())
366
+ }), null), l(o, n(k, {
367
367
  get when() {
368
368
  return g().doc;
369
369
  },
370
- children: (r) => n(Ue, {
370
+ children: (r) => n(De, {
371
371
  get document() {
372
372
  return r();
373
373
  },
@@ -378,7 +378,7 @@ function tt(e) {
378
378
  return e.features;
379
379
  },
380
380
  get inspect() {
381
- return se();
381
+ return ve();
382
382
  },
383
383
  get disabled() {
384
384
  return u();
@@ -386,10 +386,10 @@ function tt(e) {
386
386
  get label() {
387
387
  return e.label;
388
388
  },
389
- invalid: M,
390
- update: (c) => y(JSON.stringify(c, null, 2))
389
+ invalid: H,
390
+ update: (a) => y(JSON.stringify(a, null, 2))
391
391
  })
392
- }), V), l(_e, () => e.label("advanced")), l(V, n(Je, {
392
+ }), V), l($e, () => e.label("advanced")), l(V, n(Re, {
393
393
  get "aria-label"() {
394
394
  return e.label("advanced");
395
395
  },
@@ -402,37 +402,43 @@ function tt(e) {
402
402
  return u();
403
403
  },
404
404
  onInput: (r) => y(r.currentTarget.value)
405
- }), null), l(t, n(k, {
405
+ }), null), l(o, n(k, {
406
406
  get when() {
407
407
  return e.generate;
408
408
  },
409
409
  get children() {
410
410
  return n(v, {
411
- icon: ie,
411
+ icon: ce,
412
412
  size: "sm",
413
413
  variant: "ghost",
414
414
  get disabled() {
415
- return !g().doc || !!D() || u();
415
+ return !g().doc || !!M() || u();
416
416
  },
417
- onClick: () => G((r) => e.generate?.(r)),
417
+ onClick: () => Q((r) => e.generate?.(r)),
418
418
  get children() {
419
419
  return e.label("generate");
420
420
  }
421
421
  });
422
422
  }
423
- }), null), l(t, n(k, {
423
+ }), null), l(o, n(k, {
424
424
  get when() {
425
- return N() || R();
425
+ return I() || j();
426
426
  },
427
427
  get children() {
428
- var r = ce();
429
- return l(r, () => N() || `${e.label("invalid")}: ${R()}`), r;
428
+ var r = de();
429
+ return l(r, () => I() || `${e.label("invalid")}: ${j()}`), r;
430
430
  }
431
- }), null), O(() => o.disabled = u() || !g().doc), t;
431
+ }), null), L((r) => {
432
+ var a = e.renderPreview ? "" : void 0, i = u() || !g().doc;
433
+ return a !== r.e && ie(t, "data-custom-preview", r.e = a), i !== r.t && (S.disabled = r.t = i), r;
434
+ }, {
435
+ e: void 0,
436
+ t: void 0
437
+ }), t;
432
438
  }
433
439
  })];
434
440
  }
435
- ye(["input"]);
441
+ Se(["input"]);
436
442
  export {
437
- tt as ThemeStudio
443
+ nt as ThemeStudio
438
444
  };