@snowcone-app/sdk 0.20.0 → 0.20.2
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 +12 -0
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/react.d.cts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/{websocket-C2hbBgve.d.cts → websocket-BG81_dZv.d.cts} +25 -0
- package/dist/{websocket-C2hbBgve.d.ts → websocket-BG81_dZv.d.ts} +25 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.20.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1150](https://github.com/snowcone-app/snowcone-monorepo/pull/1150) [`06997b2`](https://github.com/snowcone-app/snowcone-monorepo/commit/06997b211736d906d16eb9edeb186404f5acb19c) Thanks [@kevinsproles](https://github.com/kevinsproles)! - Spread-mode printables now use JSON canvas-state realtime mode: `WebSocketConfig.spreadCrops` carries the spread/group artboard geometry (piece rects keyed by placement label), and `RealtimeProvider.setSpreadCrops` sends it on the realtime config so the server slices each rendered spread artboard into per-placement images — no client pixel upload.
|
|
8
|
+
|
|
9
|
+
## 0.20.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#1143](https://github.com/snowcone-app/snowcone-monorepo/pull/1143) [`90e9337`](https://github.com/snowcone-app/snowcone-monorepo/commit/90e9337986c7b657fbd6d47278db6170d8fd7310) Thanks [@kevinsproles](https://github.com/kevinsproles)! - Realtime renders honor the mockup background: `WebSocketConfig.bg` (same grammar as the public `bg=` render param) and `RealtimeProvider` now sends the `MockupBackground` hex on the realtime config — re-sending when it changes (theme flips) — so renders produced after canvas edits match static `bg=` mockup URLs instead of coming back transparent.
|
|
14
|
+
|
|
3
15
|
## 0.20.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { createDevFetcher } from './dev-fetcher.cjs';
|
|
2
2
|
import { PublicDesign, PublicFill, PublicOptions } from '@snowcone-app/mockup-url';
|
|
3
|
-
import { O as OptionAttribute, a as OptionSelection, C as Combination, F as FrameworkAdapter, b as ComponentProps, c as ComponentDescriptor, d as ComponentState, e as ComponentContext, f as ComponentLifecycleHooks, E as EventHandler, g as FrameworkUtilities, P as PlacementSettings, M as MockupResult, R as RealtimeRenderError, h as RealtimeMockupService } from './websocket-
|
|
4
|
-
export { A as AdapterRegistry, i as ProductComponentContext, j as RealtimeMockupCallbacks, k as RealtimeMockupState, l as RenderResult, W as WebSocketConfig, m as WebSocketMessage, n as adapterRegistry, o as computeDisabledChoices, p as createComponent, q as defineComponent, r as deriveDefaultSelection, s as findBestCombination, t as getPricePreview, u as isOptionAvailable, v as resolveBestCombination } from './websocket-
|
|
3
|
+
import { O as OptionAttribute, a as OptionSelection, C as Combination, F as FrameworkAdapter, b as ComponentProps, c as ComponentDescriptor, d as ComponentState, e as ComponentContext, f as ComponentLifecycleHooks, E as EventHandler, g as FrameworkUtilities, P as PlacementSettings, M as MockupResult, R as RealtimeRenderError, h as RealtimeMockupService } from './websocket-BG81_dZv.cjs';
|
|
4
|
+
export { A as AdapterRegistry, i as ProductComponentContext, j as RealtimeMockupCallbacks, k as RealtimeMockupState, l as RenderResult, W as WebSocketConfig, m as WebSocketMessage, n as adapterRegistry, o as computeDisabledChoices, p as createComponent, q as defineComponent, r as deriveDefaultSelection, s as findBestCombination, t as getPricePreview, u as isOptionAvailable, v as resolveBestCombination } from './websocket-BG81_dZv.cjs';
|
|
5
5
|
|
|
6
6
|
interface CatalogProduct {
|
|
7
7
|
id: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { createDevFetcher } from './dev-fetcher.js';
|
|
2
2
|
import { PublicDesign, PublicFill, PublicOptions } from '@snowcone-app/mockup-url';
|
|
3
|
-
import { O as OptionAttribute, a as OptionSelection, C as Combination, F as FrameworkAdapter, b as ComponentProps, c as ComponentDescriptor, d as ComponentState, e as ComponentContext, f as ComponentLifecycleHooks, E as EventHandler, g as FrameworkUtilities, P as PlacementSettings, M as MockupResult, R as RealtimeRenderError, h as RealtimeMockupService } from './websocket-
|
|
4
|
-
export { A as AdapterRegistry, i as ProductComponentContext, j as RealtimeMockupCallbacks, k as RealtimeMockupState, l as RenderResult, W as WebSocketConfig, m as WebSocketMessage, n as adapterRegistry, o as computeDisabledChoices, p as createComponent, q as defineComponent, r as deriveDefaultSelection, s as findBestCombination, t as getPricePreview, u as isOptionAvailable, v as resolveBestCombination } from './websocket-
|
|
3
|
+
import { O as OptionAttribute, a as OptionSelection, C as Combination, F as FrameworkAdapter, b as ComponentProps, c as ComponentDescriptor, d as ComponentState, e as ComponentContext, f as ComponentLifecycleHooks, E as EventHandler, g as FrameworkUtilities, P as PlacementSettings, M as MockupResult, R as RealtimeRenderError, h as RealtimeMockupService } from './websocket-BG81_dZv.js';
|
|
4
|
+
export { A as AdapterRegistry, i as ProductComponentContext, j as RealtimeMockupCallbacks, k as RealtimeMockupState, l as RenderResult, W as WebSocketConfig, m as WebSocketMessage, n as adapterRegistry, o as computeDisabledChoices, p as createComponent, q as defineComponent, r as deriveDefaultSelection, s as findBestCombination, t as getPricePreview, u as isOptionAvailable, v as resolveBestCombination } from './websocket-BG81_dZv.js';
|
|
5
5
|
|
|
6
6
|
interface CatalogProduct {
|
|
7
7
|
id: string;
|
package/dist/react.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as MockupResult, R as RealtimeRenderError, W as WebSocketConfig, P as PlacementSettings, F as FrameworkAdapter, b as ComponentProps, d as ComponentState, e as ComponentContext, f as ComponentLifecycleHooks, E as EventHandler, c as ComponentDescriptor, g as FrameworkUtilities } from './websocket-
|
|
1
|
+
import { M as MockupResult, R as RealtimeRenderError, W as WebSocketConfig, P as PlacementSettings, F as FrameworkAdapter, b as ComponentProps, d as ComponentState, e as ComponentContext, f as ComponentLifecycleHooks, E as EventHandler, c as ComponentDescriptor, g as FrameworkUtilities } from './websocket-BG81_dZv.cjs';
|
|
2
2
|
|
|
3
3
|
interface UseRealtimeMockupOptions {
|
|
4
4
|
wsUrl?: string;
|
package/dist/react.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as MockupResult, R as RealtimeRenderError, W as WebSocketConfig, P as PlacementSettings, F as FrameworkAdapter, b as ComponentProps, d as ComponentState, e as ComponentContext, f as ComponentLifecycleHooks, E as EventHandler, c as ComponentDescriptor, g as FrameworkUtilities } from './websocket-
|
|
1
|
+
import { M as MockupResult, R as RealtimeRenderError, W as WebSocketConfig, P as PlacementSettings, F as FrameworkAdapter, b as ComponentProps, d as ComponentState, e as ComponentContext, f as ComponentLifecycleHooks, E as EventHandler, c as ComponentDescriptor, g as FrameworkUtilities } from './websocket-BG81_dZv.js';
|
|
2
2
|
|
|
3
3
|
interface UseRealtimeMockupOptions {
|
|
4
4
|
wsUrl?: string;
|
|
@@ -223,6 +223,31 @@ interface WebSocketConfig {
|
|
|
223
223
|
width: number;
|
|
224
224
|
/** Aspect ratio for mockup rendering (e.g. '2:3' for portrait). Server default: '16:9' */
|
|
225
225
|
ar?: string;
|
|
226
|
+
/**
|
|
227
|
+
* Background painted behind the mockup where the scene has alpha — same
|
|
228
|
+
* grammar as the public `bg=` render param: lowercase 6-hex (no '#') or
|
|
229
|
+
* 'transparent' to suppress the shop default. Keeps realtime results
|
|
230
|
+
* consistent with static renders that carry `bg=`.
|
|
231
|
+
*/
|
|
232
|
+
bg?: string;
|
|
233
|
+
/**
|
|
234
|
+
* Spread-mode crop map (ADR-0060): when the client canvas runs combined
|
|
235
|
+
* spread/group artboards, each canvas_state render of that artboard is
|
|
236
|
+
* cropped server-side into per-placement images by these bounds. Keyed by
|
|
237
|
+
* artboard name; piece rects are in artboard units and `placement` must be
|
|
238
|
+
* the product's placement label.
|
|
239
|
+
*/
|
|
240
|
+
spreadCrops?: Record<string, {
|
|
241
|
+
width: number;
|
|
242
|
+
height: number;
|
|
243
|
+
pieces: Array<{
|
|
244
|
+
placement: string;
|
|
245
|
+
x: number;
|
|
246
|
+
y: number;
|
|
247
|
+
width: number;
|
|
248
|
+
height: number;
|
|
249
|
+
}>;
|
|
250
|
+
}>;
|
|
226
251
|
placementSettings?: Record<string, PlacementSettings>;
|
|
227
252
|
}
|
|
228
253
|
interface MockupResult {
|
|
@@ -223,6 +223,31 @@ interface WebSocketConfig {
|
|
|
223
223
|
width: number;
|
|
224
224
|
/** Aspect ratio for mockup rendering (e.g. '2:3' for portrait). Server default: '16:9' */
|
|
225
225
|
ar?: string;
|
|
226
|
+
/**
|
|
227
|
+
* Background painted behind the mockup where the scene has alpha — same
|
|
228
|
+
* grammar as the public `bg=` render param: lowercase 6-hex (no '#') or
|
|
229
|
+
* 'transparent' to suppress the shop default. Keeps realtime results
|
|
230
|
+
* consistent with static renders that carry `bg=`.
|
|
231
|
+
*/
|
|
232
|
+
bg?: string;
|
|
233
|
+
/**
|
|
234
|
+
* Spread-mode crop map (ADR-0060): when the client canvas runs combined
|
|
235
|
+
* spread/group artboards, each canvas_state render of that artboard is
|
|
236
|
+
* cropped server-side into per-placement images by these bounds. Keyed by
|
|
237
|
+
* artboard name; piece rects are in artboard units and `placement` must be
|
|
238
|
+
* the product's placement label.
|
|
239
|
+
*/
|
|
240
|
+
spreadCrops?: Record<string, {
|
|
241
|
+
width: number;
|
|
242
|
+
height: number;
|
|
243
|
+
pieces: Array<{
|
|
244
|
+
placement: string;
|
|
245
|
+
x: number;
|
|
246
|
+
y: number;
|
|
247
|
+
width: number;
|
|
248
|
+
height: number;
|
|
249
|
+
}>;
|
|
250
|
+
}>;
|
|
226
251
|
placementSettings?: Record<string, PlacementSettings>;
|
|
227
252
|
}
|
|
228
253
|
interface MockupResult {
|