@snowcone-app/canvas 0.1.3 → 0.1.5
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/README.md +101 -326
- package/dist/api/stable.d.ts +2 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +92 -89
- package/dist/index.mjs.map +1 -1
- package/dist/rendering/serialize-for-server.d.ts +13 -0
- package/package.json +9 -4
|
@@ -9,7 +9,20 @@
|
|
|
9
9
|
* worker bundle. The client-side serializeForWorkerExport() requires live element
|
|
10
10
|
* instances; this function works on plain JSON from onChange/toJSON.
|
|
11
11
|
*/
|
|
12
|
+
/**
|
|
13
|
+
* Wire-schema version of the server-render `canvas_state` payload (ADR-0079).
|
|
14
|
+
*
|
|
15
|
+
* This is a PUBLIC contract: third parties send `ServerRenderRequest` (produced
|
|
16
|
+
* by {@link serializeStateForServer}) to Snowcone's realtime renderer. Bump the
|
|
17
|
+
* MAJOR whenever the element/artboard shape changes incompatibly so a renderer
|
|
18
|
+
* can reject states it cannot render instead of silently mis-rendering. Servers
|
|
19
|
+
* treat a MISSING `schemaVersion` as `1` — legacy clients that predate the
|
|
20
|
+
* stamp keep working.
|
|
21
|
+
*/
|
|
22
|
+
export declare const CANVAS_STATE_SCHEMA_VERSION = 1;
|
|
12
23
|
export interface ServerRenderRequest {
|
|
24
|
+
/** Wire-schema version — see {@link CANVAS_STATE_SCHEMA_VERSION}. */
|
|
25
|
+
schemaVersion: number;
|
|
13
26
|
artboards: Array<{
|
|
14
27
|
id: string;
|
|
15
28
|
name: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@snowcone-app/canvas",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Self-contained canvas editor component for e-commerce product customization",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -50,11 +50,16 @@
|
|
|
50
50
|
"apparel",
|
|
51
51
|
"merchandise"
|
|
52
52
|
],
|
|
53
|
-
"author": "
|
|
53
|
+
"author": "Snowcone",
|
|
54
54
|
"license": "MIT",
|
|
55
|
+
"homepage": "https://developers.snowcone.app/canvas",
|
|
55
56
|
"repository": {
|
|
56
57
|
"type": "git",
|
|
57
|
-
"url": "https://github.com/snowcone-app/
|
|
58
|
+
"url": "https://github.com/snowcone-app/snowcone-monorepo.git",
|
|
59
|
+
"directory": "packages/canvas"
|
|
60
|
+
},
|
|
61
|
+
"bugs": {
|
|
62
|
+
"url": "https://github.com/snowcone-app/snowcone-monorepo/issues"
|
|
58
63
|
},
|
|
59
64
|
"size-limit": [
|
|
60
65
|
{
|
|
@@ -91,7 +96,7 @@
|
|
|
91
96
|
"react-colorful": "^5.6.1",
|
|
92
97
|
"tailwind-merge": "^2.6.0",
|
|
93
98
|
"tailwind-variants": "^3.1.1",
|
|
94
|
-
"@snowcone-app/ui": "0.1.
|
|
99
|
+
"@snowcone-app/ui": "0.1.20"
|
|
95
100
|
},
|
|
96
101
|
"devDependencies": {
|
|
97
102
|
"@axe-core/playwright": "^4.11.0",
|