@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor-session.js","sourceRoot":"","sources":["../src/editor-session.ts"],"names":[],"mappings":"AA8MA,SAAS,oBAAoB,CAAY,QAAmB;IAC1D,MAAM,iBAAiB,GAAI,UAAkC,CAAC,eAAe,CAAC;IAC9E,IAAI,OAAO,iBAAiB,KAAK,UAAU;QAAE,OAAO,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IAChF,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAc,CAAC;AAC3D,CAAC;AAED,SAAS,uBAAuB,CAAY,IAAe,EAAE,KAAgB;IAC3E,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AACxD,CAAC;AAED,S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AM,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,SAAS;QAC1E,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS;KAC/D,CAAC;AACJ,CAAC;AAED,SAAS,iBAAiB,CACxB,OAAyC;IAEzC,OAAO,OAAO,CAAC,IAAI,KAAK,gBAAgB,IAAI,OAAO,CAAC,IAAI,KAAK,kBAAkB,CAAC;AAClF,CAAC;AAED,SAAS,kBAAkB,CACzB,OAAyC;IAEzC,OAAO,OAAO,CAAC,IAAI,KAAK,mBAAmB;WACtC,OAAO,CAAC,IAAI,KAAK,eAAe;WAChC,OAAO,CAAC,IAAI,KAAK,kBAAkB;WACnC,OAAO,CAAC,IAAI,KAAK,kBAAkB;WACnC,OAAO,CAAC,IAAI,KAAK,iBAAiB,CAAC;AAC1C,CAAC;AAQD,MAAM,UAAU,mBAAmB,CACjC,OAAgD;IAEhD,OAAO,IAAI,aAAa,CAAC,OAAO,CAAC,CAAC;AACpC,CAAC","sourcesContent":["import type { AuthoringSourceDescriptor } from './authoring-source';\n\nexport interface EditorSelectionState {\n selectedIds: string[];\n activeId: string | null;\n}\n\nexport interface EditorCommandBase {\n type: string;\n label?: string;\n projectionImpact?: EditorProjectionImpact;\n}\n\nexport interface DocumentPatchCommand<TPatch = unknown> extends EditorCommandBase {\n type: 'document.patch';\n patch: TPatch;\n targetId?: string;\n propertyPath?: string;\n}\n\nexport interface DocumentReplaceCommand<TDocument> extends EditorCommandBase {\n type: 'document.replace';\n document: TDocument;\n}\n\nexport type DocumentCommand<TDocument = unknown, TPatch = unknown> =\n | DocumentPatchCommand<TPatch>\n | DocumentReplaceCommand<TDocument>;\n\nexport interface SelectionReplaceCommand extends EditorCommandBase {\n type: 'selection.replace';\n selectedIds: string[];\n activeId?: string | null;\n}\n\nexport interface SelectionAddCommand extends EditorCommandBase {\n type: 'selection.add';\n selectedIds: string[];\n activeId?: string | null;\n}\n\nexport interface SelectionRemoveCommand extends EditorCommandBase {\n type: 'selection.remove';\n selectedIds: string[];\n}\n\nexport interface SelectionToggleCommand extends EditorCommandBase {\n type: 'selection.toggle';\n selectedIds: string[];\n activeId?: string | null;\n}\n\nexport interface SelectionClearCommand extends EditorCommandBase {\n type: 'selection.clear';\n}\n\nexport type SelectionCommand =\n | SelectionReplaceCommand\n | SelectionAddCommand\n | SelectionRemoveCommand\n | SelectionToggleCommand\n | SelectionClearCommand;\n\nexport type EditorCommand<TDocument = unknown, TPatch = unknown> =\n | DocumentCommand<TDocument, TPatch>\n | SelectionCommand;\n\nexport interface EditorSessionState<TDocument> {\n persistedDocument: TDocument;\n workingDocument: TDocument;\n /** Monotonic identity for the current working document, including undo/redo replacements. */\n documentRevision: number;\n /**\n * Monotonic revision for document changes that can affect a derived structural view.\n * Consumers provide the command classifier; selection and structure-preserving edits\n * do not advance this revision.\n */\n documentStructureRevision: number;\n source?: AuthoringSourceDescriptor;\n selection: EditorSelectionState;\n dirty: boolean;\n canUndo: boolean;\n canRedo: boolean;\n history: EditorSessionHistoryView;\n}\n\nexport interface EditorSessionChange {\n readonly reason: 'selection' | 'document' | 'history' | 'saved' | 'reset' | 'rebase';\n readonly dirty: boolean;\n readonly documentChanged: boolean;\n readonly selectionChanged: boolean;\n readonly historyChanged: boolean;\n readonly documentRevision: number;\n}\n\nexport interface EditorSessionExternalRebaseInput<TDocument> {\n persistedDocument: TDocument;\n workingDocument: TDocument;\n}\n\nexport interface EditorSessionDispatchResult<TDocument> {\n command: EditorCommand;\n workingDocument: TDocument;\n selection: EditorSelectionState;\n dirty: boolean;\n documentChanged: boolean;\n selectionChanged: boolean;\n transaction?: UndoTransaction<TDocument>;\n}\n\nexport interface EditorSessionDispatchOptions {\n mergeWithPrevious?: boolean;\n assumeDocumentChanged?: boolean;\n assumeDirty?: boolean;\n clonePatchInput?: boolean;\n cloneResultDocument?: boolean;\n}\n\nexport interface EditorSessionStateOptions {\n /**\n * Defaults to true to preserve the historical snapshot semantics.\n * Performance-sensitive editor UI code can pass false when it treats\n * documents as read-only during render.\n */\n cloneDocuments?: boolean;\n}\n\nexport interface EditorSessionMarkSavedOptions {\n /** Establishes a new history boundary at the saved document. */\n resetHistory?: boolean;\n}\n\nexport interface EditorSessionOptions<TDocument, TPatch = unknown> {\n source?: AuthoringSourceDescriptor;\n persistedDocument: TDocument;\n workingDocument?: TDocument;\n selection?: Partial<EditorSelectionState>;\n onChange?(change: EditorSessionChange): void;\n onChangeError?(error: unknown): void;\n cloneDocument?: (document: TDocument) => TDocument;\n compareDocuments?: (left: TDocument, right: TDocument) => boolean;\n reduceDocument?: (\n document: TDocument,\n command: DocumentCommand<TDocument, TPatch>,\n ) => TDocument;\n isDocumentStructureChange?(command: DocumentCommand<TDocument, TPatch>): boolean;\n}\n\nexport interface EditorSessionForkOptions {\n selection?: Partial<EditorSelectionState>;\n onChange?(change: EditorSessionChange): void;\n onChangeError?(error: unknown): void;\n}\n\nexport interface UndoTransaction<TDocument> {\n id: string;\n label: string;\n commandType: string;\n beforeDocument: TDocument;\n afterDocument: TDocument;\n projectionImpact?: EditorProjectionImpact;\n structureChanged: boolean;\n createdAt: number;\n}\n\nexport type EditorProjectionImpact =\n | EditorProjectionIncrementalImpact\n | EditorProjectionRebuildImpact;\n\nexport interface EditorProjectionIncrementalImpact {\n type: 'incremental';\n syncTransformIds?: string[];\n syncMetadataIds?: string[];\n reprojectIds?: string[];\n createdNodeIds?: string[];\n deletedNodeIds?: string[];\n}\n\nexport interface EditorProjectionRebuildImpact {\n type: 'rebuild';\n reason?: string;\n}\n\nexport interface EditorSessionHistoryEntry {\n id: string;\n label: string;\n commandType: string;\n createdAt: number;\n}\n\nexport interface EditorSessionHistoryView {\n entries: EditorSessionHistoryEntry[];\n}\n\nexport interface EditorSessionHistoryResult<TDocument> {\n transaction: UndoTransaction<TDocument>;\n workingDocument: TDocument;\n selection: EditorSelectionState;\n dirty: boolean;\n documentChanged: true;\n}\n\ntype StructuredCloneHost = typeof globalThis & {\n structuredClone?: <T>(value: T) => T;\n};\n\nfunction defaultCloneDocument<TDocument>(document: TDocument): TDocument {\n const structuredCloneFn = (globalThis as StructuredCloneHost).structuredClone;\n if (typeof structuredCloneFn === 'function') return structuredCloneFn(document);\n return JSON.parse(JSON.stringify(document)) as TDocument;\n}\n\nfunction defaultCompareDocuments<TDocument>(left: TDocument, right: TDocument): boolean {\n return JSON.stringify(left) === JSON.stringify(right);\n}\n\nfunction normalizeSelection(selection?: Partial<EditorSelectionState>): EditorSelectionState {\n const selectedIds = uniqueIds(selection?.selectedIds ?? []);\n const activeId = selection?.activeId && selectedIds.includes(selection.activeId)\n ? selection.activeId\n : selectedIds[selectedIds.length - 1] ?? null;\n return {\n selectedIds,\n activeId,\n };\n}\n\nfunction uniqueIds(ids: readonly string[]): string[] {\n const result: string[] = [];\n const seen = new Set<string>();\n for (const id of ids) {\n if (!id || seen.has(id)) continue;\n seen.add(id);\n result.push(id);\n }\n return result;\n}\n\nfunction selectionEquals(left: EditorSelectionState, right: EditorSelectionState): boolean {\n if (left.activeId !== right.activeId) return false;\n if (left.selectedIds.length !== right.selectedIds.length) return false;\n return left.selectedIds.every((id, index) => right.selectedIds[index] === id);\n}\n\nfunction applySelectionCommand(\n selection: EditorSelectionState,\n command: SelectionCommand,\n): EditorSelectionState {\n if (command.type === 'selection.clear') return normalizeSelection();\n\n if (command.type === 'selection.replace') {\n return normalizeSelection({\n selectedIds: command.selectedIds,\n activeId: command.activeId,\n });\n }\n\n if (command.type === 'selection.add') {\n const selectedIds = uniqueIds([...selection.selectedIds, ...command.selectedIds]);\n return normalizeSelection({\n selectedIds,\n activeId: command.activeId ?? command.selectedIds[command.selectedIds.length - 1] ?? selection.activeId,\n });\n }\n\n if (command.type === 'selection.remove') {\n const removeIds = new Set(command.selectedIds);\n const selectedIds = selection.selectedIds.filter(id => !removeIds.has(id));\n return normalizeSelection({\n selectedIds,\n activeId: selection.activeId && selectedIds.includes(selection.activeId)\n ? selection.activeId\n : selectedIds[selectedIds.length - 1] ?? null,\n });\n }\n\n const selectedIds = [...selection.selectedIds];\n let activeId = selection.activeId;\n for (const id of command.selectedIds) {\n const index = selectedIds.indexOf(id);\n if (index >= 0) {\n selectedIds.splice(index, 1);\n if (activeId === id) activeId = selectedIds[selectedIds.length - 1] ?? null;\n } else if (id) {\n selectedIds.push(id);\n activeId = id;\n }\n }\n return normalizeSelection({\n selectedIds,\n activeId: command.activeId ?? activeId,\n });\n}\n\nexport class EditorSession<TDocument, TPatch = unknown> {\n private source?: AuthoringSourceDescriptor;\n private persistedDocument: TDocument;\n private workingDocument: TDocument;\n private selection: EditorSelectionState;\n private dirty: boolean;\n private readonly onChange?: (change: EditorSessionChange) => void;\n private readonly onChangeError?: (error: unknown) => void;\n private readonly cloneDocument: (document: TDocument) => TDocument;\n private readonly compareDocuments: (left: TDocument, right: TDocument) => boolean;\n private readonly reduceDocument?: (\n document: TDocument,\n command: DocumentCommand<TDocument, TPatch>,\n ) => TDocument;\n private readonly isDocumentStructureChange: (\n command: DocumentCommand<TDocument, TPatch>,\n ) => boolean;\n private undoStack: UndoTransaction<TDocument>[] = [];\n private redoStack: UndoTransaction<TDocument>[] = [];\n private nextTransactionId = 1;\n private documentRevision = 0;\n private documentStructureRevision = 0;\n\n constructor(options: EditorSessionOptions<TDocument, TPatch>) {\n this.cloneDocument = options.cloneDocument ?? defaultCloneDocument;\n this.compareDocuments = options.compareDocuments ?? defaultCompareDocuments;\n this.reduceDocument = options.reduceDocument;\n this.isDocumentStructureChange = options.isDocumentStructureChange ?? (() => true);\n this.source = cloneAuthoringSourceDescriptorOptional(options.source);\n this.persistedDocument = this.cloneDocument(options.persistedDocument);\n this.workingDocument = this.cloneDocument(options.workingDocument ?? options.persistedDocument);\n this.selection = normalizeSelection(options.selection);\n this.onChange = options.onChange;\n this.onChangeError = options.onChangeError;\n this.dirty = !this.compareDocuments(this.workingDocument, this.persistedDocument);\n }\n\n getState(options: EditorSessionStateOptions = {}): EditorSessionState<TDocument> {\n const cloneDocuments = options.cloneDocuments !== false;\n return {\n persistedDocument: cloneDocuments ? this.cloneDocument(this.persistedDocument) : this.persistedDocument,\n workingDocument: cloneDocuments ? this.cloneDocument(this.workingDocument) : this.workingDocument,\n documentRevision: this.documentRevision,\n documentStructureRevision: this.documentStructureRevision,\n source: cloneAuthoringSourceDescriptorOptional(this.source),\n selection: this.getSelection(),\n dirty: this.dirty,\n canUndo: this.canUndo(),\n canRedo: this.canRedo(),\n history: this.getHistoryView(),\n };\n }\n\n getWorkingDocument(): TDocument {\n return this.cloneDocument(this.workingDocument);\n }\n\n getSource(): AuthoringSourceDescriptor | undefined {\n return cloneAuthoringSourceDescriptorOptional(this.source);\n }\n\n getSelection(): EditorSelectionState {\n return {\n selectedIds: [...this.selection.selectedIds],\n activeId: this.selection.activeId,\n };\n }\n\n isDirty(): boolean {\n return this.dirty;\n }\n\n fork(options: EditorSessionForkOptions = {}): EditorSession<TDocument, TPatch> {\n return new EditorSession<TDocument, TPatch>({\n source: this.source,\n persistedDocument: this.workingDocument,\n selection: options.selection,\n onChange: options.onChange,\n onChangeError: options.onChangeError,\n cloneDocument: this.cloneDocument,\n compareDocuments: this.compareDocuments,\n reduceDocument: this.reduceDocument,\n isDocumentStructureChange: this.isDocumentStructureChange,\n });\n }\n\n canUndo(): boolean {\n return this.undoStack.length > 0;\n }\n\n canRedo(): boolean {\n return this.redoStack.length > 0;\n }\n\n dispatch(\n command: EditorCommand<TDocument, TPatch>,\n options: EditorSessionDispatchOptions = {},\n ): EditorSessionDispatchResult<TDocument> {\n const beforeSelection = this.selection;\n if (isSelectionCommand(command)) {\n this.selection = applySelectionCommand(this.selection, command);\n const selectionChanged = !selectionEquals(beforeSelection, this.selection);\n this.emitChange('selection', false, selectionChanged, false);\n return {\n command,\n workingDocument: this.workingDocument,\n selection: this.getSelection(),\n dirty: this.dirty,\n documentChanged: false,\n selectionChanged,\n };\n }\n\n const structureChanged = this.isDocumentStructureChange(command);\n const useFastDocumentPatch = command.type === 'document.patch' && options.assumeDocumentChanged === true;\n const beforeDocument = useFastDocumentPatch ? this.workingDocument : this.cloneDocument(this.workingDocument);\n if (command.type === 'document.replace') {\n this.workingDocument = this.cloneDocument(command.document);\n } else if (command.type === 'document.patch') {\n if (!this.reduceDocument) {\n throw new Error('EditorSession requires reduceDocument to handle document.patch commands.');\n }\n this.workingDocument = this.reduceDocument(\n options.clonePatchInput === false ? this.workingDocument : this.cloneDocument(this.workingDocument),\n command,\n );\n }\n const documentChanged = options.assumeDocumentChanged === true\n ? true\n : !this.compareDocuments(beforeDocument, this.workingDocument);\n const selectionChanged = !selectionEquals(beforeSelection, this.selection);\n if (documentChanged) {\n this.documentRevision += 1;\n if (structureChanged) this.documentStructureRevision += 1;\n this.dirty = options.assumeDirty === true\n ? true\n : !this.compareDocuments(this.workingDocument, this.persistedDocument);\n }\n const transaction = documentChanged && isDocumentCommand(command)\n ? this.pushTransaction(command, beforeDocument, this.workingDocument, options, structureChanged)\n : undefined;\n this.emitChange('document', documentChanged, selectionChanged, !!transaction);\n return {\n command,\n workingDocument: options.cloneResultDocument === false\n ? this.workingDocument\n : this.cloneDocument(this.workingDocument),\n selection: this.getSelection(),\n dirty: this.isDirty(),\n documentChanged,\n selectionChanged,\n transaction,\n };\n }\n\n undo(): EditorSessionHistoryResult<TDocument> | null {\n const transaction = this.undoStack.pop();\n if (!transaction) return null;\n this.redoStack.push(transaction);\n this.workingDocument = this.cloneDocument(transaction.beforeDocument);\n this.documentRevision += 1;\n if (transaction.structureChanged) this.documentStructureRevision += 1;\n this.dirty = !this.compareDocuments(this.workingDocument, this.persistedDocument);\n this.emitChange('history', true, false, true);\n return {\n transaction,\n workingDocument: this.cloneDocument(this.workingDocument),\n selection: this.getSelection(),\n dirty: this.isDirty(),\n documentChanged: true,\n };\n }\n\n redo(): EditorSessionHistoryResult<TDocument> | null {\n const transaction = this.redoStack.pop();\n if (!transaction) return null;\n this.undoStack.push(transaction);\n this.workingDocument = this.cloneDocument(transaction.afterDocument);\n this.documentRevision += 1;\n if (transaction.structureChanged) this.documentStructureRevision += 1;\n this.dirty = !this.compareDocuments(this.workingDocument, this.persistedDocument);\n this.emitChange('history', true, false, true);\n return {\n transaction,\n workingDocument: this.cloneDocument(this.workingDocument),\n selection: this.getSelection(),\n dirty: this.isDirty(),\n documentChanged: true,\n };\n }\n\n markSaved(\n document: TDocument,\n source?: AuthoringSourceDescriptor,\n options: EditorSessionMarkSavedOptions = {},\n ): EditorSessionState<TDocument> {\n if (source) this.source = cloneAuthoringSourceDescriptorOptional(source);\n const structureChanged = !this.compareDocuments(this.workingDocument, document);\n this.persistedDocument = this.cloneDocument(document);\n this.workingDocument = this.cloneDocument(document);\n if (options.resetHistory) {\n this.undoStack = [];\n this.redoStack = [];\n }\n this.documentRevision += 1;\n if (structureChanged) this.documentStructureRevision += 1;\n this.dirty = false;\n this.emitChange('saved', true, false, options.resetHistory === true);\n return this.getState();\n }\n\n reset(document: TDocument, source?: AuthoringSourceDescriptor): EditorSessionState<TDocument> {\n this.source = cloneAuthoringSourceDescriptorOptional(source);\n this.persistedDocument = this.cloneDocument(document);\n this.workingDocument = this.cloneDocument(document);\n this.documentRevision += 1;\n this.documentStructureRevision += 1;\n this.selection = normalizeSelection();\n this.dirty = false;\n this.undoStack = [];\n this.redoStack = [];\n this.emitChange('reset', true, true, true);\n return this.getState();\n }\n\n rebaseExternalDocuments(\n input: EditorSessionExternalRebaseInput<TDocument>,\n ): EditorSessionState<TDocument> {\n const nextPersistedDocument = this.cloneDocument(input.persistedDocument);\n const nextWorkingDocument = this.cloneDocument(input.workingDocument);\n const nextDirty = !this.compareDocuments(nextWorkingDocument, nextPersistedDocument);\n const structureChanged = !this.compareDocuments(this.workingDocument, nextWorkingDocument);\n const persistedDocumentForResult = this.cloneDocument(nextPersistedDocument);\n const workingDocumentForResult = this.cloneDocument(nextWorkingDocument);\n const sourceForResult = cloneAuthoringSourceDescriptorOptional(this.source);\n const selectionForResult = this.getSelection();\n const revision = this.documentRevision + 1;\n\n this.persistedDocument = nextPersistedDocument;\n this.workingDocument = nextWorkingDocument;\n this.documentRevision = revision;\n if (structureChanged) this.documentStructureRevision += 1;\n this.dirty = nextDirty;\n this.undoStack = [];\n this.redoStack = [];\n this.emitChange('rebase', true, false, true);\n return {\n persistedDocument: persistedDocumentForResult,\n workingDocument: workingDocumentForResult,\n documentRevision: revision,\n documentStructureRevision: this.documentStructureRevision,\n source: sourceForResult,\n selection: selectionForResult,\n dirty: nextDirty,\n canUndo: false,\n canRedo: false,\n history: { entries: [] },\n };\n }\n\n private emitChange(\n reason: EditorSessionChange['reason'],\n documentChanged: boolean,\n selectionChanged: boolean,\n historyChanged: boolean,\n ): void {\n try {\n this.onChange?.(Object.freeze({\n reason,\n dirty: this.dirty,\n documentChanged,\n selectionChanged,\n historyChanged,\n documentRevision: this.documentRevision,\n }));\n } catch (error) {\n try { this.onChangeError?.(error); }\n catch { /* Session observers cannot change an already-applied command. */ }\n }\n }\n\n private pushTransaction(\n command: DocumentCommand<TDocument, TPatch>,\n beforeDocument: TDocument,\n afterDocument: TDocument,\n options: EditorSessionDispatchOptions,\n structureChanged: boolean,\n ): UndoTransaction<TDocument> {\n const previous = options.mergeWithPrevious ? this.undoStack[this.undoStack.length - 1] : undefined;\n if (previous) {\n previous.afterDocument = this.cloneDocument(afterDocument);\n previous.projectionImpact = mergeProjectionImpact(previous.projectionImpact, command.projectionImpact);\n previous.structureChanged ||= structureChanged;\n this.redoStack = [];\n return {\n ...previous,\n beforeDocument: this.cloneDocument(previous.beforeDocument),\n afterDocument: this.cloneDocument(previous.afterDocument),\n projectionImpact: cloneProjectionImpact(previous.projectionImpact),\n };\n }\n const transaction: UndoTransaction<TDocument> = {\n id: `transaction_${this.nextTransactionId++}`,\n label: command.label ?? command.type,\n commandType: command.type,\n beforeDocument: this.cloneDocument(beforeDocument),\n afterDocument: this.cloneDocument(afterDocument),\n ...(command.projectionImpact ? { projectionImpact: cloneProjectionImpact(command.projectionImpact) } : {}),\n structureChanged,\n createdAt: Date.now(),\n };\n this.undoStack.push(transaction);\n this.redoStack = [];\n return transaction;\n }\n\n private getHistoryView(): EditorSessionHistoryView {\n return {\n entries: [...this.undoStack, ...this.redoStack]\n .map(toHistoryEntry)\n .sort((left, right) => right.createdAt - left.createdAt),\n };\n }\n}\n\nfunction cloneProjectionImpact(\n impact: EditorProjectionImpact | undefined,\n): EditorProjectionImpact | undefined {\n if (!impact) return undefined;\n if (impact.type === 'rebuild') {\n return {\n type: 'rebuild',\n ...(impact.reason ? { reason: impact.reason } : {}),\n };\n }\n return {\n type: 'incremental',\n ...(impact.syncTransformIds ? { syncTransformIds: [...impact.syncTransformIds] } : {}),\n ...(impact.syncMetadataIds ? { syncMetadataIds: [...impact.syncMetadataIds] } : {}),\n ...(impact.reprojectIds ? { reprojectIds: [...impact.reprojectIds] } : {}),\n ...(impact.createdNodeIds ? { createdNodeIds: [...impact.createdNodeIds] } : {}),\n ...(impact.deletedNodeIds ? { deletedNodeIds: [...impact.deletedNodeIds] } : {}),\n };\n}\n\nfunction mergeProjectionImpact(\n previous: EditorProjectionImpact | undefined,\n next: EditorProjectionImpact | undefined,\n): EditorProjectionImpact | undefined {\n if (!previous || !next) return undefined;\n if (previous.type === 'rebuild' || next.type === 'rebuild') {\n const reason = previous.type === 'rebuild'\n ? previous.reason\n : next.type === 'rebuild'\n ? next.reason\n : undefined;\n return {\n type: 'rebuild',\n ...(reason ? { reason } : {}),\n };\n }\n return {\n type: 'incremental',\n syncTransformIds: uniqueIds([\n ...(previous.syncTransformIds ?? []),\n ...(next.syncTransformIds ?? []),\n ]),\n syncMetadataIds: uniqueIds([\n ...(previous.syncMetadataIds ?? []),\n ...(next.syncMetadataIds ?? []),\n ]),\n reprojectIds: uniqueIds([\n ...(previous.reprojectIds ?? []),\n ...(next.reprojectIds ?? []),\n ]),\n createdNodeIds: uniqueIds([\n ...(previous.createdNodeIds ?? []),\n ...(next.createdNodeIds ?? []),\n ]),\n deletedNodeIds: uniqueIds([\n ...(previous.deletedNodeIds ?? []),\n ...(next.deletedNodeIds ?? []),\n ]),\n };\n}\n\nfunction toHistoryEntry<TDocument>(\n transaction: UndoTransaction<TDocument>,\n): EditorSessionHistoryEntry {\n return {\n id: transaction.id,\n label: transaction.label,\n commandType: transaction.commandType,\n createdAt: transaction.createdAt,\n };\n}\n\nfunction cloneAuthoringSourceDescriptorOptional(\n source: AuthoringSourceDescriptor | undefined,\n): AuthoringSourceDescriptor | undefined {\n if (!source) return undefined;\n return {\n ...source,\n ref: { ...source.ref },\n capabilities: source.capabilities ? { ...source.capabilities } : undefined,\n metadata: source.metadata ? { ...source.metadata } : undefined,\n };\n}\n\nfunction isDocumentCommand<TDocument, TPatch>(\n command: EditorCommand<TDocument, TPatch>,\n): command is DocumentCommand<TDocument, TPatch> {\n return command.type === 'document.patch' || command.type === 'document.replace';\n}\n\nfunction isSelectionCommand<TDocument, TPatch>(\n command: EditorCommand<TDocument, TPatch>,\n): command is SelectionCommand {\n return command.type === 'selection.replace'\n || command.type === 'selection.add'\n || command.type === 'selection.remove'\n || command.type === 'selection.toggle'\n || command.type === 'selection.clear';\n}\n\nexport function createEditorSession<TDocument>(\n options: EditorSessionOptions<TDocument>,\n): EditorSession<TDocument>;\nexport function createEditorSession<TDocument, TPatch>(\n options: EditorSessionOptions<TDocument, TPatch>,\n): EditorSession<TDocument, TPatch>;\nexport function createEditorSession<TDocument, TPatch = unknown>(\n options: EditorSessionOptions<TDocument, TPatch>,\n): EditorSession<TDocument, TPatch> {\n return new EditorSession(options);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"editor-session.js","sourceRoot":"","sources":["../src/editor-session.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iCAAiC,EACjC,qCAAqC,EACrC,8BAA8B,GAC/B,MAAM,+BAA+B,CAAC;AAiPvC,SAAS,oBAAoB,CAAY,QAAmB;IAC1D,MAAM,iBAAiB,GAAI,UAAkC,CAAC,eAAe,CAAC;IAC9E,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QACL,GAAG,MAAM;QACT,GAAG,EAAE,EAAE,GAAG,MAAM,CAAC,GAAG,EAAE;QACtB,YAAY,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,SAAS;QAC1E,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS;KACzE,CAAC;AACJ,CAAC;AAED,SAAS,iBAAiB,CACxB,OAAyC;IAEzC,OAAO,OAAO,CAAC,IAAI,KAAK,gBAAgB,IAAI,OAAO,CAAC,IAAI,KAAK,kBAAkB,CAAC;AAClF,CAAC;AAED,SAAS,kBAAkB,CACzB,OAAyC;IAEzC,OAAO,OAAO,CAAC,IAAI,KAAK,mBAAmB;WACtC,OAAO,CAAC,IAAI,KAAK,eAAe;WAChC,OAAO,CAAC,IAAI,KAAK,kBAAkB;WACnC,OAAO,CAAC,IAAI,KAAK,kBAAkB;WACnC,OAAO,CAAC,IAAI,KAAK,iBAAiB,CAAC;AAC1C,CAAC;AAQD,MAAM,UAAU,mBAAmB,CACjC,OAAgD;IAEhD,OAAO,IAAI,aAAa,CAAC,OAAO,CAAC,CAAC;AACpC,CAAC","sourcesContent":["import type { AuthoringSourceDescriptor } from './authoring-source';\nimport {\n assertEditorSessionWriteAuthority,\n canExposeSharedEditorSessionDocuments,\n registerCanonicalEditorSession,\n} from './editor-session-authority.js';\n\nexport interface EditorSelectionState {\n selectedIds: string[];\n activeId: string | null;\n}\n\nexport interface EditorCommandBase {\n type: string;\n label?: string;\n projectionImpact?: EditorProjectionImpact;\n /** Bounded UI invalidation metadata; unknown commands intentionally omit it. */\n presentationImpact?: EditorPresentationImpact;\n}\n\nexport interface DocumentPatchCommand<TPatch = unknown> extends EditorCommandBase {\n type: 'document.patch';\n patch: TPatch;\n targetId?: string;\n propertyPath?: string;\n}\n\nexport interface DocumentReplaceCommand<TDocument> extends EditorCommandBase {\n type: 'document.replace';\n document: TDocument;\n}\n\nexport type DocumentCommand<TDocument = unknown, TPatch = unknown> =\n | DocumentPatchCommand<TPatch>\n | DocumentReplaceCommand<TDocument>;\n\nexport interface SelectionReplaceCommand extends EditorCommandBase {\n type: 'selection.replace';\n selectedIds: string[];\n activeId?: string | null;\n}\n\nexport interface SelectionAddCommand extends EditorCommandBase {\n type: 'selection.add';\n selectedIds: string[];\n activeId?: string | null;\n}\n\nexport interface SelectionRemoveCommand extends EditorCommandBase {\n type: 'selection.remove';\n selectedIds: string[];\n}\n\nexport interface SelectionToggleCommand extends EditorCommandBase {\n type: 'selection.toggle';\n selectedIds: string[];\n activeId?: string | null;\n}\n\nexport interface SelectionClearCommand extends EditorCommandBase {\n type: 'selection.clear';\n}\n\nexport type SelectionCommand =\n | SelectionReplaceCommand\n | SelectionAddCommand\n | SelectionRemoveCommand\n | SelectionToggleCommand\n | SelectionClearCommand;\n\nexport type EditorCommand<TDocument = unknown, TPatch = unknown> =\n | DocumentCommand<TDocument, TPatch>\n | SelectionCommand;\n\nexport interface EditorSessionState<TDocument> {\n persistedDocument: TDocument;\n workingDocument: TDocument;\n /** Monotonic identity for the current working document, including undo/redo replacements. */\n documentRevision: number;\n /**\n * Monotonic revision for document changes that can affect a derived structural view.\n * Consumers provide the command classifier; selection and structure-preserving edits\n * do not advance this revision.\n */\n documentStructureRevision: number;\n source?: AuthoringSourceDescriptor;\n selection: EditorSelectionState;\n dirty: boolean;\n canUndo: boolean;\n canRedo: boolean;\n history: EditorSessionHistoryView;\n}\n\nexport interface EditorSessionChange {\n readonly reason: 'selection' | 'document' | 'history' | 'saved' | 'reset' | 'rebase';\n readonly dirty: boolean;\n readonly documentChanged: boolean;\n readonly selectionChanged: boolean;\n readonly historyChanged: boolean;\n readonly documentRevision: number;\n}\n\nexport interface EditorSessionExternalRebaseInput<TDocument> {\n persistedDocument: TDocument;\n workingDocument: TDocument;\n}\n\nexport interface EditorSessionDispatchResult<TDocument> {\n command: EditorCommand;\n workingDocument: TDocument;\n selection: EditorSelectionState;\n dirty: boolean;\n documentChanged: boolean;\n selectionChanged: boolean;\n transaction?: UndoTransaction<TDocument>;\n}\n\nexport interface EditorSessionDispatchOptions {\n mergeWithPrevious?: boolean;\n assumeDocumentChanged?: boolean;\n assumeDirty?: boolean;\n clonePatchInput?: boolean;\n cloneResultDocument?: boolean;\n}\n\nexport interface EditorSessionStateOptions {\n /**\n * Defaults to true to preserve the historical snapshot semantics.\n * Performance-sensitive editor UI code can pass false when it treats\n * documents as read-only during render.\n */\n cloneDocuments?: boolean;\n}\n\nexport interface EditorSessionMarkSavedOptions {\n /** Establishes a new history boundary at the saved document. */\n resetHistory?: boolean;\n}\n\nexport interface EditorSessionOptions<TDocument, TPatch = unknown> {\n source?: AuthoringSourceDescriptor;\n persistedDocument: TDocument;\n workingDocument?: TDocument;\n selection?: Partial<EditorSelectionState>;\n onChange?(change: EditorSessionChange): void;\n onChangeError?(error: unknown): void;\n cloneDocument?: (document: TDocument) => TDocument;\n compareDocuments?: (left: TDocument, right: TDocument) => boolean;\n reduceDocument?: (\n document: TDocument,\n command: DocumentCommand<TDocument, TPatch>,\n ) => TDocument;\n isDocumentStructureChange?(command: DocumentCommand<TDocument, TPatch>): boolean;\n}\n\nexport interface EditorSessionForkOptions {\n selection?: Partial<EditorSelectionState>;\n onChange?(change: EditorSessionChange): void;\n onChangeError?(error: unknown): void;\n /** Continue the parent revision sequence for a scope projected by the same service. */\n preserveDocumentRevision?: boolean;\n}\n\nexport interface EditorSessionTransaction<TDocument, TPatch = unknown> {\n readonly session: EditorSession<TDocument, TPatch>;\n readonly baseDocumentRevision: number;\n /**\n * Stages every fallible clone without mutating the owner. Multiple prepared\n * commits can therefore be validated and swapped synchronously as one\n * higher-level authoring transaction.\n */\n prepareCommit(reason?: EditorSessionChange['reason']): EditorSessionPreparedCommit<TDocument>;\n commit(reason?: EditorSessionChange['reason']): EditorSessionState<TDocument>;\n discard(): void;\n}\n\nexport interface EditorSessionPreparedCommit<TDocument> {\n assertReady(): void;\n commit(options?: { deferChangeNotification?: boolean }): EditorSessionPreparedCommitResult<TDocument>;\n discard(): void;\n}\n\nexport interface EditorSessionPreparedCommitResult<TDocument> {\n readonly state: EditorSessionState<TDocument>;\n notifyChange(): void;\n}\n\nexport interface UndoTransaction<TDocument> {\n id: string;\n label: string;\n commandType: string;\n beforeDocument: TDocument;\n afterDocument: TDocument;\n projectionImpact?: EditorProjectionImpact;\n presentationImpact?: EditorPresentationImpact;\n structureChanged: boolean;\n createdAt: number;\n}\n\nexport type EditorProjectionImpact =\n | EditorProjectionIncrementalImpact\n | EditorProjectionRebuildImpact;\n\nexport interface EditorPresentationImpact {\n inspector?: 'full' | Array<'transform' | 'summary' | 'material'>;\n hierarchy?: 'full' | { labelIds: string[] };\n rendering?: boolean;\n}\n\nexport interface EditorProjectionIncrementalImpact {\n type: 'incremental';\n syncTransformIds?: string[];\n syncMetadataIds?: string[];\n reprojectIds?: string[];\n createdNodeIds?: string[];\n deletedNodeIds?: string[];\n}\n\nexport interface EditorProjectionRebuildImpact {\n type: 'rebuild';\n reason?: string;\n}\n\nexport interface EditorSessionHistoryEntry {\n id: string;\n label: string;\n commandType: string;\n createdAt: number;\n}\n\nexport interface EditorSessionHistoryView {\n entries: EditorSessionHistoryEntry[];\n}\n\nexport interface EditorSessionHistoryResult<TDocument> {\n transaction: UndoTransaction<TDocument>;\n workingDocument: TDocument;\n selection: EditorSelectionState;\n dirty: boolean;\n documentChanged: true;\n}\n\ntype StructuredCloneHost = typeof globalThis & {\n structuredClone?: <T>(value: T) => T;\n};\n\nfunction defaultCloneDocument<TDocument>(document: TDocument): TDocument {\n const structuredCloneFn = (globalThis as StructuredCloneHost).structuredClone;\n if (typeof structuredCloneFn === 'function') return structuredCloneFn(document);\n return JSON.parse(JSON.stringify(document)) as TDocument;\n}\n\nfunction defaultCompareDocuments<TDocument>(left: TDocument, right: TDocument): boolean {\n return JSON.stringify(left) === JSON.stringify(right);\n}\n\nfunction normalizeSelection(selection?: Partial<EditorSelectionState>): EditorSelectionState {\n const selectedIds = uniqueIds(selection?.selectedIds ?? []);\n const activeId = selection?.activeId && selectedIds.includes(selection.activeId)\n ? selection.activeId\n : selectedIds[selectedIds.length - 1] ?? null;\n return {\n selectedIds,\n activeId,\n };\n}\n\nfunction uniqueIds(ids: readonly string[]): string[] {\n const result: string[] = [];\n const seen = new Set<string>();\n for (const id of ids) {\n if (!id || seen.has(id)) continue;\n seen.add(id);\n result.push(id);\n }\n return result;\n}\n\nfunction selectionEquals(left: EditorSelectionState, right: EditorSelectionState): boolean {\n if (left.activeId !== right.activeId) return false;\n if (left.selectedIds.length !== right.selectedIds.length) return false;\n return left.selectedIds.every((id, index) => right.selectedIds[index] === id);\n}\n\nfunction applySelectionCommand(\n selection: EditorSelectionState,\n command: SelectionCommand,\n): EditorSelectionState {\n if (command.type === 'selection.clear') return normalizeSelection();\n\n if (command.type === 'selection.replace') {\n return normalizeSelection({\n selectedIds: command.selectedIds,\n activeId: command.activeId,\n });\n }\n\n if (command.type === 'selection.add') {\n const selectedIds = uniqueIds([...selection.selectedIds, ...command.selectedIds]);\n return normalizeSelection({\n selectedIds,\n activeId: command.activeId ?? command.selectedIds[command.selectedIds.length - 1] ?? selection.activeId,\n });\n }\n\n if (command.type === 'selection.remove') {\n const removeIds = new Set(command.selectedIds);\n const selectedIds = selection.selectedIds.filter(id => !removeIds.has(id));\n return normalizeSelection({\n selectedIds,\n activeId: selection.activeId && selectedIds.includes(selection.activeId)\n ? selection.activeId\n : selectedIds[selectedIds.length - 1] ?? null,\n });\n }\n\n const selectedIds = [...selection.selectedIds];\n let activeId = selection.activeId;\n for (const id of command.selectedIds) {\n const index = selectedIds.indexOf(id);\n if (index >= 0) {\n selectedIds.splice(index, 1);\n if (activeId === id) activeId = selectedIds[selectedIds.length - 1] ?? null;\n } else if (id) {\n selectedIds.push(id);\n activeId = id;\n }\n }\n return normalizeSelection({\n selectedIds,\n activeId: command.activeId ?? activeId,\n });\n}\n\nexport class EditorSession<TDocument, TPatch = unknown> {\n private source?: AuthoringSourceDescriptor;\n private persistedDocument: TDocument;\n private workingDocument: TDocument;\n private selection: EditorSelectionState;\n private dirty: boolean;\n private readonly onChange?: (change: EditorSessionChange) => void;\n private readonly onChangeError?: (error: unknown) => void;\n private readonly cloneDocument: (document: TDocument) => TDocument;\n private readonly compareDocuments: (left: TDocument, right: TDocument) => boolean;\n private readonly reduceDocument?: (\n document: TDocument,\n command: DocumentCommand<TDocument, TPatch>,\n ) => TDocument;\n private readonly isDocumentStructureChange: (\n command: DocumentCommand<TDocument, TPatch>,\n ) => boolean;\n private undoStack: UndoTransaction<TDocument>[] = [];\n private redoStack: UndoTransaction<TDocument>[] = [];\n private nextTransactionId = 1;\n private documentRevision = 0;\n private documentStructureRevision = 0;\n private protectedWorkingDocument: { revision: number; source: TDocument; snapshot: TDocument } | null = null;\n private protectedPersistedDocument: { revision: number; source: TDocument; snapshot: TDocument } | null = null;\n\n constructor(options: EditorSessionOptions<TDocument, TPatch>) {\n registerCanonicalEditorSession(this);\n this.cloneDocument = options.cloneDocument ?? defaultCloneDocument;\n this.compareDocuments = options.compareDocuments ?? defaultCompareDocuments;\n this.reduceDocument = options.reduceDocument;\n this.isDocumentStructureChange = options.isDocumentStructureChange ?? (() => true);\n this.source = cloneAuthoringSourceDescriptorOptional(options.source);\n this.persistedDocument = this.cloneDocument(options.persistedDocument);\n this.workingDocument = this.cloneDocument(options.workingDocument ?? options.persistedDocument);\n this.selection = normalizeSelection(options.selection);\n this.onChange = options.onChange;\n this.onChangeError = options.onChangeError;\n this.dirty = !this.compareDocuments(this.workingDocument, this.persistedDocument);\n }\n\n getState(options: EditorSessionStateOptions = {}): EditorSessionState<TDocument> {\n const cloneDocuments = options.cloneDocuments !== false;\n const exposeSharedDocuments = !cloneDocuments && canExposeSharedEditorSessionDocuments(this);\n return {\n persistedDocument: cloneDocuments\n ? this.cloneDocument(this.persistedDocument)\n : exposeSharedDocuments\n ? this.persistedDocument\n : this.getProtectedDocumentSnapshot('persisted', this.persistedDocument),\n workingDocument: cloneDocuments\n ? this.cloneDocument(this.workingDocument)\n : exposeSharedDocuments\n ? this.workingDocument\n : this.getProtectedDocumentSnapshot('working', this.workingDocument),\n documentRevision: this.documentRevision,\n documentStructureRevision: this.documentStructureRevision,\n source: cloneAuthoringSourceDescriptorOptional(this.source),\n selection: this.getSelection(),\n dirty: this.dirty,\n canUndo: this.canUndo(),\n canRedo: this.canRedo(),\n history: this.getHistoryView(),\n };\n }\n\n getWorkingDocument(): TDocument {\n return this.cloneDocument(this.workingDocument);\n }\n\n getSource(): AuthoringSourceDescriptor | undefined {\n return cloneAuthoringSourceDescriptorOptional(this.source);\n }\n\n getSelection(): EditorSelectionState {\n return {\n selectedIds: [...this.selection.selectedIds],\n activeId: this.selection.activeId,\n };\n }\n\n /** @internal Severs raw document references captured before a Host lease was installed. */\n detachDocumentReferencesForWriteAuthority(): void {\n assertEditorSessionWriteAuthority(this);\n this.persistedDocument = this.cloneDocument(this.persistedDocument);\n this.workingDocument = this.cloneDocument(this.workingDocument);\n this.protectedWorkingDocument = null;\n this.protectedPersistedDocument = null;\n }\n\n isDirty(): boolean {\n return this.dirty;\n }\n\n fork(options: EditorSessionForkOptions = {}): EditorSession<TDocument, TPatch> {\n const fork = new EditorSession<TDocument, TPatch>({\n source: this.source,\n persistedDocument: this.workingDocument,\n selection: options.selection,\n onChange: options.onChange,\n onChangeError: options.onChangeError,\n cloneDocument: this.cloneDocument,\n compareDocuments: this.compareDocuments,\n reduceDocument: this.reduceDocument,\n isDocumentStructureChange: this.isDocumentStructureChange,\n });\n if (options.preserveDocumentRevision) {\n fork.documentRevision = this.documentRevision;\n fork.documentStructureRevision = this.documentStructureRevision;\n }\n return fork;\n }\n\n /**\n * Creates an isolated, full-fidelity draft of the current session. Mutations\n * become observable only when commit succeeds against the unchanged base\n * revision; discard leaves the owner untouched.\n */\n beginTransaction(): EditorSessionTransaction<TDocument, TPatch> {\n const owner = this;\n const baseDocumentRevision = this.documentRevision;\n const baseSelection = normalizeSelection(this.selection);\n const draft = new EditorSession<TDocument, TPatch>({\n source: this.source,\n persistedDocument: this.persistedDocument,\n workingDocument: this.workingDocument,\n selection: this.selection,\n cloneDocument: this.cloneDocument,\n compareDocuments: this.compareDocuments,\n reduceDocument: this.reduceDocument,\n isDocumentStructureChange: this.isDocumentStructureChange,\n });\n draft.undoStack = this.cloneTransactions(this.undoStack);\n draft.redoStack = this.cloneTransactions(this.redoStack);\n draft.nextTransactionId = this.nextTransactionId;\n draft.documentRevision = this.documentRevision;\n draft.documentStructureRevision = this.documentStructureRevision;\n draft.dirty = this.dirty;\n let active = true;\n const prepareCommit = (\n reason: EditorSessionChange['reason'] = 'document',\n ): EditorSessionPreparedCommit<TDocument> => {\n if (!active) throw new Error('Editor Session transaction is no longer active.');\n if (owner.documentRevision !== baseDocumentRevision) {\n active = false;\n throw new Error(\n `Editor Session transaction base revision changed: expected ${baseDocumentRevision}, received ${owner.documentRevision}.`,\n );\n }\n const documentChanged = draft.documentRevision !== baseDocumentRevision;\n const ownerSelectionChanged = !selectionEquals(owner.selection, baseSelection);\n const nextSelection = normalizeSelection(ownerSelectionChanged ? owner.selection : draft.selection);\n const selectionChanged = !selectionEquals(owner.selection, nextSelection);\n const historyChanged = documentChanged\n || owner.undoStack.length !== draft.undoStack.length\n || owner.redoStack.length !== draft.redoStack.length;\n // Stage every fallible clone before mutating the owner so commit is atomic\n // even when a consumer-supplied cloneDocument throws.\n const nextSource = cloneAuthoringSourceDescriptorOptional(draft.source);\n const nextPersistedDocument = owner.cloneDocument(draft.persistedDocument);\n const nextWorkingDocument = owner.cloneDocument(draft.workingDocument);\n const nextUndoStack = owner.cloneTransactions(draft.undoStack);\n const nextRedoStack = owner.cloneTransactions(draft.redoStack);\n // The returned snapshot must also be prepared before the authoritative\n // swap. getState() clones consumer documents and can therefore throw.\n draft.selection = nextSelection;\n const committedState = draft.getState();\n let preparedActive = true;\n let changeNotified = false;\n const assertReady = (): void => {\n if (!preparedActive || !active) {\n throw new Error('Editor Session prepared commit is no longer active.');\n }\n if (owner.documentRevision !== baseDocumentRevision) {\n preparedActive = false;\n active = false;\n throw new Error(\n `Editor Session transaction base revision changed: expected ${baseDocumentRevision}, received ${owner.documentRevision}.`,\n );\n }\n };\n const notifyChange = (): void => {\n if (changeNotified) return;\n changeNotified = true;\n if (documentChanged || selectionChanged || historyChanged) {\n owner.emitChange(reason, documentChanged, selectionChanged, historyChanged);\n }\n };\n return {\n assertReady,\n commit(commitOptions = {}) {\n assertEditorSessionWriteAuthority(owner);\n assertReady();\n owner.source = nextSource;\n owner.persistedDocument = nextPersistedDocument;\n owner.workingDocument = nextWorkingDocument;\n owner.selection = nextSelection;\n owner.dirty = draft.dirty;\n owner.undoStack = nextUndoStack;\n owner.redoStack = nextRedoStack;\n owner.nextTransactionId = draft.nextTransactionId;\n owner.documentRevision = draft.documentRevision;\n owner.documentStructureRevision = draft.documentStructureRevision;\n preparedActive = false;\n active = false;\n if (!commitOptions.deferChangeNotification) notifyChange();\n return { state: committedState, notifyChange };\n },\n discard() {\n if (!preparedActive) return;\n preparedActive = false;\n active = false;\n },\n };\n };\n return {\n session: draft,\n baseDocumentRevision,\n prepareCommit,\n commit(reason = 'document') {\n return prepareCommit(reason).commit().state;\n },\n discard() { active = false; },\n };\n }\n\n canUndo(): boolean {\n return this.undoStack.length > 0;\n }\n\n canRedo(): boolean {\n return this.redoStack.length > 0;\n }\n\n dispatch(\n command: EditorCommand<TDocument, TPatch>,\n options: EditorSessionDispatchOptions = {},\n ): EditorSessionDispatchResult<TDocument> {\n const beforeSelection = this.selection;\n if (isSelectionCommand(command)) {\n this.selection = applySelectionCommand(this.selection, command);\n const selectionChanged = !selectionEquals(beforeSelection, this.selection);\n this.emitChange('selection', false, selectionChanged, false);\n return {\n command,\n workingDocument: canExposeSharedEditorSessionDocuments(this)\n ? this.workingDocument\n : this.getProtectedDocumentSnapshot('working', this.workingDocument),\n selection: this.getSelection(),\n dirty: this.dirty,\n documentChanged: false,\n selectionChanged,\n };\n }\n\n assertEditorSessionWriteAuthority(this);\n\n const structureChanged = this.isDocumentStructureChange(command);\n const useFastDocumentPatch = command.type === 'document.patch' && options.assumeDocumentChanged === true;\n const beforeDocument = useFastDocumentPatch ? this.workingDocument : this.cloneDocument(this.workingDocument);\n if (command.type === 'document.replace') {\n this.workingDocument = this.cloneDocument(command.document);\n } else if (command.type === 'document.patch') {\n if (!this.reduceDocument) {\n throw new Error('EditorSession requires reduceDocument to handle document.patch commands.');\n }\n this.workingDocument = this.reduceDocument(\n options.clonePatchInput === false ? this.workingDocument : this.cloneDocument(this.workingDocument),\n command,\n );\n }\n const documentChanged = options.assumeDocumentChanged === true\n ? true\n : !this.compareDocuments(beforeDocument, this.workingDocument);\n const selectionChanged = !selectionEquals(beforeSelection, this.selection);\n if (documentChanged) {\n this.documentRevision += 1;\n if (structureChanged) this.documentStructureRevision += 1;\n this.dirty = options.assumeDirty === true\n ? true\n : !this.compareDocuments(this.workingDocument, this.persistedDocument);\n }\n const transaction = documentChanged && isDocumentCommand(command)\n ? this.pushTransaction(command, beforeDocument, this.workingDocument, options, structureChanged)\n : undefined;\n this.emitChange('document', documentChanged, selectionChanged, !!transaction);\n return {\n command,\n workingDocument: options.cloneResultDocument === false\n ? canExposeSharedEditorSessionDocuments(this)\n ? this.workingDocument\n : this.getProtectedDocumentSnapshot('working', this.workingDocument)\n : this.cloneDocument(this.workingDocument),\n selection: this.getSelection(),\n dirty: this.isDirty(),\n documentChanged,\n selectionChanged,\n transaction,\n };\n }\n\n undo(): EditorSessionHistoryResult<TDocument> | null {\n assertEditorSessionWriteAuthority(this);\n const transaction = this.undoStack.pop();\n if (!transaction) return null;\n this.redoStack.push(transaction);\n this.workingDocument = this.cloneDocument(transaction.beforeDocument);\n this.documentRevision += 1;\n if (transaction.structureChanged) this.documentStructureRevision += 1;\n this.dirty = !this.compareDocuments(this.workingDocument, this.persistedDocument);\n this.emitChange('history', true, false, true);\n return {\n transaction,\n workingDocument: this.cloneDocument(this.workingDocument),\n selection: this.getSelection(),\n dirty: this.isDirty(),\n documentChanged: true,\n };\n }\n\n redo(): EditorSessionHistoryResult<TDocument> | null {\n assertEditorSessionWriteAuthority(this);\n const transaction = this.redoStack.pop();\n if (!transaction) return null;\n this.undoStack.push(transaction);\n this.workingDocument = this.cloneDocument(transaction.afterDocument);\n this.documentRevision += 1;\n if (transaction.structureChanged) this.documentStructureRevision += 1;\n this.dirty = !this.compareDocuments(this.workingDocument, this.persistedDocument);\n this.emitChange('history', true, false, true);\n return {\n transaction,\n workingDocument: this.cloneDocument(this.workingDocument),\n selection: this.getSelection(),\n dirty: this.isDirty(),\n documentChanged: true,\n };\n }\n\n markSaved(\n document: TDocument,\n source?: AuthoringSourceDescriptor,\n options: EditorSessionMarkSavedOptions = {},\n ): EditorSessionState<TDocument> {\n assertEditorSessionWriteAuthority(this);\n if (source) this.source = cloneAuthoringSourceDescriptorOptional(source);\n const structureChanged = !this.compareDocuments(this.workingDocument, document);\n this.persistedDocument = this.cloneDocument(document);\n this.workingDocument = this.cloneDocument(document);\n if (options.resetHistory) {\n this.undoStack = [];\n this.redoStack = [];\n }\n this.documentRevision += 1;\n if (structureChanged) this.documentStructureRevision += 1;\n this.dirty = false;\n this.emitChange('saved', true, false, options.resetHistory === true);\n return this.getState();\n }\n\n /** Records an externally persisted checkpoint without overwriting newer working edits. */\n markPersistedCheckpoint(\n document: TDocument,\n source?: AuthoringSourceDescriptor,\n ): EditorSessionState<TDocument> {\n assertEditorSessionWriteAuthority(this);\n if (source) this.source = cloneAuthoringSourceDescriptorOptional(source);\n this.persistedDocument = this.cloneDocument(document);\n this.documentRevision += 1;\n this.dirty = !this.compareDocuments(this.workingDocument, this.persistedDocument);\n this.emitChange('saved', true, false, false);\n return this.getState();\n }\n\n reset(document: TDocument, source?: AuthoringSourceDescriptor): EditorSessionState<TDocument> {\n assertEditorSessionWriteAuthority(this);\n this.source = cloneAuthoringSourceDescriptorOptional(source);\n this.persistedDocument = this.cloneDocument(document);\n this.workingDocument = this.cloneDocument(document);\n this.documentRevision += 1;\n this.documentStructureRevision += 1;\n this.selection = normalizeSelection();\n this.dirty = false;\n this.undoStack = [];\n this.redoStack = [];\n this.emitChange('reset', true, true, true);\n return this.getState();\n }\n\n rebaseExternalDocuments(\n input: EditorSessionExternalRebaseInput<TDocument>,\n ): EditorSessionState<TDocument> {\n assertEditorSessionWriteAuthority(this);\n const nextPersistedDocument = this.cloneDocument(input.persistedDocument);\n const nextWorkingDocument = this.cloneDocument(input.workingDocument);\n const nextDirty = !this.compareDocuments(nextWorkingDocument, nextPersistedDocument);\n const structureChanged = !this.compareDocuments(this.workingDocument, nextWorkingDocument);\n const persistedDocumentForResult = this.cloneDocument(nextPersistedDocument);\n const workingDocumentForResult = this.cloneDocument(nextWorkingDocument);\n const sourceForResult = cloneAuthoringSourceDescriptorOptional(this.source);\n const selectionForResult = this.getSelection();\n const revision = this.documentRevision + 1;\n\n this.persistedDocument = nextPersistedDocument;\n this.workingDocument = nextWorkingDocument;\n this.documentRevision = revision;\n if (structureChanged) this.documentStructureRevision += 1;\n this.dirty = nextDirty;\n this.undoStack = [];\n this.redoStack = [];\n this.emitChange('rebase', true, false, true);\n return {\n persistedDocument: persistedDocumentForResult,\n workingDocument: workingDocumentForResult,\n documentRevision: revision,\n documentStructureRevision: this.documentStructureRevision,\n source: sourceForResult,\n selection: selectionForResult,\n dirty: nextDirty,\n canUndo: false,\n canRedo: false,\n history: { entries: [] },\n };\n }\n\n /**\n * Host-only scope handoff primitive. A scope switch is a service-level\n * authoring fact even when the target document itself is unchanged, so its\n * revisions must not reuse values from an earlier active scope.\n */\n advanceRevisionsForScopeSwitch(documentRevision: number, documentStructureRevision: number): void {\n assertEditorSessionWriteAuthority(this);\n if (!Number.isSafeInteger(documentRevision) || documentRevision <= this.documentRevision) {\n throw new Error('Scope switch document revision must advance the target Session.');\n }\n if (!Number.isSafeInteger(documentStructureRevision)\n || documentStructureRevision <= this.documentStructureRevision) {\n throw new Error('Scope switch structure revision must advance the target Session.');\n }\n this.documentRevision = documentRevision;\n this.documentStructureRevision = documentStructureRevision;\n }\n\n private emitChange(\n reason: EditorSessionChange['reason'],\n documentChanged: boolean,\n selectionChanged: boolean,\n historyChanged: boolean,\n ): void {\n try {\n this.onChange?.(Object.freeze({\n reason,\n dirty: this.dirty,\n documentChanged,\n selectionChanged,\n historyChanged,\n documentRevision: this.documentRevision,\n }));\n } catch (error) {\n try { this.onChangeError?.(error); }\n catch { /* Session observers cannot change an already-applied command. */ }\n }\n }\n\n private getProtectedDocumentSnapshot(kind: 'working' | 'persisted', source: TDocument): TDocument {\n const cached = kind === 'working' ? this.protectedWorkingDocument : this.protectedPersistedDocument;\n if (cached?.revision === this.documentRevision && cached.source === source) return cached.snapshot;\n const snapshot = freezeDocumentSnapshot(this.cloneDocument(source));\n const next = { revision: this.documentRevision, source, snapshot };\n if (kind === 'working') this.protectedWorkingDocument = next;\n else this.protectedPersistedDocument = next;\n return snapshot;\n }\n\n private pushTransaction(\n command: DocumentCommand<TDocument, TPatch>,\n beforeDocument: TDocument,\n afterDocument: TDocument,\n options: EditorSessionDispatchOptions,\n structureChanged: boolean,\n ): UndoTransaction<TDocument> {\n const previous = options.mergeWithPrevious ? this.undoStack[this.undoStack.length - 1] : undefined;\n if (previous) {\n previous.afterDocument = this.cloneDocument(afterDocument);\n previous.projectionImpact = mergeProjectionImpact(previous.projectionImpact, command.projectionImpact);\n previous.presentationImpact = mergePresentationImpact(previous.presentationImpact, command.presentationImpact);\n previous.structureChanged ||= structureChanged;\n this.redoStack = [];\n return {\n ...previous,\n beforeDocument: this.cloneDocument(previous.beforeDocument),\n afterDocument: this.cloneDocument(previous.afterDocument),\n projectionImpact: cloneProjectionImpact(previous.projectionImpact),\n presentationImpact: clonePresentationImpact(previous.presentationImpact),\n };\n }\n const transaction: UndoTransaction<TDocument> = {\n id: `transaction_${this.nextTransactionId++}`,\n label: command.label ?? command.type,\n commandType: command.type,\n beforeDocument: this.cloneDocument(beforeDocument),\n afterDocument: this.cloneDocument(afterDocument),\n ...(command.projectionImpact ? { projectionImpact: cloneProjectionImpact(command.projectionImpact) } : {}),\n ...(command.presentationImpact ? { presentationImpact: clonePresentationImpact(command.presentationImpact) } : {}),\n structureChanged,\n createdAt: Date.now(),\n };\n this.undoStack.push(transaction);\n this.redoStack = [];\n return transaction;\n }\n\n private cloneTransactions(\n transactions: readonly UndoTransaction<TDocument>[],\n ): UndoTransaction<TDocument>[] {\n return transactions.map(transaction => ({\n ...transaction,\n beforeDocument: this.cloneDocument(transaction.beforeDocument),\n afterDocument: this.cloneDocument(transaction.afterDocument),\n projectionImpact: cloneProjectionImpact(transaction.projectionImpact),\n }));\n }\n\n private getHistoryView(): EditorSessionHistoryView {\n return {\n entries: [...this.undoStack, ...this.redoStack]\n .map(toHistoryEntry)\n .sort((left, right) => right.createdAt - left.createdAt),\n };\n }\n}\n\nfunction freezeDocumentSnapshot<T>(value: T, seen = new WeakSet<object>()): T {\n if (value === null || typeof value !== 'object') return value;\n const object = value as object;\n if (seen.has(object)) return value;\n seen.add(object);\n for (const key of Reflect.ownKeys(object)) {\n const descriptor = Object.getOwnPropertyDescriptor(object, key);\n if (descriptor && 'value' in descriptor) freezeDocumentSnapshot(descriptor.value, seen);\n }\n try { Object.freeze(object); }\n catch { /* Exotic structured values remain detached clones even if they cannot be frozen. */ }\n return value;\n}\n\nfunction cloneProjectionImpact(\n impact: EditorProjectionImpact | undefined,\n): EditorProjectionImpact | undefined {\n if (!impact) return undefined;\n if (impact.type === 'rebuild') {\n return {\n type: 'rebuild',\n ...(impact.reason ? { reason: impact.reason } : {}),\n };\n }\n return {\n type: 'incremental',\n ...(impact.syncTransformIds ? { syncTransformIds: [...impact.syncTransformIds] } : {}),\n ...(impact.syncMetadataIds ? { syncMetadataIds: [...impact.syncMetadataIds] } : {}),\n ...(impact.reprojectIds ? { reprojectIds: [...impact.reprojectIds] } : {}),\n ...(impact.createdNodeIds ? { createdNodeIds: [...impact.createdNodeIds] } : {}),\n ...(impact.deletedNodeIds ? { deletedNodeIds: [...impact.deletedNodeIds] } : {}),\n };\n}\n\nfunction mergeProjectionImpact(\n previous: EditorProjectionImpact | undefined,\n next: EditorProjectionImpact | undefined,\n): EditorProjectionImpact | undefined {\n if (!previous || !next) return undefined;\n if (previous.type === 'rebuild' || next.type === 'rebuild') {\n const reason = previous.type === 'rebuild'\n ? previous.reason\n : next.type === 'rebuild'\n ? next.reason\n : undefined;\n return {\n type: 'rebuild',\n ...(reason ? { reason } : {}),\n };\n }\n return {\n type: 'incremental',\n syncTransformIds: uniqueIds([\n ...(previous.syncTransformIds ?? []),\n ...(next.syncTransformIds ?? []),\n ]),\n syncMetadataIds: uniqueIds([\n ...(previous.syncMetadataIds ?? []),\n ...(next.syncMetadataIds ?? []),\n ]),\n reprojectIds: uniqueIds([\n ...(previous.reprojectIds ?? []),\n ...(next.reprojectIds ?? []),\n ]),\n createdNodeIds: uniqueIds([\n ...(previous.createdNodeIds ?? []),\n ...(next.createdNodeIds ?? []),\n ]),\n deletedNodeIds: uniqueIds([\n ...(previous.deletedNodeIds ?? []),\n ...(next.deletedNodeIds ?? []),\n ]),\n };\n}\n\nfunction clonePresentationImpact(impact: EditorPresentationImpact | undefined): EditorPresentationImpact | undefined {\n if (!impact) return undefined;\n return {\n ...(impact.inspector ? { inspector: impact.inspector === 'full' ? 'full' : [...impact.inspector] } : {}),\n ...(impact.hierarchy ? { hierarchy: impact.hierarchy === 'full' ? 'full' : { labelIds: [...impact.hierarchy.labelIds] } } : {}),\n ...(impact.rendering ? { rendering: true } : {}),\n };\n}\n\nfunction mergePresentationImpact(\n previous: EditorPresentationImpact | undefined,\n next: EditorPresentationImpact | undefined,\n): EditorPresentationImpact | undefined {\n if (!previous || !next) return undefined;\n return {\n ...(previous.inspector || next.inspector ? {\n inspector: previous.inspector === 'full' || next.inspector === 'full'\n ? 'full'\n : [...new Set([...(previous.inspector ?? []), ...(next.inspector ?? [])])],\n } : {}),\n ...(previous.hierarchy || next.hierarchy ? {\n hierarchy: previous.hierarchy === 'full' || next.hierarchy === 'full'\n ? 'full'\n : { labelIds: [...new Set([...(previous.hierarchy?.labelIds ?? []), ...(next.hierarchy?.labelIds ?? [])])] },\n } : {}),\n ...(previous.rendering || next.rendering ? { rendering: true } : {}),\n };\n}\n\nfunction toHistoryEntry<TDocument>(\n transaction: UndoTransaction<TDocument>,\n): EditorSessionHistoryEntry {\n return {\n id: transaction.id,\n label: transaction.label,\n commandType: transaction.commandType,\n createdAt: transaction.createdAt,\n };\n}\n\nfunction cloneAuthoringSourceDescriptorOptional(\n source: AuthoringSourceDescriptor | undefined,\n): AuthoringSourceDescriptor | undefined {\n if (!source) return undefined;\n return {\n ...source,\n ref: { ...source.ref },\n capabilities: source.capabilities ? { ...source.capabilities } : undefined,\n metadata: source.metadata ? structuredClone(source.metadata) : undefined,\n };\n}\n\nfunction isDocumentCommand<TDocument, TPatch>(\n command: EditorCommand<TDocument, TPatch>,\n): command is DocumentCommand<TDocument, TPatch> {\n return command.type === 'document.patch' || command.type === 'document.replace';\n}\n\nfunction isSelectionCommand<TDocument, TPatch>(\n command: EditorCommand<TDocument, TPatch>,\n): command is SelectionCommand {\n return command.type === 'selection.replace'\n || command.type === 'selection.add'\n || command.type === 'selection.remove'\n || command.type === 'selection.toggle'\n || command.type === 'selection.clear';\n}\n\nexport function createEditorSession<TDocument>(\n options: EditorSessionOptions<TDocument>,\n): EditorSession<TDocument>;\nexport function createEditorSession<TDocument, TPatch>(\n options: EditorSessionOptions<TDocument, TPatch>,\n): EditorSession<TDocument, TPatch>;\nexport function createEditorSession<TDocument, TPatch = unknown>(\n options: EditorSessionOptions<TDocument, TPatch>,\n): EditorSession<TDocument, TPatch> {\n return new EditorSession(options);\n}\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './editor-session';
|
|
2
|
+
export * from './editor-session-authority';
|
|
2
3
|
export * from './events';
|
|
3
4
|
export * from './authoring-source';
|
|
4
5
|
export * from './host-services';
|
|
@@ -14,7 +15,10 @@ export * from '@fps-games/playable-scene';
|
|
|
14
15
|
export * from './transform-operations';
|
|
15
16
|
export * from './transform-operation-policy';
|
|
16
17
|
export * from './viewport-tools';
|
|
17
|
-
export * from './
|
|
18
|
-
export * from './
|
|
18
|
+
export * from './editor-command-capability-adapter';
|
|
19
|
+
export * from './editor-command-system';
|
|
20
|
+
export * from './editor-command-observability';
|
|
21
|
+
export * from './editor-service-gateway';
|
|
22
|
+
export * from './editor-authoring-host';
|
|
19
23
|
export * from './field-schema/index';
|
|
20
24
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kBAAkB,CAAC;AACjC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kBAAkB,CAAC;AACjC,cAAc,qCAAqC,CAAC;AACpD,cAAc,yBAAyB,CAAC;AACxC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './editor-session.js';
|
|
2
|
+
export * from './editor-session-authority.js';
|
|
2
3
|
export * from './events.js';
|
|
3
4
|
export * from './authoring-source.js';
|
|
4
5
|
export * from './host-services.js';
|
|
@@ -14,7 +15,10 @@ export * from '@fps-games/playable-scene';
|
|
|
14
15
|
export * from './transform-operations.js';
|
|
15
16
|
export * from './transform-operation-policy.js';
|
|
16
17
|
export * from './viewport-tools.js';
|
|
17
|
-
export * from './
|
|
18
|
-
export * from './
|
|
18
|
+
export * from './editor-command-capability-adapter.js';
|
|
19
|
+
export * from './editor-command-system.js';
|
|
20
|
+
export * from './editor-command-observability.js';
|
|
21
|
+
export * from './editor-service-gateway.js';
|
|
22
|
+
export * from './editor-authoring-host.js';
|
|
19
23
|
export * from './field-schema/index.js';
|
|
20
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kBAAkB,CAAC;AACjC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kBAAkB,CAAC;AACjC,cAAc,qCAAqC,CAAC;AACpD,cAAc,yBAAyB,CAAC;AACxC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC","sourcesContent":["export * from './editor-session';\nexport * from './editor-session-authority';\nexport * from './events';\nexport * from './authoring-source';\nexport * from './host-services';\nexport * from './scene-view-input';\nexport * from './scene-graph';\nexport * from './marker-graph';\nexport * from './selection-strategy';\nexport * from './serialized-object';\nexport * from './inspector';\nexport * from './transform-gizmo';\nexport * from './transform-command';\nexport * from '@fps-games/playable-scene';\nexport * from './transform-operations';\nexport * from './transform-operation-policy';\nexport * from './viewport-tools';\nexport * from './editor-command-capability-adapter';\nexport * from './editor-command-system';\nexport * from './editor-command-observability';\nexport * from './editor-service-gateway';\nexport * from './editor-authoring-host';\nexport * from './field-schema/index';\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fps-games/editor-core",
|
|
3
|
-
"version": "0.2.1-beta.
|
|
3
|
+
"version": "0.2.1-beta.4",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Core runtime shell and adapter contracts for fps-game-editor.",
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@fps-games/plugin-api": "0.2.1-beta.
|
|
42
|
-
"@fps-games/plugin-host": "0.2.1-beta.
|
|
43
|
-
"@fps-games/playable-contracts": "0.2.1-beta.
|
|
44
|
-
"@fps-games/playable-scene": "0.2.1-beta.
|
|
45
|
-
"@fps-games/editor-protocol": "0.2.1-beta.
|
|
41
|
+
"@fps-games/plugin-api": "0.2.1-beta.4",
|
|
42
|
+
"@fps-games/plugin-host": "0.2.1-beta.4",
|
|
43
|
+
"@fps-games/playable-contracts": "0.2.1-beta.4",
|
|
44
|
+
"@fps-games/playable-scene": "0.2.1-beta.4",
|
|
45
|
+
"@fps-games/editor-protocol": "0.2.1-beta.4"
|
|
46
46
|
}
|
|
47
47
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { EditorBridgeLike, EditorMessenger, EditorPlugin, EditorRuntime } from '@fps-games/editor-protocol';
|
|
2
|
-
export * from './agent-transport';
|
|
3
2
|
export interface ForgePlayEditorWindow extends Window {
|
|
4
3
|
__bridge?: EditorBridgeLike;
|
|
5
4
|
__pendingEditorPlugin?: EditorPlugin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,YAAY,E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8B,CAC5C,OAAO,EAAE,aAAa,EACtB,OAAO,GAAE,0BAA+B,GACvC,2BAA2B,CAW7B;AAED,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,OAAO,GAAE,0BAA+B,GACvC,OAAO,CAKT;AAED,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,OAAO,GAAE,0BAA+B,GACvC,OAAO,CAKT;AAED,wBAAgB,0CAA0C,CACxD,OAAO,GAAE,iCAAsC,GAC9C,OAAO,CAqDT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAkCA,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC5C,cAAc;IACd,uBAAuB;IACvB,oBAAoB;CACZ,CAAC;AAEX,SAAS,gBAAgB;IACvB,IAAI,OAAO,MAAM,KAAK,WAAW;QAAE,OAAO,IAAI,CAAC;IAC/C,OAAO,MAA+B,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,UAAsC,EAAE;IACzE,OAAO,OAAO,CAAC,MAAM,IAAI,gBAAgB,EAAE,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,UAAsC,EAAE;IACzE,OAAO,kBAAkB,CAAC,OAAO,CAAC,EAAE,QAAQ,IAAI,IAAI,CAAC;AACvD,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,UAAsC,EAAE;IAC5E,OAAO,kBAAkB,CAAC,OAAO,CAAC,EAAE,SAAS,IAAI,IAAI,CAAC;AACxD,CAAC;AAED,MAAM,UAAU,6BAA6B,CAC3C,MAAoB,EACpB,UAAsC,EAA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AK,UAAU;gBAC/D,CAAC,CAAC,MAAM,oBAAoB,EAAE;gBAC9B,CAAC,CAAC,IAAI,CAAC;YACT,IAAI,cAAc,EAAE,aAAa,EAAE,CAAC;gBACjC,GAAW,CAAC,SAAS,GAAG,cAAc,CAAC;YAC1C,CAAC;YACD,OAAO,cAAc,CAAC;QACxB,CAAC,CAAC;QAEF,IAAI,OAAO,MAAM,CAAC,aAAa,KAAK,UAAU,EAAE,CAAC;YAC/C,MAAM,qBAAqB,GAAG,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAChE,MAAM,CAAC,aAAa,GAAG,KAAK,EAAE,GAAG,IAAe,EAAE,EAAE;gBAClD,MAAM,oBAAoB,EAAE,CAAC;gBAC7B,OAAO,qBAAqB,CAAC,GAAG,IAAI,CAAC,CAAC;YACxC,CAAC,CAAC;QACJ,CAAC;QAED,IAAI,OAAO,MAAM,CAAC,MAAM,KAAK,UAAU,EAAE,CAAC;YACxC,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAClD,MAAM,CAAC,MAAM,GAAG,KAAK,EAAE,GAAG,IAAe,EAAE,EAAE;gBAC3C,MAAM,cAAc,GAAG,MAAM,oBAAoB,EAAE,CAAC;gBACpD,IAAI,cAAc,EAAE,aAAa;oBAAE,OAAO,cAAc,CAAC;gBACzD,OAAO,cAAc,CAAC,GAAG,IAAI,CAAC,CAAC;YACjC,CAAC,CAAC;QACJ,CAAC;QAED,MAAM,CAAC,wCAAwC,GAAG,IAAI,CAAC;QACvD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO,QAAQ,EAAE,CAAC;AACpB,CAAC","sourcesContent":["import type {\n EditorBridgeLike,\n EditorMessenger,\n EditorPlugin,\n EditorRuntime,\n} from '@fps-games/editor-protocol';\n\nexport interface ForgePlayEditorWindow extends Window {\n __bridge?: EditorBridgeLike;\n __pendingEditorPlugin?: EditorPlugin;\n __pendingEditorRuntime?: EditorRuntime;\n}\n\nexport interface ForgePlayBridgeHostOptions {\n window?: ForgePlayEditorWindow;\n}\n\nexport interface RegisterEditorPluginResult {\n bridge: EditorBridgeLike | null;\n registered: boolean;\n pending: boolean;\n}\n\nexport interface RegisterEditorRuntimeResult {\n bridge: EditorBridgeLike | null;\n registered: boolean;\n pending: boolean;\n}\n\nexport interface BridgeInspectorLoaderPatchOptions extends ForgePlayBridgeHostOptions {\n maxAttempts?: number;\n intervalMs?: number;\n}\n\nexport const DEFAULT_PROJECT_OWNED_COMMANDS = [\n 'asset.import',\n 'asset.library.refresh',\n 'editor.asset.place',\n] as const;\n\nfunction getDefaultWindow(): ForgePlayEditorWindow | null {\n if (typeof window === 'undefined') return null;\n return window as ForgePlayEditorWindow;\n}\n\nexport function getForgePlayWindow(options: ForgePlayBridgeHostOptions = {}): ForgePlayEditorWindow | null {\n return options.window ?? getDefaultWindow();\n}\n\nexport function getForgePlayBridge(options: ForgePlayBridgeHostOptions = {}): EditorBridgeLike | null {\n return getForgePlayWindow(options)?.__bridge ?? null;\n}\n\nexport function getForgePlayMessenger(options: ForgePlayBridgeHostOptions = {}): EditorMessenger | null {\n return getForgePlayBridge(options)?.messenger ?? null;\n}\n\nexport function registerForgePlayEditorPlugin(\n plugin: EditorPlugin,\n options: ForgePlayBridgeHostOptions = {},\n): RegisterEditorPluginResult {\n const win = getForgePlayWindow(options);\n if (win) win.__pendingEditorPlugin = plugin;\n\n const bridge = win?.__bridge ?? null;\n const register = bridge?.registerEditorPlugin;\n if (register) {\n register(plugin);\n return { bridge, registered: true, pending: true };\n }\n return { bridge, registered: false, pending: Boolean(win) };\n}\n\nexport function registerForgePlayEditorRuntime(\n runtime: EditorRuntime,\n options: ForgePlayBridgeHostOptions = {},\n): RegisterEditorRuntimeResult {\n const win = getForgePlayWindow(options);\n if (win) win.__pendingEditorRuntime = runtime;\n\n const bridge = win?.__bridge ?? null;\n const register = bridge?.registerEditorRuntime;\n if (register) {\n register(runtime);\n return { bridge, registered: true, pending: true };\n }\n return { bridge, registered: false, pending: Boolean(win) };\n}\n\nexport function emitForgePlayBridgeEvent(\n eventName: string,\n payload: Record<string, unknown>,\n options: ForgePlayBridgeHostOptions = {},\n): boolean {\n const event = getForgePlayMessenger(options)?.event;\n if (!event) return false;\n event(eventName, payload);\n return true;\n}\n\nexport function sendForgePlayBridgeMessage(\n type: string,\n payload: Record<string, unknown>,\n options: ForgePlayBridgeHostOptions = {},\n): boolean {\n const send = getForgePlayMessenger(options)?.send;\n if (!send) return false;\n send(type, payload);\n return true;\n}\n\nexport function installForgePlayBridgeInspectorLoaderPatch(\n options: BridgeInspectorLoaderPatchOptions = {},\n): boolean {\n const win = getForgePlayWindow(options);\n if (!win) return false;\n\n const maxAttempts = options.maxAttempts ?? 120;\n const intervalMs = options.intervalMs ?? 250;\n let attempts = 0;\n\n const tryPatch = (): boolean => {\n const editor = (win.__bridge as any)?.editor;\n if (!editor) {\n if (attempts < maxAttempts) {\n attempts += 1;\n win.setTimeout?.(tryPatch, intervalMs);\n }\n return false;\n }\n\n if (editor.__fpsGameEditorLocalInspectorLoadPatched) return true;\n\n const ensureLocalInspector = async () => {\n const ensureInspectorReady = (win as any).ensureInspectorReady;\n const localInspector = typeof ensureInspectorReady === 'function'\n ? await ensureInspectorReady()\n : null;\n if (localInspector?.ShowInspector) {\n (win as any).INSPECTOR = localInspector;\n }\n return localInspector;\n };\n\n if (typeof editor.showInspector === 'function') {\n const originalShowInspector = editor.showInspector.bind(editor);\n editor.showInspector = async (...args: unknown[]) => {\n await ensureLocalInspector();\n return originalShowInspector(...args);\n };\n }\n\n if (typeof editor.loadV2 === 'function') {\n const originalLoadV2 = editor.loadV2.bind(editor);\n editor.loadV2 = async (...args: unknown[]) => {\n const localInspector = await ensureLocalInspector();\n if (localInspector?.ShowInspector) return localInspector;\n return originalLoadV2(...args);\n };\n }\n\n editor.__fpsGameEditorLocalInspectorLoadPatched = true;\n return true;\n };\n\n return tryPatch();\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fps-games/editor-forge-play",
|
|
3
|
-
"version": "0.2.1-beta.
|
|
3
|
+
"version": "0.2.1-beta.4",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Forge Play bridge adapter for fps-game-editor.",
|
|
@@ -14,6 +14,6 @@
|
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@fps-games/editor-protocol": "0.2.1-beta.
|
|
17
|
+
"@fps-games/editor-protocol": "0.2.1-beta.4"
|
|
18
18
|
}
|
|
19
19
|
}
|
|
@@ -18,6 +18,8 @@ export declare const PLAYABLE_EDITOR_COMMAND_NAME: {
|
|
|
18
18
|
readonly SELECTION_DUPLICATE: "selection.duplicate";
|
|
19
19
|
};
|
|
20
20
|
export declare const PLAYABLE_EDITOR_EVENT_NAME: {
|
|
21
|
+
readonly EDITOR_SESSION_READY: "editor.session.ready";
|
|
22
|
+
readonly DOCUMENT_COMMITTED: "document.committed";
|
|
21
23
|
readonly DOCUMENT_EXPORTED: "document.exported";
|
|
22
24
|
readonly UNDO_RESULT: "history.undo.result";
|
|
23
25
|
readonly REDO_RESULT: "history.redo.result";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../src/bridge-command/protocol.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,iBAAiB,EACjB,eAAe,EACf,qBAAqB,EACtB,MAAM,4BAA4B,CAAC;AAEpC,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;CAAsB,CAAC;AAChE,eAAO,MAAM,0BAA0B
|
|
1
|
+
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../src/bridge-command/protocol.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,iBAAiB,EACjB,eAAe,EACf,qBAAqB,EACtB,MAAM,4BAA4B,CAAC;AAEpC,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;CAAsB,CAAC;AAChE,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;CAAoB,CAAC;AAC5D,eAAO,MAAM,4BAA4B;;CAAsB,CAAC;AAEhE,MAAM,MAAM,yBAAyB,GAAG,iBAAiB,CAAC;AAC1D,MAAM,MAAM,uBAAuB,GAAG,eAAe,CAAC;AACtD,MAAM,MAAM,6BAA6B,GAAG,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/document/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,sBAAsB,EAC3B,KAAK,2BAA2B,EACjC,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACV,0BAA0B,EAC3B,MAAM,2BAA2B,CAAC;AASnC,OAAO,KAAK,EAEV,gBAAgB,EAChB,mBAAmB,EACnB,qBAAqB,EACrB,qCAAqC,EAErC,iCAAiC,EACjC,mBAAmB,EACnB,qBAAqB,EACrB,yBAAyB,EACzB,2BAA2B,EAC3B,6BAA6B,EAG7B,+BAA+B,EAC/B,0BAA0B,EAC1B,iCAAiC,EAEjC,yBAAyB,EACzB,sCAAsC,EACtC,6BAA6B,EAC7B,mBAAmB,EACpB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EACV,uCAAuC,EACvC,oBAAoB,EACrB,MAAM,+BAA+B,CAAC;AAEvC,eAAO,MAAM,uCAAuC,IAAI,CAAC;AACzD,eAAO,MAAM,wCAAwC,gBAAgB,CAAC;AACtE,eAAO,MAAM,yCAAyC,iBAAiB,CAAC;AAexE,wBAAgB,wBAAwB,CAAC,SAAS,SAAS,mBAAmB,EAC5E,QAAQ,EAAE,SAAS,GAClB,SAAS,
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/document/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KA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C,GAAG,SAAS,CAUpD;AAED,wBAAgB,yCAAyC,CACvD,KAAK,EAAE,OAAO,GACb,qCAAqC,GAAG,IAAI,CAE9C;AAED,wBAAgB,mCAAmC,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAEjF;AA+CD,wBAAgB,2BAA2B,IAAI,MAAM,CAGpD;AAED,wBAAgB,oCAAoC,CAClD,QAAQ,EAAE,mBAAmB,EAC7B,WAAW,EAAE,MAAM,GAClB,MAAM,CAWR;AAqBD,wBAAgB,wCAAwC,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAStF"}
|
|
@@ -17,7 +17,47 @@ const EDITOR_SCENE_PREFAB_CORE_MATERIAL_OVERRIDE_PROFILE_FIELD_PATHS = new Set([
|
|
|
17
17
|
'profile.emission.texture.textureAssetId',
|
|
18
18
|
]);
|
|
19
19
|
export function cloneEditorSceneDocument(document) {
|
|
20
|
-
|
|
20
|
+
try {
|
|
21
|
+
return cloneEditorSceneAuthoredValue(document, new WeakMap());
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
if (error !== UNSUPPORTED_EDITOR_SCENE_AUTHORED_CLONE_VALUE)
|
|
25
|
+
throw error;
|
|
26
|
+
return structuredClone(document);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
const UNSUPPORTED_EDITOR_SCENE_AUTHORED_CLONE_VALUE = Symbol('unsupported-editor-scene-authored-clone-value');
|
|
30
|
+
function cloneEditorSceneAuthoredValue(value, clones) {
|
|
31
|
+
const valueType = typeof value;
|
|
32
|
+
if (valueType === 'function' || valueType === 'symbol') {
|
|
33
|
+
throw UNSUPPORTED_EDITOR_SCENE_AUTHORED_CLONE_VALUE;
|
|
34
|
+
}
|
|
35
|
+
if (value === null || valueType !== 'object')
|
|
36
|
+
return value;
|
|
37
|
+
const objectValue = value;
|
|
38
|
+
const existing = clones.get(objectValue);
|
|
39
|
+
if (existing !== undefined)
|
|
40
|
+
return existing;
|
|
41
|
+
if (Array.isArray(value)) {
|
|
42
|
+
const clone = new Array(value.length);
|
|
43
|
+
clones.set(objectValue, clone);
|
|
44
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
45
|
+
if (index in value)
|
|
46
|
+
clone[index] = cloneEditorSceneAuthoredValue(value[index], clones);
|
|
47
|
+
}
|
|
48
|
+
return clone;
|
|
49
|
+
}
|
|
50
|
+
const prototype = Object.getPrototypeOf(value);
|
|
51
|
+
if (prototype !== Object.prototype && prototype !== null) {
|
|
52
|
+
throw UNSUPPORTED_EDITOR_SCENE_AUTHORED_CLONE_VALUE;
|
|
53
|
+
}
|
|
54
|
+
const recordValue = value;
|
|
55
|
+
const clone = prototype === null ? Object.create(null) : {};
|
|
56
|
+
clones.set(objectValue, clone);
|
|
57
|
+
for (const key of Object.keys(recordValue)) {
|
|
58
|
+
clone[key] = cloneEditorSceneAuthoredValue(recordValue[key], clones);
|
|
59
|
+
}
|
|
60
|
+
return clone;
|
|
21
61
|
}
|
|
22
62
|
export function findEditorSceneTransform(gameObject) {
|
|
23
63
|
return gameObject.components.find(isEditorSceneTransformComponent) ?? null;
|