@volter/editor-game 0.5.65 → 0.5.67

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.
Files changed (281) hide show
  1. package/contributions/audio-unlock.service.ts +2 -2
  2. package/contributions/autoplay.service.ts +1 -1
  3. package/contributions/bridge.command.ts +3 -3
  4. package/contributions/canvas/component-board.service.ts +16 -0
  5. package/contributions/canvas/design-time-mount.service.ts +45 -0
  6. package/contributions/canvas-story-capture.service.ts +12 -0
  7. package/contributions/edit-mode-audio.service.ts +2 -2
  8. package/contributions/edit-mode-networking.service.ts +1 -1
  9. package/contributions/gameplay.command.ts +4 -4
  10. package/contributions/generation.service.ts +3 -3
  11. package/contributions/generations.status.tsx +1 -1
  12. package/contributions/godot.palette.json +99 -0
  13. package/contributions/godot.style.ts +82 -0
  14. package/contributions/godot.view.ts +75 -0
  15. package/contributions/ingest.service.ts +4 -4
  16. package/contributions/instances.command.ts +1 -1
  17. package/contributions/navmesh.menu.ts +1 -1
  18. package/contributions/network-observer.service.ts +14 -0
  19. package/contributions/play.command.ts +11 -5
  20. package/contributions/react/component-board.service.ts +1 -1
  21. package/contributions/react/design-time-mount.service.ts +1 -1
  22. package/contributions/react/react-inspector.service.ts +2 -2
  23. package/contributions/scene-document.service.ts +5 -5
  24. package/contributions/state-watch.menu.ts +1 -1
  25. package/contributions/state-watch.utility.tsx +1 -1
  26. package/contributions/team-playtest.service.ts +4 -4
  27. package/contributions/three/component-board.service.ts +1 -1
  28. package/contributions/three/component-verbs.command.ts +8 -8
  29. package/contributions/three/three-authoring.service.ts +8 -5
  30. package/contributions/three-story-capture.service.ts +12 -0
  31. package/contributions/unity.palette.json +102 -0
  32. package/contributions/unity.style.ts +72 -0
  33. package/contributions/unity.view.ts +82 -0
  34. package/contributions/unreal.palette.json +105 -0
  35. package/contributions/unreal.style.ts +66 -0
  36. package/contributions/unreal.view.ts +93 -0
  37. package/dist-node/serving.mjs +16 -0
  38. package/package.json +33 -16
  39. package/serving/index.ts +27 -0
  40. package/src/asset-budget/AssetBudgetPanel.tsx +1 -1
  41. package/src/asset-budget/asset-budget-model.ts +4 -4
  42. package/src/asset-budget/optimize-apply.ts +7 -7
  43. package/src/audio/AudioDebuggerPanel.tsx +1 -1
  44. package/src/bridge/dispatch.ts +16 -16
  45. package/src/bridge/live-frames.ts +1 -1
  46. package/src/bridge/screenshot.ts +6 -6
  47. package/src/build/BuildProfilesPanel.tsx +3 -3
  48. package/src/canvas/canvas-board/CanvasBoardDocument.tsx +676 -0
  49. package/src/canvas/canvas-board/canvas-board-model.ts +407 -0
  50. package/src/canvas/canvas-board/canvas-component-board.ts +56 -0
  51. package/src/canvas/canvas-design-mount.ts +524 -0
  52. package/src/canvas/design-time-canvas-mount.ts +79 -0
  53. package/src/coverage/live-authoring-surface.ts +6 -6
  54. package/src/coverage/live-project-verbs.ts +2 -2
  55. package/src/coverage/native-system-coverage.ts +6 -6
  56. package/src/coverage/root-coverage.ts +1 -1
  57. package/src/coverage/session-coverage.ts +5 -5
  58. package/src/design-system-stories/ApplicationChrome.stories.tsx +5 -5
  59. package/src/design-system-stories/InspectorNarrowBodies.stories.tsx +13 -53
  60. package/src/edit-mode/edit-mode-audio.ts +4 -4
  61. package/src/edit-mode/edit-mode-networking.ts +2 -2
  62. package/src/game-document/GameCaptureFrameButton.tsx +2 -2
  63. package/src/game-document/GameDocument.tsx +2 -2
  64. package/src/game-document/GamePanel.tsx +8 -8
  65. package/src/game-document/InstanceInspectorPicker.tsx +2 -2
  66. package/src/game-document/crowd-debug.ts +1 -1
  67. package/src/game-document/device-preview.ts +10 -11
  68. package/src/game-document/physics-debug.ts +1 -1
  69. package/src/generation/GenerationActivity.tsx +6 -8
  70. package/src/generation/generation-documents.tsx +8 -8
  71. package/src/generation/generation-jobs.ts +2 -2
  72. package/src/generation/generation-presentation.ts +1 -1
  73. package/src/host/adapter-reach.ts +1 -1
  74. package/src/host/adapter-runtime-bindings.ts +97 -6
  75. package/src/host/api/configurations.ts +2 -2
  76. package/src/host/authoring/babylon-authoring-adapter.ts +8 -8
  77. package/src/host/authoring/contract-hierarchy-authoring.ts +1 -1
  78. package/src/host/authoring/contract-scenes-stories.ts +1 -1
  79. package/src/host/authoring/creation-site-related.ts +2 -2
  80. package/src/host/authoring/ephemeral-persistence.ts +1 -1
  81. package/src/host/authoring/gesture-persist.ts +2 -2
  82. package/src/host/authoring/ingest-data-writer.ts +1 -1
  83. package/src/host/authoring/ingest-source-persistence.ts +8 -8
  84. package/src/host/authoring/mount-isolated-pixi-screen.ts +1 -1
  85. package/src/host/authoring/mounted-authoring.ts +4 -4
  86. package/src/host/authoring/phaser-live-authoring-adapter.ts +4 -4
  87. package/src/host/authoring/pixi-authoring-adapter.ts +42 -17
  88. package/src/host/authoring/pixi-creation-site-write-target.ts +2 -2
  89. package/src/host/authoring/pixi-live-write-target.ts +7 -7
  90. package/src/host/authoring/pixi-source-identity.ts +3 -3
  91. package/src/host/authoring/pixi-source-write-target.ts +1614 -0
  92. package/src/host/authoring/pixi-still-presentation.ts +2 -2
  93. package/src/host/authoring/pixi-structure-history.ts +3 -3
  94. package/src/host/authoring/pixi-transform-channels.ts +16 -14
  95. package/src/host/authoring/source-persistence-backend.ts +6 -6
  96. package/src/host/authoring/struct-write-pipe.ts +3 -3
  97. package/src/host/binding-resolver.ts +8 -9
  98. package/src/host/browser-transpile.ts +2 -2
  99. package/src/host/canvas-entry-runtime.ts +59 -48
  100. package/src/host/canvas-preview-frames.ts +482 -0
  101. package/src/host/components/CameraAuthoringOverlay.tsx +1 -1
  102. package/src/host/components/HeaderTelemetry.tsx +9 -16
  103. package/src/host/components/PixiIsolationSceneContent.tsx +17 -16
  104. package/src/host/components/ThreeIsolationSceneContent.tsx +5 -5
  105. package/src/host/components/frame-debugger-model.ts +2 -2
  106. package/src/host/components/header-telemetry-model.ts +2 -2
  107. package/src/host/components/scene-document.tsx +29 -61
  108. package/src/host/components/utility-view-state.ts +1 -1
  109. package/src/host/components/world-root-stage-binding.tsx +17 -26
  110. package/src/host/components/world-root-stage.ts +130 -63
  111. package/src/host/coverage/capability-coverage.ts +13 -1
  112. package/src/host/coverage/game-contract-seam-evidence.ts +1 -1
  113. package/src/host/coverage/project-verb-coverage.ts +2 -17
  114. package/src/host/coverage/system-adapter-coverage.ts +4 -5
  115. package/src/host/design-system-stories/fixtures/editor-runtime.tsx +14 -8
  116. package/src/host/document-preview-three.ts +2 -2
  117. package/src/host/entry-adjudication.ts +6 -6
  118. package/src/host/game-css-scope-transform.ts +4 -0
  119. package/src/host/game-module-access.ts +1 -1
  120. package/src/host/game-realm-page.ts +16 -8
  121. package/src/host/game-realm-reclaim.ts +1 -1
  122. package/src/host/gameplay-export.ts +25 -14
  123. package/src/host/gameplay-recording.ts +5 -5
  124. package/src/host/gated-globals.ts +6 -6
  125. package/src/host/history/json-history-resource.ts +3 -3
  126. package/src/host/instance-extract-actions.ts +1 -1
  127. package/src/host/instance-fork-actions.ts +1 -1
  128. package/src/host/projection/dom.ts +2 -2
  129. package/src/host/projection/pixi.ts +25 -3
  130. package/src/host/r3f-entry-runtime.ts +65 -34
  131. package/src/host/react-mount-runtime.ts +8 -49
  132. package/src/host/realm-services.ts +2 -2
  133. package/src/host/roots/canvas-root.tsx +361 -0
  134. package/src/host/roots/module-root.ts +1 -1
  135. package/src/host/roots/r3f-root.tsx +473 -0
  136. package/src/host/roots/react-root.ts +9 -43
  137. package/src/host/scene-view-drawability.ts +2 -2
  138. package/src/host/served-bundle-runtime-modules.ts +1 -19
  139. package/src/host/server-log-bridge.ts +3 -3
  140. package/src/host/stories/mounted-story-viewport-source.ts +1 -1
  141. package/src/host/stories/pixi-story-model.ts +30 -0
  142. package/src/host/stories/story-media-captures.ts +46 -0
  143. package/src/host/stories/story-media-presence.ts +3 -3
  144. package/src/host/stories/story-pixi-preview.ts +408 -0
  145. package/src/host/stories/story-three-preview.ts +806 -0
  146. package/src/host/stories/three-story-captures.ts +35 -0
  147. package/src/host/story-three-preview-runtime.ts +56 -0
  148. package/src/host/three-ingest-runtime.ts +1 -1
  149. package/src/host/use-active-performance-source.ts +3 -3
  150. package/src/host/viewport-pose-memory.ts +1 -1
  151. package/src/host/viewport-root-presentation.ts +6 -5
  152. package/src/ingest/active-ingest.ts +2 -2
  153. package/src/ingest/authoring/ingest-dom-surface-authoring.ts +4 -4
  154. package/src/ingest/authoring/ingest-root-adapter.ts +13 -13
  155. package/src/ingest/capture-wait-report.ts +1 -1
  156. package/src/ingest/deferred-ingest-play.ts +11 -10
  157. package/src/ingest/discovery-public-ingest.ts +2 -2
  158. package/src/ingest/ingest-boot-viewport.ts +6 -8
  159. package/src/ingest/ingest-canvas-scene-document.tsx +17 -16
  160. package/src/ingest/ingest-canvas-scene.ts +5 -8
  161. package/src/ingest/ingest-evidence-hook.ts +1 -1
  162. package/src/ingest/ingest-frame-snapshot.ts +1 -1
  163. package/src/ingest/ingest-play-control.ts +4 -4
  164. package/src/ingest/ingest-render-debug.ts +11 -11
  165. package/src/ingest/ingest-siblings.ts +16 -28
  166. package/src/ingest/module-mode.ts +18 -19
  167. package/src/ingest/mount-canvas-ingest-root.ts +27 -27
  168. package/src/ingest/mount-coverage.ts +4 -4
  169. package/src/ingest/mount-dom-ingest-root.ts +16 -16
  170. package/src/ingest/mount-ingest-root.ts +14 -14
  171. package/src/ingest/mount-three-ingest-root.ts +12 -12
  172. package/src/ingest/resolve-canvas.ts +1 -1
  173. package/src/ingest/served-html-boot.ts +1 -1
  174. package/src/ingest/surface-canvas.ts +1 -1
  175. package/src/ingest/unmount-ingest-root.ts +7 -7
  176. package/src/navmesh/navmesh-handler.ts +24 -16
  177. package/src/network/NetworkInspectorPanel.tsx +449 -14
  178. package/src/network/network-inspector-model.ts +14 -2
  179. package/src/play/play-log-events.ts +1 -1
  180. package/src/play/play-mode.ts +99 -142
  181. package/src/play/play-recording.ts +2 -2
  182. package/src/play/react-play-live-authoring.ts +3 -3
  183. package/src/play/run-selection.ts +93 -0
  184. package/src/play-bar/PlayBar.tsx +20 -39
  185. package/src/profiler/FrameDebuggerPanel.tsx +1 -1
  186. package/src/profiler/PerformancePanel.tsx +4 -4
  187. package/src/react/design-time-react-mount.ts +37 -85
  188. package/src/react/dom-authoring-adapter.ts +11 -11
  189. package/src/react/react-inspector-section.tsx +13 -13
  190. package/src/react/react-world-authoring-adapter.ts +31 -143
  191. package/src/react/story-documents/story-documents.tsx +18 -22
  192. package/src/react/ui-board-document.tsx +10 -11
  193. package/src/react/ui-component-board.ts +5 -5
  194. package/src/runtime/adapter/audio-meter.ts +21 -0
  195. package/src/runtime/adapter/first-party-audio-system.ts +230 -0
  196. package/src/runtime/adapter/ingest/contract-debug-adapter.ts +114 -0
  197. package/src/runtime/adapter/ingest/contract-system-adapters.ts +256 -0
  198. package/src/runtime/adapter/ingest/merge-debug-adapters.ts +197 -0
  199. package/src/runtime/adapter/ingest/observation-debug-adapter.ts +162 -0
  200. package/src/runtime/adapter/ingest/upstream-pin.ts +51 -0
  201. package/src/runtime/adapter/native-debug-module.ts +498 -0
  202. package/src/runtime/audio/bus-mixer.ts +161 -0
  203. package/src/runtime/audio/pose-guard.ts +80 -0
  204. package/src/runtime/core/frame-pacing.ts +126 -0
  205. package/src/runtime/core/game-loop.ts +225 -0
  206. package/src/runtime/core/game-scoped-slot.ts +28 -0
  207. package/src/runtime/core/seeded-random.ts +162 -0
  208. package/src/runtime/core/sim-clock.ts +391 -0
  209. package/src/runtime/core/system-runner.ts +269 -0
  210. package/src/runtime/core/types.ts +104 -0
  211. package/src/runtime/create-runtime.ts +1128 -0
  212. package/src/runtime/debug-bridge.ts +570 -0
  213. package/src/runtime/debug-registry.ts +899 -0
  214. package/src/runtime/dev/chrome-trace.ts +153 -0
  215. package/src/runtime/dev/instruments.ts +403 -0
  216. package/src/runtime/dev/logger.ts +119 -0
  217. package/src/runtime/dev/performance-profiler.ts +367 -0
  218. package/src/runtime/dev/register-render-vitals.ts +276 -0
  219. package/src/runtime/dev/render-census.ts +354 -0
  220. package/src/runtime/dev/render-debug-adapter.ts +218 -0
  221. package/src/runtime/dev/render-memory.ts +226 -0
  222. package/src/runtime/dev/render-vitals.ts +338 -0
  223. package/src/runtime/dev/static-batch-advisor.ts +188 -0
  224. package/src/runtime/dev/webgl-frame-capture.ts +366 -0
  225. package/src/runtime/dev/webgl-gpu-timer.ts +53 -0
  226. package/src/runtime/dev-build.ts +47 -0
  227. package/src/runtime/game.ts +1636 -0
  228. package/src/runtime/gameplay-rng-trap.ts +135 -0
  229. package/src/runtime/host-context.ts +64 -0
  230. package/src/runtime/input-router.ts +169 -0
  231. package/src/runtime/mount-manifest.ts +480 -0
  232. package/src/runtime/pixi/authoring.ts +706 -0
  233. package/src/runtime/pixi/ingest.ts +116 -0
  234. package/src/runtime/pixi/physics-registry.ts +49 -0
  235. package/src/runtime/pixi/render-pass-bracket.ts +117 -0
  236. package/src/runtime/pixi/scene-capture.ts +179 -0
  237. package/src/runtime/pixi/system-adapters.ts +69 -0
  238. package/src/runtime/playtest.ts +22 -0
  239. package/src/runtime/presentation.ts +141 -0
  240. package/src/runtime/render-control.ts +642 -0
  241. package/src/runtime/render-seed.ts +77 -0
  242. package/src/runtime/run-ticks-settled.ts +73 -0
  243. package/src/runtime/setup/setup-audio.ts +72 -0
  244. package/src/services/audio-pose-guard.ts +2 -2
  245. package/src/services/game-audio.ts +152 -0
  246. package/src/services/game-network.ts +657 -0
  247. package/src/services/game-physics.ts +334 -0
  248. package/src/state-watch/StateWatchPanel.tsx +1 -1
  249. package/src/three/authoring/camera-runtime-inspector-section.tsx +4 -3
  250. package/src/three/authoring/constraint-inspector-section.tsx +8 -7
  251. package/src/three/authoring/model-asset-inspector-section.tsx +14 -17
  252. package/src/three/authoring/oid-source-persistence.ts +13 -13
  253. package/src/three/authoring/r3f-design-session.ts +79 -61
  254. package/src/three/authoring/r3f-source-authoring-adapter.ts +112 -108
  255. package/src/three/authoring/reflection-probe-inspector-section.tsx +5 -4
  256. package/src/three/authoring/spatial-joint-handles.ts +1 -1
  257. package/src/three/authoring/spatial-lod-handles.ts +1 -1
  258. package/src/three/authoring/spatial-particle-handles.ts +1 -1
  259. package/src/three/authoring/three-authoring-adapter.ts +33 -33
  260. package/src/three/component-verbs/extract-menu.ts +8 -7
  261. package/src/three/component-verbs/fork-menu.ts +8 -7
  262. package/src/three/component-verbs/internals-menu.ts +3 -3
  263. package/src/three/drei-asset-caches.ts +13 -0
  264. package/src/three/story-documents/three-story-documents.tsx +24 -34
  265. package/src/three/three-board/ThreeBoardDocument.tsx +25 -25
  266. package/src/three/three-board/board-scene.ts +7 -7
  267. package/src/three/three-board/three-component-board.ts +5 -5
  268. package/contributions/react/pasteboard.action.ts +0 -41
  269. package/contributions/xstate-behavior.action.ts +0 -42
  270. package/contributions/xstate-behavior.document.tsx +0 -73
  271. package/contributions/xstate-behavior.inspector.tsx +0 -28
  272. package/contributions/xstate-behavior.menu.ts +0 -23
  273. package/src/react/pasteboard-materialize.ts +0 -154
  274. package/src/services/game-audio-unlock.ts +0 -48
  275. package/src/xstate/XStateBehaviorSection.tsx +0 -130
  276. package/src/xstate/XStateMachineInspector.tsx +0 -566
  277. package/src/xstate/character-animation-machine.fixture.ts +0 -74
  278. package/src/xstate/live-behaviors.ts +0 -106
  279. package/src/xstate/use-live-actor-state.ts +0 -44
  280. package/src/xstate/xstate-graph.ts +0 -235
  281. package/src/xstate/xstate-layout.ts +0 -76
@@ -21,10 +21,14 @@
21
21
  * LOAD too.
22
22
  */
23
23
 
24
- import type { ViewportPresentation, ViewportRoot } from '@volter/editor-sdk/host';
24
+ import {
25
+ registerStartingPresentation,
26
+ registerStudioPreset,
27
+ type StudioPreset,
28
+ } from '@volter/editor-sdk/kit/viewport-presentation';
25
29
  import { themeVars } from '@volter/editor-sdk/widgets';
26
- import { createPerformanceProfiler } from '@volter/game-runtime/dev/performance-profiler';
27
- import { createWebGLGpuTimer } from '@volter/game-runtime/dev/webgl-gpu-timer';
30
+ import { createPerformanceProfiler } from '../../runtime/dev/performance-profiler';
31
+ import { createWebGLGpuTimer } from '../../runtime/dev/webgl-gpu-timer';
28
32
  import type { AuthoringAdapter, Transform } from '@volter/editor-project/adapter';
29
33
  import { markHostRenderer } from '@volter/editor-threejs/viewport/renderer-ownership';
30
34
  import { applyWorldRendererConfig } from '@volter/threejs-runtime/adapter/renderer-config';
@@ -46,61 +50,98 @@ import {
46
50
  type Pass,
47
51
  } from 'postprocessing';
48
52
  import * as THREE from 'three';
49
- import { getActiveAuthoring } from '@volter/editor-core/authoring/active-adapter';
50
- import type { CompositeAuthoringAdapter } from '@volter/editor-core/authoring/composite-authoring-adapter';
53
+ import { getActiveAuthoring } from '@volter/editor-sdk/kit/authoring/active-adapter';
54
+ import type { CompositeAuthoringAdapter } from '@volter/editor-sdk/kit/authoring/composite-authoring-adapter';
51
55
  import {
52
56
  applyAuthoringTransform,
53
57
  beginAuthoringTransformEdit,
54
58
  endAuthoringTransformEdit,
55
- } from '@volter/editor-core/authoring/consumer-actions';
56
- import { designTimeMountFor } from '@volter/editor-core/authoring/design-time-mount-registry';
57
- import { attachProjectAuthoringStage } from '@volter/editor-core/authoring/project-authoring-session';
59
+ } from '@volter/editor-sdk/kit/authoring/consumer-actions';
60
+ import { designTimeMountFor } from '@volter/editor-sdk/kit/authoring/design-time-mount-registry';
61
+ import { attachProjectAuthoringStage } from '@volter/editor-sdk/kit/authoring/project-authoring-session';
58
62
  import {
59
63
  isThreejsSurfaceVisible,
60
64
  resolveThreeViewportRootId,
61
- } from '@volter/editor-core/authoring/world-hidden-viewport';
65
+ } from '@volter/editor-threejs/kit/authoring/world-hidden-viewport';
62
66
  import { AutoFrameWindow } from '../auto-frame-window';
63
67
  import {
64
68
  type CameraAuthoringSubject,
65
69
  type CameraViewMode,
66
70
  cameraAuthoringPresentation,
67
71
  installCameraAuthoringHost,
68
- } from '@volter/editor-core/camera-authoring';
69
- import { registerPresentedCanvasFrame } from '@volter/editor-core/canvas-preview-frames';
70
- import { collectState } from '@volter/editor-core/command-listener';
71
- import { getDownloadedAssetPath, getOnlineAssetFiles, reportEditorState } from '@volter/editor-core/editor-api';
72
- import { editorConsole } from '@volter/editor-core/editor-console';
73
- import { isEditorPresentationActive } from '@volter/editor-core/editor-presentation-activity';
74
- import type { EditorStats } from '@volter/editor-core/editor-runtime';
75
- import type { EditorShellStore } from '@volter/editor-core/editor-shell-store';
76
- import { EditorViewport, type OnlineAssetDrop } from '@volter/editor-core/editor-viewport';
77
- import { entityObject3D } from '@volter/editor-core/entity-object';
72
+ } from '@volter/editor-threejs/kit/camera-authoring';
73
+ import { registerPresentedCanvasFrame } from '../canvas-preview-frames';
74
+ import { collectState } from '@volter/editor-sdk/kit/command-listener';
75
+ import { getDownloadedAssetPath, getOnlineAssetFiles, reportEditorState } from '@volter/editor-sdk/kit/editor-api';
76
+ import { editorConsole } from '@volter/editor-sdk/kit/editor-console';
77
+ import { isEditorPresentationActive } from '@volter/editor-sdk/kit/editor-presentation-activity';
78
+ import type { EditorStats } from '@volter/editor-sdk/kit/editor-runtime';
79
+ import type { EditorShellStore } from '@volter/editor-threejs/kit/editor-shell-store';
80
+ import { EditorViewport, type OnlineAssetDrop } from '@volter/editor-threejs/kit/editor-viewport';
81
+ import { entityObject3D } from '@volter/editor-threejs/kit/entity-object';
78
82
  import {
79
83
  nativeSelectionColors,
80
84
  nativeViewportLook,
81
85
  subscribeNativeSelectionTheme,
82
- } from '@volter/editor-core/native-selection-style';
83
- import { registerPerformanceSource } from '@volter/editor-core/performance-sources';
86
+ } from '@volter/editor-sdk/kit/native-selection-style';
87
+ import { registerPerformanceSource } from '@volter/editor-sdk/kit/performance-sources';
84
88
  import { drawSceneUnlessRefused } from '../scene-view-drawability';
85
- import { withSceneFogNeutralized } from '@volter/editor-core/scene-view-fog';
89
+ import { withSceneFogNeutralized } from '@volter/editor-threejs/kit/scene-view-fog';
86
90
  import { connectServerLogs } from '../server-log-bridge';
87
- import { focusedStageStore } from '@volter/editor-core/stage-context';
91
+ import { focusedStageStore } from '@volter/editor-sdk/kit/stage-context';
88
92
  import {
89
- createThreeSelectionOutline,
93
+ acquireThreeSelectionOutline,
94
+ releaseThreeSelectionOutline,
90
95
  setThreeSelectionOutlineColors,
91
96
  syncThreeSelectionOutline,
92
- } from '@volter/editor-core/three-viewport/selection-outline';
97
+ } from '@volter/editor-threejs/kit/three-viewport/selection-outline';
93
98
  import {
94
99
  setThreeViewportProjection,
95
100
  subscribeThreeViewportPresentation,
96
101
  threeViewportPresentation,
97
- } from '@volter/editor-core/three-viewport-presentation';
98
- import { recordViewportFirstFrame } from '@volter/editor-core/viewport-activation-timings';
102
+ } from '@volter/editor-sdk/kit/three-viewport-presentation';
103
+ import { recordViewportFirstFrame } from '@volter/editor-sdk/kit/viewport-activation-timings';
99
104
  import { savedViewportPose, saveViewportPose } from '../viewport-pose-memory';
100
105
  import { presentThreeRoots } from '../viewport-root-presentation';
101
- import { isEditorViewportShadingTarget } from '@volter/editor-core/viewport-shading-boundary';
102
- import { downloadOnlineAssetWithHistory } from '@volter/editor-core/components/asset-editor-persistence';
103
- import { bindStagePresenceMarkers } from '@volter/editor-core/components/stage-presence-markers';
106
+ import { isEditorViewportShadingTarget } from '@volter/editor-threejs/kit/viewport-shading-boundary';
107
+ import { downloadOnlineAssetWithHistory } from '@volter/editor-sdk/kit/components/asset-editor-persistence';
108
+ import { bindStagePresenceMarkers } from '@volter/editor-threejs/kit/components/stage-presence-markers';
109
+ import type { ViewportPresentation, ViewportRoot } from '@volter/editor-threejs/viewport-api';
110
+
111
+ /** Everything the world root's stage hands its medium's design session: the stage's own three
112
+ * handles. The stage and the medium that registered for `three` agree on it; the kit's mount
113
+ * registry types it `unknown`. */
114
+ export interface WorldRootSessionContext {
115
+ /** The shell store the session's adapter is built over. */
116
+ readonly store: EditorShellStore;
117
+ /** The edit-mode composite the session swaps its own child adapter into. */
118
+ readonly composite: CompositeAuthoringAdapter;
119
+ /** The stage's renderer — the session adopts it rather than building one. */
120
+ readonly renderer: THREE.WebGLRenderer;
121
+ }
122
+
123
+ /**
124
+ * THE WORLD STAGE'S STARTING PRESENTATION. Its studio is the light the world has always been
125
+ * shown by — the viewport's own ambient (0.5) and directional (1.0 from (10, 20, 10)), with no
126
+ * key and no image-based light of its own (the world's environment is the game's) — and it gives
127
+ * way to the scene's own whenever a live scene is adopted, as that rig always has.
128
+ */
129
+ const WORLD_STUDIO: StudioPreset = {
130
+ id: 'world',
131
+ title: 'World',
132
+ lights: [{ color: '#ffffff', intensity: 1, direction: [-10, -20, -10], space: 'world' }],
133
+ ambient: { color: '#ffffff', intensity: 0.5 },
134
+ environmentIntensity: 0,
135
+ };
136
+ const releaseWorldPresentation = [
137
+ registerStudioPreset(WORLD_STUDIO),
138
+ registerStartingPresentation('world', {
139
+ all: {
140
+ lighting: { source: 'studio', studioPreset: WORLD_STUDIO.id, auto: { takeover: ['light'], overridable: true } },
141
+ },
142
+ }),
143
+ ];
144
+ if (import.meta.hot) import.meta.hot.dispose(() => releaseWorldPresentation.forEach((release) => release()));
104
145
 
105
146
  /**
106
147
  * The world root's renderer, built to the ENGINE's own render settings —
@@ -339,9 +380,20 @@ export function installWorldRootStage(options: WorldRootStageOptions): WorldRoot
339
380
  // --- Scene ---
340
381
  const scene = new THREE.Scene();
341
382
  // The palette's viewport background when it carries one; the editor's own
342
- // grey otherwise. Theme changes follow through the viewport's look
343
- // subscription (`EditorViewport`).
344
- scene.background = new THREE.Color(nativeViewportLook(canvas).background ?? 0xaaaaaa);
383
+ // grey otherwise. The viewport's look subscription (`EditorViewport`) paints
384
+ // a palette's colour over it; this one gives the grey back when the next
385
+ // palette names none, as long as the scene still wears what was painted (a
386
+ // game may set its own background).
387
+ const WORLD_BACKGROUND = 0xaaaaaa;
388
+ let paintedBackground = nativeViewportLook(canvas).background ?? WORLD_BACKGROUND;
389
+ scene.background = new THREE.Color(paintedBackground);
390
+ const unsubscribeWorldBackground = subscribeNativeSelectionTheme(canvas, () => {
391
+ const next = nativeViewportLook(canvas).background ?? WORLD_BACKGROUND;
392
+ const current = scene.background;
393
+ if (current instanceof THREE.Color && current.getHex() === paintedBackground)
394
+ scene.background = new THREE.Color(next);
395
+ paintedBackground = next;
396
+ });
345
397
 
346
398
  // --- Bind store to scene ---
347
399
  store.bindScene(scene, renderer);
@@ -354,6 +406,9 @@ export function installWorldRootStage(options: WorldRootStageOptions): WorldRoot
354
406
  onlineAssetResolver: resolveDroppedOnlineAsset,
355
407
  onProjectionChange: setThreeViewportProjection,
356
408
  });
409
+ // The world is lit and dressed by its view's presentation (`kit/viewport-presentation`), as
410
+ // a `world` stage: this module builds it, so it states how it starts (`WORLD_STUDIO` below).
411
+ const unbindPresentation = viewport.bindPresentation(documentId, 'world');
357
412
  // Bind the REAL viewport camera + orbit target so store.cameraPose (the
358
413
  // `editor.viewport.camera.get` facet, see command-listener.ts's
359
414
  // collectState) and the thumbnail-capture path read live data instead of
@@ -412,7 +467,7 @@ export function installWorldRootStage(options: WorldRootStageOptions): WorldRoot
412
467
  // declaration) would leave the previous world's colour space on the
413
468
  // editor's renderer until page reload.
414
469
  let restoreAdoptedImage: (() => void) | null = null;
415
- let selectionOutline: ReturnType<typeof createThreeSelectionOutline> | null = null;
470
+ let selectionOutline: ReturnType<typeof acquireThreeSelectionOutline> | null = null;
416
471
  let selectionOutlinePass: EffectPass | null = null;
417
472
  let selectionOutlineUnderlayPass: Pass | null = null;
418
473
  const syncSelectionTheme = (): void => {
@@ -425,8 +480,8 @@ export function installWorldRootStage(options: WorldRootStageOptions): WorldRoot
425
480
  );
426
481
  const syncSelectionOutline = (): void => {
427
482
  if (!selectionOutline) return;
428
- const adapter = getActiveAuthoring(store);
429
- const roots = [...store.selectedEntityIds]
483
+ const adapter = getActiveAuthoring(store.shell);
484
+ const roots = [...store.shell.selectedEntityIds]
430
485
  // Edit↔Play swaps the active child before its native graph is rebuilt.
431
486
  // Do not route a stale outgoing id through the composite during that
432
487
  // handoff: it is temporarily absent, not an ownership error.
@@ -452,17 +507,17 @@ export function installWorldRootStage(options: WorldRootStageOptions): WorldRoot
452
507
  // postprocessing). `editor-viewport.ts` bumps `composerVersion` (via
453
508
  // `store.reapplyEnvironment()`) on the world hide/show edges, which is
454
509
  // what re-runs this rebuild.
455
- const hiddenRootId = resolveThreeViewportRootId(store);
510
+ const hiddenRootId = resolveThreeViewportRootId(store.shell);
456
511
  void hiddenRootId;
457
512
  // Unwind the previous adoption's config BEFORE re-deriving, so the
458
513
  // re-derive below and the (possibly absent) re-apply at the end both
459
514
  // start from the editor's own values — see `restoreAdoptedImage`'s decl.
460
515
  restoreAdoptedImage?.();
461
516
  restoreAdoptedImage = null;
462
- // `applySceneRenderPipeline` disposes the previous pass but an
463
- // OutlineEffect's Selection owns temporary render-layer bits on the
464
- // selected objects. Clear those explicitly before dropping the effect.
465
- selectionOutline?.selection.clear();
517
+ // `applySceneRenderPipeline` disposes the previous passes; the outline
518
+ // returns to this renderer's pool first, detached from its pass and its
519
+ // selection cleared, and the rebuilt pipeline takes it back below.
520
+ if (selectionOutline) releaseThreeSelectionOutline(renderer, selectionOutline, selectionOutlinePass);
466
521
  selectionOutline = null;
467
522
  selectionOutlinePass = null;
468
523
  selectionOutlineUnderlayPass = null;
@@ -485,8 +540,9 @@ export function installWorldRootStage(options: WorldRootStageOptions): WorldRoot
485
540
  // This stage already loaded `postprocessing` for its own composer, so it
486
541
  // hands the factory its own bindings — no second module load, and the
487
542
  // outline is attached synchronously exactly as before.
488
- selectionOutline = createThreeSelectionOutline(
543
+ selectionOutline = acquireThreeSelectionOutline(
489
544
  { BlendFunction, KernelSize, OutlineEffect },
545
+ renderer,
490
546
  store.scene ?? scene,
491
547
  viewport.renderCamera,
492
548
  nativeSelectionColors(renderer.domElement),
@@ -524,24 +580,24 @@ export function installWorldRootStage(options: WorldRootStageOptions): WorldRoot
524
580
  applyViewportPresentation();
525
581
 
526
582
  const resolveCameraSubject = (id: string): CameraAuthoringSubject | null =>
527
- cameraSubjectFor(getActiveAuthoring(store), store.objectMap, id);
583
+ cameraSubjectFor(getActiveAuthoring(store.shell), store.objectMap, id);
528
584
 
529
585
  let pilotGestureId: string | null = null;
530
586
  const finishPilotGesture = (): void => {
531
587
  if (!pilotGestureId) return;
532
- endAuthoringTransformEdit(getActiveAuthoring(store), pilotGestureId);
588
+ endAuthoringTransformEdit(getActiveAuthoring(store.shell), pilotGestureId);
533
589
  pilotGestureId = null;
534
590
  };
535
591
  const beginPilotGesture = (): void => {
536
592
  const view = cameraAuthoringPresentation().view;
537
593
  if (view?.mode !== 'pilot' || !view.subject.canAuthorPose) return;
538
594
  pilotGestureId = view.subject.id;
539
- beginAuthoringTransformEdit(getActiveAuthoring(store), pilotGestureId);
595
+ beginAuthoringTransformEdit(getActiveAuthoring(store.shell), pilotGestureId);
540
596
  };
541
597
  const applyPilotGesture = (): void => {
542
598
  if (!pilotGestureId || viewport.cameraViewMode !== 'pilot') return;
543
599
  const subject = resolveCameraSubject(pilotGestureId);
544
- const adapter = getActiveAuthoring(store);
600
+ const adapter = getActiveAuthoring(store.shell);
545
601
  const transforms = adapter.transforms;
546
602
  if (!subject || !transforms) return;
547
603
  // `transforms.get` REFUSES BY THROWING for a node with no transform truth
@@ -566,16 +622,16 @@ export function installWorldRootStage(options: WorldRootStageOptions): WorldRoot
566
622
  rotation: subject.camera.quaternion.toArray() as [number, number, number, number],
567
623
  scale: previous.scale,
568
624
  });
569
- store.notifyIngestEdit();
625
+ store.shell.notifyIngestEdit();
570
626
  };
571
627
  viewport.orbitControls.addEventListener('start', beginPilotGesture);
572
628
  viewport.orbitControls.addEventListener('change', applyPilotGesture);
573
629
  viewport.orbitControls.addEventListener('end', finishPilotGesture);
574
630
 
575
631
  const disposeCameraAuthoring = installCameraAuthoringHost({
576
- active: () => store.playState === 'stopped' && store.activeViewportTab === 'edit',
632
+ active: () => store.shell.playState === 'stopped' && store.shell.activeViewportTab === 'edit',
577
633
  selected: () => {
578
- const id = store.selectedEntityId;
634
+ const id = store.shell.selectedEntityId;
579
635
  return id ? resolveCameraSubject(id) : null;
580
636
  },
581
637
  resolve: resolveCameraSubject,
@@ -592,7 +648,7 @@ export function installWorldRootStage(options: WorldRootStageOptions): WorldRoot
592
648
  presence.reportCamera();
593
649
  },
594
650
  alignToViewport: (subject: CameraAuthoringSubject) => {
595
- const adapter = getActiveAuthoring(store);
651
+ const adapter = getActiveAuthoring(store.shell);
596
652
  const transforms = adapter.transforms;
597
653
  if (!transforms || !subject.canAuthorPose) return;
598
654
  const targetObject = store.objectMap.get(subject.id) ?? null;
@@ -627,10 +683,10 @@ export function installWorldRootStage(options: WorldRootStageOptions): WorldRoot
627
683
  rotation: localQuaternion.toArray() as [number, number, number, number],
628
684
  scale: previous.scale,
629
685
  });
630
- store.notifyIngestEdit();
686
+ store.shell.notifyIngestEdit();
631
687
  endAuthoringTransformEdit(adapter, subject.id);
632
688
  },
633
- subscribe: store.subscribe,
689
+ subscribe: store.shell.subscribe,
634
690
  });
635
691
 
636
692
  // --- Store subscription → sync viewport ---
@@ -650,7 +706,7 @@ export function installWorldRootStage(options: WorldRootStageOptions): WorldRoot
650
706
  // React never owns it.
651
707
  let lastThreejsSurface: boolean | null = null;
652
708
  const syncSurfaceVisibility = (): void => {
653
- const visible = isThreejsSurfaceVisible(store);
709
+ const visible = isThreejsSurfaceVisible(store.shell);
654
710
  if (visible === lastThreejsSurface) return;
655
711
  lastThreejsSurface = visible;
656
712
  canvas.style.opacity = visible ? '1' : '0';
@@ -671,7 +727,7 @@ export function installWorldRootStage(options: WorldRootStageOptions): WorldRoot
671
727
  syncSurfaceVisibility();
672
728
 
673
729
  let lastComposerVersion = store.composerVersion;
674
- const unsubStore = store.subscribe(() => {
730
+ const unsubStore = store.shell.subscribe(() => {
675
731
  syncSurfaceVisibility();
676
732
  // Swap viewport scene if the store's scene changed (play mode enter/exit)
677
733
  const storeScene = store.scene;
@@ -711,14 +767,14 @@ export function installWorldRootStage(options: WorldRootStageOptions): WorldRoot
711
767
  viewport.orbitControls.addEventListener('end', rememberPose);
712
768
 
713
769
  // --- Viewport action subscription ---
714
- const unsubActions = store.onViewportAction((action) => {
770
+ const unsubActions = store.shell.onViewportAction((action) => {
715
771
  switch (action.type) {
716
772
  // Resolved through the ACTIVE ADAPTER first, same as selection and the
717
773
  // gizmo — an adopted play scene's nodes live in the adapter's walk and
718
774
  // never reach `objectMap`, so a store-only lookup silently framed
719
775
  // nothing for every entity in a running game (`entity-object.ts`).
720
776
  case 'focus-entity': {
721
- const obj = entityObject3D(getActiveAuthoring(store), store.objectMap, action.id);
777
+ const obj = entityObject3D(getActiveAuthoring(store.shell), store.objectMap, action.id);
722
778
  if (obj) viewport.focusOn(obj);
723
779
  break;
724
780
  }
@@ -742,13 +798,13 @@ export function installWorldRootStage(options: WorldRootStageOptions): WorldRoot
742
798
  break;
743
799
  }
744
800
  }
745
- gameCameraLookup = action.gameCamera ?? null;
801
+ gameCameraLookup = store.sceneCameraLookup;
746
802
  autoFrame.begin(performance.now(), gameCameraLookup !== null);
747
803
  break;
748
804
  }
749
805
  case 'focus-selection': {
750
- const adapter = getActiveAuthoring(store);
751
- const objects = [...store.selectedEntityIds]
806
+ const adapter = getActiveAuthoring(store.shell);
807
+ const objects = [...store.shell.selectedEntityIds]
752
808
  .map((id) => entityObject3D(adapter, store.objectMap, id))
753
809
  .filter((o): o is THREE.Object3D => o !== null);
754
810
  viewport.focusOnMultiple(objects);
@@ -760,6 +816,15 @@ export function installWorldRootStage(options: WorldRootStageOptions): WorldRoot
760
816
  case 'set-view-preset':
761
817
  viewport.setViewPreset(action.preset);
762
818
  break;
819
+ case 'step-view':
820
+ viewport.stepView(action.step);
821
+ break;
822
+ case 'frame-all':
823
+ viewport.focusOnScene();
824
+ break;
825
+ case 'zoom-view':
826
+ viewport.zoomStep(action.direction);
827
+ break;
763
828
  case 'set-camera-pose':
764
829
  viewport.setPose(action.position, action.target, action.fov);
765
830
  break;
@@ -855,7 +920,7 @@ export function installWorldRootStage(options: WorldRootStageOptions): WorldRoot
855
920
 
856
921
  /** Whether this stage is the one the shared panels are following, and so the
857
922
  * one that fills the shell's frame/camera readout — see its use below. */
858
- const ownsShellReadout = (): boolean => focusedStageStore(store) === store;
923
+ const ownsShellReadout = (): boolean => focusedStageStore(store.shell) === store.shell;
859
924
 
860
925
  function frame(now: number, resumed: boolean): void {
861
926
  if (disposed) return;
@@ -980,7 +1045,7 @@ export function installWorldRootStage(options: WorldRootStageOptions): WorldRoot
980
1045
  const stageMount = designTimeMountFor('three');
981
1046
  if (disposed || editModeComposite !== composite) return;
982
1047
  const disposeSession = stageMount
983
- ? await stageMount.mountWorldRootSession({ store, composite, renderer })
1048
+ ? await stageMount.mountWorldRootSession({ store, composite, renderer } satisfies WorldRootSessionContext)
984
1049
  : () => {};
985
1050
  if (disposed || editModeComposite !== composite) {
986
1051
  disposeSession();
@@ -990,9 +1055,9 @@ export function installWorldRootStage(options: WorldRootStageOptions): WorldRoot
990
1055
  if (!disposed) options.onMountStatus('ready');
991
1056
  }
992
1057
 
993
- const authoringStage = attachProjectAuthoringStage(store, installStage);
1058
+ const authoringStage = attachProjectAuthoringStage(store.shell, installStage);
994
1059
  authoringStage.ready
995
- .then(() => reportEditorState(collectState(store)))
1060
+ .then(() => reportEditorState(collectState(store.shell)))
996
1061
  .catch((err) => {
997
1062
  editorConsole.error(
998
1063
  `Editor boot failed: ${err instanceof Error ? err.message : String(err)}`,
@@ -1038,6 +1103,8 @@ export function installWorldRootStage(options: WorldRootStageOptions): WorldRoot
1038
1103
  gpuTimer.dispose();
1039
1104
  unsubscribeViewportPresentation();
1040
1105
  unsubscribeSelectionTheme();
1106
+ unsubscribeWorldBackground();
1107
+ unbindPresentation();
1041
1108
  selectionOutline?.selection.clear();
1042
1109
  softParticleDepth.dispose();
1043
1110
  composer.dispose();
@@ -44,7 +44,7 @@
44
44
  * `ingest/mount-coverage.ts` assembles the facts from the live singletons.
45
45
  */
46
46
 
47
- import { commandLine } from '@volter/editor-core/product-command';
47
+ import { commandLine } from '@volter/editor-sdk/kit/product-command';
48
48
  import type {
49
49
  AuthoringProviderKey,
50
50
  SeamEvidenceVerdict,
@@ -461,6 +461,8 @@ export interface AuthoringSurfaceFacts {
461
461
  readonly availableIsolationDocuments: number;
462
462
  readonly pieces: number;
463
463
  readonly sceneEntries: number;
464
+ /** Project story modules that did not load or compose (`editor.status().storyFailures`). */
465
+ readonly storyFailures?: number;
464
466
  }
465
467
 
466
468
  /** Required only inside the row rules. Public callers never manufacture this
@@ -1237,6 +1239,16 @@ function authoringSurfaceRows(facts: ResolvedCoverageFacts): readonly Capability
1237
1239
  'the scene table declares no scenes, so there is no surface to place prefabs on ' +
1238
1240
  '(a models or website project)',
1239
1241
  }
1242
+ : (surface.storyFailures ?? 0) > 0
1243
+ ? {
1244
+ seam: 'authoring.pieces',
1245
+ status: 'gap',
1246
+ detail:
1247
+ `${surface.storyFailures} project story module(s) failed to load, so their prefabs are missing ` +
1248
+ `from the scene table (${surface.pieces} resolved)`,
1249
+ missing: 'the prefabs those stories register are absent from Content and the component board',
1250
+ fix: 'read `editor.status().storyFailures` for each module and its error, and the console line naming the module the load failed on',
1251
+ }
1240
1252
  : surface.pieces === 0
1241
1253
  ? {
1242
1254
  seam: 'authoring.pieces',
@@ -16,7 +16,7 @@ import {
16
16
  GAME_LIFECYCLE_SHAPE,
17
17
  GAME_SYSTEMS_SHAPE,
18
18
  } from '@volter/editor-project/adapter/ingest/game-contract-seams';
19
- import { liveSeamEvidence } from '@volter/editor-core/coverage/live-seam-evidence';
19
+ import { liveSeamEvidence } from '@volter/editor-sdk/kit/live-seam-evidence';
20
20
 
21
21
  const EPOCHS = new WeakMap<object, string>();
22
22
  let nextEpoch = 1;
@@ -34,7 +34,6 @@
34
34
  * `coverage/system-adapter-coverage.ts`.
35
35
  */
36
36
 
37
- import { commandLine } from '@volter/editor-core/product-command';
38
37
  import {
39
38
  PROJECT_VERB_SLOTS,
40
39
  type ProjectVerbMeasurement,
@@ -104,30 +103,16 @@ function exportVerb(facts: ProjectVerbFacts): ProjectVerbMeasurement {
104
103
  missing:
105
104
  'this project cannot produce a standalone build, so it runs NOWHERE but the editor — the ' +
106
105
  'dev-served standalone page refuses an unexported game outright',
107
- fix: "add the scaffold's `build` script (`build: tsc && vite build`), which is what every deploy path runs",
106
+ fix: "add the scaffold's `build` script (`build: tsc && vite build`), which is what the export path runs",
108
107
  };
109
108
  }
110
- const refused = roots.filter(
111
- (root) => root.type !== 'ingest' && (root.type !== 'builtin' || root.identity !== 'three'),
112
- );
113
- const wallLeg =
114
- refused.length > 0
115
- ? `; note that the legacy ${commandLine('deploy')} verb additionally refuses ${refused
116
- .map((root) => `root "${root.id}" (${root.identity})`)
117
- .join(
118
- ', ',
119
- )} — use the project-owned deploy scripts (${commandLine('add deploy-cloudflare')}/\`deploy-vercel\`, then \`npm run deploy\`)`
120
- : '';
121
- const deployLeg = scripts.includes('deploy')
122
- ? ', and a `deploy` script to ship it'
123
- : ` (no \`deploy\` script yet — ${commandLine('add deploy-cloudflare')}/\`deploy-vercel\` adds one)`;
124
109
  const ingestLeg = ingestOnly(roots)
125
110
  ? '; this ingest project ships the standalone bundle produced by its own build unchanged'
126
111
  : '';
127
112
  return {
128
113
  slot: 'export',
129
114
  state: 'present',
130
- evidence: `this project declares a \`build\` script, which is what the export path runs to emit the \`dist/\` it stages${deployLeg}${ingestLeg}${wallLeg}`,
115
+ evidence: `this project declares a \`build\` script, which is what the export path runs to emit the \`dist/\` it stages${ingestLeg}`,
131
116
  };
132
117
  }
133
118
 
@@ -46,14 +46,14 @@
46
46
  * no live session.
47
47
  */
48
48
 
49
- import type { DeclaredSystemAbsence } from '@volter/game-runtime/runtime/game';
49
+ import type { DeclaredSystemAbsence } from '../../runtime/game';
50
50
  import type { SystemAdapters } from '@volter/editor-project/adapter/system-adapter';
51
51
  import {
52
52
  SYSTEM_ADAPTER_SLOTS,
53
53
  type SystemAdapterMeasurement,
54
54
  type SystemAdapterSlot,
55
55
  } from './capability-coverage';
56
- import { inspectSystemAdapterSeam } from '@volter/editor-core/coverage/system-seam-evidence';
56
+ import { inspectSystemAdapterSeam } from '@volter/editor-sdk/kit/system-seam-evidence';
57
57
 
58
58
  /** What the native derivation needs to know that the live registry cannot tell
59
59
  * it. Both facts are read off things that already exist; neither is a guess. */
@@ -139,9 +139,8 @@ function shippedLibraries(slot: SystemAdapterSlot, facts: NativeProjectFacts): r
139
139
  function contradictionFix(slot: SystemAdapterSlot, libraries: readonly string[]): string {
140
140
  return (
141
141
  `this project depends on ${libraries.join(' + ')}, so "nothing built a ${slot} world" is not ` +
142
- `a settled answer. Reach a terminal state either way: BIND it — declare a ${slot} adapter in ` +
143
- `the root entry's \`systems\` table (the engine ships \`rapierPhysicsSystem()\` for the R3F ` +
144
- `Rapier bridge; other slots take the game's own adapter) — or DECLARE the absence with ` +
142
+ `a settled answer. Reach a terminal state either way: BIND it — declare the game's own ${slot} ` +
143
+ `adapter in the root entry's \`systems\` table — or DECLARE the absence with ` +
145
144
  `\`absent(reason)\` in that same table. The reason must NAME the dependency and say why it ` +
146
145
  `is there while the subsystem is not (a transitive pull, a leftover, a build-only use); a ` +
147
146
  `declared absence blind to the shipped dependency grades malformed, not terminal.`
@@ -1,17 +1,18 @@
1
1
  import { type ReactNode, useEffect, useLayoutEffect, useState } from 'react';
2
- import { resetProjectThumbnailManifestCache } from '@volter/editor-core/asset-workflow/thumbnail-system';
3
- import { type EditorRuntime, EditorRuntimeProvider, type EditorStats } from '@volter/editor-core/editor-runtime';
4
- import { EditorShellStore } from '@volter/editor-core/editor-shell-store';
5
- import { EditorSession } from '@volter/editor-core/history/editor-session';
6
- import { getStorageBackend, MemStorage, setStorageBackend } from '@volter/editor-core/storage/index';
2
+ import { resetProjectThumbnailManifestCache } from '@volter/editor-sdk/kit/asset-workflow/thumbnail-system';
3
+ import { type EditorRuntime, EditorRuntimeProvider, type EditorStats } from '@volter/editor-sdk/kit/editor-runtime';
4
+ import { type EditorShellStore, threeStateOf } from '@volter/editor-threejs/kit/editor-shell-store';
5
+ import { ShellStore } from '@volter/editor-sdk/kit/shell-store';
6
+ import { EditorSession } from '@volter/editor-sdk/kit/history/editor-session';
7
+ import { getStorageBackend, MemStorage, setStorageBackend } from '@volter/editor-sdk/kit/storage/index';
7
8
  import {
8
9
  activeWorkspaceUtility,
9
10
  installWorkspaceHostCommands,
10
11
  setActiveWorkspaceUtility,
11
12
  setWorkspaceUtilityTabs,
12
13
  workspaceUtilityTabs,
13
- } from '@volter/editor-core/workspace-host-commands';
14
- import { availableWorkspaceUtilities } from '@volter/editor-core/workspace-utility-registry';
14
+ } from '@volter/editor-sdk/kit/workspace-host-commands';
15
+ import { availableWorkspaceUtilities } from '@volter/editor-sdk/kit/workspace-utility-registry';
15
16
 
16
17
  const ZERO_STATS: EditorStats = {
17
18
  fps: 60,
@@ -22,9 +23,14 @@ const ZERO_STATS: EditorStats = {
22
23
  cameraTarget: { x: 0, y: 1, z: 0 },
23
24
  };
24
25
 
26
+ /** A story runtime's Three half, for a production component that reads the scene. */
27
+ export function storyThreeStore(runtime: EditorRuntime): EditorShellStore {
28
+ return threeStateOf(runtime.store);
29
+ }
30
+
25
31
  /** A real, bounded editor runtime for production component stories. */
26
32
  export function createStoryEditorRuntime(): EditorRuntime {
27
- const store = new EditorShellStore();
33
+ const store = new ShellStore();
28
34
  const session = new EditorSession('storybook-fixture');
29
35
  store.attachHistory(session.history);
30
36
  return {
@@ -2,8 +2,8 @@ import { collectContentNodeRecords } from '@volter/editor-threejs/viewport/conte
2
2
  import { isEditorOwnedObject } from '@volter/editor-threejs/viewport/editor-layers';
3
3
  import { markHostRenderer } from '@volter/editor-threejs/viewport/renderer-ownership';
4
4
  import * as THREE from 'three';
5
- import type { DocumentPreviewCaptureRequest } from '@volter/editor-core/document-preview-source';
6
- import { frameableContentBounds } from '@volter/editor-core/scene-framing';
5
+ import type { DocumentPreviewCaptureRequest } from '@volter/editor-sdk/kit/document-preview-source';
6
+ import { frameableContentBounds } from '@volter/editor-threejs/kit/scene-framing';
7
7
 
8
8
  function authoredCameras(root: THREE.Object3D): THREE.Camera[] {
9
9
  const cameras: THREE.Camera[] = [];
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * WHAT DOES THIS ENTRY MODULE MEAN? — the ONE editor-side answer.
3
3
  *
4
- * The engine owns the answer itself (`resolveR3FEntryAdapter`, and the
5
- * packaged-aware `resolveR3FEntryAdapterForEditor` delegate that routes it
6
- * through the project's own module graph). The editor's job is to ASK, once.
4
+ * `roots/r3f-root.tsx` owns the answer itself (`resolveR3FEntryAdapter`), and
5
+ * `resolveR3FEntryAdapterForEditor` hands it the React and Fiber of the
6
+ * project's own module graph. The rest of the editor's job is to ASK, once.
7
7
  * Before this module there were three askers, and they had already drifted:
8
8
  *
9
9
  * - the dev-server lane called the packaged-aware `…ForEditor`;
@@ -20,9 +20,9 @@
20
20
  * told which lane and which file, and that is the caller's knowledge, not
21
21
  * this function's.
22
22
  *
23
- * `entry-adjudication-single-owner.test.ts` is the tripwire; the canvas lane
24
- * has its own single owner in the engine (`resolveCanvasEntryAdapter`, reached
25
- * through `canvas-entry-runtime.ts`) and is not adjudicated here.
23
+ * The canvas lane has its own single owner (`roots/canvas-root.tsx`'s
24
+ * `resolveCanvasEntryAdapter`, reached through `canvas-entry-runtime.ts`) and
25
+ * is not adjudicated here.
26
26
  */
27
27
 
28
28
  import type { RootAdapter } from '@volter/editor-project/adapter';
@@ -0,0 +1,4 @@
1
+ /** The `@scope` transform the session applies to a game's stylesheets, for a
2
+ * page that must scope CSS a game creates at runtime. Its own module so the
3
+ * transform's parser loads only where a game's page asks for it. */
4
+ export { scopeGameCss } from '@volter/editor-sdk/session/scoped-game-css';
@@ -1,4 +1,4 @@
1
- import { commandLine } from '@volter/editor-core/product-command';
1
+ import { commandLine } from '@volter/editor-sdk/kit/product-command';
2
2
  /**
3
3
  * THE MODULE LANE of `vgai eval` — reach the RUNNING mount's own module
4
4
  * instances, by served path, using URLs retained by their owning realm.