@volter/editor-game 0.5.66 → 0.5.68
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/contributions/audio-unlock.service.ts +2 -2
- package/contributions/autoplay.service.ts +1 -1
- package/contributions/bridge.command.ts +3 -3
- package/contributions/build-player.document.tsx +95 -0
- package/contributions/canvas/component-board.service.ts +16 -0
- package/contributions/canvas/design-time-mount.service.ts +45 -0
- package/contributions/canvas-story-capture.service.ts +12 -0
- package/contributions/edit-mode-audio.service.ts +2 -2
- package/contributions/edit-mode-networking.service.ts +1 -1
- package/contributions/gameplay.command.ts +4 -4
- package/contributions/generation.service.ts +1 -1
- package/contributions/godot.style.ts +26 -6
- package/contributions/godot.view.ts +6 -0
- package/contributions/ingest.service.ts +2 -2
- package/contributions/instances.command.ts +1 -1
- package/contributions/navmesh.menu.ts +1 -1
- package/contributions/network-observer.service.ts +14 -0
- package/contributions/play.command.ts +10 -4
- package/contributions/react/component-board.service.ts +1 -1
- package/contributions/react/design-time-mount.service.ts +1 -1
- package/contributions/scene-document.service.ts +3 -3
- package/contributions/state-watch.menu.ts +1 -1
- package/contributions/state-watch.utility.tsx +1 -1
- package/contributions/team-playtest.service.ts +4 -4
- package/contributions/three/component-board.service.ts +1 -1
- package/contributions/three/component-verbs.command.ts +6 -6
- package/contributions/three/three-authoring.service.ts +8 -5
- package/contributions/three-story-capture.service.ts +12 -0
- package/contributions/unity.style.ts +17 -7
- package/contributions/unity.view.ts +6 -0
- package/contributions/unreal.style.ts +10 -2
- package/contributions/unreal.view.ts +5 -0
- package/package.json +21 -10
- package/src/asset-budget/AssetBudgetPanel.tsx +1 -1
- package/src/asset-budget/asset-budget-model.ts +1 -1
- package/src/audio/AudioDebuggerPanel.tsx +1 -1
- package/src/bridge/dispatch.ts +14 -14
- package/src/bridge/live-frames.ts +1 -1
- package/src/bridge/screenshot.ts +3 -3
- package/src/build/BuildProfilesPanel.tsx +14 -3
- package/src/build/build-session.ts +35 -0
- package/src/canvas/canvas-board/CanvasBoardDocument.tsx +749 -0
- package/src/canvas/canvas-board/canvas-board-model.ts +407 -0
- package/src/canvas/canvas-board/canvas-component-board.ts +56 -0
- package/src/canvas/canvas-design-mount.ts +524 -0
- package/src/canvas/design-time-canvas-mount.ts +79 -0
- package/src/coverage/live-authoring-surface.ts +5 -5
- package/src/coverage/live-project-verbs.ts +1 -1
- package/src/coverage/native-system-coverage.ts +5 -5
- package/src/coverage/root-coverage.ts +1 -1
- package/src/coverage/session-coverage.ts +3 -3
- package/src/design-system-stories/ApplicationChrome.stories.tsx +5 -5
- package/src/design-system-stories/InspectorNarrowBodies.stories.tsx +7 -7
- package/src/edit-mode/edit-mode-audio.ts +4 -4
- package/src/edit-mode/edit-mode-networking.ts +2 -2
- package/src/game-document/GameCaptureFrameButton.tsx +1 -1
- package/src/game-document/GameDocument.tsx +2 -2
- package/src/game-document/GamePanel.tsx +4 -4
- package/src/game-document/InstanceInspectorPicker.tsx +2 -2
- package/src/game-document/crowd-debug.ts +1 -1
- package/src/game-document/device-preview.ts +10 -11
- package/src/game-document/physics-debug.ts +1 -1
- package/src/generation/GenerationActivity.tsx +3 -3
- package/src/generation/generation-documents.tsx +5 -5
- package/src/generation/generation-jobs.ts +1 -1
- package/src/host/adapter-runtime-bindings.ts +96 -5
- package/src/host/authoring/babylon-authoring-adapter.ts +6 -6
- package/src/host/authoring/gesture-persist.ts +1 -1
- package/src/host/authoring/ingest-data-writer.ts +1 -1
- package/src/host/authoring/ingest-source-persistence.ts +4 -4
- package/src/host/authoring/mounted-authoring.ts +4 -4
- package/src/host/authoring/phaser-live-authoring-adapter.ts +4 -4
- package/src/host/authoring/pixi-authoring-adapter.ts +178 -31
- package/src/host/authoring/pixi-creatable-kinds.ts +62 -0
- package/src/host/authoring/pixi-creation-site-write-target.ts +2 -2
- package/src/host/authoring/pixi-live-write-target.ts +4 -4
- package/src/host/authoring/pixi-source-identity.ts +3 -3
- package/src/host/authoring/pixi-source-write-target.ts +1709 -0
- package/src/host/authoring/pixi-still-presentation.ts +1 -1
- package/src/host/authoring/pixi-structure-history.ts +2 -2
- package/src/host/authoring/pixi-transform-channels.ts +16 -14
- package/src/host/authoring/source-persistence-backend.ts +3 -3
- package/src/host/authoring/struct-write-pipe.ts +1 -1
- package/src/host/binding-resolver.ts +8 -9
- package/src/host/browser-transpile.ts +1 -1
- package/src/host/canvas-entry-runtime.ts +58 -47
- package/src/host/canvas-preview-frames.ts +482 -0
- package/src/host/components/CameraAuthoringOverlay.tsx +1 -1
- package/src/host/components/HeaderTelemetry.tsx +4 -4
- package/src/host/components/PixiIsolationSceneContent.tsx +11 -11
- package/src/host/components/ThreeIsolationSceneContent.tsx +3 -3
- package/src/host/components/frame-debugger-model.ts +2 -2
- package/src/host/components/header-telemetry-model.ts +2 -2
- package/src/host/components/scene-document.tsx +14 -14
- package/src/host/components/utility-view-state.ts +1 -1
- package/src/host/components/world-root-stage-binding.tsx +12 -12
- package/src/host/components/world-root-stage.ts +70 -49
- package/src/host/coverage/system-adapter-coverage.ts +3 -4
- package/src/host/design-system-stories/fixtures/editor-runtime.tsx +9 -11
- package/src/host/document-preview-three.ts +1 -1
- package/src/host/entry-adjudication.ts +6 -6
- package/src/host/game-css-scope-transform.ts +4 -0
- package/src/host/game-realm-page.ts +1 -1
- package/src/host/gameplay-export.ts +25 -14
- package/src/host/gameplay-recording.ts +5 -5
- package/src/host/gated-globals.ts +2 -2
- package/src/host/history/json-history-resource.ts +1 -1
- package/src/host/projection/pixi.ts +24 -2
- package/src/host/r3f-entry-runtime.ts +65 -34
- package/src/host/react-mount-runtime.ts +7 -48
- package/src/host/realm-services.ts +1 -1
- package/src/host/roots/canvas-root.tsx +373 -0
- package/src/host/roots/r3f-root.tsx +473 -0
- package/src/host/roots/react-root.ts +9 -43
- package/src/host/served-bundle-runtime-modules.ts +3 -19
- package/src/host/server-log-bridge.ts +2 -2
- package/src/host/stories/mounted-story-viewport-source.ts +1 -1
- package/src/host/stories/pixi-story-model.ts +30 -0
- package/src/host/stories/story-media-captures.ts +46 -0
- package/src/host/stories/story-media-presence.ts +3 -3
- package/src/host/stories/story-pixi-preview.ts +408 -0
- package/src/host/stories/story-three-preview.ts +806 -0
- package/src/host/stories/three-story-captures.ts +35 -0
- package/src/host/story-three-preview-runtime.ts +56 -0
- package/src/host/use-active-performance-source.ts +2 -2
- package/src/host/viewport-pose-memory.ts +1 -1
- package/src/host/viewport-root-presentation.ts +6 -5
- package/src/ingest/active-ingest.ts +1 -1
- package/src/ingest/authoring/ingest-dom-surface-authoring.ts +4 -4
- package/src/ingest/authoring/ingest-root-adapter.ts +8 -8
- package/src/ingest/deferred-ingest-play.ts +6 -6
- package/src/ingest/discovery-public-ingest.ts +2 -2
- package/src/ingest/ingest-boot-viewport.ts +2 -2
- package/src/ingest/ingest-canvas-scene-document.tsx +9 -9
- package/src/ingest/ingest-canvas-scene.ts +3 -3
- package/src/ingest/ingest-evidence-hook.ts +1 -1
- package/src/ingest/ingest-frame-snapshot.ts +1 -1
- package/src/ingest/ingest-play-control.ts +1 -1
- package/src/ingest/ingest-render-debug.ts +10 -10
- package/src/ingest/ingest-siblings.ts +13 -25
- package/src/ingest/module-mode.ts +14 -14
- package/src/ingest/mount-canvas-ingest-root.ts +21 -21
- package/src/ingest/mount-coverage.ts +2 -2
- package/src/ingest/mount-dom-ingest-root.ts +11 -11
- package/src/ingest/mount-ingest-root.ts +8 -8
- package/src/ingest/mount-three-ingest-root.ts +8 -8
- package/src/ingest/resolve-canvas.ts +1 -1
- package/src/ingest/served-html-boot.ts +1 -1
- package/src/ingest/surface-canvas.ts +1 -1
- package/src/ingest/unmount-ingest-root.ts +5 -5
- package/src/navmesh/navmesh-handler.ts +24 -16
- package/src/network/NetworkInspectorPanel.tsx +939 -37
- package/src/network/network-inspector-model.ts +20 -2
- package/src/play/play-log-events.ts +1 -1
- package/src/play/play-mode.ts +76 -133
- package/src/play/play-recording.ts +1 -1
- package/src/play/react-play-live-authoring.ts +3 -3
- package/src/play/run-selection.ts +93 -0
- package/src/play-bar/PlayBar.tsx +20 -39
- package/src/profiler/FrameDebuggerPanel.tsx +1 -1
- package/src/profiler/PerformancePanel.tsx +3 -3
- package/src/react/design-time-react-mount.ts +23 -65
- package/src/react/dom-authoring-adapter.ts +9 -9
- package/src/react/react-inspector-section.tsx +5 -5
- package/src/react/react-world-authoring-adapter.ts +11 -11
- package/src/react/story-documents/story-documents.tsx +9 -9
- package/src/react/ui-board-document.tsx +7 -7
- package/src/react/ui-component-board.ts +2 -2
- package/src/runtime/adapter/audio-meter.ts +21 -0
- package/src/runtime/adapter/first-party-audio-system.ts +230 -0
- package/src/runtime/adapter/ingest/contract-debug-adapter.ts +114 -0
- package/src/runtime/adapter/ingest/contract-system-adapters.ts +256 -0
- package/src/runtime/adapter/ingest/merge-debug-adapters.ts +197 -0
- package/src/runtime/adapter/ingest/observation-debug-adapter.ts +162 -0
- package/src/runtime/adapter/ingest/upstream-pin.ts +51 -0
- package/src/runtime/adapter/native-debug-module.ts +498 -0
- package/src/runtime/audio/bus-mixer.ts +161 -0
- package/src/runtime/audio/pose-guard.ts +80 -0
- package/src/runtime/core/frame-pacing.ts +126 -0
- package/src/runtime/core/game-loop.ts +225 -0
- package/src/runtime/core/game-scoped-slot.ts +28 -0
- package/src/runtime/core/seeded-random.ts +162 -0
- package/src/runtime/core/sim-clock.ts +391 -0
- package/src/runtime/core/system-runner.ts +269 -0
- package/src/runtime/core/types.ts +104 -0
- package/src/runtime/create-runtime.ts +1128 -0
- package/src/runtime/debug-bridge.ts +570 -0
- package/src/runtime/debug-registry.ts +899 -0
- package/src/runtime/dev/chrome-trace.ts +153 -0
- package/src/runtime/dev/instruments.ts +403 -0
- package/src/runtime/dev/logger.ts +119 -0
- package/src/runtime/dev/performance-profiler.ts +367 -0
- package/src/runtime/dev/register-render-vitals.ts +276 -0
- package/src/runtime/dev/render-census.ts +354 -0
- package/src/runtime/dev/render-debug-adapter.ts +218 -0
- package/src/runtime/dev/render-memory.ts +226 -0
- package/src/runtime/dev/render-vitals.ts +338 -0
- package/src/runtime/dev/static-batch-advisor.ts +188 -0
- package/src/runtime/dev/webgl-frame-capture.ts +366 -0
- package/src/runtime/dev/webgl-gpu-timer.ts +53 -0
- package/src/runtime/dev-build.ts +47 -0
- package/src/runtime/game.ts +1636 -0
- package/src/runtime/gameplay-rng-trap.ts +135 -0
- package/src/runtime/host-context.ts +64 -0
- package/src/runtime/input-router.ts +182 -0
- package/src/runtime/mount-manifest.ts +480 -0
- package/src/runtime/pixi/authoring.ts +706 -0
- package/src/runtime/pixi/ingest.ts +116 -0
- package/src/runtime/pixi/physics-registry.ts +49 -0
- package/src/runtime/pixi/render-pass-bracket.ts +117 -0
- package/src/runtime/pixi/scene-capture.ts +179 -0
- package/src/runtime/pixi/system-adapters.ts +69 -0
- package/src/runtime/playtest.ts +22 -0
- package/src/runtime/presentation.ts +141 -0
- package/src/runtime/render-control.ts +642 -0
- package/src/runtime/render-seed.ts +77 -0
- package/src/runtime/run-ticks-settled.ts +73 -0
- package/src/runtime/setup/setup-audio.ts +72 -0
- package/src/services/audio-pose-guard.ts +2 -2
- package/src/services/game-audio.ts +152 -0
- package/src/services/game-network.ts +767 -0
- package/src/services/game-physics.ts +334 -0
- package/src/state-watch/StateWatchPanel.tsx +1 -1
- package/src/three/authoring/camera-runtime-inspector-section.tsx +3 -2
- package/src/three/authoring/constraint-inspector-section.tsx +6 -5
- package/src/three/authoring/model-asset-inspector-section.tsx +7 -6
- package/src/three/authoring/oid-source-persistence.ts +7 -7
- package/src/three/authoring/r3f-design-session.ts +58 -54
- package/src/three/authoring/r3f-source-authoring-adapter.ts +95 -91
- package/src/three/authoring/reflection-probe-inspector-section.tsx +3 -2
- package/src/three/authoring/three-authoring-adapter.ts +29 -29
- package/src/three/component-verbs/extract-menu.ts +7 -6
- package/src/three/component-verbs/fork-menu.ts +7 -6
- package/src/three/component-verbs/internals-menu.ts +2 -2
- package/src/three/story-documents/three-story-documents.tsx +13 -13
- package/src/three/three-board/ThreeBoardDocument.tsx +13 -12
- package/src/three/three-board/board-scene.ts +6 -6
- package/src/three/three-board/three-component-board.ts +2 -2
- package/src/services/game-audio-unlock.ts +0 -48
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WHAT PLAY RUNS BESIDE THE HOST: the run configuration the person chose (kept per checkout in the
|
|
3
|
+
* project-local document, the way an IDE remembers its launch configuration), started before the
|
|
4
|
+
* game mounts and stopped with it. One module, so the Play button and the relayed `play` verb start
|
|
5
|
+
* the same thing — a multiplayer game's `play + server` brings its room server up either way.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { editorHost } from '@volter/editor-sdk/host';
|
|
9
|
+
import {
|
|
10
|
+
type ConfigurationStatus,
|
|
11
|
+
listConfigurations,
|
|
12
|
+
startConfiguration,
|
|
13
|
+
stopConfiguration,
|
|
14
|
+
} from '../host/api/configurations';
|
|
15
|
+
import { setDesiredExtraInstances } from './play-mode';
|
|
16
|
+
|
|
17
|
+
/** The implicit configuration: mount every root in the host. */
|
|
18
|
+
export const PLAY_CONFIGURATION = 'play';
|
|
19
|
+
const RUN_SELECTION_SECTION = 'runSelection';
|
|
20
|
+
|
|
21
|
+
/** The configuration the person picked, or null when they have not. */
|
|
22
|
+
export function chosenRunConfiguration(): string | null {
|
|
23
|
+
return editorHost().projectLocalState.read<string>(RUN_SELECTION_SECTION) ?? null;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function chooseRunConfiguration(id: string): void {
|
|
27
|
+
editorHost().projectLocalState.write(RUN_SELECTION_SECTION, id);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* What Play starts: the person's pick, else the first declared compound that runs the host
|
|
32
|
+
* (`play + server`), as an IDE opens on its first launch configuration; a project with none plays
|
|
33
|
+
* alone.
|
|
34
|
+
*/
|
|
35
|
+
export function selectedRunConfiguration(
|
|
36
|
+
declared: readonly ConfigurationStatus[],
|
|
37
|
+
chosen: string | null = chosenRunConfiguration(),
|
|
38
|
+
): string {
|
|
39
|
+
return (
|
|
40
|
+
chosen ??
|
|
41
|
+
declared.find((c) => c.role === 'run' && c.kind === 'compound' && c.run?.includes(PLAY_CONFIGURATION))?.id ??
|
|
42
|
+
PLAY_CONFIGURATION
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export type RunStart =
|
|
47
|
+
| { readonly ok: true; readonly started: string | null }
|
|
48
|
+
| { readonly ok: false; readonly title: string; readonly detail: string };
|
|
49
|
+
|
|
50
|
+
let running: string | null = null;
|
|
51
|
+
|
|
52
|
+
/** Start the selected configuration's processes (nothing for bare `play`), and say whether Play may
|
|
53
|
+
* go on. */
|
|
54
|
+
export async function startSelectedRunConfiguration(): Promise<RunStart> {
|
|
55
|
+
const declared = await listConfigurations().catch(() => [] as ConfigurationStatus[]);
|
|
56
|
+
const id = selectedRunConfiguration(declared);
|
|
57
|
+
const selected = declared.find((c) => c.id === id);
|
|
58
|
+
if (!selected || id === PLAY_CONFIGURATION) return { ok: true, started: null };
|
|
59
|
+
let outcome: Awaited<ReturnType<typeof startConfiguration>>;
|
|
60
|
+
try {
|
|
61
|
+
outcome = await startConfiguration(selected.id);
|
|
62
|
+
} catch (error) {
|
|
63
|
+
return { ok: false, title: `Run "${selected.id}"`, detail: error instanceof Error ? error.message : String(error) };
|
|
64
|
+
}
|
|
65
|
+
if (!outcome.ready) {
|
|
66
|
+
return {
|
|
67
|
+
ok: false,
|
|
68
|
+
title: `Run "${selected.id}" is not ready`,
|
|
69
|
+
detail: Object.entries(outcome.logs)
|
|
70
|
+
.map(([name, lines]) => `${name}: ${lines.slice(-3).join(' | ') || 'no output'}`)
|
|
71
|
+
.join('\n'),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
if (selected.kind === 'compound' && selected.instances != null) {
|
|
75
|
+
setDesiredExtraInstances(Math.max(0, selected.instances - 1));
|
|
76
|
+
}
|
|
77
|
+
running = selected.id;
|
|
78
|
+
return { ok: true, started: selected.id };
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/** Stop what the last Play started beside the host. */
|
|
82
|
+
export async function stopStartedRunConfiguration(): Promise<void> {
|
|
83
|
+
const id = running;
|
|
84
|
+
running = null;
|
|
85
|
+
if (!id) return;
|
|
86
|
+
await stopConfiguration(id).catch((error: unknown) =>
|
|
87
|
+
editorHost().notify({
|
|
88
|
+
tone: 'error',
|
|
89
|
+
title: `Stop "${id}"`,
|
|
90
|
+
detail: error instanceof Error ? error.message : String(error),
|
|
91
|
+
}),
|
|
92
|
+
);
|
|
93
|
+
}
|
package/src/play-bar/PlayBar.tsx
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import { type ConfigurationStatus, listConfigurations } from '../host/api/configurations';
|
|
1
2
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
chooseRunConfiguration,
|
|
4
|
+
chosenRunConfiguration,
|
|
5
|
+
PLAY_CONFIGURATION,
|
|
6
|
+
selectedRunConfiguration,
|
|
7
|
+
startSelectedRunConfiguration,
|
|
8
|
+
stopStartedRunConfiguration,
|
|
9
|
+
} from '../play/run-selection';
|
|
10
|
+
import { isGameplayExportActive, subscribeGameplayExport } from '@volter/editor-sdk/kit/gameplay-export-state';
|
|
8
11
|
import { PLAY_CONTROL_TEST_ID } from '../host/play-control-hook';
|
|
9
12
|
import type { IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
|
10
13
|
import { faChevronDown } from '@fortawesome/free-solid-svg-icons';
|
|
@@ -31,7 +34,6 @@ import {
|
|
|
31
34
|
getRestartRequiredReason,
|
|
32
35
|
pausePlayMode,
|
|
33
36
|
resumePlayMode,
|
|
34
|
-
setDesiredExtraInstances,
|
|
35
37
|
stepPlayMode,
|
|
36
38
|
subscribeRestartRequired,
|
|
37
39
|
} from '../play/play-mode';
|
|
@@ -288,36 +290,17 @@ export function PlayBar({ placement = 'launcher' }: { placement?: 'launcher' | '
|
|
|
288
290
|
const selected = run.configurations.find((c) => c.id === run.selectedId) ?? null;
|
|
289
291
|
const instances = selected?.kind === 'compound' ? (selected.instances ?? null) : null;
|
|
290
292
|
const play = async () => {
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
title: `Run "${selected.id}"`,
|
|
296
|
-
detail: error instanceof Error ? error.message : String(error),
|
|
297
|
-
});
|
|
298
|
-
return null;
|
|
299
|
-
});
|
|
300
|
-
if (!outcome) return;
|
|
301
|
-
if (!outcome.ready) {
|
|
302
|
-
editorHost().notify({
|
|
303
|
-
tone: 'error',
|
|
304
|
-
title: `Run "${selected.id}" is not ready`,
|
|
305
|
-
detail: Object.entries(outcome.logs)
|
|
306
|
-
.map(([id, lines]) => `${id}: ${lines.slice(-3).join(' | ') || 'no output'}`)
|
|
307
|
-
.join('\n'),
|
|
308
|
-
});
|
|
309
|
-
return;
|
|
310
|
-
}
|
|
311
|
-
if (instances !== null) setDesiredExtraInstances(Math.max(0, instances - 1));
|
|
312
|
-
void run.refresh();
|
|
293
|
+
const start = await startSelectedRunConfiguration();
|
|
294
|
+
if (!start.ok) {
|
|
295
|
+
editorHost().notify({ tone: 'error', title: start.title, detail: start.detail });
|
|
296
|
+
return;
|
|
313
297
|
}
|
|
298
|
+
if (start.started) void run.refresh();
|
|
314
299
|
await enterPlayMode();
|
|
315
300
|
};
|
|
316
301
|
const stop = () => {
|
|
317
302
|
exitPlayMode();
|
|
318
|
-
|
|
319
|
-
void stopConfiguration(selected.id).then(() => run.refresh());
|
|
320
|
-
}
|
|
303
|
+
void stopStartedRunConfiguration().then(() => run.refresh());
|
|
321
304
|
};
|
|
322
305
|
return (
|
|
323
306
|
<PlayBarView
|
|
@@ -388,8 +371,7 @@ function PlayOptions() {
|
|
|
388
371
|
}
|
|
389
372
|
|
|
390
373
|
/** The implicit configuration: mount every root in the host. */
|
|
391
|
-
const PLAY_ID =
|
|
392
|
-
const RUN_SELECTION_SECTION = 'runSelection';
|
|
374
|
+
const PLAY_ID = PLAY_CONFIGURATION;
|
|
393
375
|
|
|
394
376
|
interface RunState {
|
|
395
377
|
readonly configurations: readonly ConfigurationStatus[];
|
|
@@ -403,9 +385,7 @@ interface RunState {
|
|
|
403
385
|
* document, the way an IDE remembers the chosen launch configuration. */
|
|
404
386
|
function useRunConfigurations(): RunState {
|
|
405
387
|
const [declared, setDeclared] = useState<readonly ConfigurationStatus[]>([]);
|
|
406
|
-
const [
|
|
407
|
-
() => editorHost().projectLocalState.read<string>(RUN_SELECTION_SECTION) ?? PLAY_ID,
|
|
408
|
-
);
|
|
388
|
+
const [chosenId, setChosenId] = useState<string | null>(chosenRunConfiguration);
|
|
409
389
|
const refresh = useCallback(async () => {
|
|
410
390
|
const list = await listConfigurations().catch(() => []);
|
|
411
391
|
setDeclared(list);
|
|
@@ -426,9 +406,10 @@ function useRunConfigurations(): RunState {
|
|
|
426
406
|
],
|
|
427
407
|
[declared],
|
|
428
408
|
);
|
|
409
|
+
const selectedId = selectedRunConfiguration(declared, chosenId);
|
|
429
410
|
const select = useCallback((id: string) => {
|
|
430
|
-
|
|
431
|
-
|
|
411
|
+
setChosenId(id);
|
|
412
|
+
chooseRunConfiguration(id);
|
|
432
413
|
}, []);
|
|
433
414
|
return { configurations, selectedId, select, refresh };
|
|
434
415
|
}
|
|
@@ -32,7 +32,7 @@ import { Button, themeVars } from '@volter/editor-sdk/widgets';
|
|
|
32
32
|
import type {
|
|
33
33
|
FrameCapture,
|
|
34
34
|
FrameCaptureDrawCall,
|
|
35
|
-
} from '
|
|
35
|
+
} from '../runtime/dev/webgl-frame-capture';
|
|
36
36
|
import { useEffect, useState, useSyncExternalStore } from 'react';
|
|
37
37
|
import {
|
|
38
38
|
captureFrame,
|
|
@@ -30,13 +30,13 @@ import {
|
|
|
30
30
|
spaceVar,
|
|
31
31
|
themeVars,
|
|
32
32
|
} from '@volter/editor-sdk/widgets';
|
|
33
|
-
import { buildChromeTrace } from '
|
|
33
|
+
import { buildChromeTrace } from '../runtime/dev/chrome-trace';
|
|
34
34
|
import type {
|
|
35
35
|
PerformanceFrame,
|
|
36
36
|
PerformanceProfiler,
|
|
37
37
|
PerformanceSnapshot,
|
|
38
|
-
} from '
|
|
39
|
-
import type { RenderMemorySnapshot } from '
|
|
38
|
+
} from '../runtime/dev/performance-profiler';
|
|
39
|
+
import type { RenderMemorySnapshot } from '../runtime/dev/render-memory';
|
|
40
40
|
import { useEffect, useRef, useState } from 'react';
|
|
41
41
|
import { createMainThreadBusySampler, type MainThreadBusySampler } from './main-thread-busy';
|
|
42
42
|
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
* composed story of the project laid out as an isolated, labeled frame, with
|
|
5
5
|
* the root entry's own story (derived, never labeled — the story whose CSF
|
|
6
6
|
* `meta.component` is the entry's default export) as the frame it opens on.
|
|
7
|
-
* A project with no stories falls back to mounting the entry once
|
|
8
|
-
* inert Game.
|
|
7
|
+
* A project with no stories falls back to mounting the entry once, bare.
|
|
9
8
|
*
|
|
10
9
|
* ## Why this is a package and not the host's
|
|
11
10
|
*
|
|
@@ -58,36 +57,33 @@
|
|
|
58
57
|
import type {
|
|
59
58
|
DesignTimeRootDescriptor,
|
|
60
59
|
LayerMountResult,
|
|
61
|
-
} from '@volter/editor-
|
|
60
|
+
} from '@volter/editor-sdk/kit/authoring/design-time-layers';
|
|
62
61
|
import {
|
|
63
62
|
rememberedPortableStory,
|
|
64
63
|
rememberPortableStory,
|
|
65
|
-
} from '@volter/editor-
|
|
66
|
-
import type { DesignTimeMountContext } from '@volter/editor-
|
|
64
|
+
} from '@volter/editor-sdk/kit/authoring/design-time-layers';
|
|
65
|
+
import type { DesignTimeMountContext } from '@volter/editor-sdk/kit/authoring/design-time-mount-registry';
|
|
67
66
|
import { formatMountFailureMessage } from '@volter/editor-sdk/kit/mount-failure-report';
|
|
68
|
-
import type { ReactStoryBoardSelectionIntent } from '@volter/editor-
|
|
69
|
-
import { createReactStoryBoard } from '@volter/editor-
|
|
67
|
+
import type { ReactStoryBoardSelectionIntent } from '@volter/editor-sdk/kit/authoring/react-story-board';
|
|
68
|
+
import { createReactStoryBoard } from '@volter/editor-sdk/kit/authoring/react-story-board';
|
|
70
69
|
import {
|
|
71
70
|
getRootCanvasViewport,
|
|
72
71
|
setRootCanvasViewport,
|
|
73
72
|
} from '@volter/editor-sdk/kit/world-canvas-viewport-state';
|
|
74
73
|
import { recordAuthoringConsumerUse } from '@volter/editor-sdk/kit/authoring-seam-evidence';
|
|
75
74
|
import { CrashNullBoundary } from '@volter/editor-sdk/kit/crash-null-boundary';
|
|
76
|
-
import { readProjectTextFile } from '@volter/editor-
|
|
75
|
+
import { readProjectTextFile } from '@volter/editor-sdk/kit/editor-api';
|
|
77
76
|
import { editorConsole } from '@volter/editor-sdk/kit/editor-console';
|
|
78
|
-
import {
|
|
79
|
-
resolveReactRootMountRuntime,
|
|
80
|
-
resolveWorldProviderForProject,
|
|
81
|
-
} from '../host/react-mount-runtime';
|
|
77
|
+
import { resolveReactRootMountRuntime } from '../host/react-mount-runtime';
|
|
82
78
|
import { activeRealmServices } from '../host/realm-services';
|
|
83
79
|
import { resolveReactAdapterRootComponent } from '../host/roots/react-root';
|
|
84
|
-
import { scopedGameStylesState } from '@volter/editor-
|
|
85
|
-
import { componentIdentityName } from '@volter/editor-
|
|
86
|
-
import { mountIsolatedStory } from '@volter/editor-
|
|
80
|
+
import { scopedGameStylesState } from '@volter/editor-sdk/kit/scoped-game-css';
|
|
81
|
+
import { componentIdentityName } from '@volter/editor-sdk/kit/stories/compose-project-stories';
|
|
82
|
+
import { mountIsolatedStory } from '@volter/editor-sdk/kit/stories/StoryPreviewMount';
|
|
87
83
|
import {
|
|
88
84
|
createStoryPresentationIndex,
|
|
89
85
|
storyBoardPresentation,
|
|
90
|
-
} from '@volter/editor-
|
|
86
|
+
} from '@volter/editor-sdk/kit/stories/story-presentation';
|
|
91
87
|
import {
|
|
92
88
|
getComponentPreviewStory,
|
|
93
89
|
getProjectPreviewStories,
|
|
@@ -96,15 +92,12 @@ import {
|
|
|
96
92
|
projectStoriesReady,
|
|
97
93
|
refreshProjectStories,
|
|
98
94
|
subscribeProjectStoryModules,
|
|
99
|
-
} from '@volter/editor-
|
|
100
|
-
import { domStoryBoardMembers } from '@volter/editor-
|
|
101
|
-
import { getDesignTokens } from '@volter/editor-
|
|
102
|
-
import { tierSourceWriteBackend } from '@volter/editor-
|
|
95
|
+
} from '@volter/editor-sdk/kit/stories/story-registry';
|
|
96
|
+
import { domStoryBoardMembers } from '@volter/editor-threejs/kit/stories/three-story-model';
|
|
97
|
+
import { getDesignTokens } from '@volter/editor-sdk/kit/ui-source/inspect';
|
|
98
|
+
import { tierSourceWriteBackend } from '@volter/editor-sdk/kit/ui-source/tier-source-write-backend';
|
|
103
99
|
import { recordViewportFirstFrame } from '@volter/editor-sdk/kit/viewport-activation-timings';
|
|
104
|
-
import { createAssetCache } from '@volter/threejs-runtime/assets';
|
|
105
|
-
import { createGameLoop } from '@volter/game-runtime/core/game-loop';
|
|
106
100
|
import type { ResolvedAdapterRoot } from '@volter/editor-project/manifest/load';
|
|
107
|
-
import { createGame, type GameInternal } from '@volter/game-runtime/runtime/game';
|
|
108
101
|
import { beginProjectMountEpoch } from '@volter/editor-sdk/session/project-module-url';
|
|
109
102
|
import type { ComponentType } from 'react';
|
|
110
103
|
import { type OidElementLike, ReactRootAuthoringAdapter } from './react-world-authoring-adapter';
|
|
@@ -167,35 +160,6 @@ async function seedRootViewportFromManifest(): Promise<void> {
|
|
|
167
160
|
// An unreadable manifest declares nothing; Fill stands.
|
|
168
161
|
}
|
|
169
162
|
}
|
|
170
|
-
/**
|
|
171
|
-
* The inert design-time Game stand-in (B1's one genuine design
|
|
172
|
-
* decision). A REAL `Game` — never a hand-typed duck-typed literal, mirroring
|
|
173
|
-
* this repo's own test convention (`packages/editor/test/adapter-conformance-kit.ts`'s
|
|
174
|
-
* `headlessGame()`) — built with a loop that is constructed but NEVER
|
|
175
|
-
* started/ticked, and with NO roots ever registered. This satisfies
|
|
176
|
-
* `useGame`/`useWorldState` (`@volter/game-runtime/react/world-state`, and any project's own
|
|
177
|
-
* re-export of it) without throwing, genuinely inertly:
|
|
178
|
-
* - `state.subscribe` never fires — nothing ever calls
|
|
179
|
-
* `GameStateBridgeInternal.bump()` (only `GameInternal.runFrame` does, and
|
|
180
|
-
* this Game's loop never runs a frame);
|
|
181
|
-
* - `state.frameVersion` stays `0` forever;
|
|
182
|
-
* - `queryByComponent`/`world()`/`roots` are empty/`null` because `roots`
|
|
183
|
-
* stays `[]` (nothing ever calls `registerRoot`).
|
|
184
|
-
* `defaultRoot`/`components`/`input`/`audio` throw descriptively if touched
|
|
185
|
-
* (same as any fresh `createGame()` before a world registers) — a HUD that
|
|
186
|
-
* reaches for those is out of scope for a design-time stand-in and SHOULD
|
|
187
|
-
* throw loudly, caught by the crash-null boundary below, degrading to the
|
|
188
|
-
* #18 error node rather than silently faking a value.
|
|
189
|
-
*
|
|
190
|
-
* B2 swaps this stand-in's DATA for story-sourced data (a `data`/services
|
|
191
|
-
* seam) — this function is the seam B2 replaces/extends, not a permanent
|
|
192
|
-
* fixture; it never constructs a live Game/sockets.
|
|
193
|
-
*/
|
|
194
|
-
function createDesignTimeGame(): GameInternal {
|
|
195
|
-
const loop = createGameLoop({ fixedTimestep: 1 / 60, maxSubSteps: 8, update: () => {} });
|
|
196
|
-
return createGame({ loop, assets: createAssetCache() });
|
|
197
|
-
}
|
|
198
|
-
|
|
199
163
|
/**
|
|
200
164
|
* A minimal `ResolvedAdapterRoot` satisfying `resolveReactAdapterRootComponent`
|
|
201
165
|
* (`../binding-resolver.ts`, which reads only `id`/`kind`/`entry` off
|
|
@@ -231,7 +195,7 @@ type EntryResolution = { ok: true; Entry: ComponentType } | { ok: false; error:
|
|
|
231
195
|
/**
|
|
232
196
|
* Load a React root's entry component ONCE per layer mount, without throwing.
|
|
233
197
|
* Both of this layer's paths need it: the derived default story is joined
|
|
234
|
-
* against this component's identity, and the
|
|
198
|
+
* against this component's identity, and the no-story fallback renders it.
|
|
235
199
|
* A failure is carried rather than thrown so the story board can still open
|
|
236
200
|
* over a project whose entry is broken; only the fallback (which has nothing
|
|
237
201
|
* else to render) rethrows it.
|
|
@@ -254,16 +218,14 @@ async function resolveEntryComponent(
|
|
|
254
218
|
/**
|
|
255
219
|
* React design-time mount — the entry
|
|
256
220
|
* via the EXISTING #31 loader (`resolveReactAdapterRootComponent`, reused
|
|
257
|
-
* verbatim),
|
|
258
|
-
* (`resolveWorldProviderForProject`) around the inert
|
|
259
|
-
* `createDesignTimeGame()` stand-in and a React error boundary.
|
|
221
|
+
* verbatim), rendered inside a React error boundary.
|
|
260
222
|
* `flushSync` forces the initial render/commit/error-boundary-recovery to
|
|
261
223
|
* finish before this call returns (mirrors `ingest-siblings.ts`'s
|
|
262
224
|
* `mountDefaultReactSibling`), so a throwing entry is caught HERE —
|
|
263
225
|
* synchronously — rather than discovered later on react's own schedule.
|
|
264
226
|
*
|
|
265
227
|
* Portable CSF stories take the board path above. This branch is only the
|
|
266
|
-
* explicit no-story fallback and mounts the entry once
|
|
228
|
+
* explicit no-story fallback and mounts the entry once.
|
|
267
229
|
* On success, it mints the world's live `ReactRootAuthoringAdapter` over this
|
|
268
230
|
* layer's now-mounted DOM — the adapter reflects
|
|
269
231
|
* an already-mounted root, it never mounts one itself; this function is the
|
|
@@ -297,8 +259,7 @@ export async function mountReactDesignLayer(
|
|
|
297
259
|
// Edit mode lays EVERY composed story of the project out as an isolated,
|
|
298
260
|
// labeled frame on one editor-only board — board membership is
|
|
299
261
|
// project-global, the project's own component gallery. Play still tears
|
|
300
|
-
// this entire surface down and mounts only the manifest entry
|
|
301
|
-
// real Game.
|
|
262
|
+
// this entire surface down and mounts only the manifest entry.
|
|
302
263
|
//
|
|
303
264
|
// A remount that the registry's own publish requested already has fresh
|
|
304
265
|
// stories: refreshing again would reload every story module in parallel —
|
|
@@ -315,7 +276,7 @@ export async function mountReactDesignLayer(
|
|
|
315
276
|
|
|
316
277
|
// The root's composed default preview is DERIVED, never labeled: it is the
|
|
317
278
|
// story whose CSF `meta.component` is this root entry's default-exported
|
|
318
|
-
// component. Resolve that component first (the same loader the
|
|
279
|
+
// component. Resolve that component first (the same loader the no-story
|
|
319
280
|
// fallback below reuses), then ask the registry for its story.
|
|
320
281
|
//
|
|
321
282
|
// The join is by component NAME, not function identity, and that is
|
|
@@ -615,12 +576,11 @@ export async function mountReactDesignLayer(
|
|
|
615
576
|
`[design-time-layers] React root "${candidate.worldId}" has no portable CSF preview — the ` +
|
|
616
577
|
'project declares no UI stories. Add a *.stories.tsx; give it a `meta.component` of ' +
|
|
617
578
|
`this root's entry component${entryComponentName ? ` (${entryComponentName}, ${candidate.path})` : ''} ` +
|
|
618
|
-
'to make it this root’s default preview. Falling back to the
|
|
579
|
+
'to make it this root’s default preview. Falling back to rendering the entry bare.',
|
|
619
580
|
'authoring',
|
|
620
581
|
);
|
|
621
582
|
|
|
622
583
|
const Entry = entry.Entry;
|
|
623
|
-
const WorldProvider = await resolveWorldProviderForProject();
|
|
624
584
|
// C1 (phase-b/c1-react-mount): this layer's own react-world mount is a
|
|
625
585
|
// SECOND call site with the identical packaged-runtime dual-React-instance
|
|
626
586
|
// exposure `binding-resolver.ts`'s `ReactRootAdapter.mount()` has — under
|
|
@@ -628,14 +588,13 @@ export async function mountReactDesignLayer(
|
|
|
628
588
|
// from the PROJECT's own react, not this module's (removed) static
|
|
629
589
|
// imports. See `resolveReactRootMountRuntime`'s doc comment.
|
|
630
590
|
const { createElement, createRoot, flushSync } = await resolveReactRootMountRuntime();
|
|
631
|
-
const game = createDesignTimeGame();
|
|
632
591
|
const root = createRoot(layer);
|
|
633
592
|
const render = (onCaught: (error: unknown) => void): void => {
|
|
634
593
|
root.render(
|
|
635
594
|
createElement(CrashNullBoundary, {
|
|
636
595
|
key: '__entry__',
|
|
637
596
|
onCaught,
|
|
638
|
-
children: createElement(
|
|
597
|
+
children: createElement(Entry),
|
|
639
598
|
}),
|
|
640
599
|
);
|
|
641
600
|
};
|
|
@@ -668,7 +627,6 @@ export async function mountReactDesignLayer(
|
|
|
668
627
|
// but this keeps teardown clean).
|
|
669
628
|
adapter.disposeReactRootAdapter();
|
|
670
629
|
root.unmount();
|
|
671
|
-
game.dispose();
|
|
672
630
|
},
|
|
673
631
|
};
|
|
674
632
|
}
|
|
@@ -46,10 +46,10 @@
|
|
|
46
46
|
import { numericStyleValue } from '@volter/editor-sdk/css-numeric-style';
|
|
47
47
|
import { createEphemeralPersistence } from '../host/authoring/ephemeral-persistence';
|
|
48
48
|
import { LIVE_ONLY_DESTINATION } from '@volter/editor-sdk/kit/write-pipe';
|
|
49
|
-
import type { EditorShellStore } from '@volter/editor-
|
|
49
|
+
import type { EditorShellStore } from '@volter/editor-threejs/kit/editor-shell-store';
|
|
50
50
|
import { type JournalSubject, JsonHistoryResource } from '../host/history/json-history-resource';
|
|
51
51
|
import { DomProjector, structuralDomIdentity } from '../host/projection/dom';
|
|
52
|
-
import { browserOrInlineResolver, getComputedStyleValue } from '@volter/editor-
|
|
52
|
+
import { browserOrInlineResolver, getComputedStyleValue } from '@volter/editor-sdk/kit/ui-source/inspect';
|
|
53
53
|
import type {
|
|
54
54
|
AssetSubjectProvider,
|
|
55
55
|
AuthoringAdapter,
|
|
@@ -271,7 +271,7 @@ export class DomAuthoringAdapter implements AuthoringAdapter {
|
|
|
271
271
|
private readonly store: EditorShellStore,
|
|
272
272
|
opts: DomAuthoringOptions,
|
|
273
273
|
) {
|
|
274
|
-
const history = store.projectHistory;
|
|
274
|
+
const history = store.shell.projectHistory;
|
|
275
275
|
this.historyResource = history
|
|
276
276
|
? new JsonHistoryResource({
|
|
277
277
|
history,
|
|
@@ -372,8 +372,8 @@ export class DomAuthoringAdapter implements AuthoringAdapter {
|
|
|
372
372
|
};
|
|
373
373
|
|
|
374
374
|
readonly selection: SelectionProvider = {
|
|
375
|
-
get: () => [...this.store.selectedEntityIds],
|
|
376
|
-
set: (ids) => this.store.selectMultiple(ids),
|
|
375
|
+
get: () => [...this.store.shell.selectedEntityIds],
|
|
376
|
+
set: (ids) => this.store.shell.selectMultiple(ids),
|
|
377
377
|
};
|
|
378
378
|
|
|
379
379
|
/**
|
|
@@ -650,7 +650,7 @@ export class DomAuthoringAdapter implements AuthoringAdapter {
|
|
|
650
650
|
if (path === 'locked') {
|
|
651
651
|
if (value) this.lockedIds.add(id);
|
|
652
652
|
else this.lockedIds.delete(id);
|
|
653
|
-
this.store.notifyIngestEdit();
|
|
653
|
+
this.store.shell.notifyIngestEdit();
|
|
654
654
|
return;
|
|
655
655
|
}
|
|
656
656
|
if (path === 'visible') {
|
|
@@ -700,7 +700,7 @@ export class DomAuthoringAdapter implements AuthoringAdapter {
|
|
|
700
700
|
|
|
701
701
|
this.applyStyleToElement(n.el, prop, value);
|
|
702
702
|
this.recordStyleEdit(id, prop, value);
|
|
703
|
-
this.store.notifyIngestEdit();
|
|
703
|
+
this.store.shell.notifyIngestEdit();
|
|
704
704
|
|
|
705
705
|
return true;
|
|
706
706
|
}
|
|
@@ -747,11 +747,11 @@ export class DomAuthoringAdapter implements AuthoringAdapter {
|
|
|
747
747
|
this.applyStyleToElement(node.el, prop, values[prop] ?? '');
|
|
748
748
|
}
|
|
749
749
|
}
|
|
750
|
-
this.store.notifyIngestEdit();
|
|
750
|
+
this.store.shell.notifyIngestEdit();
|
|
751
751
|
}
|
|
752
752
|
|
|
753
753
|
subscribe(listener: () => void): () => void {
|
|
754
|
-
return this.store.subscribe(listener);
|
|
754
|
+
return this.store.shell.subscribe(listener);
|
|
755
755
|
}
|
|
756
756
|
|
|
757
757
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { setAuthoringSelection } from '@volter/editor-
|
|
1
|
+
import { setAuthoringSelection } from '@volter/editor-sdk/kit/authoring/consumer-actions';
|
|
2
2
|
import { faBookBookmark, faCode, faPalette } from '@fortawesome/free-solid-svg-icons';
|
|
3
3
|
import {
|
|
4
4
|
Button,
|
|
@@ -53,13 +53,13 @@ import {
|
|
|
53
53
|
setActiveBreakpoint,
|
|
54
54
|
subscribeBreakpoint,
|
|
55
55
|
} from '@volter/editor-sdk/kit/breakpoint-state';
|
|
56
|
-
import { CompositeAuthoringAdapter } from '@volter/editor-
|
|
56
|
+
import { CompositeAuthoringAdapter } from '@volter/editor-sdk/kit/authoring/composite-authoring-adapter';
|
|
57
57
|
import { numericStyleValue, UNITLESS_NUMBER_PROPS } from '@volter/editor-sdk/css-numeric-style';
|
|
58
58
|
import { beginEyedropperSession } from '@volter/editor-sdk/kit/eyedropper-session';
|
|
59
59
|
import { groupProperties } from '@volter/editor-sdk/kit/inspector-property-grouping';
|
|
60
|
-
import { useEditorStore } from '@volter/editor-
|
|
60
|
+
import { useEditorStore } from '@volter/editor-sdk/kit/editor-runtime';
|
|
61
61
|
import { createHmrRegistrationGroup } from '@volter/editor-sdk/kit/hmr-registration-group';
|
|
62
|
-
import { groupIcon } from '@volter/editor-
|
|
62
|
+
import { groupIcon } from '@volter/editor-sdk/kit/inspection/compose';
|
|
63
63
|
import {
|
|
64
64
|
GROUP_SECTION_ORDER,
|
|
65
65
|
groupSectionId,
|
|
@@ -68,7 +68,7 @@ import {
|
|
|
68
68
|
PROPERTIES_SECTION_ORDER,
|
|
69
69
|
} from '@volter/editor-sdk/kit/inspection-model';
|
|
70
70
|
import { registerInspectorSections } from '@volter/editor-sdk/kit/inspector-section-registry';
|
|
71
|
-
import { effectiveColorFromChain, getAvailableFonts } from '@volter/editor-
|
|
71
|
+
import { effectiveColorFromChain, getAvailableFonts } from '@volter/editor-sdk/kit/ui-source/inspect';
|
|
72
72
|
import type { OidEntry } from '@volter/editor-react/source/oid-transform';
|
|
73
73
|
import type { AuthoringAdapter, EditorNode, PropertyDescriptor } from '@volter/editor-project/adapter';
|
|
74
74
|
import {
|
|
@@ -42,16 +42,16 @@ import {
|
|
|
42
42
|
type WriteAck,
|
|
43
43
|
type WriteResolution,
|
|
44
44
|
} from '@volter/editor-sdk/kit/write-pipe';
|
|
45
|
-
import { guideClientEdges } from '@volter/editor-
|
|
45
|
+
import { guideClientEdges } from '@volter/editor-sdk/kit/components/board-guides';
|
|
46
46
|
import { editorConsole } from '@volter/editor-sdk/kit/editor-console';
|
|
47
|
-
import type {
|
|
48
|
-
import { withProjectSourceHistory } from '@volter/editor-
|
|
47
|
+
import type { ShellStore } from '@volter/editor-sdk/kit/shell-store';
|
|
48
|
+
import { withProjectSourceHistory } from '@volter/editor-sdk/kit/history/source-history-backend';
|
|
49
49
|
import { DomProjector, oidDomIdentity, projectOidDom } from '../host/projection/dom';
|
|
50
50
|
import { storyArgPropertyDescriptors } from '../host/stories/story-arg-descriptors';
|
|
51
|
-
import { storyDiscoveryUnavailable } from '@volter/editor-
|
|
52
|
-
import { deriveStoryGroupPath, formatStoryGroupPath } from '@volter/editor-
|
|
53
|
-
import type { StoryPresentationIndex } from '@volter/editor-
|
|
54
|
-
import { subscribeProjectStoryModules } from '@volter/editor-
|
|
51
|
+
import { storyDiscoveryUnavailable } from '@volter/editor-sdk/kit/stories/story-discovery';
|
|
52
|
+
import { deriveStoryGroupPath, formatStoryGroupPath } from '@volter/editor-sdk/kit/stories/story-grouping';
|
|
53
|
+
import type { StoryPresentationIndex } from '@volter/editor-sdk/kit/stories/story-presentation';
|
|
54
|
+
import { subscribeProjectStoryModules } from '@volter/editor-sdk/kit/stories/story-registry';
|
|
55
55
|
import { showTransientHint } from '@volter/editor-sdk/kit/transient-hint';
|
|
56
56
|
import {
|
|
57
57
|
browserOrInlineResolver,
|
|
@@ -68,11 +68,11 @@ import {
|
|
|
68
68
|
getMatchedCssRules,
|
|
69
69
|
getReactComponentName,
|
|
70
70
|
type MatchableElement,
|
|
71
|
-
} from '@volter/editor-
|
|
71
|
+
} from '@volter/editor-sdk/kit/ui-source/inspect';
|
|
72
72
|
import type { ComponentPropSpec, OidEntry } from '@volter/editor-react/source/oid-transform';
|
|
73
73
|
import { relativeImportSpecifier } from '@volter/editor-react/source/relative-import-specifier';
|
|
74
|
-
import type { SourceWriteBackend } from '@volter/editor-
|
|
75
|
-
import { writeCsfStory, writeNamedStyle } from '@volter/editor-
|
|
74
|
+
import type { SourceWriteBackend } from '@volter/editor-sdk/kit/ui-source/source-write-backend';
|
|
75
|
+
import { writeCsfStory, writeNamedStyle } from '@volter/editor-sdk/kit/ui-source/source-write-backend';
|
|
76
76
|
import {
|
|
77
77
|
type CssRuleTarget,
|
|
78
78
|
namedStyleRuleFor,
|
|
@@ -1042,7 +1042,7 @@ export class ReactRootAuthoringAdapter implements AuthoringAdapter {
|
|
|
1042
1042
|
|
|
1043
1043
|
constructor(
|
|
1044
1044
|
private readonly root: OidElementLike,
|
|
1045
|
-
private readonly store:
|
|
1045
|
+
private readonly store: ShellStore,
|
|
1046
1046
|
opts: ReactRootAuthoringOptions = {},
|
|
1047
1047
|
) {
|
|
1048
1048
|
this.assetRoot = opts.assetRoot ?? root;
|
|
@@ -42,8 +42,8 @@ import { Checkbox, TextInput, themeVars } from '@volter/editor-sdk/widgets';
|
|
|
42
42
|
// estate into this package's program.
|
|
43
43
|
import { getCurrentProject } from '@volter/editor-sdk/kit/active-project';
|
|
44
44
|
import { type Resolution, ResolutionPicker } from '../../host/components/ResolutionPicker';
|
|
45
|
-
import { SurfaceStateOverlay } from '@volter/editor-
|
|
46
|
-
import { registerDocumentOpener } from '@volter/editor-
|
|
45
|
+
import { SurfaceStateOverlay } from '@volter/editor-sdk/kit/components/SurfaceStateOverlay';
|
|
46
|
+
import { registerDocumentOpener } from '@volter/editor-sdk/kit/document-open-registry';
|
|
47
47
|
import { createHmrRegistrationGroup } from '@volter/editor-sdk/kit/hmr-registration-group';
|
|
48
48
|
import {
|
|
49
49
|
CONTRIBUTED_SECTION_ORDER,
|
|
@@ -51,10 +51,10 @@ import {
|
|
|
51
51
|
STORY_ARGS_SECTION_TITLE,
|
|
52
52
|
} from '@volter/editor-sdk/kit/inspection-model';
|
|
53
53
|
import { registerInspectorSections } from '@volter/editor-sdk/kit/inspector-section-registry';
|
|
54
|
-
import type { ComposedProjectStory } from '@volter/editor-
|
|
55
|
-
import { getProjectStoryRegions } from '@volter/editor-
|
|
56
|
-
import { mountIsolatedStory, runStoryPlay } from '@volter/editor-
|
|
57
|
-
import { declaredStoryMedium } from '@volter/editor-
|
|
54
|
+
import type { ComposedProjectStory } from '@volter/editor-sdk/kit/stories/compose-project-stories';
|
|
55
|
+
import { getProjectStoryRegions } from '@volter/editor-sdk/kit/stories/project-story-regions';
|
|
56
|
+
import { mountIsolatedStory, runStoryPlay } from '@volter/editor-sdk/kit/stories/StoryPreviewMount';
|
|
57
|
+
import { declaredStoryMedium } from '@volter/editor-sdk/kit/stories/story-declared-medium';
|
|
58
58
|
import {
|
|
59
59
|
ISOLATED_STORY_DOCUMENT_OPENER,
|
|
60
60
|
STORY_DOCS_DOCUMENT_OPENER,
|
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
refreshProjectStories,
|
|
66
66
|
subscribeProjectStoryModules,
|
|
67
67
|
whenProjectStoriesReady,
|
|
68
|
-
} from '@volter/editor-
|
|
68
|
+
} from '@volter/editor-sdk/kit/stories/story-registry';
|
|
69
69
|
import { domHasRenderableContent } from '../../host/surface-content';
|
|
70
70
|
import { explainSurface, type SurfaceContentState } from '@volter/editor-sdk/kit/surface-state';
|
|
71
71
|
import { CONTRIBUTED_WORKSPACE_UTILITIES } from '@volter/editor-sdk/kit/workspace-core-utilities';
|
|
@@ -74,9 +74,9 @@ import {
|
|
|
74
74
|
openWorkspaceDocument,
|
|
75
75
|
type WorkspaceDocumentContentProps,
|
|
76
76
|
} from '@volter/editor-sdk/kit/workspace-document-registry';
|
|
77
|
-
import { registerWorkspaceDocumentRestorer } from '@volter/editor-
|
|
77
|
+
import { registerWorkspaceDocumentRestorer } from '@volter/editor-sdk/kit/workspace-document-restore';
|
|
78
78
|
import { registerWorkspaceUtility } from '@volter/editor-sdk/kit/workspace-utility-registry';
|
|
79
|
-
import { fitPresentation } from '
|
|
79
|
+
import { fitPresentation } from '../../runtime/presentation';
|
|
80
80
|
import { Button, fontMono, fontSizeVar, spaceVar } from '@volter/editor-sdk/widgets';
|
|
81
81
|
import { useEffect, useRef, useState, useSyncExternalStore } from 'react';
|
|
82
82
|
import { STORY_ARGS_SECTION_ICON } from './story-args-section';
|