@fps-games/editor 0.2.1-beta.3 → 0.2.1-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build-info.json +44 -44
- package/dist/editor-commands/capabilities/assets.d.ts +8 -0
- package/dist/editor-commands/capabilities/assets.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/assets.js +41 -41
- package/dist/editor-commands/capabilities/assets.js.map +1 -0
- package/dist/editor-commands/capabilities/editor-state.d.ts +5 -0
- package/dist/editor-commands/capabilities/editor-state.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/editor-state.js +22 -22
- package/dist/editor-commands/capabilities/editor-state.js.map +1 -0
- package/dist/editor-commands/capabilities/hierarchy.d.ts +4 -0
- package/dist/editor-commands/capabilities/hierarchy.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/hierarchy.js +5 -5
- package/dist/editor-commands/capabilities/hierarchy.js.map +1 -0
- package/dist/editor-commands/capabilities/host-lifecycle.d.ts +11 -0
- package/dist/editor-commands/capabilities/host-lifecycle.d.ts.map +1 -0
- package/dist/editor-commands/capabilities/host-lifecycle.js +149 -0
- package/dist/editor-commands/capabilities/host-lifecycle.js.map +1 -0
- package/dist/editor-commands/capabilities/prefabs.d.ts +5 -0
- package/dist/editor-commands/capabilities/prefabs.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/prefabs.js +93 -93
- package/dist/editor-commands/capabilities/prefabs.js.map +1 -0
- package/dist/editor-commands/capabilities/scene-objects.d.ts +8 -0
- package/dist/editor-commands/capabilities/scene-objects.d.ts.map +1 -0
- package/dist/editor-commands/capabilities/scene-objects.js +480 -0
- package/dist/editor-commands/capabilities/scene-objects.js.map +1 -0
- package/dist/editor-commands/capabilities/selection.d.ts +5 -0
- package/dist/editor-commands/capabilities/selection.d.ts.map +1 -0
- package/dist/editor-commands/capabilities/selection.js +60 -0
- package/dist/editor-commands/capabilities/selection.js.map +1 -0
- package/dist/editor-commands/capabilities/shadows.d.ts +5 -0
- package/dist/editor-commands/capabilities/shadows.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/shadows.js +74 -74
- package/dist/editor-commands/capabilities/shadows.js.map +1 -0
- package/dist/editor-commands/capabilities/transform.d.ts +5 -0
- package/dist/editor-commands/capabilities/transform.d.ts.map +1 -0
- package/dist/editor-commands/capabilities/transform.js +164 -0
- package/dist/editor-commands/capabilities/transform.js.map +1 -0
- package/dist/editor-commands/capabilities/ui-regions.d.ts +4 -0
- package/dist/editor-commands/capabilities/ui-regions.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/ui-regions.js +55 -57
- package/dist/editor-commands/capabilities/ui-regions.js.map +1 -0
- package/dist/editor-commands/capabilities/viewport.d.ts +5 -0
- package/dist/editor-commands/capabilities/viewport.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/capabilities/viewport.js +100 -100
- package/dist/editor-commands/capabilities/viewport.js.map +1 -0
- package/dist/editor-commands/command-sources.d.ts +7 -0
- package/dist/editor-commands/command-sources.d.ts.map +1 -0
- package/dist/editor-commands/command-sources.js +34 -0
- package/dist/editor-commands/command-sources.js.map +1 -0
- package/dist/editor-commands/diagnostics.d.ts +12 -0
- package/dist/editor-commands/diagnostics.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/diagnostics.js +4 -4
- package/dist/editor-commands/diagnostics.js.map +1 -0
- package/dist/{agent-bridge → editor-commands}/index.d.ts +1 -1
- package/dist/editor-commands/index.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/index.js +1 -1
- package/dist/editor-commands/index.js.map +1 -0
- package/dist/editor-commands/register.d.ts +4 -0
- package/dist/editor-commands/register.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/register.js +323 -286
- package/dist/editor-commands/register.js.map +1 -0
- package/dist/{agent-bridge → editor-commands}/shared.d.ts +80 -80
- package/dist/editor-commands/shared.d.ts.map +1 -0
- package/dist/{agent-bridge → editor-commands}/shared.js +29 -29
- package/dist/editor-commands/shared.js.map +1 -0
- package/dist/editor-commands/source-types.d.ts +110 -0
- package/dist/editor-commands/source-types.d.ts.map +1 -0
- package/dist/editor-commands/source-types.js.map +1 -0
- package/dist/editor-plugin-commands.d.ts +4 -0
- package/dist/editor-plugin-commands.d.ts.map +1 -0
- package/dist/editor-plugin-commands.js +18 -0
- package/dist/editor-plugin-commands.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/local-editor-commands.d.ts +2 -0
- package/dist/local-editor-commands.d.ts.map +1 -0
- package/dist/local-editor-commands.js +2 -0
- package/dist/local-editor-commands.js.map +1 -0
- package/dist/local-editor-harness.d.ts +35 -21
- package/dist/local-editor-harness.d.ts.map +1 -1
- package/dist/local-editor-harness.js +1721 -367
- package/dist/local-editor-harness.js.map +1 -1
- package/dist/local-editor-prefab-stage-transaction.d.ts +2 -1
- package/dist/local-editor-prefab-stage-transaction.d.ts.map +1 -1
- package/dist/local-editor-prefab-stage-transaction.js +6 -5
- package/dist/local-editor-prefab-stage-transaction.js.map +1 -1
- package/dist/local-editor-scene-view-interaction-runtime.d.ts.map +1 -1
- package/dist/local-editor-scene-view-interaction-runtime.js +2 -5
- package/dist/local-editor-scene-view-interaction-runtime.js.map +1 -1
- package/dist/playable-local-editor-entry.d.ts +10 -0
- package/dist/playable-local-editor-entry.d.ts.map +1 -1
- package/dist/playable-local-editor-entry.js +10 -2
- package/dist/playable-local-editor-entry.js.map +1 -1
- package/dist/playable-local-editor-host.d.ts +3 -32
- package/dist/playable-local-editor-host.d.ts.map +1 -1
- package/dist/playable-local-editor-host.js +6 -70
- package/dist/playable-local-editor-host.js.map +1 -1
- package/dist/playable-product-local-editor.d.ts +1 -2
- package/dist/playable-product-local-editor.d.ts.map +1 -1
- package/dist/playable-product-local-editor.js +0 -1
- package/dist/playable-product-local-editor.js.map +1 -1
- package/dist/playable-product-projection-preview.d.ts.map +1 -1
- package/dist/playable-product-projection-preview.js +1 -1
- package/dist/playable-product-projection-preview.js.map +1 -1
- package/dist/playable-product-scene-capabilities.d.ts +0 -2
- package/dist/playable-product-scene-capabilities.d.ts.map +1 -1
- package/dist/playable-product-scene-capabilities.js +33 -6
- package/dist/playable-product-scene-capabilities.js.map +1 -1
- package/dist/playable-runtime-babylon.d.ts +4 -0
- package/dist/playable-runtime-babylon.d.ts.map +1 -1
- package/dist/playable-runtime-babylon.js +4 -0
- package/dist/playable-runtime-babylon.js.map +1 -1
- package/dist/playable-sdk.d.ts +1 -1
- package/dist/playable-sdk.d.ts.map +1 -1
- package/dist/playable-sdk.js.map +1 -1
- package/dist/playable-standard-project.d.ts +0 -2
- package/dist/playable-standard-project.d.ts.map +1 -1
- package/dist/playable-standard-project.js +1 -2
- package/dist/playable-standard-project.js.map +1 -1
- package/dist/project-service-projection.d.ts +16 -0
- package/dist/project-service-projection.d.ts.map +1 -0
- package/dist/project-service-projection.js +67 -0
- package/dist/project-service-projection.js.map +1 -0
- package/node_modules/@fps-games/babylon-renderer/dist/post-process/babylon-default-pipeline.d.ts +18 -0
- package/node_modules/@fps-games/babylon-renderer/dist/post-process/babylon-default-pipeline.d.ts.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/dist/post-process/babylon-default-pipeline.js +54 -18
- package/node_modules/@fps-games/babylon-renderer/dist/post-process/babylon-default-pipeline.js.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/package.json +9 -9
- package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/projection.js +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/projection.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.js +127 -13
- package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js +66 -1
- package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/package.json +6 -6
- package/node_modules/@fps-games/editor-browser/dist/editor-command-service-client.d.ts +32 -0
- package/node_modules/@fps-games/editor-browser/dist/editor-command-service-client.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/editor-command-service-client.js +254 -0
- package/node_modules/@fps-games/editor-browser/dist/editor-command-service-client.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/index.d.ts +3 -1
- package/node_modules/@fps-games/editor-browser/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/index.js +2 -0
- package/node_modules/@fps-games/editor-browser/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-command-center.d.ts +68 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-command-center.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-command-center.js +650 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-command-center.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-formal-surface-visibility.d.ts +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-formal-surface-visibility.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-formal-surface-visibility.js +22 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-formal-surface-visibility.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-controller.d.ts +8 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-controller.js +117 -6
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-view.d.ts +14 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-view.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-view.js +100 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-view.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.d.ts +8 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js +75 -2
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts +37 -12
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts +25 -2
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js +332 -107
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/package.json +7 -7
- package/node_modules/@fps-games/editor-core/dist/editor-authoring-host.d.ts +107 -0
- package/node_modules/@fps-games/editor-core/dist/editor-authoring-host.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-authoring-host.js +1211 -0
- package/node_modules/@fps-games/editor-core/dist/editor-authoring-host.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-capability-adapter.d.ts +34 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-capability-adapter.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-capability-adapter.js +260 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-capability-adapter.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-composed-authority.d.ts +9 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-composed-authority.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-composed-authority.js +14 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-composed-authority.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-observability.d.ts +18 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-observability.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-observability.js +113 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-observability.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-system.d.ts +82 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-system.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-system.js +1098 -0
- package/node_modules/@fps-games/editor-core/dist/editor-command-system.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-plugin-host.d.ts +6 -7
- package/node_modules/@fps-games/editor-core/dist/editor-plugin-host.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/editor-plugin-host.js +62 -103
- package/node_modules/@fps-games/editor-core/dist/editor-plugin-host.js.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/editor-service-gateway.d.ts +30 -0
- package/node_modules/@fps-games/editor-core/dist/editor-service-gateway.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-service-gateway.js +540 -0
- package/node_modules/@fps-games/editor-core/dist/editor-service-gateway.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session-authority.d.ts +9 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session-authority.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session-authority.js +61 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session-authority.js.map +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session.d.ts +55 -0
- package/node_modules/@fps-games/editor-core/dist/editor-session.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/editor-session.js +247 -6
- package/node_modules/@fps-games/editor-core/dist/editor-session.js.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/index.d.ts +6 -2
- package/node_modules/@fps-games/editor-core/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/index.js +6 -2
- package/node_modules/@fps-games/editor-core/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-core/package.json +6 -6
- package/node_modules/@fps-games/editor-forge-play/dist/index.d.ts +0 -1
- package/node_modules/@fps-games/editor-forge-play/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-forge-play/dist/index.js +0 -1
- package/node_modules/@fps-games/editor-forge-play/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-forge-play/package.json +2 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/bridge-command/protocol.d.ts +2 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/bridge-command/protocol.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/document/helpers.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/document/helpers.js +41 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/document/helpers.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play-types.d.ts +27 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play-types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play-types.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play.d.ts +2 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play.js +214 -7
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/host-controller.d.ts +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/host-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/host-controller.js +11 -3
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/host-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/index.d.ts +2 -4
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/index.js +0 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/lifecycle.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/lifecycle.js +77 -31
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/lifecycle.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/types.d.ts +8 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/types.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/asset-fields.d.ts +21 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/asset-fields.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/asset-fields.js +90 -4
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/asset-fields.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/binding.d.ts +27 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/binding.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/binding.js +161 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/binding.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/inspector.d.ts +2 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/inspector.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/inspector.js +5 -92
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/inspector.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/scene-inspector.d.ts +7 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/scene-inspector.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/scene-inspector.js +26 -9
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/scene-inspector.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/slot-inspector.d.ts +9 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/slot-inspector.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/slot-inspector.js +19 -8
- package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/slot-inspector.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/material-override-inspector.d.ts +5 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/material-override-inspector.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/material-override-inspector.js +16 -4
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/material-override-inspector.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/stage-inspector.d.ts +9 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/stage-inspector.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/stage-inspector.js +12 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/stage-inspector.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/ground-decal.d.ts +2 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/ground-decal.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/ground-decal.js +10 -5
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/ground-decal.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/index.d.ts +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/index.js +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/project-host-services.d.ts +17 -82
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/project-host-services.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/project-host-services.js +53 -57
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/project-host-services.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-session.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-session.js +3 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-session.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-authoring-commands.d.ts +10 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-authoring-commands.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-authoring-commands.js +256 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-authoring-commands.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-scene-assembly.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-scene-assembly.js +7 -5
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-scene-assembly.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.js +8 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/types.d.ts +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/types.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/inspectors.js +134 -12
- package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/inspectors.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-scene-workflow.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-scene-workflow.js +47 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-scene-workflow.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-service-vite.d.ts +27 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-service-vite.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-service-vite.js +592 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-service-vite.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.d.ts +3 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.js +2 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/plugin.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/plugin.js +61 -6
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/plugin.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-adapter.d.ts +0 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-adapter.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-adapter.js +1 -10
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-adapter.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.js +21 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-authoring-backend.d.ts +13 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-authoring-backend.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-authoring-backend.js +18 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-authoring-backend.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-editor-service.d.ts +28 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-editor-service.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-editor-service.js +863 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-editor-service.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/types.d.ts +2 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/types.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/package.json +6 -6
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-capabilities.d.ts +1626 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-capabilities.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/{agent-bridge.js → editor-command-capabilities.js} +766 -620
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-capabilities.js.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-trace.d.ts +69 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-trace.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-trace.js +22 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command-trace.js.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command.d.ts +136 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command.js +2 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-command.js.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-service.d.ts +225 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-service.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-service.js +4 -0
- package/node_modules/@fps-games/editor-protocol/dist/editor-service.js.map +1 -0
- package/node_modules/@fps-games/editor-protocol/dist/index.d.ts +6 -3
- package/node_modules/@fps-games/editor-protocol/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-protocol/dist/index.js +6 -3
- package/node_modules/@fps-games/editor-protocol/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-protocol/package.json +2 -2
- package/node_modules/@fps-games/editor-tooling/package.json +3 -3
- package/node_modules/@fps-games/editor-ui/package.json +1 -1
- package/node_modules/@fps-games/playable-assets/package.json +1 -1
- package/node_modules/@fps-games/playable-contracts/package.json +1 -1
- package/node_modules/@fps-games/playable-rendering/package.json +2 -2
- package/node_modules/@fps-games/playable-runtime/package.json +12 -12
- package/node_modules/@fps-games/playable-runtime-data/package.json +4 -4
- package/node_modules/@fps-games/playable-scene/package.json +2 -2
- package/node_modules/@fps-games/plugin-api/package.json +1 -1
- package/node_modules/@fps-games/plugin-assets/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-assets/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-assets/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-assets/package.json +6 -6
- package/node_modules/@fps-games/plugin-hierarchy/dist/kernel.d.ts +1 -0
- package/node_modules/@fps-games/plugin-hierarchy/dist/kernel.d.ts.map +1 -1
- package/node_modules/@fps-games/plugin-hierarchy/dist/kernel.js +78 -4
- package/node_modules/@fps-games/plugin-hierarchy/dist/kernel.js.map +1 -1
- package/node_modules/@fps-games/plugin-hierarchy/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-hierarchy/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-hierarchy/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-hierarchy/package.json +5 -5
- package/node_modules/@fps-games/plugin-host/package.json +2 -2
- package/node_modules/@fps-games/plugin-markers/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-markers/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-markers/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-markers/package.json +5 -5
- package/node_modules/@fps-games/plugin-materials/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-materials/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-materials/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-materials/package.json +5 -5
- package/node_modules/@fps-games/plugin-rendering/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-rendering/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-rendering/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-rendering/package.json +5 -5
- package/node_modules/@fps-games/plugin-scene/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-scene/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-scene/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-scene/package.json +5 -5
- package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-shadow-map-experiment/package.json +5 -5
- package/node_modules/@fps-games/plugin-shadows/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-shadows/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-shadows/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-shadows/package.json +7 -7
- package/package.json +23 -23
- package/dist/agent-bridge/capabilities/assets.d.ts +0 -8
- package/dist/agent-bridge/capabilities/assets.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/assets.js.map +0 -1
- package/dist/agent-bridge/capabilities/editor-state.d.ts +0 -5
- package/dist/agent-bridge/capabilities/editor-state.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/editor-state.js.map +0 -1
- package/dist/agent-bridge/capabilities/hierarchy.d.ts +0 -4
- package/dist/agent-bridge/capabilities/hierarchy.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/hierarchy.js.map +0 -1
- package/dist/agent-bridge/capabilities/host-lifecycle.d.ts +0 -11
- package/dist/agent-bridge/capabilities/host-lifecycle.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/host-lifecycle.js +0 -149
- package/dist/agent-bridge/capabilities/host-lifecycle.js.map +0 -1
- package/dist/agent-bridge/capabilities/prefabs.d.ts +0 -5
- package/dist/agent-bridge/capabilities/prefabs.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/prefabs.js.map +0 -1
- package/dist/agent-bridge/capabilities/scene-objects.d.ts +0 -8
- package/dist/agent-bridge/capabilities/scene-objects.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/scene-objects.js +0 -480
- package/dist/agent-bridge/capabilities/scene-objects.js.map +0 -1
- package/dist/agent-bridge/capabilities/selection.d.ts +0 -5
- package/dist/agent-bridge/capabilities/selection.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/selection.js +0 -60
- package/dist/agent-bridge/capabilities/selection.js.map +0 -1
- package/dist/agent-bridge/capabilities/shadows.d.ts +0 -5
- package/dist/agent-bridge/capabilities/shadows.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/shadows.js.map +0 -1
- package/dist/agent-bridge/capabilities/transform.d.ts +0 -5
- package/dist/agent-bridge/capabilities/transform.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/transform.js +0 -164
- package/dist/agent-bridge/capabilities/transform.js.map +0 -1
- package/dist/agent-bridge/capabilities/ui-regions.d.ts +0 -4
- package/dist/agent-bridge/capabilities/ui-regions.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/ui-regions.js.map +0 -1
- package/dist/agent-bridge/capabilities/viewport.d.ts +0 -5
- package/dist/agent-bridge/capabilities/viewport.d.ts.map +0 -1
- package/dist/agent-bridge/capabilities/viewport.js.map +0 -1
- package/dist/agent-bridge/capability-sources.d.ts +0 -7
- package/dist/agent-bridge/capability-sources.d.ts.map +0 -1
- package/dist/agent-bridge/capability-sources.js +0 -34
- package/dist/agent-bridge/capability-sources.js.map +0 -1
- package/dist/agent-bridge/diagnostics.d.ts +0 -12
- package/dist/agent-bridge/diagnostics.d.ts.map +0 -1
- package/dist/agent-bridge/diagnostics.js.map +0 -1
- package/dist/agent-bridge/index.d.ts.map +0 -1
- package/dist/agent-bridge/index.js.map +0 -1
- package/dist/agent-bridge/register.d.ts +0 -4
- package/dist/agent-bridge/register.d.ts.map +0 -1
- package/dist/agent-bridge/register.js.map +0 -1
- package/dist/agent-bridge/shared.d.ts.map +0 -1
- package/dist/agent-bridge/shared.js.map +0 -1
- package/dist/agent-bridge/source-types.d.ts +0 -110
- package/dist/agent-bridge/source-types.d.ts.map +0 -1
- package/dist/agent-bridge/source-types.js.map +0 -1
- package/dist/editor-plugin-agent-capabilities.d.ts +0 -4
- package/dist/editor-plugin-agent-capabilities.d.ts.map +0 -1
- package/dist/editor-plugin-agent-capabilities.js +0 -64
- package/dist/editor-plugin-agent-capabilities.js.map +0 -1
- package/dist/local-editor-agent-actions.d.ts +0 -43
- package/dist/local-editor-agent-actions.d.ts.map +0 -1
- package/dist/local-editor-agent-actions.js +0 -321
- package/dist/local-editor-agent-actions.js.map +0 -1
- package/dist/local-editor-agent-bridge-transport.d.ts +0 -129
- package/dist/local-editor-agent-bridge-transport.d.ts.map +0 -1
- package/dist/local-editor-agent-bridge-transport.js +0 -403
- package/dist/local-editor-agent-bridge-transport.js.map +0 -1
- package/dist/local-editor-agent-bridge.d.ts +0 -2
- package/dist/local-editor-agent-bridge.d.ts.map +0 -1
- package/dist/local-editor-agent-bridge.js +0 -2
- package/dist/local-editor-agent-bridge.js.map +0 -1
- package/dist/local-editor-agent-context.d.ts +0 -68
- package/dist/local-editor-agent-context.d.ts.map +0 -1
- package/dist/local-editor-agent-context.js +0 -716
- package/dist/local-editor-agent-context.js.map +0 -1
- package/node_modules/@fps-games/editor-core/dist/agent-bridge.d.ts +0 -22
- package/node_modules/@fps-games/editor-core/dist/agent-bridge.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-core/dist/agent-bridge.js +0 -106
- package/node_modules/@fps-games/editor-core/dist/agent-bridge.js.map +0 -1
- package/node_modules/@fps-games/editor-core/dist/agent-interaction.d.ts +0 -17
- package/node_modules/@fps-games/editor-core/dist/agent-interaction.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-core/dist/agent-interaction.js +0 -14
- package/node_modules/@fps-games/editor-core/dist/agent-interaction.js.map +0 -1
- package/node_modules/@fps-games/editor-forge-play/dist/agent-transport.d.ts +0 -23
- package/node_modules/@fps-games/editor-forge-play/dist/agent-transport.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-forge-play/dist/agent-transport.js +0 -47
- package/node_modules/@fps-games/editor-forge-play/dist/agent-transport.js.map +0 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/agent-descriptions.d.ts +0 -112
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/agent-descriptions.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/agent-descriptions.js +0 -159
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/agent-descriptions.js.map +0 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/session-metadata.d.ts +0 -15
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/session-metadata.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/session-metadata.js +0 -76
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/session-metadata.js.map +0 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent-bridge.d.ts +0 -1622
- package/node_modules/@fps-games/editor-protocol/dist/agent-bridge.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent-bridge.js.map +0 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent-trace.d.ts +0 -68
- package/node_modules/@fps-games/editor-protocol/dist/agent-trace.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent-trace.js +0 -23
- package/node_modules/@fps-games/editor-protocol/dist/agent-trace.js.map +0 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent.d.ts +0 -187
- package/node_modules/@fps-games/editor-protocol/dist/agent.d.ts.map +0 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent.js +0 -5
- package/node_modules/@fps-games/editor-protocol/dist/agent.js.map +0 -1
- /package/dist/{agent-bridge → editor-commands}/source-types.js +0 -0
|
@@ -17,6 +17,11 @@ class PlayableLocalEditorRunRejectedError extends Error {
|
|
|
17
17
|
this.name = 'PlayableLocalEditorRunRejectedError';
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
+
function createLifecycleAbortError() {
|
|
21
|
+
const error = new Error('Playable Local Editor lifecycle is disposing or disposed.');
|
|
22
|
+
error.name = 'AbortError';
|
|
23
|
+
return error;
|
|
24
|
+
}
|
|
20
25
|
export function createPlayableLocalEditorLifecycleController(options) {
|
|
21
26
|
const waitForPaint = options.waitForPaint ?? waitForPlayableLocalEditorPaint;
|
|
22
27
|
const waitForMilliseconds = options.waitForMilliseconds ?? waitForPlayableMilliseconds;
|
|
@@ -41,6 +46,9 @@ export function createPlayableLocalEditorLifecycleController(options) {
|
|
|
41
46
|
});
|
|
42
47
|
const scopes = new Map();
|
|
43
48
|
const pendingScopeResources = new Map();
|
|
49
|
+
let activeEnter = null;
|
|
50
|
+
let disposing = false;
|
|
51
|
+
let disposal = null;
|
|
44
52
|
const assertScopeCanOpen = (input) => {
|
|
45
53
|
const lifecycleSnapshot = coordinator.getSnapshot();
|
|
46
54
|
if (lifecycleSnapshot.transitioning || lifecycleSnapshot.application !== 'ready') {
|
|
@@ -690,30 +698,51 @@ export function createPlayableLocalEditorLifecycleController(options) {
|
|
|
690
698
|
return {
|
|
691
699
|
lifecycle,
|
|
692
700
|
registerParticipant: coordinator.registerParticipant,
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
let
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
701
|
+
enterEditor(context) {
|
|
702
|
+
if (disposing)
|
|
703
|
+
return Promise.reject(createLifecycleAbortError());
|
|
704
|
+
if (activeEnter)
|
|
705
|
+
return activeEnter;
|
|
706
|
+
let resolve;
|
|
707
|
+
let reject;
|
|
708
|
+
const shared = new Promise((nextResolve, nextReject) => { resolve = nextResolve; reject = nextReject; });
|
|
709
|
+
activeEnter = shared;
|
|
710
|
+
void (async () => {
|
|
711
|
+
try {
|
|
712
|
+
const preparation = beginPreparation();
|
|
713
|
+
showLifecycleOverlay(preparation, {
|
|
714
|
+
...options.content.enter,
|
|
715
|
+
presentation: 'editor-shell',
|
|
716
|
+
});
|
|
717
|
+
let entered = false;
|
|
718
|
+
try {
|
|
719
|
+
await waitForPaint();
|
|
720
|
+
const before = coordinator.getSnapshot();
|
|
721
|
+
const load = options.operations.loadDocument;
|
|
722
|
+
const enter = options.operations.enterWorld
|
|
723
|
+
?? options.harness.enterEditor.bind(options.harness);
|
|
724
|
+
await ensureEditingState(load, enter, context);
|
|
725
|
+
entered = before.mode !== 'edit';
|
|
726
|
+
if (renderAfterEnter)
|
|
727
|
+
options.harness.render();
|
|
728
|
+
await waitForPaint();
|
|
729
|
+
}
|
|
730
|
+
finally {
|
|
731
|
+
hideLifecycleOverlay(preparation.epoch);
|
|
732
|
+
if (entered)
|
|
733
|
+
options.harness.notifyViewportRevealed?.(viewportRevealReason);
|
|
734
|
+
}
|
|
735
|
+
resolve();
|
|
736
|
+
}
|
|
737
|
+
catch (error) {
|
|
738
|
+
reject(error);
|
|
739
|
+
}
|
|
740
|
+
finally {
|
|
741
|
+
if (activeEnter === shared)
|
|
742
|
+
activeEnter = null;
|
|
743
|
+
}
|
|
744
|
+
})();
|
|
745
|
+
return shared;
|
|
717
746
|
},
|
|
718
747
|
saveScene,
|
|
719
748
|
synchronizeDocumentState,
|
|
@@ -777,14 +806,31 @@ export function createPlayableLocalEditorLifecycleController(options) {
|
|
|
777
806
|
openScope,
|
|
778
807
|
addScopeResource,
|
|
779
808
|
closeScope,
|
|
780
|
-
|
|
781
|
-
if (
|
|
782
|
-
return;
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
809
|
+
dispose(context) {
|
|
810
|
+
if (disposal)
|
|
811
|
+
return disposal;
|
|
812
|
+
disposing = true;
|
|
813
|
+
const pending = (async () => {
|
|
814
|
+
try {
|
|
815
|
+
await activeEnter;
|
|
816
|
+
}
|
|
817
|
+
catch { /* Enter callers retain their own failure attribution. */ }
|
|
818
|
+
await coordinator.retryCleanup();
|
|
819
|
+
if (coordinator.getSnapshot().application !== 'disposed') {
|
|
820
|
+
await coordinator.transition({
|
|
821
|
+
type: 'application.dispose',
|
|
822
|
+
...context,
|
|
823
|
+
operation: () => closeScope(PLAYABLE_LOCAL_EDITOR_APPLICATION_SCOPE_ID),
|
|
824
|
+
});
|
|
825
|
+
}
|
|
826
|
+
})();
|
|
827
|
+
disposal = pending;
|
|
828
|
+
void pending.catch(() => {
|
|
829
|
+
if (disposal === pending) {
|
|
830
|
+
disposal = null;
|
|
831
|
+
}
|
|
787
832
|
});
|
|
833
|
+
return pending;
|
|
788
834
|
},
|
|
789
835
|
async runWithAssetLoadingOverlay(operation) {
|
|
790
836
|
const shouldShowAssetLoading = !options.loadingOverlay.isVisible() && !assetLoadingOverlayOwned;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifecycle.js","sourceRoot":"","sources":["../../src/local-harness/lifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mCAAmC,GACpC,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EACL,+BAA+B,EAC/B,2BAA2B,GAC5B,MAAM,UAAU,CAAC;AAgBlB,MAAM,CAAC,MAAM,0CAA0C,GAAG,oBAAoB,CAAC;AAC/E,MAAM,CAAC,MAAM,sCAAsC,GAAG,gBAAgB,CAAC;AACvE,MAAM,CAAC,MAAM,4CAA4C,GAAG,sBAAsB,CAAC;AACnF,MAAM,CAAC,MAAM,2CAA2C,GAAG,qBAAqB,CAAC;AACjF,MAAM,CAAC,MAAM,2CAA2C,GAAG,qBAAqB,CAAC;AAcjF,MAAM,oCAAqC,SAAQ,KAAK;IACtD;QACE,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACzC,IAAI,CAAC,IAAI,GAAG,sCAAsC,CAAC;IACrD,CAAC;CACF;AAED,MAAM,mCAAoC,SAAQ,KAAK;IACrD;QACE,KAAK,CAAC,sDAAsD,CAAC,CAAC;QAC9D,IAAI,CAAC,IAAI,GAAG,qCAAqC,CAAC;IACpD,CAAC;CACF;AAED,MAAM,UAAU,4CAA4C,CAC1D,OAAsD;IAEtD,MAAM,YAAY,GAAG,OAAO,CAAC,YAAY,IAAI,+BAA+B,CAAC;IAC7E,MAAM,mBAAmB,GAAG,OAAO,CAAC,mBAAmB,IAAI,2BAA2B,CAAC;IACvF,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,CAAC,GAAG,E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,CAAC;YACpC,CAAC;YAED,IAAI,CAAC;gBACH,OAAO,MAAM,SAAS,EAAE,CAAC;YAC3B,CAAC;oBAAS,CAAC;gBACT,iBAAiB,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,iBAAiB,GAAG,CAAC,CAAC,CAAC;gBACvD,IAAI,iBAAiB,KAAK,CAAC,IAAI,wBAAwB,EAAE,CAAC;oBACxD,MAAM,SAAS,GAAG,wBAAwB,GAAG,CAAC,GAAG,EAAE,GAAG,0BAA0B,CAAC,CAAC;oBAClF,IAAI,SAAS,GAAG,CAAC;wBAAE,MAAM,mBAAmB,CAAC,SAAS,CAAC,CAAC;oBACxD,IAAI,iBAAiB,KAAK,CAAC,IAAI,wBAAwB,EAAE,CAAC;wBACxD,wBAAwB,GAAG,KAAK,CAAC;wBACjC,IAAI,OAAO,CAAC,cAAc,CAAC,OAAO,EAAE,EAAE,KAAK,KAAK,EAAE,CAAC;4BACjD,uBAAuB,GAAG,IAAI,CAAC;wBACjC,CAAC;6BAAM,IAAI,uBAAuB,EAAE,CAAC;4BACnC,MAAM,OAAO,GAAG,uBAAuB,CAAC;4BACxC,uBAAuB,GAAG,IAAI,CAAC;4BAC/B,qBAAqB,GAAG,OAAO,CAAC,KAAK,CAAC;4BACtC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;wBAC/C,CAAC;6BAAM,CAAC;4BACN,OAAO,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC;wBAChC,CAAC;oBACH,CAAC;gBACH,CAAC;gBACD,IAAI,iBAAiB,KAAK,CAAC;oBAAE,0BAA0B,GAAG,KAAK,CAAC;YAClE,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["import {\n createFpsEditorLifecycleCoordinator,\n} from '@fps-games/editor-core/lifecycle';\nimport type { FpsEditorEventRoute } from '@fps-games/editor-core/events';\nimport {\n waitForPlayableLocalEditorPaint,\n waitForPlayableMilliseconds,\n} from './timing';\nimport type {\n PlayableLocalEditorDataSafetyOperation,\n PlayableLocalEditorLifecycleController,\n PlayableLocalEditorLifecycleControllerOptions,\n PlayableLocalEditorDocumentOperationExecutor,\n PlayableLocalEditorLifecycleOperationContext,\n PlayableLocalEditorLoadingOverlayContent,\n PlayableLocalEditorPreparedRun,\n PlayableLocalEditorLifecycleScopeInput,\n PlayableLocalEditorSaveFailureState,\n PlayableLocalEditorSaveFailureInput,\n PlayableLocalEditorSaveOptions,\n PlayableLocalEditorUnsavedChangesState,\n} from './types';\n\nexport const PLAYABLE_LOCAL_EDITOR_APPLICATION_SCOPE_ID = 'editor:application';\nexport const PLAYABLE_LOCAL_EDITOR_PROJECT_SCOPE_ID = 'editor:project';\nexport const PLAYABLE_LOCAL_EDITOR_MAIN_DOCUMENT_SCOPE_ID = 'editor:document:main';\nexport const PLAYABLE_LOCAL_EDITOR_MAIN_SESSION_SCOPE_ID = 'editor:session:main';\nexport const PLAYABLE_LOCAL_EDITOR_MAIN_PREVIEW_SCOPE_ID = 'editor:preview:main';\n\ntype LifecycleScopeRecord = {\n readonly input: PlayableLocalEditorLifecycleScopeInput;\n readonly disposers: Set<() => void | Promise<void>>;\n ready: Promise<void>;\n closing: Promise<void> | null;\n failed: boolean;\n backingOpened: boolean;\n lifecycleOpened: boolean;\n closeRequested: boolean;\n closeEventRoute: FpsEditorEventRoute | null;\n};\n\nclass PlayableLocalEditorSaveRejectedError extends Error {\n constructor() {\n super('Local editor save was rejected.');\n this.name = 'PlayableLocalEditorSaveRejectedError';\n }\n}\n\nclass PlayableLocalEditorRunRejectedError extends Error {\n constructor() {\n super('Local editor Run was rejected by current validation.');\n this.name = 'PlayableLocalEditorRunRejectedError';\n }\n}\n\nexport function createPlayableLocalEditorLifecycleController(\n options: PlayableLocalEditorLifecycleControllerOptions,\n): PlayableLocalEditorLifecycleController {\n const waitForPaint = options.waitForPaint ?? waitForPlayableLocalEditorPaint;\n const waitForMilliseconds = options.waitForMilliseconds ?? waitForPlayableMilliseconds;\n const now = options.now ?? (() => Date.now());\n const minAssetLoadingOverlayMs = options.minAssetLoadingOverlayMs ?? 500;\n const viewportRevealReason = options.viewportRevealReason ?? 'editor-loading-overlay-hidden';\n const renderAfterEnter = options.renderAfterEnter ?? true;\n const initialUnsavedChanges = options.harness.getUnsavedChangesState?.();\n const initialCoordinatorProfile = options.initialMode === 'edit'\n && initialUnsavedChanges?.hasWorkingDocument === true\n ? initialUnsavedChanges.dirty ? 'editing-dirty' : 'editing-clean'\n : 'created';\n const coordinator = createFpsEditorLifecycleCoordinator({\n now,\n initialState: initialCoordinatorProfile,\n eventPublisher: options.eventPublisher,\n report: options.reportDiagnostic,\n });\n const lifecycle = Object.freeze({\n getSnapshot: coordinator.getSnapshot,\n subscribe: coordinator.subscribe,\n });\n const scopes = new Map<string, LifecycleScopeRecord>();\n const pendingScopeResources = new Map<string, Set<() => void | Promise<void>>>();\n const assertScopeCanOpen = (input: PlayableLocalEditorLifecycleScopeInput): void => {\n const lifecycleSnapshot = coordinator.getSnapshot();\n if (lifecycleSnapshot.transitioning || lifecycleSnapshot.application !== 'ready') {\n throw new Error(`Editor lifecycle cannot open a scope while application is ${lifecycleSnapshot.application}.`);\n }\n let parentId = input.parentId;\n while (parentId) {\n const parent = scopes.get(parentId);\n if (!parent || parent.closing || parent.failed) {\n throw new Error(`Editor lifecycle scope parent is not open: ${parentId}`);\n }\n parentId = parent.input.parentId;\n }\n };\n const openScope = async (input: PlayableLocalEditorLifecycleScopeInput): Promise<void> => {\n assertScopeCanOpen(input);\n const existing = scopes.get(input.id);\n if (existing) {\n if (existing.input.scope !== input.scope || existing.input.parentId !== input.parentId) {\n throw new Error(`Editor lifecycle scope identity conflicts with the existing scope: ${input.id}`);\n }\n if (existing.closing) throw new Error(`Editor lifecycle scope is closing: ${input.id}`);\n if (existing.failed) {\n await closeScope(input.id);\n return openScope(input);\n }\n return existing.ready;\n }\n const record: LifecycleScopeRecord = {\n input: Object.freeze({ ...input }),\n disposers: pendingScopeResources.get(input.id) ?? new Set(),\n ready: Promise.resolve(),\n closing: null,\n failed: false,\n backingOpened: false,\n lifecycleOpened: false,\n closeRequested: false,\n closeEventRoute: null,\n };\n pendingScopeResources.delete(input.id);\n scopes.set(input.id, record);\n record.ready = (async () => {\n if (input.parentId) {\n const parent = scopes.get(input.parentId);\n if (!parent) throw new Error(`Editor lifecycle scope parent is not open: ${input.parentId}`);\n await parent.ready;\n assertScopeCanOpen(input);\n }\n if (record.closeRequested) return;\n // A backing host may retain a partially-started scope when its rollback\n // cleanup fails. Reserve that ownership before awaiting so closeScope can\n // retry cleanup even when openScope rejects.\n record.backingOpened = options.scopeHost !== undefined;\n await options.scopeHost?.openScope(input);\n if (record.closeRequested) return;\n coordinator.openScope(input);\n record.lifecycleOpened = true;\n })();\n try {\n await record.ready;\n } catch (error) {\n let cleanupError: unknown;\n try { await closeScope(input.id); } catch (caught) { cleanupError = caught; }\n if (cleanupError) {\n const combined = new Error(`Editor lifecycle scope open and cleanup failed: ${input.id}`) as Error & { errors: unknown[] };\n combined.errors = [error, cleanupError];\n throw combined;\n }\n throw error;\n }\n };\n const addScopeResource = (scopeId: string, disposer: () => void | Promise<void>): (() => void) => {\n const record = scopes.get(scopeId);\n if (record?.closing || record?.failed) throw new Error(`Editor lifecycle scope is not open: ${scopeId}`);\n if (!record && scopeId !== PLAYABLE_LOCAL_EDITOR_APPLICATION_SCOPE_ID) {\n throw new Error(`Editor lifecycle scope is not open: ${scopeId}`);\n }\n const resources = record?.disposers ?? pendingScopeResources.get(scopeId) ?? new Set();\n if (!record) pendingScopeResources.set(scopeId, resources);\n resources.add(disposer);\n let active = true;\n return () => {\n if (!active) return;\n active = false;\n resources.delete(disposer);\n if (!record && resources.size === 0) pendingScopeResources.delete(scopeId);\n };\n };\n const closeScope = async (scopeId: string): Promise<void> => {\n const record = scopes.get(scopeId);\n if (!record) {\n const pendingResources = pendingScopeResources.get(scopeId);\n if (!pendingResources) return;\n for (const disposer of [...pendingResources].reverse()) {\n await disposer();\n pendingResources.delete(disposer);\n }\n pendingScopeResources.delete(scopeId);\n return;\n }\n if (record.closing) return record.closing;\n record.closeEventRoute ??= options.eventPublisher?.captureRoute({\n scope: record.input.scope,\n scopeId,\n }) ?? null;\n record.closeRequested = true;\n let backingReservationError: unknown;\n if (record.backingOpened) {\n try { options.scopeHost?.reserveScopeClose(scopeId); }\n catch (error) { backingReservationError = error; }\n }\n record.closing = (async () => {\n const errors: unknown[] = [];\n try { await record.ready; }\n catch { /* The open caller owns and reports setup failures. */ }\n if (backingReservationError) errors.push(backingReservationError);\n if (errors.length === 0) {\n const children = [...scopes.values()]\n .filter(candidate => candidate.input.parentId === scopeId)\n .reverse();\n for (const child of children) {\n try { await closeScope(child.input.id); }\n catch (error) {\n errors.push(error);\n break;\n }\n }\n }\n const remainingChildren = [...scopes.values()].filter(candidate => candidate.input.parentId === scopeId);\n if (errors.length === 0 && remainingChildren.length > 0) {\n errors.push(new Error(`Editor lifecycle scope still has open children: ${scopeId}`));\n }\n if (errors.length === 0 && record.backingOpened) {\n try {\n await options.scopeHost?.closeScope(scopeId);\n record.backingOpened = false;\n } catch (error) { errors.push(error); }\n }\n if (errors.length === 0 && remainingChildren.length === 0) {\n for (const disposer of [...record.disposers].reverse()) {\n try {\n await disposer();\n record.disposers.delete(disposer);\n }\n catch (error) {\n // Preserve dependency order: untouched earlier resources stay owned\n // until the failed later resource can be released on a retry.\n errors.push(error);\n break;\n }\n }\n }\n if (errors.length === 0 && record.lifecycleOpened) {\n try {\n coordinator.closeScope(scopeId, record.closeEventRoute ?? undefined);\n record.lifecycleOpened = false;\n } catch (error) { errors.push(error); }\n }\n if (errors.length > 0) {\n record.failed = true;\n coordinator.failScope(scopeId);\n const error = new Error(`Editor lifecycle scope cleanup failed: ${scopeId}`) as Error & { errors: unknown[] };\n error.errors = errors;\n throw error;\n }\n scopes.delete(scopeId);\n })().finally(() => {\n if (scopes.get(scopeId) === record) record.closing = null;\n });\n return record.closing;\n };\n let assetLoadingCount = 0;\n let assetLoadingOverlayOwned = false;\n let assetLoadingOverlayWaiting = false;\n let assetLoadingOverlayShownAt = 0;\n let preparationEpoch = 0;\n let lifecycleOverlayOwner: number | null = null;\n let pendingLifecycleOverlay: {\n epoch: number;\n content: PlayableLocalEditorLoadingOverlayContent;\n } | null = null;\n let pendingDocumentDirty: boolean | undefined;\n let documentSynchronization: Promise<void> | null = null;\n\n const readLifecycleRevision = (): number => coordinator.getSnapshot().revision;\n const readDocumentRevision = (): number => (\n options.harness.getDocumentRevision?.() ?? readLifecycleRevision()\n );\n\n const ensureApplicationAndProject = async (\n context?: PlayableLocalEditorLifecycleOperationContext,\n ): Promise<void> => {\n let current = coordinator.getSnapshot();\n if (current.transitioning) throw new Error('Editor lifecycle transition already in progress.');\n if (current.application === 'created') {\n await coordinator.transition({ type: 'application.start', ...context });\n current = coordinator.getSnapshot();\n }\n if (current.application !== 'ready') {\n throw new Error(`Editor application is not ready: ${current.application}.`);\n }\n await openScope({ id: PLAYABLE_LOCAL_EDITOR_APPLICATION_SCOPE_ID, scope: 'application' });\n options.operations.attachApplicationAuthority?.();\n if (current.project === 'closed') {\n await coordinator.transition({ type: 'project.open', ...context });\n }\n await openScope({\n id: PLAYABLE_LOCAL_EDITOR_PROJECT_SCOPE_ID,\n scope: 'project',\n parentId: PLAYABLE_LOCAL_EDITOR_APPLICATION_SCOPE_ID,\n });\n };\n\n const ensureEditingState = async (\n load: (() => Promise<void>) | undefined = options.operations.loadDocument,\n enter: (() => Promise<void>) | undefined = options.operations.enterWorld,\n context?: PlayableLocalEditorLifecycleOperationContext,\n ): Promise<void> => {\n await ensureApplicationAndProject(context);\n let current = coordinator.getSnapshot();\n const workingDocumentAvailable = readUnsavedChangesState().hasWorkingDocument;\n await openScope({\n id: PLAYABLE_LOCAL_EDITOR_MAIN_DOCUMENT_SCOPE_ID,\n scope: 'document',\n parentId: PLAYABLE_LOCAL_EDITOR_PROJECT_SCOPE_ID,\n });\n await openScope({\n id: PLAYABLE_LOCAL_EDITOR_MAIN_SESSION_SCOPE_ID,\n scope: 'session',\n parentId: PLAYABLE_LOCAL_EDITOR_MAIN_DOCUMENT_SCOPE_ID,\n });\n if (current.document === 'unloaded' || (current.document === 'failed' && !workingDocumentAvailable)) {\n try {\n await coordinator.transition({ type: 'document.load', ...context, ...(load ? { operation: load } : {}) });\n options.operations.attachSessionAuthority?.();\n current = coordinator.getSnapshot();\n } catch (error) {\n await closeScope(PLAYABLE_LOCAL_EDITOR_MAIN_SESSION_SCOPE_ID);\n await closeScope(PLAYABLE_LOCAL_EDITOR_MAIN_DOCUMENT_SCOPE_ID);\n throw error;\n }\n } else {\n options.operations.attachSessionAuthority?.();\n }\n try {\n await openScope({\n id: PLAYABLE_LOCAL_EDITOR_MAIN_PREVIEW_SCOPE_ID,\n scope: 'preview',\n parentId: PLAYABLE_LOCAL_EDITOR_MAIN_SESSION_SCOPE_ID,\n });\n } catch (error) {\n // A failed Preview rollback remains a child of Session and owns the\n // loaded document graph. Do not retry that same cleanup indirectly by\n // tearing down its ancestors in the same enter attempt.\n if (scopes.has(PLAYABLE_LOCAL_EDITOR_MAIN_PREVIEW_SCOPE_ID)) throw error;\n await closeScope(PLAYABLE_LOCAL_EDITOR_MAIN_SESSION_SCOPE_ID);\n await closeScope(PLAYABLE_LOCAL_EDITOR_MAIN_DOCUMENT_SCOPE_ID);\n throw error;\n }\n if (current.mode === 'failed') {\n try {\n if (current.preview === 'failed') await disposePreview(context);\n await coordinator.transition({ type: 'mode.recoverEdit', ...context, ...(enter ? { operation: enter } : {}) });\n } catch (error) {\n await closeScope(PLAYABLE_LOCAL_EDITOR_MAIN_PREVIEW_SCOPE_ID);\n await closeScope(PLAYABLE_LOCAL_EDITOR_MAIN_SESSION_SCOPE_ID);\n throw error;\n }\n current = coordinator.getSnapshot();\n }\n if (current.mode === 'play') {\n try {\n await coordinator.transition({ type: 'mode.enterEdit', ...context, ...(enter ? { operation: enter } : {}) });\n } catch (error) {\n await closeScope(PLAYABLE_LOCAL_EDITOR_MAIN_PREVIEW_SCOPE_ID);\n await closeScope(PLAYABLE_LOCAL_EDITOR_MAIN_SESSION_SCOPE_ID);\n throw error;\n }\n current = coordinator.getSnapshot();\n }\n if (current.mode !== 'edit') throw new Error(`Editor mode is not ready: ${current.mode}.`);\n if (current.preview === 'absent') {\n await coordinator.transition({ type: 'preview.create', ...context });\n current = coordinator.getSnapshot();\n }\n if (current.document === 'failed') {\n await coordinator.transition({\n type: readUnsavedChangesState().dirty ? 'document.markDirty' : 'document.markClean',\n ...context,\n });\n }\n };\n\n const disposePreview = async (\n context?: PlayableLocalEditorLifecycleOperationContext,\n ): Promise<void> => {\n const current = coordinator.getSnapshot();\n if (current.preview === 'active' || current.preview === 'failed') {\n await coordinator.transition({\n type: 'preview.dispose',\n ...context,\n operation: () => closeScope(PLAYABLE_LOCAL_EDITOR_MAIN_PREVIEW_SCOPE_ID),\n });\n return;\n }\n await closeScope(PLAYABLE_LOCAL_EDITOR_MAIN_PREVIEW_SCOPE_ID);\n };\n\n const closeEditingScopes = async (): Promise<void> => {\n await closeScope(PLAYABLE_LOCAL_EDITOR_MAIN_SESSION_SCOPE_ID);\n await closeScope(PLAYABLE_LOCAL_EDITOR_MAIN_DOCUMENT_SCOPE_ID);\n };\n\n const runGameAfterReleasingPluginScopes = async (reason: 'save' | 'discard'): Promise<void> => {\n // Replacement runtimes use the same stable Plugin scope ids. Release the\n // complete old scope tree before restart can mount the replacement editor.\n await closeScope(PLAYABLE_LOCAL_EDITOR_APPLICATION_SCOPE_ID);\n await options.operations.runGame(reason);\n };\n\n const validateRun = async (): Promise<boolean> => (\n options.operations.validateRun ? options.operations.validateRun() : true\n );\n const runExclusiveDocumentOperation = <T>(\n operation: (executor: PlayableLocalEditorDocumentOperationExecutor) => Promise<T>,\n executor?: PlayableLocalEditorDocumentOperationExecutor,\n ): Promise<T> => (\n options.harness.runExclusiveDocumentOperation(operation, executor)\n );\n\n const preflightRun = (): Promise<boolean> => runExclusiveDocumentOperation(async () => {\n const preparation = beginPreparation();\n return await validateRun() && isPreparationCurrent(preparation);\n });\n\n const waitForLifecycleIdle = async (): Promise<void> => {\n if (!coordinator.getSnapshot().transitioning) return;\n await new Promise<void>(resolve => {\n const dispose = coordinator.subscribe(snapshot => {\n if (snapshot.transitioning) return;\n dispose();\n resolve();\n });\n if (!coordinator.getSnapshot().transitioning) {\n dispose();\n resolve();\n }\n });\n };\n\n const reconcileDocumentState = async (dirty: boolean): Promise<void> => {\n await waitForLifecycleIdle();\n const current = coordinator.getSnapshot();\n if (current.project !== 'open' || current.mode !== 'edit') return;\n if (dirty && current.document !== 'dirty') {\n if (current.document === 'clean' || current.document === 'committing') {\n await coordinator.transition({ type: 'document.markDirty' });\n }\n return;\n }\n if (!dirty && current.document === 'dirty') {\n await coordinator.transition({ type: 'document.markClean' });\n }\n };\n\n const drainDocumentSynchronization = async (): Promise<void> => {\n while (pendingDocumentDirty !== undefined) {\n const dirty = pendingDocumentDirty;\n pendingDocumentDirty = undefined;\n try {\n await reconcileDocumentState(dirty);\n } catch (error) {\n if (!coordinator.getSnapshot().transitioning) throw error;\n pendingDocumentDirty = dirty;\n }\n }\n };\n\n const synchronizeDocumentState = (dirty: boolean): Promise<void> => {\n pendingDocumentDirty = dirty;\n if (!documentSynchronization) {\n documentSynchronization = drainDocumentSynchronization().finally(() => {\n documentSynchronization = null;\n if (pendingDocumentDirty !== undefined) void synchronizeDocumentState(pendingDocumentDirty);\n });\n }\n return documentSynchronization;\n };\n\n const waitForDocumentSynchronization = async (): Promise<void> => {\n if (documentSynchronization) await documentSynchronization;\n };\n\n const notifySaveFailed = async (\n operation: PlayableLocalEditorDataSafetyOperation,\n error?: unknown,\n ): Promise<void> => {\n const notify = options.interactions?.notifySaveFailed;\n if (!notify) return;\n let state: PlayableLocalEditorSaveFailureState | null | undefined;\n try {\n state = options.harness.getSaveFailureState?.();\n } catch (stateError) {\n console.error('[PlayableLocalEditorLifecycle] save failure state unavailable', stateError);\n }\n const input: PlayableLocalEditorSaveFailureInput = {\n operation,\n status: state?.status ?? (error instanceof Error ? error.message : undefined),\n details: state?.details,\n error: error ?? state?.error,\n };\n try {\n await notify(input);\n } catch (notifyError) {\n console.error('[PlayableLocalEditorLifecycle] save failure notification failed', notifyError);\n }\n };\n\n const prepareDocumentSave = async (\n save: () => Promise<void>,\n context?: PlayableLocalEditorLifecycleOperationContext,\n ): Promise<void> => {\n await waitForDocumentSynchronization();\n await ensureEditingState(undefined, undefined, context);\n await synchronizeDocumentState(readUnsavedChangesState().dirty);\n await coordinator.transition({ type: 'document.prepareSave', ...context, operation: save });\n };\n\n const commitDocumentSave = async (\n commit?: () => Promise<void>,\n context?: PlayableLocalEditorLifecycleOperationContext,\n ): Promise<void> => {\n await coordinator.transition({ type: 'document.commit', ...context, ...(commit ? { operation: commit } : {}) });\n };\n\n const saveScene = async (\n operation: PlayableLocalEditorDataSafetyOperation = 'save-scene',\n context?: PlayableLocalEditorLifecycleOperationContext,\n executor?: PlayableLocalEditorDocumentOperationExecutor,\n saveOptions?: PlayableLocalEditorSaveOptions,\n ): Promise<boolean> => {\n let saved = false;\n try {\n await prepareDocumentSave(async () => {\n saved = await options.harness.saveScene(executor, saveOptions);\n if (!saved) throw new PlayableLocalEditorSaveRejectedError();\n }, context);\n await commitDocumentSave(undefined, context);\n return true;\n } catch (error) {\n if (error instanceof PlayableLocalEditorSaveRejectedError) {\n await notifySaveFailed(operation);\n return false;\n }\n await notifySaveFailed(operation, error);\n throw error;\n }\n };\n\n const readUnsavedChangesState = (): PlayableLocalEditorUnsavedChangesState => (\n options.harness.getUnsavedChangesState?.() ?? {\n dirty: false,\n hasWorkingDocument: false,\n }\n );\n\n const confirmDiscardIfNeeded = async (\n operation: PlayableLocalEditorDataSafetyOperation,\n ): Promise<boolean> => {\n const unsavedChanges = readUnsavedChangesState();\n if (!unsavedChanges.dirty || !unsavedChanges.hasWorkingDocument) return true;\n try {\n return await options.interactions?.confirmDiscardUnsavedChanges?.({\n operation,\n unsavedChanges,\n }) !== false;\n } catch (error) {\n console.error('[PlayableLocalEditorLifecycle] discard confirmation failed', error);\n return false;\n }\n };\n\n const beginPreparation = (): { epoch: number; revision: number; authoredVersion: number } => {\n pendingLifecycleOverlay = null;\n if (lifecycleOverlayOwner !== null) {\n lifecycleOverlayOwner = null;\n const ownsOverlay = options.loadingOverlay.isOwned?.() !== false;\n if (ownsOverlay && assetLoadingCount > 0 && assetLoadingOverlayWaiting) {\n assetLoadingOverlayWaiting = false;\n assetLoadingOverlayOwned = true;\n assetLoadingOverlayShownAt = now();\n options.loadingOverlay.show(options.content.assetImport);\n } else if (ownsOverlay) {\n options.loadingOverlay.hide();\n }\n }\n return {\n epoch: ++preparationEpoch,\n revision: readLifecycleRevision(),\n authoredVersion: readDocumentRevision(),\n };\n };\n\n const showLifecycleOverlay = (\n preparation: { epoch: number },\n content: PlayableLocalEditorLoadingOverlayContent,\n ): void => {\n if (options.loadingOverlay.isVisible()) {\n if (options.loadingOverlay.isOwned?.() !== false) {\n pendingLifecycleOverlay = { epoch: preparation.epoch, content };\n }\n return;\n }\n options.loadingOverlay.show(content);\n lifecycleOverlayOwner = preparation.epoch;\n };\n\n const hideLifecycleOverlay = (epoch: number): void => {\n if (pendingLifecycleOverlay?.epoch === epoch) pendingLifecycleOverlay = null;\n if (lifecycleOverlayOwner !== epoch) return;\n lifecycleOverlayOwner = null;\n if (options.loadingOverlay.isOwned?.() === false) return;\n if (assetLoadingCount > 0 && assetLoadingOverlayWaiting) {\n assetLoadingOverlayWaiting = false;\n assetLoadingOverlayOwned = true;\n assetLoadingOverlayShownAt = now();\n options.loadingOverlay.show(options.content.assetImport);\n return;\n }\n options.loadingOverlay.hide();\n };\n\n const isPreparationCurrent = (preparation: {\n epoch: number;\n revision: number;\n authoredVersion: number;\n }): boolean => (\n preparation.epoch === preparationEpoch\n && preparation.revision === readLifecycleRevision()\n && preparation.authoredVersion === readDocumentRevision()\n );\n\n const createPreparedRun = (\n preparation: { epoch: number; revision: number; authoredVersion: number },\n run: () => Promise<void>,\n ): PlayableLocalEditorPreparedRun => {\n let consumed = false;\n return {\n accepted: true,\n async run(executor) {\n if (consumed) throw new Error('Prepared editor lifecycle operation was already consumed.');\n consumed = true;\n try {\n await runExclusiveDocumentOperation(async () => {\n if (!isPreparationCurrent(preparation)) {\n throw new Error('Prepared editor lifecycle operation is stale.');\n }\n if (!await validateRun() || !isPreparationCurrent(preparation)) {\n throw new PlayableLocalEditorRunRejectedError();\n }\n await run();\n }, executor);\n } catch (error) {\n hideLifecycleOverlay(preparation.epoch);\n throw error;\n }\n },\n };\n };\n\n const prepareSaveAndRunGame = async (\n context?: PlayableLocalEditorLifecycleOperationContext,\n executor?: PlayableLocalEditorDocumentOperationExecutor,\n ): Promise<PlayableLocalEditorPreparedRun> => {\n const preparation = beginPreparation();\n showLifecycleOverlay(preparation, options.content.saveAndRunGame);\n try {\n return await runExclusiveDocumentOperation(async transactionExecutor => {\n await waitForPaint();\n if (!await validateRun() || !isPreparationCurrent(preparation)) {\n hideLifecycleOverlay(preparation.epoch);\n return { accepted: false };\n }\n const saved = await saveScene(\n 'save-and-run-game',\n context,\n transactionExecutor,\n { validationPhases: ['run', 'save'] },\n );\n if (!saved || preparation.epoch !== preparationEpoch) {\n hideLifecycleOverlay(preparation.epoch);\n return { accepted: false };\n }\n preparation.revision = readLifecycleRevision();\n preparation.authoredVersion = readDocumentRevision();\n if (!await validateRun() || !isPreparationCurrent(preparation)) {\n hideLifecycleOverlay(preparation.epoch);\n return { accepted: false };\n }\n return createPreparedRun(preparation, async () => {\n try {\n await disposePreview(context);\n await coordinator.transition({\n type: 'mode.exitEdit',\n ...context,\n operation: () => runGameAfterReleasingPluginScopes('save'),\n });\n await closeEditingScopes();\n } finally {\n hideLifecycleOverlay(preparation.epoch);\n }\n });\n }, executor);\n } catch (error) {\n hideLifecycleOverlay(preparation.epoch);\n throw error;\n }\n };\n\n const prepareDiscardAndRunGame = async (\n context?: PlayableLocalEditorLifecycleOperationContext,\n executor?: PlayableLocalEditorDocumentOperationExecutor,\n ): Promise<PlayableLocalEditorPreparedRun> => {\n await waitForDocumentSynchronization();\n await ensureEditingState(undefined, undefined, context);\n await synchronizeDocumentState(readUnsavedChangesState().dirty);\n const preparation = beginPreparation();\n if (!await confirmDiscardIfNeeded('discard-and-run-game')\n || !isPreparationCurrent(preparation)) return { accepted: false };\n showLifecycleOverlay(preparation, options.content.discardAndRunGame);\n try {\n return await runExclusiveDocumentOperation(async () => {\n await waitForPaint();\n if (!isPreparationCurrent(preparation)) {\n hideLifecycleOverlay(preparation.epoch);\n return { accepted: false };\n }\n if (!await validateRun() || !isPreparationCurrent(preparation)) {\n hideLifecycleOverlay(preparation.epoch);\n return { accepted: false };\n }\n return createPreparedRun(preparation, async () => {\n try {\n await coordinator.transition({\n type: 'document.discard',\n ...context,\n ...(options.operations?.restoreDocument\n ? { operation: options.operations.restoreDocument }\n : {}),\n });\n await disposePreview(context);\n await coordinator.transition({\n type: 'mode.exitEdit',\n ...context,\n operation: () => runGameAfterReleasingPluginScopes('discard'),\n });\n await closeEditingScopes();\n } finally {\n hideLifecycleOverlay(preparation.epoch);\n }\n });\n }, executor);\n } catch (error) {\n hideLifecycleOverlay(preparation.epoch);\n throw error;\n }\n };\n\n return {\n lifecycle,\n registerParticipant: coordinator.registerParticipant,\n async enterEditor(context) {\n const preparation = beginPreparation();\n showLifecycleOverlay(preparation, {\n ...options.content.enter,\n presentation: 'editor-shell',\n });\n let entered = false;\n try {\n await waitForPaint();\n const before = coordinator.getSnapshot();\n const load = options.operations.loadDocument;\n const enter = options.operations.enterWorld\n ?? options.harness.enterEditor.bind(options.harness);\n await ensureEditingState(load, enter, context);\n entered = before.mode !== 'edit';\n if (renderAfterEnter) options.harness.render();\n await waitForPaint();\n } finally {\n hideLifecycleOverlay(preparation.epoch);\n if (entered) options.harness.notifyViewportRevealed?.(viewportRevealReason);\n }\n },\n saveScene,\n synchronizeDocumentState,\n prepareDocumentSave,\n commitDocumentSave,\n preflightRun,\n async runCommittedDocument(context) {\n await ensureEditingState(undefined, undefined, context);\n await synchronizeDocumentState(readUnsavedChangesState().dirty);\n const current = coordinator.getSnapshot();\n if (current.document !== 'clean') {\n throw new Error(`Cannot run an uncommitted editor document: ${current.document}.`);\n }\n return runExclusiveDocumentOperation(async () => {\n const preparation = beginPreparation();\n if (!await validateRun() || !isPreparationCurrent(preparation)) return false;\n if (!isPreparationCurrent(preparation)) {\n throw new Error('Prepared editor lifecycle operation is stale.');\n }\n await disposePreview(context);\n await coordinator.transition({\n type: 'mode.exitEdit',\n ...context,\n operation: () => runGameAfterReleasingPluginScopes('save'),\n });\n await closeEditingScopes();\n return true;\n });\n },\n prepareSaveAndRunGame,\n prepareDiscardAndRunGame,\n async saveAndRunGame(context, executor) {\n const prepared = await prepareSaveAndRunGame(context, executor);\n if (!prepared.accepted) return false;\n try {\n await prepared.run(executor);\n return true;\n } catch (error) {\n if (error instanceof PlayableLocalEditorRunRejectedError) return false;\n throw error;\n }\n },\n async discardAndRunGame(context, executor) {\n const prepared = await prepareDiscardAndRunGame(context, executor);\n if (prepared.accepted) {\n try {\n await prepared.run(executor);\n } catch (error) {\n if (error instanceof PlayableLocalEditorRunRejectedError) return false;\n throw error;\n }\n }\n return prepared.accepted;\n },\n openScope,\n addScopeResource,\n closeScope,\n async dispose(context) {\n if (coordinator.getSnapshot().application === 'disposed') return;\n await coordinator.transition({\n type: 'application.dispose',\n ...context,\n operation: () => closeScope(PLAYABLE_LOCAL_EDITOR_APPLICATION_SCOPE_ID),\n });\n },\n async runWithAssetLoadingOverlay(operation) {\n const shouldShowAssetLoading = !options.loadingOverlay.isVisible() && !assetLoadingOverlayOwned;\n assetLoadingCount += 1;\n if (shouldShowAssetLoading) {\n assetLoadingOverlayOwned = true;\n assetLoadingOverlayShownAt = now();\n options.loadingOverlay.show(options.content.assetImport);\n await waitForPaint();\n } else if (options.loadingOverlay.isVisible() && !assetLoadingOverlayOwned) {\n assetLoadingOverlayWaiting = true;\n }\n\n try {\n return await operation();\n } finally {\n assetLoadingCount = Math.max(0, assetLoadingCount - 1);\n if (assetLoadingCount === 0 && assetLoadingOverlayOwned) {\n const remaining = minAssetLoadingOverlayMs - (now() - assetLoadingOverlayShownAt);\n if (remaining > 0) await waitForMilliseconds(remaining);\n if (assetLoadingCount === 0 && assetLoadingOverlayOwned) {\n assetLoadingOverlayOwned = false;\n if (options.loadingOverlay.isOwned?.() === false) {\n pendingLifecycleOverlay = null;\n } else if (pendingLifecycleOverlay) {\n const pending = pendingLifecycleOverlay;\n pendingLifecycleOverlay = null;\n lifecycleOverlayOwner = pending.epoch;\n options.loadingOverlay.show(pending.content);\n } else {\n options.loadingOverlay.hide();\n }\n }\n }\n if (assetLoadingCount === 0) assetLoadingOverlayWaiting = false;\n }\n },\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"lifecycle.js","sourceRoot":"","sources":["../../src/local-harness/lifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mCAAmC,GACpC,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EACL,+BAA+B,EAC/B,2BAA2B,GAC5B,MAAM,UAAU,CAAC;AAgBlB,MAAM,CAAC,MAAM,0CAA0C,GAAG,oBAAoB,CAAC;AAC/E,MAAM,CAAC,MAAM,sCAAsC,GAAG,gBAAgB,CAAC;AACvE,MAAM,CAAC,MAAM,4CAA4C,GAAG,sBAAsB,CAAC;AACnF,MAAM,CAAC,MAAM,2CAA2C,GAAG,qBAAqB,CAAC;AACjF,MAAM,CAAC,MAAM,2CAA2C,GAAG,qBAAqB,CAAC;AAcjF,MAAM,oCAAqC,SAAQ,KAAK;IACtD;QACE,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACzC,IAAI,CAAC,IAAI,GAAG,sCAAsC,CAAC;IACrD,CAAC;CACF;AAED,MAAM,mCAAoC,SAAQ,KAAK;IACrD;QACE,KAAK,CAAC,sDAAsD,CAAC,CAAC;QAC9D,IAAI,CAAC,IAAI,GAAG,qCAAqC,CAAC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/B,qBAAqB,GAAG,OAAO,CAAC,KAAK,CAAC;4BACtC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;wBAC/C,CAAC;6BAAM,CAAC;4BACN,OAAO,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC;wBAChC,CAAC;oBACH,CAAC;gBACH,CAAC;gBACD,IAAI,iBAAiB,KAAK,CAAC;oBAAE,0BAA0B,GAAG,KAAK,CAAC;YAClE,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["import {\n createFpsEditorLifecycleCoordinator,\n} from '@fps-games/editor-core/lifecycle';\nimport type { FpsEditorEventRoute } from '@fps-games/editor-core/events';\nimport {\n waitForPlayableLocalEditorPaint,\n waitForPlayableMilliseconds,\n} from './timing';\nimport type {\n PlayableLocalEditorDataSafetyOperation,\n PlayableLocalEditorLifecycleController,\n PlayableLocalEditorLifecycleControllerOptions,\n PlayableLocalEditorDocumentOperationExecutor,\n PlayableLocalEditorLifecycleOperationContext,\n PlayableLocalEditorLoadingOverlayContent,\n PlayableLocalEditorPreparedRun,\n PlayableLocalEditorLifecycleScopeInput,\n PlayableLocalEditorSaveFailureState,\n PlayableLocalEditorSaveFailureInput,\n PlayableLocalEditorSaveOptions,\n PlayableLocalEditorUnsavedChangesState,\n} from './types';\n\nexport const PLAYABLE_LOCAL_EDITOR_APPLICATION_SCOPE_ID = 'editor:application';\nexport const PLAYABLE_LOCAL_EDITOR_PROJECT_SCOPE_ID = 'editor:project';\nexport const PLAYABLE_LOCAL_EDITOR_MAIN_DOCUMENT_SCOPE_ID = 'editor:document:main';\nexport const PLAYABLE_LOCAL_EDITOR_MAIN_SESSION_SCOPE_ID = 'editor:session:main';\nexport const PLAYABLE_LOCAL_EDITOR_MAIN_PREVIEW_SCOPE_ID = 'editor:preview:main';\n\ntype LifecycleScopeRecord = {\n readonly input: PlayableLocalEditorLifecycleScopeInput;\n readonly disposers: Set<() => void | Promise<void>>;\n ready: Promise<void>;\n closing: Promise<void> | null;\n failed: boolean;\n backingOpened: boolean;\n lifecycleOpened: boolean;\n closeRequested: boolean;\n closeEventRoute: FpsEditorEventRoute | null;\n};\n\nclass PlayableLocalEditorSaveRejectedError extends Error {\n constructor() {\n super('Local editor save was rejected.');\n this.name = 'PlayableLocalEditorSaveRejectedError';\n }\n}\n\nclass PlayableLocalEditorRunRejectedError extends Error {\n constructor() {\n super('Local editor Run was rejected by current validation.');\n this.name = 'PlayableLocalEditorRunRejectedError';\n }\n}\n\nfunction createLifecycleAbortError(): Error {\n const error = new Error('Playable Local Editor lifecycle is disposing or disposed.');\n error.name = 'AbortError';\n return error;\n}\n\nexport function createPlayableLocalEditorLifecycleController(\n options: PlayableLocalEditorLifecycleControllerOptions,\n): PlayableLocalEditorLifecycleController {\n const waitForPaint = options.waitForPaint ?? waitForPlayableLocalEditorPaint;\n const waitForMilliseconds = options.waitForMilliseconds ?? waitForPlayableMilliseconds;\n const now = options.now ?? (() => Date.now());\n const minAssetLoadingOverlayMs = options.minAssetLoadingOverlayMs ?? 500;\n const viewportRevealReason = options.viewportRevealReason ?? 'editor-loading-overlay-hidden';\n const renderAfterEnter = options.renderAfterEnter ?? true;\n const initialUnsavedChanges = options.harness.getUnsavedChangesState?.();\n const initialCoordinatorProfile = options.initialMode === 'edit'\n && initialUnsavedChanges?.hasWorkingDocument === true\n ? initialUnsavedChanges.dirty ? 'editing-dirty' : 'editing-clean'\n : 'created';\n const coordinator = createFpsEditorLifecycleCoordinator({\n now,\n initialState: initialCoordinatorProfile,\n eventPublisher: options.eventPublisher,\n report: options.reportDiagnostic,\n });\n const lifecycle = Object.freeze({\n getSnapshot: coordinator.getSnapshot,\n subscribe: coordinator.subscribe,\n });\n const scopes = new Map<string, LifecycleScopeRecord>();\n const pendingScopeResources = new Map<string, Set<() => void | Promise<void>>>();\n let activeEnter: Promise<void> | null = null;\n let disposing = false;\n let disposal: Promise<void> | null = null;\n const assertScopeCanOpen = (input: PlayableLocalEditorLifecycleScopeInput): void => {\n const lifecycleSnapshot = coordinator.getSnapshot();\n if (lifecycleSnapshot.transitioning || lifecycleSnapshot.application !== 'ready') {\n throw new Error(`Editor lifecycle cannot open a scope while application is ${lifecycleSnapshot.application}.`);\n }\n let parentId = input.parentId;\n while (parentId) {\n const parent = scopes.get(parentId);\n if (!parent || parent.closing || parent.failed) {\n throw new Error(`Editor lifecycle scope parent is not open: ${parentId}`);\n }\n parentId = parent.input.parentId;\n }\n };\n const openScope = async (input: PlayableLocalEditorLifecycleScopeInput): Promise<void> => {\n assertScopeCanOpen(input);\n const existing = scopes.get(input.id);\n if (existing) {\n if (existing.input.scope !== input.scope || existing.input.parentId !== input.parentId) {\n throw new Error(`Editor lifecycle scope identity conflicts with the existing scope: ${input.id}`);\n }\n if (existing.closing) throw new Error(`Editor lifecycle scope is closing: ${input.id}`);\n if (existing.failed) {\n await closeScope(input.id);\n return openScope(input);\n }\n return existing.ready;\n }\n const record: LifecycleScopeRecord = {\n input: Object.freeze({ ...input }),\n disposers: pendingScopeResources.get(input.id) ?? new Set(),\n ready: Promise.resolve(),\n closing: null,\n failed: false,\n backingOpened: false,\n lifecycleOpened: false,\n closeRequested: false,\n closeEventRoute: null,\n };\n pendingScopeResources.delete(input.id);\n scopes.set(input.id, record);\n record.ready = (async () => {\n if (input.parentId) {\n const parent = scopes.get(input.parentId);\n if (!parent) throw new Error(`Editor lifecycle scope parent is not open: ${input.parentId}`);\n await parent.ready;\n assertScopeCanOpen(input);\n }\n if (record.closeRequested) return;\n // A backing host may retain a partially-started scope when its rollback\n // cleanup fails. Reserve that ownership before awaiting so closeScope can\n // retry cleanup even when openScope rejects.\n record.backingOpened = options.scopeHost !== undefined;\n await options.scopeHost?.openScope(input);\n if (record.closeRequested) return;\n coordinator.openScope(input);\n record.lifecycleOpened = true;\n })();\n try {\n await record.ready;\n } catch (error) {\n let cleanupError: unknown;\n try { await closeScope(input.id); } catch (caught) { cleanupError = caught; }\n if (cleanupError) {\n const combined = new Error(`Editor lifecycle scope open and cleanup failed: ${input.id}`) as Error & { errors: unknown[] };\n combined.errors = [error, cleanupError];\n throw combined;\n }\n throw error;\n }\n };\n const addScopeResource = (scopeId: string, disposer: () => void | Promise<void>): (() => void) => {\n const record = scopes.get(scopeId);\n if (record?.closing || record?.failed) throw new Error(`Editor lifecycle scope is not open: ${scopeId}`);\n if (!record && scopeId !== PLAYABLE_LOCAL_EDITOR_APPLICATION_SCOPE_ID) {\n throw new Error(`Editor lifecycle scope is not open: ${scopeId}`);\n }\n const resources = record?.disposers ?? pendingScopeResources.get(scopeId) ?? new Set();\n if (!record) pendingScopeResources.set(scopeId, resources);\n resources.add(disposer);\n let active = true;\n return () => {\n if (!active) return;\n active = false;\n resources.delete(disposer);\n if (!record && resources.size === 0) pendingScopeResources.delete(scopeId);\n };\n };\n const closeScope = async (scopeId: string): Promise<void> => {\n const record = scopes.get(scopeId);\n if (!record) {\n const pendingResources = pendingScopeResources.get(scopeId);\n if (!pendingResources) return;\n for (const disposer of [...pendingResources].reverse()) {\n await disposer();\n pendingResources.delete(disposer);\n }\n pendingScopeResources.delete(scopeId);\n return;\n }\n if (record.closing) return record.closing;\n record.closeEventRoute ??= options.eventPublisher?.captureRoute({\n scope: record.input.scope,\n scopeId,\n }) ?? null;\n record.closeRequested = true;\n let backingReservationError: unknown;\n if (record.backingOpened) {\n try { options.scopeHost?.reserveScopeClose(scopeId); }\n catch (error) { backingReservationError = error; }\n }\n record.closing = (async () => {\n const errors: unknown[] = [];\n try { await record.ready; }\n catch { /* The open caller owns and reports setup failures. */ }\n if (backingReservationError) errors.push(backingReservationError);\n if (errors.length === 0) {\n const children = [...scopes.values()]\n .filter(candidate => candidate.input.parentId === scopeId)\n .reverse();\n for (const child of children) {\n try { await closeScope(child.input.id); }\n catch (error) {\n errors.push(error);\n break;\n }\n }\n }\n const remainingChildren = [...scopes.values()].filter(candidate => candidate.input.parentId === scopeId);\n if (errors.length === 0 && remainingChildren.length > 0) {\n errors.push(new Error(`Editor lifecycle scope still has open children: ${scopeId}`));\n }\n if (errors.length === 0 && record.backingOpened) {\n try {\n await options.scopeHost?.closeScope(scopeId);\n record.backingOpened = false;\n } catch (error) { errors.push(error); }\n }\n if (errors.length === 0 && remainingChildren.length === 0) {\n for (const disposer of [...record.disposers].reverse()) {\n try {\n await disposer();\n record.disposers.delete(disposer);\n }\n catch (error) {\n // Preserve dependency order: untouched earlier resources stay owned\n // until the failed later resource can be released on a retry.\n errors.push(error);\n break;\n }\n }\n }\n if (errors.length === 0 && record.lifecycleOpened) {\n try {\n coordinator.closeScope(scopeId, record.closeEventRoute ?? undefined);\n record.lifecycleOpened = false;\n } catch (error) { errors.push(error); }\n }\n if (errors.length > 0) {\n record.failed = true;\n coordinator.failScope(scopeId);\n const error = new Error(`Editor lifecycle scope cleanup failed: ${scopeId}`) as Error & { errors: unknown[] };\n error.errors = errors;\n throw error;\n }\n scopes.delete(scopeId);\n })().finally(() => {\n if (scopes.get(scopeId) === record) record.closing = null;\n });\n return record.closing;\n };\n let assetLoadingCount = 0;\n let assetLoadingOverlayOwned = false;\n let assetLoadingOverlayWaiting = false;\n let assetLoadingOverlayShownAt = 0;\n let preparationEpoch = 0;\n let lifecycleOverlayOwner: number | null = null;\n let pendingLifecycleOverlay: {\n epoch: number;\n content: PlayableLocalEditorLoadingOverlayContent;\n } | null = null;\n let pendingDocumentDirty: boolean | undefined;\n let documentSynchronization: Promise<void> | null = null;\n\n const readLifecycleRevision = (): number => coordinator.getSnapshot().revision;\n const readDocumentRevision = (): number => (\n options.harness.getDocumentRevision?.() ?? readLifecycleRevision()\n );\n\n const ensureApplicationAndProject = async (\n context?: PlayableLocalEditorLifecycleOperationContext,\n ): Promise<void> => {\n let current = coordinator.getSnapshot();\n if (current.transitioning) throw new Error('Editor lifecycle transition already in progress.');\n if (current.application === 'created') {\n await coordinator.transition({ type: 'application.start', ...context });\n current = coordinator.getSnapshot();\n }\n if (current.application !== 'ready') {\n throw new Error(`Editor application is not ready: ${current.application}.`);\n }\n await openScope({ id: PLAYABLE_LOCAL_EDITOR_APPLICATION_SCOPE_ID, scope: 'application' });\n options.operations.attachApplicationAuthority?.();\n if (current.project === 'closed') {\n await coordinator.transition({ type: 'project.open', ...context });\n }\n await openScope({\n id: PLAYABLE_LOCAL_EDITOR_PROJECT_SCOPE_ID,\n scope: 'project',\n parentId: PLAYABLE_LOCAL_EDITOR_APPLICATION_SCOPE_ID,\n });\n };\n\n const ensureEditingState = async (\n load: (() => Promise<void>) | undefined = options.operations.loadDocument,\n enter: (() => Promise<void>) | undefined = options.operations.enterWorld,\n context?: PlayableLocalEditorLifecycleOperationContext,\n ): Promise<void> => {\n await ensureApplicationAndProject(context);\n let current = coordinator.getSnapshot();\n const workingDocumentAvailable = readUnsavedChangesState().hasWorkingDocument;\n await openScope({\n id: PLAYABLE_LOCAL_EDITOR_MAIN_DOCUMENT_SCOPE_ID,\n scope: 'document',\n parentId: PLAYABLE_LOCAL_EDITOR_PROJECT_SCOPE_ID,\n });\n await openScope({\n id: PLAYABLE_LOCAL_EDITOR_MAIN_SESSION_SCOPE_ID,\n scope: 'session',\n parentId: PLAYABLE_LOCAL_EDITOR_MAIN_DOCUMENT_SCOPE_ID,\n });\n if (current.document === 'unloaded' || (current.document === 'failed' && !workingDocumentAvailable)) {\n try {\n await coordinator.transition({ type: 'document.load', ...context, ...(load ? { operation: load } : {}) });\n options.operations.attachSessionAuthority?.();\n current = coordinator.getSnapshot();\n } catch (error) {\n await closeScope(PLAYABLE_LOCAL_EDITOR_MAIN_SESSION_SCOPE_ID);\n await closeScope(PLAYABLE_LOCAL_EDITOR_MAIN_DOCUMENT_SCOPE_ID);\n throw error;\n }\n } else {\n options.operations.attachSessionAuthority?.();\n }\n try {\n await openScope({\n id: PLAYABLE_LOCAL_EDITOR_MAIN_PREVIEW_SCOPE_ID,\n scope: 'preview',\n parentId: PLAYABLE_LOCAL_EDITOR_MAIN_SESSION_SCOPE_ID,\n });\n } catch (error) {\n // A failed Preview rollback remains a child of Session and owns the\n // loaded document graph. Do not retry that same cleanup indirectly by\n // tearing down its ancestors in the same enter attempt.\n if (scopes.has(PLAYABLE_LOCAL_EDITOR_MAIN_PREVIEW_SCOPE_ID)) throw error;\n await closeScope(PLAYABLE_LOCAL_EDITOR_MAIN_SESSION_SCOPE_ID);\n await closeScope(PLAYABLE_LOCAL_EDITOR_MAIN_DOCUMENT_SCOPE_ID);\n throw error;\n }\n if (current.mode === 'failed') {\n try {\n if (current.preview === 'failed') await disposePreview(context);\n await coordinator.transition({ type: 'mode.recoverEdit', ...context, ...(enter ? { operation: enter } : {}) });\n } catch (error) {\n await closeScope(PLAYABLE_LOCAL_EDITOR_MAIN_PREVIEW_SCOPE_ID);\n await closeScope(PLAYABLE_LOCAL_EDITOR_MAIN_SESSION_SCOPE_ID);\n throw error;\n }\n current = coordinator.getSnapshot();\n }\n if (current.mode === 'play') {\n try {\n await coordinator.transition({ type: 'mode.enterEdit', ...context, ...(enter ? { operation: enter } : {}) });\n } catch (error) {\n await closeScope(PLAYABLE_LOCAL_EDITOR_MAIN_PREVIEW_SCOPE_ID);\n await closeScope(PLAYABLE_LOCAL_EDITOR_MAIN_SESSION_SCOPE_ID);\n throw error;\n }\n current = coordinator.getSnapshot();\n }\n if (current.mode !== 'edit') throw new Error(`Editor mode is not ready: ${current.mode}.`);\n if (current.preview === 'absent') {\n await coordinator.transition({ type: 'preview.create', ...context });\n current = coordinator.getSnapshot();\n }\n if (current.document === 'failed') {\n await coordinator.transition({\n type: readUnsavedChangesState().dirty ? 'document.markDirty' : 'document.markClean',\n ...context,\n });\n }\n };\n\n const disposePreview = async (\n context?: PlayableLocalEditorLifecycleOperationContext,\n ): Promise<void> => {\n const current = coordinator.getSnapshot();\n if (current.preview === 'active' || current.preview === 'failed') {\n await coordinator.transition({\n type: 'preview.dispose',\n ...context,\n operation: () => closeScope(PLAYABLE_LOCAL_EDITOR_MAIN_PREVIEW_SCOPE_ID),\n });\n return;\n }\n await closeScope(PLAYABLE_LOCAL_EDITOR_MAIN_PREVIEW_SCOPE_ID);\n };\n\n const closeEditingScopes = async (): Promise<void> => {\n await closeScope(PLAYABLE_LOCAL_EDITOR_MAIN_SESSION_SCOPE_ID);\n await closeScope(PLAYABLE_LOCAL_EDITOR_MAIN_DOCUMENT_SCOPE_ID);\n };\n\n const runGameAfterReleasingPluginScopes = async (reason: 'save' | 'discard'): Promise<void> => {\n // Replacement runtimes use the same stable Plugin scope ids. Release the\n // complete old scope tree before restart can mount the replacement editor.\n await closeScope(PLAYABLE_LOCAL_EDITOR_APPLICATION_SCOPE_ID);\n await options.operations.runGame(reason);\n };\n\n const validateRun = async (): Promise<boolean> => (\n options.operations.validateRun ? options.operations.validateRun() : true\n );\n const runExclusiveDocumentOperation = <T>(\n operation: (executor: PlayableLocalEditorDocumentOperationExecutor) => Promise<T>,\n executor?: PlayableLocalEditorDocumentOperationExecutor,\n ): Promise<T> => (\n options.harness.runExclusiveDocumentOperation(operation, executor)\n );\n\n const preflightRun = (): Promise<boolean> => runExclusiveDocumentOperation(async () => {\n const preparation = beginPreparation();\n return await validateRun() && isPreparationCurrent(preparation);\n });\n\n const waitForLifecycleIdle = async (): Promise<void> => {\n if (!coordinator.getSnapshot().transitioning) return;\n await new Promise<void>(resolve => {\n const dispose = coordinator.subscribe(snapshot => {\n if (snapshot.transitioning) return;\n dispose();\n resolve();\n });\n if (!coordinator.getSnapshot().transitioning) {\n dispose();\n resolve();\n }\n });\n };\n\n const reconcileDocumentState = async (dirty: boolean): Promise<void> => {\n await waitForLifecycleIdle();\n const current = coordinator.getSnapshot();\n if (current.project !== 'open' || current.mode !== 'edit') return;\n if (dirty && current.document !== 'dirty') {\n if (current.document === 'clean' || current.document === 'committing') {\n await coordinator.transition({ type: 'document.markDirty' });\n }\n return;\n }\n if (!dirty && current.document === 'dirty') {\n await coordinator.transition({ type: 'document.markClean' });\n }\n };\n\n const drainDocumentSynchronization = async (): Promise<void> => {\n while (pendingDocumentDirty !== undefined) {\n const dirty = pendingDocumentDirty;\n pendingDocumentDirty = undefined;\n try {\n await reconcileDocumentState(dirty);\n } catch (error) {\n if (!coordinator.getSnapshot().transitioning) throw error;\n pendingDocumentDirty = dirty;\n }\n }\n };\n\n const synchronizeDocumentState = (dirty: boolean): Promise<void> => {\n pendingDocumentDirty = dirty;\n if (!documentSynchronization) {\n documentSynchronization = drainDocumentSynchronization().finally(() => {\n documentSynchronization = null;\n if (pendingDocumentDirty !== undefined) void synchronizeDocumentState(pendingDocumentDirty);\n });\n }\n return documentSynchronization;\n };\n\n const waitForDocumentSynchronization = async (): Promise<void> => {\n if (documentSynchronization) await documentSynchronization;\n };\n\n const notifySaveFailed = async (\n operation: PlayableLocalEditorDataSafetyOperation,\n error?: unknown,\n ): Promise<void> => {\n const notify = options.interactions?.notifySaveFailed;\n if (!notify) return;\n let state: PlayableLocalEditorSaveFailureState | null | undefined;\n try {\n state = options.harness.getSaveFailureState?.();\n } catch (stateError) {\n console.error('[PlayableLocalEditorLifecycle] save failure state unavailable', stateError);\n }\n const input: PlayableLocalEditorSaveFailureInput = {\n operation,\n status: state?.status ?? (error instanceof Error ? error.message : undefined),\n details: state?.details,\n error: error ?? state?.error,\n };\n try {\n await notify(input);\n } catch (notifyError) {\n console.error('[PlayableLocalEditorLifecycle] save failure notification failed', notifyError);\n }\n };\n\n const prepareDocumentSave = async (\n save: () => Promise<void>,\n context?: PlayableLocalEditorLifecycleOperationContext,\n ): Promise<void> => {\n await waitForDocumentSynchronization();\n await ensureEditingState(undefined, undefined, context);\n await synchronizeDocumentState(readUnsavedChangesState().dirty);\n await coordinator.transition({ type: 'document.prepareSave', ...context, operation: save });\n };\n\n const commitDocumentSave = async (\n commit?: () => Promise<void>,\n context?: PlayableLocalEditorLifecycleOperationContext,\n ): Promise<void> => {\n await coordinator.transition({ type: 'document.commit', ...context, ...(commit ? { operation: commit } : {}) });\n };\n\n const saveScene = async (\n operation: PlayableLocalEditorDataSafetyOperation = 'save-scene',\n context?: PlayableLocalEditorLifecycleOperationContext,\n executor?: PlayableLocalEditorDocumentOperationExecutor,\n saveOptions?: PlayableLocalEditorSaveOptions,\n ): Promise<boolean> => {\n let saved = false;\n try {\n await prepareDocumentSave(async () => {\n saved = await options.harness.saveScene(executor, saveOptions);\n if (!saved) throw new PlayableLocalEditorSaveRejectedError();\n }, context);\n await commitDocumentSave(undefined, context);\n return true;\n } catch (error) {\n if (error instanceof PlayableLocalEditorSaveRejectedError) {\n await notifySaveFailed(operation);\n return false;\n }\n await notifySaveFailed(operation, error);\n throw error;\n }\n };\n\n const readUnsavedChangesState = (): PlayableLocalEditorUnsavedChangesState => (\n options.harness.getUnsavedChangesState?.() ?? {\n dirty: false,\n hasWorkingDocument: false,\n }\n );\n\n const confirmDiscardIfNeeded = async (\n operation: PlayableLocalEditorDataSafetyOperation,\n ): Promise<boolean> => {\n const unsavedChanges = readUnsavedChangesState();\n if (!unsavedChanges.dirty || !unsavedChanges.hasWorkingDocument) return true;\n try {\n return await options.interactions?.confirmDiscardUnsavedChanges?.({\n operation,\n unsavedChanges,\n }) !== false;\n } catch (error) {\n console.error('[PlayableLocalEditorLifecycle] discard confirmation failed', error);\n return false;\n }\n };\n\n const beginPreparation = (): { epoch: number; revision: number; authoredVersion: number } => {\n pendingLifecycleOverlay = null;\n if (lifecycleOverlayOwner !== null) {\n lifecycleOverlayOwner = null;\n const ownsOverlay = options.loadingOverlay.isOwned?.() !== false;\n if (ownsOverlay && assetLoadingCount > 0 && assetLoadingOverlayWaiting) {\n assetLoadingOverlayWaiting = false;\n assetLoadingOverlayOwned = true;\n assetLoadingOverlayShownAt = now();\n options.loadingOverlay.show(options.content.assetImport);\n } else if (ownsOverlay) {\n options.loadingOverlay.hide();\n }\n }\n return {\n epoch: ++preparationEpoch,\n revision: readLifecycleRevision(),\n authoredVersion: readDocumentRevision(),\n };\n };\n\n const showLifecycleOverlay = (\n preparation: { epoch: number },\n content: PlayableLocalEditorLoadingOverlayContent,\n ): void => {\n if (options.loadingOverlay.isVisible()) {\n if (options.loadingOverlay.isOwned?.() !== false) {\n pendingLifecycleOverlay = { epoch: preparation.epoch, content };\n }\n return;\n }\n options.loadingOverlay.show(content);\n lifecycleOverlayOwner = preparation.epoch;\n };\n\n const hideLifecycleOverlay = (epoch: number): void => {\n if (pendingLifecycleOverlay?.epoch === epoch) pendingLifecycleOverlay = null;\n if (lifecycleOverlayOwner !== epoch) return;\n lifecycleOverlayOwner = null;\n if (options.loadingOverlay.isOwned?.() === false) return;\n if (assetLoadingCount > 0 && assetLoadingOverlayWaiting) {\n assetLoadingOverlayWaiting = false;\n assetLoadingOverlayOwned = true;\n assetLoadingOverlayShownAt = now();\n options.loadingOverlay.show(options.content.assetImport);\n return;\n }\n options.loadingOverlay.hide();\n };\n\n const isPreparationCurrent = (preparation: {\n epoch: number;\n revision: number;\n authoredVersion: number;\n }): boolean => (\n preparation.epoch === preparationEpoch\n && preparation.revision === readLifecycleRevision()\n && preparation.authoredVersion === readDocumentRevision()\n );\n\n const createPreparedRun = (\n preparation: { epoch: number; revision: number; authoredVersion: number },\n run: () => Promise<void>,\n ): PlayableLocalEditorPreparedRun => {\n let consumed = false;\n return {\n accepted: true,\n async run(executor) {\n if (consumed) throw new Error('Prepared editor lifecycle operation was already consumed.');\n consumed = true;\n try {\n await runExclusiveDocumentOperation(async () => {\n if (!isPreparationCurrent(preparation)) {\n throw new Error('Prepared editor lifecycle operation is stale.');\n }\n if (!await validateRun() || !isPreparationCurrent(preparation)) {\n throw new PlayableLocalEditorRunRejectedError();\n }\n await run();\n }, executor);\n } catch (error) {\n hideLifecycleOverlay(preparation.epoch);\n throw error;\n }\n },\n };\n };\n\n const prepareSaveAndRunGame = async (\n context?: PlayableLocalEditorLifecycleOperationContext,\n executor?: PlayableLocalEditorDocumentOperationExecutor,\n ): Promise<PlayableLocalEditorPreparedRun> => {\n const preparation = beginPreparation();\n showLifecycleOverlay(preparation, options.content.saveAndRunGame);\n try {\n return await runExclusiveDocumentOperation(async transactionExecutor => {\n await waitForPaint();\n if (!await validateRun() || !isPreparationCurrent(preparation)) {\n hideLifecycleOverlay(preparation.epoch);\n return { accepted: false };\n }\n const saved = await saveScene(\n 'save-and-run-game',\n context,\n transactionExecutor,\n { validationPhases: ['run', 'save'] },\n );\n if (!saved || preparation.epoch !== preparationEpoch) {\n hideLifecycleOverlay(preparation.epoch);\n return { accepted: false };\n }\n preparation.revision = readLifecycleRevision();\n preparation.authoredVersion = readDocumentRevision();\n if (!await validateRun() || !isPreparationCurrent(preparation)) {\n hideLifecycleOverlay(preparation.epoch);\n return { accepted: false };\n }\n return createPreparedRun(preparation, async () => {\n try {\n await disposePreview(context);\n await coordinator.transition({\n type: 'mode.exitEdit',\n ...context,\n operation: () => runGameAfterReleasingPluginScopes('save'),\n });\n await closeEditingScopes();\n } finally {\n hideLifecycleOverlay(preparation.epoch);\n }\n });\n }, executor);\n } catch (error) {\n hideLifecycleOverlay(preparation.epoch);\n throw error;\n }\n };\n\n const prepareDiscardAndRunGame = async (\n context?: PlayableLocalEditorLifecycleOperationContext,\n executor?: PlayableLocalEditorDocumentOperationExecutor,\n ): Promise<PlayableLocalEditorPreparedRun> => {\n await waitForDocumentSynchronization();\n await ensureEditingState(undefined, undefined, context);\n await synchronizeDocumentState(readUnsavedChangesState().dirty);\n const preparation = beginPreparation();\n if (!await confirmDiscardIfNeeded('discard-and-run-game')\n || !isPreparationCurrent(preparation)) return { accepted: false };\n showLifecycleOverlay(preparation, options.content.discardAndRunGame);\n try {\n return await runExclusiveDocumentOperation(async () => {\n await waitForPaint();\n if (!isPreparationCurrent(preparation)) {\n hideLifecycleOverlay(preparation.epoch);\n return { accepted: false };\n }\n if (!await validateRun() || !isPreparationCurrent(preparation)) {\n hideLifecycleOverlay(preparation.epoch);\n return { accepted: false };\n }\n return createPreparedRun(preparation, async () => {\n try {\n await coordinator.transition({\n type: 'document.discard',\n ...context,\n ...(options.operations?.restoreDocument\n ? { operation: options.operations.restoreDocument }\n : {}),\n });\n await disposePreview(context);\n await coordinator.transition({\n type: 'mode.exitEdit',\n ...context,\n operation: () => runGameAfterReleasingPluginScopes('discard'),\n });\n await closeEditingScopes();\n } finally {\n hideLifecycleOverlay(preparation.epoch);\n }\n });\n }, executor);\n } catch (error) {\n hideLifecycleOverlay(preparation.epoch);\n throw error;\n }\n };\n\n return {\n lifecycle,\n registerParticipant: coordinator.registerParticipant,\n enterEditor(context) {\n if (disposing) return Promise.reject(createLifecycleAbortError());\n if (activeEnter) return activeEnter;\n let resolve!: () => void;\n let reject!: (error: unknown) => void;\n const shared = new Promise<void>((nextResolve, nextReject) => { resolve = nextResolve; reject = nextReject; });\n activeEnter = shared;\n void (async () => {\n try {\n const preparation = beginPreparation();\n showLifecycleOverlay(preparation, {\n ...options.content.enter,\n presentation: 'editor-shell',\n });\n let entered = false;\n try {\n await waitForPaint();\n const before = coordinator.getSnapshot();\n const load = options.operations.loadDocument;\n const enter = options.operations.enterWorld\n ?? options.harness.enterEditor.bind(options.harness);\n await ensureEditingState(load, enter, context);\n entered = before.mode !== 'edit';\n if (renderAfterEnter) options.harness.render();\n await waitForPaint();\n } finally {\n hideLifecycleOverlay(preparation.epoch);\n if (entered) options.harness.notifyViewportRevealed?.(viewportRevealReason);\n }\n resolve();\n } catch (error) {\n reject(error);\n } finally {\n if (activeEnter === shared) activeEnter = null;\n }\n })();\n return shared;\n },\n saveScene,\n synchronizeDocumentState,\n prepareDocumentSave,\n commitDocumentSave,\n preflightRun,\n async runCommittedDocument(context) {\n await ensureEditingState(undefined, undefined, context);\n await synchronizeDocumentState(readUnsavedChangesState().dirty);\n const current = coordinator.getSnapshot();\n if (current.document !== 'clean') {\n throw new Error(`Cannot run an uncommitted editor document: ${current.document}.`);\n }\n return runExclusiveDocumentOperation(async () => {\n const preparation = beginPreparation();\n if (!await validateRun() || !isPreparationCurrent(preparation)) return false;\n if (!isPreparationCurrent(preparation)) {\n throw new Error('Prepared editor lifecycle operation is stale.');\n }\n await disposePreview(context);\n await coordinator.transition({\n type: 'mode.exitEdit',\n ...context,\n operation: () => runGameAfterReleasingPluginScopes('save'),\n });\n await closeEditingScopes();\n return true;\n });\n },\n prepareSaveAndRunGame,\n prepareDiscardAndRunGame,\n async saveAndRunGame(context, executor) {\n const prepared = await prepareSaveAndRunGame(context, executor);\n if (!prepared.accepted) return false;\n try {\n await prepared.run(executor);\n return true;\n } catch (error) {\n if (error instanceof PlayableLocalEditorRunRejectedError) return false;\n throw error;\n }\n },\n async discardAndRunGame(context, executor) {\n const prepared = await prepareDiscardAndRunGame(context, executor);\n if (prepared.accepted) {\n try {\n await prepared.run(executor);\n } catch (error) {\n if (error instanceof PlayableLocalEditorRunRejectedError) return false;\n throw error;\n }\n }\n return prepared.accepted;\n },\n openScope,\n addScopeResource,\n closeScope,\n dispose(context) {\n if (disposal) return disposal;\n disposing = true;\n const pending = (async () => {\n try { await activeEnter; } catch { /* Enter callers retain their own failure attribution. */ }\n await coordinator.retryCleanup();\n if (coordinator.getSnapshot().application !== 'disposed') {\n await coordinator.transition({\n type: 'application.dispose',\n ...context,\n operation: () => closeScope(PLAYABLE_LOCAL_EDITOR_APPLICATION_SCOPE_ID),\n });\n }\n })();\n disposal = pending;\n void pending.catch(() => {\n if (disposal === pending) {\n disposal = null;\n }\n });\n return pending;\n },\n async runWithAssetLoadingOverlay(operation) {\n const shouldShowAssetLoading = !options.loadingOverlay.isVisible() && !assetLoadingOverlayOwned;\n assetLoadingCount += 1;\n if (shouldShowAssetLoading) {\n assetLoadingOverlayOwned = true;\n assetLoadingOverlayShownAt = now();\n options.loadingOverlay.show(options.content.assetImport);\n await waitForPaint();\n } else if (options.loadingOverlay.isVisible() && !assetLoadingOverlayOwned) {\n assetLoadingOverlayWaiting = true;\n }\n\n try {\n return await operation();\n } finally {\n assetLoadingCount = Math.max(0, assetLoadingCount - 1);\n if (assetLoadingCount === 0 && assetLoadingOverlayOwned) {\n const remaining = minAssetLoadingOverlayMs - (now() - assetLoadingOverlayShownAt);\n if (remaining > 0) await waitForMilliseconds(remaining);\n if (assetLoadingCount === 0 && assetLoadingOverlayOwned) {\n assetLoadingOverlayOwned = false;\n if (options.loadingOverlay.isOwned?.() === false) {\n pendingLifecycleOverlay = null;\n } else if (pendingLifecycleOverlay) {\n const pending = pendingLifecycleOverlay;\n pendingLifecycleOverlay = null;\n lifecycleOverlayOwner = pending.epoch;\n options.loadingOverlay.show(pending.content);\n } else {\n options.loadingOverlay.hide();\n }\n }\n }\n if (assetLoadingCount === 0) assetLoadingOverlayWaiting = false;\n }\n },\n };\n}\n"]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { FpsEditorLifecycleResourceDisposer, FpsEditorLifecycleCoordinator, FpsEditorLifecycleScopeType, FpsEditorLifecycleService } from '@fps-games/editor-core/lifecycle';
|
|
2
2
|
import type { FpsEditorEventPublisher } from '@fps-games/editor-core/events';
|
|
3
3
|
import type { FpsDiagnostic } from '@fps-games/plugin-api';
|
|
4
|
+
import type { AuthoringSourceDescriptor } from '@fps-games/editor-core';
|
|
4
5
|
export type PlayableLocalEditorLoadingOverlayPresentation = 'panel' | 'editor-shell';
|
|
5
6
|
export interface PlayableLocalEditorLoadingOverlayContent {
|
|
6
7
|
title: string;
|
|
@@ -50,6 +51,12 @@ export interface PlayableLocalEditorLifecycleHarness {
|
|
|
50
51
|
getUnsavedChangesState?(): PlayableLocalEditorUnsavedChangesState;
|
|
51
52
|
getSaveFailureState?(): PlayableLocalEditorSaveFailureState | null;
|
|
52
53
|
}
|
|
54
|
+
export interface PlayableLocalEditorPreparedAuthoringSource {
|
|
55
|
+
document: unknown;
|
|
56
|
+
source?: AuthoringSourceDescriptor;
|
|
57
|
+
serviceTransactionId?: string;
|
|
58
|
+
serviceDocumentRevision?: number;
|
|
59
|
+
}
|
|
53
60
|
export interface PlayableLocalEditorLifecycleOperations {
|
|
54
61
|
runGame(reason: 'save' | 'discard'): Promise<void>;
|
|
55
62
|
validateRun?(): Promise<boolean>;
|
|
@@ -58,7 +65,7 @@ export interface PlayableLocalEditorLifecycleOperations {
|
|
|
58
65
|
loadDocument?(): Promise<void>;
|
|
59
66
|
enterWorld?(): Promise<void>;
|
|
60
67
|
restoreDocument?(): Promise<void>;
|
|
61
|
-
markDocumentCommitted?(expectedDocumentFingerprint: string | null): Promise<void>;
|
|
68
|
+
markDocumentCommitted?(expectedDocumentFingerprint: string | null, expectedDocumentRevision: number | null, preparedAuthoringSource?: PlayableLocalEditorPreparedAuthoringSource): Promise<void>;
|
|
62
69
|
}
|
|
63
70
|
export interface PlayableLocalEditorLifecycleContent {
|
|
64
71
|
enter: PlayableLocalEditorLoadingOverlayContent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/local-harness/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kCAAkC,EAClC,6BAA6B,EAC7B,2BAA2B,EAC3B,yBAAyB,EAC1B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/local-harness/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kCAAkC,EAClC,6BAA6B,EAC7B,2BAA2B,EAC3B,yBAAyB,EAC1B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAExE,MAAM,MAAM,6CAA6C,GAAG,OAAO,GAAG,cAAc,CAAC;AAErF,MAAM,WAAW,wCAAwC;IACvD,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,6CAA6C,CA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,OAAO,CAAC,CAAC,CAAC,CAAC;CACxE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/local-harness/types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n FpsEditorLifecycleResourceDisposer,\n FpsEditorLifecycleCoordinator,\n FpsEditorLifecycleScopeType,\n FpsEditorLifecycleService,\n} from '@fps-games/editor-core/lifecycle';\nimport type { FpsEditorEventPublisher } from '@fps-games/editor-core/events';\nimport type { FpsDiagnostic } from '@fps-games/plugin-api';\n\nexport type PlayableLocalEditorLoadingOverlayPresentation = 'panel' | 'editor-shell';\n\nexport interface PlayableLocalEditorLoadingOverlayContent {\n title: string;\n description: string;\n presentation?: PlayableLocalEditorLoadingOverlayPresentation;\n}\n\nexport interface PlayableLocalEditorLoadingOverlayController {\n show(content: PlayableLocalEditorLoadingOverlayContent): void;\n hide(): void;\n isVisible(): boolean;\n isOwned?(): boolean;\n dispose(): void;\n}\n\nexport type PlayableLocalEditorDataSafetyOperation =\n | 'save-scene'\n | 'save-and-run-game'\n | 'discard-and-run-game'\n | 'forge-play-mode-change'\n | 'forge-play-document-export'\n | 'forge-play-document-commit';\n\nexport interface PlayableLocalEditorUnsavedChangesState {\n dirty: boolean;\n hasWorkingDocument: boolean;\n}\n\nexport interface PlayableLocalEditorSaveFailureState {\n status?: string;\n details?: string;\n error?: unknown;\n}\n\nexport interface PlayableLocalEditorSaveFailureInput extends PlayableLocalEditorSaveFailureState {\n operation: PlayableLocalEditorDataSafetyOperation;\n}\n\nexport interface PlayableLocalEditorDiscardConfirmationInput {\n operation: PlayableLocalEditorDataSafetyOperation;\n unsavedChanges: PlayableLocalEditorUnsavedChangesState;\n}\n\nexport interface PlayableLocalEditorInteractionPolicy {\n confirmDiscardUnsavedChanges?(\n input: PlayableLocalEditorDiscardConfirmationInput,\n ): boolean | Promise<boolean>;\n notifySaveFailed?(\n input: PlayableLocalEditorSaveFailureInput,\n ): void | Promise<void>;\n}\n\nexport type PlayableLocalEditorDocumentOperationExecutor = <TResult>(\n operation: () => Promise<TResult>,\n) => Promise<TResult>;\n\nexport interface PlayableLocalEditorSaveOptions {\n validationPhases?: readonly ('save' | 'run' | 'export')[];\n}\n\nexport interface PlayableLocalEditorLifecycleHarness {\n enterEditor(): Promise<void>;\n saveScene(\n executor?: PlayableLocalEditorDocumentOperationExecutor,\n options?: PlayableLocalEditorSaveOptions,\n ): Promise<boolean>;\n discardAndRunGame(executor?: PlayableLocalEditorDocumentOperationExecutor): Promise<void>;\n render(): void;\n notifyViewportRevealed?(reason?: string): void;\n getDocumentRevision?(): number;\n runExclusiveDocumentOperation<TResult>(\n operation: (executor: PlayableLocalEditorDocumentOperationExecutor) => Promise<TResult>,\n executor?: PlayableLocalEditorDocumentOperationExecutor,\n ): Promise<TResult>;\n getUnsavedChangesState?(): PlayableLocalEditorUnsavedChangesState;\n getSaveFailureState?(): PlayableLocalEditorSaveFailureState | null;\n}\n\nexport interface PlayableLocalEditorLifecycleOperations {\n runGame(reason: 'save' | 'discard'): Promise<void>;\n validateRun?(): Promise<boolean>;\n attachApplicationAuthority?(): void;\n attachSessionAuthority?(): void;\n loadDocument?(): Promise<void>;\n enterWorld?(): Promise<void>;\n restoreDocument?(): Promise<void>;\n markDocumentCommitted?(expectedDocumentFingerprint: string | null): Promise<void>;\n}\n\nexport interface PlayableLocalEditorLifecycleContent {\n enter: PlayableLocalEditorLoadingOverlayContent;\n saveAndRunGame: PlayableLocalEditorLoadingOverlayContent;\n discardAndRunGame: PlayableLocalEditorLoadingOverlayContent;\n assetImport: PlayableLocalEditorLoadingOverlayContent;\n}\n\nexport interface PlayableLocalEditorLifecycleControllerOptions {\n harness: PlayableLocalEditorLifecycleHarness;\n operations: PlayableLocalEditorLifecycleOperations;\n scopeHost?: PlayableLocalEditorLifecycleScopeHost;\n eventPublisher?: FpsEditorEventPublisher;\n reportDiagnostic?: (diagnostic: FpsDiagnostic) => void;\n loadingOverlay: Pick<PlayableLocalEditorLoadingOverlayController, 'show' | 'hide' | 'isVisible'> & {\n isOwned?: () => boolean;\n };\n content: PlayableLocalEditorLifecycleContent;\n interactions?: PlayableLocalEditorInteractionPolicy;\n waitForPaint?: () => Promise<void>;\n waitForMilliseconds?: (milliseconds: number) => Promise<void>;\n now?: () => number;\n minAssetLoadingOverlayMs?: number;\n viewportRevealReason?: string;\n /** Set false when harness.enterEditor already renders the initial editor frame. */\n renderAfterEnter?: boolean;\n initialMode?: 'play' | 'edit';\n}\n\nexport type PlayableLocalEditorPreparedRun =\n | { accepted: false }\n | { accepted: true; run(executor?: PlayableLocalEditorDocumentOperationExecutor): Promise<void> };\n\nexport interface PlayableLocalEditorLifecycleOperationContext {\n readonly traceId?: string;\n readonly transactionId?: string;\n readonly sourcePluginId?: string;\n}\n\nexport interface PlayableLocalEditorLifecycleScopeInput {\n readonly id: string;\n readonly scope: FpsEditorLifecycleScopeType;\n readonly parentId?: string;\n}\n\nexport interface PlayableLocalEditorLifecycleScopeHost {\n openScope(input: PlayableLocalEditorLifecycleScopeInput): Promise<void>;\n reserveScopeClose(scopeId: string): void;\n closeScope(scopeId: string): Promise<void>;\n}\n\nexport interface PlayableLocalEditorLifecycleController {\n readonly lifecycle: FpsEditorLifecycleService;\n registerParticipant: FpsEditorLifecycleCoordinator['registerParticipant'];\n enterEditor(context?: PlayableLocalEditorLifecycleOperationContext): Promise<void>;\n saveScene(\n operation?: PlayableLocalEditorDataSafetyOperation,\n context?: PlayableLocalEditorLifecycleOperationContext,\n executor?: PlayableLocalEditorDocumentOperationExecutor,\n ): Promise<boolean>;\n synchronizeDocumentState(dirty: boolean): Promise<void>;\n prepareDocumentSave(\n operation: () => Promise<void>,\n context?: PlayableLocalEditorLifecycleOperationContext,\n ): Promise<void>;\n commitDocumentSave(\n operation?: () => Promise<void>,\n context?: PlayableLocalEditorLifecycleOperationContext,\n ): Promise<void>;\n preflightRun(): Promise<boolean>;\n runCommittedDocument(context?: PlayableLocalEditorLifecycleOperationContext): Promise<boolean>;\n prepareSaveAndRunGame(\n context?: PlayableLocalEditorLifecycleOperationContext,\n executor?: PlayableLocalEditorDocumentOperationExecutor,\n ): Promise<PlayableLocalEditorPreparedRun>;\n prepareDiscardAndRunGame(\n context?: PlayableLocalEditorLifecycleOperationContext,\n executor?: PlayableLocalEditorDocumentOperationExecutor,\n ): Promise<PlayableLocalEditorPreparedRun>;\n saveAndRunGame(\n context?: PlayableLocalEditorLifecycleOperationContext,\n executor?: PlayableLocalEditorDocumentOperationExecutor,\n ): Promise<boolean>;\n discardAndRunGame(\n context?: PlayableLocalEditorLifecycleOperationContext,\n executor?: PlayableLocalEditorDocumentOperationExecutor,\n ): Promise<boolean>;\n openScope(input: PlayableLocalEditorLifecycleScopeInput): Promise<void>;\n addScopeResource(\n scopeId: string,\n disposer: FpsEditorLifecycleResourceDisposer,\n ): FpsEditorLifecycleResourceDisposer;\n closeScope(scopeId: string): Promise<void>;\n dispose(context?: PlayableLocalEditorLifecycleOperationContext): Promise<void>;\n runWithAssetLoadingOverlay<T>(operation: () => Promise<T>): Promise<T>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/local-harness/types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n FpsEditorLifecycleResourceDisposer,\n FpsEditorLifecycleCoordinator,\n FpsEditorLifecycleScopeType,\n FpsEditorLifecycleService,\n} from '@fps-games/editor-core/lifecycle';\nimport type { FpsEditorEventPublisher } from '@fps-games/editor-core/events';\nimport type { FpsDiagnostic } from '@fps-games/plugin-api';\nimport type { AuthoringSourceDescriptor } from '@fps-games/editor-core';\n\nexport type PlayableLocalEditorLoadingOverlayPresentation = 'panel' | 'editor-shell';\n\nexport interface PlayableLocalEditorLoadingOverlayContent {\n title: string;\n description: string;\n presentation?: PlayableLocalEditorLoadingOverlayPresentation;\n}\n\nexport interface PlayableLocalEditorLoadingOverlayController {\n show(content: PlayableLocalEditorLoadingOverlayContent): void;\n hide(): void;\n isVisible(): boolean;\n isOwned?(): boolean;\n dispose(): void;\n}\n\nexport type PlayableLocalEditorDataSafetyOperation =\n | 'save-scene'\n | 'save-and-run-game'\n | 'discard-and-run-game'\n | 'forge-play-mode-change'\n | 'forge-play-document-export'\n | 'forge-play-document-commit';\n\nexport interface PlayableLocalEditorUnsavedChangesState {\n dirty: boolean;\n hasWorkingDocument: boolean;\n}\n\nexport interface PlayableLocalEditorSaveFailureState {\n status?: string;\n details?: string;\n error?: unknown;\n}\n\nexport interface PlayableLocalEditorSaveFailureInput extends PlayableLocalEditorSaveFailureState {\n operation: PlayableLocalEditorDataSafetyOperation;\n}\n\nexport interface PlayableLocalEditorDiscardConfirmationInput {\n operation: PlayableLocalEditorDataSafetyOperation;\n unsavedChanges: PlayableLocalEditorUnsavedChangesState;\n}\n\nexport interface PlayableLocalEditorInteractionPolicy {\n confirmDiscardUnsavedChanges?(\n input: PlayableLocalEditorDiscardConfirmationInput,\n ): boolean | Promise<boolean>;\n notifySaveFailed?(\n input: PlayableLocalEditorSaveFailureInput,\n ): void | Promise<void>;\n}\n\nexport type PlayableLocalEditorDocumentOperationExecutor = <TResult>(\n operation: () => Promise<TResult>,\n) => Promise<TResult>;\n\nexport interface PlayableLocalEditorSaveOptions {\n validationPhases?: readonly ('save' | 'run' | 'export')[];\n}\n\nexport interface PlayableLocalEditorLifecycleHarness {\n enterEditor(): Promise<void>;\n saveScene(\n executor?: PlayableLocalEditorDocumentOperationExecutor,\n options?: PlayableLocalEditorSaveOptions,\n ): Promise<boolean>;\n discardAndRunGame(executor?: PlayableLocalEditorDocumentOperationExecutor): Promise<void>;\n render(): void;\n notifyViewportRevealed?(reason?: string): void;\n getDocumentRevision?(): number;\n runExclusiveDocumentOperation<TResult>(\n operation: (executor: PlayableLocalEditorDocumentOperationExecutor) => Promise<TResult>,\n executor?: PlayableLocalEditorDocumentOperationExecutor,\n ): Promise<TResult>;\n getUnsavedChangesState?(): PlayableLocalEditorUnsavedChangesState;\n getSaveFailureState?(): PlayableLocalEditorSaveFailureState | null;\n}\n\nexport interface PlayableLocalEditorPreparedAuthoringSource {\n document: unknown;\n source?: AuthoringSourceDescriptor;\n serviceTransactionId?: string;\n serviceDocumentRevision?: number;\n}\n\nexport interface PlayableLocalEditorLifecycleOperations {\n runGame(reason: 'save' | 'discard'): Promise<void>;\n validateRun?(): Promise<boolean>;\n attachApplicationAuthority?(): void;\n attachSessionAuthority?(): void;\n loadDocument?(): Promise<void>;\n enterWorld?(): Promise<void>;\n restoreDocument?(): Promise<void>;\n markDocumentCommitted?(\n expectedDocumentFingerprint: string | null,\n expectedDocumentRevision: number | null,\n preparedAuthoringSource?: PlayableLocalEditorPreparedAuthoringSource,\n ): Promise<void>;\n}\n\nexport interface PlayableLocalEditorLifecycleContent {\n enter: PlayableLocalEditorLoadingOverlayContent;\n saveAndRunGame: PlayableLocalEditorLoadingOverlayContent;\n discardAndRunGame: PlayableLocalEditorLoadingOverlayContent;\n assetImport: PlayableLocalEditorLoadingOverlayContent;\n}\n\nexport interface PlayableLocalEditorLifecycleControllerOptions {\n harness: PlayableLocalEditorLifecycleHarness;\n operations: PlayableLocalEditorLifecycleOperations;\n scopeHost?: PlayableLocalEditorLifecycleScopeHost;\n eventPublisher?: FpsEditorEventPublisher;\n reportDiagnostic?: (diagnostic: FpsDiagnostic) => void;\n loadingOverlay: Pick<PlayableLocalEditorLoadingOverlayController, 'show' | 'hide' | 'isVisible'> & {\n isOwned?: () => boolean;\n };\n content: PlayableLocalEditorLifecycleContent;\n interactions?: PlayableLocalEditorInteractionPolicy;\n waitForPaint?: () => Promise<void>;\n waitForMilliseconds?: (milliseconds: number) => Promise<void>;\n now?: () => number;\n minAssetLoadingOverlayMs?: number;\n viewportRevealReason?: string;\n /** Set false when harness.enterEditor already renders the initial editor frame. */\n renderAfterEnter?: boolean;\n initialMode?: 'play' | 'edit';\n}\n\nexport type PlayableLocalEditorPreparedRun =\n | { accepted: false }\n | { accepted: true; run(executor?: PlayableLocalEditorDocumentOperationExecutor): Promise<void> };\n\nexport interface PlayableLocalEditorLifecycleOperationContext {\n readonly traceId?: string;\n readonly transactionId?: string;\n readonly sourcePluginId?: string;\n}\n\nexport interface PlayableLocalEditorLifecycleScopeInput {\n readonly id: string;\n readonly scope: FpsEditorLifecycleScopeType;\n readonly parentId?: string;\n}\n\nexport interface PlayableLocalEditorLifecycleScopeHost {\n openScope(input: PlayableLocalEditorLifecycleScopeInput): Promise<void>;\n reserveScopeClose(scopeId: string): void;\n closeScope(scopeId: string): Promise<void>;\n}\n\nexport interface PlayableLocalEditorLifecycleController {\n readonly lifecycle: FpsEditorLifecycleService;\n registerParticipant: FpsEditorLifecycleCoordinator['registerParticipant'];\n enterEditor(context?: PlayableLocalEditorLifecycleOperationContext): Promise<void>;\n saveScene(\n operation?: PlayableLocalEditorDataSafetyOperation,\n context?: PlayableLocalEditorLifecycleOperationContext,\n executor?: PlayableLocalEditorDocumentOperationExecutor,\n ): Promise<boolean>;\n synchronizeDocumentState(dirty: boolean): Promise<void>;\n prepareDocumentSave(\n operation: () => Promise<void>,\n context?: PlayableLocalEditorLifecycleOperationContext,\n ): Promise<void>;\n commitDocumentSave(\n operation?: () => Promise<void>,\n context?: PlayableLocalEditorLifecycleOperationContext,\n ): Promise<void>;\n preflightRun(): Promise<boolean>;\n runCommittedDocument(context?: PlayableLocalEditorLifecycleOperationContext): Promise<boolean>;\n prepareSaveAndRunGame(\n context?: PlayableLocalEditorLifecycleOperationContext,\n executor?: PlayableLocalEditorDocumentOperationExecutor,\n ): Promise<PlayableLocalEditorPreparedRun>;\n prepareDiscardAndRunGame(\n context?: PlayableLocalEditorLifecycleOperationContext,\n executor?: PlayableLocalEditorDocumentOperationExecutor,\n ): Promise<PlayableLocalEditorPreparedRun>;\n saveAndRunGame(\n context?: PlayableLocalEditorLifecycleOperationContext,\n executor?: PlayableLocalEditorDocumentOperationExecutor,\n ): Promise<boolean>;\n discardAndRunGame(\n context?: PlayableLocalEditorLifecycleOperationContext,\n executor?: PlayableLocalEditorDocumentOperationExecutor,\n ): Promise<boolean>;\n openScope(input: PlayableLocalEditorLifecycleScopeInput): Promise<void>;\n addScopeResource(\n scopeId: string,\n disposer: FpsEditorLifecycleResourceDisposer,\n ): FpsEditorLifecycleResourceDisposer;\n closeScope(scopeId: string): Promise<void>;\n dispose(context?: PlayableLocalEditorLifecycleOperationContext): Promise<void>;\n runWithAssetLoadingOverlay<T>(operation: () => Promise<T>): Promise<T>;\n}\n"]}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { type InspectorProperty } from '@fps-games/editor-core';
|
|
7
7
|
import type { EditorSceneNodeKind } from '../document/index';
|
|
8
|
+
import { default as materialBindingInternals } from './binding';
|
|
8
9
|
import { type EditorSceneInspectorTextureAsset, type EditorSceneMaterialAsset, type EditorSceneMaterialDocument, type EditorSceneMaterialInspectorContext } from './types';
|
|
9
10
|
import { type ArtistMaterialInspectorText } from './text';
|
|
10
11
|
type EditorSceneDocument = EditorSceneMaterialDocument;
|
|
@@ -24,5 +25,24 @@ export declare function readArtistMaterialTexturePickerValue(texture: {
|
|
|
24
25
|
textureAssetId?: string | null;
|
|
25
26
|
url?: string | null;
|
|
26
27
|
} | null | undefined): string;
|
|
27
|
-
|
|
28
|
+
type MaterialUsageIndex = ReturnType<typeof materialBindingInternals.createUsageIndex>;
|
|
29
|
+
type MaterialAssetSelectorInspectorPropertyInput = {
|
|
30
|
+
path: string;
|
|
31
|
+
label: string;
|
|
32
|
+
value: string;
|
|
33
|
+
order: number;
|
|
34
|
+
text: ArtistMaterialInspectorText;
|
|
35
|
+
currentAsset?: EditorSceneMaterialAsset | null;
|
|
36
|
+
};
|
|
37
|
+
declare function createMaterialAssetSelectorInspectorPropertyWithUsage(document: EditorSceneDocument, nodeKind: EditorSceneNodeKind, input: MaterialAssetSelectorInspectorPropertyInput, usageIndex: MaterialUsageIndex): InspectorProperty<EditorSceneDocument>;
|
|
38
|
+
declare function createMaterialAssetSelectorInspectorPropertyWithCachedUsage(document: EditorSceneDocument, nodeKind: EditorSceneNodeKind, input: MaterialAssetSelectorInspectorPropertyInput): InspectorProperty<EditorSceneDocument>;
|
|
39
|
+
declare function createMaterialAssetPickerControlOptionsWithUsage(document: EditorSceneDocument, currentAsset: EditorSceneMaterialAsset | null, text: ArtistMaterialInspectorText, currentValue: string, usageIndex: MaterialUsageIndex): Record<string, unknown>;
|
|
40
|
+
declare function createMaterialAssetPickerControlOptionsWithCachedUsage(document: EditorSceneDocument, currentAsset: EditorSceneMaterialAsset | null, text: ArtistMaterialInspectorText, currentValue: string): Record<string, unknown>;
|
|
41
|
+
declare const materialAssetFieldInternals: {
|
|
42
|
+
createSelectorInspectorPropertyWithUsage: typeof createMaterialAssetSelectorInspectorPropertyWithUsage;
|
|
43
|
+
createSelectorInspectorPropertyWithCachedUsage: typeof createMaterialAssetSelectorInspectorPropertyWithCachedUsage;
|
|
44
|
+
createPickerControlOptionsWithUsage: typeof createMaterialAssetPickerControlOptionsWithUsage;
|
|
45
|
+
createPickerControlOptionsWithCachedUsage: typeof createMaterialAssetPickerControlOptionsWithCachedUsage;
|
|
46
|
+
};
|
|
47
|
+
export default materialAssetFieldInternals;
|
|
28
48
|
//# sourceMappingURL=asset-fields.d.ts.map
|
package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/asset-fields.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asset-fields.d.ts","sourceRoot":"","sources":["../../src/material-binding/asset-fields.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EACL,KAAK,iBAAiB,EACvB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EACV,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"asset-fields.d.ts","sourceRoot":"","sources":["../../src/material-binding/asset-fields.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EACL,KAAK,iBAAiB,EACvB,MAAM,wBAAwB,CAAC;AA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