@snowcone-app/canvas 0.22.0 → 0.23.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 (30) hide show
  1. package/STYLING_CONTRACT.md +114 -85
  2. package/dist/{EditorCanvasImpl-BH_bKy-F.js → EditorCanvasImpl-Ckg7WO2j.js} +4 -4
  3. package/dist/{EditorCanvasImpl-BH_bKy-F.js.map → EditorCanvasImpl-Ckg7WO2j.js.map} +1 -1
  4. package/dist/{SnowconeCanvas-Cx7nXlBI.js → SnowconeCanvas-D1sLcIja.js} +2 -2
  5. package/dist/{SnowconeCanvas-Cx7nXlBI.js.map → SnowconeCanvas-D1sLcIja.js.map} +1 -1
  6. package/dist/api/embed.d.ts +2 -2
  7. package/dist/design/design-builder.d.ts +67 -12
  8. package/dist/design-builder-2VUjfmdt.js +422 -0
  9. package/dist/design-builder-2VUjfmdt.js.map +1 -0
  10. package/dist/editorErrors-B2mb1sVN.js.map +1 -1
  11. package/dist/{embed-8ecUMMH-.js → embed-DxsaqZJF.js} +4 -4
  12. package/dist/{embed-8ecUMMH-.js.map → embed-DxsaqZJF.js.map} +1 -1
  13. package/dist/embed.mjs +21 -20
  14. package/dist/errors/editorError.d.ts +10 -0
  15. package/dist/hooks/bindingGuards.d.ts +16 -0
  16. package/dist/hooks/useColorBinding.d.ts +2 -1
  17. package/dist/hooks/useFontBinding.d.ts +2 -1
  18. package/dist/hooks/useImageBinding.d.ts +2 -1
  19. package/dist/hooks/useTextBinding.d.ts +2 -1
  20. package/dist/index.mjs +3 -3
  21. package/dist/template-fields-CQ6n2P4V.js +548 -0
  22. package/dist/template-fields-CQ6n2P4V.js.map +1 -0
  23. package/dist/testing/failureFixtures.d.ts +2 -2
  24. package/dist/testing.mjs +1 -1
  25. package/example/package.json +1 -1
  26. package/package.json +1 -1
  27. package/dist/design-builder-CT4DHIPe.js +0 -367
  28. package/dist/design-builder-CT4DHIPe.js.map +0 -1
  29. package/dist/template-fields-C2pSfMBh.js +0 -494
  30. package/dist/template-fields-C2pSfMBh.js.map +0 -1
@@ -364,88 +364,117 @@ stable hooks; `sc:`-prefixed utility classes are internal and NOT contract.
364
364
  <input aria-label=<label> data-sc-layer=<layer-name> data-sc-part="textfield" placeholder=<placeholder> type="text">
365
365
  ```
366
366
 
367
- ## `.sc-root` theming tokens
368
-
369
- Declared on `.sc-root` (applied once by `Editor.Root`); override any of
370
- them on your own wrapper around the Root to retheme every part. Portaled
371
- UI (the floating toolbar) carries its own `.sc-root` wrapper, so overrides
372
- on `:root` or above the widget apply there too.
373
-
374
- | group | token | default |
375
- |---|---|---|
376
- | Semantic Colors | `--color-primary` | `#000000` |
377
- | Semantic Colors | `--color-primary-foreground` | `#ffffff` |
378
- | Semantic Colors | `--color-secondary` | `#f4f4f5` |
379
- | Semantic Colors | `--color-secondary-foreground` | `#18181b` |
380
- | Semantic Colors | `--color-default` | `#f0f0f1` |
381
- | Semantic Colors | `--color-default-foreground` | `#18181b` |
382
- | Semantic Colors | `--color-danger` | `#ef4444` |
383
- | Semantic Colors | `--color-danger-foreground` | `#ffffff` |
384
- | Semantic Colors | `--color-success` | `#22c55e` |
385
- | Semantic Colors | `--color-success-foreground` | `#ffffff` |
386
- | Semantic Colors | `--color-warning` | `#f59e0b` |
387
- | Semantic Colors | `--color-warning-foreground` | `#000000` |
388
- | Layout Colors | `--color-background` | `#f8f8f8` |
389
- | Layout Colors | `--color-foreground` | `#0a0a0a` |
390
- | Layout Colors | `--color-surface` | `#ffffff` |
391
- | Layout Colors | `--color-surface-foreground` | `#0a0a0a` |
392
- | Layout Colors | `--color-muted` | `#f4f4f5` |
393
- | Layout Colors | `--color-muted-foreground` | `#71717a` |
394
- | Layout Colors | `--color-divider` | `#e4e4e7` |
395
- | Layout Colors | `--color-focus` | `#000000` |
396
- | Field/Input Colors | `--color-field` | `#ffffff` |
397
- | Field/Input Colors | `--color-field-foreground` | `#0a0a0a` |
398
- | Field/Input Colors | `--color-field-placeholder` | `#71717a` |
399
- | Field/Input Colors | `--color-field-border` | `transparent` |
400
- | Accent (backward compat) | `--color-accent` | `#000000` |
401
- | Accent (backward compat) | `--color-accent-foreground` | `#ffffff` |
402
- | Shadcn compatibility aliases | `--color-card` | `#ffffff` |
403
- | Shadcn compatibility aliases | `--color-card-foreground` | `#0a0a0a` |
404
- | Shadcn compatibility aliases | `--color-popover` | `#ffffff` |
405
- | Shadcn compatibility aliases | `--color-popover-foreground` | `#0a0a0a` |
406
- | Shadcn compatibility aliases | `--color-border` | `#e4e4e7` |
407
- | Shadcn compatibility aliases | `--color-destructive` | `#ef4444` |
408
- | Shadcn compatibility aliases | `--color-destructive-foreground` | `#ffffff` |
409
- | Shadcn compatibility aliases | `--color-ring` | `#000000` |
410
- | Shadcn compatibility aliases | `--color-input` | `transparent` |
411
- | Overlay/Surface | `--color-overlay` | `#ffffff` |
412
- | Overlay/Surface | `--color-overlay-foreground` | `#0a0a0a` |
413
- | Overlay/Surface | `--shadow-overlay` | `0 8px 30px rgb(0 0 0 / 0.12)` |
414
- | Overlay/Surface | `--shadow-surface` | `0 1px 3px rgb(0 0 0 / 0.1)` |
415
- | Overlay/Surface | `--shadow-soft` | `0 1px 2px rgb(0 0 0 / 0.06), 0 2px 4px rgb(0 0 0 / 0.04)` |
416
- | Semantic Font Families | `--font-family-heading` | `ui-sans-serif, system-ui, sans-serif` |
417
- | Semantic Font Families | `--font-family-body` | `ui-sans-serif, system-ui, sans-serif` |
418
- | Semantic Font Families | `--font-family-label` | `ui-sans-serif, system-ui, sans-serif` |
419
- | Semantic Font Families | `--font-family-button` | `ui-sans-serif, system-ui, sans-serif` |
420
- | Semantic Font Families | `--font-family-caption` | `ui-sans-serif, system-ui, sans-serif` |
421
- | Semantic Font Families | `--font-family-display` | `ui-sans-serif, system-ui, sans-serif` |
422
- | Semantic Font Families | `--font-family-accent` | `ui-sans-serif, system-ui, sans-serif` |
423
- | Semantic Radius | `--radius-button` | `4px` |
424
- | Semantic Radius | `--radius-input` | `4px` |
425
- | Semantic Radius | `--radius-card` | `6px` |
426
- | Semantic Radius | `--radius-modal` | `8px` |
427
- | Semantic Radius | `--radius-badge` | `9999px` |
428
- | Semantic Radius | `--radius-avatar` | `9999px` |
429
- | Semantic Radius | `--radius-tooltip` | `6px` |
430
- | Semantic Radius | `--radius-image` | `4px` |
431
- | Z-index scale | `--z-base` | `1` |
432
- | Z-index scale | `--z-sticky` | `1000` |
433
- | Z-index scale | `--z-dropdown` | `1001` |
434
- | Z-index scale | `--z-drawer` | `10002` |
435
- | Z-index scale | `--z-overlay` | `10001` |
436
- | Z-index scale | `--z-modal` | `10000` |
437
- | Z-index scale | `--z-tooltip` | `2147483647` |
438
- | Z-index scale | `--spacing-xs` | `4px` |
439
- | Z-index scale | `--spacing-sm` | `6px` |
440
- | Z-index scale | `--spacing-md` | `8px` |
441
- | Z-index scale | `--spacing-lg` | `10px` |
442
- | Z-index scale | `--spacing-xl` | `12px` |
443
- | Z-index scale | `--spacing-2xl` | `16px` |
444
- | Z-index scale | `--spacing-3xl` | `20px` |
445
- | Z-index scale | `--spacing-4xl` | `24px` |
446
- | Z-index scale | `--color-text-primary` | `#0a0a0a` |
447
- | Z-index scale | `--color-text-secondary` | `#71717a` |
448
- | Z-index scale | `--color-text-muted` | `#a1a1aa` |
449
- | Z-index scale | `--color-border-primary` | `#e4e4e7` |
450
- | Z-index scale | `--color-border-secondary` | `#f0f0f1` |
451
- | Z-index scale | `--color-border-dark` | `#d4d4d8` |
367
+ ## `.sc-root` theming tokens (the host theming API)
368
+
369
+ The override surface is the UNPREFIXED primitives below (`--foreground`,
370
+ `--surface`, `--accent`, …), declared on `.sc-root` — the element
371
+ `Editor.Root` itself renders as the composition's OUTERMOST wrapper.
372
+ Working recipes:
373
+
374
+ - **Dark host:** put the `dark` class on `<html>` (or any ancestor of the
375
+ Root). The package ships a complete `.dark .sc-root` theme — the `dark`
376
+ column below. Blank = inherits the light value (brand/status colors,
377
+ fonts, radius, spacing are mode-independent). `<html>`-level classes
378
+ also reach body-portaled package UI.
379
+ - **Custom theme:** scope overrides as `.my-brand .sc-root { --foreground: …; }`
380
+ with `class="my-brand"` on an element ABOVE `<Editor.Root/>` (page shell
381
+ or `<html>`). A class on DOM you render INSIDE the Root cannot work —
382
+ the Root's own `.sc-root` wraps your markup, so `.my-brand .sc-root`
383
+ matches nothing there.
384
+ - **Portal caveat:** package UI portaled to `<body>` (the floating
385
+ toolbar) carries its own `.sc-root` outside any page-shell wrapper —
386
+ `<html>`-level classes reach it; a page-shell wrapper does not.
387
+
388
+ NOT the API: `--color-*` (Tailwind `@theme` utility-generation defaults)
389
+ and `--sc-color-*` (emitted plumbing that `.sc-root` re-points at the
390
+ primitives). Overriding those does nothing. Earlier versions of this
391
+ document listed the `@theme` defaults here in error.
392
+
393
+ | group | token | default | dark |
394
+ |---|---|---|---|
395
+ | Primitive colors | `--white` | `oklch(100% 0 0)` | |
396
+ | Primitive colors | `--black` | `oklch(0% 0 0)` | |
397
+ | Primitive colors | `--snow` | `oklch(0.9911 0 0)` | |
398
+ | Primitive colors | `--eclipse` | `oklch(0.2103 0.0059 285.89)` | |
399
+ | Primary / Accent — HeroUI default blue | `--accent` | `oklch(0.6204 0.195 253.83)` | |
400
+ | Primary / Accent — HeroUI default blue | `--accent-foreground` | `var(--snow)` | |
401
+ | Primary / Accent — HeroUI default blue | `--primary` | `var(--accent)` | |
402
+ | Primary / Accent — HeroUI default blue | `--primary-foreground` | `var(--accent-foreground)` | |
403
+ | Secondary | `--secondary` | `oklch(0.45 0.0 0)` | |
404
+ | Secondary | `--secondary-foreground` | `var(--eclipse)` | |
405
+ | Default — Neutral elements | `--default` | `oklch(94% 0.001 286.375)` | `oklch(27.4% 0.006 286.033)` |
406
+ | Default — Neutral elements | `--default-foreground` | `var(--eclipse)` | `var(--snow)` |
407
+ | Default — Neutral elements | `--color-default-on-surface` | `oklch(90% 0.006 265)` | `oklch(30% 0.006 265)` |
408
+ | Status colors | `--success` | `oklch(0.7329 0.1935 150.81)` | |
409
+ | Status colors | `--success-foreground` | `var(--eclipse)` | |
410
+ | Status colors | `--warning` | `oklch(0.7819 0.1585 72.33)` | |
411
+ | Status colors | `--warning-foreground` | `var(--eclipse)` | |
412
+ | Status colors | `--danger` | `oklch(0.6532 0.2328 25.74)` | |
413
+ | Status colors | `--danger-foreground` | `var(--snow)` | |
414
+ | Layout colors | `--background` | `oklch(0.9607 0 0)` | `oklch(0.07 0.002 270)` |
415
+ | Layout colors | `--foreground` | `var(--eclipse)` | `var(--snow)` |
416
+ | Layout colors | `--muted` | `oklch(0.5517 0.0138 285.94)` | `oklch(70.5% 0.015 286.067)` |
417
+ | Layout colors | `--muted-foreground` | `oklch(from var(--foreground) l c h / 0.6)` | `oklch(from var(--foreground) l c h / 0.6)` |
418
+ | Layout colors | `--divider` | `oklch(92% 0.004 286.32)` | `oklch(32% 0.006 286.033)` |
419
+ | Layout colors | `--focus` | `var(--accent)` | |
420
+ | Surface | `--surface` | `var(--white)` | `oklch(0.2103 0.0059 285.89)` |
421
+ | Surface | `--surface-foreground` | `var(--foreground)` | `var(--foreground)` |
422
+ | Surface | `--surface-shadow` | `0 2px 4px 0 rgba(0, 0, 0, 0.04), 0 1px 2px 0 rgba(0, 0, 0, 0.06), 0 0 1px 0 rgba(0, 0, 0, 0.06)` | `0 0 0 0 transparent inset` |
423
+ | Overlay | `--overlay` | `var(--white)` | `oklch(0.22 0.0059 285.89)` |
424
+ | Overlay | `--overlay-foreground` | `var(--foreground)` | `var(--foreground)` |
425
+ | Overlay | `--overlay-shadow` | `0 4px 16px 0 rgba(24, 24, 27, 0.08), 0 8px 24px 0 rgba(24, 24, 27, 0.09)` | `0 0 0 0 transparent inset` |
426
+ | Fields/Inputs | `--field` | `var(--white)` | `var(--default)` |
427
+ | Fields/Inputs | `--field-foreground` | `var(--eclipse)` | `var(--foreground)` |
428
+ | Fields/Inputs | `--field-placeholder` | `var(--muted)` | |
429
+ | Fields/Inputs | `--field-border` | `transparent` | `transparent` |
430
+ | Fields/Inputs | `--color-field-on-surface` | `oklch(96% 0.006 265)` | `oklch(25% 0.006 265)` |
431
+ | Shadows | `--shadow-color-sm` | `rgba(0, 0, 0, 0.06)` | `rgba(0, 0, 0, 0.2)` |
432
+ | Shadows | `--shadow-color-md` | `rgba(0, 0, 0, 0.08)` | `rgba(0, 0, 0, 0.25)` |
433
+ | Shadows | `--shadow-color-lg` | `rgba(0, 0, 0, 0.1)` | `rgba(0, 0, 0, 0.3)` |
434
+ | Shadows | `--shadow-color-tooltip` | `rgba(0, 0, 0, 0.1)` | `rgba(0, 0, 0, 0.3)` |
435
+ | Shadows | `--shadow-color-hover` | `rgba(0, 0, 0, 0.08)` | `rgba(0, 0, 0, 0.2)` |
436
+ | Fonts | `--font-heading` | `ui-sans-serif, system-ui, sans-serif` | |
437
+ | Fonts | `--font-body` | `ui-sans-serif, system-ui, sans-serif` | |
438
+ | Fonts | `--font-label` | `var(--font-body)` | |
439
+ | Fonts | `--font-button` | `var(--font-body)` | |
440
+ | Fonts | `--font-caption` | `var(--font-body)` | |
441
+ | Fonts | `--font-display` | `var(--font-heading)` | |
442
+ | Fonts | `--font-accent` | `var(--font-heading)` | |
443
+ | Font weights | `--font-weight-body` | `400` | |
444
+ | Font weights | `--font-weight-heading` | `600` | |
445
+ | Font weights | `--font-weight-button` | `500` | |
446
+ | Font weights | `--font-weight-label` | `500` | |
447
+ | Font weights | `--font-weight-caption` | `400` | |
448
+ | Font weights | `--font-weight-display` | `700` | |
449
+ | Semantic radius roles → map to primitives | `--radius-semantic-button` | `var(--radius-md, 4px)` | |
450
+ | Semantic radius roles → map to primitives | `--radius-semantic-input` | `var(--radius-md, 4px)` | |
451
+ | Semantic radius roles → map to primitives | `--radius-semantic-card` | `var(--radius-lg, 6px)` | |
452
+ | Semantic radius roles → map to primitives | `--radius-semantic-modal` | `var(--radius-xl, 8px)` | |
453
+ | Semantic radius roles → map to primitives | `--radius-semantic-badge` | `var(--radius-full, 9999px)` | |
454
+ | Semantic radius roles → map to primitives | `--radius-semantic-avatar` | `var(--radius-full, 9999px)` | |
455
+ | Semantic radius roles → map to primitives | `--radius-semantic-tooltip` | `var(--radius-lg, 6px)` | |
456
+ | Semantic radius roles → map to primitives | `--radius-semantic-image` | `var(--radius-md, 4px)` | |
457
+ | Radius primitives (fallbacks for tokens.css) | `--radius-sm` | `2px` | |
458
+ | Radius primitives (fallbacks for tokens.css) | `--radius-md` | `4px` | |
459
+ | Radius primitives (fallbacks for tokens.css) | `--radius-lg` | `6px` | |
460
+ | Radius primitives (fallbacks for tokens.css) | `--radius-xl` | `8px` | |
461
+ | Radius primitives (fallbacks for tokens.css) | `--radius-2xl` | `12px` | |
462
+ | Radius primitives (fallbacks for tokens.css) | `--radius-3xl` | `20px` | |
463
+ | Radius primitives (fallbacks for tokens.css) | `--radius-full` | `9999px` | |
464
+ | Spacing (fallbacks for tokens.css) | `--space-xs` | `4px` | |
465
+ | Spacing (fallbacks for tokens.css) | `--space-sm` | `6px` | |
466
+ | Spacing (fallbacks for tokens.css) | `--space-md` | `8px` | |
467
+ | Spacing (fallbacks for tokens.css) | `--space-lg` | `10px` | |
468
+ | Spacing (fallbacks for tokens.css) | `--space-xl` | `12px` | |
469
+ | Spacing (fallbacks for tokens.css) | `--space-2xl` | `16px` | |
470
+ | Spacing (fallbacks for tokens.css) | `--space-3xl` | `20px` | |
471
+ | Spacing (fallbacks for tokens.css) | `--space-4xl` | `24px` | |
472
+ | Transitions | `--transition-fast` | `0.1s ease` | |
473
+ | Transitions | `--transition-base` | `0.15s ease` | |
474
+ | Opacity | `--opacity-disabled` | `0.3` | |
475
+ | Opacity | `--opacity-muted` | `0.5` | |
476
+ | Canvas background | `--color-canvas-bg` | `#f5f5f5` | `#080809` |
477
+ | Legacy tokens.css shorthand aliases used by embed components | `--text-primary` | `var(--foreground)` | `var(--foreground)` |
478
+ | Legacy tokens.css shorthand aliases used by embed components | `--text-secondary` | `var(--muted-foreground)` | `var(--muted-foreground)` |
479
+ | Legacy tokens.css shorthand aliases used by embed components | `--bg-primary` | `var(--surface)` | `var(--surface)` |
480
+ | Legacy tokens.css shorthand aliases used by embed components | `--bg-secondary` | `var(--background)` | `var(--background)` |
@@ -1,9 +1,9 @@
1
1
  import { jsx as m, jsxs as R, Fragment as $ } from "react/jsx-runtime";
2
2
  import { forwardRef as j, useContext as E, useSyncExternalStore as D, useMemo as G, useRef as y, useLayoutEffect as I } from "react";
3
- import { S as N } from "./SnowconeCanvas-Cx7nXlBI.js";
3
+ import { S as N } from "./SnowconeCanvas-D1sLcIja.js";
4
4
  import { d as U } from "./ContextualToolbars-BDEt9ND0.js";
5
- import { s as V } from "./design-builder-CT4DHIPe.js";
6
- import { u as k } from "./embed-8ecUMMH-.js";
5
+ import { s as V } from "./design-builder-2VUjfmdt.js";
6
+ import { u as k } from "./embed-DxsaqZJF.js";
7
7
  import { c as z, b as L } from "./editorErrors-B2mb1sVN.js";
8
8
  import { T as O } from "./FontAnalyzer-CwIpgTGd.js";
9
9
  import { p as h } from "./UnifiedFontService-CC3CSmH5.js";
@@ -79,4 +79,4 @@ const te = j(
79
79
  export {
80
80
  te as EditorCanvasImpl
81
81
  };
82
- //# sourceMappingURL=EditorCanvasImpl-BH_bKy-F.js.map
82
+ //# sourceMappingURL=EditorCanvasImpl-Ckg7WO2j.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EditorCanvasImpl-BH_bKy-F.js","sources":["../src/components/editor/EditorCanvasImpl.tsx"],"sourcesContent":["'use client';\n\n/**\n * The heavy half of `Editor.Canvas` (and of the legacy `<RealtimeCanvas>`),\n * extracted from RealtimeCanvas's body. This module statically imports\n * `SnowconeCanvas` — i.e. the full rendering engine — and is therefore ONLY\n * ever reached through a dynamic `import()` (D9): the embed entry's static\n * import graph stays renderer-free, mechanically enforced by the\n * import-graph CI check.\n *\n * Beyond the original wiring (seed → SnowconeCanvas, edit →\n * `serializeStateForServer` → `pushRender`), this adds the ADR-0085 §3 store\n * wiring: every canvas change lands in the Root's {@link DesignStateStore}\n * (the ONE live design state), and a {@link CanvasBridge} is registered so\n * `Editor.TextField` writes route through the editor command path (undo/redo,\n * repaint) while a canvas is mounted — the editor document stays the single\n * write authority.\n */\n\nimport React, {\n forwardRef,\n useContext,\n useLayoutEffect,\n useMemo,\n useRef,\n useSyncExternalStore,\n type CSSProperties,\n type ReactNode,\n} from 'react';\nimport { SnowconeCanvas } from '../embed/SnowconeCanvas.js';\nimport { ContextualToolbars } from '../ContextualToolbars.js';\nimport type { CanvasState, SnowconeCanvasHandle } from '../embed/SnowconeCanvas.js';\nimport { serializeStateForServer } from '../../rendering/serialize-for-server.js';\nimport type { KitPresetId, KitDefinition } from '../../kits/types.js';\nimport type { CanvasServices } from '../../contexts/CanvasServicesContext.js';\nimport { useEmbedContext } from '../embed-realtime/context.js';\nimport { useElementsContext } from '../../contexts/ElementsContext.js';\nimport { useCommandContext } from '../../contexts/CommandContext.js';\nimport { TextElement } from '../../core/TextElement.js';\nimport { EditorRootInternalsContext } from './RootInternals.js';\n\nexport interface EditorCanvasImplProps {\n /** Your controls (toolbar, inputs). Rendered as an overlay inside the editor\n * context so binding hooks work. */\n children?: ReactNode;\n /** Editor chrome preset. `Editor.Canvas` pins the chrome-less `'embed-only'`;\n * the legacy `<RealtimeCanvas kit>` prop passes richer presets through. */\n kit?: KitPresetId | KitDefinition;\n /** Inherit the host app's theme instead of managing its own (default true). */\n inheritTheme?: boolean;\n /** Cap the canvas height in px. */\n maxHeight?: number;\n /** Privileged-service wiring override (usually inherited from Root). */\n services?: CanvasServices;\n /** Observe the live design state (the same {@link CanvasState} the Root's\n * state store tracks). Safe to pass inline — read through a ref. */\n onChange?: (state: CanvasState) => void;\n /** Whether the wrapping div self-applies `.sc-root`. The legacy\n * `<RealtimeCanvas>` always did (it could be the only Snowcone DOM on the\n * page); under `Editor.Root` the Root applies it once and parts never\n * self-apply (ADR-0085). Re-applying is harmless (same variables), so the\n * legacy wrapper keeps `true` for bit-identical back-compat. */\n selfScope?: boolean;\n /** `data-sc-part` value for the wrapping div (the parts contract). */\n partAttr?: string;\n /** Mount the built-in floating contextual toolbar (ADR-0085 §5: with no\n * `Editor.Controls` mounted, `Editor.Canvas` defaults to the floating\n * toolbar; a registered DOCKED Controls suppresses it). Set by\n * `Editor.Canvas` only — the legacy `<RealtimeCanvas>` wrapper keeps\n * today's chrome-less behavior. @internal */\n builtinControls?: boolean;\n className?: string;\n style?: CSSProperties;\n}\n\nconst noopSubscribe = (): (() => void) => () => {};\n\n/**\n * Runs INSIDE the canvas's editor context (the overlay slot) and registers\n * the imperative bridge sibling parts use to edit by layer name through the\n * command path. Generalizes `useTextBinding`'s write mechanics to a dynamic\n * name (a hook can't take names at call time).\n */\nfunction CanvasBindingBridge(): null {\n const { elementStore } = useElementsContext();\n const { executeElementUpdate } = useCommandContext();\n // Tolerant on purpose: the legacy <RealtimeCanvas> is supported inside a\n // bare EmbedContext (advanced consumers provide their own); only under an\n // <Editor.Root> is there a registry to bridge into.\n const internals = useContext(EditorRootInternalsContext);\n\n const latest = useRef({ elementStore, executeElementUpdate });\n latest.current = { elementStore, executeElementUpdate };\n\n const registry = internals?.registry ?? null;\n useLayoutEffect(() => {\n if (!registry) return;\n return registry.registerCanvasBridge({\n setTextByName(name: string, text: string): boolean {\n const { elementStore: store, executeElementUpdate: execute } = latest.current;\n const matches = store.getAllByName(name).filter((el): el is TextElement => el instanceof TextElement);\n if (matches.length === 0) return false;\n for (const el of matches) {\n const cloned = el.clone() as TextElement;\n cloned.setText(text);\n execute(el, cloned);\n }\n return true;\n },\n });\n }, [registry]);\n\n return null;\n}\n\nexport const EditorCanvasImpl = forwardRef<SnowconeCanvasHandle, EditorCanvasImplProps>(\n function EditorCanvasImpl(\n {\n children,\n kit = 'embed-only',\n inheritTheme = true,\n maxHeight,\n services,\n onChange,\n selfScope = false,\n partAttr,\n builtinControls = false,\n className,\n style,\n }: EditorCanvasImplProps,\n ref,\n ): React.ReactElement {\n const { placement, throttleMs, pieceGuides, pushRender, stateStore } = useEmbedContext();\n\n // Under an <Editor.Root> the editor document is mounted by the ROOT (P1\n // provider inversion, D9: state always) — SnowconeCanvas must write into\n // that document instead of mounting its own, and a REMOUNT of this part\n // must rebuild the (surviving) document from the live seed instead of\n // accreting onto the previous mount's artboards/elements. The legacy\n // <RealtimeCanvas> inside a bare EmbedContext (no Root) keeps mounting\n // its own provider, exactly as before.\n const rootInternals = useContext(EditorRootInternalsContext);\n const underRoot = rootInternals !== null;\n\n // ADR-0085 §5 (Controls placement resolution): with no Editor.Controls\n // mounted — or a `placement=\"floating\"` one — the canvas owns the\n // floating contextual toolbar; a registered DOCKED Controls suppresses\n // it. Subscribed to the part registry so the zones swap live when a\n // docked Controls mounts/unmounts.\n const partsRegistry = rootInternals?.registry ?? null;\n useSyncExternalStore(\n partsRegistry ? partsRegistry.subscribe : noopSubscribe,\n partsRegistry ? partsRegistry.getVersion : () => 0,\n partsRegistry ? partsRegistry.getVersion : () => 0,\n );\n const showBuiltinFloatingControls =\n builtinControls && underRoot && !(partsRegistry?.hasDockedControls() ?? false);\n\n // Seed from the LIVE store, not the original design (ADR-0085 §3): the\n // store starts as design.toJSON(), so a fresh mount is identical to the\n // old behavior — but edits made while this chunk was loading (e.g. a\n // TextField keystroke in the first second) survive instead of being\n // clobbered by a stale seed. Captured once per store identity; later\n // store changes flow through the editor document, not re-seeding.\n const seed = useMemo(() => stateStore.getState(), [stateStore]);\n\n // Latest-ref so a host's inline `onChange` identity never matters here\n // (SnowconeCanvas already refs ITS callback; this keeps ours symmetric).\n const onChangeRef = useRef(onChange);\n onChangeRef.current = onChange;\n\n const rootClass = selfScope ? 'sc-root' : 'sc-canvas-frame';\n\n return (\n <div className={`${rootClass}${className ? ` ${className}` : ''}`} style={style} data-sc-part={partAttr}>\n <SnowconeCanvas\n ref={ref}\n kit={kit}\n inheritTheme={inheritTheme}\n services={services}\n externalProvider={underRoot}\n resetDocumentOnMount={underRoot}\n artboards={seed.artboards}\n activeArtboard={placement}\n initialElements={seed.elements}\n layoutConfig={maxHeight ? { maxHeight } : undefined}\n overlay={\n <>\n <CanvasBindingBridge />\n {showBuiltinFloatingControls ? <ContextualToolbars mode=\"floating\" partAttr=\"controls\" /> : null}\n {children}\n </>\n }\n // #566: the product's printable-area / dead-zone overlay, fetched and\n // dims-gated by the Root — same overlay snowcone.app's editor\n // shows, so a buyer can't unknowingly edit under a camera cutout.\n pieceGuides={pieceGuides ?? undefined}\n onChange={(state) => {\n // ONE store, last-write-wins (ADR-0085 §3): the editor document is\n // the write authority while mounted; the Root store derives from\n // its onChange, then the render follows the store.\n stateStore.setState(state);\n pushRender(serializeStateForServer(state), throttleMs);\n onChangeRef.current?.(state);\n }}\n />\n </div>\n );\n },\n);\n\nexport type { CanvasState, SnowconeCanvasHandle };\n"],"names":["noopSubscribe","CanvasBindingBridge","elementStore","useElementsContext","executeElementUpdate","useCommandContext","internals","useContext","EditorRootInternalsContext","latest","useRef","registry","useLayoutEffect","name","text","store","execute","matches","el","TextElement","cloned","EditorCanvasImpl","forwardRef","children","kit","inheritTheme","maxHeight","services","onChange","selfScope","partAttr","builtinControls","className","style","ref","placement","throttleMs","pieceGuides","pushRender","stateStore","useEmbedContext","rootInternals","underRoot","partsRegistry","useSyncExternalStore","showBuiltinFloatingControls","seed","useMemo","onChangeRef","jsx","SnowconeCanvas","jsxs","Fragment","ContextualToolbars","state","serializeStateForServer","_a"],"mappings":";;;;;;;;;AA2EA,MAAMA,IAAgB,MAAoB,MAAM;AAAC;AAQjD,SAASC,IAA4B;AACnC,QAAM,EAAE,cAAAC,EAAA,IAAiBC,EAAA,GACnB,EAAE,sBAAAC,EAAA,IAAyBC,EAAA,GAI3BC,IAAYC,EAAWC,CAA0B,GAEjDC,IAASC,EAAO,EAAE,cAAAR,GAAc,sBAAAE,GAAsB;AAC5D,EAAAK,EAAO,UAAU,EAAE,cAAAP,GAAc,sBAAAE,EAAA;AAEjC,QAAMO,KAAWL,KAAA,gBAAAA,EAAW,aAAY;AACxC,SAAAM,EAAgB,MAAM;AACpB,QAAKD;AACL,aAAOA,EAAS,qBAAqB;AAAA,QACnC,cAAcE,GAAcC,GAAuB;AACjD,gBAAM,EAAE,cAAcC,GAAO,sBAAsBC,EAAA,IAAYP,EAAO,SAChEQ,IAAUF,EAAM,aAAaF,CAAI,EAAE,OAAO,CAACK,MAA0BA,aAAcC,CAAW;AACpG,cAAIF,EAAQ,WAAW,EAAG,QAAO;AACjC,qBAAWC,KAAMD,GAAS;AACxB,kBAAMG,IAASF,EAAG,MAAA;AAClB,YAAAE,EAAO,QAAQN,CAAI,GACnBE,EAAQE,GAAIE,CAAM;AAAA,UACpB;AACA,iBAAO;AAAA,QACT;AAAA,MAAA,CACD;AAAA,EACH,GAAG,CAACT,CAAQ,CAAC,GAEN;AACT;AAEO,MAAMU,KAAmBC;AAAA,EAC9B,SACE;AAAA,IACE,UAAAC;AAAA,IACA,KAAAC,IAAM;AAAA,IACN,cAAAC,IAAe;AAAA,IACf,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC,IAAY;AAAA,IACZ,UAAAC;AAAA,IACA,iBAAAC,IAAkB;AAAA,IAClB,WAAAC;AAAA,IACA,OAAAC;AAAA,EAAA,GAEFC,GACoB;AACpB,UAAM,EAAE,WAAAC,GAAW,YAAAC,GAAY,aAAAC,GAAa,YAAAC,GAAY,YAAAC,EAAA,IAAeC,EAAA,GASjEC,IAAgBlC,EAAWC,CAA0B,GACrDkC,IAAYD,MAAkB,MAO9BE,KAAgBF,KAAA,gBAAAA,EAAe,aAAY;AACjD,IAAAG;AAAA,MACED,IAAgBA,EAAc,YAAY3C;AAAA,MAC1C2C,IAAgBA,EAAc,aAAa,MAAM;AAAA,MACjDA,IAAgBA,EAAc,aAAa,MAAM;AAAA,IAAA;AAEnD,UAAME,IACJd,KAAmBW,KAAa,GAAEC,KAAA,gBAAAA,EAAe,wBAAuB,KAQpEG,IAAOC,EAAQ,MAAMR,EAAW,YAAY,CAACA,CAAU,CAAC,GAIxDS,IAActC,EAAOkB,CAAQ;AACnC,WAAAoB,EAAY,UAAUpB,GAKpB,gBAAAqB,EAAC,OAAA,EAAI,WAAW,GAHApB,IAAY,YAAY,iBAGZ,GAAGG,IAAY,IAAIA,CAAS,KAAK,EAAE,IAAI,OAAAC,GAAc,gBAAcH,GAC7F,UAAA,gBAAAmB;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,KAAAhB;AAAA,QACA,KAAAV;AAAA,QACA,cAAAC;AAAA,QACA,UAAAE;AAAA,QACA,kBAAkBe;AAAA,QAClB,sBAAsBA;AAAA,QACtB,WAAWI,EAAK;AAAA,QAChB,gBAAgBX;AAAA,QAChB,iBAAiBW,EAAK;AAAA,QACtB,cAAcpB,IAAY,EAAE,WAAAA,EAAA,IAAc;AAAA,QAC1C,SACE,gBAAAyB,EAAAC,GAAA,EACE,UAAA;AAAA,UAAA,gBAAAH,EAAChD,GAAA,EAAoB;AAAA,UACpB4C,IAA8B,gBAAAI,EAACI,GAAA,EAAmB,MAAK,YAAW,UAAS,YAAW,IAAK;AAAA,UAC3F9B;AAAA,QAAA,GACH;AAAA,QAKF,aAAac,KAAe;AAAA,QAC5B,UAAU,CAACiB,MAAU;;AAInB,UAAAf,EAAW,SAASe,CAAK,GACzBhB,EAAWiB,EAAwBD,CAAK,GAAGlB,CAAU,IACrDoB,IAAAR,EAAY,YAAZ,QAAAQ,EAAA,KAAAR,GAAsBM;AAAA,QACxB;AAAA,MAAA;AAAA,IAAA,GAEJ;AAAA,EAEJ;AACF;"}
1
+ {"version":3,"file":"EditorCanvasImpl-Ckg7WO2j.js","sources":["../src/components/editor/EditorCanvasImpl.tsx"],"sourcesContent":["'use client';\n\n/**\n * The heavy half of `Editor.Canvas` (and of the legacy `<RealtimeCanvas>`),\n * extracted from RealtimeCanvas's body. This module statically imports\n * `SnowconeCanvas` — i.e. the full rendering engine — and is therefore ONLY\n * ever reached through a dynamic `import()` (D9): the embed entry's static\n * import graph stays renderer-free, mechanically enforced by the\n * import-graph CI check.\n *\n * Beyond the original wiring (seed → SnowconeCanvas, edit →\n * `serializeStateForServer` → `pushRender`), this adds the ADR-0085 §3 store\n * wiring: every canvas change lands in the Root's {@link DesignStateStore}\n * (the ONE live design state), and a {@link CanvasBridge} is registered so\n * `Editor.TextField` writes route through the editor command path (undo/redo,\n * repaint) while a canvas is mounted — the editor document stays the single\n * write authority.\n */\n\nimport React, {\n forwardRef,\n useContext,\n useLayoutEffect,\n useMemo,\n useRef,\n useSyncExternalStore,\n type CSSProperties,\n type ReactNode,\n} from 'react';\nimport { SnowconeCanvas } from '../embed/SnowconeCanvas.js';\nimport { ContextualToolbars } from '../ContextualToolbars.js';\nimport type { CanvasState, SnowconeCanvasHandle } from '../embed/SnowconeCanvas.js';\nimport { serializeStateForServer } from '../../rendering/serialize-for-server.js';\nimport type { KitPresetId, KitDefinition } from '../../kits/types.js';\nimport type { CanvasServices } from '../../contexts/CanvasServicesContext.js';\nimport { useEmbedContext } from '../embed-realtime/context.js';\nimport { useElementsContext } from '../../contexts/ElementsContext.js';\nimport { useCommandContext } from '../../contexts/CommandContext.js';\nimport { TextElement } from '../../core/TextElement.js';\nimport { EditorRootInternalsContext } from './RootInternals.js';\n\nexport interface EditorCanvasImplProps {\n /** Your controls (toolbar, inputs). Rendered as an overlay inside the editor\n * context so binding hooks work. */\n children?: ReactNode;\n /** Editor chrome preset. `Editor.Canvas` pins the chrome-less `'embed-only'`;\n * the legacy `<RealtimeCanvas kit>` prop passes richer presets through. */\n kit?: KitPresetId | KitDefinition;\n /** Inherit the host app's theme instead of managing its own (default true). */\n inheritTheme?: boolean;\n /** Cap the canvas height in px. */\n maxHeight?: number;\n /** Privileged-service wiring override (usually inherited from Root). */\n services?: CanvasServices;\n /** Observe the live design state (the same {@link CanvasState} the Root's\n * state store tracks). Safe to pass inline — read through a ref. */\n onChange?: (state: CanvasState) => void;\n /** Whether the wrapping div self-applies `.sc-root`. The legacy\n * `<RealtimeCanvas>` always did (it could be the only Snowcone DOM on the\n * page); under `Editor.Root` the Root applies it once and parts never\n * self-apply (ADR-0085). Re-applying is harmless (same variables), so the\n * legacy wrapper keeps `true` for bit-identical back-compat. */\n selfScope?: boolean;\n /** `data-sc-part` value for the wrapping div (the parts contract). */\n partAttr?: string;\n /** Mount the built-in floating contextual toolbar (ADR-0085 §5: with no\n * `Editor.Controls` mounted, `Editor.Canvas` defaults to the floating\n * toolbar; a registered DOCKED Controls suppresses it). Set by\n * `Editor.Canvas` only — the legacy `<RealtimeCanvas>` wrapper keeps\n * today's chrome-less behavior. @internal */\n builtinControls?: boolean;\n className?: string;\n style?: CSSProperties;\n}\n\nconst noopSubscribe = (): (() => void) => () => {};\n\n/**\n * Runs INSIDE the canvas's editor context (the overlay slot) and registers\n * the imperative bridge sibling parts use to edit by layer name through the\n * command path. Generalizes `useTextBinding`'s write mechanics to a dynamic\n * name (a hook can't take names at call time).\n */\nfunction CanvasBindingBridge(): null {\n const { elementStore } = useElementsContext();\n const { executeElementUpdate } = useCommandContext();\n // Tolerant on purpose: the legacy <RealtimeCanvas> is supported inside a\n // bare EmbedContext (advanced consumers provide their own); only under an\n // <Editor.Root> is there a registry to bridge into.\n const internals = useContext(EditorRootInternalsContext);\n\n const latest = useRef({ elementStore, executeElementUpdate });\n latest.current = { elementStore, executeElementUpdate };\n\n const registry = internals?.registry ?? null;\n useLayoutEffect(() => {\n if (!registry) return;\n return registry.registerCanvasBridge({\n setTextByName(name: string, text: string): boolean {\n const { elementStore: store, executeElementUpdate: execute } = latest.current;\n const matches = store.getAllByName(name).filter((el): el is TextElement => el instanceof TextElement);\n if (matches.length === 0) return false;\n for (const el of matches) {\n const cloned = el.clone() as TextElement;\n cloned.setText(text);\n execute(el, cloned);\n }\n return true;\n },\n });\n }, [registry]);\n\n return null;\n}\n\nexport const EditorCanvasImpl = forwardRef<SnowconeCanvasHandle, EditorCanvasImplProps>(\n function EditorCanvasImpl(\n {\n children,\n kit = 'embed-only',\n inheritTheme = true,\n maxHeight,\n services,\n onChange,\n selfScope = false,\n partAttr,\n builtinControls = false,\n className,\n style,\n }: EditorCanvasImplProps,\n ref,\n ): React.ReactElement {\n const { placement, throttleMs, pieceGuides, pushRender, stateStore } = useEmbedContext();\n\n // Under an <Editor.Root> the editor document is mounted by the ROOT (P1\n // provider inversion, D9: state always) — SnowconeCanvas must write into\n // that document instead of mounting its own, and a REMOUNT of this part\n // must rebuild the (surviving) document from the live seed instead of\n // accreting onto the previous mount's artboards/elements. The legacy\n // <RealtimeCanvas> inside a bare EmbedContext (no Root) keeps mounting\n // its own provider, exactly as before.\n const rootInternals = useContext(EditorRootInternalsContext);\n const underRoot = rootInternals !== null;\n\n // ADR-0085 §5 (Controls placement resolution): with no Editor.Controls\n // mounted — or a `placement=\"floating\"` one — the canvas owns the\n // floating contextual toolbar; a registered DOCKED Controls suppresses\n // it. Subscribed to the part registry so the zones swap live when a\n // docked Controls mounts/unmounts.\n const partsRegistry = rootInternals?.registry ?? null;\n useSyncExternalStore(\n partsRegistry ? partsRegistry.subscribe : noopSubscribe,\n partsRegistry ? partsRegistry.getVersion : () => 0,\n partsRegistry ? partsRegistry.getVersion : () => 0,\n );\n const showBuiltinFloatingControls =\n builtinControls && underRoot && !(partsRegistry?.hasDockedControls() ?? false);\n\n // Seed from the LIVE store, not the original design (ADR-0085 §3): the\n // store starts as design.toJSON(), so a fresh mount is identical to the\n // old behavior — but edits made while this chunk was loading (e.g. a\n // TextField keystroke in the first second) survive instead of being\n // clobbered by a stale seed. Captured once per store identity; later\n // store changes flow through the editor document, not re-seeding.\n const seed = useMemo(() => stateStore.getState(), [stateStore]);\n\n // Latest-ref so a host's inline `onChange` identity never matters here\n // (SnowconeCanvas already refs ITS callback; this keeps ours symmetric).\n const onChangeRef = useRef(onChange);\n onChangeRef.current = onChange;\n\n const rootClass = selfScope ? 'sc-root' : 'sc-canvas-frame';\n\n return (\n <div className={`${rootClass}${className ? ` ${className}` : ''}`} style={style} data-sc-part={partAttr}>\n <SnowconeCanvas\n ref={ref}\n kit={kit}\n inheritTheme={inheritTheme}\n services={services}\n externalProvider={underRoot}\n resetDocumentOnMount={underRoot}\n artboards={seed.artboards}\n activeArtboard={placement}\n initialElements={seed.elements}\n layoutConfig={maxHeight ? { maxHeight } : undefined}\n overlay={\n <>\n <CanvasBindingBridge />\n {showBuiltinFloatingControls ? <ContextualToolbars mode=\"floating\" partAttr=\"controls\" /> : null}\n {children}\n </>\n }\n // #566: the product's printable-area / dead-zone overlay, fetched and\n // dims-gated by the Root — same overlay snowcone.app's editor\n // shows, so a buyer can't unknowingly edit under a camera cutout.\n pieceGuides={pieceGuides ?? undefined}\n onChange={(state) => {\n // ONE store, last-write-wins (ADR-0085 §3): the editor document is\n // the write authority while mounted; the Root store derives from\n // its onChange, then the render follows the store.\n stateStore.setState(state);\n pushRender(serializeStateForServer(state), throttleMs);\n onChangeRef.current?.(state);\n }}\n />\n </div>\n );\n },\n);\n\nexport type { CanvasState, SnowconeCanvasHandle };\n"],"names":["noopSubscribe","CanvasBindingBridge","elementStore","useElementsContext","executeElementUpdate","useCommandContext","internals","useContext","EditorRootInternalsContext","latest","useRef","registry","useLayoutEffect","name","text","store","execute","matches","el","TextElement","cloned","EditorCanvasImpl","forwardRef","children","kit","inheritTheme","maxHeight","services","onChange","selfScope","partAttr","builtinControls","className","style","ref","placement","throttleMs","pieceGuides","pushRender","stateStore","useEmbedContext","rootInternals","underRoot","partsRegistry","useSyncExternalStore","showBuiltinFloatingControls","seed","useMemo","onChangeRef","jsx","SnowconeCanvas","jsxs","Fragment","ContextualToolbars","state","serializeStateForServer","_a"],"mappings":";;;;;;;;;AA2EA,MAAMA,IAAgB,MAAoB,MAAM;AAAC;AAQjD,SAASC,IAA4B;AACnC,QAAM,EAAE,cAAAC,EAAA,IAAiBC,EAAA,GACnB,EAAE,sBAAAC,EAAA,IAAyBC,EAAA,GAI3BC,IAAYC,EAAWC,CAA0B,GAEjDC,IAASC,EAAO,EAAE,cAAAR,GAAc,sBAAAE,GAAsB;AAC5D,EAAAK,EAAO,UAAU,EAAE,cAAAP,GAAc,sBAAAE,EAAA;AAEjC,QAAMO,KAAWL,KAAA,gBAAAA,EAAW,aAAY;AACxC,SAAAM,EAAgB,MAAM;AACpB,QAAKD;AACL,aAAOA,EAAS,qBAAqB;AAAA,QACnC,cAAcE,GAAcC,GAAuB;AACjD,gBAAM,EAAE,cAAcC,GAAO,sBAAsBC,EAAA,IAAYP,EAAO,SAChEQ,IAAUF,EAAM,aAAaF,CAAI,EAAE,OAAO,CAACK,MAA0BA,aAAcC,CAAW;AACpG,cAAIF,EAAQ,WAAW,EAAG,QAAO;AACjC,qBAAWC,KAAMD,GAAS;AACxB,kBAAMG,IAASF,EAAG,MAAA;AAClB,YAAAE,EAAO,QAAQN,CAAI,GACnBE,EAAQE,GAAIE,CAAM;AAAA,UACpB;AACA,iBAAO;AAAA,QACT;AAAA,MAAA,CACD;AAAA,EACH,GAAG,CAACT,CAAQ,CAAC,GAEN;AACT;AAEO,MAAMU,KAAmBC;AAAA,EAC9B,SACE;AAAA,IACE,UAAAC;AAAA,IACA,KAAAC,IAAM;AAAA,IACN,cAAAC,IAAe;AAAA,IACf,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC,IAAY;AAAA,IACZ,UAAAC;AAAA,IACA,iBAAAC,IAAkB;AAAA,IAClB,WAAAC;AAAA,IACA,OAAAC;AAAA,EAAA,GAEFC,GACoB;AACpB,UAAM,EAAE,WAAAC,GAAW,YAAAC,GAAY,aAAAC,GAAa,YAAAC,GAAY,YAAAC,EAAA,IAAeC,EAAA,GASjEC,IAAgBlC,EAAWC,CAA0B,GACrDkC,IAAYD,MAAkB,MAO9BE,KAAgBF,KAAA,gBAAAA,EAAe,aAAY;AACjD,IAAAG;AAAA,MACED,IAAgBA,EAAc,YAAY3C;AAAA,MAC1C2C,IAAgBA,EAAc,aAAa,MAAM;AAAA,MACjDA,IAAgBA,EAAc,aAAa,MAAM;AAAA,IAAA;AAEnD,UAAME,IACJd,KAAmBW,KAAa,GAAEC,KAAA,gBAAAA,EAAe,wBAAuB,KAQpEG,IAAOC,EAAQ,MAAMR,EAAW,YAAY,CAACA,CAAU,CAAC,GAIxDS,IAActC,EAAOkB,CAAQ;AACnC,WAAAoB,EAAY,UAAUpB,GAKpB,gBAAAqB,EAAC,OAAA,EAAI,WAAW,GAHApB,IAAY,YAAY,iBAGZ,GAAGG,IAAY,IAAIA,CAAS,KAAK,EAAE,IAAI,OAAAC,GAAc,gBAAcH,GAC7F,UAAA,gBAAAmB;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,KAAAhB;AAAA,QACA,KAAAV;AAAA,QACA,cAAAC;AAAA,QACA,UAAAE;AAAA,QACA,kBAAkBe;AAAA,QAClB,sBAAsBA;AAAA,QACtB,WAAWI,EAAK;AAAA,QAChB,gBAAgBX;AAAA,QAChB,iBAAiBW,EAAK;AAAA,QACtB,cAAcpB,IAAY,EAAE,WAAAA,EAAA,IAAc;AAAA,QAC1C,SACE,gBAAAyB,EAAAC,GAAA,EACE,UAAA;AAAA,UAAA,gBAAAH,EAAChD,GAAA,EAAoB;AAAA,UACpB4C,IAA8B,gBAAAI,EAACI,GAAA,EAAmB,MAAK,YAAW,UAAS,YAAW,IAAK;AAAA,UAC3F9B;AAAA,QAAA,GACH;AAAA,QAKF,aAAac,KAAe;AAAA,QAC5B,UAAU,CAACiB,MAAU;;AAInB,UAAAf,EAAW,SAASe,CAAK,GACzBhB,EAAWiB,EAAwBD,CAAK,GAAGlB,CAAU,IACrDoB,IAAAR,EAAY,YAAZ,QAAAQ,EAAA,KAAAR,GAAsBM;AAAA,QACxB;AAAA,MAAA;AAAA,IAAA,GAEJ;AAAA,EAEJ;AACF;"}
@@ -5,7 +5,7 @@ import { l as We, e as $e, f as He, G as Oe, a as ze, Z as Ke, i as Ue, b as Xe,
5
5
  import { ImagePanel as Ze } from "./ImagePanel-BwqFDKvW.js";
6
6
  import { d as qe, e as _e } from "./ContextualToolbars-BDEt9ND0.js";
7
7
  import { E as et, o as tt, p as rt, C as nt, u as ue, f as at } from "./UnifiedFontService-CC3CSmH5.js";
8
- import { C as ot, D as st } from "./template-fields-C2pSfMBh.js";
8
+ import { C as ot, D as st } from "./template-fields-CQ6n2P4V.js";
9
9
  import { E as it, u as ee } from "./editorErrors-B2mb1sVN.js";
10
10
  import { T as Ee } from "./ThemeContext-Rjz25x9X.js";
11
11
  import { C as ce } from "./CanvasRenderer-6_HhR4-q.js";
@@ -1170,4 +1170,4 @@ export {
1170
1170
  xt as a,
1171
1171
  pt as u
1172
1172
  };
1173
- //# sourceMappingURL=SnowconeCanvas-Cx7nXlBI.js.map
1173
+ //# sourceMappingURL=SnowconeCanvas-D1sLcIja.js.map