@snowcone-app/canvas 0.26.0 → 0.27.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 (53) hide show
  1. package/ERROR_CONTRACT.md +38 -0
  2. package/dist/{CanvasRenderer-6_HhR4-q.js → CanvasRenderer-yszzrDfo.js} +4 -4
  3. package/dist/{CanvasRenderer-6_HhR4-q.js.map → CanvasRenderer-yszzrDfo.js.map} +1 -1
  4. package/dist/{CanvasStateV1-DmZ1Qvvn.js → CanvasStateV1-BTbCD_xC.js} +3 -3
  5. package/dist/{CanvasStateV1-DmZ1Qvvn.js.map → CanvasStateV1-BTbCD_xC.js.map} +1 -1
  6. package/dist/{ContextualToolbars-DUhBKVxe.js → ContextualToolbars-BHjYsril.js} +6 -6
  7. package/dist/{ContextualToolbars-DUhBKVxe.js.map → ContextualToolbars-BHjYsril.js.map} +1 -1
  8. package/dist/{EditorCanvasImpl-BLZV_el0.js → EditorCanvasImpl-Ui8Ceb-h.js} +8 -8
  9. package/dist/{EditorCanvasImpl-BLZV_el0.js.map → EditorCanvasImpl-Ui8Ceb-h.js.map} +1 -1
  10. package/dist/{ExportManager-DoU4VK6h.js → ExportManager-BTcyj4cf.js} +2 -2
  11. package/dist/{ExportManager-DoU4VK6h.js.map → ExportManager-BTcyj4cf.js.map} +1 -1
  12. package/dist/{FontAnalyzer-CwIpgTGd.js → FontAnalyzer-EF3gLPr8.js} +30 -20
  13. package/dist/{FontAnalyzer-CwIpgTGd.js.map → FontAnalyzer-EF3gLPr8.js.map} +1 -1
  14. package/dist/{ImagePanel-sLSjaPWS.js → ImagePanel-CIk6z41z.js} +6 -6
  15. package/dist/{ImagePanel-sLSjaPWS.js.map → ImagePanel-CIk6z41z.js.map} +1 -1
  16. package/dist/{SnowconeCanvas-4ef4a61J.js → SnowconeCanvas-DuWALOAt.js} +10 -10
  17. package/dist/{SnowconeCanvas-4ef4a61J.js.map → SnowconeCanvas-DuWALOAt.js.map} +1 -1
  18. package/dist/{UnifiedFontService-Bx2MxFfy.js → UnifiedFontService-CHVYDBDW.js} +7 -7
  19. package/dist/{UnifiedFontService-Bx2MxFfy.js.map → UnifiedFontService-CHVYDBDW.js.map} +1 -1
  20. package/dist/advanced.mjs +14 -14
  21. package/dist/api/embed.d.ts +4 -0
  22. package/dist/contexts/EditorContext.d.ts +34 -0
  23. package/dist/core/HybridHistoryManager.d.ts +7 -0
  24. package/dist/core/elementGuards.d.ts +19 -0
  25. package/dist/{custom-icons-DeYIrTK1.js → custom-icons-CcLMyybv.js} +2 -2
  26. package/dist/{custom-icons-DeYIrTK1.js.map → custom-icons-CcLMyybv.js.map} +1 -1
  27. package/dist/{design-builder-U7Su9MMC.js → design-builder-cZY958Rw.js} +2 -2
  28. package/dist/{design-builder-U7Su9MMC.js.map → design-builder-cZY958Rw.js.map} +1 -1
  29. package/dist/editorErrors-BhrZ_nwj.js +1219 -0
  30. package/dist/editorErrors-BhrZ_nwj.js.map +1 -0
  31. package/dist/{embed-DXGydZOT.js → embed-CJswRZte.js} +10 -10
  32. package/dist/{embed-DXGydZOT.js.map → embed-CJswRZte.js.map} +1 -1
  33. package/dist/embed.mjs +39 -33
  34. package/dist/errors/editorError.d.ts +12 -0
  35. package/dist/{guards-8rkFAMBs.js → guards-DIX8aXWM.js} +2 -2
  36. package/dist/{guards-8rkFAMBs.js.map → guards-DIX8aXWM.js.map} +1 -1
  37. package/dist/hooks/elementPatch.d.ts +96 -0
  38. package/dist/hooks/useCommands.d.ts +20 -0
  39. package/dist/index.mjs +8 -8
  40. package/dist/internals.mjs +9 -9
  41. package/dist/template-fields-BXl29sgh.js +716 -0
  42. package/dist/template-fields-BXl29sgh.js.map +1 -0
  43. package/dist/testing.mjs +4 -4
  44. package/dist/{usePieceGuideBundle-CbJJg66S.js → usePieceGuideBundle-DE21DQGZ.js} +2 -2
  45. package/dist/{usePieceGuideBundle-CbJJg66S.js.map → usePieceGuideBundle-DE21DQGZ.js.map} +1 -1
  46. package/dist/{validation-DnAkXdUg.js → validation-DGXAQmUC.js} +11 -11
  47. package/dist/{validation-DnAkXdUg.js.map → validation-DGXAQmUC.js.map} +1 -1
  48. package/example/package.json +1 -1
  49. package/package.json +3 -3
  50. package/dist/editorErrors-B2mb1sVN.js +0 -1208
  51. package/dist/editorErrors-B2mb1sVN.js.map +0 -1
  52. package/dist/template-fields-DJ157D3E.js +0 -548
  53. package/dist/template-fields-DJ157D3E.js.map +0 -1
@@ -1,9 +1,9 @@
1
1
  import { jsx as f, jsxs as j, Fragment as nn } from "react/jsx-runtime";
2
2
  import * as O from "react";
3
3
  import te, { useRef as G, useState as H, useCallback as N, useMemo as q, useEffect as W, forwardRef as In, createElement as yn, useLayoutEffect as Nn, memo as Go, useReducer as Wo, useContext as je, createContext as Xe, cloneElement as _o, useId as Lr, useSyncExternalStore as Rr } from "react";
4
- import { u as On, h as qo, g as Pt, r as Yo, j as Ko, k as Tr, d as Xo } from "./editorErrors-B2mb1sVN.js";
5
- import { G as Ie, c as ot, C as rn } from "./FontAnalyzer-CwIpgTGd.js";
6
- import { g as Jo, I as on, E as sn } from "./ExportManager-DoU4VK6h.js";
4
+ import { u as On, h as qo, g as Pt, r as Yo, j as Ko, k as Tr, d as Xo } from "./editorErrors-BhrZ_nwj.js";
5
+ import { G as Ie, c as ot, C as rn } from "./FontAnalyzer-EF3gLPr8.js";
6
+ import { g as Jo, I as on, E as sn } from "./ExportManager-BTcyj4cf.js";
7
7
  import { createPortal as zn, unstable_batchedUpdates as Nt } from "react-dom";
8
8
  import { clsx as Ir } from "clsx";
9
9
  import { extendTailwindMerge as Nr } from "tailwind-merge";
@@ -6953,7 +6953,7 @@ const hl = ({
6953
6953
  var S;
6954
6954
  const { get: a } = Tr(), [l, c] = H(!1), [u, d] = H(!1), [h, g] = H(!1), x = G(null), w = async () => {
6955
6955
  try {
6956
- const { ExportManager: v } = await import("./ExportManager-DoU4VK6h.js").then((R) => R.S), { artboardManager: L, elements: b } = a(), D = L.getAllArtboards();
6956
+ const { ExportManager: v } = await import("./ExportManager-BTcyj4cf.js").then((R) => R.S), { artboardManager: L, elements: b } = a(), D = L.getAllArtboards();
6957
6957
  v.exportToJSON(D, b, L), c(!1);
6958
6958
  } catch (v) {
6959
6959
  mn.error("Failed to save workspace:", v), alert("Failed to save workspace. Please try again.");
@@ -7007,7 +7007,7 @@ This will replace your current workspace. Continue?`
7007
7007
  return;
7008
7008
  }
7009
7009
  try {
7010
- const { ExportManager: R } = await import("./ExportManager-DoU4VK6h.js").then((F) => F.S);
7010
+ const { ExportManager: R } = await import("./ExportManager-BTcyj4cf.js").then((F) => F.S);
7011
7011
  await R.exportArtboardToImage(D, L, b.current, {
7012
7012
  format: "png",
7013
7013
  scale: 2,
@@ -7143,7 +7143,7 @@ function Po({
7143
7143
  return W(() => {
7144
7144
  if (!t || o) return;
7145
7145
  let s = !1;
7146
- return import("./ImagePanel-sLSjaPWS.js").then(
7146
+ return import("./ImagePanel-CIk6z41z.js").then(
7147
7147
  (a) => {
7148
7148
  s || i(() => a.ImagePanel);
7149
7149
  },
@@ -7803,4 +7803,4 @@ export {
7803
7803
  Bl as y,
7804
7804
  Le as z
7805
7805
  };
7806
- //# sourceMappingURL=UnifiedFontService-Bx2MxFfy.js.map
7806
+ //# sourceMappingURL=UnifiedFontService-CHVYDBDW.js.map