@snowcone-app/canvas 0.46.10 → 0.46.11

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 (50) hide show
  1. package/dist/{CanvasRenderer-CmIQSVCK.js → CanvasRenderer-CLL5V71e.js} +4 -4
  2. package/dist/{CanvasRenderer-CmIQSVCK.js.map → CanvasRenderer-CLL5V71e.js.map} +1 -1
  3. package/dist/{ContextualToolbars-BG90V6-s.js → ContextualToolbars-DnsfOy7x.js} +138 -137
  4. package/dist/ContextualToolbars-DnsfOy7x.js.map +1 -0
  5. package/dist/{EditorCanvasImpl-C7y7UNl1.js → EditorCanvasImpl-DDBa3pvE.js} +8 -8
  6. package/dist/{EditorCanvasImpl-C7y7UNl1.js.map → EditorCanvasImpl-DDBa3pvE.js.map} +1 -1
  7. package/dist/ExportManager-BR5uca6R.js +5579 -0
  8. package/dist/ExportManager-BR5uca6R.js.map +1 -0
  9. package/dist/{ImagePanel-BaEJnUvS.js → ImagePanel-Bez-5INu.js} +6 -6
  10. package/dist/{ImagePanel-BaEJnUvS.js.map → ImagePanel-Bez-5INu.js.map} +1 -1
  11. package/dist/{SnowconeCanvas-C6FmL0pj.js → SnowconeCanvas-Cjnp1ztd.js} +10 -10
  12. package/dist/{SnowconeCanvas-C6FmL0pj.js.map → SnowconeCanvas-Cjnp1ztd.js.map} +1 -1
  13. package/dist/advanced.mjs +16 -16
  14. package/dist/{compose-Ce53EW1v.js → compose-CZslfDUm.js} +3 -3
  15. package/dist/{compose-Ce53EW1v.js.map → compose-CZslfDUm.js.map} +1 -1
  16. package/dist/constants.d.ts +0 -1
  17. package/dist/{custom-icons-BA-MX7Y2.js → custom-icons-DIqddGX1.js} +2 -2
  18. package/dist/{custom-icons-BA-MX7Y2.js.map → custom-icons-DIqddGX1.js.map} +1 -1
  19. package/dist/{design-builder-HKRo18WT.js → design-builder-CCPB3WRx.js} +4 -4
  20. package/dist/design-builder-CCPB3WRx.js.map +1 -0
  21. package/dist/{embed-CYlEe_Xv.js → embed-BydDaNDy.js} +9 -9
  22. package/dist/{embed-CYlEe_Xv.js.map → embed-BydDaNDy.js.map} +1 -1
  23. package/dist/embed.mjs +6 -6
  24. package/dist/{export-worker.bundle.string-CyMb_XjB.js → export-worker.bundle.string-DG2f-C1t.js} +1490 -1487
  25. package/dist/{export-worker.bundle.string-CyMb_XjB.js.map → export-worker.bundle.string-DG2f-C1t.js.map} +1 -1
  26. package/dist/{FontAnalyzer-CLMJi2Sw.js → fontAnalysisCache-B2lh7X-_.js} +1408 -3329
  27. package/dist/fontAnalysisCache-B2lh7X-_.js.map +1 -0
  28. package/dist/{guards-Dk86a-kH.js → guards-2oykBUel.js} +2 -2
  29. package/dist/{guards-Dk86a-kH.js.map → guards-2oykBUel.js.map} +1 -1
  30. package/dist/index.mjs +9 -9
  31. package/dist/internals.mjs +5 -5
  32. package/dist/{template-fields-3CH15MFC.js → template-fields-cNoo8zDC.js} +6 -6
  33. package/dist/template-fields-cNoo8zDC.js.map +1 -0
  34. package/dist/testing.mjs +3 -3
  35. package/dist/{useCommands-C6nE770t.js → useCommands-mpsd0_l5.js} +17 -17
  36. package/dist/{useCommands-C6nE770t.js.map → useCommands-mpsd0_l5.js.map} +1 -1
  37. package/dist/{usePieceGuideBundle-DJfjOVEd.js → usePieceGuideBundle-BuxwVcb5.js} +2 -2
  38. package/dist/{usePieceGuideBundle-DJfjOVEd.js.map → usePieceGuideBundle-BuxwVcb5.js.map} +1 -1
  39. package/dist/utils/fontAnalysisCache.d.ts +14 -0
  40. package/dist/{validation-C3FHoCbQ.js → validation-DjdrFk2P.js} +11 -11
  41. package/dist/{validation-C3FHoCbQ.js.map → validation-DjdrFk2P.js.map} +1 -1
  42. package/dist/workers/export-worker.bundle.string.d.ts +1 -1
  43. package/example/package.json +1 -1
  44. package/package.json +4 -4
  45. package/dist/ContextualToolbars-BG90V6-s.js.map +0 -1
  46. package/dist/ExportManager-DEJgxB0S.js +0 -3647
  47. package/dist/ExportManager-DEJgxB0S.js.map +0 -1
  48. package/dist/FontAnalyzer-CLMJi2Sw.js.map +0 -1
  49. package/dist/design-builder-HKRo18WT.js.map +0 -1
  50. package/dist/template-fields-3CH15MFC.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { p as a } from "./FontAnalyzer-CLMJi2Sw.js";
1
+ import { p as a } from "./fontAnalysisCache-B2lh7X-_.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-DJfjOVEd.js.map
69
+ //# sourceMappingURL=usePieceGuideBundle-BuxwVcb5.js.map
@@ -1 +1 @@
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;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,QAAM,EAAE,QAAAJ,MAAWG,EAAO;AAM1B,MAJEH,EAAO,SAAS,KAChBA,EAAO;AAAA,IACL,CAACC,MAAMA,EAAE,MAAM,KAAKA,EAAE,MAAM,KAAKA,EAAE,UAA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AAC,GAEXL;AACT;"}
1
+ {"version":3,"file":"usePieceGuideBundle-BuxwVcb5.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,GA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A,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;"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Dropping what FontAnalyzer parsed for a font, without loading FontAnalyzer (and the font catalogue it reads).
3
+ *
4
+ * The element hooks clear a font's parsed data when an element's font changes. They used to import FontAnalyzer for
5
+ * that one call, which put it (and the whole Google Fonts catalogue) into every editor bundle, a text-field widget too
6
+ * (ADR-0115 step 3). FontAnalyzer registers its own clear here when it loads; before it loads, nothing is parsed, so
7
+ * there is nothing to clear.
8
+ */
9
+ type Clear = (fontFamily?: string, weight?: number) => void;
10
+ /** FontAnalyzer's own clear (called once, by FontAnalyzer when it loads). */
11
+ export declare function registerFontAnalysisClear(fn: Clear): void;
12
+ /** Drops what FontAnalyzer parsed for `fontFamily` (all fonts without one). Nothing to drop until it has loaded. */
13
+ export declare function clearFontAnalysis(fontFamily?: string, weight?: number): void;
14
+ export {};
@@ -1,16 +1,16 @@
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-BG90V6-s.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, c as Hr, s as _r, u as ar, a as Vn, v as Qt, I as Xe, i as Fe, J as $r, G as Fr, H as Wr, F as Vr, W as Kr, T as un, q as hn, r as fn, B as Ct, Y as Ur, Z as Gr, _ as qr, D as cr, k as jr, d as lr } from "./useCommands-C6nE770t.js";
7
- import { I as Lt, G as Re, b5 as Ns, v as bs, ad as dr, b6 as Ws, b7 as Zr, _ as En, b8 as Jr, b9 as us, P as kn, c as Xn, a3 as en, a1 as ms, ba as Qr, T as Qe, t as eo, bb as es, bc as to, bd as no, be as so, a2 as ur, a0 as ro, bf as ks, $ as oo, g as io, S as ts, av as ao, K as On } from "./FontAnalyzer-CLMJi2Sw.js";
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-DnsfOy7x.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-CCPB3WRx.js";
6
+ import { l as ir, c as Hr, s as _r, u as ar, a as Vn, v as Qt, I as Xe, i as Fe, J as $r, G as Fr, H as Wr, F as Vr, W as Kr, T as un, q as hn, r as fn, B as Ct, Y as Ur, Z as Gr, _ as qr, D as cr, k as jr, d as lr } from "./useCommands-mpsd0_l5.js";
7
+ import { I as Lt, G as Re, b4 as Ns, v as bs, ad as dr, b5 as Ws, b6 as Zr, _ as En, b7 as Jr, b8 as us, P as kn, c as Xn, a3 as en, a1 as ms, b9 as Qr, T as Qe, t as eo, ba as es, bb as to, bc as no, bd as so, a2 as ur, a0 as ro, be as ks, $ as oo, g as io, S as ts, av as ao } from "./fontAnalysisCache-B2lh7X-_.js";
8
8
  import { createPortal as hr } from "react-dom";
9
- import { b as co, n as fr, g as Fn, c as lo, r as uo, d as ho, t as fo, C as Vs, e as Ks, f as gs, T as po, a as mo, A as go, S as xo, I as yo } from "./CanvasRenderer-CmIQSVCK.js";
9
+ import { b as co, n as fr, g as Fn, c as lo, r as uo, d as ho, t as fo, C as Vs, e as Ks, f as gs, T as po, a as mo, A as go, S as xo, I as yo } from "./CanvasRenderer-CLL5V71e.js";
10
10
  import { u as bo } from "./ThemeContext-Rjz25x9X.js";
11
- import { L as It, S as pr, T as zt, I as vo } from "./custom-icons-BA-MX7Y2.js";
11
+ import { L as It, S as pr, T as zt, I as vo } from "./custom-icons-DIqddGX1.js";
12
12
  import * as ss from "@radix-ui/react-radio-group";
13
- import { S as Co, U as Us, V as Gs } from "./ExportManager-DEJgxB0S.js";
13
+ import { U as Co, V as Us, X as Gs, a1 as On } from "./ExportManager-BR5uca6R.js";
14
14
  import { cva as mr } from "class-variance-authority";
15
15
  import { debounce as qs } from "lodash-es";
16
16
  const wo = {
@@ -5673,12 +5673,12 @@ async function sc() {
5673
5673
  ] = await Promise.all([
5674
5674
  Promise.resolve().then(() => Ea),
5675
5675
  Promise.resolve().then(() => Ra),
5676
- import("./ImagePanel-BaEJnUvS.js"),
5676
+ import("./ImagePanel-Bez-5INu.js"),
5677
5677
  Promise.resolve().then(() => Pa),
5678
5678
  Promise.resolve().then(() => Da),
5679
- import("./ContextualToolbars-BG90V6-s.js").then((c) => c.s),
5679
+ import("./ContextualToolbars-DnsfOy7x.js").then((c) => c.s),
5680
5680
  Promise.resolve().then(() => Na),
5681
- import("./ContextualToolbars-BG90V6-s.js").then((c) => c.r)
5681
+ import("./ContextualToolbars-DnsfOy7x.js").then((c) => c.r)
5682
5682
  ]);
5683
5683
  Pt("effects-panel", {
5684
5684
  component: e,
@@ -8726,4 +8726,4 @@ export {
8726
8726
  nc as u,
8727
8727
  dc as v
8728
8728
  };
8729
- //# sourceMappingURL=validation-C3FHoCbQ.js.map
8729
+ //# sourceMappingURL=validation-DjdrFk2P.js.map