@snowcone-app/canvas 0.40.19 → 0.40.21

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 (47) hide show
  1. package/ERROR_CONTRACT.md +30 -0
  2. package/dist/{CanvasRenderer-COHWEK1r.js → CanvasRenderer-BmLEU_Zb.js} +4 -4
  3. package/dist/{CanvasRenderer-COHWEK1r.js.map → CanvasRenderer-BmLEU_Zb.js.map} +1 -1
  4. package/dist/{CanvasStateV1-DwziqxMO.js → CanvasStateV1-DnpfA376.js} +3 -3
  5. package/dist/{CanvasStateV1-DwziqxMO.js.map → CanvasStateV1-DnpfA376.js.map} +1 -1
  6. package/dist/{ContextualToolbars-D-EX9Q9L.js → ContextualToolbars-DSJykxdc.js} +196 -196
  7. package/dist/{ContextualToolbars-D-EX9Q9L.js.map → ContextualToolbars-DSJykxdc.js.map} +1 -1
  8. package/dist/{EditorCanvasImpl-Bt-dfd8v.js → EditorCanvasImpl-t5MD0lMB.js} +8 -8
  9. package/dist/{EditorCanvasImpl-Bt-dfd8v.js.map → EditorCanvasImpl-t5MD0lMB.js.map} +1 -1
  10. package/dist/{ExportManager-DLOH2Kzk.js → ExportManager-CnUTZrbv.js} +2 -2
  11. package/dist/{ExportManager-DLOH2Kzk.js.map → ExportManager-CnUTZrbv.js.map} +1 -1
  12. package/dist/{FontAnalyzer-DWHS41ba.js → FontAnalyzer-Bjtl4XTH.js} +70 -70
  13. package/dist/{FontAnalyzer-DWHS41ba.js.map → FontAnalyzer-Bjtl4XTH.js.map} +1 -1
  14. package/dist/{ImagePanel-BIzwlaf5.js → ImagePanel-AWQgzuXz.js} +6 -6
  15. package/dist/{ImagePanel-BIzwlaf5.js.map → ImagePanel-AWQgzuXz.js.map} +1 -1
  16. package/dist/SnowconeCanvas-BWv3Sd5P.js +1213 -0
  17. package/dist/SnowconeCanvas-BWv3Sd5P.js.map +1 -0
  18. package/dist/advanced.mjs +15 -15
  19. package/dist/api/stable.d.ts +1 -0
  20. package/dist/components/embed/SnowconeCanvas.d.ts +13 -0
  21. package/dist/components/embed/kernel.d.ts +8 -0
  22. package/dist/{custom-icons-DHew1GPV.js → custom-icons-Bn8_I4kt.js} +2 -2
  23. package/dist/{custom-icons-DHew1GPV.js.map → custom-icons-Bn8_I4kt.js.map} +1 -1
  24. package/dist/{design-builder-CoCtjIwj.js → design-builder-B3v5OAQo.js} +48 -48
  25. package/dist/{design-builder-CoCtjIwj.js.map → design-builder-B3v5OAQo.js.map} +1 -1
  26. package/dist/{embed-Dzblbo8q.js → embed-D6-jVZMw.js} +10 -10
  27. package/dist/{embed-Dzblbo8q.js.map → embed-D6-jVZMw.js.map} +1 -1
  28. package/dist/embed.mjs +9 -9
  29. package/dist/errors/editorError.d.ts +6 -0
  30. package/dist/{guards-DMmhw_Ow.js → guards-B_Q3pewr.js} +2 -2
  31. package/dist/{guards-DMmhw_Ow.js.map → guards-B_Q3pewr.js.map} +1 -1
  32. package/dist/index.mjs +9 -9
  33. package/dist/internals.mjs +6 -6
  34. package/dist/{template-fields-BzAlpOEB.js → template-fields-B4sJfQjP.js} +18 -18
  35. package/dist/{template-fields-BzAlpOEB.js.map → template-fields-B4sJfQjP.js.map} +1 -1
  36. package/dist/testing.mjs +3 -3
  37. package/dist/{useCommands-CLnk8kvW.js → useCommands-CZHeVauL.js} +7 -7
  38. package/dist/{useCommands-CLnk8kvW.js.map → useCommands-CZHeVauL.js.map} +1 -1
  39. package/dist/{usePieceGuideBundle-BpIz4qow.js → usePieceGuideBundle-DsCv7HKy.js} +2 -2
  40. package/dist/{usePieceGuideBundle-BpIz4qow.js.map → usePieceGuideBundle-DsCv7HKy.js.map} +1 -1
  41. package/dist/utils/initialImageText.d.ts +51 -0
  42. package/dist/{validation-Ds2Df_gS.js → validation-D9catdeB.js} +11 -11
  43. package/dist/{validation-Ds2Df_gS.js.map → validation-D9catdeB.js.map} +1 -1
  44. package/example/package.json +1 -1
  45. package/package.json +3 -3
  46. package/dist/SnowconeCanvas-BZVuH85I.js +0 -1134
  47. package/dist/SnowconeCanvas-BZVuH85I.js.map +0 -1
package/dist/embed.mjs CHANGED
@@ -1,10 +1,10 @@
1
- import { C as a, g as t, h as o, K as r, N as i, O as n, P as d, Q as m, R as u, b as l, a as E, j as c, k as p, l as g } from "./useCommands-CLnk8kvW.js";
2
- import { E as C, R as S, a as T, b as f, S as P, c as R, d as b, e as B, f as v, g as y, i as F, h, p as k, s as D, j as I, k as K, l as L, v as w } from "./embed-Dzblbo8q.js";
3
- import { t as M, V as j } from "./FontAnalyzer-DWHS41ba.js";
4
- import { D as N, e as V, h as _, i as z, b as H } from "./design-builder-CoCtjIwj.js";
5
- import { D as O, T as Q, r as Y, u as q, a as U, b as W, c as X, d as Z, e as $, w as ee } from "./template-fields-BzAlpOEB.js";
6
- import { G as ae, H as te, J as oe, K as re } from "./ExportManager-DLOH2Kzk.js";
7
- import { s as ne } from "./CanvasStateV1-DwziqxMO.js";
1
+ import { C as a, g as t, h as o, K as r, N as i, O as n, P as d, Q as m, R as u, b as l, a as E, j as c, k as p, l as g } from "./useCommands-CZHeVauL.js";
2
+ import { E as C, R as S, a as T, b as f, S as P, c as R, d as b, e as B, f as v, g as y, i as F, h, p as k, s as D, j as I, k as K, l as L, v as w } from "./embed-D6-jVZMw.js";
3
+ import { t as M, Y as j } from "./FontAnalyzer-Bjtl4XTH.js";
4
+ import { D as N, e as Y, h as _, i as z, b as H } from "./design-builder-B3v5OAQo.js";
5
+ import { D as O, T as Q, r as V, u as q, a as U, b as W, c as X, d as Z, e as $, w as ee } from "./template-fields-B4sJfQjP.js";
6
+ import { G as ae, H as te, J as oe, K as re } from "./ExportManager-CnUTZrbv.js";
7
+ import { s as ne } from "./CanvasStateV1-DnpfA376.js";
8
8
  export {
9
9
  a as CanvasServicesProvider,
10
10
  N as DesignBuilder,
@@ -23,7 +23,7 @@ export {
23
23
  t as createProxyGenerate,
24
24
  o as createProxyImageSearch,
25
25
  ae as customFontRegistry,
26
- V as design,
26
+ Y as design,
27
27
  r as editorElementKind,
28
28
  te as ensureCustomFontsLoaded,
29
29
  y as formatBuyPrice,
@@ -39,7 +39,7 @@ export {
39
39
  u as isTextElement,
40
40
  oe as loadCustomFont,
41
41
  k as productToRenderConfig,
42
- Y as readTemplateFields,
42
+ V as readTemplateFields,
43
43
  re as registerCustomFonts,
44
44
  ne as serializeState,
45
45
  D as splitRoleKey,
@@ -67,6 +67,12 @@ export type EditorErrorCode =
67
67
  * `"host-owned"` with your own indicator. Silence-then-pop-in is a
68
68
  * composition mistake, not a preference. */
69
69
  | 'E_PREVIEW_NO_LOADER'
70
+ /** `SnowconeCanvas initialImageText` given with no `initialImage` for the words to belong to. Pass the picture as
71
+ * `initialImage`, or the whole design as `initialElements` without `initialImageText`. */
72
+ | 'E_INITIAL_TEXT_NO_IMAGE'
73
+ /** An `initialImageText` line that cannot be placed: no text, no font family, a colour that is not `#rrggbb`, or a
74
+ * size or place that is not a share of the picture. The message names the line and what to change. */
75
+ | 'E_INITIAL_TEXT_INVALID'
70
76
  /** `updateElement(target, patch)`: a patch key doesn't apply to the target
71
77
  * element's kind (e.g. `fontSize` on a shape), or a value is out of range
72
78
  * (opacity outside 0..1, fontSize/width/height <= 0, non-finite number,
@@ -1,4 +1,4 @@
1
- import { G as n, I as t, P as a, S as s, T as i } from "./FontAnalyzer-DWHS41ba.js";
1
+ import { G as n, I as t, P as a, S as s, T as i } from "./FontAnalyzer-Bjtl4XTH.js";
2
2
  function r(e) {
3
3
  return e instanceof i;
4
4
  }
@@ -21,4 +21,4 @@ export {
21
21
  r as d,
22
22
  m as i
23
23
  };
24
- //# sourceMappingURL=guards-DMmhw_Ow.js.map
24
+ //# sourceMappingURL=guards-B_Q3pewr.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"guards-DMmhw_Ow.js","sources":["../src/types/guards.ts"],"sourcesContent":["/**\n * Type guards for EditorElement discrimination\n *\n * These guards use instanceof checks against the concrete element classes,\n * matching the pattern established in EditorContext.tsx. They accept\n * BaseElement | EditorElement | undefined | null for maximum flexibility\n * at call sites.\n */\n\nimport { BaseElement } from '../core/BaseElement.js';\nimport { TextElement } from '../core/TextElement.js';\nimport { ImageElement } from '../core/ImageElement.js';\nimport { GroupElement } from '../core/GroupElement.js';\nimport { ShapeElement } from '../core/ShapeElement.js';\nimport { PathElement } from '../core/PathElement.js';\n\ntype Narrowable = BaseElement | TextElement | ImageElement | GroupElement | ShapeElement | PathElement | undefined | null;\n\n/**\n * Type guard: checks if an element is a TextElement (or any text-based transform subclass).\n *\n * TextElement is the base class for all text transforms (custom, circle, arch, wave, etc.),\n * so this returns true for any text-based element regardless of its specific transformType.\n */\nexport function isTextElement(element: Narrowable): element is TextElement {\n return element instanceof TextElement;\n}\n\n/**\n * Type guard: checks if an element is an ImageElement.\n */\nexport function isImageElement(element: Narrowable): element is ImageElement {\n return element instanceof ImageElement;\n}\n\n/**\n * Type guard: checks if an element is a GroupElement.\n */\nexport function isGroupElement(element: Narrowable): element is GroupElement {\n return element instanceof GroupElement;\n}\n\n/**\n * Type guard: checks if an element is a ShapeElement.\n */\nexport function isShapeElement(element: Narrowable): element is ShapeElement {\n return element instanceof ShapeElement;\n}\n\n/**\n * Type guard: checks if an element is a PathElement.\n */\nexport function isPathElement(element: Narrowable): element is PathElement {\n return element instanceof PathElement;\n}\n"],"names":["isTextElement","element","TextElement","isImageElement","ImageElement","isGroupElement","GroupElement","isShapeElement","ShapeElement","isPathElement","PathElement"],"mappings":";AAwBO,SAASA,EAAcC,GAA6C;AACzE,SAAOA,aAAmBC;AAC5B;AAKO,SAASC,EAAeF,GAA8C;AAC3E,SAAOA,aAAmBG;AAC5B;AAKO,SAASC,EAAeJ,GAA8C;AAC3E,SAAOA,aAAmBK;AAC5B;AAKO,SAASC,EAAeN,GAA8C;AAC3E,SAAOA,aAAmBO;AAC5B;AAKO,SAASC,EAAcR,GAA6C;AACzE,SAAOA,aAAmBS;AAC5B;"}
1
+ {"version":3,"file":"guards-B_Q3pewr.js","sources":["../src/types/guards.ts"],"sourcesContent":["/**\n * Type guards for EditorElement discrimination\n *\n * These guards use instanceof checks against the concrete element classes,\n * matching the pattern established in EditorContext.tsx. They accept\n * BaseElement | EditorElement | undefined | null for maximum flexibility\n * at call sites.\n */\n\nimport { BaseElement } from '../core/BaseElement.js';\nimport { TextElement } from '../core/TextElement.js';\nimport { ImageElement } from '../core/ImageElement.js';\nimport { GroupElement } from '../core/GroupElement.js';\nimport { ShapeElement } from '../core/ShapeElement.js';\nimport { PathElement } from '../core/PathElement.js';\n\ntype Narrowable = BaseElement | TextElement | ImageElement | GroupElement | ShapeElement | PathElement | undefined | null;\n\n/**\n * Type guard: checks if an element is a TextElement (or any text-based transform subclass).\n *\n * TextElement is the base class for all text transforms (custom, circle, arch, wave, etc.),\n * so this returns true for any text-based element regardless of its specific transformType.\n */\nexport function isTextElement(element: Narrowable): element is TextElement {\n return element instanceof TextElement;\n}\n\n/**\n * Type guard: checks if an element is an ImageElement.\n */\nexport function isImageElement(element: Narrowable): element is ImageElement {\n return element instanceof ImageElement;\n}\n\n/**\n * Type guard: checks if an element is a GroupElement.\n */\nexport function isGroupElement(element: Narrowable): element is GroupElement {\n return element instanceof GroupElement;\n}\n\n/**\n * Type guard: checks if an element is a ShapeElement.\n */\nexport function isShapeElement(element: Narrowable): element is ShapeElement {\n return element instanceof ShapeElement;\n}\n\n/**\n * Type guard: checks if an element is a PathElement.\n */\nexport function isPathElement(element: Narrowable): element is PathElement {\n return element instanceof PathElement;\n}\n"],"names":["isTextElement","element","TextElement","isImageElement","ImageElement","isGroupElement","GroupElement","isShapeElement","ShapeElement","isPathElement","PathElement"],"mappings":";AAwBO,SAASA,EAAcC,GAA6C;AACzE,SAAOA,aAAmBC;AAC5B;AAKO,SAASC,EAAeF,GAA8C;AAC3E,SAAOA,aAAmBG;AAC5B;AAKO,SAASC,EAAeJ,GAA8C;AAC3E,SAAOA,aAAmBK;AAC5B;AAKO,SAASC,EAAeN,GAA8C;AAC3E,SAAOA,aAAmBO;AAC5B;AAKO,SAASC,EAAcR,GAA6C;AACzE,SAAOA,aAAmBS;AAC5B;"}
package/dist/index.mjs CHANGED
@@ -1,13 +1,13 @@
1
- import { e as u } from "./useCommands-CLnk8kvW.js";
2
- import { C as c, f as x, g as I, h as v, b as A, a as g, j as T, k as B, l as P } from "./useCommands-CLnk8kvW.js";
3
- import { E as F, S as L, S as _, u as O, a as R } from "./SnowconeCanvas-BZVuH85I.js";
4
- import { b as m, d } from "./design-builder-CoCtjIwj.js";
5
- import { C as z, D as w, e as K, s as D } from "./design-builder-CoCtjIwj.js";
6
- import { T as V, r as b, u as h, a as G, b as H, c as U, d as Y, e as Z, w as j } from "./template-fields-BzAlpOEB.js";
7
- import { A as J, C as q, E as Q, M as W, P as X, r as $, v as ee } from "./validation-Ds2Df_gS.js";
8
- import { G as ae, H as te, J as oe, K as re } from "./ExportManager-DLOH2Kzk.js";
1
+ import { e as u } from "./useCommands-CZHeVauL.js";
2
+ import { C as c, f as x, g as I, h as v, b as A, a as g, j as T, k as B, l as P } from "./useCommands-CZHeVauL.js";
3
+ import { E as F, S as L, S as _, u as O, a as R } from "./SnowconeCanvas-BWv3Sd5P.js";
4
+ import { b as m, d } from "./design-builder-B3v5OAQo.js";
5
+ import { C as z, D as w, e as K, s as D } from "./design-builder-B3v5OAQo.js";
6
+ import { T as V, r as b, u as h, a as G, b as H, c as U, d as Y, e as Z, w as j } from "./template-fields-B4sJfQjP.js";
7
+ import { A as J, C as q, E as Q, M as W, P as X, r as $, v as ee } from "./validation-D9catdeB.js";
8
+ import { G as ae, H as te, J as oe, K as re } from "./ExportManager-CnUTZrbv.js";
9
9
  import { c as ie, e as ue } from "./compose-DtQL_oit.js";
10
- import { d as de, m as Ce, s as Se, v as Ee } from "./CanvasStateV1-DwziqxMO.js";
10
+ import { d as de, m as Ce, s as Se, v as Ee } from "./CanvasStateV1-DnpfA376.js";
11
11
  function E() {
12
12
  const { isCanvasReady: e } = m();
13
13
  return e;
@@ -1,9 +1,9 @@
1
- import { A as rr, a as or, C as sr, I as er, R as tr, S as nr, T as ar } from "./CanvasRenderer-COHWEK1r.js";
2
- import { r as k } from "./ExportManager-DLOH2Kzk.js";
3
- import { D as hr, a as cr, I as dr, W as fr, b as gr, c as lr, d as ur, e as pr, f as yr, g as kr, h as vr, i as wr, j as Cr, k as Mr, l as Tr, m as Sr, n as br, o as Pr, p as Ir, q as mr, s as Ar, t as Rr, u as Wr, v as Er, w as Or, x as Hr, y as jr, z as Fr, A as Lr, B as Xr, C as zr, F as Nr } from "./ExportManager-DLOH2Kzk.js";
4
- import { i as H, a as j, c as F, r as L, b as X } from "./FontAnalyzer-DWHS41ba.js";
5
- import { d as Br, e as Kr, f as Ur, C as Yr, g as Jr, E as Vr, F as qr, H as Gr, L as Qr, h as Zr, W as $r, j as xr, k as Dr, l as ro, m as oo, n as so, o as eo, s as to, w as no } from "./FontAnalyzer-DWHS41ba.js";
6
- import { A as io, a as ho, C as co, S as fo } from "./CanvasStateV1-DwziqxMO.js";
1
+ import { A as rr, a as or, C as sr, I as er, R as tr, S as nr, T as ar } from "./CanvasRenderer-BmLEU_Zb.js";
2
+ import { r as k } from "./ExportManager-CnUTZrbv.js";
3
+ import { D as hr, a as cr, I as dr, W as fr, b as gr, c as lr, d as ur, e as pr, f as yr, g as kr, h as vr, i as wr, j as Cr, k as Mr, l as Tr, m as Sr, n as br, o as Pr, p as Ir, q as mr, s as Ar, t as Rr, u as Wr, v as Er, w as Or, x as Hr, y as jr, z as Fr, A as Lr, B as Xr, C as zr, F as Nr } from "./ExportManager-CnUTZrbv.js";
4
+ import { i as H, a as j, c as F, r as L, b as X } from "./FontAnalyzer-Bjtl4XTH.js";
5
+ import { d as Br, e as Kr, f as Ur, C as Yr, g as Jr, E as Vr, F as qr, H as Gr, L as Qr, h as Zr, W as $r, j as xr, k as Dr, l as ro, m as oo, n as so, o as eo, s as to, w as no } from "./FontAnalyzer-Bjtl4XTH.js";
6
+ import { A as io, a as ho, C as co, S as fo } from "./CanvasStateV1-DnpfA376.js";
7
7
  const z = F("image-adjustments"), v = 1e-3;
8
8
  function N(r, o) {
9
9
  const { brightness: a, contrast: s, saturation: h } = o, e = a * s, t = 127.5 * (1 - s), f = Math.abs(e - 1) > v || Math.abs(t) > v, i = new Uint8ClampedArray(256);
@@ -1,9 +1,9 @@
1
- import { t as v, p as V, T, I as M, x as st } from "./FontAnalyzer-DWHS41ba.js";
2
- import { l as G, b as ot, i as it, u as O, a as B, h as rt } from "./design-builder-CoCtjIwj.js";
1
+ import { t as v, p as V, T, I as M, z as st } from "./FontAnalyzer-Bjtl4XTH.js";
2
+ import { l as G, b as ot, i as it, u as O, a as B, h as rt } from "./design-builder-B3v5OAQo.js";
3
3
  import { toOptionAttributes as at, toCombinations as ct, getMissingSelections as lt, validateProductSelection as mt, findBestCombination as F, computeDisabledChoices as ft } from "@snowcone-app/sdk";
4
4
  import { useEffect as ut, useContext as Z, useId as dt, useLayoutEffect as ht, useRef as C, useMemo as A, useCallback as _, useState as q } from "react";
5
- import { E as tt, U as gt } from "./useCommands-CLnk8kvW.js";
6
- import { b as pt, o as $, c as f, n as bt, l as p, u as J, e as yt } from "./CanvasStateV1-DwziqxMO.js";
5
+ import { E as tt, U as gt } from "./useCommands-CZHeVauL.js";
6
+ import { b as pt, o as $, c as f, n as bt, l as p, u as z, e as yt } from "./CanvasStateV1-DnpfA376.js";
7
7
  function R(s) {
8
8
  return s.text;
9
9
  }
@@ -126,7 +126,7 @@ class Pt {
126
126
  for (const t of [...this.listeners]) t();
127
127
  }
128
128
  }
129
- function X(s) {
129
+ function J(s) {
130
130
  return (s.choices ?? []).map((t) => typeof t == "string" ? t : t.label ?? "").filter((t) => t !== "");
131
131
  }
132
132
  function vt(s, t) {
@@ -164,7 +164,7 @@ class Wt {
164
164
  `product ${this.product.productId} has no option "${t}". Valid option keys: ${JSON.stringify(Object.keys(this.attrs))}.`,
165
165
  { key: t, validKeys: Object.keys(this.attrs), docSlug: "embed-mode" }
166
166
  );
167
- const n = X(o);
167
+ const n = J(o);
168
168
  if (n.length > 0 && !n.includes(e))
169
169
  throw new v(
170
170
  "E_UNKNOWN_OPTION",
@@ -225,7 +225,7 @@ class Wt {
225
225
  disabledChoices() {
226
226
  const t = {};
227
227
  for (const [e, o] of Object.entries(this.attrs))
228
- t[e] = { ...o, choices: X(o) };
228
+ t[e] = { ...o, choices: J(o) };
229
229
  return ft(this.selection, t, this.combos);
230
230
  }
231
231
  /** The combinations (for payload assembly via `createCartDetail`). */
@@ -241,7 +241,7 @@ function jt() {
241
241
  const { selectedElement: s } = ot();
242
242
  return s ?? null;
243
243
  }
244
- const Nt = 3e3, z = {
244
+ const Nt = 3e3, X = {
245
245
  text: "useTextBinding",
246
246
  image: "useImageBinding",
247
247
  font: "useFontBinding"
@@ -258,9 +258,9 @@ function Q(s) {
258
258
  return s instanceof T ? "text" : s instanceof M ? "image" : "other";
259
259
  }
260
260
  function Ct(s, t, e) {
261
- const o = `[${z[s]}]`, n = `the binding is dead (isConnected: false, ${$t[s]} is a no-op)`, i = xt[s], a = e.getAllByName(t);
261
+ const o = `[${X[s]}]`, n = `the binding is dead (isConnected: false, ${$t[s]} is a no-op)`, i = xt[s], a = e.getAllByName(t);
262
262
  if (a.length > 0) {
263
- const l = [...new Set(a.map(Q))], m = i === "text" ? "image" : "text", N = l.length === 1 && l[0] === m ? ` Bind it with ${z[m]}("${t}") instead.` : "";
263
+ const l = [...new Set(a.map(Q))], m = i === "text" ? "image" : "text", N = l.length === 1 && l[0] === m ? ` Bind it with ${X[m]}("${t}") instead.` : "";
264
264
  return `${o} the layer named "${t}" is ${l.join("/")}, not ${i} — ${n}.${N}`;
265
265
  }
266
266
  const r = e.getAll().filter((l) => l.name).map((l) => `"${l.name}" (${Q(l)})`), c = r.length ? `Named layers on this canvas: ${r.join(", ")}. Check the name for a typo.` : `No element on this canvas has a name — name one via design().${i}(…, { name: '${t}' }) or the element's \`name\` property.`;
@@ -503,7 +503,7 @@ const nt = "personalization", wt = pt("type", [
503
503
  name: f().min(1),
504
504
  label: f(),
505
505
  placeholder: f().optional(),
506
- fit: J([p("cover"), p("contain")]).optional(),
506
+ fit: z([p("cover"), p("contain")]).optional(),
507
507
  artboard: f().min(1).optional(),
508
508
  group: f().optional()
509
509
  }),
@@ -518,13 +518,13 @@ const nt = "personalization", wt = pt("type", [
518
518
  type: p("select"),
519
519
  name: f().min(1),
520
520
  label: f(),
521
- property: J([p("text"), p("imageUrl"), p("fontFamily")]),
521
+ property: z([p("text"), p("imageUrl"), p("fontFamily")]),
522
522
  options: yt($({ label: f(), value: f() })).min(1),
523
523
  artboard: f().min(1).optional(),
524
524
  group: f().optional()
525
525
  })
526
526
  ]);
527
- function Jt(s) {
527
+ function zt(s) {
528
528
  if (!s || typeof s != "object") return [];
529
529
  const t = s[nt];
530
530
  if (!Array.isArray(t)) return [];
@@ -536,7 +536,7 @@ function Jt(s) {
536
536
  }
537
537
  return e;
538
538
  }
539
- function Xt(s, t) {
539
+ function Jt(s, t) {
540
540
  return { ...s, [nt]: t };
541
541
  }
542
542
  export {
@@ -548,9 +548,9 @@ export {
548
548
  Ht as c,
549
549
  jt as d,
550
550
  Kt as e,
551
- X as f,
552
- Jt as r,
551
+ J as f,
552
+ zt as r,
553
553
  Vt as u,
554
- Xt as w
554
+ Jt as w
555
555
  };
556
- //# sourceMappingURL=template-fields-BzAlpOEB.js.map
556
+ //# sourceMappingURL=template-fields-B4sJfQjP.js.map