@volter/sdk 0.5.204 → 0.5.206
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/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@volter/sdk",
|
|
3
3
|
"author": "Volter AI, Inc.",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
|
-
"version": "0.5.
|
|
5
|
+
"version": "0.5.206",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
@@ -487,7 +487,7 @@
|
|
|
487
487
|
"@fortawesome/react-fontawesome": "^3.2.0",
|
|
488
488
|
"@storybook/react": "10.6.0",
|
|
489
489
|
"@types/node": "^22.0.0",
|
|
490
|
-
"@volter/project": "0.5.
|
|
490
|
+
"@volter/project": "0.5.206",
|
|
491
491
|
"mediabunny": "1.56.2",
|
|
492
492
|
"postcss": "8.5.28",
|
|
493
493
|
"rrweb": "2.1.6",
|
|
@@ -765,17 +765,11 @@ async function handleDocumentScript(cmd: EditorCommand): Promise<CommandResult>
|
|
|
765
765
|
data: { code: 'DOCUMENT_SCRIPT_UNAVAILABLE', documentId },
|
|
766
766
|
};
|
|
767
767
|
}
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
'against — a document opts in through its `publishContext` prop (the mesh document ' +
|
|
774
|
-
'publishes its session).',
|
|
775
|
-
data: { code: 'DOCUMENT_SCRIPT_UNAVAILABLE', documentId },
|
|
776
|
-
};
|
|
777
|
-
}
|
|
778
|
-
let step: (ctx: unknown, info: { documentId: string }) => unknown;
|
|
768
|
+
// A DOCUMENT WITH NO CONTEXT STILL HAS A PAGE. The step runs with `ctx` null and
|
|
769
|
+
// `info.context` false, so it can read what the page holds (a registry, the module-change bus,
|
|
770
|
+
// resource timing) while the UI board is the active document; refusing left no in-page door at
|
|
771
|
+
// all on that board (2026-10-08, diagnosing its hot reload). The result says it ran context-less.
|
|
772
|
+
let step: (ctx: unknown, info: { documentId: string; context: boolean }) => unknown;
|
|
779
773
|
try {
|
|
780
774
|
step = new Function('ctx', 'info', `return (${src})(ctx, info)`) as typeof step;
|
|
781
775
|
} catch (err) {
|
|
@@ -788,8 +782,11 @@ async function handleDocumentScript(cmd: EditorCommand): Promise<CommandResult>
|
|
|
788
782
|
};
|
|
789
783
|
}
|
|
790
784
|
try {
|
|
791
|
-
const result = await step(context, { documentId });
|
|
792
|
-
return {
|
|
785
|
+
const result = await step(context ?? null, { documentId, context: context !== undefined });
|
|
786
|
+
return {
|
|
787
|
+
ok: true,
|
|
788
|
+
data: { result: result === undefined ? null : result, ...(context === undefined ? { context: false } : {}) },
|
|
789
|
+
};
|
|
793
790
|
} catch (err) {
|
|
794
791
|
return {
|
|
795
792
|
ok: false,
|
|
@@ -61,6 +61,7 @@ import { recordViewportFirstFrame } from '@volter/sdk/kit/viewport-activation-ti
|
|
|
61
61
|
import {
|
|
62
62
|
CANVAS_SCENE_DOCUMENT_ID,
|
|
63
63
|
GAME_DOCUMENT_ID,
|
|
64
|
+
PINNED_ASYNC_DOCUMENT_IDS,
|
|
64
65
|
SCENE_DOCUMENT_ID,
|
|
65
66
|
} from '@volter/sdk/kit/workspace-document-ids';
|
|
66
67
|
import {
|
|
@@ -456,6 +457,13 @@ export function installRootDocuments(
|
|
|
456
457
|
if (open.some((document) => document.descriptor.id === documentId)) return null;
|
|
457
458
|
const board = componentBoardForDocument(documentId);
|
|
458
459
|
if (board) return board.presence() === 'absent' ? board.absentReason() : null;
|
|
460
|
+
// A BOARD NOT REGISTERED YET is no verdict either. Its package installs it after
|
|
461
|
+
// the session's restore has already asked for it (the UI board waits on story
|
|
462
|
+
// discovery, which waits on the first model frame), so answering "named nothing"
|
|
463
|
+
// here failed a restored board view at every start (measured 2026-10-08: "Could
|
|
464
|
+
// not restore shared editor view: No workspace document is named
|
|
465
|
+
// "workspace:ui-components"", then the board opened a few seconds later).
|
|
466
|
+
if (PINNED_ASYNC_DOCUMENT_IDS.has(documentId)) return null;
|
|
459
467
|
return (
|
|
460
468
|
`No workspace document is named "${documentId}". Open in this session: ` +
|
|
461
469
|
`${open.map((document) => document.descriptor.id).join(', ') || '(none)'}. A component ` +
|