@volter/editor-game 0.5.65 → 0.5.66
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/generation.service.ts +2 -2
- package/contributions/generations.status.tsx +1 -1
- package/contributions/godot.palette.json +99 -0
- package/contributions/godot.style.ts +62 -0
- package/contributions/godot.view.ts +69 -0
- package/contributions/ingest.service.ts +3 -3
- package/contributions/play.command.ts +1 -1
- package/contributions/react/react-inspector.service.ts +2 -2
- package/contributions/scene-document.service.ts +3 -3
- package/contributions/three/component-verbs.command.ts +3 -3
- package/contributions/unity.palette.json +102 -0
- package/contributions/unity.style.ts +62 -0
- package/contributions/unity.view.ts +76 -0
- package/contributions/unreal.palette.json +105 -0
- package/contributions/unreal.style.ts +58 -0
- package/contributions/unreal.view.ts +88 -0
- package/dist-node/serving.mjs +16 -0
- package/package.json +21 -14
- package/serving/index.ts +27 -0
- package/src/asset-budget/asset-budget-model.ts +3 -3
- package/src/asset-budget/optimize-apply.ts +7 -7
- package/src/bridge/dispatch.ts +2 -2
- package/src/bridge/screenshot.ts +3 -3
- package/src/coverage/live-authoring-surface.ts +1 -1
- package/src/coverage/live-project-verbs.ts +1 -1
- package/src/coverage/native-system-coverage.ts +1 -1
- package/src/coverage/session-coverage.ts +2 -2
- package/src/design-system-stories/InspectorNarrowBodies.stories.tsx +10 -50
- package/src/game-document/GameCaptureFrameButton.tsx +1 -1
- package/src/game-document/GamePanel.tsx +4 -4
- package/src/generation/GenerationActivity.tsx +3 -5
- package/src/generation/generation-documents.tsx +3 -3
- package/src/generation/generation-jobs.ts +1 -1
- package/src/generation/generation-presentation.ts +1 -1
- package/src/host/adapter-reach.ts +1 -1
- package/src/host/adapter-runtime-bindings.ts +1 -1
- package/src/host/api/configurations.ts +2 -2
- package/src/host/authoring/babylon-authoring-adapter.ts +2 -2
- package/src/host/authoring/contract-hierarchy-authoring.ts +1 -1
- package/src/host/authoring/contract-scenes-stories.ts +1 -1
- package/src/host/authoring/creation-site-related.ts +2 -2
- package/src/host/authoring/ephemeral-persistence.ts +1 -1
- package/src/host/authoring/gesture-persist.ts +1 -1
- package/src/host/authoring/ingest-source-persistence.ts +4 -4
- package/src/host/authoring/mount-isolated-pixi-screen.ts +1 -1
- package/src/host/authoring/pixi-authoring-adapter.ts +2 -2
- package/src/host/authoring/pixi-live-write-target.ts +3 -3
- package/src/host/authoring/pixi-still-presentation.ts +1 -1
- package/src/host/authoring/pixi-structure-history.ts +1 -1
- package/src/host/authoring/source-persistence-backend.ts +3 -3
- package/src/host/authoring/struct-write-pipe.ts +2 -2
- package/src/host/browser-transpile.ts +1 -1
- package/src/host/canvas-entry-runtime.ts +1 -1
- package/src/host/components/HeaderTelemetry.tsx +5 -12
- package/src/host/components/PixiIsolationSceneContent.tsx +8 -7
- package/src/host/components/ThreeIsolationSceneContent.tsx +2 -2
- package/src/host/components/scene-document.tsx +15 -47
- package/src/host/components/world-root-stage-binding.tsx +6 -15
- package/src/host/components/world-root-stage.ts +60 -14
- package/src/host/coverage/capability-coverage.ts +13 -1
- package/src/host/coverage/game-contract-seam-evidence.ts +1 -1
- package/src/host/coverage/project-verb-coverage.ts +2 -17
- package/src/host/coverage/system-adapter-coverage.ts +1 -1
- package/src/host/design-system-stories/fixtures/editor-runtime.tsx +9 -1
- package/src/host/document-preview-three.ts +1 -1
- package/src/host/game-module-access.ts +1 -1
- package/src/host/game-realm-page.ts +15 -7
- package/src/host/game-realm-reclaim.ts +1 -1
- package/src/host/gated-globals.ts +4 -4
- package/src/host/history/json-history-resource.ts +2 -2
- package/src/host/instance-extract-actions.ts +1 -1
- package/src/host/instance-fork-actions.ts +1 -1
- package/src/host/projection/dom.ts +2 -2
- package/src/host/projection/pixi.ts +1 -1
- package/src/host/r3f-entry-runtime.ts +1 -1
- package/src/host/react-mount-runtime.ts +1 -1
- package/src/host/realm-services.ts +1 -1
- package/src/host/roots/module-root.ts +1 -1
- package/src/host/scene-view-drawability.ts +2 -2
- package/src/host/server-log-bridge.ts +1 -1
- package/src/host/three-ingest-runtime.ts +1 -1
- package/src/host/use-active-performance-source.ts +1 -1
- package/src/ingest/active-ingest.ts +1 -1
- package/src/ingest/authoring/ingest-root-adapter.ts +5 -5
- package/src/ingest/capture-wait-report.ts +1 -1
- package/src/ingest/deferred-ingest-play.ts +5 -4
- package/src/ingest/ingest-boot-viewport.ts +4 -6
- package/src/ingest/ingest-canvas-scene-document.tsx +9 -8
- package/src/ingest/ingest-canvas-scene.ts +2 -5
- package/src/ingest/ingest-play-control.ts +3 -3
- package/src/ingest/ingest-render-debug.ts +1 -1
- package/src/ingest/ingest-siblings.ts +3 -3
- package/src/ingest/module-mode.ts +4 -5
- package/src/ingest/mount-canvas-ingest-root.ts +6 -6
- package/src/ingest/mount-coverage.ts +2 -2
- package/src/ingest/mount-dom-ingest-root.ts +5 -5
- package/src/ingest/mount-ingest-root.ts +7 -7
- package/src/ingest/mount-three-ingest-root.ts +4 -4
- package/src/ingest/unmount-ingest-root.ts +2 -2
- package/src/play/play-mode.ts +30 -16
- package/src/play/play-recording.ts +1 -1
- package/src/profiler/PerformancePanel.tsx +1 -1
- package/src/react/design-time-react-mount.ts +17 -23
- package/src/react/dom-authoring-adapter.ts +2 -2
- package/src/react/react-inspector-section.tsx +8 -8
- package/src/react/react-world-authoring-adapter.ts +20 -132
- package/src/react/story-documents/story-documents.tsx +9 -13
- package/src/react/ui-board-document.tsx +3 -4
- package/src/react/ui-component-board.ts +3 -3
- package/src/three/authoring/camera-runtime-inspector-section.tsx +1 -1
- package/src/three/authoring/constraint-inspector-section.tsx +3 -3
- package/src/three/authoring/model-asset-inspector-section.tsx +7 -11
- package/src/three/authoring/oid-source-persistence.ts +6 -6
- package/src/three/authoring/r3f-design-session.ts +21 -7
- package/src/three/authoring/r3f-source-authoring-adapter.ts +17 -17
- package/src/three/authoring/reflection-probe-inspector-section.tsx +3 -3
- package/src/three/authoring/spatial-joint-handles.ts +1 -1
- package/src/three/authoring/spatial-lod-handles.ts +1 -1
- package/src/three/authoring/spatial-particle-handles.ts +1 -1
- package/src/three/authoring/three-authoring-adapter.ts +4 -4
- package/src/three/component-verbs/extract-menu.ts +1 -1
- package/src/three/component-verbs/fork-menu.ts +1 -1
- package/src/three/component-verbs/internals-menu.ts +1 -1
- package/src/three/drei-asset-caches.ts +13 -0
- package/src/three/story-documents/three-story-documents.tsx +11 -21
- package/src/three/three-board/ThreeBoardDocument.tsx +12 -13
- package/src/three/three-board/board-scene.ts +1 -1
- package/src/three/three-board/three-component-board.ts +3 -3
- package/contributions/react/pasteboard.action.ts +0 -41
- package/contributions/xstate-behavior.action.ts +0 -42
- package/contributions/xstate-behavior.document.tsx +0 -73
- package/contributions/xstate-behavior.inspector.tsx +0 -28
- package/contributions/xstate-behavior.menu.ts +0 -23
- package/src/react/pasteboard-materialize.ts +0 -154
- package/src/xstate/XStateBehaviorSection.tsx +0 -130
- package/src/xstate/XStateMachineInspector.tsx +0 -566
- package/src/xstate/character-animation-machine.fixture.ts +0 -74
- package/src/xstate/live-behaviors.ts +0 -106
- package/src/xstate/use-live-actor-state.ts +0 -44
- package/src/xstate/xstate-graph.ts +0 -235
- package/src/xstate/xstate-layout.ts +0 -76
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
import {
|
|
14
14
|
getMountFailureReports,
|
|
15
15
|
subscribeToMountFailures,
|
|
16
|
-
} from '@volter/editor-
|
|
16
|
+
} from '@volter/editor-sdk/kit/mount-failure-report';
|
|
17
17
|
import { SurfaceStateOverlay } from '@volter/editor-core/components/SurfaceStateOverlay';
|
|
18
|
-
import { editorConsole } from '@volter/editor-
|
|
18
|
+
import { editorConsole } from '@volter/editor-sdk/kit/editor-console';
|
|
19
19
|
import { useEditorStore } from '@volter/editor-core/editor-runtime';
|
|
20
20
|
import { getCurrentProject, onProjectChange } from '@volter/editor-core/project-manager';
|
|
21
|
-
import { readinessFacet, subscribeRootReadiness } from '@volter/editor-
|
|
21
|
+
import { readinessFacet, subscribeRootReadiness } from '@volter/editor-sdk/kit/readiness';
|
|
22
22
|
import { domHasRenderableContent } from '../host/surface-content';
|
|
23
|
-
import { explainSurface } from '@volter/editor-
|
|
23
|
+
import { explainSurface } from '@volter/editor-sdk/kit/surface-state';
|
|
24
24
|
import { editorHost } from '@volter/editor-sdk/host';
|
|
25
25
|
import { themeVars } from '@volter/editor-sdk/widgets';
|
|
26
26
|
import {
|
|
@@ -12,11 +12,10 @@ import { faFile, faFileLines, faTriangleExclamation } from '@fortawesome/free-so
|
|
|
12
12
|
import type { GenerationJob } from '@volter/editor-sdk/generations';
|
|
13
13
|
import { useState, useSyncExternalStore } from 'react';
|
|
14
14
|
import './GenerationGallery.css';
|
|
15
|
-
import { assetCapabilities, assetDocumentKind } from '@volter/editor-
|
|
15
|
+
import { assetCapabilities, assetDocumentKind } from '@volter/editor-sdk/kit/asset-capabilities';
|
|
16
16
|
import { openAssetDocument } from '@volter/editor-core/components/asset-documents';
|
|
17
17
|
import { AudioAssetThumb, ModelThumbnail } from '@volter/editor-core/components/asset-thumbnails';
|
|
18
|
-
import { editorConsole } from '@volter/editor-
|
|
19
|
-
import { useEditorStore } from '@volter/editor-core/editor-runtime';
|
|
18
|
+
import { editorConsole } from '@volter/editor-sdk/kit/editor-console';
|
|
20
19
|
import { modelThumbnailFormat } from '@volter/editor-core/model-thumbnail';
|
|
21
20
|
import {
|
|
22
21
|
Button,
|
|
@@ -238,7 +237,6 @@ function GenerationCard({
|
|
|
238
237
|
error: string | null;
|
|
239
238
|
run: (action: () => Promise<void>) => void;
|
|
240
239
|
}) {
|
|
241
|
-
const store = useEditorStore();
|
|
242
240
|
const state = generationCardState(job);
|
|
243
241
|
const outputs = generationOutputs(job);
|
|
244
242
|
const prompt = generationPrompt(job);
|
|
@@ -247,7 +245,7 @@ function GenerationCard({
|
|
|
247
245
|
if (!output.url) return undefined;
|
|
248
246
|
const kind = assetDocumentKind(assetCapabilities(output.name));
|
|
249
247
|
if (!kind) return undefined;
|
|
250
|
-
return () => openAssetDocument(
|
|
248
|
+
return () => openAssetDocument(output.url as string, kind);
|
|
251
249
|
};
|
|
252
250
|
|
|
253
251
|
return (
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
accountVersion,
|
|
7
7
|
contributionAccount,
|
|
8
8
|
subscribeAccount,
|
|
9
|
-
} from '@volter/editor-
|
|
9
|
+
} from '@volter/editor-sdk/kit/account-client';
|
|
10
10
|
import { toolContributionSurfaces } from '@volter/editor-core/components/ToolContributionSurfaces';
|
|
11
11
|
import { ToolErrorBoundary } from '@volter/editor-core/components/ToolHost';
|
|
12
12
|
import { openToolDocument } from '@volter/editor-core/components/tool-documents';
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
closeWorkspaceDocument,
|
|
26
26
|
openWorkspaceDocument,
|
|
27
27
|
type WorkspaceDocumentContentProps,
|
|
28
|
-
} from '@volter/editor-
|
|
28
|
+
} from '@volter/editor-sdk/kit/workspace-document-registry';
|
|
29
29
|
import { Button, TextInput } from '@volter/editor-sdk/widgets';
|
|
30
30
|
import {
|
|
31
31
|
acceptGenerationJob,
|
|
@@ -134,7 +134,7 @@ export function GenerationCreateDocumentContent() {
|
|
|
134
134
|
variant="ghost"
|
|
135
135
|
className="vgai-generation-create-card"
|
|
136
136
|
key={contribution.id}
|
|
137
|
-
onClick={() => openToolDocument(
|
|
137
|
+
onClick={() => openToolDocument(contribution.id)}
|
|
138
138
|
>
|
|
139
139
|
<strong>{contribution.title}</strong>
|
|
140
140
|
<span>{contribution.tool?.summary}</span>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { assertEditorServerResponse, editorServerJson } from '@volter/editor-
|
|
1
|
+
import { assertEditorServerResponse, editorServerJson } from '@volter/editor-sdk/kit/editor-server-response';
|
|
2
2
|
import { runProjectTool } from '@volter/editor-core/project-tools';
|
|
3
3
|
import type { GenerationJob, GenerationJobsDocument } from '@volter/editor-sdk/generations';
|
|
4
4
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* plus the small amount of text (state, model, charge) that frames them.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import { ASSET_ROOTS, assetRootServingUrl } from '@volter/editor-
|
|
10
|
+
import { ASSET_ROOTS, assetRootServingUrl } from '@volter/editor-sdk/kit/project-asset-roots';
|
|
11
11
|
import type { GenerationBilling, GenerationJob } from '@volter/editor-sdk/generations';
|
|
12
12
|
|
|
13
13
|
/**
|
|
@@ -55,7 +55,7 @@ import { probeAuthoringReads } from './coverage/authoring-read-probe';
|
|
|
55
55
|
import {
|
|
56
56
|
authoringAdapterEpoch,
|
|
57
57
|
inspectAuthoringAdapterSeams,
|
|
58
|
-
} from '@volter/editor-
|
|
58
|
+
} from '@volter/editor-sdk/kit/authoring-seam-evidence';
|
|
59
59
|
|
|
60
60
|
/** Re-exported so consumers of a coverage row need one import, not two. */
|
|
61
61
|
export type { AuthoringProviderKey };
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
type ObservationDeclaration,
|
|
27
27
|
} from '@volter/editor-project/adapter/adapter-module';
|
|
28
28
|
import type { ObservationBinding } from '@volter/editor-project/adapter/binding';
|
|
29
|
-
import { adapterInputBinding, adapterObservations } from '@volter/editor-
|
|
29
|
+
import { adapterInputBinding, adapterObservations } from '@volter/editor-sdk/kit/adapter-observation';
|
|
30
30
|
|
|
31
31
|
const ADAPTER_REGISTRATION_ID = '__adapter__';
|
|
32
32
|
const installedGames = new WeakSet<Game>();
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* verbs the transport's picker and `vgai run` share.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { assertEditorServerResponse, editorServerJson } from '@volter/editor-
|
|
8
|
-
import { BASE } from '@volter/editor-
|
|
7
|
+
import { assertEditorServerResponse, editorServerJson } from '@volter/editor-sdk/kit/editor-server-response';
|
|
8
|
+
import { BASE } from '@volter/editor-sdk/kit/api-base';
|
|
9
9
|
|
|
10
10
|
export interface ConfigurationStatus {
|
|
11
11
|
readonly id: string;
|
|
@@ -17,8 +17,8 @@ import type {
|
|
|
17
17
|
WriteAck,
|
|
18
18
|
} from '@volter/editor-project/adapter';
|
|
19
19
|
import type { ChannelValue } from '@volter/editor-core/creation-site-edit';
|
|
20
|
-
import { creationSiteAnchor, instancesAtSite } from '@volter/editor-
|
|
21
|
-
import { editorConsole } from '@volter/editor-
|
|
20
|
+
import { creationSiteAnchor, instancesAtSite } from '@volter/editor-sdk/kit/creation-site-registry';
|
|
21
|
+
import { editorConsole } from '@volter/editor-sdk/kit/editor-console';
|
|
22
22
|
import type { EditorShellStore } from '@volter/editor-core/editor-shell-store';
|
|
23
23
|
import { type JournalSubject, JsonHistoryResource } from '../history/json-history-resource';
|
|
24
24
|
import { createEphemeralPersistence } from './ephemeral-persistence';
|
|
@@ -11,7 +11,7 @@ import type {
|
|
|
11
11
|
VgaiGameHierarchyGroup,
|
|
12
12
|
VgaiGameHierarchyProvider,
|
|
13
13
|
} from '@volter/editor-project/adapter/ingest/game-contract';
|
|
14
|
-
import { editorConsole } from '@volter/editor-
|
|
14
|
+
import { editorConsole } from '@volter/editor-sdk/kit/editor-console';
|
|
15
15
|
|
|
16
16
|
const GROUP_PREFIX = 'contract-hierarchy:group:';
|
|
17
17
|
const RENDER_TREE_ID = 'contract-hierarchy:render-tree';
|
|
@@ -31,7 +31,7 @@ import type {
|
|
|
31
31
|
import type { StoriesProvider, StoryRef } from '@volter/editor-project/adapter';
|
|
32
32
|
import type { VgaiGameContract, VgaiGameScene } from '@volter/editor-project/adapter/ingest/game-contract';
|
|
33
33
|
import { readGameScenes } from '@volter/editor-project/adapter/ingest/game-contract';
|
|
34
|
-
import { editorConsole } from '@volter/editor-
|
|
34
|
+
import { editorConsole } from '@volter/editor-sdk/kit/editor-console';
|
|
35
35
|
|
|
36
36
|
function assertScenes(value: unknown): VgaiGameScene[] {
|
|
37
37
|
if (!Array.isArray(value)) throw new Error('scenes.list() did not return an array');
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
24
|
import type { NodeCreationSite, RelatedSubjectsProvider } from '@volter/editor-project/adapter';
|
|
25
|
-
import { type InstanceSourceLocator, runInstanceSourceAction } from '@volter/editor-
|
|
26
|
-
import { showTransientHint } from '@volter/editor-
|
|
25
|
+
import { type InstanceSourceLocator, runInstanceSourceAction } from '@volter/editor-sdk/kit/instance-source-actions';
|
|
26
|
+
import { showTransientHint } from '@volter/editor-sdk/kit/transient-hint';
|
|
27
27
|
|
|
28
28
|
/** The related provider for an adapter whose truth can place a subject at a
|
|
29
29
|
* creation site. `resolveSite` is the adapter's own id→site hop. */
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import type { PersistenceProvider } from '@volter/editor-project/adapter';
|
|
18
|
-
import { EPHEMERAL_DESTINATION } from '@volter/editor-
|
|
18
|
+
import { EPHEMERAL_DESTINATION } from '@volter/editor-sdk/kit/write-pipe';
|
|
19
19
|
|
|
20
20
|
export function createEphemeralPersistence(): PersistenceProvider {
|
|
21
21
|
return {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
import type { WriteAck, WriteAnchorKind } from '@volter/editor-project/adapter';
|
|
32
32
|
import type { ChannelValue } from '@volter/editor-core/creation-site-edit';
|
|
33
33
|
import type { SourcePersistenceBackend, SourceWriteSubject } from './source-persistence-backend';
|
|
34
|
-
import { resolvesLiveOnly, runWritePipe, type WriteResolution } from '@volter/editor-
|
|
34
|
+
import { resolvesLiveOnly, runWritePipe, type WriteResolution } from '@volter/editor-sdk/kit/write-pipe';
|
|
35
35
|
|
|
36
36
|
/** The one-property-per-gesture refusal, spelled once — it is the persistence
|
|
37
37
|
* pipeline's own rule, not any substrate's voice. */
|
|
@@ -25,18 +25,18 @@
|
|
|
25
25
|
*/
|
|
26
26
|
|
|
27
27
|
import type { NodeCreationSite } from '@volter/editor-project/adapter';
|
|
28
|
-
import { base64ToBytes, bytesToBase64, sha256Hex } from '@volter/editor-
|
|
28
|
+
import { base64ToBytes, bytesToBase64, sha256Hex } from '@volter/editor-sdk/kit/bytes-codec';
|
|
29
29
|
import type {
|
|
30
30
|
ChannelValue,
|
|
31
31
|
CreationSiteLiteralReport,
|
|
32
32
|
CreationSiteSurface,
|
|
33
33
|
CreationSiteWriteScope,
|
|
34
34
|
} from '@volter/editor-core/creation-site-edit';
|
|
35
|
-
import { editorConsole } from '@volter/editor-
|
|
36
|
-
import { editorIsAuthoring } from '@volter/editor-
|
|
35
|
+
import { editorConsole } from '@volter/editor-sdk/kit/editor-console';
|
|
36
|
+
import { editorIsAuthoring } from '@volter/editor-sdk/kit/editor-session-mode';
|
|
37
37
|
import type { HistoryService } from '@volter/editor-core/history/history-service';
|
|
38
38
|
import { projectSourceAppliedChange } from '@volter/editor-core/history/source-history-backend';
|
|
39
|
-
import type { ResourceDriver, ResourceKey } from '@volter/editor-
|
|
39
|
+
import type { ResourceDriver, ResourceKey } from '@volter/editor-sdk/kit/history-types';
|
|
40
40
|
import type { SourceWriteBackend } from '@volter/editor-core/ui-source/source-write-backend';
|
|
41
41
|
import {
|
|
42
42
|
type DataEditPlan,
|
|
@@ -17,7 +17,7 @@ import { type CanvasPixiNamespace, resolveCanvasPixiForEditor } from '../canvas-
|
|
|
17
17
|
import { createWithOwnedPixiTickerListeners } from './owned-pixi-ticker-listeners';
|
|
18
18
|
import { initializePixiIsolationAssets } from './pixi-isolation-assets';
|
|
19
19
|
import { fitSceneView, registerStillFramePresenter } from './pixi-still-presentation';
|
|
20
|
-
import type { RootViewController } from '@volter/editor-
|
|
20
|
+
import type { RootViewController } from '@volter/editor-sdk/kit/world-pan-state';
|
|
21
21
|
|
|
22
22
|
export type IsolatedPixiScreenCtor = (new () => IsolatedPixiScreen) & {
|
|
23
23
|
readonly assetBundles?: readonly string[];
|
|
@@ -71,7 +71,7 @@ import type { Container, Graphics, Matrix, PointData, Sprite, Text, Texture } fr
|
|
|
71
71
|
import * as shellPixi from 'pixi.js';
|
|
72
72
|
import type { CanvasPixiNamespace } from '../canvas-entry-runtime';
|
|
73
73
|
import { componentStatesProvider } from '@volter/editor-core/component-states-registry';
|
|
74
|
-
import { editorConsole } from '@volter/editor-
|
|
74
|
+
import { editorConsole } from '@volter/editor-sdk/kit/editor-console';
|
|
75
75
|
import type { EditorShellStore } from '@volter/editor-core/editor-shell-store';
|
|
76
76
|
import type { JournalSubject } from '../history/json-history-resource';
|
|
77
77
|
import { PixiProjector } from '../projection/pixi';
|
|
@@ -83,7 +83,7 @@ import {
|
|
|
83
83
|
} from './pixi-source-identity';
|
|
84
84
|
import { CanvasStructureHistory } from './pixi-structure-history';
|
|
85
85
|
import { fromNeutralTransform, toNeutralTransform } from './pixi-transform-channels';
|
|
86
|
-
import { resolvesLiveOnly, runWritePipe } from '@volter/editor-
|
|
86
|
+
import { resolvesLiveOnly, runWritePipe } from '@volter/editor-sdk/kit/write-pipe';
|
|
87
87
|
|
|
88
88
|
/**
|
|
89
89
|
* What a write target is handed at construction — the live view it edits
|
|
@@ -49,8 +49,8 @@ import type {
|
|
|
49
49
|
} from '@volter/editor-project/adapter';
|
|
50
50
|
import type { Container } from 'pixi.js';
|
|
51
51
|
import type { ChannelValue, CreationSiteLiteralReport } from '@volter/editor-core/creation-site-edit';
|
|
52
|
-
import { creationSiteAnchor, instancesAtSite } from '@volter/editor-
|
|
53
|
-
import { editorConsole } from '@volter/editor-
|
|
52
|
+
import { creationSiteAnchor, instancesAtSite } from '@volter/editor-sdk/kit/creation-site-registry';
|
|
53
|
+
import { editorConsole } from '@volter/editor-sdk/kit/editor-console';
|
|
54
54
|
import { JsonHistoryResource } from '../history/json-history-resource';
|
|
55
55
|
import { createEphemeralPersistence } from './ephemeral-persistence';
|
|
56
56
|
import { multiChannelRefusal, persistChannelWrite } from './gesture-persist';
|
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
runWritePipe,
|
|
65
65
|
type WriteAck,
|
|
66
66
|
type WriteResolution,
|
|
67
|
-
} from '@volter/editor-
|
|
67
|
+
} from '@volter/editor-sdk/kit/write-pipe';
|
|
68
68
|
|
|
69
69
|
interface PixiLiveHistoryState {
|
|
70
70
|
overlay: Overlay2D;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { registerPresentedCanvasFrame } from '@volter/editor-core/canvas-preview-frames';
|
|
16
|
-
import type { RootViewController } from '@volter/editor-
|
|
16
|
+
import type { RootViewController } from '@volter/editor-sdk/kit/world-pan-state';
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* Frame authored world bounds in the independent Scene camera. Unlike an
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
*/
|
|
31
31
|
|
|
32
32
|
import type { Container } from 'pixi.js';
|
|
33
|
-
import { editorConsole } from '@volter/editor-
|
|
33
|
+
import { editorConsole } from '@volter/editor-sdk/kit/editor-console';
|
|
34
34
|
import type { EditorShellStore } from '@volter/editor-core/editor-shell-store';
|
|
35
35
|
import { type JournalSubject, JsonHistoryResource } from '../history/json-history-resource';
|
|
36
36
|
|
|
@@ -47,8 +47,8 @@ import type {
|
|
|
47
47
|
CreationSiteSurface,
|
|
48
48
|
CreationSiteWriteScope,
|
|
49
49
|
} from '@volter/editor-core/creation-site-edit';
|
|
50
|
-
import { editorConsole } from '@volter/editor-
|
|
51
|
-
import { editorIsAuthoring } from '@volter/editor-
|
|
50
|
+
import { editorConsole } from '@volter/editor-sdk/kit/editor-console';
|
|
51
|
+
import { editorIsAuthoring } from '@volter/editor-sdk/kit/editor-session-mode';
|
|
52
52
|
import type { HistoryService } from '@volter/editor-core/history/history-service';
|
|
53
53
|
import { ingestSourceWritesRecordedIfPrimed } from '@volter/editor-core/ui-source/tier-source-write-backend';
|
|
54
54
|
import type { IngestInspectRequest } from './ingest-source-persistence';
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
ingestOwnershipNow,
|
|
58
58
|
reportIngestSourceRefusal,
|
|
59
59
|
} from './ingest-source-persistence';
|
|
60
|
-
import { LIVE_ONLY_DESTINATION } from '@volter/editor-
|
|
60
|
+
import { LIVE_ONLY_DESTINATION } from '@volter/editor-sdk/kit/write-pipe';
|
|
61
61
|
|
|
62
62
|
/**
|
|
63
63
|
* The adapter's own channel read/write, handed to a backend so the live half of
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
* those in; this module never guesses them.
|
|
28
28
|
*/
|
|
29
29
|
|
|
30
|
-
import { showTransientHint } from '@volter/editor-
|
|
30
|
+
import { showTransientHint } from '@volter/editor-sdk/kit/transient-hint';
|
|
31
31
|
import type { SourceWriteBackend } from '@volter/editor-core/ui-source/source-write-backend';
|
|
32
|
-
import { resolvesLiveOnly, runWritePipe, type WriteAck, type WriteResolution } from '@volter/editor-
|
|
32
|
+
import { resolvesLiveOnly, runWritePipe, type WriteAck, type WriteResolution } from '@volter/editor-sdk/kit/write-pipe';
|
|
33
33
|
|
|
34
34
|
/** The `writeStruct` options bag, spelled once (the backend's own shape). */
|
|
35
35
|
export type StructOpOptions = Parameters<SourceWriteBackend['writeStruct']>[2];
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* serves them.
|
|
25
25
|
*/
|
|
26
26
|
|
|
27
|
-
import { commandLine } from '@volter/editor-
|
|
27
|
+
import { commandLine } from '@volter/editor-sdk/kit/product-command';
|
|
28
28
|
import type { ImportSpecifier as EsModuleImport } from 'es-module-lexer';
|
|
29
29
|
import { init as esModuleLexerInit, parse as parseEsModule } from 'es-module-lexer';
|
|
30
30
|
import * as esbuild from 'esbuild-wasm';
|
|
@@ -20,7 +20,7 @@ import type { resolveCanvasEntryAdapter } from '@volter/game-runtime/canvas-reac
|
|
|
20
20
|
import type { RootAdapter } from '@volter/editor-project/adapter';
|
|
21
21
|
import type * as PIXI from 'pixi.js';
|
|
22
22
|
import { CANVAS_RUNTIME_PATH } from '@volter/editor-sdk/host';
|
|
23
|
-
import { isPackagedRuntime } from '@volter/editor-
|
|
23
|
+
import { isPackagedRuntime } from '@volter/editor-sdk/kit/packaged-runtime';
|
|
24
24
|
|
|
25
25
|
type CanvasEntryResolver = typeof resolveCanvasEntryAdapter;
|
|
26
26
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { faVolumeHigh, faVolumeXmark } from '@fortawesome/free-solid-svg-icons';
|
|
2
|
+
import { userLocalSection, writeUserLocalSection } from '@volter/editor-sdk/kit/user-local-state';
|
|
2
3
|
import { AnchoredMenu, Button, EditorIcon, Inline, MenuItem } from '@volter/editor-sdk/widgets';
|
|
3
4
|
import type { PerformanceSnapshot } from '@volter/game-runtime/dev/performance-profiler';
|
|
4
5
|
import type { AudioAdapter, AudioMeterFrame } from '@volter/editor-project/adapter';
|
|
@@ -27,7 +28,8 @@ import {
|
|
|
27
28
|
} from './header-telemetry-model';
|
|
28
29
|
import { profilerView } from './utility-view-state';
|
|
29
30
|
|
|
30
|
-
|
|
31
|
+
/** The editor's mute: the person's, in every project (their UI state). */
|
|
32
|
+
const MUTE_SECTION = 'muted';
|
|
31
33
|
const EMPTY_PERFORMANCE: PerformanceSnapshot = {
|
|
32
34
|
enabled: false,
|
|
33
35
|
recording: false,
|
|
@@ -50,20 +52,11 @@ const EMPTY_PERFORMANCE: PerformanceSnapshot = {
|
|
|
50
52
|
};
|
|
51
53
|
|
|
52
54
|
function storedMutePreference(): boolean {
|
|
53
|
-
|
|
54
|
-
return localStorage.getItem(MUTE_KEY) === '1';
|
|
55
|
-
} catch {
|
|
56
|
-
return false;
|
|
57
|
-
}
|
|
55
|
+
return userLocalSection<unknown>(MUTE_SECTION) === true;
|
|
58
56
|
}
|
|
59
57
|
|
|
60
58
|
function persistMutePreference(muted: boolean): void {
|
|
61
|
-
|
|
62
|
-
localStorage.setItem(MUTE_KEY, muted ? '1' : '0');
|
|
63
|
-
} catch {
|
|
64
|
-
// Storage can be unavailable in an embedded/locked-down host. Muting the
|
|
65
|
-
// live adapters still succeeds; only the next-session preference is lost.
|
|
66
|
-
}
|
|
59
|
+
writeUserLocalSection(MUTE_SECTION, muted);
|
|
67
60
|
}
|
|
68
61
|
|
|
69
62
|
function audioDisplayLevel(adapter: AudioAdapter, frames: readonly AudioMeterFrame[]): number {
|
|
@@ -17,15 +17,15 @@ import {
|
|
|
17
17
|
import { PixiAuthoringAdapter } from '../authoring/pixi-authoring-adapter';
|
|
18
18
|
import { createCreationSiteCanvasWriteTarget } from '../authoring/pixi-creation-site-write-target';
|
|
19
19
|
import { installCanvasSceneNavigation } from '@volter/editor-core/authoring/react-canvas-navigation';
|
|
20
|
-
import { createRootViewController } from '@volter/editor-
|
|
20
|
+
import { createRootViewController } from '@volter/editor-sdk/kit/world-pan-state';
|
|
21
21
|
import { capturePixiDisplayObjectThumbnail } from '@volter/editor-core/canvas-preview-frames';
|
|
22
|
-
import type { DocumentPreviewCaptureRequest } from '@volter/editor-
|
|
23
|
-
import {
|
|
22
|
+
import type { DocumentPreviewCaptureRequest } from '@volter/editor-sdk/kit/document-preview-source';
|
|
23
|
+
import { useThreeEditorStore } from '@volter/editor-core/editor-runtime';
|
|
24
24
|
import { authoringJournal } from '../history/json-history-resource';
|
|
25
|
-
import { setActiveScope } from '@volter/editor-
|
|
25
|
+
import { setActiveScope } from '@volter/editor-sdk/kit/hotkeys';
|
|
26
26
|
import { getCurrentProject } from '@volter/editor-core/project-manager';
|
|
27
27
|
import { takeNamedExport } from '../take-named-export';
|
|
28
|
-
import { registerWorkspaceDocumentSelection } from '@volter/editor-
|
|
28
|
+
import { registerWorkspaceDocumentSelection } from '@volter/editor-sdk/kit/workspace-document-registry';
|
|
29
29
|
import {
|
|
30
30
|
CANVAS_SCENE_BACKGROUND,
|
|
31
31
|
CanvasSceneBackdrop,
|
|
@@ -69,7 +69,7 @@ export function PixiIsolationSceneContent({
|
|
|
69
69
|
exportName,
|
|
70
70
|
isolationSetup: isolationSetupSpec,
|
|
71
71
|
}: PixiIsolationSceneContentProps) {
|
|
72
|
-
const store =
|
|
72
|
+
const store = useThreeEditorStore();
|
|
73
73
|
const containerRef = useRef<HTMLDivElement>(null);
|
|
74
74
|
const viewRef = useRef(createRootViewController());
|
|
75
75
|
const view = viewRef.current;
|
|
@@ -196,13 +196,14 @@ export function PixiIsolationSceneContent({
|
|
|
196
196
|
touchAction: 'none',
|
|
197
197
|
}}
|
|
198
198
|
>
|
|
199
|
-
<CanvasSceneBackdrop view={view} />
|
|
199
|
+
<CanvasSceneBackdrop view={view} documentId={documentId} />
|
|
200
200
|
{adapter ? <RootSelectionOverlay adapter={adapter} view={view} transformModeAware /> : null}
|
|
201
201
|
<CanvasSceneControls
|
|
202
202
|
active={active}
|
|
203
203
|
{...(adapter ? { adapter } : {})}
|
|
204
204
|
containerRef={containerRef}
|
|
205
205
|
view={view}
|
|
206
|
+
documentId={documentId}
|
|
206
207
|
/>
|
|
207
208
|
{!ready ? (
|
|
208
209
|
<div
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
import { fsImportPath } from '@volter/editor-sdk/session/project-module-url';
|
|
28
28
|
import { themeVars } from '@volter/editor-sdk/widgets';
|
|
29
29
|
import { useEffect, useRef, useState } from 'react';
|
|
30
|
-
import type { DocumentPreviewCaptureRequest } from '@volter/editor-
|
|
30
|
+
import type { DocumentPreviewCaptureRequest } from '@volter/editor-sdk/kit/document-preview-source';
|
|
31
31
|
import { captureAuthoredThreeScenePreview } from '../document-preview-three';
|
|
32
32
|
import { getCurrentProject } from '@volter/editor-core/project-manager';
|
|
33
33
|
import {
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
type StoryPreviewComponent,
|
|
41
41
|
} from '@volter/editor-core/stories/story-three-preview';
|
|
42
42
|
import { takeNamedExport } from '../take-named-export';
|
|
43
|
-
import type { WorkspaceDocumentContentProps } from '@volter/editor-
|
|
43
|
+
import type { WorkspaceDocumentContentProps } from '@volter/editor-sdk/kit/workspace-document-registry';
|
|
44
44
|
import { Object3DDocumentViewport } from '@volter/editor-core/components/Object3DDocumentViewport';
|
|
45
45
|
|
|
46
46
|
export interface ThreeIsolationSceneState {
|
|
@@ -8,17 +8,13 @@
|
|
|
8
8
|
* `useCenterDocuments`): it binds the Game document's tab, reports the
|
|
9
9
|
* live/stopped edge and closes every document on session teardown. What moved
|
|
10
10
|
* here is only what the kit no longer does — synthesize the Scene document
|
|
11
|
-
* the kit still routes every three root's edit document to
|
|
12
|
-
* store's `activeViewportTab` into registry activation for the Scene/Game pair.
|
|
11
|
+
* the kit still routes every three root's edit document to.
|
|
13
12
|
*
|
|
14
|
-
* THE INPUT-GATE CONTRACT (CLAUDE.md T6.3): `
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* back into registry activation (`syncSceneDocument`, run on every store
|
|
20
|
-
* notify).
|
|
21
|
-
*/
|
|
13
|
+
* THE INPUT-GATE CONTRACT (CLAUDE.md T6.3): `play-mode.ts` and the ingest
|
|
14
|
+
* lanes gate game input on `playState === 'playing' && activeViewportTab ===
|
|
15
|
+
* 'play'`. The tab is derived from workspace focus (the Game document is
|
|
16
|
+
* active), so this module never writes it and never mirrors it back into
|
|
17
|
+
* activation. */
|
|
22
18
|
|
|
23
19
|
import {
|
|
24
20
|
activeDocumentSourcePath,
|
|
@@ -26,8 +22,8 @@ import {
|
|
|
26
22
|
activeSaveState,
|
|
27
23
|
} from '@volter/editor-core/authoring/shell-document-ops';
|
|
28
24
|
import { Object3DDocumentViewport } from '@volter/editor-core/components/Object3DDocumentViewport';
|
|
29
|
-
import type { DocumentPreviewSource } from '@volter/editor-
|
|
30
|
-
import { editorConsole } from '@volter/editor-
|
|
25
|
+
import type { DocumentPreviewSource } from '@volter/editor-sdk/kit/document-preview-source';
|
|
26
|
+
import { editorConsole } from '@volter/editor-sdk/kit/editor-console';
|
|
31
27
|
import type { EditorShellStore, ViewportTab } from '@volter/editor-core/editor-shell-store';
|
|
32
28
|
import { projectAdapterFacet, subscribeProjectAdapter } from '@volter/editor-core/project-adapter';
|
|
33
29
|
import { getCurrentProject } from '@volter/editor-core/project-manager';
|
|
@@ -36,15 +32,14 @@ import {
|
|
|
36
32
|
registerAvailableWorkspaceDocument,
|
|
37
33
|
unregisterAvailableWorkspaceDocument,
|
|
38
34
|
} from '@volter/editor-core/workspace-available-documents';
|
|
39
|
-
import {
|
|
35
|
+
import { SCENE_DOCUMENT_ID } from '@volter/editor-sdk/kit/workspace-document-ids';
|
|
40
36
|
import {
|
|
41
37
|
activateWorkspaceDocument,
|
|
42
38
|
activeWorkspaceDocumentId,
|
|
43
|
-
openWorkspaceDocuments,
|
|
44
39
|
setWorkspaceDocumentDirty,
|
|
45
40
|
type WorkspaceDocumentContentProps,
|
|
46
41
|
type WorkspaceDocumentDescriptor,
|
|
47
|
-
} from '@volter/editor-
|
|
42
|
+
} from '@volter/editor-sdk/kit/workspace-document-registry';
|
|
48
43
|
import { Button, themeVars } from '@volter/editor-sdk/widgets';
|
|
49
44
|
import { Component, type ErrorInfo, type ReactNode, useEffect, useState } from 'react';
|
|
50
45
|
import { scheduleAfterPaint } from '../after-paint';
|
|
@@ -74,7 +69,6 @@ export interface CenterDocumentsStore {
|
|
|
74
69
|
readonly sourcePath?: string | null;
|
|
75
70
|
/** Whether the active authoring adapter has unsaved edits. */
|
|
76
71
|
readonly isDirty: boolean;
|
|
77
|
-
setActiveViewportTab(tab: ViewportTab): void;
|
|
78
72
|
}
|
|
79
73
|
|
|
80
74
|
/** The root Scene's preview stays available after its tab closes. Its source
|
|
@@ -322,35 +316,24 @@ export function createCenterDocumentDescriptors(store: CenterDocumentsStore): {
|
|
|
322
316
|
store.savePath
|
|
323
317
|
? { kind: 'scene', path: store.savePath }
|
|
324
318
|
: { kind: 'workspace', id: SCENE_DOCUMENT_ID },
|
|
325
|
-
onActivate: () => store.setActiveViewportTab('edit'),
|
|
326
319
|
};
|
|
327
320
|
return { scene };
|
|
328
321
|
}
|
|
329
322
|
|
|
330
323
|
/**
|
|
331
|
-
*
|
|
332
|
-
*
|
|
333
|
-
*
|
|
334
|
-
* no-ops. The Game document's live/stopped edge is the kit's
|
|
335
|
-
* (`useCenterDocuments`), not repeated here.
|
|
324
|
+
* Keeps the Scene document in step with the session. Idempotent — safe (and
|
|
325
|
+
* designed) to run on EVERY store notify. The Game document's live/stopped edge
|
|
326
|
+
* is the kit's (`useCenterDocuments`), not repeated here.
|
|
336
327
|
*
|
|
337
328
|
* 1. the scene document is available when the manifest has a Three root;
|
|
338
329
|
* 2. its tab's dirty dot tracks `isDirty` live (the title is fixed);
|
|
339
|
-
* 3.
|
|
340
|
-
* play/stop, `set-viewport-tab` control commands, the ingest mount lane's
|
|
341
|
-
* direct writes). A `play` tab value with no Game document open (stopped,
|
|
342
|
-
* or a transient store state) activates the scene if its tab is open.
|
|
330
|
+
* 3. with no document active at all (a first run), the scene document is.
|
|
343
331
|
*/
|
|
344
332
|
export function syncCenterDocuments(
|
|
345
333
|
store: CenterDocumentsStore,
|
|
346
334
|
docs: { scene: WorkspaceDocumentDescriptor },
|
|
347
335
|
hasThreeRoot = true,
|
|
348
336
|
): void {
|
|
349
|
-
const isOpen = (id: string) => openWorkspaceDocuments().some((d) => d.descriptor.id === id);
|
|
350
|
-
// Opening a registry document activates it. Capture the caller's requested
|
|
351
|
-
// viewport before touching the open set, then restore that intent below.
|
|
352
|
-
const requestedViewportTab = store.activeViewportTab;
|
|
353
|
-
|
|
354
337
|
const table = projectAdapterFacet()?.scenes;
|
|
355
338
|
if (hasThreeRoot && !(table && isolationTabsReplaceGenericScene(table))) {
|
|
356
339
|
const row = table
|
|
@@ -377,21 +360,7 @@ export function syncCenterDocuments(
|
|
|
377
360
|
unregisterAvailableWorkspaceDocument(SCENE_DOCUMENT_ID);
|
|
378
361
|
}
|
|
379
362
|
|
|
380
|
-
|
|
381
|
-
// being active is a legitimate state (its own onActivate already asserted
|
|
382
|
-
// the store's tab, so the T6.3 gate is off). The mirror therefore only
|
|
383
|
-
// corrects genuine disagreements about the SCENE/GAME pair:
|
|
384
|
-
// - tab says 'play' (play auto-switch, `set-viewport-tab play`) → the
|
|
385
|
-
// Game document must be active;
|
|
386
|
-
// - tab says 'edit' while the GAME document is active (external
|
|
387
|
-
// `set-viewport-tab edit` during play) → back to the scene document;
|
|
388
|
-
// - no active document at all (first run) → the scene document.
|
|
389
|
-
// An 'edit' tab with an asset/story document active is CONSISTENT and must
|
|
390
|
-
// not be "corrected".
|
|
391
|
-
const activeId = activeWorkspaceDocumentId();
|
|
392
|
-
if (requestedViewportTab === 'play' && isOpen(GAME_DOCUMENT_ID)) {
|
|
393
|
-
if (activeId !== GAME_DOCUMENT_ID) activateWorkspaceDocument(GAME_DOCUMENT_ID);
|
|
394
|
-
} else if (hasThreeRoot && (activeId === GAME_DOCUMENT_ID || activeId === null)) {
|
|
363
|
+
if (hasThreeRoot && activeWorkspaceDocumentId() === null) {
|
|
395
364
|
activateWorkspaceDocument(SCENE_DOCUMENT_ID);
|
|
396
365
|
}
|
|
397
366
|
}
|
|
@@ -427,7 +396,6 @@ export function bindSceneDocument(store: EditorShellStore): () => void {
|
|
|
427
396
|
get isDirty() {
|
|
428
397
|
return activeSaveState(store) === 'unsaved';
|
|
429
398
|
},
|
|
430
|
-
setActiveViewportTab: (tab) => store.setActiveViewportTab(tab),
|
|
431
399
|
};
|
|
432
400
|
const docs = createCenterDocumentDescriptors(view);
|
|
433
401
|
// Missing is the legacy-safe default: manifests read by current editor
|