@snowcone-app/canvas 0.46.3 → 0.46.6

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 (54) hide show
  1. package/dist/{CanvasRenderer-B8BADU_r.js → CanvasRenderer-CmIQSVCK.js} +4 -4
  2. package/dist/{CanvasRenderer-B8BADU_r.js.map → CanvasRenderer-CmIQSVCK.js.map} +1 -1
  3. package/dist/{ContextualToolbars-5tHC6s0Y.js → ContextualToolbars-Dmo86Wd2.js} +323 -322
  4. package/dist/{ContextualToolbars-5tHC6s0Y.js.map → ContextualToolbars-Dmo86Wd2.js.map} +1 -1
  5. package/dist/{EditorCanvasImpl-CrP9FSoY.js → EditorCanvasImpl-BHa8q4iO.js} +16 -15
  6. package/dist/{EditorCanvasImpl-CrP9FSoY.js.map → EditorCanvasImpl-BHa8q4iO.js.map} +1 -1
  7. package/dist/{ExportManager-xRsXgyNo.js → ExportManager-DEJgxB0S.js} +79 -78
  8. package/dist/{ExportManager-xRsXgyNo.js.map → ExportManager-DEJgxB0S.js.map} +1 -1
  9. package/dist/{FontAnalyzer-Ds3Wdba7.js → FontAnalyzer-CLMJi2Sw.js} +374 -409
  10. package/dist/FontAnalyzer-CLMJi2Sw.js.map +1 -0
  11. package/dist/{ImagePanel-bW3yr6Ac.js → ImagePanel-4fHABjNT.js} +6 -6
  12. package/dist/{ImagePanel-bW3yr6Ac.js.map → ImagePanel-4fHABjNT.js.map} +1 -1
  13. package/dist/{SnowconeCanvas-crxPwbib.js → SnowconeCanvas-GPag5BXG.js} +10 -10
  14. package/dist/{SnowconeCanvas-crxPwbib.js.map → SnowconeCanvas-GPag5BXG.js.map} +1 -1
  15. package/dist/advanced.mjs +54 -54
  16. package/dist/core/image-adjustments.d.ts +2 -4
  17. package/dist/core/masked-crop.d.ts +3 -55
  18. package/dist/{custom-icons-DQRp8GhF.js → custom-icons-Dt0Y4VSn.js} +2 -2
  19. package/dist/{custom-icons-DQRp8GhF.js.map → custom-icons-Dt0Y4VSn.js.map} +1 -1
  20. package/dist/design-builder-HKRo18WT.js +1798 -0
  21. package/dist/design-builder-HKRo18WT.js.map +1 -0
  22. package/dist/{embed-D0f-YvCl.js → embed-DhjsJ3ni.js} +10 -10
  23. package/dist/{embed-D0f-YvCl.js.map → embed-DhjsJ3ni.js.map} +1 -1
  24. package/dist/embed.mjs +35 -36
  25. package/dist/embed.mjs.map +1 -1
  26. package/dist/{export-worker.bundle.string-BL30CYzH.js → export-worker.bundle.string-CyMb_XjB.js} +27 -25
  27. package/dist/{export-worker.bundle.string-BL30CYzH.js.map → export-worker.bundle.string-CyMb_XjB.js.map} +1 -1
  28. package/dist/{guards-DwYEoqcn.js → guards-Dk86a-kH.js} +2 -2
  29. package/dist/{guards-DwYEoqcn.js.map → guards-Dk86a-kH.js.map} +1 -1
  30. package/dist/index.mjs +43 -43
  31. package/dist/internals.mjs +150 -149
  32. package/dist/internals.mjs.map +1 -1
  33. package/dist/rendering/serialize-for-server.d.ts +4 -91
  34. package/dist/state/CanvasStateV1.d.ts +1 -363
  35. package/dist/{CanvasStateV1-BlDWgOzV.js → template-fields-CKEuUmTM.js} +1997 -1835
  36. package/dist/template-fields-CKEuUmTM.js.map +1 -0
  37. package/dist/testing.mjs +61 -60
  38. package/dist/testing.mjs.map +1 -1
  39. package/dist/{useCommands-F-b_SwW-.js → useCommands-BI7O5Lf0.js} +225 -225
  40. package/dist/{useCommands-F-b_SwW-.js.map → useCommands-BI7O5Lf0.js.map} +1 -1
  41. package/dist/{usePieceGuideBundle-BWdobHQE.js → usePieceGuideBundle-DJfjOVEd.js} +2 -2
  42. package/dist/{usePieceGuideBundle-BWdobHQE.js.map → usePieceGuideBundle-DJfjOVEd.js.map} +1 -1
  43. package/dist/utils/custom-fonts.d.ts +2 -16
  44. package/dist/{validation-hn5ZX8Po.js → validation-au_-Sj-A.js} +11 -11
  45. package/dist/{validation-hn5ZX8Po.js.map → validation-au_-Sj-A.js.map} +1 -1
  46. package/dist/workers/export-worker.bundle.string.d.ts +1 -1
  47. package/example/package.json +1 -1
  48. package/package.json +4 -3
  49. package/dist/CanvasStateV1-BlDWgOzV.js.map +0 -1
  50. package/dist/FontAnalyzer-Ds3Wdba7.js.map +0 -1
  51. package/dist/design-builder-sH53Og6j.js +0 -1870
  52. package/dist/design-builder-sH53Og6j.js.map +0 -1
  53. package/dist/template-fields-BaQG0CJY.js +0 -559
  54. package/dist/template-fields-BaQG0CJY.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { p as a } from "./FontAnalyzer-Ds3Wdba7.js";
1
+ import { p as a } from "./FontAnalyzer-CLMJi2Sw.js";
2
2
  import { useState as s, useEffect as h } from "react";
3
3
  import { SNOWCONE_HOSTS as d } from "@snowcone-app/sdk";
4
4
  const c = d.api;
@@ -66,4 +66,4 @@ export {
66
66
  m as p,
67
67
  p as u
68
68
  };
69
- //# sourceMappingURL=usePieceGuideBundle-BWdobHQE.js.map
69
+ //# sourceMappingURL=usePieceGuideBundle-DJfjOVEd.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePieceGuideBundle-BWdobHQE.js","sources":["../src/components/embed-realtime/usePieceGuideBundle.ts"],"sourcesContent":["'use client';\n\n/**\n * usePieceGuideBundle — fetch a product's printable-area guides for the embed.\n *\n * Some products hide part of the print file under hardware (a phone case's\n * camera module, a notebook's spine). snowcone.app's own editor draws the\n * printable-area / dead-zone overlay from the product's piece guides;\n * `<RealtimeEmbed>` uses this hook so embedders get the same overlay with\n * zero config — without it, a buyer can edit artwork the mockup will never\n * show, with no signal anywhere (#566).\n *\n * The endpoint is a public read (geometry only — piece rects, safe areas,\n * authored guides; same exposure class as the public catalog). Errors degrade\n * silently to \"no guides\": the editor keeps working, the overlay just doesn't\n * appear — same posture as snowcone.app's own loader.\n *\n * @module\n */\n\nimport { useEffect, useState } from 'react';\nimport { SNOWCONE_HOSTS } from '@snowcone-app/sdk';\nimport type { PieceGuidesConfig } from '../embed/SnowconeCanvas.js';\nimport type {\n PieceGuide,\n PieceGuideRendererPiece,\n PieceGuideRendererStyle,\n} from '../../rendering/PieceGuideRenderer.js';\n\n/** Backend base hosting `GET /printables/by-gvid/:gvid/piece-guides`. */\nexport const PIECE_GUIDES_API_BASE: string = SNOWCONE_HOSTS.api;\n\n/** Wire shape of the piece-guides endpoint (the consumer-safe subset). */\ninterface RawPieceGuidesResponse {\n artboardWidth: number;\n artboardHeight: number;\n /** Inches→px conversion factor for `safeAreaInsetInches`. */\n templateDpi: number;\n pieces: Array<{\n id: string;\n x: number;\n y: number;\n width: number;\n height: number;\n rotation?: number;\n naturalWidth?: number;\n naturalHeight?: number;\n safeAreaInsetInches?: number;\n }>;\n pieceGuides?: Record<string, PieceGuide>;\n pieceGuidesStyle?: PieceGuideRendererStyle;\n}\n\n/** A fetched bundle: the overlay config plus the artboard frame it was authored in. */\nexport interface PieceGuideBundle {\n /** The print-file frame the piece coords live in. */\n artboardWidth: number;\n artboardHeight: number;\n config: PieceGuidesConfig;\n}\n\n/** Convert the wire response into a renderer-ready bundle (inches → px, etc.). */\nexport function transformPieceGuides(raw: RawPieceGuidesResponse): PieceGuideBundle {\n const pieces: PieceGuideRendererPiece[] = raw.pieces.map((p) => ({\n id: p.id,\n x: p.x,\n y: p.y,\n width: p.width,\n height: p.height,\n rotation: typeof p.rotation === 'number' ? p.rotation : undefined,\n // natural (unrotated) size — required at non-right angles (a bandana's 45° folded view)\n naturalWidth: typeof p.naturalWidth === 'number' ? p.naturalWidth : undefined,\n naturalHeight: typeof p.naturalHeight === 'number' ? p.naturalHeight : undefined,\n safeAreaInsetPx:\n typeof p.safeAreaInsetInches === 'number' && p.safeAreaInsetInches > 0\n ? p.safeAreaInsetInches * raw.templateDpi\n : undefined,\n }));\n return {\n artboardWidth: raw.artboardWidth,\n artboardHeight: raw.artboardHeight,\n config: {\n pieces,\n guides: raw.pieceGuides ?? {},\n style: raw.pieceGuidesStyle,\n },\n };\n}\n\n/**\n * Gate the bundle on the design's artboard matching the print-file frame the\n * guides were authored in — the same gate snowcone.app's editor applies. A\n * design authored at other dims would render the overlay misaligned, so it's\n * skipped (with a dev hint, since the fix — author at the placement's dims —\n * is on the embedder's side).\n */\nexport function pieceGuidesForArtboard(\n bundle: PieceGuideBundle,\n artboard: { width: number; height: number; name?: string } | undefined,\n): PieceGuidesConfig | undefined {\n if (!artboard) return undefined;\n // A SEPARATE-mode printable (slides Left/Right, one print file per area)\n // synthesizes one full-frame piece per placement — identical boxes\n // stacked at (0,0). An artboard named for one of those placements draws\n // ITS piece only: both stacked pieces would double-paint the bleed wash\n // (ADR-0101 §6). Any other bundle (a real spread) draws every piece.\n const { pieces } = bundle.config;\n const stacked =\n pieces.length > 1 &&\n pieces.every(\n (p) => p.x === 0 && p.y === 0 && p.width === bundle.artboardWidth && p.height === bundle.artboardHeight,\n );\n if (stacked && artboard.name && pieces.some((p) => p.id === artboard.name)) {\n if (artboard.width === bundle.artboardWidth && artboard.height === bundle.artboardHeight) {\n return { ...bundle.config, pieces: pieces.filter((p) => p.id === artboard.name) };\n }\n }\n if (artboard.width !== bundle.artboardWidth || artboard.height !== bundle.artboardHeight) {\n if (typeof process !== 'undefined' && process.env?.NODE_ENV !== 'production') {\n console.warn(\n `[RealtimeEmbed] This product has printable-area guides (authored at ` +\n `${bundle.artboardWidth}×${bundle.artboardHeight}), but the design's artboard is ` +\n `${artboard.width}×${artboard.height} — the dead-zone overlay is skipped because the ` +\n `coordinates wouldn't line up. Author the design at the placement's dimensions to get it.`,\n );\n }\n return undefined;\n }\n return bundle.config;\n}\n\n/**\n * Fetch the piece-guide bundle for a variant (gvid). Returns null while\n * loading, when `gvid` is undefined, and on any error (silent degrade).\n */\nexport function usePieceGuideBundle(\n gvid: string | undefined,\n apiBase: string = PIECE_GUIDES_API_BASE,\n): PieceGuideBundle | null {\n const [bundle, setBundle] = useState<PieceGuideBundle | null>(null);\n\n useEffect(() => {\n if (!gvid) {\n setBundle(null);\n return;\n }\n let cancelled = false;\n fetch(`${apiBase}/printables/by-gvid/${encodeURIComponent(gvid)}/piece-guides`)\n .then(async (res) => {\n if (!res.ok) throw new Error(`status ${res.status}`);\n return (await res.json()) as RawPieceGuidesResponse;\n })\n .then((raw) => {\n if (!cancelled) setBundle(transformPieceGuides(raw));\n })\n .catch(() => {\n // No guides is a degraded state, not a failure — the editor keeps\n // working, the overlay just doesn't appear.\n if (!cancelled) setBundle(null);\n });\n return () => {\n cancelled = true;\n };\n }, [gvid, apiBase]);\n\n return bundle;\n}\n"],"names":["PIECE_GUIDES_API_BASE","SNOWCONE_HOSTS","transformPieceGuides","raw","pieces","p","pieceGuidesForArtboard","bundle","artboard","process","usePieceGuideBundle","gvid","apiBase","setBundle","useState","useEffect","cancelled","res"],"mappings":";;;AA8BO,MAAMA,IAAgCC,EAAe;AAgCrD,SAASC,EAAqBC,GAA+C;AAClF,QAAMC,IAAoCD,EAAI,OAAO,IAAI,CAACE,OAAO;AAAA,IAC/D,IAAIA,EAAE;AAAA,IACN,GAAGA,EAAE;AAAA,IACL,GAAGA,EAAE;AAAA,IACL,OAAOA,EAAE;AAAA,IACT,QAAQA,EAAE;AAAA,IACV,UAAU,OAAOA,EAAE,YAAa,WAAWA,EAAE,WAAW;AAAA;AAAA,IAExD,cAAc,OAAOA,EAAE,gBAAiB,WAAWA,EAAE,eAAe;AAAA,IACpE,eAAe,OAAOA,EAAE,iBAAkB,WAAWA,EAAE,gBAAgB;AAAA,IACvE,iBACE,OAAOA,EAAE,uBAAwB,YAAYA,EAAE,sBAAsB,IACjEA,EAAE,sBAAsBF,EAAI,cAC5B;AAAA,EAAA,EACN;AACF,SAAO;AAAA,IACL,eAAeA,EAAI;AAAA,IACnB,gBAAgBA,EAAI;AAAA,IACpB,QAAQ;AAAA,MACN,QAAAC;AAAA,MACA,QAAQD,EAAI,eAAe,CAAA;AAAA,MAC3B,OAAOA,EAAI;AAAA,IAAA;AAAA,EACb;AAEJ;AASO,SAASG,EACdC,GACAC,GAC+B;;AAC/B,MAAI,CAACA,EAAU;AAMf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C,EACA,MAAM,MAAM;AAGX,MAAKa,KAAWH,EAAU,IAAI;AAAA,IAChC,CAAC,GACI,MAAM;AACX,MAAAG,IAAY;AAAA,IACd;AAAA,EACF,GAAG,CAACL,GAAMC,CAAO,CAAC,GAEXL;AACT;"}
1
+ {"version":3,"file":"usePieceGuideBundle-DJfjOVEd.js","sources":["../src/components/embed-realtime/usePieceGuideBundle.ts"],"sourcesContent":["'use client';\n\n/**\n * usePieceGuideBundle — fetch a product's printable-area guides for the embed.\n *\n * Some products hide part of the print file under hardware (a phone case's\n * camera module, a notebook's spine). snowcone.app's own editor draws the\n * printable-area / dead-zone overlay from the product's piece guides;\n * `<RealtimeEmbed>` uses this hook so embedders get the same overlay with\n * zero config — without it, a buyer can edit artwork the mockup will never\n * show, with no signal anywhere (#566).\n *\n * The endpoint is a public read (geometry only — piece rects, safe areas,\n * authored guides; same exposure class as the public catalog). Errors degrade\n * silently to \"no guides\": the editor keeps working, the overlay just doesn't\n * appear — same posture as snowcone.app's own loader.\n *\n * @module\n */\n\nimport { useEffect, useState } from 'react';\nimport { SNOWCONE_HOSTS } from '@snowcone-app/sdk';\nimport type { PieceGuidesConfig } from '../embed/SnowconeCanvas.js';\nimport type {\n PieceGuide,\n PieceGuideRendererPiece,\n PieceGuideRendererStyle,\n} from '../../rendering/PieceGuideRenderer.js';\n\n/** Backend base hosting `GET /printables/by-gvid/:gvid/piece-guides`. */\nexport const PIECE_GUIDES_API_BASE: string = SNOWCONE_HOSTS.api;\n\n/** Wire shape of the piece-guides endpoint (the consumer-safe subset). */\ninterface RawPieceGuidesResponse {\n artboardWidth: number;\n artboardHeight: number;\n /** Inches→px conversion factor for `safeAreaInsetInches`. */\n templateDpi: number;\n pieces: Array<{\n id: string;\n x: number;\n y: number;\n width: number;\n height: number;\n rotation?: number;\n naturalWidth?: number;\n naturalHeight?: number;\n safeAreaInsetInches?: number;\n }>;\n pieceGuides?: Record<string, PieceGuide>;\n pieceGuidesStyle?: PieceGuideRendererStyle;\n}\n\n/** A fetched bundle: the overlay config plus the artboard frame it was authored in. */\nexport interface PieceGuideBundle {\n /** The print-file frame the piece coords live in. */\n artboardWidth: number;\n artboardHeight: number;\n config: PieceGuidesConfig;\n}\n\n/** Convert the wire response into a renderer-ready bundle (inches → px, etc.). */\nexport function transformPieceGuides(raw: RawPieceGuidesResponse): PieceGuideBundle {\n const pieces: PieceGuideRendererPiece[] = raw.pieces.map((p) => ({\n id: p.id,\n x: p.x,\n y: p.y,\n width: p.width,\n height: p.height,\n rotation: typeof p.rotation === 'number' ? p.rotation : undefined,\n // natural (unrotated) size — required at non-right angles (a bandana's 45° folded view)\n naturalWidth: typeof p.naturalWidth === 'number' ? p.naturalWidth : undefined,\n naturalHeight: typeof p.naturalHeight === 'number' ? p.naturalHeight : undefined,\n safeAreaInsetPx:\n typeof p.safeAreaInsetInches === 'number' && p.safeAreaInsetInches > 0\n ? p.safeAreaInsetInches * raw.templateDpi\n : undefined,\n }));\n return {\n artboardWidth: raw.artboardWidth,\n artboardHeight: raw.artboardHeight,\n config: {\n pieces,\n guides: raw.pieceGuides ?? {},\n style: raw.pieceGuidesStyle,\n },\n };\n}\n\n/**\n * Gate the bundle on the design's artboard matching the print-file frame the\n * guides were authored in — the same gate snowcone.app's editor applies. A\n * design authored at other dims would render the overlay misaligned, so it's\n * skipped (with a dev hint, since the fix — author at the placement's dims —\n * is on the embedder's side).\n */\nexport function pieceGuidesForArtboard(\n bundle: PieceGuideBundle,\n artboard: { width: number; height: number; name?: string } | undefined,\n): PieceGuidesConfig | undefined {\n if (!artboard) return undefined;\n // A SEPARATE-mode printable (slides Left/Right, one print file per area)\n // synthesizes one full-frame piece per placement — identical boxes\n // stacked at (0,0). An artboard named for one of those placements draws\n // ITS piece only: both stacked pieces would double-paint the bleed wash\n // (ADR-0101 §6). Any other bundle (a real spread) draws every piece.\n const { pieces } = bundle.config;\n const stacked =\n pieces.length > 1 &&\n pieces.every(\n (p) => p.x === 0 && p.y === 0 && p.width === bundle.artboardWidth && p.height === bundle.artboardHeight,\n );\n if (stacked && artboard.name && pieces.some((p) => p.id === artboard.name)) {\n if (artboard.width === bundle.artboardWidth && artboard.height === bundle.artboardHeight) {\n return { ...bundle.config, pieces: pieces.filter((p) => p.id === artboard.name) };\n }\n }\n if (artboard.width !== bundle.artboardWidth || artboard.height !== bundle.artboardHeight) {\n if (typeof process !== 'undefined' && process.env?.NODE_ENV !== 'production') {\n console.warn(\n `[RealtimeEmbed] This product has printable-area guides (authored at ` +\n `${bundle.artboardWidth}×${bundle.artboardHeight}), but the design's artboard is ` +\n `${artboard.width}×${artboard.height} — the dead-zone overlay is skipped because the ` +\n `coordinates wouldn't line up. Author the design at the placement's dimensions to get it.`,\n );\n }\n return undefined;\n }\n return bundle.config;\n}\n\n/**\n * Fetch the piece-guide bundle for a variant (gvid). Returns null while\n * loading, when `gvid` is undefined, and on any error (silent degrade).\n */\nexport function usePieceGuideBundle(\n gvid: string | undefined,\n apiBase: string = PIECE_GUIDES_API_BASE,\n): PieceGuideBundle | null {\n const [bundle, setBundle] = useState<PieceGuideBundle | null>(null);\n\n useEffect(() => {\n if (!gvid) {\n setBundle(null);\n return;\n }\n let cancelled = false;\n fetch(`${apiBase}/printables/by-gvid/${encodeURIComponent(gvid)}/piece-guides`)\n .then(async (res) => {\n if (!res.ok) throw new Error(`status ${res.status}`);\n return (await res.json()) as RawPieceGuidesResponse;\n })\n .then((raw) => {\n if (!cancelled) setBundle(transformPieceGuides(raw));\n })\n .catch(() => {\n // No guides is a degraded state, not a failure — the editor keeps\n // working, the overlay just doesn't appear.\n if (!cancelled) setBundle(null);\n });\n return () => {\n cancelled = true;\n };\n }, [gvid, apiBase]);\n\n return bundle;\n}\n"],"names":["PIECE_GUIDES_API_BASE","SNOWCONE_HOSTS","transformPieceGuides","raw","pieces","p","pieceGuidesForArtboard","bundle","artboard","process","usePieceGuideBundle","gvid","apiBase","setBundle","useState","useEffect","cancelled","res"],"mappings":";;;AA8BO,MAAMA,IAAgCC,EAAe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,WAAWD,EAAO,gBAAgB;AACxF,IAAI,OAAOE,IAAY,SAAeA,IAAAA,EAAQ,QAARA,gBAAAA,EAAa,cAAa,gBAC9D,QAAQ;AAAA,MACN,uEACKF,EAAO,aAAa,IAAIA,EAAO,cAAc,mCAC7CC,EAAS,KAAK,IAAIA,EAAS,MAAM;AAAA,IAAA;AAI1C;AAAA,EACF;AACA,SAAOD,EAAO;AAChB;AAMO,SAASG,EACdC,GACAC,IAAkBZ,GACO;AACzB,QAAM,CAACO,GAAQM,CAAS,IAAIC,EAAkC,IAAI;AAElE,SAAAC,EAAU,MAAM;AACd,QAAI,CAACJ,GAAM;AACT,MAAAE,EAAU,IAAI;AACd;AAAA,IACF;AACA,QAAIG,IAAY;AAChB,iBAAM,GAAGJ,CAAO,uBAAuB,mBAAmBD,CAAI,CAAC,eAAe,EAC3E,KAAK,OAAOM,MAAQ;AACnB,UAAI,CAACA,EAAI,GAAI,OAAM,IAAI,MAAM,UAAUA,EAAI,MAAM,EAAE;AACnD,aAAQ,MAAMA,EAAI,KAAA;AAAA,IACpB,CAAC,EACA,KAAK,CAACd,MAAQ;AACb,MAAKa,KAAWH,EAAUX,EAAqBC,CAAG,CAAC;AAAA,IACrD,CAAC,EACA,MAAM,MAAM;AAGX,MAAKa,KAAWH,EAAU,IAAI;AAAA,IAChC,CAAC,GACI,MAAM;AACX,MAAAG,IAAY;AAAA,IACd;AAAA,EACF,GAAG,CAACL,GAAMC,CAAO,CAAC,GAEXL;AACT;"}
@@ -1,19 +1,6 @@
1
1
  import { EditorError } from '../errors/editorError.js';
2
- /**
3
- * A custom (brand) font dependency of a design. Stored in
4
- * `CanvasStateV1.customFonts`; `url` must be a plain-CORS-GET-fetchable
5
- * font binary (woff2/woff/ttf/otf) — the export worker fetches it too.
6
- */
7
- export interface CustomFont {
8
- /** Family name, registered as-is (see the shadowing contract above). */
9
- family: string;
10
- /** Host-stored font binary URL (must allow cross-origin GET). */
11
- url: string;
12
- /** CSS font-weight the file provides. Defaults to 400. */
13
- weight?: number;
14
- /** CSS font-style the file provides. Defaults to 'normal'. */
15
- style?: 'normal' | 'italic';
16
- }
2
+ import { CustomFont } from '@snowcone-app/design';
3
+ export type { CustomFont };
17
4
  type RegistryListener = () => void;
18
5
  /**
19
6
  * Runtime registry of custom fonts — the resolution authority for the
@@ -96,4 +83,3 @@ export declare function loadCustomFontFaces(fonts: readonly CustomFont[], fontFa
96
83
  export declare function ensureCustomFontsLoaded(fonts: readonly CustomFont[], options?: LoadCustomFontOptions & {
97
84
  onLoadError?: (error: EditorError, font: CustomFont) => void;
98
85
  }): Promise<void>;
99
- export {};
@@ -1,17 +1,17 @@
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-5tHC6s0Y.js";
5
- import { b as is, x as or, z as $s, A as Fs, e as Ds, q as Xr, c as Yr, v as Lr } from "./design-builder-sH53Og6j.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-F-b_SwW-.js";
7
- import { I as Lt, G as Re, bb as Ns, x as bs, ah as dr, bc as Ws, bd as jr, a2 as En, be as Zr, bf as us, P as kn, c as Xn, a7 as en, a5 as ms, bg as Jr, T as Qe, u as Qr, bh as es, bi as eo, bj as to, bk as no, a6 as ur, a4 as so, bl as ks, a3 as ro, g as oo, S as ts, az as io, z as On } from "./FontAnalyzer-Ds3Wdba7.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-Dmo86Wd2.js";
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";
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-B8BADU_r.js";
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
10
  import { u as yo } from "./ThemeContext-Rjz25x9X.js";
11
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-DQRp8GhF.js";
12
+ import { L as It, S as pr, T as zt, I as vo } from "./custom-icons-Dt0Y4VSn.js";
13
13
  import * as ss from "@radix-ui/react-radio-group";
14
- import { S as Co, U as Us, V as Gs } from "./ExportManager-xRsXgyNo.js";
14
+ import { S as Co, U as Us, V as Gs } from "./ExportManager-DEJgxB0S.js";
15
15
  import { cva as mr } from "class-variance-authority";
16
16
  import { debounce as qs } from "lodash-es";
17
17
  const wo = {
@@ -5677,12 +5677,12 @@ async function rc() {
5677
5677
  ] = await Promise.all([
5678
5678
  Promise.resolve().then(() => Ea),
5679
5679
  Promise.resolve().then(() => Ra),
5680
- import("./ImagePanel-bW3yr6Ac.js"),
5680
+ import("./ImagePanel-4fHABjNT.js"),
5681
5681
  Promise.resolve().then(() => Pa),
5682
5682
  Promise.resolve().then(() => Da),
5683
- import("./ContextualToolbars-5tHC6s0Y.js").then((c) => c.s),
5683
+ import("./ContextualToolbars-Dmo86Wd2.js").then((c) => c.s),
5684
5684
  Promise.resolve().then(() => Na),
5685
- import("./ContextualToolbars-5tHC6s0Y.js").then((c) => c.r)
5685
+ import("./ContextualToolbars-Dmo86Wd2.js").then((c) => c.r)
5686
5686
  ]);
5687
5687
  Pt("effects-panel", {
5688
5688
  component: e,
@@ -8730,4 +8730,4 @@ export {
8730
8730
  sc as u,
8731
8731
  uc as v
8732
8732
  };
8733
- //# sourceMappingURL=validation-hn5ZX8Po.js.map
8733
+ //# sourceMappingURL=validation-au_-Sj-A.js.map