@seatlayer/js 0.33.0 → 0.34.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/dist/index.cjs +2 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -305,6 +305,17 @@ interface EmbeddedDesignerMessage {
|
|
|
305
305
|
code?: string;
|
|
306
306
|
message?: string;
|
|
307
307
|
meta?: unknown;
|
|
308
|
+
/**
|
|
309
|
+
* Set by the Designer on an error it raised while the editor was already
|
|
310
|
+
* running (a failed autosave, thumbnail upload, reload…). Such an error is
|
|
311
|
+
* about ONE operation, not about the session, so the SDK reports it to the
|
|
312
|
+
* host and leaves the live editor mounted instead of replacing it with the
|
|
313
|
+
* dead-end card. Absent on older Designer builds — see
|
|
314
|
+
* {@link EmbeddedDesigner} for the phase-based fallback.
|
|
315
|
+
*/
|
|
316
|
+
fatal?: boolean;
|
|
317
|
+
/** The operation that failed, when `fatal` is `false` (e.g. `'save'`). */
|
|
318
|
+
action?: string;
|
|
308
319
|
}
|
|
309
320
|
interface EmbeddedDesignerOptions {
|
|
310
321
|
/** The short-lived URL returned by your backend's Designer-session call. */
|
package/dist/index.d.ts
CHANGED
|
@@ -305,6 +305,17 @@ interface EmbeddedDesignerMessage {
|
|
|
305
305
|
code?: string;
|
|
306
306
|
message?: string;
|
|
307
307
|
meta?: unknown;
|
|
308
|
+
/**
|
|
309
|
+
* Set by the Designer on an error it raised while the editor was already
|
|
310
|
+
* running (a failed autosave, thumbnail upload, reload…). Such an error is
|
|
311
|
+
* about ONE operation, not about the session, so the SDK reports it to the
|
|
312
|
+
* host and leaves the live editor mounted instead of replacing it with the
|
|
313
|
+
* dead-end card. Absent on older Designer builds — see
|
|
314
|
+
* {@link EmbeddedDesigner} for the phase-based fallback.
|
|
315
|
+
*/
|
|
316
|
+
fatal?: boolean;
|
|
317
|
+
/** The operation that failed, when `fatal` is `false` (e.g. `'save'`). */
|
|
318
|
+
action?: string;
|
|
308
319
|
}
|
|
309
320
|
interface EmbeddedDesignerOptions {
|
|
310
321
|
/** The short-lived URL returned by your backend's Designer-session call. */
|
package/dist/index.js
CHANGED
|
@@ -595,7 +595,8 @@ var EmbeddedDesigner = class {
|
|
|
595
595
|
this.options.onRequestRelaunch();
|
|
596
596
|
return;
|
|
597
597
|
}
|
|
598
|
-
this.
|
|
598
|
+
const fatal = typeof message.fatal === "boolean" ? message.fatal : cause !== "load" || this.phase !== "ready";
|
|
599
|
+
if (fatal) this.showError(cause);
|
|
599
600
|
this.options.onError?.(message);
|
|
600
601
|
break;
|
|
601
602
|
}
|