@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
package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play-types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PlayableLocalEditorDataSafetyOperation, PlayableLocalEditorInteractionPolicy, PlayableLocalEditorLoadingOverlayContent, PlayableLocalEditorSaveFailureState, PlayableLocalEditorUnsavedChangesState } from './types';
|
|
1
|
+
import type { PlayableLocalEditorDataSafetyOperation, PlayableLocalEditorInteractionPolicy, PlayableLocalEditorLoadingOverlayContent, PlayableLocalEditorPreparedAuthoringSource, PlayableLocalEditorSaveFailureState, PlayableLocalEditorUnsavedChangesState } from './types';
|
|
2
2
|
export type PlayableForgePlayMode = 'play' | 'edit';
|
|
3
3
|
export interface PlayableForgePlayMessageEvent {
|
|
4
4
|
source: unknown;
|
|
@@ -72,7 +72,25 @@ export interface PlayableForgePlaySaveState {
|
|
|
72
72
|
}
|
|
73
73
|
export interface PlayableForgePlayDocumentExportResult {
|
|
74
74
|
documentFingerprint: string | null;
|
|
75
|
+
documentRevision: number | null;
|
|
76
|
+
expectedVersion?: number;
|
|
77
|
+
preparedAuthoringSource?: PlayableLocalEditorPreparedAuthoringSource;
|
|
75
78
|
}
|
|
79
|
+
export type PlayableForgePlaySaveTransactionPhase = 'idle' | 'preparing-authoring' | 'awaiting-platform-commit' | 'committing' | 'committed' | 'rejected';
|
|
80
|
+
export interface PlayableForgePlaySaveTransactionRejection {
|
|
81
|
+
code: string;
|
|
82
|
+
message?: string;
|
|
83
|
+
}
|
|
84
|
+
export interface PlayableForgePlaySaveTransactionSnapshot {
|
|
85
|
+
readonly requestId: string | null;
|
|
86
|
+
readonly phase: PlayableForgePlaySaveTransactionPhase;
|
|
87
|
+
readonly stage: 'document.export' | 'document.commit' | null;
|
|
88
|
+
readonly expectedVersion?: number;
|
|
89
|
+
readonly actualVersion?: number;
|
|
90
|
+
readonly rejection: Readonly<PlayableForgePlaySaveTransactionRejection> | null;
|
|
91
|
+
}
|
|
92
|
+
/** @deprecated Use PlayableForgePlaySaveTransactionSnapshot. */
|
|
93
|
+
export type PlayableForgePlaySaveTransaction = PlayableForgePlaySaveTransactionSnapshot;
|
|
76
94
|
export interface PlayableForgePlayBridgeInstallOptions {
|
|
77
95
|
window: PlayableForgePlayWindowLike;
|
|
78
96
|
harness: PlayableForgePlayBridgeHarness;
|
|
@@ -94,6 +112,8 @@ export interface PlayableForgePlayBridgeInstallOptions {
|
|
|
94
112
|
payload: Record<string, unknown>;
|
|
95
113
|
saveState: PlayableForgePlaySaveState;
|
|
96
114
|
documentFingerprint: string | null;
|
|
115
|
+
documentRevision: number | null;
|
|
116
|
+
preparedAuthoringSource?: PlayableLocalEditorPreparedAuthoringSource;
|
|
97
117
|
}) => Promise<void>;
|
|
98
118
|
exitEditor?: (reason: 'save' | 'discard') => Promise<boolean>;
|
|
99
119
|
handleProjectAssetCommand?: (name: string, payload: Record<string, unknown>) => Promise<void>;
|
|
@@ -106,6 +126,8 @@ export interface PlayableForgePlayBridgeInstallOptions {
|
|
|
106
126
|
reportError?: (error: unknown) => void;
|
|
107
127
|
initialMode?: PlayableForgePlayMode;
|
|
108
128
|
overlayHideDelayMs?: number;
|
|
129
|
+
/** Test hook for deterministic bridge-session assertions. */
|
|
130
|
+
createSessionId?: () => string;
|
|
109
131
|
}
|
|
110
132
|
export interface PlayableForgePlayModeBridge {
|
|
111
133
|
switchMode(mode: PlayableForgePlayMode, options?: {
|
|
@@ -113,7 +135,11 @@ export interface PlayableForgePlayModeBridge {
|
|
|
113
135
|
}): Promise<void>;
|
|
114
136
|
commitPlatformSave(): Promise<void>;
|
|
115
137
|
getMode(): PlayableForgePlayMode;
|
|
138
|
+
getSessionId(): string;
|
|
116
139
|
getSaveState(): PlayableForgePlaySaveState;
|
|
140
|
+
getSaveTransaction(): PlayableForgePlaySaveTransactionSnapshot;
|
|
141
|
+
acknowledgeEditorSessionReady(): void;
|
|
142
|
+
postEvent(name: string, payload?: Record<string, unknown>): void;
|
|
117
143
|
dispose(): void;
|
|
118
144
|
}
|
|
119
145
|
//# sourceMappingURL=forge-play-types.d.ts.map
|
package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play-types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forge-play-types.d.ts","sourceRoot":"","sources":["../../src/local-harness/forge-play-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sCAAsC,EACtC,oCAAoC,EACpC,wCAAwC,EACxC,mCAAmC,EACnC,sCAAsC,EACvC,MAAM,SAAS,CAAC;AAEjB,MAAM,MAAM,qBAAqB,GAAG,MAAM,GAAG,MAAM,CAAC;AAEpD,MAAM,WAAW,6BAA6B;IAC5C,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,OAAO,CAAC;IACd,wBAAwB,CAAC,EAAE,MAAM,IAAI,CAA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,IAAI,IAAI,CAAC;IACtC,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACjE,OAAO,IAAI,IAAI,CAAC;CACjB"}
|
package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play-types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forge-play-types.js","sourceRoot":"","sources":["../../src/local-harness/forge-play-types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n PlayableLocalEditorDataSafetyOperation,\n PlayableLocalEditorInteractionPolicy,\n PlayableLocalEditorLoadingOverlayContent,\n PlayableLocalEditorSaveFailureState,\n PlayableLocalEditorUnsavedChangesState,\n} from './types';\n\nexport type PlayableForgePlayMode = 'play' | 'edit';\n\nexport interface PlayableForgePlayMessageEvent {\n source: unknown;\n data: unknown;\n stopImmediatePropagation?: () => void;\n}\n\nexport interface PlayableForgePlayWindowLike {\n parent: {\n postMessage(message: unknown, targetOrigin: string): void;\n } | null;\n addEventListener(\n type: 'message',\n listener: (event: PlayableForgePlayMessageEvent) => void,\n options?: { capture?: boolean },\n ): void;\n removeEventListener(\n type: 'message',\n listener: (event: PlayableForgePlayMessageEvent) => void,\n options?: { capture?: boolean },\n ): void;\n setTimeout(handler: () => void, timeout: number): unknown;\n clearTimeout(id: unknown): void;\n queueMicrotask?(handler: () => void): void;\n}\n\nexport type PlayableForgePlayOperationOrigin = 'user' | 'agent' | 'system';\nexport type PlayableForgePlayProjectionWaitPolicy = 'none' | 'settled';\nexport type PlayableForgePlayHistoryOperation = 'undo' | 'redo';\n\nexport interface PlayableForgePlayHistoryOperationOptions {\n origin?: PlayableForgePlayOperationOrigin;\n waitForProjection?: PlayableForgePlayProjectionWaitPolicy;\n}\n\nexport interface PlayableForgePlayHistoryProjectionResult {\n waitPolicy: PlayableForgePlayProjectionWaitPolicy;\n idle: boolean;\n activeBatchIds: number[];\n lastBatch: unknown | null;\n}\n\nexport interface PlayableForgePlayHistoryStateResult {\n canUndo: boolean;\n canRedo: boolean;\n}\n\nexport interface PlayableForgePlayHistoryOperationResult<TDocument = unknown> {\n ok: boolean;\n operation: PlayableForgePlayHistoryOperation;\n origin: PlayableForgePlayOperationOrigin;\n waitForProjection: PlayableForgePlayProjectionWaitPolicy;\n documentChanged: boolean;\n transactionLabel: string | null;\n workingDocument: TDocument | null;\n dirty: boolean;\n history: PlayableForgePlayHistoryStateResult;\n status: string;\n projection: PlayableForgePlayHistoryProjectionResult;\n error?: string;\n}\n\nexport interface PlayableForgePlayBridgeHarness {\n enterEditor(): Promise<void>;\n saveScene(): Promise<boolean>;\n discardAndRunGame(): Promise<void>;\n render(): void;\n getWorkingDocument(): unknown | null;\n getUnsavedChangesState?(): PlayableLocalEditorUnsavedChangesState;\n getSaveFailureState?(): PlayableLocalEditorSaveFailureState | null;\n undo?(options?: PlayableForgePlayHistoryOperationOptions): Promise<PlayableForgePlayHistoryOperationResult>;\n redo?(options?: PlayableForgePlayHistoryOperationOptions): Promise<PlayableForgePlayHistoryOperationResult>;\n}\n\nexport interface PlayableForgePlayBridgeLoadingOverlay {\n show(content: PlayableLocalEditorLoadingOverlayContent): void;\n hide(): void;\n isVisible(): boolean;\n}\n\nexport interface PlayableForgePlaySaveState {\n preparedRevision: number;\n committedRevision: number;\n}\n\nexport interface PlayableForgePlayDocumentExportResult {\n documentFingerprint: string | null;\n}\n\nexport interface PlayableForgePlayBridgeInstallOptions {\n window: PlayableForgePlayWindowLike;\n harness: PlayableForgePlayBridgeHarness;\n loadingOverlay: PlayableForgePlayBridgeLoadingOverlay;\n loadingContent: {\n saveScene: PlayableLocalEditorLoadingOverlayContent;\n saveAndRunGame: PlayableLocalEditorLoadingOverlayContent;\n discardAndRunGame: PlayableLocalEditorLoadingOverlayContent;\n };\n exportDocument?: (input: {\n payload: Record<string, unknown>;\n saveState: PlayableForgePlaySaveState;\n postEvent: (name: string, payload?: Record<string, unknown>) => void;\n }) => Promise<PlayableForgePlayDocumentExportResult> | PlayableForgePlayDocumentExportResult;\n saveDocument?: (operation: PlayableLocalEditorDataSafetyOperation) => Promise<boolean>;\n saveAndExitEditor?: (operation: PlayableLocalEditorDataSafetyOperation) => Promise<boolean>;\n preflightRun?: () => Promise<boolean>;\n commitDocument?: (input: {\n payload: Record<string, unknown>;\n saveState: PlayableForgePlaySaveState;\n documentFingerprint: string | null;\n }) => Promise<void>;\n exitEditor?: (reason: 'save' | 'discard') => Promise<boolean>;\n handleProjectAssetCommand?: (name: string, payload: Record<string, unknown>) => Promise<void>;\n handleAssetDrop?: (payload: Record<string, unknown>) => void;\n hasUnsavedPlatformChanges?: () => boolean;\n interactions?: PlayableLocalEditorInteractionPolicy;\n waitForPaint?: () => Promise<void>;\n renderAfterEnter?: boolean;\n readMode?: () => PlayableForgePlayMode;\n reportError?: (error: unknown) => void;\n initialMode?: PlayableForgePlayMode;\n overlayHideDelayMs?: number;\n}\n\nexport interface PlayableForgePlayModeBridge {\n switchMode(mode: PlayableForgePlayMode, options?: { save?: boolean }): Promise<void>;\n commitPlatformSave(): Promise<void>;\n getMode(): PlayableForgePlayMode;\n getSaveState(): PlayableForgePlaySaveState;\n dispose(): void;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"forge-play-types.js","sourceRoot":"","sources":["../../src/local-harness/forge-play-types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n PlayableLocalEditorDataSafetyOperation,\n PlayableLocalEditorInteractionPolicy,\n PlayableLocalEditorLoadingOverlayContent,\n PlayableLocalEditorPreparedAuthoringSource,\n PlayableLocalEditorSaveFailureState,\n PlayableLocalEditorUnsavedChangesState,\n} from './types';\n\nexport type PlayableForgePlayMode = 'play' | 'edit';\n\nexport interface PlayableForgePlayMessageEvent {\n source: unknown;\n data: unknown;\n stopImmediatePropagation?: () => void;\n}\n\nexport interface PlayableForgePlayWindowLike {\n parent: {\n postMessage(message: unknown, targetOrigin: string): void;\n } | null;\n addEventListener(\n type: 'message',\n listener: (event: PlayableForgePlayMessageEvent) => void,\n options?: { capture?: boolean },\n ): void;\n removeEventListener(\n type: 'message',\n listener: (event: PlayableForgePlayMessageEvent) => void,\n options?: { capture?: boolean },\n ): void;\n setTimeout(handler: () => void, timeout: number): unknown;\n clearTimeout(id: unknown): void;\n queueMicrotask?(handler: () => void): void;\n}\n\nexport type PlayableForgePlayOperationOrigin = 'user' | 'agent' | 'system';\nexport type PlayableForgePlayProjectionWaitPolicy = 'none' | 'settled';\nexport type PlayableForgePlayHistoryOperation = 'undo' | 'redo';\n\nexport interface PlayableForgePlayHistoryOperationOptions {\n origin?: PlayableForgePlayOperationOrigin;\n waitForProjection?: PlayableForgePlayProjectionWaitPolicy;\n}\n\nexport interface PlayableForgePlayHistoryProjectionResult {\n waitPolicy: PlayableForgePlayProjectionWaitPolicy;\n idle: boolean;\n activeBatchIds: number[];\n lastBatch: unknown | null;\n}\n\nexport interface PlayableForgePlayHistoryStateResult {\n canUndo: boolean;\n canRedo: boolean;\n}\n\nexport interface PlayableForgePlayHistoryOperationResult<TDocument = unknown> {\n ok: boolean;\n operation: PlayableForgePlayHistoryOperation;\n origin: PlayableForgePlayOperationOrigin;\n waitForProjection: PlayableForgePlayProjectionWaitPolicy;\n documentChanged: boolean;\n transactionLabel: string | null;\n workingDocument: TDocument | null;\n dirty: boolean;\n history: PlayableForgePlayHistoryStateResult;\n status: string;\n projection: PlayableForgePlayHistoryProjectionResult;\n error?: string;\n}\n\nexport interface PlayableForgePlayBridgeHarness {\n enterEditor(): Promise<void>;\n saveScene(): Promise<boolean>;\n discardAndRunGame(): Promise<void>;\n render(): void;\n getWorkingDocument(): unknown | null;\n getUnsavedChangesState?(): PlayableLocalEditorUnsavedChangesState;\n getSaveFailureState?(): PlayableLocalEditorSaveFailureState | null;\n undo?(options?: PlayableForgePlayHistoryOperationOptions): Promise<PlayableForgePlayHistoryOperationResult>;\n redo?(options?: PlayableForgePlayHistoryOperationOptions): Promise<PlayableForgePlayHistoryOperationResult>;\n}\n\nexport interface PlayableForgePlayBridgeLoadingOverlay {\n show(content: PlayableLocalEditorLoadingOverlayContent): void;\n hide(): void;\n isVisible(): boolean;\n}\n\nexport interface PlayableForgePlaySaveState {\n preparedRevision: number;\n committedRevision: number;\n}\n\nexport interface PlayableForgePlayDocumentExportResult {\n documentFingerprint: string | null;\n documentRevision: number | null;\n expectedVersion?: number;\n preparedAuthoringSource?: PlayableLocalEditorPreparedAuthoringSource;\n}\n\nexport type PlayableForgePlaySaveTransactionPhase =\n | 'idle'\n | 'preparing-authoring'\n | 'awaiting-platform-commit'\n | 'committing'\n | 'committed'\n | 'rejected';\n\nexport interface PlayableForgePlaySaveTransactionRejection {\n code: string;\n message?: string;\n}\n\nexport interface PlayableForgePlaySaveTransactionSnapshot {\n readonly requestId: string | null;\n readonly phase: PlayableForgePlaySaveTransactionPhase;\n readonly stage: 'document.export' | 'document.commit' | null;\n readonly expectedVersion?: number;\n readonly actualVersion?: number;\n readonly rejection: Readonly<PlayableForgePlaySaveTransactionRejection> | null;\n}\n\n/** @deprecated Use PlayableForgePlaySaveTransactionSnapshot. */\nexport type PlayableForgePlaySaveTransaction = PlayableForgePlaySaveTransactionSnapshot;\n\nexport interface PlayableForgePlayBridgeInstallOptions {\n window: PlayableForgePlayWindowLike;\n harness: PlayableForgePlayBridgeHarness;\n loadingOverlay: PlayableForgePlayBridgeLoadingOverlay;\n loadingContent: {\n saveScene: PlayableLocalEditorLoadingOverlayContent;\n saveAndRunGame: PlayableLocalEditorLoadingOverlayContent;\n discardAndRunGame: PlayableLocalEditorLoadingOverlayContent;\n };\n exportDocument?: (input: {\n payload: Record<string, unknown>;\n saveState: PlayableForgePlaySaveState;\n postEvent: (name: string, payload?: Record<string, unknown>) => void;\n }) => Promise<PlayableForgePlayDocumentExportResult> | PlayableForgePlayDocumentExportResult;\n saveDocument?: (operation: PlayableLocalEditorDataSafetyOperation) => Promise<boolean>;\n saveAndExitEditor?: (operation: PlayableLocalEditorDataSafetyOperation) => Promise<boolean>;\n preflightRun?: () => Promise<boolean>;\n commitDocument?: (input: {\n payload: Record<string, unknown>;\n saveState: PlayableForgePlaySaveState;\n documentFingerprint: string | null;\n documentRevision: number | null;\n preparedAuthoringSource?: PlayableLocalEditorPreparedAuthoringSource;\n }) => Promise<void>;\n exitEditor?: (reason: 'save' | 'discard') => Promise<boolean>;\n handleProjectAssetCommand?: (name: string, payload: Record<string, unknown>) => Promise<void>;\n handleAssetDrop?: (payload: Record<string, unknown>) => void;\n hasUnsavedPlatformChanges?: () => boolean;\n interactions?: PlayableLocalEditorInteractionPolicy;\n waitForPaint?: () => Promise<void>;\n renderAfterEnter?: boolean;\n readMode?: () => PlayableForgePlayMode;\n reportError?: (error: unknown) => void;\n initialMode?: PlayableForgePlayMode;\n overlayHideDelayMs?: number;\n /** Test hook for deterministic bridge-session assertions. */\n createSessionId?: () => string;\n}\n\nexport interface PlayableForgePlayModeBridge {\n switchMode(mode: PlayableForgePlayMode, options?: { save?: boolean }): Promise<void>;\n commitPlatformSave(): Promise<void>;\n getMode(): PlayableForgePlayMode;\n getSessionId(): string;\n getSaveState(): PlayableForgePlaySaveState;\n getSaveTransaction(): PlayableForgePlaySaveTransactionSnapshot;\n acknowledgeEditorSessionReady(): void;\n postEvent(name: string, payload?: Record<string, unknown>): void;\n dispose(): void;\n}\n"]}
|
|
@@ -19,11 +19,13 @@ export declare const PLAYABLE_FORGE_PLAY_COMMAND: {
|
|
|
19
19
|
};
|
|
20
20
|
export declare const PLAYABLE_FORGE_PLAY_EVENT: {
|
|
21
21
|
readonly SCENE_READY: "scene.ready";
|
|
22
|
+
readonly EDITOR_SESSION_READY: "editor.session.ready";
|
|
22
23
|
readonly FIRST_FRAME: "scene.first_frame";
|
|
23
24
|
readonly MODE_CHANGE: "mode.change";
|
|
24
25
|
readonly HISTORY_UNDO_RESULT: "history.undo.result";
|
|
25
26
|
readonly HISTORY_REDO_RESULT: "history.redo.result";
|
|
26
27
|
readonly DOCUMENT_EXPORTED: "document.exported";
|
|
28
|
+
readonly DOCUMENT_COMMITTED: "document.committed";
|
|
27
29
|
readonly ASSET_IMPORT_RESULT: "asset.import.result";
|
|
28
30
|
readonly ASSET_UPDATE_RESULT: "asset.update.result";
|
|
29
31
|
readonly ASSET_LIBRARY_REFRESHED: "asset.library.refreshed";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forge-play.d.ts","sourceRoot":"","sources":["../../src/local-harness/forge-play.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,qCAAqC,EACrC,iCAAiC,EACjC,wCAAwC,EAIxC,2BAA2B,EAC3B,0BAA0B,
|
|
1
|
+
{"version":3,"file":"forge-play.d.ts","sourceRoot":"","sources":["../../src/local-harness/forge-play.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,qCAAqC,EACrC,iCAAiC,EACjC,wCAAwC,EAIxC,2BAA2B,EAC3B,0BAA0B,EAG1B,2BAA2B,EAC5B,MAAM,oBAAoB,CAAC;AAS5B,eAAO,MAAM,iCAAiC,2BAA2B,CAAC;AAE1E,eAAO,MAAM,gCAAgC;;;CAGnC,CAAC;AAEX,eAAO,MAAM,2BAA2B;;;;;;;;;;;;CAY9B,CAAC;AAEX,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;CAc5B,CAAC;AAEX,eAAO,MAAM,iCAAiC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAc/E,CAAC;AAEF,eAAO,MAAM,mCAAmC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAYtE,CAAC;AAEF,eAAO,MAAM,0CAA0C,aAMrD,CAAC;AAEH,eAAO,MAAM,oCAAoC,aAG/C,CAAC;AAEH,wBAAgB,gCAAgC,IAAI,0BAA0B,CAK7E;AAiBD,wBAAgB,qCAAqC,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAGnF;AAED,wBAAgB,8BAA8B,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,SAAS,CAInG;AAED,wBAAgB,4CAA4C,CAC1D,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,wCAAwC,CAK1C;AAED,wBAAgB,0CAA0C,CACxD,SAAS,EAAE,iCAAiC,GAC3C,MAAM,CAIR;AAED,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,IAAI,CAAC,2BAA2B,EAAE,QAAQ,CAAC,EACvD,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GACpC,IAAI,CAcN;AAQD,wBAAgB,kCAAkC,CAChD,OAAO,EAAE,qCAAqC,GAC7C,2BAA2B,CA0pB7B;AAED,wBAAgB,0CAA0C,CAAC,QAAQ,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAO3F"}
|
|
@@ -19,11 +19,13 @@ export const PLAYABLE_FORGE_PLAY_COMMAND = {
|
|
|
19
19
|
};
|
|
20
20
|
export const PLAYABLE_FORGE_PLAY_EVENT = {
|
|
21
21
|
SCENE_READY: 'scene.ready',
|
|
22
|
+
EDITOR_SESSION_READY: 'editor.session.ready',
|
|
22
23
|
FIRST_FRAME: 'scene.first_frame',
|
|
23
24
|
MODE_CHANGE: 'mode.change',
|
|
24
25
|
HISTORY_UNDO_RESULT: 'history.undo.result',
|
|
25
26
|
HISTORY_REDO_RESULT: 'history.redo.result',
|
|
26
27
|
DOCUMENT_EXPORTED: 'document.exported',
|
|
28
|
+
DOCUMENT_COMMITTED: 'document.committed',
|
|
27
29
|
ASSET_IMPORT_RESULT: 'asset.import.result',
|
|
28
30
|
ASSET_UPDATE_RESULT: 'asset.update.result',
|
|
29
31
|
ASSET_LIBRARY_REFRESHED: 'asset.library.refreshed',
|
|
@@ -32,11 +34,13 @@ export const PLAYABLE_FORGE_PLAY_EVENT = {
|
|
|
32
34
|
};
|
|
33
35
|
export const PLAYABLE_FORGE_PLAY_EVENT_ALIASES = {
|
|
34
36
|
[PLAYABLE_FORGE_PLAY_EVENT.SCENE_READY]: ['scene:ready', 'lifecycle:ready'],
|
|
37
|
+
[PLAYABLE_FORGE_PLAY_EVENT.EDITOR_SESSION_READY]: ['editor:session:ready'],
|
|
35
38
|
[PLAYABLE_FORGE_PLAY_EVENT.FIRST_FRAME]: ['scene:first_frame', 'lifecycle:firstFrame'],
|
|
36
39
|
[PLAYABLE_FORGE_PLAY_EVENT.MODE_CHANGE]: ['mode:change', 'mode:changed'],
|
|
37
40
|
[PLAYABLE_FORGE_PLAY_EVENT.HISTORY_UNDO_RESULT]: ['history:undo:result'],
|
|
38
41
|
[PLAYABLE_FORGE_PLAY_EVENT.HISTORY_REDO_RESULT]: ['history:redo:result'],
|
|
39
42
|
[PLAYABLE_FORGE_PLAY_EVENT.DOCUMENT_EXPORTED]: ['document:exported'],
|
|
43
|
+
[PLAYABLE_FORGE_PLAY_EVENT.DOCUMENT_COMMITTED]: ['document:committed'],
|
|
40
44
|
[PLAYABLE_FORGE_PLAY_EVENT.ASSET_IMPORT_RESULT]: ['asset:import:result'],
|
|
41
45
|
[PLAYABLE_FORGE_PLAY_EVENT.ASSET_UPDATE_RESULT]: ['asset:update:result'],
|
|
42
46
|
[PLAYABLE_FORGE_PLAY_EVENT.ASSET_LIBRARY_REFRESHED]: ['asset:library:refreshed'],
|
|
@@ -73,6 +77,19 @@ export function createPlayableForgePlaySaveState() {
|
|
|
73
77
|
committedRevision: 0,
|
|
74
78
|
};
|
|
75
79
|
}
|
|
80
|
+
function createPlayableForgePlaySaveTransaction() {
|
|
81
|
+
return {
|
|
82
|
+
requestId: null,
|
|
83
|
+
phase: 'idle',
|
|
84
|
+
stage: null,
|
|
85
|
+
rejection: null,
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
function readPlayableForgePlayPlatformVersion(payload) {
|
|
89
|
+
return typeof payload.version === 'number' && Number.isFinite(payload.version)
|
|
90
|
+
? payload.version
|
|
91
|
+
: undefined;
|
|
92
|
+
}
|
|
76
93
|
export function normalizePlayableForgePlayCommandName(value) {
|
|
77
94
|
if (typeof value !== 'string')
|
|
78
95
|
return null;
|
|
@@ -118,9 +135,15 @@ function readPlayableForgePlayHistoryOrigin(value) {
|
|
|
118
135
|
}
|
|
119
136
|
export function installPlayableForgePlayModeBridge(options) {
|
|
120
137
|
let currentMode = options.initialMode ?? 'play';
|
|
138
|
+
const sessionId = options.createSessionId?.()
|
|
139
|
+
?? `fps-${Date.now()}-${Math.random().toString(36).slice(2)}`;
|
|
121
140
|
let inFlight = null;
|
|
122
141
|
const saveState = createPlayableForgePlaySaveState();
|
|
142
|
+
let saveTransaction = createPlayableForgePlaySaveTransaction();
|
|
123
143
|
let preparedDocumentFingerprint = null;
|
|
144
|
+
let preparedDocumentRevision = null;
|
|
145
|
+
let preparedCommittedDocumentFingerprint = null;
|
|
146
|
+
let preparedAuthoringSource = null;
|
|
124
147
|
let committedDocumentFingerprint = null;
|
|
125
148
|
let preparedRequestId = null;
|
|
126
149
|
let commitInFlight = null;
|
|
@@ -131,10 +154,46 @@ export function installPlayableForgePlayModeBridge(options) {
|
|
|
131
154
|
const invalidatePreparedPlatformSave = () => {
|
|
132
155
|
saveState.preparedRevision = saveState.committedRevision;
|
|
133
156
|
preparedDocumentFingerprint = null;
|
|
157
|
+
preparedDocumentRevision = null;
|
|
158
|
+
preparedCommittedDocumentFingerprint = null;
|
|
159
|
+
preparedAuthoringSource = null;
|
|
134
160
|
preparedRequestId = null;
|
|
135
161
|
};
|
|
162
|
+
const setSaveTransaction = (phase, input = {}) => {
|
|
163
|
+
const value = (key, fallback) => (Object.prototype.hasOwnProperty.call(input, key) ? input[key] : fallback);
|
|
164
|
+
const expectedVersion = value('expectedVersion', saveTransaction.expectedVersion);
|
|
165
|
+
const actualVersion = value('actualVersion', saveTransaction.actualVersion);
|
|
166
|
+
saveTransaction = {
|
|
167
|
+
requestId: value('requestId', saveTransaction.requestId),
|
|
168
|
+
phase,
|
|
169
|
+
stage: value('stage', saveTransaction.stage),
|
|
170
|
+
...(expectedVersion === undefined ? {} : { expectedVersion }),
|
|
171
|
+
...(actualVersion === undefined ? {} : { actualVersion }),
|
|
172
|
+
rejection: value('rejection', null),
|
|
173
|
+
};
|
|
174
|
+
};
|
|
136
175
|
const postEvent = (name, payload = {}) => {
|
|
137
|
-
postPlayableForgePlayEvent(options.window, name, payload);
|
|
176
|
+
postPlayableForgePlayEvent(options.window, name, { ...payload, sessionId });
|
|
177
|
+
};
|
|
178
|
+
const acknowledgeEditorSessionReady = () => {
|
|
179
|
+
if (readMode() !== 'edit' || options.harness.getWorkingDocument() === null)
|
|
180
|
+
return;
|
|
181
|
+
postEvent(PLAYABLE_FORGE_PLAY_EVENT.EDITOR_SESSION_READY, {
|
|
182
|
+
mode: 'edit',
|
|
183
|
+
editorSessionReady: true,
|
|
184
|
+
});
|
|
185
|
+
};
|
|
186
|
+
const reportSaveTransactionError = (input) => {
|
|
187
|
+
const has = (key) => Object.prototype.hasOwnProperty.call(input, key);
|
|
188
|
+
postEvent(PLAYABLE_FORGE_PLAY_EVENT.SYSTEM_ERROR, {
|
|
189
|
+
code: input.code,
|
|
190
|
+
stage: input.stage,
|
|
191
|
+
expectedRequestId: has('expectedRequestId') ? input.expectedRequestId : saveTransaction.requestId,
|
|
192
|
+
actualRequestId: input.actualRequestId,
|
|
193
|
+
expectedVersion: has('expectedVersion') ? input.expectedVersion : saveTransaction.expectedVersion,
|
|
194
|
+
actualVersion: has('actualVersion') ? input.actualVersion : null,
|
|
195
|
+
...(input.message ? { message: input.message } : {}),
|
|
196
|
+
});
|
|
138
197
|
};
|
|
139
198
|
const notifySaveFailed = async (operation, error) => {
|
|
140
199
|
const notify = options.interactions?.notifySaveFailed;
|
|
@@ -248,6 +307,8 @@ export function installPlayableForgePlayModeBridge(options) {
|
|
|
248
307
|
await inFlight;
|
|
249
308
|
if (readMode() === mode && !shouldRunExit()) {
|
|
250
309
|
postEvent(PLAYABLE_FORGE_PLAY_EVENT.MODE_CHANGE, { mode });
|
|
310
|
+
if (mode === 'edit')
|
|
311
|
+
acknowledgeEditorSessionReady();
|
|
251
312
|
return;
|
|
252
313
|
}
|
|
253
314
|
inFlight = (async () => {
|
|
@@ -269,8 +330,12 @@ export function installPlayableForgePlayModeBridge(options) {
|
|
|
269
330
|
saveState.preparedRevision = 0;
|
|
270
331
|
saveState.committedRevision = 0;
|
|
271
332
|
preparedDocumentFingerprint = null;
|
|
333
|
+
preparedDocumentRevision = null;
|
|
334
|
+
preparedCommittedDocumentFingerprint = null;
|
|
335
|
+
preparedAuthoringSource = null;
|
|
272
336
|
committedDocumentFingerprint = null;
|
|
273
337
|
preparedRequestId = null;
|
|
338
|
+
saveTransaction = createPlayableForgePlaySaveTransaction();
|
|
274
339
|
await options.harness.enterEditor();
|
|
275
340
|
if (options.renderAfterEnter !== false)
|
|
276
341
|
options.harness.render();
|
|
@@ -369,41 +434,112 @@ export function installPlayableForgePlayModeBridge(options) {
|
|
|
369
434
|
})();
|
|
370
435
|
try {
|
|
371
436
|
await inFlight;
|
|
437
|
+
if (mode === 'edit')
|
|
438
|
+
acknowledgeEditorSessionReady();
|
|
372
439
|
}
|
|
373
440
|
finally {
|
|
374
441
|
inFlight = null;
|
|
375
442
|
}
|
|
376
443
|
};
|
|
377
444
|
const commitPlatformSave = async (payload = {}) => {
|
|
445
|
+
const requestId = readPlayableForgePlayRequestId(payload) ?? null;
|
|
446
|
+
const actualVersion = readPlayableForgePlayPlatformVersion(payload);
|
|
447
|
+
if (!requestId) {
|
|
448
|
+
reportSaveTransactionError({
|
|
449
|
+
code: 'document_commit_request_id_required',
|
|
450
|
+
stage: 'document.commit',
|
|
451
|
+
actualRequestId: null,
|
|
452
|
+
actualVersion,
|
|
453
|
+
});
|
|
454
|
+
return;
|
|
455
|
+
}
|
|
378
456
|
if (inFlight)
|
|
379
457
|
await inFlight;
|
|
380
|
-
|
|
381
|
-
|
|
458
|
+
if (saveTransaction.phase === 'committed' && requestId === saveTransaction.requestId)
|
|
459
|
+
return;
|
|
460
|
+
if (!preparedRequestId) {
|
|
461
|
+
reportSaveTransactionError({
|
|
462
|
+
code: 'document_commit_no_pending',
|
|
463
|
+
stage: 'document.commit',
|
|
464
|
+
actualRequestId: requestId,
|
|
465
|
+
actualVersion,
|
|
466
|
+
});
|
|
467
|
+
return;
|
|
468
|
+
}
|
|
469
|
+
if (requestId !== preparedRequestId) {
|
|
470
|
+
reportSaveTransactionError({
|
|
471
|
+
code: 'document_commit_request_id_mismatch',
|
|
472
|
+
stage: 'document.commit',
|
|
473
|
+
actualRequestId: requestId,
|
|
474
|
+
expectedRequestId: preparedRequestId,
|
|
475
|
+
actualVersion,
|
|
476
|
+
});
|
|
382
477
|
return;
|
|
478
|
+
}
|
|
383
479
|
if (commitInFlight) {
|
|
384
480
|
if (commitInFlight.requestId === requestId)
|
|
385
481
|
return commitInFlight.promise;
|
|
386
482
|
await commitInFlight.promise;
|
|
387
483
|
return commitPlatformSave(payload);
|
|
388
484
|
}
|
|
389
|
-
if (saveState.preparedRevision <= saveState.committedRevision)
|
|
485
|
+
if (saveState.preparedRevision <= saveState.committedRevision) {
|
|
486
|
+
reportSaveTransactionError({
|
|
487
|
+
code: 'document_commit_no_pending',
|
|
488
|
+
stage: 'document.commit',
|
|
489
|
+
actualRequestId: requestId,
|
|
490
|
+
expectedRequestId: preparedRequestId,
|
|
491
|
+
actualVersion,
|
|
492
|
+
});
|
|
390
493
|
return;
|
|
494
|
+
}
|
|
495
|
+
setSaveTransaction('committing', {
|
|
496
|
+
requestId,
|
|
497
|
+
stage: 'document.commit',
|
|
498
|
+
actualVersion,
|
|
499
|
+
});
|
|
391
500
|
const commitOperation = (async () => {
|
|
392
501
|
try {
|
|
393
502
|
const currentDocumentFingerprint = createPlayableForgePlayDocumentFingerprint(options.harness.getWorkingDocument());
|
|
394
|
-
|
|
503
|
+
const hasProjectServiceTransaction = typeof preparedAuthoringSource?.serviceTransactionId === 'string'
|
|
504
|
+
&& preparedAuthoringSource.serviceTransactionId.length > 0;
|
|
505
|
+
if (!hasProjectServiceTransaction
|
|
506
|
+
&& currentDocumentFingerprint !== preparedDocumentFingerprint) {
|
|
395
507
|
throw new Error('Editor document changed after export; prepare a new export before commit.');
|
|
396
508
|
}
|
|
397
509
|
await options.commitDocument?.({
|
|
398
510
|
payload,
|
|
399
511
|
saveState,
|
|
400
512
|
documentFingerprint: preparedDocumentFingerprint,
|
|
513
|
+
documentRevision: preparedDocumentRevision,
|
|
514
|
+
...(preparedAuthoringSource ? { preparedAuthoringSource } : {}),
|
|
401
515
|
});
|
|
402
516
|
saveState.committedRevision = saveState.preparedRevision;
|
|
403
|
-
committedDocumentFingerprint =
|
|
517
|
+
committedDocumentFingerprint = preparedCommittedDocumentFingerprint
|
|
518
|
+
?? preparedDocumentFingerprint;
|
|
519
|
+
setSaveTransaction('committed', {
|
|
520
|
+
requestId,
|
|
521
|
+
stage: 'document.commit',
|
|
522
|
+
actualVersion,
|
|
523
|
+
});
|
|
524
|
+
postEvent(PLAYABLE_FORGE_PLAY_EVENT.DOCUMENT_COMMITTED, {
|
|
525
|
+
requestId,
|
|
526
|
+
...(saveTransaction.expectedVersion === undefined
|
|
527
|
+
? {}
|
|
528
|
+
: { expectedVersion: saveTransaction.expectedVersion }),
|
|
529
|
+
...(actualVersion === undefined ? {} : { actualVersion }),
|
|
530
|
+
});
|
|
404
531
|
}
|
|
405
532
|
catch (error) {
|
|
406
533
|
invalidatePreparedPlatformSave();
|
|
534
|
+
setSaveTransaction('rejected', {
|
|
535
|
+
requestId,
|
|
536
|
+
stage: 'document.commit',
|
|
537
|
+
actualVersion,
|
|
538
|
+
rejection: {
|
|
539
|
+
code: 'document_commit_failed',
|
|
540
|
+
message: error instanceof Error ? error.message : String(error),
|
|
541
|
+
},
|
|
542
|
+
});
|
|
407
543
|
throw error;
|
|
408
544
|
}
|
|
409
545
|
})();
|
|
@@ -443,6 +579,15 @@ export function installPlayableForgePlayModeBridge(options) {
|
|
|
443
579
|
if (message.type !== PLAYABLE_FORGE_PLAY_POST_MESSAGE.COMMAND)
|
|
444
580
|
return;
|
|
445
581
|
const payload = readRecord(message.payload);
|
|
582
|
+
const hasSessionId = Object.prototype.hasOwnProperty.call(payload, 'sessionId');
|
|
583
|
+
if (hasSessionId && payload.sessionId !== sessionId) {
|
|
584
|
+
postEvent(PLAYABLE_FORGE_PLAY_EVENT.SYSTEM_ERROR, {
|
|
585
|
+
code: 'editor_session_mismatch',
|
|
586
|
+
expectedSessionId: sessionId,
|
|
587
|
+
actualSessionId: payload.sessionId,
|
|
588
|
+
});
|
|
589
|
+
return;
|
|
590
|
+
}
|
|
446
591
|
const commandName = normalizePlayableForgePlayCommandName(payload.name);
|
|
447
592
|
if (commandName === PLAYABLE_FORGE_PLAY_COMMAND.ASSETS_DROP) {
|
|
448
593
|
options.handleAssetDrop?.(payload);
|
|
@@ -471,6 +616,18 @@ export function installPlayableForgePlayModeBridge(options) {
|
|
|
471
616
|
const requestId = readPlayableForgePlayRequestId(payload);
|
|
472
617
|
if (!requestId) {
|
|
473
618
|
scheduleSaveOverlayHide();
|
|
619
|
+
setSaveTransaction('rejected', {
|
|
620
|
+
requestId: null,
|
|
621
|
+
stage: 'document.export',
|
|
622
|
+
rejection: { code: 'document_export_request_id_required' },
|
|
623
|
+
});
|
|
624
|
+
reportSaveTransactionError({
|
|
625
|
+
code: 'document_export_request_id_required',
|
|
626
|
+
stage: 'document.export',
|
|
627
|
+
actualRequestId: null,
|
|
628
|
+
expectedRequestId: null,
|
|
629
|
+
expectedVersion: null,
|
|
630
|
+
});
|
|
474
631
|
postEvent(PLAYABLE_FORGE_PLAY_EVENT.DOCUMENT_EXPORTED, {
|
|
475
632
|
error: 'document_export_request_id_required',
|
|
476
633
|
});
|
|
@@ -484,10 +641,20 @@ export function installPlayableForgePlayModeBridge(options) {
|
|
|
484
641
|
});
|
|
485
642
|
return;
|
|
486
643
|
}
|
|
644
|
+
setSaveTransaction('preparing-authoring', {
|
|
645
|
+
requestId,
|
|
646
|
+
stage: 'document.export',
|
|
647
|
+
expectedVersion: undefined,
|
|
648
|
+
actualVersion: undefined,
|
|
649
|
+
rejection: null,
|
|
650
|
+
});
|
|
487
651
|
const exportDocument = options.exportDocument;
|
|
488
652
|
const revisionBeforeExport = saveState.preparedRevision;
|
|
489
653
|
const committedRevisionBeforeExport = saveState.committedRevision;
|
|
490
654
|
const preparedFingerprintBeforeExport = preparedDocumentFingerprint;
|
|
655
|
+
const preparedDocumentRevisionBeforeExport = preparedDocumentRevision;
|
|
656
|
+
const preparedCommittedFingerprintBeforeExport = preparedCommittedDocumentFingerprint;
|
|
657
|
+
const preparedAuthoringSourceBeforeExport = preparedAuthoringSource;
|
|
491
658
|
const committedFingerprintBeforeExport = committedDocumentFingerprint;
|
|
492
659
|
const preparedRequestIdBeforeExport = preparedRequestId;
|
|
493
660
|
const exported = exportDocument
|
|
@@ -499,15 +666,38 @@ export function installPlayableForgePlayModeBridge(options) {
|
|
|
499
666
|
throw new Error('Document export did not return the exported document fingerprint.');
|
|
500
667
|
}
|
|
501
668
|
preparedDocumentFingerprint = result.documentFingerprint;
|
|
669
|
+
preparedDocumentRevision = result.documentRevision;
|
|
670
|
+
preparedAuthoringSource = result.preparedAuthoringSource ?? null;
|
|
671
|
+
preparedCommittedDocumentFingerprint = result.preparedAuthoringSource
|
|
672
|
+
? createPlayableForgePlayDocumentFingerprint(result.preparedAuthoringSource.document)
|
|
673
|
+
: result.documentFingerprint;
|
|
502
674
|
committedDocumentFingerprint = null;
|
|
503
675
|
preparedRequestId = requestId;
|
|
676
|
+
setSaveTransaction('awaiting-platform-commit', {
|
|
677
|
+
requestId,
|
|
678
|
+
stage: 'document.export',
|
|
679
|
+
expectedVersion: result.expectedVersion,
|
|
680
|
+
actualVersion: undefined,
|
|
681
|
+
rejection: null,
|
|
682
|
+
});
|
|
504
683
|
}
|
|
505
684
|
}).catch(async (error) => {
|
|
506
685
|
saveState.preparedRevision = revisionBeforeExport;
|
|
507
686
|
saveState.committedRevision = committedRevisionBeforeExport;
|
|
508
687
|
preparedDocumentFingerprint = preparedFingerprintBeforeExport;
|
|
688
|
+
preparedDocumentRevision = preparedDocumentRevisionBeforeExport;
|
|
689
|
+
preparedCommittedDocumentFingerprint = preparedCommittedFingerprintBeforeExport;
|
|
690
|
+
preparedAuthoringSource = preparedAuthoringSourceBeforeExport;
|
|
509
691
|
committedDocumentFingerprint = committedFingerprintBeforeExport;
|
|
510
692
|
preparedRequestId = preparedRequestIdBeforeExport;
|
|
693
|
+
setSaveTransaction('rejected', {
|
|
694
|
+
requestId,
|
|
695
|
+
stage: 'document.export',
|
|
696
|
+
rejection: {
|
|
697
|
+
code: 'document_export_failed',
|
|
698
|
+
message: error instanceof Error ? error.message : String(error),
|
|
699
|
+
},
|
|
700
|
+
});
|
|
511
701
|
options.loadingOverlay.hide();
|
|
512
702
|
await notifySaveFailed('forge-play-document-export', error);
|
|
513
703
|
postEvent(PLAYABLE_FORGE_PLAY_EVENT.DOCUMENT_EXPORTED, {
|
|
@@ -545,9 +735,15 @@ export function installPlayableForgePlayModeBridge(options) {
|
|
|
545
735
|
};
|
|
546
736
|
options.window.addEventListener('message', onMessage, { capture: true });
|
|
547
737
|
const postReadyEvents = () => {
|
|
548
|
-
|
|
738
|
+
const editorSessionReady = readMode() === 'edit' && options.harness.getWorkingDocument() !== null;
|
|
739
|
+
postEvent(PLAYABLE_FORGE_PLAY_EVENT.SCENE_READY, {
|
|
740
|
+
mode: readMode(),
|
|
741
|
+
editorSessionReady,
|
|
742
|
+
});
|
|
549
743
|
postEvent(PLAYABLE_FORGE_PLAY_EVENT.FIRST_FRAME);
|
|
550
744
|
postEvent(PLAYABLE_FORGE_PLAY_EVENT.MODE_CHANGE, { mode: readMode() });
|
|
745
|
+
if (editorSessionReady)
|
|
746
|
+
acknowledgeEditorSessionReady();
|
|
551
747
|
};
|
|
552
748
|
if (options.window.queueMicrotask)
|
|
553
749
|
options.window.queueMicrotask(postReadyEvents);
|
|
@@ -559,9 +755,20 @@ export function installPlayableForgePlayModeBridge(options) {
|
|
|
559
755
|
getMode() {
|
|
560
756
|
return readMode();
|
|
561
757
|
},
|
|
758
|
+
getSessionId() {
|
|
759
|
+
return sessionId;
|
|
760
|
+
},
|
|
562
761
|
getSaveState() {
|
|
563
762
|
return saveState;
|
|
564
763
|
},
|
|
764
|
+
getSaveTransaction() {
|
|
765
|
+
return Object.freeze({
|
|
766
|
+
...saveTransaction,
|
|
767
|
+
rejection: saveTransaction.rejection ? Object.freeze({ ...saveTransaction.rejection }) : null,
|
|
768
|
+
});
|
|
769
|
+
},
|
|
770
|
+
acknowledgeEditorSessionReady,
|
|
771
|
+
postEvent,
|
|
565
772
|
dispose() {
|
|
566
773
|
clearOverlayHideTimer();
|
|
567
774
|
options.window.removeEventListener('message', onMessage, { capture: true });
|