@snowcone-app/canvas 0.37.1 → 0.39.0

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 (76) hide show
  1. package/ERROR_CONTRACT.md +39 -8
  2. package/STYLING_CONTRACT.md +24 -2
  3. package/dist/{CanvasRenderer-CTN4j-uO.js → CanvasRenderer-COO5UXtZ.js} +704 -669
  4. package/dist/CanvasRenderer-COO5UXtZ.js.map +1 -0
  5. package/dist/{CanvasStateV1-DLE5d1-d.js → CanvasStateV1-CJJff7Ci.js} +319 -318
  6. package/dist/{CanvasStateV1-DLE5d1-d.js.map → CanvasStateV1-CJJff7Ci.js.map} +1 -1
  7. package/dist/{ContextualToolbars-CG5Gmv_i.js → ContextualToolbars-C62As-xY.js} +202 -202
  8. package/dist/{ContextualToolbars-CG5Gmv_i.js.map → ContextualToolbars-C62As-xY.js.map} +1 -1
  9. package/dist/EditorCanvasImpl-C_72UKu3.js +144 -0
  10. package/dist/EditorCanvasImpl-C_72UKu3.js.map +1 -0
  11. package/dist/{ExportManager-CDX5_up8.js → ExportManager-BbBfO22S.js} +45 -45
  12. package/dist/{ExportManager-CDX5_up8.js.map → ExportManager-BbBfO22S.js.map} +1 -1
  13. package/dist/{FontAnalyzer-CEYA_6fY.js → FontAnalyzer-DWHS41ba.js} +128 -128
  14. package/dist/FontAnalyzer-DWHS41ba.js.map +1 -0
  15. package/dist/{ImagePanel-DLxIDKV-.js → ImagePanel-BaX0UE-L.js} +57 -57
  16. package/dist/{ImagePanel-DLxIDKV-.js.map → ImagePanel-BaX0UE-L.js.map} +1 -1
  17. package/dist/SnowconeCanvas-C-YbGCcQ.js +1112 -0
  18. package/dist/SnowconeCanvas-C-YbGCcQ.js.map +1 -0
  19. package/dist/advanced.mjs +427 -429
  20. package/dist/advanced.mjs.map +1 -1
  21. package/dist/api/placement.d.ts +3 -0
  22. package/dist/components/VisualGuideOverlay.d.ts +4 -1
  23. package/dist/components/editor/EditorPlacements.d.ts +19 -6
  24. package/dist/components/editor/RootInternals.d.ts +7 -0
  25. package/dist/components/editor/designStateStore.d.ts +18 -0
  26. package/dist/components/editor/index.d.ts +3 -1
  27. package/dist/components/editor/placementLinks.d.ts +52 -0
  28. package/dist/components/editor/usePlacements.d.ts +28 -4
  29. package/dist/components/embed-realtime/context.d.ts +20 -4
  30. package/dist/components/embed-realtime/usePieceGuideBundle.d.ts +3 -0
  31. package/dist/components/embed-realtime/validateEmbed.d.ts +6 -3
  32. package/dist/{custom-icons-D51KIAfz.js → custom-icons-o1U13Vcg.js} +14 -14
  33. package/dist/{custom-icons-D51KIAfz.js.map → custom-icons-o1U13Vcg.js.map} +1 -1
  34. package/dist/{design-builder-CqgTpp9B.js → design-builder-CoCtjIwj.js} +86 -86
  35. package/dist/{design-builder-CqgTpp9B.js.map → design-builder-CoCtjIwj.js.map} +1 -1
  36. package/dist/{embed-CLz3CTcX.js → embed-DtlgX9iG.js} +843 -729
  37. package/dist/embed-DtlgX9iG.js.map +1 -0
  38. package/dist/embed.mjs +28 -28
  39. package/dist/errors/editorError.d.ts +7 -2
  40. package/dist/{guards-DldCuuJq.js → guards-DMmhw_Ow.js} +4 -4
  41. package/dist/{guards-DldCuuJq.js.map → guards-DMmhw_Ow.js.map} +1 -1
  42. package/dist/index.mjs +21 -21
  43. package/dist/internals.mjs +108 -108
  44. package/dist/internals.mjs.map +1 -1
  45. package/dist/placement-Br5jI_-u.js +90 -0
  46. package/dist/placement-Br5jI_-u.js.map +1 -0
  47. package/dist/placement.d.ts +2 -0
  48. package/dist/placement.mjs +5 -0
  49. package/dist/placement.mjs.map +1 -0
  50. package/dist/rendering/PieceGuideRenderer.d.ts +4 -1
  51. package/dist/state/CanvasStateV1.d.ts +3 -3
  52. package/dist/template-fields-Dltc4Ztb.js +556 -0
  53. package/dist/template-fields-Dltc4Ztb.js.map +1 -0
  54. package/dist/testing.mjs +24 -24
  55. package/dist/types/index.d.ts +2 -1
  56. package/dist/{useCommands-CQi4Pyd2.js → useCommands-x8J7_Mzy.js} +262 -262
  57. package/dist/{useCommands-CQi4Pyd2.js.map → useCommands-x8J7_Mzy.js.map} +1 -1
  58. package/dist/usePieceGuideBundle-Cab2gRnn.js +68 -0
  59. package/dist/usePieceGuideBundle-Cab2gRnn.js.map +1 -0
  60. package/dist/utils/pieceRotation.d.ts +35 -0
  61. package/dist/{validation-THw5W6N_.js → validation-Dh9sVEb9.js} +1182 -1184
  62. package/dist/validation-Dh9sVEb9.js.map +1 -0
  63. package/example/package.json +1 -1
  64. package/package.json +7 -2
  65. package/dist/CanvasRenderer-CTN4j-uO.js.map +0 -1
  66. package/dist/EditorCanvasImpl-BRdFWZA5.js +0 -81
  67. package/dist/EditorCanvasImpl-BRdFWZA5.js.map +0 -1
  68. package/dist/FontAnalyzer-CEYA_6fY.js.map +0 -1
  69. package/dist/SnowconeCanvas-BaFR8QXs.js +0 -1196
  70. package/dist/SnowconeCanvas-BaFR8QXs.js.map +0 -1
  71. package/dist/embed-CLz3CTcX.js.map +0 -1
  72. package/dist/template-fields-D8uOutD4.js +0 -505
  73. package/dist/template-fields-D8uOutD4.js.map +0 -1
  74. package/dist/usePieceGuideBundle-BUQKb0Ja.js +0 -61
  75. package/dist/usePieceGuideBundle-BUQKb0Ja.js.map +0 -1
  76. package/dist/validation-THw5W6N_.js.map +0 -1
package/dist/advanced.mjs CHANGED
@@ -1,115 +1,116 @@
1
- import { D as te, T as M, i as D, B as re, I as q, j as I, k as ne, e as se } from "./useCommands-CQi4Pyd2.js";
2
- import { l as at, L as it, M as ct, m as lt, S as dt, n as ut, s as mt, o as ft } from "./useCommands-CQi4Pyd2.js";
3
- import { r as oe, v as ae } from "./validation-THw5W6N_.js";
4
- import { a as pt, b as xt, c as gt, d as bt, D as yt, e as vt, f as wt, G as St, K as Ct, g as Tt, L as Et, S as $t, T as kt, Z as At, h as Ft, i as Pt, j as Nt, k as Rt, l as Bt, m as Mt, n as Dt, u as It, o as zt, p as Ot } from "./validation-THw5W6N_.js";
5
- import { ImagePanel as Wt } from "./ImagePanel-DLxIDKV-.js";
6
- import { P as ie, a as ce, b as le } from "./ContextualToolbars-CG5Gmv_i.js";
7
- import { A as Gt, B as _t, c as Ut, C as jt, d as Jt, e as qt, F as Zt, f as Vt, I as Xt, g as Yt, M as Ht, h as Qt, S as er, T as tr, i as rr, j as nr, k as sr, U as or, l as ar, u as ir, m as cr } from "./ContextualToolbars-CG5Gmv_i.js";
8
- import { u as Z } from "./design-builder-CqgTpp9B.js";
9
- import { E as dr, P as ur, p as mr, b as fr, c as hr, e as pr, f as xr, g as gr, h as br, a as yr } from "./design-builder-CqgTpp9B.js";
10
- import { T as wr, u as Sr } from "./ThemeContext-Rjz25x9X.js";
11
- import { c as de, G as ue, F as me, g as fe, r as he, u as pe } from "./FontAnalyzer-CEYA_6fY.js";
12
- import { A as Tr, B as Er, I as $r, P as kr, R as Ar, S as Fr, T as Pr, h as Nr, a as Rr, b as Br, i as Mr, d as Dr, e as Ir, f as zr, j as Or, k as Lr, l as Wr, m as Kr, n as Gr, o as _r, p as Ur, q as jr, s as Jr, t as qr, v as Zr, w as Vr, x as Xr } from "./FontAnalyzer-CEYA_6fY.js";
13
- import { i as Hr, a as Qr, b as en, c as tn, d as rn } from "./guards-DldCuuJq.js";
14
- import { useState as A, useCallback as y, useEffect as V, useMemo as X, useRef as B, memo as xe } from "react";
15
- import { I as ge } from "./ExportManager-CDX5_up8.js";
16
- import { e as be, c as ye } from "./compose-DtQL_oit.js";
17
- import { jsxs as b, jsx as a, Fragment as ve } from "react/jsx-runtime";
18
- import { P as sn, p as on, u as an } from "./usePieceGuideBundle-BUQKb0Ja.js";
19
- const ze = ({
1
+ import { p as Q, T as M, q as D, B as ee, I as j, r as I, s as te, e as re } from "./useCommands-x8J7_Mzy.js";
2
+ import { t as it, L as ct, M as lt, v as dt, S as ut, w as mt, x as ft, u as ht } from "./useCommands-x8J7_Mzy.js";
3
+ import { r as ne, v as se } from "./validation-Dh9sVEb9.js";
4
+ import { d as xt, e as gt, f as bt, h as yt, D as vt, b as St, c as wt, G as Ct, i as Tt, K as Et, L as kt, S as $t, T as At, Z as Ft, j as Pt, g as Nt, k as Bt, l as Rt, a as Mt, m as Dt, n as It, u as zt, o as Ot, p as Lt } from "./validation-Dh9sVEb9.js";
5
+ import { ImagePanel as Kt } from "./ImagePanel-BaX0UE-L.js";
6
+ import { P as ae, b as oe, c as ie } from "./ContextualToolbars-C62As-xY.js";
7
+ import { A as _t, B as Ut, d as jt, e as qt, C as Jt, a as Zt, F as Vt, f as Xt, I as Yt, g as Ht, M as Qt, h as er, S as tr, T as rr, i as nr, j as sr, k as ar, U as or, l as ir, u as cr, m as lr } from "./ContextualToolbars-C62As-xY.js";
8
+ import { b as q } from "./design-builder-CoCtjIwj.js";
9
+ import { E as ur, P as mr, p as fr, j as hr, a as pr, u as xr, k as gr, c as br, m as yr, d as vr } from "./design-builder-CoCtjIwj.js";
10
+ import { T as wr, u as Cr } from "./ThemeContext-Rjz25x9X.js";
11
+ import { c as ce, G as le, ap as de, q as ue, aq as me, ar as fe } from "./FontAnalyzer-DWHS41ba.js";
12
+ import { A as Er, as as kr, I as $r, P as Ar, at as Fr, S as Pr, T as Nr, au as Br, av as Rr, aw as Mr, ax as Dr, ay as Ir, az as zr, aA as Or, aB as Lr, aC as Wr, aD as Kr, aE as Gr, aF as _r, aG as Ur, aH as jr, aI as qr, aJ as Jr, aK as Zr, aL as Vr, aM as Xr, aN as Yr } from "./FontAnalyzer-DWHS41ba.js";
13
+ import { a as Qr, i as en, b as tn, c as rn, d as nn } from "./guards-DMmhw_Ow.js";
14
+ import { useState as A, useCallback as y, useEffect as J, useMemo as Z, useRef as R, memo as he } from "react";
15
+ import { I as pe } from "./ExportManager-BbBfO22S.js";
16
+ import { e as xe, c as ge } from "./compose-DtQL_oit.js";
17
+ import { jsxs as g, jsx as o, Fragment as be } from "react/jsx-runtime";
18
+ import { n as ye, p as ve } from "./CanvasRenderer-COO5UXtZ.js";
19
+ import { P as an, p as on, u as cn } from "./usePieceGuideBundle-Cab2gRnn.js";
20
+ const Oe = ({
20
21
  title: e,
21
22
  icon: t,
22
23
  children: r,
23
- enableable: o = !1,
24
+ enableable: a = !1,
24
25
  enabled: n = !1,
25
26
  onEnabledChange: s,
26
27
  collapsible: i = !1,
27
- expanded: m = !0,
28
+ expanded: d = !0,
28
29
  onExpandChange: l,
29
- className: f = ""
30
+ className: h = ""
30
31
  }) => {
31
- const w = o ? n && m : i ? m : !0, h = o && n || i, d = () => {
32
+ const w = a ? n && d : i ? d : !0, p = a && n || i, u = () => {
32
33
  s && s(!n);
33
34
  }, c = () => {
34
- l && l(!m);
35
+ l && l(!d);
35
36
  };
36
- return /* @__PURE__ */ b("div", { className: `sc:rounded-xl sc:border sc:border-border-primary sc:bg-bg-secondary sc:p-xl ${f}`, children: [
37
- /* @__PURE__ */ b("div", { className: "sc:flex sc:items-center sc:justify-between", children: [
38
- /* @__PURE__ */ b("div", { className: "sc:flex sc:items-center sc:gap-md", children: [
39
- o && /* @__PURE__ */ a("label", { className: "sc:flex sc:cursor-pointer sc:items-center", children: /* @__PURE__ */ a(
37
+ return /* @__PURE__ */ g("div", { className: `sc:rounded-xl sc:border sc:border-border-primary sc:bg-bg-secondary sc:p-xl ${h}`, children: [
38
+ /* @__PURE__ */ g("div", { className: "sc:flex sc:items-center sc:justify-between", children: [
39
+ /* @__PURE__ */ g("div", { className: "sc:flex sc:items-center sc:gap-md", children: [
40
+ a && /* @__PURE__ */ o("label", { className: "sc:flex sc:cursor-pointer sc:items-center", children: /* @__PURE__ */ o(
40
41
  "input",
41
42
  {
42
43
  type: "checkbox",
43
44
  checked: n,
44
- onChange: d,
45
+ onChange: u,
45
46
  className: "sc:h-4 sc:w-4 sc:cursor-pointer sc:rounded sc:border-border-primary sc:bg-bg-input sc:accent-accent-primary"
46
47
  }
47
48
  ) }),
48
- /* @__PURE__ */ b("div", { className: "sc:flex sc:items-center sc:gap-md", children: [
49
- t && /* @__PURE__ */ a("span", { className: "sc:flex sc:items-center sc:text-text-secondary", children: t }),
50
- /* @__PURE__ */ a("h3", { className: "sc:text-xl sc:font-semibold sc:text-text-primary", children: e })
49
+ /* @__PURE__ */ g("div", { className: "sc:flex sc:items-center sc:gap-md", children: [
50
+ t && /* @__PURE__ */ o("span", { className: "sc:flex sc:items-center sc:text-text-secondary", children: t }),
51
+ /* @__PURE__ */ o("h3", { className: "sc:text-xl sc:font-semibold sc:text-text-primary", children: e })
51
52
  ] })
52
53
  ] }),
53
- h && /* @__PURE__ */ a(
54
+ p && /* @__PURE__ */ o(
54
55
  "button",
55
56
  {
56
57
  onClick: c,
57
58
  className: "sc:rounded-lg sc:border-none sc:bg-transparent sc:px-md sc:py-xs sc:text-base sc:text-text-muted sc:transition-colors sc:duration-fast sc:hover:text-text-primary",
58
- title: m ? "Collapse" : "Expand",
59
- children: m ? "▼" : "▶"
59
+ title: d ? "Collapse" : "Expand",
60
+ children: d ? "▼" : "▶"
60
61
  }
61
62
  )
62
63
  ] }),
63
- w && /* @__PURE__ */ a("div", { className: "sc:mt-xl sc:flex sc:flex-col sc:gap-xl", children: r })
64
+ w && /* @__PURE__ */ o("div", { className: "sc:mt-xl sc:flex sc:flex-col sc:gap-xl", children: r })
64
65
  ] });
65
- }, Oe = ({
66
+ }, Le = ({
66
67
  label: e,
67
68
  labelSuffix: t,
68
69
  children: r,
69
- inline: o = !1,
70
+ inline: a = !1,
70
71
  className: n = ""
71
- }) => /* @__PURE__ */ b("div", { className: `sc:flex ${o ? "sc:items-center sc:justify-between" : "sc:flex-col"} sc:gap-sm ${n}`, children: [
72
- /* @__PURE__ */ b("label", { className: "sc:flex sc:items-center sc:justify-between sc:text-base sc:font-medium sc:text-text-secondary", children: [
73
- /* @__PURE__ */ a("span", { children: e }),
74
- t && /* @__PURE__ */ a("span", { className: "sc:font-semibold sc:text-accent-primary", children: t })
72
+ }) => /* @__PURE__ */ g("div", { className: `sc:flex ${a ? "sc:items-center sc:justify-between" : "sc:flex-col"} sc:gap-sm ${n}`, children: [
73
+ /* @__PURE__ */ g("label", { className: "sc:flex sc:items-center sc:justify-between sc:text-base sc:font-medium sc:text-text-secondary", children: [
74
+ /* @__PURE__ */ o("span", { children: e }),
75
+ t && /* @__PURE__ */ o("span", { className: "sc:font-semibold sc:text-accent-primary", children: t })
75
76
  ] }),
76
- /* @__PURE__ */ a("div", { className: o ? "sc:flex-shrink-0" : "", children: r })
77
+ /* @__PURE__ */ o("div", { className: a ? "sc:flex-shrink-0" : "", children: r })
77
78
  ] });
78
- function Le({
79
+ function We({
79
80
  options: e,
80
81
  value: t,
81
82
  onChange: r,
82
- fullWidth: o = !0,
83
+ fullWidth: a = !0,
83
84
  className: n = ""
84
85
  }) {
85
- return /* @__PURE__ */ a("div", { className: `sc:flex sc:gap-sm ${n}`, children: e.map((s) => {
86
+ return /* @__PURE__ */ o("div", { className: `sc:flex sc:gap-sm ${n}`, children: e.map((s) => {
86
87
  const i = s.value === t;
87
- return /* @__PURE__ */ b(
88
+ return /* @__PURE__ */ g(
88
89
  "button",
89
90
  {
90
91
  onClick: () => !s.disabled && r(s.value),
91
92
  disabled: s.disabled,
92
93
  title: s.tooltip,
93
- className: ` ${o ? "sc:flex-1" : ""} sc:flex sc:items-center sc:justify-center sc:gap-xs sc:rounded-lg sc:border sc:px-md sc:py-sm sc:text-base sc:font-medium sc:transition-all sc:duration-fast ${i ? "sc:border-accent-primary sc:bg-accent-primary sc:text-text-on-accent" : "sc:border-border-primary sc:bg-bg-tertiary sc:text-text-secondary sc:hover:border-border-secondary sc:hover:bg-bg-hover sc:hover:text-text-primary"} ${s.disabled ? "sc:cursor-not-allowed sc:opacity-disabled" : "sc:cursor-pointer"} `,
94
+ className: ` ${a ? "sc:flex-1" : ""} sc:flex sc:items-center sc:justify-center sc:gap-xs sc:rounded-lg sc:border sc:px-md sc:py-sm sc:text-base sc:font-medium sc:transition-all sc:duration-fast ${i ? "sc:border-accent-primary sc:bg-accent-primary sc:text-text-on-accent" : "sc:border-border-primary sc:bg-bg-tertiary sc:text-text-secondary sc:hover:border-border-secondary sc:hover:bg-bg-hover sc:hover:text-text-primary"} ${s.disabled ? "sc:cursor-not-allowed sc:opacity-disabled" : "sc:cursor-pointer"} `,
94
95
  children: [
95
- s.icon && /* @__PURE__ */ a("span", { className: "sc:flex sc:items-center", children: s.icon }),
96
- /* @__PURE__ */ a("span", { children: s.label })
96
+ s.icon && /* @__PURE__ */ o("span", { className: "sc:flex sc:items-center", children: s.icon }),
97
+ /* @__PURE__ */ o("span", { children: s.label })
97
98
  ]
98
99
  },
99
100
  String(s.value)
100
101
  );
101
102
  }) });
102
103
  }
103
- const We = ({ label: e, icon: t, checked: r, onChange: o, disabled: n = !1, className: s = "" }) => {
104
- const i = (m) => {
105
- o(m.target.checked);
104
+ const Ke = ({ label: e, icon: t, checked: r, onChange: a, disabled: n = !1, className: s = "" }) => {
105
+ const i = (d) => {
106
+ a(d.target.checked);
106
107
  };
107
- return /* @__PURE__ */ b(
108
+ return /* @__PURE__ */ g(
108
109
  "label",
109
110
  {
110
111
  className: `sc:flex sc:cursor-pointer sc:items-center sc:gap-md ${n ? "sc:cursor-not-allowed sc:opacity-disabled" : ""} ${s}`,
111
112
  children: [
112
- /* @__PURE__ */ a(
113
+ /* @__PURE__ */ o(
113
114
  "input",
114
115
  {
115
116
  type: "checkbox",
@@ -119,39 +120,39 @@ const We = ({ label: e, icon: t, checked: r, onChange: o, disabled: n = !1, clas
119
120
  className: "sc:h-4 sc:w-4 sc:cursor-pointer sc:rounded sc:border-border-primary sc:bg-bg-input sc:accent-accent-primary sc:disabled:cursor-not-allowed"
120
121
  }
121
122
  ),
122
- /* @__PURE__ */ b("span", { className: "sc:flex sc:items-center sc:gap-sm sc:text-base sc:font-medium sc:text-text-primary", children: [
123
- t && /* @__PURE__ */ a("span", { className: "sc:flex sc:items-center sc:text-text-secondary", children: t }),
124
- /* @__PURE__ */ a("span", { children: e })
123
+ /* @__PURE__ */ g("span", { className: "sc:flex sc:items-center sc:gap-sm sc:text-base sc:font-medium sc:text-text-primary", children: [
124
+ t && /* @__PURE__ */ o("span", { className: "sc:flex sc:items-center sc:text-text-secondary", children: t }),
125
+ /* @__PURE__ */ o("span", { children: e })
125
126
  ] })
126
127
  ]
127
128
  }
128
129
  );
129
- }, Ke = ({
130
+ }, Ge = ({
130
131
  checked: e,
131
132
  onChange: t,
132
133
  label: r,
133
- disabled: o = !1,
134
+ disabled: a = !1,
134
135
  className: n = ""
135
136
  }) => {
136
137
  const s = () => {
137
- o || t(!e);
138
+ a || t(!e);
138
139
  };
139
- return /* @__PURE__ */ b(
140
+ return /* @__PURE__ */ g(
140
141
  "label",
141
142
  {
142
- className: `sc:flex sc:items-center sc:gap-md sc:cursor-pointer sc:select-none ${o ? "sc:opacity-50 sc:cursor-not-allowed" : ""} ${n}`.trim(),
143
+ className: `sc:flex sc:items-center sc:gap-md sc:cursor-pointer sc:select-none ${a ? "sc:opacity-50 sc:cursor-not-allowed" : ""} ${n}`.trim(),
143
144
  children: [
144
- /* @__PURE__ */ a(
145
+ /* @__PURE__ */ o(
145
146
  "input",
146
147
  {
147
148
  type: "checkbox",
148
149
  checked: e,
149
150
  onChange: s,
150
- disabled: o,
151
+ disabled: a,
151
152
  className: "sc:absolute sc:opacity-0 sc:w-0 sc:h-0 sc:peer"
152
153
  }
153
154
  ),
154
- /* @__PURE__ */ a(
155
+ /* @__PURE__ */ o(
155
156
  "span",
156
157
  {
157
158
  className: `
@@ -164,41 +165,41 @@ const We = ({ label: e, icon: t, checked: r, onChange: o, disabled: n = !1, clas
164
165
  `.trim()
165
166
  }
166
167
  ),
167
- r && /* @__PURE__ */ a("span", { className: "sc:text-md sc:text-text-primary sc:font-medium", children: r })
168
+ r && /* @__PURE__ */ o("span", { className: "sc:text-md sc:text-text-primary sc:font-medium", children: r })
168
169
  ]
169
170
  }
170
171
  );
171
- }, Ge = ({
172
+ }, _e = ({
172
173
  isOpen: e,
173
174
  onToggle: t,
174
175
  trigger: r,
175
- children: o
176
- }) => /* @__PURE__ */ a(
177
- te,
176
+ children: a
177
+ }) => /* @__PURE__ */ o(
178
+ Q,
178
179
  {
179
180
  isOpen: e,
180
181
  onToggle: t,
181
- trigger: r || /* @__PURE__ */ b(M, { delayDuration: 0, children: [
182
- /* @__PURE__ */ a(D, { asChild: !0, children: /* @__PURE__ */ a(
183
- re,
182
+ trigger: r || /* @__PURE__ */ g(M, { delayDuration: 0, children: [
183
+ /* @__PURE__ */ o(D, { asChild: !0, children: /* @__PURE__ */ o(
184
+ ee,
184
185
  {
185
186
  variant: "ghost",
186
187
  size: "toolbar",
187
188
  onClick: (s) => {
188
189
  s.stopPropagation(), t(!e);
189
190
  },
190
- children: /* @__PURE__ */ a(q, { icon: "lucide:ellipsis-vertical", className: "sc:size-6" })
191
+ children: /* @__PURE__ */ o(j, { icon: "lucide:ellipsis-vertical", className: "sc:size-6" })
191
192
  }
192
193
  ) }),
193
- /* @__PURE__ */ a(I, { children: /* @__PURE__ */ a("p", { children: "More" }) })
194
+ /* @__PURE__ */ o(I, { children: /* @__PURE__ */ o("p", { children: "More" }) })
194
195
  ] }),
195
196
  position: "bottom",
196
197
  align: "end",
197
198
  offset: 4,
198
- children: /* @__PURE__ */ a("div", { className: "sc:flex sc:items-center sc:gap-sm sc:bg-bg-primary sc:border sc:border-border-primary sc:rounded-xl sc:px-xl sc:py-md sc:shadow-sm sc:h-[52px]", children: o })
199
+ children: /* @__PURE__ */ o("div", { className: "sc:flex sc:items-center sc:gap-sm sc:bg-bg-primary sc:border sc:border-border-primary sc:rounded-xl sc:px-xl sc:py-md sc:shadow-sm sc:h-[52px]", children: a })
199
200
  }
200
201
  );
201
- function _e(e) {
202
+ function Ue(e) {
202
203
  const t = {
203
204
  name: e.name,
204
205
  capabilities: {
@@ -223,69 +224,69 @@ function _e(e) {
223
224
  };
224
225
  return e.content && (t.content = { ...e.content }), t;
225
226
  }
226
- function Ue(e) {
227
+ function je(e) {
227
228
  if (!e.name || e.name.trim() === "")
228
229
  throw new Error("[loadKitFromJSON] Kit name is required");
229
230
  const t = {};
230
231
  e.capabilities && (t.capabilities = e.capabilities), e.behavior && (t.behavior = e.behavior), e.layout && (t.layout = e.layout), e.style && (t.style = e.style), e.content && (t.content = e.content);
231
232
  let r;
232
233
  if (e.extends) {
233
- const n = oe(e.extends);
234
- r = be(n, { name: e.name, ...t });
234
+ const n = ne(e.extends);
235
+ r = xe(n, { name: e.name, ...t });
235
236
  } else
236
- r = ye({ name: e.name, ...t });
237
- const o = ae(r);
238
- if (o.warnings.length > 0)
239
- for (const n of o.warnings)
237
+ r = ge({ name: e.name, ...t });
238
+ const a = se(r);
239
+ if (a.warnings.length > 0)
240
+ for (const n of a.warnings)
240
241
  console.warn(`[loadKitFromJSON] Warning: ${n}`);
241
- if (!o.valid)
242
+ if (!a.valid)
242
243
  throw new Error(
243
244
  `[loadKitFromJSON] Kit "${e.name}" failed validation:
244
- ${o.errors.join(`
245
+ ${a.errors.join(`
245
246
  `)}`
246
247
  );
247
248
  return r;
248
249
  }
249
- const L = de("useProjectLoader");
250
- function je() {
250
+ const z = ce("useProjectLoader");
251
+ function qe() {
251
252
  const {
252
253
  handleLoadWorkspace: e
253
- } = Z(), [t, r] = A(!1), [o, n] = A(null), [s, i] = A(null), [m, l] = A(null), f = y(async (d) => {
254
+ } = q(), [t, r] = A(!1), [a, n] = A(null), [s, i] = A(null), [d, l] = A(null), h = y(async (u) => {
254
255
  r(!0), n(null);
255
256
  try {
256
- const c = typeof d == "string" ? JSON.parse(d) : d;
257
+ const c = typeof u == "string" ? JSON.parse(u) : u;
257
258
  if (!c.artboards || !Array.isArray(c.artboards))
258
259
  throw new Error("Invalid document format: missing artboards array");
259
- const x = JSON.stringify(c), S = new Blob([x], { type: "application/json" }), C = new File([S], "project.json", { type: "application/json" }), g = await ge.importFromJSON(C);
260
- if (!g.success || !g.artboards || !g.elements)
261
- throw new Error(g.error || "Failed to import project");
262
- e(g.artboards, g.elements, g.activeArtboardId || null), i(c);
263
- const u = c.artboards.reduce((p, k) => {
264
- var v;
265
- return p + (((v = k.elements) == null ? void 0 : v.length) || 0);
260
+ const x = JSON.stringify(c), C = new Blob([x], { type: "application/json" }), b = new File([C], "project.json", { type: "application/json" }), f = await pe.importFromJSON(b);
261
+ if (!f.success || !f.artboards || !f.elements)
262
+ throw new Error(f.error || "Failed to import project");
263
+ e(f.artboards, f.elements, f.activeArtboardId || null), i(c);
264
+ const m = c.artboards.reduce((v, k) => {
265
+ var S;
266
+ return v + (((S = k.elements) == null ? void 0 : S.length) || 0);
266
267
  }, 0);
267
268
  l({
268
269
  version: c.metadata.version,
269
270
  timestamp: c.metadata.timestamp,
270
271
  artboardCount: c.artboards.length,
271
- elementCount: u
272
+ elementCount: m
272
273
  });
273
274
  } catch (c) {
274
- throw L.error("[useProjectLoader] Failed to load project:", c), n(c), c;
275
+ throw z.error("[useProjectLoader] Failed to load project:", c), n(c), c;
275
276
  } finally {
276
277
  r(!1);
277
278
  }
278
- }, [e]), w = y(async (d) => {
279
+ }, [e]), w = y(async (u) => {
279
280
  r(!0), n(null);
280
281
  try {
281
- const c = await d.text();
282
- await f(c);
282
+ const c = await u.text();
283
+ await h(c);
283
284
  } catch (c) {
284
- throw L.error("[useProjectLoader] Failed to load file:", c), n(c), c;
285
+ throw z.error("[useProjectLoader] Failed to load file:", c), n(c), c;
285
286
  } finally {
286
287
  r(!1);
287
288
  }
288
- }, [f]), h = y(async (d) => {
289
+ }, [h]), p = y(async (u) => {
289
290
  r(!0), n(null);
290
291
  try {
291
292
  const c = {
@@ -294,8 +295,8 @@ function je() {
294
295
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
295
296
  appVersion: "1.0.0"
296
297
  },
297
- artboards: d.artboards.map((x, S) => ({
298
- id: `artboard-${Date.now()}-${S}`,
298
+ artboards: u.artboards.map((x, C) => ({
299
+ id: `artboard-${Date.now()}-${C}`,
299
300
  name: x.name,
300
301
  x: 0,
301
302
  y: 0,
@@ -307,24 +308,24 @@ function je() {
307
308
  activeArtboardId: null
308
309
  // First artboard will be active by default
309
310
  };
310
- await f(c);
311
+ await h(c);
311
312
  } catch (c) {
312
- throw L.error("[useProjectLoader] Failed to load template:", c), n(c), c;
313
+ throw z.error("[useProjectLoader] Failed to load template:", c), n(c), c;
313
314
  } finally {
314
315
  r(!1);
315
316
  }
316
- }, [f]);
317
+ }, [h]);
317
318
  return {
318
- loadFromJSON: f,
319
+ loadFromJSON: h,
319
320
  loadFromFile: w,
320
- loadTemplate: h,
321
+ loadTemplate: p,
321
322
  isLoading: t,
322
- loadError: o,
323
+ loadError: a,
323
324
  currentProject: s,
324
- projectMetadata: m
325
+ projectMetadata: d
325
326
  };
326
327
  }
327
- const U = {
328
+ const G = {
328
329
  xs: 320,
329
330
  sm: 480,
330
331
  md: 768,
@@ -332,45 +333,45 @@ const U = {
332
333
  xl: 1280,
333
334
  xxl: 1536
334
335
  };
335
- function we(e, t) {
336
+ function Se(e, t) {
336
337
  return e >= t.xxl ? "xxl" : e >= t.xl ? "xl" : e >= t.lg ? "lg" : e >= t.md ? "md" : e >= t.sm ? "sm" : "xs";
337
338
  }
338
339
  function Je(e) {
339
340
  const t = {
340
- ...U,
341
+ ...G,
341
342
  ...e
342
- }, [r, o] = A(() => typeof window < "u" ? window.innerWidth : U.lg);
343
- V(() => {
343
+ }, [r, a] = A(() => typeof window < "u" ? window.innerWidth : G.lg);
344
+ J(() => {
344
345
  if (typeof window > "u") return;
345
346
  const x = () => {
346
- o(window.innerWidth);
347
+ a(window.innerWidth);
347
348
  };
348
349
  return window.addEventListener("resize", x), () => window.removeEventListener("resize", x);
349
350
  }, []);
350
- const n = X(
351
- () => we(r, t),
351
+ const n = Z(
352
+ () => Se(r, t),
352
353
  [r, t]
353
- ), s = n === "xs", i = n === "sm", m = n === "md", l = n === "lg", f = n === "xl", w = n === "xxl", h = ["xs", "sm", "md", "lg", "xl", "xxl"];
354
+ ), s = n === "xs", i = n === "sm", d = n === "md", l = n === "lg", h = n === "xl", w = n === "xxl", p = ["xs", "sm", "md", "lg", "xl", "xxl"];
354
355
  return {
355
356
  breakpoint: n,
356
357
  width: r,
357
358
  isXs: s,
358
359
  isSm: i,
359
- isMd: m,
360
+ isMd: d,
360
361
  isLg: l,
361
- isXl: f,
362
+ isXl: h,
362
363
  isXxl: w,
363
364
  isAtLeast: (x) => {
364
- const S = h.indexOf(n), C = h.indexOf(x);
365
- return S >= C;
365
+ const C = p.indexOf(n), b = p.indexOf(x);
366
+ return C >= b;
366
367
  },
367
368
  isAtMost: (x) => {
368
- const S = h.indexOf(n), C = h.indexOf(x);
369
- return S <= C;
369
+ const C = p.indexOf(n), b = p.indexOf(x);
370
+ return C <= b;
370
371
  }
371
372
  };
372
373
  }
373
- const j = {
374
+ const _ = {
374
375
  fps: 0,
375
376
  avgRenderTime: 0,
376
377
  peakRenderTime: 0,
@@ -379,29 +380,29 @@ const j = {
379
380
  exportCount: 0,
380
381
  avgExportTime: 0
381
382
  };
382
- function qe() {
383
- const [e, t] = A(j), [r, o] = A(!1), n = B([]), s = B([]), i = B([]), m = B(performance.now()), l = B(null), f = y((u) => u.length === 0 ? 0 : 1e3 / (u.reduce((k, v) => k + v, 0) / u.length), []), w = y((u) => u.length === 0 ? 0 : u.reduce((p, k) => p + k, 0) / u.length, []), h = y(() => "memory" in performance && performance.memory ? performance.memory.usedJSHeapSize / (1024 * 1024) : 0, []), d = y(() => {
384
- const u = {
385
- fps: f(n.current),
383
+ function Ze() {
384
+ const [e, t] = A(_), [r, a] = A(!1), n = R([]), s = R([]), i = R([]), d = R(performance.now()), l = R(null), h = y((m) => m.length === 0 ? 0 : 1e3 / (m.reduce((k, S) => k + S, 0) / m.length), []), w = y((m) => m.length === 0 ? 0 : m.reduce((v, k) => v + k, 0) / m.length, []), p = y(() => "memory" in performance && performance.memory ? performance.memory.usedJSHeapSize / (1024 * 1024) : 0, []), u = y(() => {
385
+ const m = {
386
+ fps: h(n.current),
386
387
  avgRenderTime: w(s.current),
387
388
  peakRenderTime: Math.max(...s.current, 0),
388
- memoryUsage: h(),
389
+ memoryUsage: p(),
389
390
  elementCount: 0,
390
391
  // Would need to be updated by editor context
391
392
  exportCount: i.current.length,
392
393
  avgExportTime: w(i.current)
393
394
  };
394
- t(u);
395
- }, [f, w, h]), c = y(() => {
396
- const u = performance.now(), p = u - m.current;
397
- m.current = u, n.current.push(p), n.current.length > 60 && n.current.shift(), n.current.length % 30 === 0 && d(), r && (l.current = requestAnimationFrame(c));
398
- }, [r, d]), x = y(() => {
399
- o(!0), m.current = performance.now(), l.current = requestAnimationFrame(c);
400
- }, [c]), S = y(() => {
401
- o(!1), l.current !== null && (cancelAnimationFrame(l.current), l.current = null);
402
- }, []), C = y(() => {
403
- n.current = [], s.current = [], i.current = [], t(j);
404
- }, []), g = y(() => `
395
+ t(m);
396
+ }, [h, w, p]), c = y(() => {
397
+ const m = performance.now(), v = m - d.current;
398
+ d.current = m, n.current.push(v), n.current.length > 60 && n.current.shift(), n.current.length % 30 === 0 && u(), r && (l.current = requestAnimationFrame(c));
399
+ }, [r, u]), x = y(() => {
400
+ a(!0), d.current = performance.now(), l.current = requestAnimationFrame(c);
401
+ }, [c]), C = y(() => {
402
+ a(!1), l.current !== null && (cancelAnimationFrame(l.current), l.current = null);
403
+ }, []), b = y(() => {
404
+ n.current = [], s.current = [], i.current = [], t(_);
405
+ }, []), f = y(() => `
405
406
  Performance Report
406
407
  ==================
407
408
  FPS: ${e.fps.toFixed(1)}
@@ -412,113 +413,113 @@ Element Count: ${e.elementCount}
412
413
  Export Count: ${e.exportCount}
413
414
  Avg Export Time: ${e.avgExportTime.toFixed(2)}ms
414
415
  `.trim(), [e]);
415
- return V(() => () => {
416
+ return J(() => () => {
416
417
  l.current !== null && cancelAnimationFrame(l.current);
417
418
  }, []), {
418
419
  metrics: e,
419
420
  startProfiling: x,
420
- stopProfiling: S,
421
- clearMetrics: C,
422
- getReport: g,
421
+ stopProfiling: C,
422
+ clearMetrics: b,
423
+ getReport: f,
423
424
  isProfiling: r
424
425
  };
425
426
  }
426
- function Ze(e) {
427
- const { getElementById: t } = Z();
427
+ function Ve(e) {
428
+ const { getElementById: t } = q();
428
429
  return e ? t(e) ?? null : null;
429
430
  }
430
- function Ve(e) {
431
+ function Xe(e) {
431
432
  const {
432
433
  onReorder: t,
433
434
  onGroupReorder: r,
434
- onDropIntoGroup: o,
435
+ onDropIntoGroup: a,
435
436
  onDropIntoGroupAtPosition: n,
436
437
  findElement: s,
437
438
  findParentGroup: i
438
- } = e, [m, l] = A(null), [f, w] = A(null), [h, d] = A(null), c = y((g, u) => {
439
- g.dataTransfer.effectAllowed = "move", requestAnimationFrame(() => {
440
- l(u);
439
+ } = e, [d, l] = A(null), [h, w] = A(null), [p, u] = A(null), c = y((f, m) => {
440
+ f.dataTransfer.effectAllowed = "move", requestAnimationFrame(() => {
441
+ l(m);
441
442
  });
442
443
  }, []), x = y(
443
- (g, u) => {
444
- g.preventDefault(), g.dataTransfer.dropEffect = "move";
445
- const p = g.currentTarget.getBoundingClientRect(), v = g.clientY - p.top, F = p.height, z = (s == null ? void 0 : s(u)) instanceof ue;
444
+ (f, m) => {
445
+ f.preventDefault(), f.dataTransfer.dropEffect = "move";
446
+ const v = f.currentTarget.getBoundingClientRect(), S = f.clientY - v.top, P = v.height, F = (s == null ? void 0 : s(m)) instanceof le;
446
447
  let $;
447
- z ? v < F * 0.25 ? $ = "before" : v > F * 0.75 ? $ = "after" : $ = "into" : v < F * 0.4 ? $ = "before" : v > F * 0.6 ? $ = "after" : $ = v < F / 2 ? "before" : "after", w(u), d($);
448
+ F ? S < P * 0.25 ? $ = "before" : S > P * 0.75 ? $ = "after" : $ = "into" : S < P * 0.4 ? $ = "before" : S > P * 0.6 ? $ = "after" : $ = S < P / 2 ? "before" : "after", w(m), u($);
448
449
  },
449
450
  [s]
450
- ), S = y(() => {
451
- l(null), w(null), d(null);
452
- }, []), C = y(
453
- (g, u) => {
454
- if (g.preventDefault(), !m || m === u || !h) {
455
- S();
451
+ ), C = y(() => {
452
+ l(null), w(null), u(null);
453
+ }, []), b = y(
454
+ (f, m) => {
455
+ if (f.preventDefault(), !d || d === m || !p) {
456
+ C();
456
457
  return;
457
458
  }
458
- if (h === "into")
459
- o && o(m, u);
459
+ if (p === "into")
460
+ a && a(d, m);
460
461
  else {
461
- const p = i == null ? void 0 : i(m), k = i == null ? void 0 : i(u), v = h === "before" ? "after" : "before";
462
- p && k && p.id === k.id ? r && r(m, u, v, p.id) : !p && k && n ? n(m, k.id, u, v) : t(m, u, v);
462
+ const v = i == null ? void 0 : i(d), k = i == null ? void 0 : i(m), S = p === "before" ? "after" : "before";
463
+ v && k && v.id === k.id ? r && r(d, m, S, v.id) : !v && k && n ? n(d, k.id, m, S) : t(d, m, S);
463
464
  }
464
- S();
465
+ C();
465
466
  },
466
467
  [
467
- m,
468
- h,
468
+ d,
469
+ p,
469
470
  t,
470
471
  r,
471
- o,
472
+ a,
472
473
  n,
473
474
  i,
474
- S
475
+ C
475
476
  ]
476
477
  );
477
478
  return {
478
- draggedId: m,
479
- dragOverId: f,
480
- dropPosition: h,
479
+ draggedId: d,
480
+ dragOverId: h,
481
+ dropPosition: p,
481
482
  handlers: {
482
483
  onDragStart: c,
483
484
  onDragOver: x,
484
- onDrop: C,
485
- onDragEnd: S
485
+ onDrop: b,
486
+ onDragEnd: C
486
487
  }
487
488
  };
488
489
  }
489
- function Xe(e) {
490
- const { selectedId: t, multiSelection: r, onSelectionChange: o, onMultiSelectionChange: n } = e, s = y(
491
- (m) => m === t || r.includes(m),
490
+ function Ye(e) {
491
+ const { selectedId: t, multiSelection: r, onSelectionChange: a, onMultiSelectionChange: n } = e, s = y(
492
+ (d) => d === t || r.includes(d),
492
493
  [t, r]
493
494
  ), i = y(
494
- (m, l) => {
495
- if (m.shiftKey) {
496
- const f = r.includes(l), w = t === l;
495
+ (d, l) => {
496
+ if (d.shiftKey) {
497
+ const h = r.includes(l), w = t === l;
497
498
  if (r.length > 0)
498
- if (f) {
499
- const h = r.filter((d) => d !== l);
500
- h.length === 1 ? (n([]), o(h[0])) : h.length === 0 ? (n([]), o(null)) : n(h);
499
+ if (h) {
500
+ const p = r.filter((u) => u !== l);
501
+ p.length === 1 ? (n([]), a(p[0])) : p.length === 0 ? (n([]), a(null)) : n(p);
501
502
  } else
502
503
  n([...r, l]);
503
504
  else {
504
505
  if (w)
505
506
  return;
506
- t !== null ? (n([t, l]), o(null)) : o(l);
507
+ t !== null ? (n([t, l]), a(null)) : a(l);
507
508
  }
508
509
  } else
509
- o(l), n([]);
510
+ a(l), n([]);
510
511
  },
511
- [t, r, o, n]
512
+ [t, r, a, n]
512
513
  );
513
514
  return { isSelected: s, handleClick: i };
514
515
  }
515
- const Se = xe(({ value: e, onChange: t, fontSizes: r, isOpen: o, onToggle: n }) => {
516
+ const we = he(({ value: e, onChange: t, fontSizes: r, isOpen: a, onToggle: n }) => {
516
517
  const s = (i) => {
517
518
  t(i), n(!1);
518
519
  };
519
- return /* @__PURE__ */ b(ie, { open: o, onOpenChange: n, children: [
520
- /* @__PURE__ */ a(ce, { asChild: !0, children: /* @__PURE__ */ a("button", { className: "sc-toolbar-btn", "aria-label": "Font size", children: /* @__PURE__ */ a(q, { icon: "radix-icons:font-size", className: "sc:size-5" }) }) }),
521
- /* @__PURE__ */ a(le, { className: "sc:w-[120px] sc:max-h-[300px] sc:overflow-y-auto sc:p-1", maxZIndex: !0, children: /* @__PURE__ */ a("div", { className: "sc:flex sc:flex-col sc:gap-0.5", children: r.map((i) => /* @__PURE__ */ a(
520
+ return /* @__PURE__ */ g(ae, { open: a, onOpenChange: n, children: [
521
+ /* @__PURE__ */ o(oe, { asChild: !0, children: /* @__PURE__ */ o("button", { className: "sc-toolbar-btn", "aria-label": "Font size", children: /* @__PURE__ */ o(j, { icon: "radix-icons:font-size", className: "sc:size-5" }) }) }),
522
+ /* @__PURE__ */ o(ie, { className: "sc:w-[120px] sc:max-h-[300px] sc:overflow-y-auto sc:p-1", maxZIndex: !0, children: /* @__PURE__ */ o("div", { className: "sc:flex sc:flex-col sc:gap-0.5", children: r.map((i) => /* @__PURE__ */ o(
522
523
  "button",
523
524
  {
524
525
  onClick: () => s(i),
@@ -529,47 +530,47 @@ const Se = xe(({ value: e, onChange: t, fontSizes: r, isOpen: o, onToggle: n })
529
530
  )) }) })
530
531
  ] });
531
532
  });
532
- Se.displayName = "FontSizeDropdown";
533
- function Ye({ toolbar: e }) {
534
- const { fontSize: t, handleFontSizeIncrement: r, handleFontSizeChange: o } = e, [n, s] = A(!1);
535
- return /* @__PURE__ */ b("div", { className: "sc-toolbar-group", children: [
536
- /* @__PURE__ */ b(M, { delayDuration: 300, children: [
537
- /* @__PURE__ */ a(D, { asChild: !0, children: /* @__PURE__ */ a("button", { className: "sc-toolbar-btn-sm", onClick: () => r(-1), children: "-" }) }),
538
- /* @__PURE__ */ a(I, { children: "Decrease Font Size" })
533
+ we.displayName = "FontSizeDropdown";
534
+ function He({ toolbar: e }) {
535
+ const { fontSize: t, handleFontSizeIncrement: r, handleFontSizeChange: a } = e, [n, s] = A(!1);
536
+ return /* @__PURE__ */ g("div", { className: "sc-toolbar-group", children: [
537
+ /* @__PURE__ */ g(M, { delayDuration: 300, children: [
538
+ /* @__PURE__ */ o(D, { asChild: !0, children: /* @__PURE__ */ o("button", { className: "sc-toolbar-btn-sm", onClick: () => r(-1), children: "-" }) }),
539
+ /* @__PURE__ */ o(I, { children: "Decrease Font Size" })
539
540
  ] }),
540
- /* @__PURE__ */ b(M, { delayDuration: 300, children: [
541
- /* @__PURE__ */ a(D, { asChild: !0, children: /* @__PURE__ */ b("div", { style: { position: "relative" }, children: [
542
- /* @__PURE__ */ a(
541
+ /* @__PURE__ */ g(M, { delayDuration: 300, children: [
542
+ /* @__PURE__ */ o(D, { asChild: !0, children: /* @__PURE__ */ g("div", { style: { position: "relative" }, children: [
543
+ /* @__PURE__ */ o(
543
544
  "button",
544
545
  {
545
546
  className: "sc-toolbar-font-size-display",
546
547
  onClick: () => {
547
- ne.protectNextClick(), s(!n);
548
+ te.protectNextClick(), s(!n);
548
549
  },
549
550
  children: t
550
551
  }
551
552
  ),
552
- n && /* @__PURE__ */ a(
553
+ n && /* @__PURE__ */ o(
553
554
  "div",
554
555
  {
555
556
  className: "font-dropdown",
556
557
  ref: (i) => {
557
558
  if (i) {
558
- const m = (l) => {
559
- const f = l.target;
560
- !i.contains(f) && !f.closest(".sc-toolbar-font-size-display") && s(!1);
559
+ const d = (l) => {
560
+ const h = l.target;
561
+ !i.contains(h) && !h.closest(".sc-toolbar-font-size-display") && s(!1);
561
562
  };
562
563
  setTimeout(() => {
563
- document.addEventListener("mousedown", m);
564
+ document.addEventListener("mousedown", d);
564
565
  }, 0);
565
566
  }
566
567
  },
567
- children: me.map((i) => /* @__PURE__ */ a(
568
+ children: de.map((i) => /* @__PURE__ */ o(
568
569
  "button",
569
570
  {
570
571
  className: `font-dropdown-option ${t === i ? "selected" : ""}`,
571
572
  onClick: () => {
572
- o(i), s(!1);
573
+ a(i), s(!1);
573
574
  },
574
575
  children: i
575
576
  },
@@ -578,16 +579,16 @@ function Ye({ toolbar: e }) {
578
579
  }
579
580
  )
580
581
  ] }) }),
581
- /* @__PURE__ */ a(I, { children: "Font Size" })
582
+ /* @__PURE__ */ o(I, { children: "Font Size" })
582
583
  ] }),
583
- /* @__PURE__ */ b(M, { delayDuration: 300, children: [
584
- /* @__PURE__ */ a(D, { asChild: !0, children: /* @__PURE__ */ a("button", { className: "sc-toolbar-btn-sm", onClick: () => r(1), children: "+" }) }),
585
- /* @__PURE__ */ a(I, { children: "Increase Font Size" })
584
+ /* @__PURE__ */ g(M, { delayDuration: 300, children: [
585
+ /* @__PURE__ */ o(D, { asChild: !0, children: /* @__PURE__ */ o("button", { className: "sc-toolbar-btn-sm", onClick: () => r(1), children: "+" }) }),
586
+ /* @__PURE__ */ o(I, { children: "Increase Font Size" })
586
587
  ] })
587
588
  ] });
588
589
  }
589
- const G = /* @__PURE__ */ new Map();
590
- function He(e) {
590
+ const W = /* @__PURE__ */ new Map();
591
+ function Qe(e) {
591
592
  if (!e.type || typeof e.type != "string")
592
593
  throw new Error('ElementTypeRegistration requires a non-empty "type" string');
593
594
  if (typeof e.Component != "function")
@@ -598,20 +599,20 @@ function He(e) {
598
599
  throw new Error(
599
600
  `ElementTypeRegistration for "${e.type}" requires a non-empty "label" string`
600
601
  );
601
- he(e.type, {
602
+ me(e.type, {
602
603
  id: e.type,
603
604
  label: e.label,
604
605
  Component: e.Component
605
- }), G.set(e.type, { ...e });
606
+ }), W.set(e.type, { ...e });
606
607
  }
607
- function Qe(e) {
608
- pe(e), G.delete(e);
608
+ function et(e) {
609
+ fe(e), W.delete(e);
609
610
  }
610
- function et() {
611
- return Array.from(G.values());
611
+ function tt() {
612
+ return Array.from(W.values());
612
613
  }
613
- function tt(e) {
614
- return fe(e) !== void 0;
614
+ function rt(e) {
615
+ return ue(e) !== void 0;
615
616
  }
616
617
  class Ce {
617
618
  constructor() {
@@ -628,9 +629,9 @@ class Ce {
628
629
  * @returns An unsubscribe function -- call it to remove this handler
629
630
  */
630
631
  on(t, r) {
631
- let o = this.listeners.get(t);
632
- return o || (o = /* @__PURE__ */ new Set(), this.listeners.set(t, o)), o.add(r), () => {
633
- o.delete(r), o.size === 0 && this.listeners.delete(t);
632
+ let a = this.listeners.get(t);
633
+ return a || (a = /* @__PURE__ */ new Set(), this.listeners.set(t, a)), a.add(r), () => {
634
+ a.delete(r), a.size === 0 && this.listeners.delete(t);
634
635
  };
635
636
  }
636
637
  /**
@@ -645,9 +646,9 @@ class Ce {
645
646
  * @returns An unsubscribe function
646
647
  */
647
648
  once(t, r) {
648
- const o = (s) => {
649
+ const a = (s) => {
649
650
  n(), r(s);
650
- }, n = this.on(t, o);
651
+ }, n = this.on(t, a);
651
652
  return n;
652
653
  }
653
654
  // -----------------------------------------------------------------------
@@ -663,9 +664,9 @@ class Ce {
663
664
  * @param data - The payload to pass to each handler
664
665
  */
665
666
  emit(t, r) {
666
- const o = this.listeners.get(t);
667
- if (o)
668
- for (const n of [...o])
667
+ const a = this.listeners.get(t);
668
+ if (a)
669
+ for (const n of [...a])
669
670
  try {
670
671
  n(r);
671
672
  } catch (s) {
@@ -704,10 +705,10 @@ class Ce {
704
705
  }
705
706
  }
706
707
  const Te = new Ce();
707
- function rt() {
708
+ function nt() {
708
709
  return Te;
709
710
  }
710
- const W = {
711
+ const O = {
711
712
  bleedFill: "#ffffff",
712
713
  bleedOpacity: 0.5,
713
714
  // Subtle boundary — the wash already draws the eye to the safe area,
@@ -773,8 +774,8 @@ const W = {
773
774
  bc: { textAnchor: "middle", dominantBaseline: "alphabetic" },
774
775
  br: { textAnchor: "end", dominantBaseline: "alphabetic" }
775
776
  };
776
- function K(e, t) {
777
- return e.kind === "rect" ? /* @__PURE__ */ a(
777
+ function L(e, t) {
778
+ return e.kind === "rect" ? /* @__PURE__ */ o(
778
779
  "rect",
779
780
  {
780
781
  x: e.x,
@@ -783,7 +784,7 @@ function K(e, t) {
783
784
  height: e.height,
784
785
  ...t
785
786
  }
786
- ) : e.kind === "roundedRect" ? /* @__PURE__ */ a(
787
+ ) : e.kind === "roundedRect" ? /* @__PURE__ */ o(
787
788
  "rect",
788
789
  {
789
790
  x: e.x,
@@ -794,7 +795,7 @@ function K(e, t) {
794
795
  ry: e.ry,
795
796
  ...t
796
797
  }
797
- ) : /* @__PURE__ */ a(
798
+ ) : /* @__PURE__ */ o(
798
799
  "path",
799
800
  {
800
801
  d: e.d,
@@ -802,7 +803,7 @@ function K(e, t) {
802
803
  }
803
804
  );
804
805
  }
805
- function $e(e, t, r) {
806
+ function ke(e, t, r) {
806
807
  return (e == null ? void 0 : e.boundary) ?? {
807
808
  kind: "rect",
808
809
  x: 0,
@@ -811,16 +812,16 @@ function $e(e, t, r) {
811
812
  height: r
812
813
  };
813
814
  }
814
- function J(e) {
815
+ function U(e) {
815
816
  if (e.kind === "rect")
816
817
  return `M ${e.x} ${e.y} h ${e.width} v ${e.height} h ${-e.width} Z`;
817
818
  if (e.kind === "roundedRect") {
818
819
  const t = e.rx ?? e.ry ?? 0, r = e.ry ?? e.rx ?? 0;
819
820
  if (t <= 0 && r <= 0)
820
821
  return `M ${e.x} ${e.y} h ${e.width} v ${e.height} h ${-e.width} Z`;
821
- const { x: o, y: n, width: s, height: i } = e;
822
+ const { x: a, y: n, width: s, height: i } = e;
822
823
  return [
823
- `M ${o + t} ${n}`,
824
+ `M ${a + t} ${n}`,
824
825
  `h ${s - 2 * t}`,
825
826
  `a ${t} ${r} 0 0 1 ${t} ${r}`,
826
827
  `v ${i - 2 * r}`,
@@ -834,7 +835,7 @@ function J(e) {
834
835
  }
835
836
  return e.d;
836
837
  }
837
- function ke(e, t, r, o) {
838
+ function $e(e, t, r, a) {
838
839
  if (e != null && e.safeArea) return e.safeArea;
839
840
  if (t.safeAreaInsetPx && t.safeAreaInsetPx > 0) {
840
841
  const n = t.safeAreaInsetPx;
@@ -843,92 +844,89 @@ function ke(e, t, r, o) {
843
844
  x: n,
844
845
  y: n,
845
846
  width: Math.max(0, r - n * 2),
846
- height: Math.max(0, o - n * 2)
847
+ height: Math.max(0, a - n * 2)
847
848
  };
848
849
  }
849
850
  return null;
850
851
  }
851
- function nt({
852
+ function st({
852
853
  artboardWidth: e,
853
854
  artboardHeight: t,
854
855
  canvasPadding: r = 0,
855
- pieces: o,
856
+ pieces: a,
856
857
  pieceGuides: n,
857
858
  show: s,
858
859
  style: i,
859
- className: m
860
+ className: d
860
861
  }) {
861
- const l = X(() => {
862
- const d = Math.max(
862
+ const l = Z(() => {
863
+ const u = Math.max(
863
864
  16,
864
865
  Math.round(Math.min(e, t) * 0.03)
865
866
  ), c = {
866
- ...W,
867
+ ...O,
867
868
  ...i ?? {},
868
- zoneFill: { ...W.zoneFill, ...(i == null ? void 0 : i.zoneFill) ?? {} },
869
- zoneStroke: { ...W.zoneStroke, ...(i == null ? void 0 : i.zoneStroke) ?? {} }
869
+ zoneFill: { ...O.zoneFill, ...(i == null ? void 0 : i.zoneFill) ?? {} },
870
+ zoneStroke: { ...O.zoneStroke, ...(i == null ? void 0 : i.zoneStroke) ?? {} }
870
871
  };
871
- return (i == null ? void 0 : i.labelFontSize) === void 0 && (c.labelFontSize = d), c;
872
- }, [i, e, t]), f = {
872
+ return (i == null ? void 0 : i.labelFontSize) === void 0 && (c.labelFontSize = u), c;
873
+ }, [i, e, t]), h = {
873
874
  bleed: (s == null ? void 0 : s.bleed) ?? !0,
874
875
  zones: (s == null ? void 0 : s.zones) ?? !0,
875
876
  boundary: (s == null ? void 0 : s.boundary) ?? !0,
876
877
  safeArea: (s == null ? void 0 : s.safeArea) ?? !0,
877
878
  labels: (s == null ? void 0 : s.labels) ?? !0
878
- }, w = e + r * 2, h = t + r * 2;
879
- return /* @__PURE__ */ a(
879
+ }, w = e + r * 2, p = t + r * 2;
880
+ return /* @__PURE__ */ o(
880
881
  "svg",
881
882
  {
882
883
  xmlns: "http://www.w3.org/2000/svg",
883
- viewBox: `0 0 ${w} ${h}`,
884
+ viewBox: `0 0 ${w} ${p}`,
884
885
  preserveAspectRatio: "xMidYMid meet",
885
- className: m,
886
+ className: d,
886
887
  style: { pointerEvents: "none", width: "100%", height: "100%" },
887
- children: /* @__PURE__ */ a("g", { transform: `translate(${r} ${r})`, children: o.map((d) => {
888
- const c = n == null ? void 0 : n[d.id], x = (c == null ? void 0 : c.zones) ?? [], S = (c == null ? void 0 : c.labels) ?? [], C = d.rotation ?? 0, g = C === 90 || C === 270, u = g ? d.height : d.width, p = g ? d.width : d.height, k = $e(c, u, p), v = ke(c, d, u, p), F = `translate(${d.x} ${d.y})`;
889
- let N = "";
890
- C === 90 ? N = `translate(${d.width} 0) rotate(90)` : C === 180 ? N = `translate(${d.width} ${d.height}) rotate(180)` : C === 270 && (N = `translate(0 ${d.height}) rotate(270)`);
891
- const z = N ? `${F} ${N}` : F, $ = l.safeAreaWashCornerRadius < 0 ? Math.round(Math.min(u, p) * 0.02) : l.safeAreaWashCornerRadius, P = c != null && c.boundary && (c.boundary.kind === "rect" || c.boundary.kind === "roundedRect") ? c.boundary : null, O = P ? P.kind === "rect" && $ > 0 ? {
888
+ children: /* @__PURE__ */ o("g", { transform: `translate(${r} ${r})`, children: a.map((u) => {
889
+ const c = n == null ? void 0 : n[u.id], x = (c == null ? void 0 : c.zones) ?? [], C = (c == null ? void 0 : c.labels) ?? [], { width: b, height: f } = ye(u), m = ke(c, b, f), v = $e(c, u, b, f), k = `translate(${u.x} ${u.y})`, S = ve(u), P = S ? `${k} ${S}` : k, N = l.safeAreaWashCornerRadius < 0 ? Math.round(Math.min(b, f) * 0.02) : l.safeAreaWashCornerRadius, F = c != null && c.boundary && (c.boundary.kind === "rect" || c.boundary.kind === "roundedRect") ? c.boundary : null, $ = F ? F.kind === "rect" && N > 0 ? {
892
890
  kind: "roundedRect",
893
- x: P.x,
894
- y: P.y,
895
- width: P.width,
896
- height: P.height,
897
- rx: $,
898
- ry: $
899
- } : P : $ > 0 ? {
891
+ x: F.x,
892
+ y: F.y,
893
+ width: F.width,
894
+ height: F.height,
895
+ rx: N,
896
+ ry: N
897
+ } : F : N > 0 ? {
900
898
  kind: "roundedRect",
901
899
  x: 0,
902
900
  y: 0,
903
- width: u,
904
- height: p,
905
- rx: $,
906
- ry: $
901
+ width: b,
902
+ height: f,
903
+ rx: N,
904
+ ry: N
907
905
  } : {
908
906
  kind: "rect",
909
907
  x: 0,
910
908
  y: 0,
911
- width: u,
912
- height: p
913
- }, _ = `bleed-blur-${d.id}`, Y = {
909
+ width: b,
910
+ height: f
911
+ }, K = `bleed-blur-${u.id}`, V = {
914
912
  kind: "rect",
915
913
  x: 0,
916
914
  y: 0,
917
- width: u,
918
- height: p
919
- }, H = O.kind === "rect" || O.kind === "roundedRect";
920
- return /* @__PURE__ */ b("g", { transform: z, children: [
921
- f.safeArea && H && /* @__PURE__ */ b(ve, { children: [
922
- /* @__PURE__ */ b("defs", { children: [
923
- /* @__PURE__ */ a(
915
+ width: b,
916
+ height: f
917
+ }, X = $.kind === "rect" || $.kind === "roundedRect";
918
+ return /* @__PURE__ */ g("g", { transform: P, children: [
919
+ h.safeArea && X && /* @__PURE__ */ g(be, { children: [
920
+ /* @__PURE__ */ g("defs", { children: [
921
+ /* @__PURE__ */ o(
924
922
  "filter",
925
923
  {
926
- id: _,
924
+ id: K,
927
925
  x: "-20%",
928
926
  y: "-20%",
929
927
  width: "140%",
930
928
  height: "140%",
931
- children: /* @__PURE__ */ a(
929
+ children: /* @__PURE__ */ o(
932
930
  "feGaussianBlur",
933
931
  {
934
932
  in: "SourceGraphic",
@@ -942,32 +940,32 @@ function nt({
942
940
  // other piece-local geometry.
943
941
  Math.max(
944
942
  12,
945
- Math.round(Math.min(u, p) * 0.025)
943
+ Math.round(Math.min(b, f) * 0.025)
946
944
  )
947
945
  )
948
946
  }
949
947
  )
950
948
  }
951
949
  ),
952
- /* @__PURE__ */ a("clipPath", { id: `piece-clip-${d.id}`, children: /* @__PURE__ */ a(
950
+ /* @__PURE__ */ o("clipPath", { id: `piece-clip-${u.id}`, children: /* @__PURE__ */ o(
953
951
  "rect",
954
952
  {
955
953
  x: 0,
956
954
  y: 0,
957
- width: u,
958
- height: p
955
+ width: b,
956
+ height: f
959
957
  }
960
958
  ) })
961
959
  ] }),
962
- /* @__PURE__ */ a(
960
+ /* @__PURE__ */ o(
963
961
  "g",
964
962
  {
965
- clipPath: `url(#piece-clip-${d.id})`,
966
- filter: `url(#${_})`,
967
- children: /* @__PURE__ */ a(
963
+ clipPath: `url(#piece-clip-${u.id})`,
964
+ filter: `url(#${K})`,
965
+ children: /* @__PURE__ */ o(
968
966
  "path",
969
967
  {
970
- d: `${J(Y)} ${J(O)}`,
968
+ d: `${U(V)} ${U($)}`,
971
969
  style: {
972
970
  // Honor `style.bleedFill` / `style.bleedOpacity`
973
971
  // overrides — previously hardcoded, which silently
@@ -982,33 +980,33 @@ function nt({
982
980
  }
983
981
  )
984
982
  ] }),
985
- f.zones && x.filter((T) => T.kind !== "dieCut").map((T, R) => /* @__PURE__ */ a("g", { children: K(T.path, {
983
+ h.zones && x.filter((T) => T.kind !== "dieCut").map((T, B) => /* @__PURE__ */ o("g", { children: L(T.path, {
986
984
  fill: l.zoneFill[T.kind],
987
985
  stroke: l.zoneStroke[T.kind],
988
986
  strokeWidth: 1.5,
989
987
  strokeDasharray: T.kind === "wrap" ? "4 3" : void 0,
990
988
  vectorEffect: "non-scaling-stroke"
991
- }) }, `zone-${R}`)),
992
- f.zones && x.filter((T) => T.kind === "dieCut").map((T, R) => {
989
+ }) }, `zone-${B}`)),
990
+ h.zones && x.filter((T) => T.kind === "dieCut").map((T, B) => {
993
991
  const E = T.path;
994
992
  if (E.kind !== "rect" && E.kind !== "roundedRect")
995
993
  return null;
996
- const Q = E.kind === "roundedRect" ? E.rx ?? E.ry ?? 0 : 0, ee = E.kind === "roundedRect" ? E.ry ?? E.rx ?? 0 : 0;
997
- return /* @__PURE__ */ a(
994
+ const Y = E.kind === "roundedRect" ? E.rx ?? E.ry ?? 0 : 0, H = E.kind === "roundedRect" ? E.ry ?? E.rx ?? 0 : 0;
995
+ return /* @__PURE__ */ o(
998
996
  "foreignObject",
999
997
  {
1000
998
  x: E.x,
1001
999
  y: E.y,
1002
1000
  width: E.width,
1003
1001
  height: E.height,
1004
- children: /* @__PURE__ */ a(
1002
+ children: /* @__PURE__ */ o(
1005
1003
  "div",
1006
1004
  {
1007
1005
  xmlns: "http://www.w3.org/1999/xhtml",
1008
1006
  style: {
1009
1007
  width: "100%",
1010
1008
  height: "100%",
1011
- borderRadius: `${Q}px / ${ee}px`,
1009
+ borderRadius: `${Y}px / ${H}px`,
1012
1010
  backdropFilter: "blur(4px)",
1013
1011
  WebkitBackdropFilter: "blur(4px)",
1014
1012
  // Match the canvas's own "outside-artboard"
@@ -1023,25 +1021,25 @@ function nt({
1023
1021
  }
1024
1022
  )
1025
1023
  },
1026
- `diecut-${R}`
1024
+ `diecut-${B}`
1027
1025
  );
1028
1026
  }),
1029
- f.boundary && l.boundaryStroke && K(k, {
1027
+ h.boundary && l.boundaryStroke && L(m, {
1030
1028
  fill: "none",
1031
1029
  stroke: l.boundaryStroke,
1032
1030
  strokeWidth: l.boundaryStrokeWidth,
1033
1031
  vectorEffect: "non-scaling-stroke"
1034
1032
  }),
1035
- f.safeArea && v && l.safeAreaStroke && K(v, {
1033
+ h.safeArea && v && l.safeAreaStroke && L(v, {
1036
1034
  fill: "none",
1037
1035
  stroke: l.safeAreaStroke,
1038
1036
  strokeWidth: l.safeAreaStrokeWidth,
1039
1037
  strokeDasharray: l.safeAreaDashArray,
1040
1038
  vectorEffect: "non-scaling-stroke"
1041
1039
  }),
1042
- f.labels && S.map((T, R) => {
1040
+ h.labels && C.map((T, B) => {
1043
1041
  const E = Ee[T.anchor ?? "c"];
1044
- return /* @__PURE__ */ a(
1042
+ return /* @__PURE__ */ o(
1045
1043
  "text",
1046
1044
  {
1047
1045
  x: T.x,
@@ -1057,142 +1055,142 @@ function nt({
1057
1055
  strokeLinejoin: "round",
1058
1056
  children: T.text
1059
1057
  },
1060
- `label-${R}`
1058
+ `label-${B}`
1061
1059
  );
1062
1060
  })
1063
- ] }, d.id);
1061
+ ] }, u.id);
1064
1062
  }) })
1065
1063
  }
1066
1064
  );
1067
1065
  }
1068
- se();
1066
+ re();
1069
1067
  export {
1070
- Tr as ArtboardElement,
1071
- Gt as ArtboardPropertiesToolbar,
1072
- pt as ArtboardTabs,
1073
- xt as AutoExportManager,
1074
- _t as BackgroundPickerDropdown,
1075
- Er as BaseElement,
1076
- Ut as BoldButton,
1077
- Le as ButtonGroup,
1078
- gt as Canvas,
1068
+ Er as ArtboardElement,
1069
+ _t as ArtboardPropertiesToolbar,
1070
+ xt as ArtboardTabs,
1071
+ gt as AutoExportManager,
1072
+ Ut as BackgroundPickerDropdown,
1073
+ kr as BaseElement,
1074
+ jt as BoldButton,
1075
+ We as ButtonGroup,
1076
+ bt as Canvas,
1079
1077
  Ce as CanvasEventBus,
1080
- bt as CanvasSkeleton,
1081
- jt as ColorPickerDropdown,
1078
+ yt as CanvasSkeleton,
1079
+ qt as ColorPickerDropdown,
1082
1080
  Jt as ContextualToolbars,
1083
- Oe as ControlGroup,
1084
- qt as CropPanel,
1085
- yt as DEFAULT_AUTO_EXPORT_CONFIG,
1086
- te as Dropdown,
1087
- at as DropdownMenu,
1088
- dr as EditorProvider,
1089
- vt as EffectsPanel,
1081
+ Le as ControlGroup,
1082
+ Zt as CropPanel,
1083
+ vt as DEFAULT_AUTO_EXPORT_CONFIG,
1084
+ Q as Dropdown,
1085
+ it as DropdownMenu,
1086
+ ur as EditorProvider,
1087
+ St as EffectsPanel,
1090
1088
  wt as ExportPanel,
1091
- Zt as FontBrowserDrawer,
1092
- Vt as FontColorButton,
1093
- Se as FontSizeDropdown,
1094
- Ye as FontSizeGroup,
1095
- St as GlyphPanel,
1096
- ue as GroupElement,
1089
+ Vt as FontBrowserDrawer,
1090
+ Xt as FontColorButton,
1091
+ we as FontSizeDropdown,
1092
+ He as FontSizeGroup,
1093
+ Ct as GlyphPanel,
1094
+ le as GroupElement,
1097
1095
  $r as ImageElement,
1098
- Wt as ImagePanel,
1099
- Xt as ImageToolbar,
1100
- Yt as ItalicButton,
1101
- Ct as KIT_PRESETS,
1102
- Tt as KitProvider,
1103
- it as LayersPanel,
1104
- Et as LayersPanelSkeleton,
1105
- ct as MenuButton,
1106
- lt as MenuItem,
1107
- Ht as MoreMenu,
1108
- sn as PIECE_GUIDES_API_BASE,
1109
- ur as PRESERVE_SELECTION_ATTR,
1110
- ze as Panel,
1111
- kr as PathElement,
1112
- Qt as PathToolbar,
1113
- Ar as RichText,
1114
- Ge as SecondaryToolbar,
1115
- Fr as ShapeElement,
1116
- er as ShapeToolbar,
1117
- dt as ShapeTypeDrawer,
1096
+ Kt as ImagePanel,
1097
+ Yt as ImageToolbar,
1098
+ Ht as ItalicButton,
1099
+ Tt as KIT_PRESETS,
1100
+ Et as KitProvider,
1101
+ ct as LayersPanel,
1102
+ kt as LayersPanelSkeleton,
1103
+ lt as MenuButton,
1104
+ dt as MenuItem,
1105
+ Qt as MoreMenu,
1106
+ an as PIECE_GUIDES_API_BASE,
1107
+ mr as PRESERVE_SELECTION_ATTR,
1108
+ Oe as Panel,
1109
+ Ar as PathElement,
1110
+ er as PathToolbar,
1111
+ Fr as RichText,
1112
+ _e as SecondaryToolbar,
1113
+ Pr as ShapeElement,
1114
+ tr as ShapeToolbar,
1115
+ ut as ShapeTypeDrawer,
1118
1116
  $t as Spinner,
1119
- ut as Surface,
1120
- Ke as Switch,
1121
- tr as TextAlignButton,
1122
- Pr as TextElement,
1123
- rr as TextMoreMenu,
1124
- nr as TextToolbar,
1117
+ mt as Surface,
1118
+ Ge as Switch,
1119
+ rr as TextAlignButton,
1120
+ Nr as TextElement,
1121
+ nr as TextMoreMenu,
1122
+ sr as TextToolbar,
1125
1123
  wr as ThemeProvider,
1126
- We as Toggle,
1127
- kt as ToolbarSkeleton,
1128
- sr as TransformControlPanel,
1124
+ Ke as Toggle,
1125
+ At as ToolbarSkeleton,
1126
+ ar as TransformControlPanel,
1129
1127
  or as UnderlineButton,
1130
- ar as UppercaseButton,
1131
- nt as VisualGuideOverlay,
1132
- At as ZoomControls,
1128
+ ir as UppercaseButton,
1129
+ st as VisualGuideOverlay,
1130
+ Ft as ZoomControls,
1133
1131
  Te as canvasEventBus,
1134
- Ft as getAllSections,
1135
- et as getCustomElementTypes,
1136
- Pt as getSection,
1137
- Nt as getSectionIds,
1138
- Nr as hasDistressEffect,
1132
+ Pt as getAllSections,
1133
+ tt as getCustomElementTypes,
1134
+ Nt as getSection,
1135
+ Bt as getSectionIds,
1136
+ Br as hasDistressEffect,
1139
1137
  Rr as hasMasks,
1140
- Br as hasStroke,
1141
- Mr as isArchTransform,
1142
- Dr as isCircleElementConfig,
1143
- Ir as isCircleTransform,
1144
- zr as isCustomElementConfig,
1145
- Or as isCustomTransform,
1146
- Lr as isFlagTransform,
1147
- Hr as isGroupElement,
1148
- Wr as isGroupElementConfig,
1149
- Kr as isGroupTransform,
1150
- Qr as isImageElement,
1151
- Gr as isImageElementConfig,
1152
- _r as isImageTransform,
1153
- Ur as isKnockout,
1154
- en as isPathElement,
1155
- jr as isPathElementConfig,
1138
+ Mr as hasStroke,
1139
+ Dr as isArchTransform,
1140
+ Ir as isCircleElementConfig,
1141
+ zr as isCircleTransform,
1142
+ Or as isCustomElementConfig,
1143
+ Lr as isCustomTransform,
1144
+ Wr as isFlagTransform,
1145
+ Qr as isGroupElement,
1146
+ Kr as isGroupElementConfig,
1147
+ Gr as isGroupTransform,
1148
+ en as isImageElement,
1149
+ _r as isImageElementConfig,
1150
+ Ur as isImageTransform,
1151
+ jr as isKnockout,
1152
+ tn as isPathElement,
1153
+ qr as isPathElementConfig,
1156
1154
  Jr as isPathTransform,
1157
- tt as isRegisteredElementType,
1158
- tn as isShapeElement,
1159
- qr as isShapeElementConfig,
1160
- Zr as isShapeTransform,
1161
- rn as isTextElement,
1162
- Vr as isTextElementConfig,
1163
- Xr as isWaveTransform,
1164
- Ue as loadKitFromJSON,
1155
+ rt as isRegisteredElementType,
1156
+ rn as isShapeElement,
1157
+ Zr as isShapeElementConfig,
1158
+ Vr as isShapeTransform,
1159
+ nn as isTextElement,
1160
+ Xr as isTextElementConfig,
1161
+ Yr as isWaveTransform,
1162
+ je as loadKitFromJSON,
1165
1163
  on as pieceGuidesForArtboard,
1166
- mr as preserveSelectionProps,
1164
+ fr as preserveSelectionProps,
1167
1165
  Rt as registerBuiltinSections,
1168
- Bt as registerBuiltinSectionsSync,
1169
- He as registerElementType,
1170
- Mt as registerSection,
1171
- Dt as renderPieceGuides,
1172
- _e as serializeKit,
1173
- fr as shouldPreserveSelection,
1174
- mt as surfaceVariants,
1175
- Qe as unregisterElementType,
1176
- It as unregisterSection,
1166
+ Mt as registerBuiltinSectionsSync,
1167
+ Qe as registerElementType,
1168
+ Dt as registerSection,
1169
+ It as renderPieceGuides,
1170
+ Ue as serializeKit,
1171
+ hr as shouldPreserveSelection,
1172
+ ft as surfaceVariants,
1173
+ et as unregisterElementType,
1174
+ zt as unregisterSection,
1177
1175
  Je as useBreakpoint,
1178
- rt as useCanvasEvents,
1179
- zt as useCapabilities,
1180
- hr as useCommandContext,
1181
- Ze as useElementById,
1182
- pr as useElementsContext,
1183
- xr as useHistoryContext,
1184
- Ot as useKit,
1185
- Ve as useLayerDragDrop,
1186
- ir as useLayerPreview,
1187
- Xe as useLayerSelection,
1188
- qe as usePerformance,
1189
- an as usePieceGuideBundle,
1190
- je as useProjectLoader,
1191
- gr as useSelectionContext,
1192
- ft as useSurface,
1193
- cr as useTextToolbar,
1194
- Sr as useTheme,
1195
- br as useToolStateContext,
1196
- yr as useViewportContext
1176
+ nt as useCanvasEvents,
1177
+ Ot as useCapabilities,
1178
+ pr as useCommandContext,
1179
+ Ve as useElementById,
1180
+ xr as useElementsContext,
1181
+ gr as useHistoryContext,
1182
+ Lt as useKit,
1183
+ Xe as useLayerDragDrop,
1184
+ cr as useLayerPreview,
1185
+ Ye as useLayerSelection,
1186
+ Ze as usePerformance,
1187
+ cn as usePieceGuideBundle,
1188
+ qe as useProjectLoader,
1189
+ br as useSelectionContext,
1190
+ ht as useSurface,
1191
+ lr as useTextToolbar,
1192
+ Cr as useTheme,
1193
+ yr as useToolStateContext,
1194
+ vr as useViewportContext
1197
1195
  };
1198
1196
  //# sourceMappingURL=advanced.mjs.map