@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.
- package/ERROR_CONTRACT.md +600 -0
- package/README.md +2 -1
- package/STYLING_CONTRACT.md +59 -8
- package/dist/{ContextualToolbars-BDEt9ND0.js → ContextualToolbars-DUhBKVxe.js} +3 -3
- package/dist/{ContextualToolbars-BDEt9ND0.js.map → ContextualToolbars-DUhBKVxe.js.map} +1 -1
- package/dist/{EditorCanvasImpl-Ckg7WO2j.js → EditorCanvasImpl-BLZV_el0.js} +6 -6
- package/dist/{EditorCanvasImpl-Ckg7WO2j.js.map → EditorCanvasImpl-BLZV_el0.js.map} +1 -1
- package/dist/{ImagePanel-BwqFDKvW.js → ImagePanel-sLSjaPWS.js} +3 -3
- package/dist/{ImagePanel-BwqFDKvW.js.map → ImagePanel-sLSjaPWS.js.map} +1 -1
- package/dist/{SnowconeCanvas-D1sLcIja.js → SnowconeCanvas-4ef4a61J.js} +6 -6
- package/dist/{SnowconeCanvas-D1sLcIja.js.map → SnowconeCanvas-4ef4a61J.js.map} +1 -1
- package/dist/{UnifiedFontService-CC3CSmH5.js → UnifiedFontService-Bx2MxFfy.js} +867 -834
- package/dist/{UnifiedFontService-CC3CSmH5.js.map → UnifiedFontService-Bx2MxFfy.js.map} +1 -1
- package/dist/advanced.mjs +7 -7
- package/dist/api/embed.d.ts +2 -2
- package/dist/components/editor/EditorLoadingOverlay.d.ts +12 -0
- package/dist/components/editor/EditorPlacements.d.ts +14 -0
- package/dist/components/editor/EditorPreview.d.ts +32 -8
- package/dist/components/editor/EditorRoot.d.ts +12 -0
- package/dist/components/editor/PreviewPrismOverlay.d.ts +23 -0
- package/dist/components/editor/RootInternals.d.ts +31 -0
- package/dist/components/editor/editorAudit.d.ts +66 -0
- package/dist/components/editor/index.d.ts +14 -0
- package/dist/components/editor/usePlacements.d.ts +14 -0
- package/dist/components/embed-realtime/context.d.ts +11 -2
- package/dist/components/embed-realtime/validateEmbed.d.ts +20 -1
- package/dist/{custom-icons-BW6hqmkL.js → custom-icons-DeYIrTK1.js} +7 -7
- package/dist/{custom-icons-BW6hqmkL.js.map → custom-icons-DeYIrTK1.js.map} +1 -1
- package/dist/design/design-builder.d.ts +41 -3
- package/dist/design/product-config.d.ts +10 -0
- package/dist/{design-builder-2VUjfmdt.js → design-builder-U7Su9MMC.js} +108 -60
- package/dist/design-builder-U7Su9MMC.js.map +1 -0
- package/dist/editorErrors-B2mb1sVN.js.map +1 -1
- package/dist/embed-DXGydZOT.js +1586 -0
- package/dist/embed-DXGydZOT.js.map +1 -0
- package/dist/embed.mjs +34 -32
- package/dist/errors/editorError.d.ts +17 -1
- package/dist/index.mjs +6 -6
- package/dist/style.css +1 -1
- package/dist/{template-fields-CQ6n2P4V.js → template-fields-DJ157D3E.js} +3 -3
- package/dist/{template-fields-CQ6n2P4V.js.map → template-fields-DJ157D3E.js.map} +1 -1
- package/dist/testing.mjs +1 -1
- package/dist/{validation-C9Fe9ahK.js → validation-DnAkXdUg.js} +7 -7
- package/dist/{validation-C9Fe9ahK.js.map → validation-DnAkXdUg.js.map} +1 -1
- package/example/package.json +1 -1
- package/llms.txt +3 -0
- package/package.json +6 -3
- package/dist/design-builder-2VUjfmdt.js.map +0 -1
- package/dist/embed-DxsaqZJF.js +0 -1226
- package/dist/embed-DxsaqZJF.js.map +0 -1
package/dist/embed.mjs
CHANGED
|
@@ -1,46 +1,48 @@
|
|
|
1
|
-
import { C as a, a as r, b as o, u as t, d as i, f as d, g as n } from "./UnifiedFontService-
|
|
2
|
-
import { E as m, R as l, a as E, b as c, S as
|
|
3
|
-
import { g as
|
|
4
|
-
import { D as
|
|
5
|
-
import { D as
|
|
6
|
-
import { s as
|
|
1
|
+
import { C as a, a as r, b as o, u as t, d as i, f as d, g as n } from "./UnifiedFontService-Bx2MxFfy.js";
|
|
2
|
+
import { E as m, R as l, a as E, b as c, S as g, c as p, d as f, f as S, p as x, e as T, g as v, h as C, v as b } from "./embed-DXGydZOT.js";
|
|
3
|
+
import { g as P, i as y, u as R } from "./editorErrors-B2mb1sVN.js";
|
|
4
|
+
import { D as k, d as F, a as I, i as L } from "./design-builder-U7Su9MMC.js";
|
|
5
|
+
import { D as w, T as M, r as A, u as _, a as z, b as G, c as K, d as N, e as Y, f as j, w as q } from "./template-fields-DJ157D3E.js";
|
|
6
|
+
import { s as J } from "./CanvasStateV1-DmZ1Qvvn.js";
|
|
7
7
|
export {
|
|
8
8
|
a as CanvasServicesProvider,
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
k as DesignBuilder,
|
|
10
|
+
w as DesignStateStore,
|
|
11
11
|
m as Editor,
|
|
12
|
-
|
|
12
|
+
P as EditorError,
|
|
13
13
|
l as RealtimeCanvas,
|
|
14
14
|
E as RealtimeEmbed,
|
|
15
15
|
c as RealtimeMockup,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
g as SnowconeEditor,
|
|
17
|
+
M as TEMPLATE_FIELDS_KEY,
|
|
18
|
+
p as auditEditor,
|
|
19
|
+
f as collectEmbedIssues,
|
|
19
20
|
r as createProxyGenerate,
|
|
20
21
|
o as createProxyImageSearch,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
F as design,
|
|
23
|
+
S as formatBuyPrice,
|
|
24
|
+
I as isColorToken,
|
|
25
|
+
y as isEditorError,
|
|
26
|
+
L as isLayerToken,
|
|
27
|
+
x as productToRenderConfig,
|
|
28
|
+
A as readTemplateFields,
|
|
29
|
+
J as serializeState,
|
|
29
30
|
t as useArtboards,
|
|
30
31
|
i as useCanvasServices,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
_ as useColorBinding,
|
|
33
|
+
z as useCommands,
|
|
34
|
+
R as useEditor,
|
|
35
|
+
G as useElementByName,
|
|
35
36
|
d as useExport,
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
K as useFontBinding,
|
|
38
|
+
N as useImageBinding,
|
|
38
39
|
n as useLayers,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
T as usePlacements,
|
|
41
|
+
v as useProductSelection,
|
|
42
|
+
C as useRealtimeMockups,
|
|
43
|
+
Y as useSelectedElement,
|
|
44
|
+
j as useTextBinding,
|
|
45
|
+
b as validateEmbed,
|
|
46
|
+
q as withTemplateFields
|
|
45
47
|
};
|
|
46
48
|
//# sourceMappingURL=embed.mjs.map
|
|
@@ -36,6 +36,12 @@ export type EditorErrorCode =
|
|
|
36
36
|
/** `productToRenderConfig`: the catalog product has no renderable image
|
|
37
37
|
* placement / no mockup scenes, or the requested placement doesn't exist. */
|
|
38
38
|
| 'E_PRODUCT_NOT_RENDERABLE'
|
|
39
|
+
/** `design().artboard()`: an artboard with this label already exists in the
|
|
40
|
+
* design (artboard names are placement labels — unique by contract). */
|
|
41
|
+
| 'E_DUPLICATE_ARTBOARD'
|
|
42
|
+
/** `usePlacements().select()`: the label names no artboard in the design
|
|
43
|
+
* (ADR-0088). Lists the valid placement labels. */
|
|
44
|
+
| 'E_UNKNOWN_PLACEMENT'
|
|
39
45
|
/** `select()` named an option key/choice that doesn't exist on the product
|
|
40
46
|
* (Buy-owned selection, ADR-0085 §2 / P2). */
|
|
41
47
|
| 'E_UNKNOWN_OPTION'
|
|
@@ -49,6 +55,13 @@ export type EditorErrorCode =
|
|
|
49
55
|
/** `design.color(name)`: no color role with this name — lists the design's
|
|
50
56
|
* declared roles. */
|
|
51
57
|
| 'E_COLOR_ROLE_NOT_FOUND'
|
|
58
|
+
/** `Editor.Preview loadingOverlay` got `false`/an unknown value. A mockup
|
|
59
|
+
* preview ALWAYS has a render-in-flight treatment (a server render takes
|
|
60
|
+
* real time, and the loader paints OVER the still-visible previous
|
|
61
|
+
* mockup) — keep the default, pass a variant/custom element, or declare
|
|
62
|
+
* `"host-owned"` with your own indicator. Silence-then-pop-in is a
|
|
63
|
+
* composition mistake, not a preference. */
|
|
64
|
+
| 'E_PREVIEW_NO_LOADER'
|
|
52
65
|
/** `assertRenders`: the shop's asset-origin allowlist denied a design asset
|
|
53
66
|
* (translated from the server's 403 — F4). */
|
|
54
67
|
| 'E_ASSET_FORBIDDEN'
|
|
@@ -59,7 +72,10 @@ export type EditorErrorCode =
|
|
|
59
72
|
| 'E_BINDING_INERT'
|
|
60
73
|
/** `assertRenders`: the design has no named text layer to mutate and no
|
|
61
74
|
* `mutate` override was given (F4). */
|
|
62
|
-
| 'E_NO_MUTABLE_BINDING'
|
|
75
|
+
| 'E_NO_MUTABLE_BINDING'
|
|
76
|
+
/** `auditEditor()` called with no `<Editor.Root>` mounted — the imperative
|
|
77
|
+
* audit reads the most-recent mounted Root's registry (#10). */
|
|
78
|
+
| 'E_AUDIT_NO_ROOT';
|
|
63
79
|
export interface EditorErrorData {
|
|
64
80
|
code: EditorErrorCode;
|
|
65
81
|
/** Slug under https://developers.snowcone.app/ for the violated contract. */
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { e as u } from "./UnifiedFontService-
|
|
2
|
-
import { C as l, c as x, a as I, b as v, u as A, d as T, f as g, g as B } from "./UnifiedFontService-
|
|
3
|
-
import { E as _, S as y, S as L, u as O, a as M } from "./SnowconeCanvas-
|
|
1
|
+
import { e as u } from "./UnifiedFontService-Bx2MxFfy.js";
|
|
2
|
+
import { C as l, c as x, a as I, b as v, u as A, d as T, f as g, g as B } from "./UnifiedFontService-Bx2MxFfy.js";
|
|
3
|
+
import { E as _, S as y, S as L, u as O, a as M } from "./SnowconeCanvas-4ef4a61J.js";
|
|
4
4
|
import { u as d, a as m } from "./editorErrors-B2mb1sVN.js";
|
|
5
|
-
import { T as z, r as w, u as F, a as D, b as K, c as N, d as V, e as b, f as h, w as U } from "./template-fields-
|
|
6
|
-
import { A as Z, C as G, E as H, M as j, P as k, r as q, v as J } from "./validation-
|
|
7
|
-
import { C as W, D as X, d as $, s as ee } from "./design-builder-
|
|
5
|
+
import { T as z, r as w, u as F, a as D, b as K, c as N, d as V, e as b, f as h, w as U } from "./template-fields-DJ157D3E.js";
|
|
6
|
+
import { A as Z, C as G, E as H, M as j, P as k, r as q, v as J } from "./validation-DnAkXdUg.js";
|
|
7
|
+
import { C as W, D as X, d as $, s as ee } from "./design-builder-U7Su9MMC.js";
|
|
8
8
|
import { c as se, e as te } from "./compose-DtQL_oit.js";
|
|
9
9
|
import { d as oe, m as ie, s as ne, v as ue } from "./CanvasStateV1-DmZ1Qvvn.js";
|
|
10
10
|
function C() {
|