@snowcone-app/canvas 0.23.0 → 0.26.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 (50) hide show
  1. package/ERROR_CONTRACT.md +600 -0
  2. package/README.md +2 -1
  3. package/STYLING_CONTRACT.md +59 -8
  4. package/dist/{ContextualToolbars-BDEt9ND0.js → ContextualToolbars-DUhBKVxe.js} +3 -3
  5. package/dist/{ContextualToolbars-BDEt9ND0.js.map → ContextualToolbars-DUhBKVxe.js.map} +1 -1
  6. package/dist/{EditorCanvasImpl-Ckg7WO2j.js → EditorCanvasImpl-BLZV_el0.js} +6 -6
  7. package/dist/{EditorCanvasImpl-Ckg7WO2j.js.map → EditorCanvasImpl-BLZV_el0.js.map} +1 -1
  8. package/dist/{ImagePanel-BwqFDKvW.js → ImagePanel-sLSjaPWS.js} +3 -3
  9. package/dist/{ImagePanel-BwqFDKvW.js.map → ImagePanel-sLSjaPWS.js.map} +1 -1
  10. package/dist/{SnowconeCanvas-D1sLcIja.js → SnowconeCanvas-4ef4a61J.js} +6 -6
  11. package/dist/{SnowconeCanvas-D1sLcIja.js.map → SnowconeCanvas-4ef4a61J.js.map} +1 -1
  12. package/dist/{UnifiedFontService-CC3CSmH5.js → UnifiedFontService-Bx2MxFfy.js} +867 -834
  13. package/dist/{UnifiedFontService-CC3CSmH5.js.map → UnifiedFontService-Bx2MxFfy.js.map} +1 -1
  14. package/dist/advanced.mjs +7 -7
  15. package/dist/api/embed.d.ts +2 -2
  16. package/dist/components/editor/EditorLoadingOverlay.d.ts +12 -0
  17. package/dist/components/editor/EditorPlacements.d.ts +14 -0
  18. package/dist/components/editor/EditorPreview.d.ts +32 -8
  19. package/dist/components/editor/EditorRoot.d.ts +12 -0
  20. package/dist/components/editor/PreviewPrismOverlay.d.ts +23 -0
  21. package/dist/components/editor/RootInternals.d.ts +31 -0
  22. package/dist/components/editor/editorAudit.d.ts +66 -0
  23. package/dist/components/editor/index.d.ts +14 -0
  24. package/dist/components/editor/usePlacements.d.ts +14 -0
  25. package/dist/components/embed-realtime/context.d.ts +11 -2
  26. package/dist/components/embed-realtime/validateEmbed.d.ts +20 -1
  27. package/dist/{custom-icons-BW6hqmkL.js → custom-icons-DeYIrTK1.js} +7 -7
  28. package/dist/{custom-icons-BW6hqmkL.js.map → custom-icons-DeYIrTK1.js.map} +1 -1
  29. package/dist/design/design-builder.d.ts +41 -3
  30. package/dist/design/product-config.d.ts +10 -0
  31. package/dist/{design-builder-2VUjfmdt.js → design-builder-U7Su9MMC.js} +108 -60
  32. package/dist/design-builder-U7Su9MMC.js.map +1 -0
  33. package/dist/editorErrors-B2mb1sVN.js.map +1 -1
  34. package/dist/embed-DXGydZOT.js +1586 -0
  35. package/dist/embed-DXGydZOT.js.map +1 -0
  36. package/dist/embed.mjs +34 -32
  37. package/dist/errors/editorError.d.ts +17 -1
  38. package/dist/index.mjs +6 -6
  39. package/dist/style.css +1 -1
  40. package/dist/{template-fields-CQ6n2P4V.js → template-fields-DJ157D3E.js} +3 -3
  41. package/dist/{template-fields-CQ6n2P4V.js.map → template-fields-DJ157D3E.js.map} +1 -1
  42. package/dist/testing.mjs +1 -1
  43. package/dist/{validation-C9Fe9ahK.js → validation-DnAkXdUg.js} +7 -7
  44. package/dist/{validation-C9Fe9ahK.js.map → validation-DnAkXdUg.js.map} +1 -1
  45. package/example/package.json +1 -1
  46. package/llms.txt +3 -0
  47. package/package.json +6 -3
  48. package/dist/design-builder-2VUjfmdt.js.map +0 -1
  49. package/dist/embed-DxsaqZJF.js +0 -1226
  50. package/dist/embed-DxsaqZJF.js.map +0 -1
@@ -25,9 +25,14 @@ stable hooks; `sc:`-prefixed utility classes are internal and NOT contract.
25
25
  | `history` | Editor.History |
26
26
  | `layers` | Editor.Layers |
27
27
  | `layers-item` | Editor.Layers |
28
+ | `loading-overlay` | Editor.LoadingOverlay |
28
29
  | `menu` | Editor.Menu |
30
+ | `placements` | Editor.Placements |
31
+ | `placements-item` | Editor.Placements |
29
32
  | `preview` | Editor.Preview |
30
33
  | `preview-error` | Editor.Preview |
34
+ | `preview-image` | Editor.Preview |
35
+ | `preview-loading` | Editor.Preview |
31
36
  | `root` | Editor.Root |
32
37
  | `snowcone-editor` | SnowconeEditor |
33
38
  | `snowcone-editor-header` | SnowconeEditor |
@@ -174,6 +179,15 @@ stable hooks; `sc:`-prefixed utility classes are internal and NOT contract.
174
179
  <span>
175
180
  ```
176
181
 
182
+ ### `loading-overlay` — Editor.LoadingOverlay — standalone render-in-flight rainbow for host-owned preview surfaces (fills its positioned parent)
183
+
184
+ ```html
185
+ <div class="sc-loading-overlay-host" data-sc-part="loading-overlay">
186
+ <div class="sc-prism-overlay sc-prism-fade-in" data-sc-part="preview-loading">
187
+ <div class="sc-prism-band"> ×6
188
+ <div class="sc-prism-particle"> ×10
189
+ ```
190
+
177
191
  ### `menu` — Editor.Menu
178
192
 
179
193
  ```html
@@ -184,29 +198,66 @@ stable hooks; `sc:`-prefixed utility classes are internal and NOT contract.
184
198
  <input type="file">
185
199
  ```
186
200
 
201
+ ### `placements` — Editor.Placements — two-placement design
202
+
203
+ ```html
204
+ <div data-sc-part="placements">
205
+ <button aria-pressed="true" data-sc-active="true" data-sc-part="placements-item" type="button">
206
+ <button aria-pressed="false" data-sc-active="false" data-sc-part="placements-item" type="button">
207
+ ```
208
+
209
+ ### `placements-item` — Editor.Placements — one tab (active state in data-sc-active)
210
+
211
+ ```html
212
+ <button aria-pressed="true" data-sc-active="true" data-sc-part="placements-item" type="button">
213
+ ```
214
+
187
215
  ### `preview` — Editor.Preview — awaiting the first mockup
188
216
 
189
217
  ```html
190
- <div aria-busy="true" data-sc-part="preview" data-sc-preview-state="rendering">
218
+ <div aria-busy="true" class="sc-preview-frame" data-sc-part="preview" data-sc-preview-state="rendering">
191
219
  ```
192
220
 
193
221
  ### `preview` — Editor.Preview — with a rendered mockup
194
222
 
195
223
  ```html
196
- <img alt=<alt> data-sc-part="preview" data-sc-preview-state="ready" src=<url>>
224
+ <div class="sc-preview-frame" data-sc-part="preview" data-sc-preview-state="ready">
225
+ <img alt=<alt> data-sc-part="preview-image" src=<url>>
226
+ ```
227
+
228
+ ### `preview` — Editor.Preview — loadingOverlay frame (the part becomes the stage)
229
+
230
+ ```html
231
+ <div class="sc-preview-frame" data-sc-part="preview" data-sc-preview-state="ready">
232
+ <img alt=<alt> data-sc-part="preview-image" src=<url>>
197
233
  ```
198
234
 
199
235
  ### `preview-error` — Editor.Preview — render/grant failure before any mockup
200
236
 
201
237
  ```html
202
- <div data-sc-error=<message> data-sc-part="preview-error" data-sc-preview-state="error" role="alert">
238
+ <div data-sc-error=<message> data-sc-part="preview-error" role="alert">
239
+ ```
240
+
241
+ ### `preview-image` — Editor.Preview — loadingOverlay image
242
+
243
+ ```html
244
+ <img alt=<alt> data-sc-part="preview-image" src=<url>>
245
+ ```
246
+
247
+ ### `preview-loading` — Editor.Preview — loadingOverlay render-in-flight rainbow
248
+
249
+ ```html
250
+ <div class="sc-prism-overlay sc-prism-fade-in" data-sc-part="preview-loading">
251
+ <div class="sc-prism-band"> ×6
252
+ <div class="sc-prism-particle"> ×10
203
253
  ```
204
254
 
205
255
  ### `root` — Editor.Root
206
256
 
207
257
  ```html
208
258
  <div class="sc-root" data-sc-part="root">
209
- <img alt=<alt> data-sc-part="preview" data-sc-preview-state="ready" src=<url>>
259
+ <div class="sc-preview-frame" data-sc-part="preview" data-sc-preview-state="ready">
260
+ <img alt=<alt> data-sc-part="preview-image" src=<url>>
210
261
  <input aria-label=<label> data-sc-layer=<layer-name> data-sc-part="textfield" placeholder=<placeholder> type="text">
211
262
  <button data-sc-buy-missing=<reason-codes> data-sc-buy-state="incomplete" data-sc-part="buy" disabled type="button">
212
263
  ```
@@ -230,7 +281,7 @@ stable hooks; `sc:`-prefixed utility classes are internal and NOT contract.
230
281
  <div>
231
282
  …
232
283
  <button aria-label=<label> data-sc-part="snowcone-editor-pip" type="button">
233
- <div aria-busy="true" data-sc-part="preview" data-sc-preview-state="rendering">
284
+ <div aria-busy="true" class="sc-preview-frame" data-sc-part="preview" data-sc-preview-state="rendering">
234
285
  <span aria-busy="true">
235
286
  <div data-sc-part="snowcone-editor-zone" data-sc-zone-state="idle">
236
287
  <div>
@@ -303,7 +354,7 @@ stable hooks; `sc:`-prefixed utility classes are internal and NOT contract.
303
354
 
304
355
  ```html
305
356
  <button aria-label=<label> data-sc-part="snowcone-editor-pip" type="button">
306
- <div aria-busy="true" data-sc-part="preview" data-sc-preview-state="rendering">
357
+ <div aria-busy="true" class="sc-preview-frame" data-sc-part="preview" data-sc-preview-state="rendering">
307
358
  <span aria-busy="true">
308
359
  ```
309
360
 
@@ -317,7 +368,7 @@ stable hooks; `sc:`-prefixed utility classes are internal and NOT contract.
317
368
  <div>
318
369
  …
319
370
  <button aria-label=<label> data-sc-part="snowcone-editor-pip" type="button">
320
- <div aria-busy="true" data-sc-part="preview" data-sc-preview-state="rendering">
371
+ <div aria-busy="true" class="sc-preview-frame" data-sc-part="preview" data-sc-preview-state="rendering">
321
372
  <span aria-busy="true">
322
373
  ```
323
374
 
@@ -331,7 +382,7 @@ stable hooks; `sc:`-prefixed utility classes are internal and NOT contract.
331
382
 
332
383
  ```html
333
384
  <div data-sc-part="snowcone-editor-swap-stage">
334
- <div aria-busy="true" data-sc-part="preview" data-sc-preview-state="rendering">
385
+ <div aria-busy="true" class="sc-preview-frame" data-sc-part="preview" data-sc-preview-state="rendering">
335
386
  <div aria-busy="true">
336
387
  <button aria-label=<label> data-sc-part="snowcone-editor-swap-back" type="button">
337
388
  ```
@@ -3,8 +3,8 @@ import * as se from "react";
3
3
  import we, { useRef as $, useEffect as X, useCallback as D, useState as T, useLayoutEffect as ic, useMemo as Ye, memo as lc } from "react";
4
4
  import { createPortal as xa } from "react-dom";
5
5
  import { u as dc, a as Ca, e as wa, f as ka } from "./editorErrors-B2mb1sVN.js";
6
- import { n as uc, I as P, y as Ce, K as Ta, H as ae, N as mt, B as te, z as Na, T as de, h as ue, i as fe, O as j, m as ss, U as We, J as Sa, C as Da, d as Ma, S as Ia } from "./UnifiedFontService-CC3CSmH5.js";
7
- import { R as cs, L as Ee, a as Ra, I as Ea, T as Ge } from "./custom-icons-BW6hqmkL.js";
6
+ import { n as uc, I as P, z as Ce, N as Ta, J as ae, O as mt, B as te, A as Na, T as de, h as ue, i as fe, P as j, m as ss, U as We, K as Sa, C as Da, d as Ma, S as Ia } from "./UnifiedFontService-Bx2MxFfy.js";
7
+ import { R as cs, L as Ee, a as Ra, I as Ea, T as Ge } from "./custom-icons-DeYIrTK1.js";
8
8
  import * as ht from "@radix-ui/react-popover";
9
9
  import * as Je from "@radix-ui/react-slider";
10
10
  import { T as Xn, G as fc, H as Ms, J as Is, P as pc, Q as Rs, R as qn } from "./ExportManager-DoU4VK6h.js";
@@ -5553,4 +5553,4 @@ export {
5553
5553
  Di as s,
5554
5554
  zr as u
5555
5555
  };
5556
- //# sourceMappingURL=ContextualToolbars-BDEt9ND0.js.map
5556
+ //# sourceMappingURL=ContextualToolbars-DUhBKVxe.js.map