@civitai/blocks-react 0.41.0 → 0.42.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.
@@ -168,25 +168,35 @@ export declare const EMPTY_SNAPSHOT: BlockSnapshot;
168
168
  * carries `slotId` and nothing else, so there is no `theme` to set and none is
169
169
  * invented.
170
170
  *
171
- * Always returns a FRESH TOP-LEVEL object — `{ ...ctx }`, never `ctx` itself.
172
- * `options.context` is owned by the dev harness that passed it, so re-using the
173
- * object would let a later `harness.context.theme = …` reach through a
174
- * `BlockSnapshot` the block is entitled to treat as immutable.
171
+ * Always returns a FRESH OBJECT GRAPH — `structuredClone(ctx)`, never `ctx`
172
+ * itself and never anything nested inside it. `options.context` is owned by the
173
+ * dev harness that passed it, so sharing any part of it would let a later
174
+ * `harness.context.theme = …` — or a `harness.context.showcaseImages.push(…)` —
175
+ * reach through a `BlockSnapshot` the block is entitled to treat as immutable.
175
176
  *
176
- * 🔴 It is a SHALLOW copy, and the scope of the guarantee is exactly that. Any
177
- * nested value keeps the caller's identity — for a {@link ModelSlotContext} that
178
- * is `checkpoint` (an object) and `showcaseImages` (an array). A harness that
179
- * mutates `ctx.showcaseImages` IN PLACE after init still reaches the block's
180
- * snapshot; only a whole-key reassignment is fenced off.
177
+ * 🔴 THE DEEP COPY IS PRODUCTION PARITY, NOT DEFENSIVENESS — do not "simplify"
178
+ * it back to `{ ...ctx }` as redundant. `hostContextWithTheme` is imported by
179
+ * exactly two call sites — the two DEV hosts — and both deliver host→block
180
+ * messages with `win.dispatchEvent(new MessageEvent('message', …))`
181
+ * (`mockHost.ts`, `liveHost.ts`): a same-realm synthetic event that passes
182
+ * `data` BY REFERENCE. There is no structured clone anywhere on that path. The
183
+ * real cross-origin `postMessage` in production DOES structured-clone, but
184
+ * production never calls this function — so cloning here is precisely what makes
185
+ * the dev harness behave like the boundary it stands in for, which is the whole
186
+ * point of a dev harness. The previous shallow `{ ...ctx }` left every nested
187
+ * value aliased to the caller's — for a {@link ModelSlotContext} that is
188
+ * `checkpoint` (an object) and `showcaseImages` (an array) — so a harness that
189
+ * mutated `ctx.showcaseImages` IN PLACE after init still reached the block's
190
+ * snapshot, and only a whole-key reassignment was fenced off.
181
191
  *
182
- * 🔴 And nothing downstream deep-copies it for you. `hostContextWithTheme` is
183
- * imported by exactly two call sites — the two DEV hosts — and both deliver
184
- * host→block messages with `win.dispatchEvent(new MessageEvent('message', …))`
185
- * (`mockHost.ts`, `liveHost.ts`) — a same-realm synthetic event that passes
186
- * `data` by reference. The real cross-origin `postMessage` in production does
187
- * structured-clone, but production never calls this function. If the deeper
188
- * guarantee is ever wanted here, it has to be written (a `structuredClone(ctx)`,
189
- * or freezing the nested values) — do not assume the transport provides it.
192
+ * 🔴 IT THROWS ON A NON-CLONEABLE CONTEXT, AND THAT IS THE POINT. A function,
193
+ * class instance, proxy or DOM node in `options.context` makes `structuredClone`
194
+ * raise `DataCloneError` — and production's `postMessage` would raise on exactly
195
+ * the same input, so a silent shallow fallback would re-open the divergence this
196
+ * clone exists to close. A raw `DataCloneError` surfacing from this depth names
197
+ * nothing useful, so it is re-thrown by {@link cloneHostContext} as an error that
198
+ * names this function, the offending slot and the likely cause, with the
199
+ * original attached as `cause`.
190
200
  */
191
201
  export declare function hostContextWithTheme(ctx: BlockContext, theme: Theme): BlockContext;
192
202
  /** Convert a wire `BlockInitPayload` (ISO string expiresAt) into a `BlockSnapshot`. */
@@ -1 +1 @@
1
- {"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../src/internal/transport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,UAAU,EACV,WAAW,EACX,KAAK,EACL,UAAU,EACV,YAAY,EACZ,oBAAoB,EACpB,wBAAwB,EACxB,oBAAoB,EACpB,wBAAwB,EACzB,MAAM,yBAAyB,CAAC;AAEjC;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa;IAC5B,KAAK,EAA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,cAAc,EACzB,IAAI,EAAE,KAAK,EACX,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,oBAAoB,EAAE;IAAE,IAAI,EAAE,KAAK,CAAA;CAAE,CAAC,CAAC,SAAS,CAAC,KAAK,IAAI,GACpF,MAAM,IAAI,CAGZ;AAED,eAAO,MAAM,cAAc,EAAE,aAW5B,CAAC;AAgBF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,KAAK,GAAG,YAAY,CAIlF;AA2BD,uFAAuF;AACvF,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,gBAAgB,GAAG,aAAa,CAezE;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,YAAY,GAAG,UAAU,CAOlE;AAGD;;;GAGG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAGtC;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CAO/C"}
@@ -72,30 +72,63 @@ const SLOT_IDS_CARRYING_THEME = new Set([
72
72
  * carries `slotId` and nothing else, so there is no `theme` to set and none is
73
73
  * invented.
74
74
  *
75
- * Always returns a FRESH TOP-LEVEL object — `{ ...ctx }`, never `ctx` itself.
76
- * `options.context` is owned by the dev harness that passed it, so re-using the
77
- * object would let a later `harness.context.theme = …` reach through a
78
- * `BlockSnapshot` the block is entitled to treat as immutable.
75
+ * Always returns a FRESH OBJECT GRAPH — `structuredClone(ctx)`, never `ctx`
76
+ * itself and never anything nested inside it. `options.context` is owned by the
77
+ * dev harness that passed it, so sharing any part of it would let a later
78
+ * `harness.context.theme = …` — or a `harness.context.showcaseImages.push(…)` —
79
+ * reach through a `BlockSnapshot` the block is entitled to treat as immutable.
79
80
  *
80
- * 🔴 It is a SHALLOW copy, and the scope of the guarantee is exactly that. Any
81
- * nested value keeps the caller's identity — for a {@link ModelSlotContext} that
82
- * is `checkpoint` (an object) and `showcaseImages` (an array). A harness that
83
- * mutates `ctx.showcaseImages` IN PLACE after init still reaches the block's
84
- * snapshot; only a whole-key reassignment is fenced off.
81
+ * 🔴 THE DEEP COPY IS PRODUCTION PARITY, NOT DEFENSIVENESS — do not "simplify"
82
+ * it back to `{ ...ctx }` as redundant. `hostContextWithTheme` is imported by
83
+ * exactly two call sites — the two DEV hosts — and both deliver host→block
84
+ * messages with `win.dispatchEvent(new MessageEvent('message', …))`
85
+ * (`mockHost.ts`, `liveHost.ts`): a same-realm synthetic event that passes
86
+ * `data` BY REFERENCE. There is no structured clone anywhere on that path. The
87
+ * real cross-origin `postMessage` in production DOES structured-clone, but
88
+ * production never calls this function — so cloning here is precisely what makes
89
+ * the dev harness behave like the boundary it stands in for, which is the whole
90
+ * point of a dev harness. The previous shallow `{ ...ctx }` left every nested
91
+ * value aliased to the caller's — for a {@link ModelSlotContext} that is
92
+ * `checkpoint` (an object) and `showcaseImages` (an array) — so a harness that
93
+ * mutated `ctx.showcaseImages` IN PLACE after init still reached the block's
94
+ * snapshot, and only a whole-key reassignment was fenced off.
85
95
  *
86
- * 🔴 And nothing downstream deep-copies it for you. `hostContextWithTheme` is
87
- * imported by exactly two call sites — the two DEV hosts — and both deliver
88
- * host→block messages with `win.dispatchEvent(new MessageEvent('message', …))`
89
- * (`mockHost.ts`, `liveHost.ts`) — a same-realm synthetic event that passes
90
- * `data` by reference. The real cross-origin `postMessage` in production does
91
- * structured-clone, but production never calls this function. If the deeper
92
- * guarantee is ever wanted here, it has to be written (a `structuredClone(ctx)`,
93
- * or freezing the nested values) — do not assume the transport provides it.
96
+ * 🔴 IT THROWS ON A NON-CLONEABLE CONTEXT, AND THAT IS THE POINT. A function,
97
+ * class instance, proxy or DOM node in `options.context` makes `structuredClone`
98
+ * raise `DataCloneError` — and production's `postMessage` would raise on exactly
99
+ * the same input, so a silent shallow fallback would re-open the divergence this
100
+ * clone exists to close. A raw `DataCloneError` surfacing from this depth names
101
+ * nothing useful, so it is re-thrown by {@link cloneHostContext} as an error that
102
+ * names this function, the offending slot and the likely cause, with the
103
+ * original attached as `cause`.
94
104
  */
95
105
  export function hostContextWithTheme(ctx, theme) {
96
- if (!SLOT_IDS_CARRYING_THEME.has(ctx.slotId))
97
- return { ...ctx };
98
- return { ...ctx, theme };
106
+ const copy = cloneHostContext(ctx);
107
+ if (!SLOT_IDS_CARRYING_THEME.has(copy.slotId))
108
+ return copy;
109
+ return { ...copy, theme };
110
+ }
111
+ /**
112
+ * `structuredClone(ctx)` with its `DataCloneError` re-thrown as something that
113
+ * says where it came from and what to do about it. Split out of
114
+ * {@link hostContextWithTheme} so the parity rationale there is not interrupted
115
+ * by error plumbing.
116
+ *
117
+ * Deliberately NOT a fallback: it re-throws rather than degrading to `{ ...ctx }`.
118
+ * A non-cloneable `options.context` is a harness bug that production's real
119
+ * `postMessage` boundary would reject too, and swallowing it here would put the
120
+ * dev host back out of step with the thing it simulates.
121
+ */
122
+ function cloneHostContext(ctx) {
123
+ try {
124
+ return structuredClone(ctx);
125
+ }
126
+ catch (cause) {
127
+ throw new Error(`hostContextWithTheme: the context for slot "${ctx.slotId}" is not structured-cloneable, ` +
128
+ `so it cannot cross a host→block boundary. A dev-supplied \`options.context\` most ` +
129
+ `likely carries a function, a class instance, a proxy or a DOM node; production's ` +
130
+ `cross-origin postMessage would reject the same value. Pass plain JSON-shaped data.`, { cause });
131
+ }
99
132
  }
100
133
  /** Convert a wire `BlockInitPayload` (ISO string expiresAt) into a `BlockSnapshot`. */
101
134
  export function snapshotFromInit(payload) {
@@ -1 +1 @@
1
- {"version":3,"file":"transport.js","sourceRoot":"","sources":["../../src/internal/transport.ts"],"names":[],"mappings":"AA2IA;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,SAAyB,EACzB,OAAwB,EACxB,YAAkB,EAClB,IAA6B;IAE7B,MAAM,OAAO,GAAG,MAAM,SAAS,CAAC,WAAW,C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E,CAAC;AACpB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@civitai/blocks-react",
3
- "version": "0.41.0",
3
+ "version": "0.42.0",
4
4
  "description": "React hooks and iframe transport for Civitai Apps. Pairs with @civitai/app-sdk/blocks.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -50,7 +50,7 @@
50
50
  "react-dom": "^19.0.0",
51
51
  "typescript": "^5.9.2",
52
52
  "vitest": "^4.1.7",
53
- "@civitai/app-sdk": "^0.33.0"
53
+ "@civitai/app-sdk": "^0.34.0"
54
54
  },
55
55
  "publishConfig": {
56
56
  "access": "public"