@snowcone-app/sdk 0.16.0 → 0.16.1
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/CHANGELOG.md +6 -0
- package/README.md +2 -2
- package/dist/{chunk-IUFDVHRZ.js → chunk-7DRH6S4D.js} +3 -3
- package/dist/index.cjs +4 -4
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/server.cjs +3 -3
- package/dist/server.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.16.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#731](https://github.com/snowcone-app/snowcone-monorepo/pull/731) [`89893bc`](https://github.com/snowcone-app/snowcone-monorepo/commit/89893bc6e492d152dbd42d4887b5cd5c4cd51eb8) Thanks [@kevinsproles](https://github.com/kevinsproles)! - docs: describe the realtime render in interface terms — READMEs and JSDoc now say the server "renders" your design and fetches referenced assets, with internal service/pipeline references removed from published text
|
|
8
|
+
|
|
3
9
|
## 0.16.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -174,9 +174,9 @@ See [Public or signed](https://developers.snowcone.app/get-started) for the full
|
|
|
174
174
|
`getMockupUrl` composites **one** artwork onto a product. For a full multi-layer
|
|
175
175
|
design — the kind the Snowcone canvas editor produces — use a **`RenderSession`**:
|
|
176
176
|
the browser sends a ~1 KB description of the canvas (or just a saved design's id)
|
|
177
|
-
over a WebSocket, and the server
|
|
177
|
+
over a WebSocket, and the server renders the mockup and **fetches the referenced assets
|
|
178
178
|
itself**. No per-placement PNG is ever uploaded, so it's fast on thin/mobile
|
|
179
|
-
clients. This is exactly how the Snowcone PDP renders mockups
|
|
179
|
+
clients. This is exactly how the Snowcone PDP renders mockups.
|
|
180
180
|
|
|
181
181
|
Authorize the session with a short-lived **grant**. Mint it server-side with a
|
|
182
182
|
secret API key (`sk_…`, scope `mockups:realtime`) so the key never reaches the
|
|
@@ -19,7 +19,7 @@ var PARAMS = {
|
|
|
19
19
|
* whose catalog entry carries an `album` block — the edge resolver maps page
|
|
20
20
|
* N onto the repeating page placement (`page_N` → the geometry of
|
|
21
21
|
* `album.pagePlacement`); the catalog never enumerates `page_1…page_100` and
|
|
22
|
-
*
|
|
22
|
+
* the render server is unchanged.
|
|
23
23
|
*/
|
|
24
24
|
page: "page",
|
|
25
25
|
variant: "variant",
|
|
@@ -31,10 +31,10 @@ var PARAMS = {
|
|
|
31
31
|
maskOverrides: "maskOverrides",
|
|
32
32
|
/**
|
|
33
33
|
* Render-only option picks (the `affectsCombinations:false` attributes), as a
|
|
34
|
-
* base64 JSON map `{ attributeName: choiceLabel }`.
|
|
34
|
+
* base64 JSON map `{ attributeName: choiceLabel }`. The render server already parses
|
|
35
35
|
* this and resolves per-choice underlays from it; the builder emits it so the
|
|
36
36
|
* edge resolver can forward render-only picks (e.g. a cap's Crown/Strap color)
|
|
37
|
-
* without changing
|
|
37
|
+
* without changing the server grammar.
|
|
38
38
|
*/
|
|
39
39
|
optionSelections: "optionSelections",
|
|
40
40
|
signature: "signature",
|
package/dist/index.cjs
CHANGED
|
@@ -498,7 +498,7 @@ var PARAMS = {
|
|
|
498
498
|
* whose catalog entry carries an `album` block — the edge resolver maps page
|
|
499
499
|
* N onto the repeating page placement (`page_N` → the geometry of
|
|
500
500
|
* `album.pagePlacement`); the catalog never enumerates `page_1…page_100` and
|
|
501
|
-
*
|
|
501
|
+
* the render server is unchanged.
|
|
502
502
|
*/
|
|
503
503
|
page: "page",
|
|
504
504
|
variant: "variant",
|
|
@@ -510,10 +510,10 @@ var PARAMS = {
|
|
|
510
510
|
maskOverrides: "maskOverrides",
|
|
511
511
|
/**
|
|
512
512
|
* Render-only option picks (the `affectsCombinations:false` attributes), as a
|
|
513
|
-
* base64 JSON map `{ attributeName: choiceLabel }`.
|
|
513
|
+
* base64 JSON map `{ attributeName: choiceLabel }`. The render server already parses
|
|
514
514
|
* this and resolves per-choice underlays from it; the builder emits it so the
|
|
515
515
|
* edge resolver can forward render-only picks (e.g. a cap's Crown/Strap color)
|
|
516
|
-
* without changing
|
|
516
|
+
* without changing the server grammar.
|
|
517
517
|
*/
|
|
518
518
|
optionSelections: "optionSelections",
|
|
519
519
|
signature: "signature",
|
|
@@ -5961,7 +5961,7 @@ var RenderSession = class {
|
|
|
5961
5961
|
return this.ready;
|
|
5962
5962
|
}
|
|
5963
5963
|
/**
|
|
5964
|
-
* Render a canvas state for a placement. The server
|
|
5964
|
+
* Render a canvas state for a placement. The server renders it and fetches
|
|
5965
5965
|
* the assets referenced inside — no pixels are uploaded. Results arrive via
|
|
5966
5966
|
* {@link RenderSession.onMockups}. Safe to call repeatedly (e.g. on every
|
|
5967
5967
|
* canvas edit); pass `throttleMs` to throttle during live dragging. The
|
package/dist/index.d.cts
CHANGED
|
@@ -2671,7 +2671,7 @@ declare class SvelteAdapter implements FrameworkAdapter<ComponentProps> {
|
|
|
2671
2671
|
declare function createSvelteComponent(descriptor: ComponentDescriptor, svelte: any): any;
|
|
2672
2672
|
|
|
2673
2673
|
/**
|
|
2674
|
-
* Production realtime render WebSocket endpoint (the
|
|
2674
|
+
* Production realtime render WebSocket endpoint (the realtime render edge).
|
|
2675
2675
|
*
|
|
2676
2676
|
* This is the value to connect to for server-side canvas rendering — open
|
|
2677
2677
|
* `${REALTIME_WS_URL}?token=<grant>`. Replaces the old un-discoverable
|
|
@@ -3037,7 +3037,7 @@ declare class RenderSession {
|
|
|
3037
3037
|
*/
|
|
3038
3038
|
connect(): Promise<void>;
|
|
3039
3039
|
/**
|
|
3040
|
-
* Render a canvas state for a placement. The server
|
|
3040
|
+
* Render a canvas state for a placement. The server renders it and fetches
|
|
3041
3041
|
* the assets referenced inside — no pixels are uploaded. Results arrive via
|
|
3042
3042
|
* {@link RenderSession.onMockups}. Safe to call repeatedly (e.g. on every
|
|
3043
3043
|
* canvas edit); pass `throttleMs` to throttle during live dragging. The
|
package/dist/index.d.ts
CHANGED
|
@@ -2671,7 +2671,7 @@ declare class SvelteAdapter implements FrameworkAdapter<ComponentProps> {
|
|
|
2671
2671
|
declare function createSvelteComponent(descriptor: ComponentDescriptor, svelte: any): any;
|
|
2672
2672
|
|
|
2673
2673
|
/**
|
|
2674
|
-
* Production realtime render WebSocket endpoint (the
|
|
2674
|
+
* Production realtime render WebSocket endpoint (the realtime render edge).
|
|
2675
2675
|
*
|
|
2676
2676
|
* This is the value to connect to for server-side canvas rendering — open
|
|
2677
2677
|
* `${REALTIME_WS_URL}?token=<grant>`. Replaces the old un-discoverable
|
|
@@ -3037,7 +3037,7 @@ declare class RenderSession {
|
|
|
3037
3037
|
*/
|
|
3038
3038
|
connect(): Promise<void>;
|
|
3039
3039
|
/**
|
|
3040
|
-
* Render a canvas state for a placement. The server
|
|
3040
|
+
* Render a canvas state for a placement. The server renders it and fetches
|
|
3041
3041
|
* the assets referenced inside — no pixels are uploaded. Results arrive via
|
|
3042
3042
|
* {@link RenderSession.onMockups}. Safe to call repeatedly (e.g. on every
|
|
3043
3043
|
* canvas edit); pass `throttleMs` to throttle during live dragging. The
|
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
canonicalForSig,
|
|
12
12
|
normalizeDesignElements,
|
|
13
13
|
normalizeWidth
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-7DRH6S4D.js";
|
|
15
15
|
|
|
16
16
|
// src/validation.ts
|
|
17
17
|
import { z } from "zod";
|
|
@@ -4807,7 +4807,7 @@ var RenderSession = class {
|
|
|
4807
4807
|
return this.ready;
|
|
4808
4808
|
}
|
|
4809
4809
|
/**
|
|
4810
|
-
* Render a canvas state for a placement. The server
|
|
4810
|
+
* Render a canvas state for a placement. The server renders it and fetches
|
|
4811
4811
|
* the assets referenced inside — no pixels are uploaded. Results arrive via
|
|
4812
4812
|
* {@link RenderSession.onMockups}. Safe to call repeatedly (e.g. on every
|
|
4813
4813
|
* canvas edit); pass `throttleMs` to throttle during live dragging. The
|
package/dist/server.cjs
CHANGED
|
@@ -50,7 +50,7 @@ var PARAMS = {
|
|
|
50
50
|
* whose catalog entry carries an `album` block — the edge resolver maps page
|
|
51
51
|
* N onto the repeating page placement (`page_N` → the geometry of
|
|
52
52
|
* `album.pagePlacement`); the catalog never enumerates `page_1…page_100` and
|
|
53
|
-
*
|
|
53
|
+
* the render server is unchanged.
|
|
54
54
|
*/
|
|
55
55
|
page: "page",
|
|
56
56
|
variant: "variant",
|
|
@@ -62,10 +62,10 @@ var PARAMS = {
|
|
|
62
62
|
maskOverrides: "maskOverrides",
|
|
63
63
|
/**
|
|
64
64
|
* Render-only option picks (the `affectsCombinations:false` attributes), as a
|
|
65
|
-
* base64 JSON map `{ attributeName: choiceLabel }`.
|
|
65
|
+
* base64 JSON map `{ attributeName: choiceLabel }`. The render server already parses
|
|
66
66
|
* this and resolves per-choice underlays from it; the builder emits it so the
|
|
67
67
|
* edge resolver can forward render-only picks (e.g. a cap's Crown/Strap color)
|
|
68
|
-
* without changing
|
|
68
|
+
* without changing the server grammar.
|
|
69
69
|
*/
|
|
70
70
|
optionSelections: "optionSelections",
|
|
71
71
|
signature: "signature",
|
package/dist/server.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@snowcone-app/sdk",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.1",
|
|
4
4
|
"description": "Snowcone SDK for product mockups and print-on-demand",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"merch",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"tsup": "^8.1.0",
|
|
86
86
|
"typescript": "^5.5.4",
|
|
87
87
|
"vitest": "^2.0.5",
|
|
88
|
-
"@snowcone-app/mockup-url": "0.2.
|
|
88
|
+
"@snowcone-app/mockup-url": "0.2.1"
|
|
89
89
|
},
|
|
90
90
|
"engines": {
|
|
91
91
|
"node": ">=18"
|