@snowcone-app/canvas 0.46.6 → 0.46.7

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 (26) hide show
  1. package/dist/{ContextualToolbars-Dmo86Wd2.js → ContextualToolbars-BA0QCFF7.js} +3 -3
  2. package/dist/{ContextualToolbars-Dmo86Wd2.js.map → ContextualToolbars-BA0QCFF7.js.map} +1 -1
  3. package/dist/{EditorCanvasImpl-BHa8q4iO.js → EditorCanvasImpl-DsAgLgmR.js} +5 -5
  4. package/dist/{EditorCanvasImpl-BHa8q4iO.js.map → EditorCanvasImpl-DsAgLgmR.js.map} +1 -1
  5. package/dist/{ImagePanel-4fHABjNT.js → ImagePanel-DXQO8eOD.js} +3 -3
  6. package/dist/{ImagePanel-4fHABjNT.js.map → ImagePanel-DXQO8eOD.js.map} +1 -1
  7. package/dist/{SnowconeCanvas-GPag5BXG.js → SnowconeCanvas-d8JHL7mC.js} +6 -6
  8. package/dist/{SnowconeCanvas-GPag5BXG.js.map → SnowconeCanvas-d8JHL7mC.js.map} +1 -1
  9. package/dist/advanced.mjs +7 -7
  10. package/dist/{custom-icons-Dt0Y4VSn.js → custom-icons-3gVIcPLj.js} +2 -2
  11. package/dist/{custom-icons-Dt0Y4VSn.js.map → custom-icons-3gVIcPLj.js.map} +1 -1
  12. package/dist/{embed-DhjsJ3ni.js → embed-CG-lFuZn.js} +5 -5
  13. package/dist/{embed-DhjsJ3ni.js.map → embed-CG-lFuZn.js.map} +1 -1
  14. package/dist/embed.mjs +3 -3
  15. package/dist/index.mjs +5 -5
  16. package/dist/{template-fields-CKEuUmTM.js → template-fields-C2JnjdcI.js} +2 -2
  17. package/dist/{template-fields-CKEuUmTM.js.map → template-fields-C2JnjdcI.js.map} +1 -1
  18. package/dist/{useCommands-BI7O5Lf0.js → useCommands--GNTAyjd.js} +141 -145
  19. package/dist/useCommands--GNTAyjd.js.map +1 -0
  20. package/dist/{validation-au_-Sj-A.js → validation-9BuyvBcJ.js} +132 -136
  21. package/dist/validation-9BuyvBcJ.js.map +1 -0
  22. package/dist/vendor/ui/primitives/Button.d.ts +1 -1
  23. package/example/package.json +1 -1
  24. package/package.json +3 -3
  25. package/dist/useCommands-BI7O5Lf0.js.map +0 -1
  26. package/dist/validation-au_-Sj-A.js.map +0 -1
@@ -1,15 +1,14 @@
1
1
  import { jsx as r, jsxs as y, Fragment as Dn } from "react/jsx-runtime";
2
2
  import * as Wn from "react";
3
3
  import Ze, { useState as le, useEffect as Me, useCallback as ft, useMemo as ys, useContext as Dr, createContext as Nr, useRef as Se, useImperativeHandle as sr, forwardRef as Br } from "react";
4
- import { E as Or, D as Is, n as Ps, o as rr, p as As, e as zr, q as Mt } from "./ContextualToolbars-Dmo86Wd2.js";
4
+ import { E as Or, D as Is, n as Ps, o as rr, p as As, e as zr, q as Mt } from "./ContextualToolbars-BA0QCFF7.js";
5
5
  import { b as is, w as or, y as $s, z as Fs, e as Ds, s as Xr, c as Yr, n as Lr } from "./design-builder-HKRo18WT.js";
6
- import { l as ir, I as ze, s as Hr, u as ar, c as Vn, v as Qt, i as Fe, J as _r, G as $r, H as Fr, F as Wr, W as Vr, T as un, q as hn, r as fn, B as Ct, Y as Kr, Z as Ur, _ as Gr, D as cr, k as qr, b as lr } from "./useCommands-BI7O5Lf0.js";
7
- import { I as Lt, G as Re, b5 as Ns, v as bs, ad as dr, b6 as Ws, b7 as jr, _ as En, b8 as Zr, b9 as us, P as kn, c as Xn, a3 as en, a1 as ms, ba as Jr, T as Qe, t as Qr, bb as es, bc as eo, bd as to, be as no, a2 as ur, a0 as so, bf as ks, $ as ro, g as oo, S as ts, av as io, K as On } from "./FontAnalyzer-CLMJi2Sw.js";
6
+ import { l as ir, Y as Hr, s as _r, u as ar, c as Vn, v as Qt, I as Xe, i as Fe, J as $r, G as Fr, H as Wr, F as Vr, W as Kr, T as un, q as hn, r as fn, B as Ct, Z as Ur, _ as Gr, $ as qr, D as cr, k as jr, b as lr } from "./useCommands--GNTAyjd.js";
7
+ import { I as Lt, G as Re, b5 as Ns, v as bs, ad as dr, b6 as Ws, b7 as Zr, _ as En, b8 as Jr, b9 as us, P as kn, c as Xn, a3 as en, a1 as ms, ba as Qr, T as Qe, t as eo, bb as es, bc as to, bd as no, be as so, a2 as ur, a0 as ro, bf as ks, $ as oo, g as io, S as ts, av as ao, K as On } from "./FontAnalyzer-CLMJi2Sw.js";
8
8
  import { createPortal as hr } from "react-dom";
9
- import { b as ao, n as fr, g as Fn, c as co, r as lo, d as uo, t as ho, C as Vs, e as Ks, f as gs, T as fo, a as po, A as mo, S as go, I as xo } from "./CanvasRenderer-CmIQSVCK.js";
10
- import { u as yo } from "./ThemeContext-Rjz25x9X.js";
11
- import { renderToStaticMarkup as bo } from "react-dom/server";
12
- import { L as It, S as pr, T as zt, I as vo } from "./custom-icons-Dt0Y4VSn.js";
9
+ import { b as co, n as fr, g as Fn, c as lo, r as uo, d as ho, t as fo, C as Vs, e as Ks, f as gs, T as po, a as mo, A as go, S as xo, I as yo } from "./CanvasRenderer-CmIQSVCK.js";
10
+ import { u as bo } from "./ThemeContext-Rjz25x9X.js";
11
+ import { L as It, S as pr, T as zt, I as vo } from "./custom-icons-3gVIcPLj.js";
13
12
  import * as ss from "@radix-ui/react-radio-group";
14
13
  import { S as Co, U as Us, V as Gs } from "./ExportManager-DEJgxB0S.js";
15
14
  import { cva as mr } from "class-variance-authority";
@@ -152,7 +151,7 @@ function Ro(e) {
152
151
  return e;
153
152
  }
154
153
  const xr = Nr(null);
155
- function Za({ kit: e, children: t }) {
154
+ function ja({ kit: e, children: t }) {
156
155
  const [n, s] = le(e);
157
156
  Me(() => {
158
157
  s(e);
@@ -171,7 +170,7 @@ function To() {
171
170
  if (!e) throw new Error("useKit must be used within a KitProvider");
172
171
  return e;
173
172
  }
174
- function Ja() {
173
+ function Za() {
175
174
  const { kit: e } = To();
176
175
  return e.capabilities;
177
176
  }
@@ -729,7 +728,7 @@ class Xo {
729
728
  var a, l, c, f, d, m, p, C;
730
729
  if (!this.state.active || this.state.points.length === 0) return;
731
730
  const { points: s, previewPoint: o, currentPoint: i } = this.state;
732
- if (t.save(), t.translate(n.x, n.y), t.strokeStyle = jr(), t.lineWidth = 2, t.setLineDash([]), t.beginPath(), s.length > 0) {
731
+ if (t.save(), t.translate(n.x, n.y), t.strokeStyle = Zr(), t.lineWidth = 2, t.setLineDash([]), t.beginPath(), s.length > 0) {
733
732
  const x = s[0];
734
733
  t.moveTo(x.x, x.y);
735
734
  for (let w = 1; w < s.length; w++) {
@@ -754,7 +753,7 @@ class Xo {
754
753
  t.setLineDash([]);
755
754
  for (let x = 0; x < s.length; x++) {
756
755
  const b = s[x];
757
- if (x === 0 && s.length > 1 && (t.strokeStyle = En(), t.lineWidth = 2, t.beginPath(), t.arc(b.x, b.y, 8, 0, Math.PI * 2), t.stroke()), t.fillStyle = Zr(), t.strokeStyle = En(), t.lineWidth = 2, t.beginPath(), t.arc(b.x, b.y, 4, 0, Math.PI * 2), t.fill(), t.stroke(), b.handleIn) {
756
+ if (x === 0 && s.length > 1 && (t.strokeStyle = En(), t.lineWidth = 2, t.beginPath(), t.arc(b.x, b.y, 8, 0, Math.PI * 2), t.stroke()), t.fillStyle = Jr(), t.strokeStyle = En(), t.lineWidth = 2, t.beginPath(), t.arc(b.x, b.y, 4, 0, Math.PI * 2), t.fill(), t.stroke(), b.handleIn) {
758
757
  const k = b.x + b.handleIn.x, S = b.y + b.handleIn.y;
759
758
  t.strokeStyle = us(), t.lineWidth = 1, t.beginPath(), t.moveTo(b.x, b.y), t.lineTo(k, S), t.stroke(), t.fillStyle = us(), t.beginPath(), t.arc(k, S, 3, 0, Math.PI * 2), t.fill();
760
759
  }
@@ -779,10 +778,7 @@ function Lo({ selectedElement: e }) {
779
778
  const [t] = le(() => new Xo()), [n, s] = le("crosshair");
780
779
  return Me(() => {
781
780
  try {
782
- const o = bo(/* @__PURE__ */ r(ze, { icon: "lucide:pen-tool", width: 24, height: 24 })).replace(
783
- /<svg[^>]*>|<\/svg>/g,
784
- ""
785
- ), i = `
781
+ const o = Hr["lucide:pen-tool"].body.replace(/^<g[^>]*>/, "").replace(/<\/g>$/, ""), i = `
786
782
  <svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
787
783
  <!-- White background stroke (thicker) -->
788
784
  <g stroke="white" stroke-width="4" fill="none" stroke-linejoin="round" stroke-linecap="round">
@@ -1004,7 +1000,7 @@ class $o {
1004
1000
  * @private
1005
1001
  */
1006
1002
  _calculateNewCropValues(t, n, s, o, i, a, l) {
1007
- const c = Jr;
1003
+ const c = Qr;
1008
1004
  let f = n, d = s, m = o, p = i;
1009
1005
  return t === "top-left" ? (f = n + a, d = s + l, m = o - a, p = i - l) : t === "top-right" ? (d = s + l, m = o + a, p = i - l) : t === "bottom-left" ? (f = n + a, m = o - a, p = i + l) : t === "bottom-right" ? (m = o + a, p = i + l) : t === "top" ? (d = s + l, p = i - l) : t === "bottom" ? p = i + l : t === "left" ? (f = n + a, m = o - a) : t === "right" && (m = o + a), this._constrainCropValues(
1010
1006
  t,
@@ -1228,7 +1224,7 @@ function Go({ elements: e }) {
1228
1224
  const [, t] = le({}), [n, s] = le(0), [o, i] = le(0), [a, l] = le(0), c = ft(() => {
1229
1225
  i((f) => f + 1);
1230
1226
  }, []);
1231
- return Me(() => Qr((d) => {
1227
+ return Me(() => eo((d) => {
1232
1228
  e.some((p) => p.id === d) && i((p) => p + 1);
1233
1229
  }), [e]), {
1234
1230
  renderVersion: o,
@@ -1417,7 +1413,7 @@ function ei(e) {
1417
1413
  if (e.focusedPieceId != null && O.id !== e.focusedPieceId)
1418
1414
  continue;
1419
1415
  const D = s == null ? void 0 : s[O.id], v = (D == null ? void 0 : D.zones) ?? [], se = (D == null ? void 0 : D.labels) ?? [];
1420
- t.save(), t.translate(O.x, O.y), ao(t, O);
1416
+ t.save(), t.translate(O.x, O.y), co(t, O);
1421
1417
  const { width: K, height: N } = fr(O), u = Jo(D, K, N), Q = Qo(D, O, K, N), G = !0, te = Math.max(0, (D == null ? void 0 : D.outerRadius) ?? 0), ce = D != null && D.boundary && D.boundary.kind === "path" ? D.boundary : null, W = ce ?? (te > 0 ? {
1422
1418
  kind: "roundedRect",
1423
1419
  x: 0,
@@ -1624,7 +1620,7 @@ function di(e) {
1624
1620
  P = { ...P, centerX: I, centerY: g };
1625
1621
  }
1626
1622
  const v = l && i.getMode() === "rotate" ? P.rotation + c : P.rotation, se = P.width, K = P.height, N = P.centerX, u = P.centerY, Q = N - se / 2, G = u - K / 2, te = N + se / 2, ce = u + K / 2;
1627
- let W = N, pe = ce + eo;
1623
+ let W = N, pe = ce + to;
1628
1624
  if (v !== 0) {
1629
1625
  const ve = -v * Math.PI / 180, Ee = Math.cos(ve), Te = Math.sin(ve), Be = W - N, De = pe - u;
1630
1626
  W = N + (Be * Ee - De * Te), pe = u + (Be * Te + De * Ee);
@@ -1640,7 +1636,7 @@ function di(e) {
1640
1636
  rotationHandleY: pe,
1641
1637
  rotation: v
1642
1638
  };
1643
- return t.save(), t.translate(N, u), t.rotate(-v * Math.PI / 180), t.translate(-N, -u), t.strokeStyle = En(), t.lineWidth = Fn(d), t.setLineDash(co(d)), t.strokeRect(Q, G, se, K), t.restore(), f || ui(t, {
1639
+ return t.save(), t.translate(N, u), t.rotate(-v * Math.PI / 180), t.translate(-N, -u), t.strokeStyle = En(), t.lineWidth = Fn(d), t.setLineDash(lo(d)), t.strokeRect(Q, G, se, K), t.restore(), f || ui(t, {
1644
1640
  renderMinX: Q,
1645
1641
  renderMinY: G,
1646
1642
  renderMaxX: te,
@@ -1672,7 +1668,7 @@ function ui(e, t) {
1672
1668
  rotationHandleY: p,
1673
1669
  stateMachine: C,
1674
1670
  zoom: x
1675
- } = t, b = uo(x), w = [
1671
+ } = t, b = ho(x), w = [
1676
1672
  { x: n, y: s, anchor: "top-left" },
1677
1673
  { x: o, y: s, anchor: "top-right" },
1678
1674
  { x: n, y: i, anchor: "bottom-left" },
@@ -1687,7 +1683,7 @@ function ui(e, t) {
1687
1683
  I = a + (v * O - se * D), g = l + (v * D + se * O);
1688
1684
  }
1689
1685
  e.save(), e.beginPath(), e.arc(I, g, b, 0, Math.PI * 2), e.fillStyle = "#fff", e.fill(), e.strokeStyle = En(), e.lineWidth = k && S && M.anchor === S ? Fn(x) * 1.25 : Fn(x), e.stroke(), e.restore();
1690
- }), k || lo(e, m, p, x, En()), C.getMode() === "resize" && hi(e, a, i, c, f);
1686
+ }), k || uo(e, m, p, x, En()), C.getMode() === "resize" && hi(e, a, i, c, f);
1691
1687
  }
1692
1688
  function hi(e, t, n, s, o) {
1693
1689
  const i = `${Math.round(s)} × ${Math.round(o)}`, a = t, l = n + 30;
@@ -1697,11 +1693,11 @@ function hi(e, t, n, s, o) {
1697
1693
  }
1698
1694
  function fi(e) {
1699
1695
  const { ctx: t, marqueeStart: n, marqueeEnd: s, zoom: o = 1 } = e, i = Math.min(n.x, s.x), a = Math.max(n.x, s.x), l = Math.min(n.y, s.y), c = Math.max(n.y, s.y);
1700
- t.save(), t.strokeStyle = En(), t.lineWidth = Fn(o), t.strokeRect(i, l, a - i, c - l), t.fillStyle = to(0.1), t.fillRect(i, l, a - i, c - l), t.restore();
1696
+ t.save(), t.strokeStyle = En(), t.lineWidth = Fn(o), t.strokeRect(i, l, a - i, c - l), t.fillStyle = no(0.1), t.fillRect(i, l, a - i, c - l), t.restore();
1701
1697
  }
1702
1698
  function pi(e) {
1703
1699
  const { ctx: t, hoveredChild: n, zoom: s = 1 } = e, o = n.getVisualBoundingBox();
1704
- t.save(), t.translate(o.x + o.width / 2, o.y + o.height / 2), t.rotate(-n.rotation * Math.PI / 180), t.translate(-(o.x + o.width / 2), -(o.y + o.height / 2)), t.strokeStyle = no(), t.lineWidth = Fn(s), t.setLineDash([]), t.strokeRect(o.x, o.y, o.width, o.height), t.restore();
1700
+ t.save(), t.translate(o.x + o.width / 2, o.y + o.height / 2), t.rotate(-n.rotation * Math.PI / 180), t.translate(-(o.x + o.width / 2), -(o.y + o.height / 2)), t.strokeStyle = so(), t.lineWidth = Fn(s), t.setLineDash([]), t.strokeRect(o.x, o.y, o.width, o.height), t.restore();
1705
1701
  }
1706
1702
  const mi = 60;
1707
1703
  class $n {
@@ -1831,7 +1827,7 @@ function xi(e) {
1831
1827
  let i;
1832
1828
  const l = () => {
1833
1829
  const { hoverState: c } = t.current;
1834
- if (c.startTime !== null && c.type !== null && performance.now() - c.startTime < 150 && (n.current = !0), ho() && (n.current = !0), n.current) {
1830
+ if (c.startTime !== null && c.type !== null && performance.now() - c.startTime < 150 && (n.current = !0), fo() && (n.current = !0), n.current) {
1835
1831
  n.current = !1;
1836
1832
  const f = performance.now();
1837
1833
  yi(t.current, o, s), $n.getInstance().recordFrameTime(performance.now() - f);
@@ -1898,8 +1894,8 @@ function yi(e, t, n) {
1898
1894
  const re = lt.getContext("2d");
1899
1895
  if (!re) return;
1900
1896
  if (v) {
1901
- const Ge = (H) => H < 0.5 ? 4 * H * H * H : 1 - Math.pow(-2 * H + 2, 3) / 2, qe = (performance.now() - te.current) % 1060 / 1060, Xe = qe < 0.5 ? 1 - Ge(qe * 2) : Ge((qe - 0.5) * 2);
1902
- G.current = Xe;
1897
+ const Ge = (H) => H < 0.5 ? 4 * H * H * H : 1 - Math.pow(-2 * H + 2, 3) / 2, qe = (performance.now() - te.current) % 1060 / 1060, ze = qe < 0.5 ? 1 - Ge(qe * 2) : Ge((qe - 0.5) * 2);
1898
+ G.current = ze;
1903
1899
  } else
1904
1900
  G.current = 1;
1905
1901
  const h = window.devicePixelRatio || 1, U = b * A, oe = w * A;
@@ -1915,7 +1911,7 @@ function yi(e, t, n) {
1915
1911
  ) : void 0;
1916
1912
  let Je = ke ? 0 : M;
1917
1913
  if (ke && ke.pieces.length === 1 && X) {
1918
- const Ue = ke.pieces[0].id, Pe = (on = ke.guides) == null ? void 0 : on[Ue], qe = Pe == null ? void 0 : Pe.outerRadius, Xe = Pe == null ? void 0 : Pe.boundary, H = Xe && typeof Xe == "object" && Xe.kind === "roundedRect" ? Xe.rx ?? Xe.ry : void 0, be = typeof qe == "number" && qe > 0 ? qe : typeof H == "number" && H > 0 ? H : 0;
1914
+ const Ue = ke.pieces[0].id, Pe = (on = ke.guides) == null ? void 0 : on[Ue], qe = Pe == null ? void 0 : Pe.outerRadius, ze = Pe == null ? void 0 : Pe.boundary, H = ze && typeof ze == "object" && ze.kind === "roundedRect" ? ze.rx ?? ze.ry : void 0, be = typeof qe == "number" && qe > 0 ? qe : typeof H == "number" && H > 0 ? H : 0;
1919
1915
  be > 0 && (Je = be);
1920
1916
  }
1921
1917
  if (X && !ke)
@@ -1956,11 +1952,11 @@ function yi(e, t, n) {
1956
1952
  if (!(Ge !== null && Ge.elementId === d.id && Ge.childId === Ue && Ge.editRichText === K)) {
1957
1953
  let qe = null;
1958
1954
  if (Ue && d instanceof Re) {
1959
- const Xe = Nt.find(
1955
+ const ze = Nt.find(
1960
1956
  (H) => H.id === d.id && H instanceof Re
1961
1957
  );
1962
- if (Xe) {
1963
- const H = Xe.clone();
1958
+ if (ze) {
1959
+ const H = ze.clone();
1964
1960
  H.children = H.children.map((be) => {
1965
1961
  if (be.id === Ue && K && be instanceof Qe) {
1966
1962
  const Oe = be.clone();
@@ -1970,15 +1966,15 @@ function yi(e, t, n) {
1970
1966
  }), qe = H;
1971
1967
  }
1972
1968
  } else if (K && d instanceof Qe) {
1973
- const Xe = d.clone();
1974
- Xe.setRichText(K), qe = Xe;
1969
+ const ze = d.clone();
1970
+ ze.setRichText(K), qe = ze;
1975
1971
  }
1976
1972
  qe ? n.current = { elementId: d.id, childId: Ue, editRichText: K, clonedElement: qe } : n.current = null;
1977
1973
  }
1978
1974
  if (n.current) {
1979
1975
  const { clonedElement: qe } = n.current;
1980
1976
  Nt = Nt.map(
1981
- (Xe) => Xe.id === d.id ? qe : Xe
1977
+ (ze) => ze.id === d.id ? qe : ze
1982
1978
  );
1983
1979
  }
1984
1980
  } else
@@ -2040,7 +2036,7 @@ function yi(e, t, n) {
2040
2036
  let Ue = !1;
2041
2037
  const Ge = xt ?? null;
2042
2038
  if (Ge && ke) {
2043
- const Xe = Ge.getVisualBoundingBox();
2039
+ const ze = Ge.getVisualBoundingBox();
2044
2040
  e: for (const H of ke.pieces) {
2045
2041
  const be = ((Ut = (an = ke.guides) == null ? void 0 : an[H.id]) == null ? void 0 : Ut.zones) ?? [];
2046
2042
  for (const Oe of be) {
@@ -2051,7 +2047,7 @@ function yi(e, t, n) {
2051
2047
  break e;
2052
2048
  }
2053
2049
  const Ye = H.x + (_e.x ?? 0), mt = H.y + (_e.y ?? 0), yt = _e.width ?? 0, rt = _e.height ?? 0;
2054
- if (Xe.x < Ye + yt && Xe.x + Xe.width > Ye && Xe.y < mt + rt && Xe.y + Xe.height > mt) {
2050
+ if (ze.x < Ye + yt && ze.x + ze.width > Ye && ze.y < mt + rt && ze.y + ze.height > mt) {
2055
2051
  Ue = !0;
2056
2052
  break e;
2057
2053
  }
@@ -2078,17 +2074,17 @@ function yi(e, t, n) {
2078
2074
  interacting: Pe,
2079
2075
  focusedPieceId: e.focusedPieceId ?? null
2080
2076
  }), qe && re.restore(), e.focusedPieceId && ke.pieces.length > 1) {
2081
- const Xe = e.focusedPieceRect ?? ke.pieces.find((H) => H.id === e.focusedPieceId) ?? null;
2082
- if (Xe) {
2077
+ const ze = e.focusedPieceRect ?? ke.pieces.find((H) => H.id === e.focusedPieceId) ?? null;
2078
+ if (ze) {
2083
2079
  re.save(), re.translate(X.x, X.y), re.globalCompositeOperation = "destination-out";
2084
2080
  const H = !!d;
2085
2081
  re.globalAlpha = H ? 1 - 0.3 : 1, re.fillStyle = "#000", re.beginPath();
2086
2082
  const be = 1e7;
2087
2083
  re.rect(-be, -be, 2 * be, 2 * be), re.rect(
2088
- Xe.x,
2089
- Xe.y,
2090
- Xe.width,
2091
- Xe.height
2084
+ ze.x,
2085
+ ze.y,
2086
+ ze.width,
2087
+ ze.height
2092
2088
  ), re.fill("evenodd"), re.restore();
2093
2089
  }
2094
2090
  }
@@ -2169,7 +2165,7 @@ class vi {
2169
2165
  }
2170
2166
  }
2171
2167
  function Ci(e) {
2172
- const { x: t, y: n, bounds: s, zoom: o = 1 } = e, i = so / o, a = s.rotation || 0, c = [
2168
+ const { x: t, y: n, bounds: s, zoom: o = 1 } = e, i = ro / o, a = s.rotation || 0, c = [
2173
2169
  { x: s.minX, y: s.minY, anchor: "top-left" },
2174
2170
  { x: s.maxX, y: s.minY, anchor: "top-right" },
2175
2171
  { x: s.minX, y: s.maxY, anchor: "bottom-left" },
@@ -2540,7 +2536,7 @@ function Bi(e) {
2540
2536
  setIsEditing: an,
2541
2537
  setCurrentFormattingStyle: Ut,
2542
2538
  getWrappedTextForEditing: Ue
2543
- } = e, Ge = Se(null), Pe = Se(/* @__PURE__ */ new Map()), qe = Se(null), Xe = Se(null), H = Se(null), be = Se(null), Oe = Se(null), _e = Se(null), Ye = Se(null), { userZoom: mt, setUserZoom: yt, panOffset: rt, setPanOffset: it } = Ds(), St = Se(mt);
2539
+ } = e, Ge = Se(null), Pe = Se(/* @__PURE__ */ new Map()), qe = Se(null), ze = Se(null), H = Se(null), be = Se(null), Oe = Se(null), _e = Se(null), Ye = Se(null), { userZoom: mt, setUserZoom: yt, panOffset: rt, setPanOffset: it } = Ds(), St = Se(mt);
2544
2540
  St.current = mt;
2545
2541
  const fe = Se(rt);
2546
2542
  fe.current = rt, Me(() => {
@@ -2620,7 +2616,7 @@ function Bi(e) {
2620
2616
  const E = Array.from(Pe.current.keys());
2621
2617
  qe.current = { a: E[0], b: E[1] };
2622
2618
  const _ = Pe.current.get(E[0]), R = Pe.current.get(E[1]);
2623
- be.current = null, Oe.current = null, Ye.current = null, Xe.current = u.clone(), h.startPinch(u, _, R);
2619
+ be.current = null, Oe.current = null, Ye.current = null, ze.current = u.clone(), h.startPinch(u, _, R);
2624
2620
  try {
2625
2621
  he.setPointerCapture(z.pointerId);
2626
2622
  } catch {
@@ -2890,7 +2886,7 @@ function Bi(e) {
2890
2886
  setHoverState: ke,
2891
2887
  forceUpdate: re
2892
2888
  })) return;
2893
- const q = Hr.shouldProtectClick(), T = Xr(z.target);
2889
+ const q = _r.shouldProtectClick(), T = Xr(z.target);
2894
2890
  if (!q && !T)
2895
2891
  if (St.current > 1.001) {
2896
2892
  Ye.current = {
@@ -3325,7 +3321,7 @@ function Bi(e) {
3325
3321
  if (B instanceof Lt && B.isCropping) {
3326
3322
  const T = B.hitTestCropHandle(V, ee, W);
3327
3323
  if (T) {
3328
- const ge = ro(
3324
+ const ge = oo(
3329
3325
  T.worldX,
3330
3326
  T.worldY,
3331
3327
  B.x,
@@ -3420,11 +3416,11 @@ function Bi(e) {
3420
3416
  if (h.getMode() === "pinch" && qe.current) {
3421
3417
  const { a: L, b: q } = qe.current;
3422
3418
  if (z.pointerId === L || z.pointerId === q) {
3423
- const j = h.getContext().element, ge = Xe.current ?? void 0;
3419
+ const j = h.getContext().element, ge = ze.current ?? void 0;
3424
3420
  j && Ke(
3425
3421
  ge,
3426
3422
  j
3427
- ), h.end(), qe.current = null, Xe.current = null, Pe.current.clear();
3423
+ ), h.end(), qe.current = null, ze.current = null, Pe.current.clear();
3428
3424
  return;
3429
3425
  }
3430
3426
  }
@@ -3454,7 +3450,7 @@ function Bi(e) {
3454
3450
  delete h._activeChildContext;
3455
3451
  }
3456
3452
  if (h._multiSelectionResizeContext && delete h._multiSelectionResizeContext, G.forEach((L) => {
3457
- if (L instanceof oo && L._lockedLineCount !== void 0) {
3453
+ if (L instanceof io && L._lockedLineCount !== void 0) {
3458
3454
  const q = L.clone();
3459
3455
  q._lockedLineCount = void 0, Ie(q);
3460
3456
  }
@@ -4077,7 +4073,7 @@ const vr = Br(
4077
4073
  pieceFocus: Q,
4078
4074
  focusedPieceRect: G
4079
4075
  }, te) => {
4080
- const { resolvedTheme: ce } = yo(), W = Se(null), pe = k || W, ae = Se(null), ve = Se(!1), Ee = Se(0), Te = Se(0), Be = Se(0), De = Se(!1), We = Se(0), at = Se(null), pt = Se(0), ct = Se(null), At = Se({ start: null, end: null }), Xt = Se(null), Dt = Se(null), Ve = Se(null), ke = Se(null), lt = 400, re = 300, h = 50, U = 200, oe = Ze.useMemo(() => {
4076
+ const { resolvedTheme: ce } = bo(), W = Se(null), pe = k || W, ae = Se(null), ve = Se(!1), Ee = Se(0), Te = Se(0), Be = Se(0), De = Se(!1), We = Se(0), at = Se(null), pt = Se(0), ct = Se(null), At = Se({ start: null, end: null }), Xt = Se(null), Dt = Se(null), Ve = Se(null), ke = Se(null), lt = 400, re = 300, h = 50, U = 200, oe = Ze.useMemo(() => {
4081
4077
  if (!Q || Q === "spread") return null;
4082
4078
  const ye = (u == null ? void 0 : u.pieces) ?? [];
4083
4079
  if (ye.length <= 1) return null;
@@ -4129,13 +4125,13 @@ const vr = Br(
4129
4125
  } = Uo(), {
4130
4126
  renderVersion: Pe,
4131
4127
  forceRender: qe,
4132
- handlesVersion: Xe,
4128
+ handlesVersion: ze,
4133
4129
  setHandlesVersion: H,
4134
4130
  forceUpdate: be,
4135
4131
  cursorAnimationFrame: Oe,
4136
4132
  setCursorAnimationFrame: _e
4137
- } = Go({ elements: e }), [Ye] = le(() => new fo()), [mt] = le(() => new po({ showBorder: !1, showLabel: !1 })), [yt] = le(() => new mo({ enabled: !0, showGuides: !0 })), [rt] = le(() => new go({ enabled: !0, showLabels: !0 })), [it] = le(() => {
4138
- const ye = new xo();
4133
+ } = Go({ elements: e }), [Ye] = le(() => new po()), [mt] = le(() => new mo({ showBorder: !1, showLabel: !1 })), [yt] = le(() => new go({ enabled: !0, showGuides: !0 })), [rt] = le(() => new xo({ enabled: !0, showLabels: !0 })), [it] = le(() => {
4134
+ const ye = new yo();
4139
4135
  return ye.setResizePipeline(gs), ye.setSnapHandler(yt), ye;
4140
4136
  });
4141
4137
  Me(() => {
@@ -4503,7 +4499,7 @@ const vr = Br(
4503
4499
  marqueeEnd: tt,
4504
4500
  marqueePreviewSelection: bt,
4505
4501
  penTool: vn,
4506
- handlesVersion: Xe,
4502
+ handlesVersion: ze,
4507
4503
  hideHandles: w,
4508
4504
  resolvedTheme: ce,
4509
4505
  cursorAnimationFrame: Oe,
@@ -4636,7 +4632,7 @@ const vr = Br(
4636
4632
  onChange: (je) => {
4637
4633
  const Ae = je.target.value;
4638
4634
  if (!_) {
4639
- const Jt = io.fromPlainText(Ae, {});
4635
+ const Jt = ao.fromPlainText(Ae, {});
4640
4636
  F.current = Jt, R(Jt), ee(Ae);
4641
4637
  const jn = je.target.selectionEnd;
4642
4638
  L(jn), T(je.target.selectionStart), ge(je.target.selectionEnd);
@@ -5027,7 +5023,7 @@ const Hi = typeof navigator < "u" && /Mac|iP(hone|ad|od)/.test(navigator.platfor
5027
5023
  Qt,
5028
5024
  {
5029
5025
  "data-testid": "context-menu-copy",
5030
- icon: /* @__PURE__ */ r(ze, { icon: Fe.copy, className: "sc:size-3.5" }),
5026
+ icon: /* @__PURE__ */ r(Xe, { icon: Fe.copy, className: "sc:size-3.5" }),
5031
5027
  label: "Copy",
5032
5028
  shortcut: `${Qn}C`,
5033
5029
  onClick: K(() => s())
@@ -5037,7 +5033,7 @@ const Hi = typeof navigator < "u" && /Mac|iP(hone|ad|od)/.test(navigator.platfor
5037
5033
  Qt,
5038
5034
  {
5039
5035
  "data-testid": "context-menu-paste",
5040
- icon: /* @__PURE__ */ r(ze, { icon: Fe.paste, className: "sc:size-3.5" }),
5036
+ icon: /* @__PURE__ */ r(Xe, { icon: Fe.paste, className: "sc:size-3.5" }),
5041
5037
  label: "Paste",
5042
5038
  shortcut: `${Qn}V`,
5043
5039
  disabled: !i,
@@ -5048,7 +5044,7 @@ const Hi = typeof navigator < "u" && /Mac|iP(hone|ad|od)/.test(navigator.platfor
5048
5044
  Qt,
5049
5045
  {
5050
5046
  "data-testid": "context-menu-duplicate",
5051
- icon: /* @__PURE__ */ r(ze, { icon: Fe.copy, className: "sc:size-3.5" }),
5047
+ icon: /* @__PURE__ */ r(Xe, { icon: Fe.copy, className: "sc:size-3.5" }),
5052
5048
  label: "Duplicate",
5053
5049
  shortcut: `${Qn}D`,
5054
5050
  onClick: K(() => P.forEach((u) => d(u)))
@@ -5059,7 +5055,7 @@ const Hi = typeof navigator < "u" && /Mac|iP(hone|ad|od)/.test(navigator.platfor
5059
5055
  Qt,
5060
5056
  {
5061
5057
  "data-testid": "context-menu-lock",
5062
- icon: /* @__PURE__ */ r(ze, { icon: O ? Fe.lockOpen : Fe.lock, className: "sc:size-3.5" }),
5058
+ icon: /* @__PURE__ */ r(Xe, { icon: O ? Fe.lockOpen : Fe.lock, className: "sc:size-3.5" }),
5063
5059
  label: O ? "Unlock" : "Lock",
5064
5060
  onClick: K(() => P.forEach((u) => p(u)))
5065
5061
  }
@@ -5069,7 +5065,7 @@ const Hi = typeof navigator < "u" && /Mac|iP(hone|ad|od)/.test(navigator.platfor
5069
5065
  Qt,
5070
5066
  {
5071
5067
  "data-testid": "context-menu-bring-to-front",
5072
- icon: /* @__PURE__ */ r(ze, { icon: Fe.layerForward, className: "sc:size-3.5" }),
5068
+ icon: /* @__PURE__ */ r(Xe, { icon: Fe.layerForward, className: "sc:size-3.5" }),
5073
5069
  label: "Bring to Front",
5074
5070
  disabled: O,
5075
5071
  onClick: K(() => b(e.targetId))
@@ -5079,7 +5075,7 @@ const Hi = typeof navigator < "u" && /Mac|iP(hone|ad|od)/.test(navigator.platfor
5079
5075
  Qt,
5080
5076
  {
5081
5077
  "data-testid": "context-menu-bring-forward",
5082
- icon: /* @__PURE__ */ r(ze, { icon: Fe.arrowUp, className: "sc:size-3.5" }),
5078
+ icon: /* @__PURE__ */ r(Xe, { icon: Fe.arrowUp, className: "sc:size-3.5" }),
5083
5079
  label: "Bring Forward",
5084
5080
  disabled: O,
5085
5081
  onClick: K(() => C(e.targetId))
@@ -5089,7 +5085,7 @@ const Hi = typeof navigator < "u" && /Mac|iP(hone|ad|od)/.test(navigator.platfor
5089
5085
  Qt,
5090
5086
  {
5091
5087
  "data-testid": "context-menu-send-backward",
5092
- icon: /* @__PURE__ */ r(ze, { icon: Fe.arrowDown, className: "sc:size-3.5" }),
5088
+ icon: /* @__PURE__ */ r(Xe, { icon: Fe.arrowDown, className: "sc:size-3.5" }),
5093
5089
  label: "Send Backward",
5094
5090
  disabled: O,
5095
5091
  onClick: K(() => x(e.targetId))
@@ -5099,7 +5095,7 @@ const Hi = typeof navigator < "u" && /Mac|iP(hone|ad|od)/.test(navigator.platfor
5099
5095
  Qt,
5100
5096
  {
5101
5097
  "data-testid": "context-menu-send-to-back",
5102
- icon: /* @__PURE__ */ r(ze, { icon: Fe.layerBackward, className: "sc:size-3.5" }),
5098
+ icon: /* @__PURE__ */ r(Xe, { icon: Fe.layerBackward, className: "sc:size-3.5" }),
5103
5099
  label: "Send to Back",
5104
5100
  disabled: O,
5105
5101
  onClick: K(() => w(e.targetId))
@@ -5110,7 +5106,7 @@ const Hi = typeof navigator < "u" && /Mac|iP(hone|ad|od)/.test(navigator.platfor
5110
5106
  Qt,
5111
5107
  {
5112
5108
  "data-testid": "context-menu-group",
5113
- icon: /* @__PURE__ */ r(ze, { icon: Fe.group, className: "sc:size-3.5" }),
5109
+ icon: /* @__PURE__ */ r(Xe, { icon: Fe.group, className: "sc:size-3.5" }),
5114
5110
  label: "Group",
5115
5111
  disabled: D,
5116
5112
  onClick: K(() => k(P))
@@ -5120,7 +5116,7 @@ const Hi = typeof navigator < "u" && /Mac|iP(hone|ad|od)/.test(navigator.platfor
5120
5116
  Qt,
5121
5117
  {
5122
5118
  "data-testid": "context-menu-ungroup",
5123
- icon: /* @__PURE__ */ r(ze, { icon: Fe.ungroup, className: "sc:size-3.5" }),
5119
+ icon: /* @__PURE__ */ r(Xe, { icon: Fe.ungroup, className: "sc:size-3.5" }),
5124
5120
  label: "Ungroup",
5125
5121
  disabled: O,
5126
5122
  onClick: K(() => S(e.targetId))
@@ -5131,7 +5127,7 @@ const Hi = typeof navigator < "u" && /Mac|iP(hone|ad|od)/.test(navigator.platfor
5131
5127
  Qt,
5132
5128
  {
5133
5129
  "data-testid": "context-menu-delete",
5134
- icon: /* @__PURE__ */ r(ze, { icon: Fe.trash, className: "sc:size-3.5" }),
5130
+ icon: /* @__PURE__ */ r(Xe, { icon: Fe.trash, className: "sc:size-3.5" }),
5135
5131
  label: "Delete",
5136
5132
  shortcut: "Del",
5137
5133
  className: "sc:text-[#d32f2f] sc:hover:bg-[rgba(211,47,47,0.1)] sc:hover:text-[#c62828]",
@@ -5148,7 +5144,7 @@ const Hi = typeof navigator < "u" && /Mac|iP(hone|ad|od)/.test(navigator.platfor
5148
5144
  Qt,
5149
5145
  {
5150
5146
  "data-testid": "context-menu-paste",
5151
- icon: /* @__PURE__ */ r(ze, { icon: Fe.paste, className: "sc:size-3.5" }),
5147
+ icon: /* @__PURE__ */ r(Xe, { icon: Fe.paste, className: "sc:size-3.5" }),
5152
5148
  label: "Paste",
5153
5149
  shortcut: `${Qn}V`,
5154
5150
  disabled: !i,
@@ -5159,7 +5155,7 @@ const Hi = typeof navigator < "u" && /Mac|iP(hone|ad|od)/.test(navigator.platfor
5159
5155
  Qt,
5160
5156
  {
5161
5157
  "data-testid": "context-menu-select-all",
5162
- icon: /* @__PURE__ */ r(ze, { icon: Fe.selectAll, className: "sc:size-3.5" }),
5158
+ icon: /* @__PURE__ */ r(Xe, { icon: Fe.selectAll, className: "sc:size-3.5" }),
5163
5159
  label: "Select All",
5164
5160
  shortcut: `${Qn}A`,
5165
5161
  onClick: K(
@@ -5179,7 +5175,7 @@ const Hi = typeof navigator < "u" && /Mac|iP(hone|ad|od)/.test(navigator.platfor
5179
5175
  /* @__PURE__ */ r("div", { className: "sc-root", style: { display: "contents" }, children: N }),
5180
5176
  document.body
5181
5177
  );
5182
- }, $i = 0.25, Fi = 8, Wi = 0.1, Vi = 4, Ki = 1e-3, Qa = ({
5178
+ }, $i = 0.25, Fi = 8, Wi = 0.1, Vi = 4, Ki = 1e-3, Ja = ({
5183
5179
  className: e,
5184
5180
  style: t,
5185
5181
  width: n,
@@ -5196,7 +5192,7 @@ const Hi = typeof navigator < "u" && /Mac|iP(hone|ad|od)/.test(navigator.platfor
5196
5192
  pieceGuides: C,
5197
5193
  pieceFocus: x
5198
5194
  }) => {
5199
- var qe, Xe;
5195
+ var qe, ze;
5200
5196
  const {
5201
5197
  canvasEditorRef: b,
5202
5198
  canvasRef: w,
@@ -5474,7 +5470,7 @@ const Hi = typeof navigator < "u" && /Mac|iP(hone|ad|od)/.test(navigator.platfor
5474
5470
  // own compositor layer so panning feels smooth even at high
5475
5471
  // zoom (canvas DOM is bigger than container).
5476
5472
  willChange: D.x !== 0 || D.y !== 0 ? "transform" : void 0
5477
- }, Pe = (Xe = S.find((H) => H.id === A.getActiveArtboardId())) == null ? void 0 : Xe.engrave;
5473
+ }, Pe = (ze = S.find((H) => H.id === A.getActiveArtboardId())) == null ? void 0 : ze.engrave;
5478
5474
  return /* @__PURE__ */ y(
5479
5475
  "div",
5480
5476
  {
@@ -5649,20 +5645,20 @@ const cs = /* @__PURE__ */ new Map();
5649
5645
  function Pt(e, t) {
5650
5646
  cs.set(e, t);
5651
5647
  }
5652
- function ec(e) {
5648
+ function Qa(e) {
5653
5649
  return cs.get(e);
5654
5650
  }
5655
- function tc() {
5651
+ function ec() {
5656
5652
  return Array.from(cs.keys());
5657
5653
  }
5658
- function nc() {
5654
+ function tc() {
5659
5655
  return Array.from(cs.entries());
5660
5656
  }
5661
- function sc(e) {
5657
+ function nc(e) {
5662
5658
  cs.delete(e);
5663
5659
  }
5664
5660
  let Cs = !1;
5665
- async function rc() {
5661
+ async function sc() {
5666
5662
  if (Cs) return;
5667
5663
  Cs = !0, Cr();
5668
5664
  const [
@@ -5677,12 +5673,12 @@ async function rc() {
5677
5673
  ] = await Promise.all([
5678
5674
  Promise.resolve().then(() => Ea),
5679
5675
  Promise.resolve().then(() => Ra),
5680
- import("./ImagePanel-4fHABjNT.js"),
5676
+ import("./ImagePanel-DXQO8eOD.js"),
5681
5677
  Promise.resolve().then(() => Pa),
5682
5678
  Promise.resolve().then(() => Da),
5683
- import("./ContextualToolbars-Dmo86Wd2.js").then((c) => c.s),
5679
+ import("./ContextualToolbars-BA0QCFF7.js").then((c) => c.s),
5684
5680
  Promise.resolve().then(() => Na),
5685
- import("./ContextualToolbars-Dmo86Wd2.js").then((c) => c.r)
5681
+ import("./ContextualToolbars-BA0QCFF7.js").then((c) => c.r)
5686
5682
  ]);
5687
5683
  Pt("effects-panel", {
5688
5684
  component: e,
@@ -5727,28 +5723,28 @@ async function rc() {
5727
5723
  }
5728
5724
  function Cr() {
5729
5725
  Pt("layers-panel", {
5730
- component: _r,
5726
+ component: $r,
5731
5727
  label: "Layers",
5732
5728
  icon: "gravity-ui:layers",
5733
5729
  position: "left"
5734
5730
  }), Pt("menu-button", {
5735
- component: $r,
5731
+ component: Fr,
5736
5732
  label: "Menu",
5737
5733
  icon: "gravity-ui:bars",
5738
5734
  position: "topbar"
5739
5735
  }), Pt("undo-redo-controls", {
5740
- component: Fr,
5736
+ component: Wr,
5741
5737
  label: "Undo / Redo",
5742
5738
  icon: "lucide:undo-2",
5743
5739
  position: "topbar"
5744
5740
  }), Pt("add-element-menu", {
5745
- component: Wr,
5741
+ component: Vr,
5746
5742
  label: "Add Element",
5747
5743
  icon: "gravity-ui:plus",
5748
5744
  position: "topbar"
5749
5745
  });
5750
5746
  }
5751
- function oc(e) {
5747
+ function rc(e) {
5752
5748
  Cs || (Cs = !0, Cr(), Pt("effects-panel", {
5753
5749
  component: e.EffectsPanel,
5754
5750
  label: "Effects",
@@ -5870,7 +5866,7 @@ const qi = ({ stroke: e, onChange: t }) => {
5870
5866
  "%"
5871
5867
  ] })
5872
5868
  ] }),
5873
- /* @__PURE__ */ y(Vr, { delayDuration: 300, children: [
5869
+ /* @__PURE__ */ y(Kr, { delayDuration: 300, children: [
5874
5870
  /* @__PURE__ */ y(zn, { className: "sc:flex sc:flex-col sc:gap-sm", children: [
5875
5871
  /* @__PURE__ */ r(It, { children: "Line Cap" }),
5876
5872
  /* @__PURE__ */ y(os, { value: l, onValueChange: x, orientation: "horizontal", children: [
@@ -7125,21 +7121,21 @@ const xa = ({ blendMode: e = "normal", knockoutParts: t, onChange: n }) => {
7125
7121
  alternateName: k.name
7126
7122
  }), t();
7127
7123
  }, w = c ? `Browse All Glyphs - ${o}` : `Alternates for "${n}"`;
7128
- return /* @__PURE__ */ r(Kr, { open: e, onOpenChange: (k) => !k && t(), children: /* @__PURE__ */ y(
7129
- Ur,
7124
+ return /* @__PURE__ */ r(Ur, { open: e, onOpenChange: (k) => !k && t(), children: /* @__PURE__ */ y(
7125
+ Gr,
7130
7126
  {
7131
7127
  placement: "bottom",
7132
7128
  overlayOpacity: 0.4,
7133
7129
  className: "sc:flex sc:flex-col sc:overflow-hidden",
7134
7130
  style: { zIndex: "var(--sc-z-drawer, 10002)" },
7135
7131
  children: [
7136
- /* @__PURE__ */ r(Gr, { className: "sc:sr-only", children: w }),
7132
+ /* @__PURE__ */ r(qr, { className: "sc:sr-only", children: w }),
7137
7133
  /* @__PURE__ */ y("div", { className: "sc:flex sc:items-center sc:justify-between sc:px-3xl sc:pb-2xl sc:pt-2xl sc:border-b sc:border-border-primary", children: [
7138
7134
  /* @__PURE__ */ y("div", { className: "sc:flex sc:items-center sc:gap-md", children: [
7139
7135
  /* @__PURE__ */ r(pr, { size: 24, className: "sc:text-text-muted" }),
7140
7136
  /* @__PURE__ */ r("h3", { className: "sc:m-0 sc:text-3xl sc:font-semibold sc:text-text-primary", children: w })
7141
7137
  ] }),
7142
- /* @__PURE__ */ r(Ct, { size: "icon", variant: "ghost", onClick: t, children: /* @__PURE__ */ r(ze, { icon: Fe.close, className: "sc:size-6" }) })
7138
+ /* @__PURE__ */ r(Ct, { size: "icon", variant: "ghost", onClick: t, children: /* @__PURE__ */ r(Xe, { icon: Fe.close, className: "sc:size-6" }) })
7143
7139
  ] }),
7144
7140
  /* @__PURE__ */ y("div", { className: "sc:flex-1 sc:overflow-y-auto sc:p-3xl", children: [
7145
7141
  m && /* @__PURE__ */ r("div", { className: "sc:text-center sc:py-6xl sc:text-text-muted", children: "Loading alternates..." }),
@@ -7320,7 +7316,7 @@ const xa = ({ blendMode: e = "normal", knockoutParts: t, onChange: n }) => {
7320
7316
  onClick: () => c(!l),
7321
7317
  children: [
7322
7318
  /* @__PURE__ */ y("div", { className: "sc:flex sc:items-center sc:gap-sm", children: [
7323
- /* @__PURE__ */ r(ze, { icon: Fe.text, className: "sc:size-4" }),
7319
+ /* @__PURE__ */ r(Xe, { icon: Fe.text, className: "sc:size-4" }),
7324
7320
  /* @__PURE__ */ r("span", { className: "sc:text-xl sc:font-medium", children: "OpenType Features" }),
7325
7321
  N > 0 && /* @__PURE__ */ r("span", { className: "sc:rounded-full sc:bg-info sc:px-xs sc:py-[2px] sc:text-2xs sc:font-semibold sc:text-info-foreground", children: N })
7326
7322
  ] }),
@@ -7447,31 +7443,31 @@ const xa = ({ blendMode: e = "normal", knockoutParts: t, onChange: n }) => {
7447
7443
  children: [
7448
7444
  /* @__PURE__ */ r(zt.ListContainer, { className: "sc:px-6", children: /* @__PURE__ */ y(zt.List, { "aria-label": "Effect types", children: [
7449
7445
  /* @__PURE__ */ y(zt.Tab, { id: "stroke", children: [
7450
- /* @__PURE__ */ r(ze, { icon: Fe.minus, className: "sc:size-4" }),
7446
+ /* @__PURE__ */ r(Xe, { icon: Fe.minus, className: "sc:size-4" }),
7451
7447
  "Stroke",
7452
7448
  a && /* @__PURE__ */ r(_n, { variant: "default", className: "sc:ml-2 sc:size-2 sc:rounded-full sc:p-0" }),
7453
7449
  /* @__PURE__ */ r(zt.Indicator, {})
7454
7450
  ] }),
7455
7451
  /* @__PURE__ */ y(zt.Tab, { id: "masks", children: [
7456
- /* @__PURE__ */ r(ze, { icon: Fe.group, className: "sc:size-4" }),
7452
+ /* @__PURE__ */ r(Xe, { icon: Fe.group, className: "sc:size-4" }),
7457
7453
  "Masks",
7458
7454
  l && /* @__PURE__ */ r(_n, { variant: "default", className: "sc:ml-2 sc:size-2 sc:rounded-full sc:p-0" }),
7459
7455
  /* @__PURE__ */ r(zt.Indicator, {})
7460
7456
  ] }),
7461
7457
  /* @__PURE__ */ y(zt.Tab, { id: "distress", children: [
7462
- /* @__PURE__ */ r(ze, { icon: "lucide:cloud", className: "sc:size-4" }),
7458
+ /* @__PURE__ */ r(Xe, { icon: "lucide:cloud", className: "sc:size-4" }),
7463
7459
  "Distress",
7464
7460
  c && /* @__PURE__ */ r(_n, { variant: "default", className: "sc:ml-2 sc:size-2 sc:rounded-full sc:p-0" }),
7465
7461
  /* @__PURE__ */ r(zt.Indicator, {})
7466
7462
  ] }),
7467
7463
  /* @__PURE__ */ y(zt.Tab, { id: "compositing", children: [
7468
- /* @__PURE__ */ r(ze, { icon: Fe.scissors, className: "sc:size-4" }),
7464
+ /* @__PURE__ */ r(Xe, { icon: Fe.scissors, className: "sc:size-4" }),
7469
7465
  "Knockout",
7470
7466
  f && /* @__PURE__ */ r(_n, { variant: "default", className: "sc:ml-2 sc:size-2 sc:rounded-full sc:p-0" }),
7471
7467
  /* @__PURE__ */ r(zt.Indicator, {})
7472
7468
  ] }),
7473
7469
  d && /* @__PURE__ */ y(zt.Tab, { id: "typography", children: [
7474
- /* @__PURE__ */ r(ze, { icon: Fe.text, className: "sc:size-4" }),
7470
+ /* @__PURE__ */ r(Xe, { icon: Fe.text, className: "sc:size-4" }),
7475
7471
  "Typography",
7476
7472
  m && /* @__PURE__ */ r(_n, { variant: "default", className: "sc:ml-2 sc:size-2 sc:rounded-full sc:p-0" }),
7477
7473
  /* @__PURE__ */ r(zt.Indicator, {})
@@ -7489,7 +7485,7 @@ const xa = ({ blendMode: e = "normal", knockoutParts: t, onChange: n }) => {
7489
7485
  }
7490
7486
  ),
7491
7487
  /* @__PURE__ */ r("div", { className: "sc:mt-6 sc:pt-4 sc:border-t sc:border-black/10 sc:dark:border-white/10", children: /* @__PURE__ */ y("div", { className: "sc:flex sc:items-start sc:gap-2 sc:text-xs sc:text-muted", children: [
7492
- /* @__PURE__ */ r(ze, { icon: "lucide:lightbulb", className: "sc:size-4 sc:shrink-0 sc:mt-0.5" }),
7488
+ /* @__PURE__ */ r(Xe, { icon: "lucide:lightbulb", className: "sc:size-4 sc:shrink-0 sc:mt-0.5" }),
7493
7489
  /* @__PURE__ */ r("span", { children: "Add outlines to text and shapes" })
7494
7490
  ] }) })
7495
7491
  ] }),
@@ -7505,7 +7501,7 @@ const xa = ({ blendMode: e = "normal", knockoutParts: t, onChange: n }) => {
7505
7501
  }
7506
7502
  ),
7507
7503
  /* @__PURE__ */ r("div", { className: "sc:mt-6 sc:pt-4 sc:border-t sc:border-black/10 sc:dark:border-white/10", children: /* @__PURE__ */ y("div", { className: "sc:flex sc:items-start sc:gap-2 sc:text-xs sc:text-muted", children: [
7508
- /* @__PURE__ */ r(ze, { icon: "lucide:lightbulb", className: "sc:size-4 sc:shrink-0 sc:mt-0.5" }),
7504
+ /* @__PURE__ */ r(Xe, { icon: "lucide:lightbulb", className: "sc:size-4 sc:shrink-0 sc:mt-0.5" }),
7509
7505
  /* @__PURE__ */ r("span", { children: "Use masks to control visibility" })
7510
7506
  ] }) })
7511
7507
  ] }),
@@ -7521,7 +7517,7 @@ const xa = ({ blendMode: e = "normal", knockoutParts: t, onChange: n }) => {
7521
7517
  }
7522
7518
  ),
7523
7519
  /* @__PURE__ */ r("div", { className: "sc:mt-6 sc:pt-4 sc:border-t sc:border-black/10 sc:dark:border-white/10", children: /* @__PURE__ */ y("div", { className: "sc:flex sc:items-start sc:gap-2 sc:text-xs sc:text-muted", children: [
7524
- /* @__PURE__ */ r(ze, { icon: "lucide:lightbulb", className: "sc:size-4 sc:shrink-0 sc:mt-0.5" }),
7520
+ /* @__PURE__ */ r(Xe, { icon: "lucide:lightbulb", className: "sc:size-4 sc:shrink-0 sc:mt-0.5" }),
7525
7521
  /* @__PURE__ */ r("span", { children: "Add vintage/grunge effects for t-shirt designs" })
7526
7522
  ] }) })
7527
7523
  ] }),
@@ -7538,7 +7534,7 @@ const xa = ({ blendMode: e = "normal", knockoutParts: t, onChange: n }) => {
7538
7534
  }
7539
7535
  ),
7540
7536
  /* @__PURE__ */ r("div", { className: "sc:mt-6 sc:pt-4 sc:border-t sc:border-black/10 sc:dark:border-white/10", children: /* @__PURE__ */ y("div", { className: "sc:flex sc:items-start sc:gap-2 sc:text-xs sc:text-muted", children: [
7541
- /* @__PURE__ */ r(ze, { icon: "lucide:lightbulb", className: "sc:size-4 sc:shrink-0 sc:mt-0.5" }),
7537
+ /* @__PURE__ */ r(Xe, { icon: "lucide:lightbulb", className: "sc:size-4 sc:shrink-0 sc:mt-0.5" }),
7542
7538
  /* @__PURE__ */ r("span", { children: "Use Artboard scope for t-shirts, Group scope for patterns" })
7543
7539
  ] }) })
7544
7540
  ] }),
@@ -7562,7 +7558,7 @@ const xa = ({ blendMode: e = "normal", knockoutParts: t, onChange: n }) => {
7562
7558
  }
7563
7559
  ),
7564
7560
  /* @__PURE__ */ r("div", { className: "sc:mt-6 sc:pt-4 sc:border-t sc:border-black/10 sc:dark:border-white/10", children: /* @__PURE__ */ y("div", { className: "sc:flex sc:items-start sc:gap-2 sc:text-xs sc:text-muted", children: [
7565
- /* @__PURE__ */ r(ze, { icon: "lucide:lightbulb", className: "sc:size-4 sc:shrink-0 sc:mt-0.5" }),
7561
+ /* @__PURE__ */ r(Xe, { icon: "lucide:lightbulb", className: "sc:size-4 sc:shrink-0 sc:mt-0.5" }),
7566
7562
  /* @__PURE__ */ r("span", { children: "Enable advanced OpenType features like ligatures and stylistic sets" })
7567
7563
  ] }) })
7568
7564
  ] })
@@ -7615,7 +7611,7 @@ const xa = ({ blendMode: e = "normal", knockoutParts: t, onChange: n }) => {
7615
7611
  progress: p,
7616
7612
  supportsWorkerExport: C,
7617
7613
  workerStats: x
7618
- } = qr(), { artboardsInfo: b, activeArtboardId: w } = lr(), [k, S] = le(t), [A, M] = le(n), [I, g] = le(500), P = async () => {
7614
+ } = jr(), { artboardsInfo: b, activeArtboardId: w } = lr(), [k, S] = le(t), [A, M] = le(n), [I, g] = le(500), P = async () => {
7619
7615
  if (w)
7620
7616
  try {
7621
7617
  const v = await a(w, { scale: k, format: A }), se = document.createElement("a"), K = b.find((Q) => Q.id === w), N = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), u = (K == null ? void 0 : K.name) || "artboard";
@@ -7796,7 +7792,7 @@ const xa = ({ blendMode: e = "normal", knockoutParts: t, onChange: n }) => {
7796
7792
  opacity: d || !w ? 0.5 : 1
7797
7793
  },
7798
7794
  children: [
7799
- /* @__PURE__ */ r(ze, { icon: Fe.download, className: "sc:size-4" }),
7795
+ /* @__PURE__ */ r(Xe, { icon: Fe.download, className: "sc:size-4" }),
7800
7796
  d ? "Exporting..." : "Export Active Artboard"
7801
7797
  ]
7802
7798
  }
@@ -7822,7 +7818,7 @@ const xa = ({ blendMode: e = "normal", knockoutParts: t, onChange: n }) => {
7822
7818
  opacity: d || b.length === 0 ? 0.5 : 1
7823
7819
  },
7824
7820
  children: [
7825
- /* @__PURE__ */ r(ze, { icon: Fe.image, className: "sc:size-4" }),
7821
+ /* @__PURE__ */ r(Xe, { icon: Fe.image, className: "sc:size-4" }),
7826
7822
  d ? "Exporting..." : "Export All Artboards"
7827
7823
  ]
7828
7824
  }
@@ -7846,7 +7842,7 @@ const xa = ({ blendMode: e = "normal", knockoutParts: t, onChange: n }) => {
7846
7842
  fontWeight: 500
7847
7843
  },
7848
7844
  children: [
7849
- m ? /* @__PURE__ */ r(ze, { icon: Fe.pause, className: "sc:size-4" }) : /* @__PURE__ */ r(ze, { icon: Fe.play, className: "sc:size-4" }),
7845
+ m ? /* @__PURE__ */ r(Xe, { icon: Fe.pause, className: "sc:size-4" }) : /* @__PURE__ */ r(Xe, { icon: Fe.play, className: "sc:size-4" }),
7850
7846
  m ? "Stop Continuous Export" : "Start Continuous Export"
7851
7847
  ]
7852
7848
  }
@@ -7949,7 +7945,7 @@ const xa = ({ blendMode: e = "normal", knockoutParts: t, onChange: n }) => {
7949
7945
  children: [
7950
7946
  /* @__PURE__ */ r("div", { className: "sc:px-6 sc:py-4 sc:border-b sc:border-black/10 sc:dark:border-white/10", children: /* @__PURE__ */ y("div", { className: "sc:relative", children: [
7951
7947
  /* @__PURE__ */ r(
7952
- ze,
7948
+ Xe,
7953
7949
  {
7954
7950
  icon: Fe.search,
7955
7951
  className: "sc:absolute sc:left-3 sc:top-1/2 sc:-translate-y-1/2 sc:text-muted sc:pointer-events-none sc:size-4 sc:z-10"
@@ -7972,12 +7968,12 @@ const xa = ({ blendMode: e = "normal", knockoutParts: t, onChange: n }) => {
7972
7968
  /* @__PURE__ */ r("div", { className: "sc:text-sm", children: "Loading glyphs..." })
7973
7969
  ] }),
7974
7970
  f && /* @__PURE__ */ y("div", { className: "sc:py-12 sc:text-center", children: [
7975
- /* @__PURE__ */ r(ze, { icon: Fe.alertCircle, className: "sc:size-12 sc:mx-auto sc:mb-4 sc:text-danger" }),
7971
+ /* @__PURE__ */ r(Xe, { icon: Fe.alertCircle, className: "sc:size-12 sc:mx-auto sc:mb-4 sc:text-danger" }),
7976
7972
  /* @__PURE__ */ r("div", { className: "sc:text-base sc:font-medium sc:mb-2", children: f }),
7977
7973
  /* @__PURE__ */ r("div", { className: "sc:text-sm sc:text-muted", children: "This font may not have alternate glyphs." })
7978
7974
  ] }),
7979
7975
  !l && !f && x.length === 0 && m && /* @__PURE__ */ y("div", { className: "sc:py-12 sc:text-center", children: [
7980
- /* @__PURE__ */ r(ze, { icon: Fe.search, className: "sc:size-12 sc:mx-auto sc:mb-4 sc:text-muted" }),
7976
+ /* @__PURE__ */ r(Xe, { icon: Fe.search, className: "sc:size-12 sc:mx-auto sc:mb-4 sc:text-muted" }),
7981
7977
  /* @__PURE__ */ y("div", { className: "sc:text-base sc:font-medium", children: [
7982
7978
  'No glyphs found matching "',
7983
7979
  m,
@@ -8192,7 +8188,7 @@ const xa = ({ blendMode: e = "normal", knockoutParts: t, onChange: n }) => {
8192
8188
  onMouseEnter: (v) => v.currentTarget.style.opacity = "1",
8193
8189
  onMouseLeave: (v) => v.currentTarget.style.opacity = "0.7",
8194
8190
  title: "Delete artboard",
8195
- children: /* @__PURE__ */ r(ze, { icon: Fe.close, className: "sc:size-3.5" })
8191
+ children: /* @__PURE__ */ r(Xe, { icon: Fe.close, className: "sc:size-3.5" })
8196
8192
  }
8197
8193
  )
8198
8194
  ]
@@ -8227,7 +8223,7 @@ const xa = ({ blendMode: e = "normal", knockoutParts: t, onChange: n }) => {
8227
8223
  },
8228
8224
  title: "Add new artboard",
8229
8225
  children: [
8230
- /* @__PURE__ */ r(ze, { icon: Fe.plus, className: "sc:size-3.5" }),
8226
+ /* @__PURE__ */ r(Xe, { icon: Fe.plus, className: "sc:size-3.5" }),
8231
8227
  /* @__PURE__ */ r("span", { children: "New Artboard" })
8232
8228
  ]
8233
8229
  }
@@ -8274,7 +8270,7 @@ const xa = ({ blendMode: e = "normal", knockoutParts: t, onChange: n }) => {
8274
8270
  onClick: a,
8275
8271
  disabled: o <= 0.1,
8276
8272
  "aria-label": "Zoom out",
8277
- children: /* @__PURE__ */ r(ze, { icon: Fe.minus, className: "sc:size-4" })
8273
+ children: /* @__PURE__ */ r(Xe, { icon: Fe.minus, className: "sc:size-4" })
8278
8274
  }
8279
8275
  ) }),
8280
8276
  /* @__PURE__ */ r(fn, { children: "Zoom out" })
@@ -8305,7 +8301,7 @@ const xa = ({ blendMode: e = "normal", knockoutParts: t, onChange: n }) => {
8305
8301
  onClick: i,
8306
8302
  disabled: o >= 4,
8307
8303
  "aria-label": "Zoom in",
8308
- children: /* @__PURE__ */ r(ze, { icon: Fe.plus, className: "sc:size-4" })
8304
+ children: /* @__PURE__ */ r(Xe, { icon: Fe.plus, className: "sc:size-4" })
8309
8305
  }
8310
8306
  ) }),
8311
8307
  /* @__PURE__ */ r(fn, { children: "Zoom in" })
@@ -8329,7 +8325,7 @@ const xa = ({ blendMode: e = "normal", knockoutParts: t, onChange: n }) => {
8329
8325
  size: "icon",
8330
8326
  onClick: l,
8331
8327
  "aria-label": "Fit to screen",
8332
- children: /* @__PURE__ */ r(ze, { icon: Fe.fitScreen, className: "sc:size-4" })
8328
+ children: /* @__PURE__ */ r(Xe, { icon: Fe.fitScreen, className: "sc:size-4" })
8333
8329
  }
8334
8330
  ) }),
8335
8331
  /* @__PURE__ */ r(fn, { children: "Fit to screen" })
@@ -8342,7 +8338,7 @@ const xa = ({ blendMode: e = "normal", knockoutParts: t, onChange: n }) => {
8342
8338
  size: "icon",
8343
8339
  onClick: c,
8344
8340
  "aria-label": "Reset to 100%",
8345
- children: /* @__PURE__ */ r(ze, { icon: Fe.maximize, className: "sc:size-4" })
8341
+ children: /* @__PURE__ */ r(Xe, { icon: Fe.maximize, className: "sc:size-4" })
8346
8342
  }
8347
8343
  ) }),
8348
8344
  /* @__PURE__ */ r(fn, { children: "Reset to 100%" })
@@ -8359,7 +8355,7 @@ const xa = ({ blendMode: e = "normal", knockoutParts: t, onChange: n }) => {
8359
8355
  debounceMs: 100,
8360
8356
  maxWaitMs: 1e3
8361
8357
  }, Oa = 3, za = 500;
8362
- class ic {
8358
+ class oc {
8363
8359
  constructor(t = {}) {
8364
8360
  this.onExportCallback = null, this.onExportScheduledCallback = null, this.revision = 0, this.lastExportedRevision = -1, this.stats = {
8365
8361
  totalExports: 0,
@@ -8507,7 +8503,7 @@ class ic {
8507
8503
  this.retryTimer && clearTimeout(this.retryTimer), this.retryTimer = null, this.windowTimer && clearTimeout(this.windowTimer), this.windowTimer = null, this.debouncedExport.cancel(), this.onExportCallback = null, this.onExportScheduledCallback = null, this.lastExportedRevision = -1;
8508
8504
  }
8509
8505
  }
8510
- function ac({ width: e = 800, height: t = 600, style: n }) {
8506
+ function ic({ width: e = 800, height: t = 600, style: n }) {
8511
8507
  return /* @__PURE__ */ y(
8512
8508
  "div",
8513
8509
  {
@@ -8550,7 +8546,7 @@ function ac({ width: e = 800, height: t = 600, style: n }) {
8550
8546
  }
8551
8547
  );
8552
8548
  }
8553
- function cc({ itemCount: e = 5, style: t }) {
8549
+ function ac({ itemCount: e = 5, style: t }) {
8554
8550
  return /* @__PURE__ */ y(
8555
8551
  "div",
8556
8552
  {
@@ -8603,7 +8599,7 @@ function cc({ itemCount: e = 5, style: t }) {
8603
8599
  }
8604
8600
  );
8605
8601
  }
8606
- function lc({ style: e }) {
8602
+ function cc({ style: e }) {
8607
8603
  return /* @__PURE__ */ y(
8608
8604
  "div",
8609
8605
  {
@@ -8658,7 +8654,7 @@ function lc({ style: e }) {
8658
8654
  }
8659
8655
  );
8660
8656
  }
8661
- function dc({ size: e = 32, color: t = "var(--primary)" }) {
8657
+ function lc({ size: e = 32, color: t = "var(--primary)" }) {
8662
8658
  return /* @__PURE__ */ r(
8663
8659
  "div",
8664
8660
  {
@@ -8679,7 +8675,7 @@ function dc({ size: e = 32, color: t = "var(--primary)" }) {
8679
8675
  }
8680
8676
  );
8681
8677
  }
8682
- function uc(e) {
8678
+ function dc(e) {
8683
8679
  var i;
8684
8680
  const t = [], n = [];
8685
8681
  (!e.name || e.name.trim() === "") && t.push("Kit name is required"), e.behavior.toolbar === "none" && ((i = e.layout.slots.topbar) != null && i.length) && n.push('Toolbar mode is "none" but topbar has sections — topbar sections will be ignored'), e.behavior.selection === "multi" && !e.capabilities.tools.includes("select") && n.push('Multi-selection enabled but "select" tool not in capabilities'), e.capabilities.elements.length === 0 && t.push("At least one element type must be enabled in capabilities.elements"), e.capabilities.transforms.length === 0 && t.push("At least one transform type must be enabled in capabilities.transforms"), e.behavior.autoExport && !e.capabilities.features.export && n.push("autoExport is enabled but features.export is false — exports will not be produced");
@@ -8703,31 +8699,31 @@ export {
8703
8699
  Ba as D,
8704
8700
  ko as E,
8705
8701
  Ia as G,
8706
- Za as K,
8707
- cc as L,
8702
+ ja as K,
8703
+ ac as L,
8708
8704
  gr as M,
8709
8705
  Eo as P,
8710
- dc as S,
8711
- lc as T,
8706
+ lc as S,
8707
+ cc as T,
8712
8708
  tr as Z,
8713
- oc as a,
8709
+ rc as a,
8714
8710
  Sa as b,
8715
8711
  ka as c,
8716
8712
  Aa as d,
8717
- ic as e,
8718
- Qa as f,
8719
- ec as g,
8720
- ac as h,
8713
+ oc as e,
8714
+ Ja as f,
8715
+ Qa as g,
8716
+ ic as h,
8721
8717
  js as i,
8722
- nc as j,
8723
- tc as k,
8724
- rc as l,
8718
+ tc as j,
8719
+ ec as k,
8720
+ sc as l,
8725
8721
  Pt as m,
8726
8722
  ei as n,
8727
- Ja as o,
8723
+ Za as o,
8728
8724
  To as p,
8729
8725
  Ro as r,
8730
- sc as u,
8731
- uc as v
8726
+ nc as u,
8727
+ dc as v
8732
8728
  };
8733
- //# sourceMappingURL=validation-au_-Sj-A.js.map
8729
+ //# sourceMappingURL=validation-9BuyvBcJ.js.map