@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,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { EDITOR_COMMAND_ID, } from '@fps-games/editor-protocol';
|
|
2
|
+
import { createLocalEditorCommandFailure, isLocalEditorCommandVec3 } from '../diagnostics.js';
|
|
3
|
+
import { createEditorCommandSafePrefabReadModel, normalizeEditorCommandString, } from '../shared.js';
|
|
4
|
+
import { findEditorCommandVisibleAssetInfo, listEditorCommandVisibleAssetInfos } from './assets.js';
|
|
5
5
|
const PREFAB_STAGE_ITEM_PREFIX = 'prefab-node:';
|
|
6
6
|
const PREFAB_ROOT_NODE_ID = 'prefab-root';
|
|
7
7
|
const ZERO_VEC3 = { x: 0, y: 0, z: 0 };
|
|
8
8
|
const ONE_VEC3 = { x: 1, y: 1, z: 1 };
|
|
9
|
-
export function
|
|
9
|
+
export function createLocalEditorCommandPrefabSource(state, options, renderUi, operations) {
|
|
10
10
|
return {
|
|
11
11
|
resolvePrefab(input) {
|
|
12
12
|
return resolvePrefabs(state, options, operations, input);
|
|
13
13
|
},
|
|
14
|
-
async openStage(input) {
|
|
14
|
+
async openStage(input, context) {
|
|
15
15
|
const resolved = resolvePrefabs(state, options, operations, input);
|
|
16
16
|
if (!resolved.resolvedPrefab) {
|
|
17
|
-
return
|
|
17
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.PREFAB_STAGE_OPEN, resolved.ambiguous
|
|
18
18
|
? 'Prefab query matched multiple prefab assets; provide assetId or browserAssetId.'
|
|
19
19
|
: 'Prefab asset not found.', { code: resolved.ambiguous ? 'prefab.ambiguous' : 'prefab.notFound' });
|
|
20
20
|
}
|
|
@@ -29,68 +29,68 @@ export function createLocalEditorAgentBridgePrefabSource(state, options, renderU
|
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
31
|
if (currentStage?.dirty && (input.dirtyAction ?? 'reject') === 'reject') {
|
|
32
|
-
return
|
|
32
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.PREFAB_STAGE_OPEN, 'The current Prefab stage has unsaved changes.', { code: 'prefab.stageDirty' });
|
|
33
33
|
}
|
|
34
34
|
const output = await operations.openPrefabStage({
|
|
35
35
|
assetId: resolved.resolvedPrefab.assetId,
|
|
36
36
|
browserAssetId: resolved.resolvedPrefab.browserAssetId,
|
|
37
37
|
dirtyAction: input.dirtyAction ?? 'reject',
|
|
38
|
-
});
|
|
38
|
+
}, context?.serializedAuthoringAccess);
|
|
39
39
|
if (!output) {
|
|
40
|
-
return
|
|
40
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.PREFAB_STAGE_OPEN, `Prefab stage unavailable: ${resolved.resolvedPrefab.assetId}`, { code: 'prefab.stageOpenFailed' });
|
|
41
41
|
}
|
|
42
42
|
renderUi();
|
|
43
43
|
return output;
|
|
44
44
|
},
|
|
45
|
-
async exitStage(input) {
|
|
45
|
+
async exitStage(input, context) {
|
|
46
46
|
const currentStage = operations.getPrefabStage();
|
|
47
47
|
if (currentStage?.dirty && (input.dirtyAction ?? 'reject') === 'reject') {
|
|
48
|
-
return
|
|
48
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.PREFAB_STAGE_EXIT, 'The current Prefab stage has unsaved changes.', { code: 'prefab.stageDirty' });
|
|
49
49
|
}
|
|
50
|
-
const output = await operations.exitPrefabStage({ dirtyAction: input.dirtyAction ?? 'reject' });
|
|
50
|
+
const output = await operations.exitPrefabStage({ dirtyAction: input.dirtyAction ?? 'reject' }, context?.serializedAuthoringAccess);
|
|
51
51
|
if (output.exited)
|
|
52
52
|
renderUi();
|
|
53
53
|
return output;
|
|
54
54
|
},
|
|
55
|
-
async saveStage() {
|
|
56
|
-
const changed = await operations.savePrefabStage();
|
|
55
|
+
async saveStage(_input, context) {
|
|
56
|
+
const changed = await operations.savePrefabStage(context?.serializedAuthoringAccess);
|
|
57
57
|
const stage = operations.getPrefabStage();
|
|
58
58
|
if (!stage) {
|
|
59
|
-
return
|
|
59
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.PREFAB_STAGE_SAVE, 'No Prefab stage is open.', { code: 'prefab.stageNotOpen' });
|
|
60
60
|
}
|
|
61
61
|
renderUi();
|
|
62
62
|
return { changed, stage, status: state.status };
|
|
63
63
|
},
|
|
64
|
-
discardStage() {
|
|
65
|
-
const changed = operations.discardPrefabStage();
|
|
64
|
+
async discardStage(_input, context) {
|
|
65
|
+
const changed = await operations.discardPrefabStage(context?.serializedAuthoringAccess);
|
|
66
66
|
const stage = operations.getPrefabStage();
|
|
67
67
|
if (!stage) {
|
|
68
|
-
return
|
|
68
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.PREFAB_STAGE_DISCARD, 'No Prefab stage is open.', { code: 'prefab.stageNotOpen' });
|
|
69
69
|
}
|
|
70
70
|
renderUi();
|
|
71
71
|
return { changed, stage, status: state.status };
|
|
72
72
|
},
|
|
73
73
|
renameAsset(input) {
|
|
74
74
|
const details = operations.getPrefabStageDetails();
|
|
75
|
-
const assetId =
|
|
75
|
+
const assetId = normalizeEditorCommandString(input.assetId) || details?.stage.assetId || '';
|
|
76
76
|
const displayNameResult = normalizePrefabEditableName(input.displayName);
|
|
77
77
|
if (!assetId || !displayNameResult.ok) {
|
|
78
78
|
const displayNameError = displayNameResult.ok ? '' : displayNameResult.message;
|
|
79
|
-
return
|
|
79
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.PREFAB_ASSET_RENAME, !assetId ? 'Prefab asset id is required.' : displayNameError, {
|
|
80
80
|
code: !assetId ? 'prefab.invalidInput' : 'prefab.invalidName',
|
|
81
81
|
details: { assetId: input.assetId, displayName: input.displayName },
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
|
-
const asset =
|
|
84
|
+
const asset = findEditorCommandVisibleAssetInfo(state, options, assetId);
|
|
85
85
|
if (!asset || !isPrefabAsset(asset)) {
|
|
86
|
-
return
|
|
86
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.PREFAB_ASSET_RENAME, `Prefab asset not found: ${assetId}`, { code: 'prefab.notFound', details: { assetId } });
|
|
87
87
|
}
|
|
88
|
-
const conflict =
|
|
88
|
+
const conflict = listEditorCommandVisibleAssetInfos(state, options)
|
|
89
89
|
.find(candidate => candidate.assetId !== assetId
|
|
90
90
|
&& isPrefabAsset(candidate)
|
|
91
91
|
&& candidate.displayName.trim().toLowerCase() === displayNameResult.name.toLowerCase());
|
|
92
92
|
if (conflict) {
|
|
93
|
-
return
|
|
93
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.PREFAB_ASSET_RENAME, `Prefab name already exists: ${displayNameResult.name}`, {
|
|
94
94
|
code: 'asset.nameConflict',
|
|
95
95
|
details: { assetId, conflictingAssetId: conflict.assetId, displayName: displayNameResult.name },
|
|
96
96
|
});
|
|
@@ -113,7 +113,7 @@ export function createLocalEditorAgentBridgePrefabSource(state, options, renderU
|
|
|
113
113
|
value: displayNameResult.name,
|
|
114
114
|
});
|
|
115
115
|
if (!patched) {
|
|
116
|
-
return
|
|
116
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.PREFAB_ASSET_RENAME, `Prefab rename action unavailable: ${assetId}`, { code: 'prefab.actionUnavailable', details: { assetId } });
|
|
117
117
|
}
|
|
118
118
|
renderUi();
|
|
119
119
|
const stageActive = !!operations.getPrefabStageDetails() && operations.getPrefabStageDetails()?.stage.assetId === assetId;
|
|
@@ -128,28 +128,28 @@ export function createLocalEditorAgentBridgePrefabSource(state, options, renderU
|
|
|
128
128
|
getScene(input) {
|
|
129
129
|
const details = operations.getPrefabStageDetails();
|
|
130
130
|
if (!details || !isRequestedPrefabStage(details.stage, input.assetId)) {
|
|
131
|
-
return
|
|
131
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.PREFAB_SCENE_GET, createPrefabStageUnavailableMessage(input.assetId), { code: 'prefab.stageNotOpen', details: { assetId: input.assetId } });
|
|
132
132
|
}
|
|
133
|
-
return createSafePrefabSceneOutput(
|
|
133
|
+
return createSafePrefabSceneOutput(EDITOR_COMMAND_ID.PREFAB_SCENE_GET, details, operations);
|
|
134
134
|
},
|
|
135
135
|
selectNode(input) {
|
|
136
136
|
const nodeId = normalizePrefabNodeId(input.nodeId);
|
|
137
137
|
const details = operations.getPrefabStageDetails();
|
|
138
138
|
if (!details || !nodeId) {
|
|
139
|
-
return
|
|
139
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.PREFAB_NODE_SELECT, nodeId ? 'Prefab stage is not open.' : 'Prefab node id is required.', { code: nodeId ? 'prefab.stageNotOpen' : 'prefab.invalidInput', details: { nodeId: input.nodeId } });
|
|
140
140
|
}
|
|
141
|
-
const scene = createSafePrefabSceneOutput(
|
|
141
|
+
const scene = createSafePrefabSceneOutput(EDITOR_COMMAND_ID.PREFAB_NODE_SELECT, details, operations);
|
|
142
142
|
if ('ok' in scene)
|
|
143
143
|
return scene;
|
|
144
144
|
const node = scene.nodes.find(candidate => candidate.nodeId === nodeId) ?? null;
|
|
145
145
|
if (!node) {
|
|
146
|
-
return
|
|
146
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.PREFAB_NODE_SELECT, `Prefab node not found: ${nodeId}`, { code: 'prefab.nodeNotFound', details: { assetId: details.stage.assetId, nodeId } });
|
|
147
147
|
}
|
|
148
148
|
const changed = operations.selectPrefabStageItem(createPrefabStageItemId(nodeId));
|
|
149
149
|
if (changed)
|
|
150
150
|
renderUi();
|
|
151
151
|
const nextDetails = operations.getPrefabStageDetails() ?? details;
|
|
152
|
-
const nextScene = createSafePrefabSceneOutput(
|
|
152
|
+
const nextScene = createSafePrefabSceneOutput(EDITOR_COMMAND_ID.PREFAB_NODE_SELECT, nextDetails, operations);
|
|
153
153
|
if ('ok' in nextScene)
|
|
154
154
|
return nextScene;
|
|
155
155
|
const selectedNode = nextScene.nodes.find(candidate => candidate.nodeId === nodeId) ?? node;
|
|
@@ -161,14 +161,14 @@ export function createLocalEditorAgentBridgePrefabSource(state, options, renderU
|
|
|
161
161
|
},
|
|
162
162
|
createNodeFromAsset(input) {
|
|
163
163
|
const details = operations.getPrefabStageDetails();
|
|
164
|
-
const assetId =
|
|
165
|
-
const asset =
|
|
164
|
+
const assetId = normalizeEditorCommandString(input.assetId);
|
|
165
|
+
const asset = findEditorCommandVisibleAssetInfo(state, options, assetId);
|
|
166
166
|
if (!details || !asset || !assetId) {
|
|
167
|
-
return
|
|
167
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.PREFAB_NODE_CREATE_FROM_ASSET, !details
|
|
168
168
|
? 'Prefab stage is not open.'
|
|
169
169
|
: `Asset not found: ${assetId || '(empty)'}`, { code: !details ? 'prefab.stageNotOpen' : 'asset.notFound', details: { assetId } });
|
|
170
170
|
}
|
|
171
|
-
const beforeScene = createSafePrefabSceneOutput(
|
|
171
|
+
const beforeScene = createSafePrefabSceneOutput(EDITOR_COMMAND_ID.PREFAB_NODE_CREATE_FROM_ASSET, details, operations);
|
|
172
172
|
if ('ok' in beforeScene)
|
|
173
173
|
return beforeScene;
|
|
174
174
|
const parentNodeId = resolvePrefabMutationParentNodeId(input.parentNodeId, beforeScene);
|
|
@@ -181,7 +181,7 @@ export function createLocalEditorAgentBridgePrefabSource(state, options, renderU
|
|
|
181
181
|
value: createPrefabNodeCreateActionValue(input),
|
|
182
182
|
};
|
|
183
183
|
return runPrefabNodeMutation({
|
|
184
|
-
capabilityId:
|
|
184
|
+
capabilityId: EDITOR_COMMAND_ID.PREFAB_NODE_CREATE_FROM_ASSET,
|
|
185
185
|
state,
|
|
186
186
|
operations,
|
|
187
187
|
renderUi,
|
|
@@ -193,9 +193,9 @@ export function createLocalEditorAgentBridgePrefabSource(state, options, renderU
|
|
|
193
193
|
createGroupNode(input) {
|
|
194
194
|
const details = operations.getPrefabStageDetails();
|
|
195
195
|
if (!details) {
|
|
196
|
-
return
|
|
196
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.PREFAB_NODE_CREATE_GROUP, 'Prefab stage is not open.', { code: 'prefab.stageNotOpen' });
|
|
197
197
|
}
|
|
198
|
-
const beforeScene = createSafePrefabSceneOutput(
|
|
198
|
+
const beforeScene = createSafePrefabSceneOutput(EDITOR_COMMAND_ID.PREFAB_NODE_CREATE_GROUP, details, operations);
|
|
199
199
|
if ('ok' in beforeScene)
|
|
200
200
|
return beforeScene;
|
|
201
201
|
const parentNodeId = resolvePrefabMutationParentNodeId(input.parentNodeId, beforeScene);
|
|
@@ -206,7 +206,7 @@ export function createLocalEditorAgentBridgePrefabSource(state, options, renderU
|
|
|
206
206
|
value: createPrefabNodeCreateActionValue(input),
|
|
207
207
|
};
|
|
208
208
|
return runPrefabNodeMutation({
|
|
209
|
-
capabilityId:
|
|
209
|
+
capabilityId: EDITOR_COMMAND_ID.PREFAB_NODE_CREATE_GROUP,
|
|
210
210
|
state,
|
|
211
211
|
operations,
|
|
212
212
|
renderUi,
|
|
@@ -218,20 +218,20 @@ export function createLocalEditorAgentBridgePrefabSource(state, options, renderU
|
|
|
218
218
|
createMarkerNode(input) {
|
|
219
219
|
const details = operations.getPrefabStageDetails();
|
|
220
220
|
if (!details) {
|
|
221
|
-
return
|
|
221
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.PREFAB_NODE_CREATE_MARKER, 'Prefab stage is not open.', { code: 'prefab.stageNotOpen' });
|
|
222
222
|
}
|
|
223
|
-
const beforeScene = createSafePrefabSceneOutput(
|
|
223
|
+
const beforeScene = createSafePrefabSceneOutput(EDITOR_COMMAND_ID.PREFAB_NODE_CREATE_MARKER, details, operations);
|
|
224
224
|
if ('ok' in beforeScene)
|
|
225
225
|
return beforeScene;
|
|
226
226
|
const document = state.session?.getState({ cloneDocuments: false }).workingDocument ?? null;
|
|
227
|
-
const markerType =
|
|
227
|
+
const markerType = normalizeEditorCommandString(input.type);
|
|
228
228
|
const markerTypes = document ? options.documentAdapter.getMarkerTypeCatalog?.(document) ?? [] : [];
|
|
229
229
|
if (!markerType || !markerTypes.some(definition => definition.type === markerType)) {
|
|
230
|
-
return
|
|
230
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.PREFAB_NODE_CREATE_MARKER, `Unknown Prefab Marker type: ${markerType || '(empty)'}`, { code: 'prefab.unknownMarkerType', details: { type: input.type } });
|
|
231
231
|
}
|
|
232
232
|
const targetFailure = validatePrefabMarkerTargetInput(beforeScene, input.target, null);
|
|
233
233
|
if (targetFailure)
|
|
234
|
-
return
|
|
234
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.PREFAB_NODE_CREATE_MARKER, targetFailure.message, { code: targetFailure.code, details: targetFailure.details });
|
|
235
235
|
const parentNodeId = resolvePrefabMutationParentNodeId(input.parentNodeId, beforeScene);
|
|
236
236
|
const action = {
|
|
237
237
|
actionId: 'prefab.node.createMarker',
|
|
@@ -247,7 +247,7 @@ export function createLocalEditorAgentBridgePrefabSource(state, options, renderU
|
|
|
247
247
|
},
|
|
248
248
|
};
|
|
249
249
|
return runPrefabNodeMutation({
|
|
250
|
-
capabilityId:
|
|
250
|
+
capabilityId: EDITOR_COMMAND_ID.PREFAB_NODE_CREATE_MARKER,
|
|
251
251
|
state,
|
|
252
252
|
operations,
|
|
253
253
|
renderUi,
|
|
@@ -259,9 +259,9 @@ export function createLocalEditorAgentBridgePrefabSource(state, options, renderU
|
|
|
259
259
|
createPrimitiveNode(input) {
|
|
260
260
|
const details = operations.getPrefabStageDetails();
|
|
261
261
|
if (!details) {
|
|
262
|
-
return
|
|
262
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.PREFAB_NODE_CREATE_PRIMITIVE, 'Prefab stage is not open.', { code: 'prefab.stageNotOpen' });
|
|
263
263
|
}
|
|
264
|
-
const beforeScene = createSafePrefabSceneOutput(
|
|
264
|
+
const beforeScene = createSafePrefabSceneOutput(EDITOR_COMMAND_ID.PREFAB_NODE_CREATE_PRIMITIVE, details, operations);
|
|
265
265
|
if ('ok' in beforeScene)
|
|
266
266
|
return beforeScene;
|
|
267
267
|
const parentNodeId = resolvePrefabMutationParentNodeId(input.parentNodeId, beforeScene);
|
|
@@ -273,7 +273,7 @@ export function createLocalEditorAgentBridgePrefabSource(state, options, renderU
|
|
|
273
273
|
value: createPrefabNodeCreateActionValue(input),
|
|
274
274
|
};
|
|
275
275
|
return runPrefabNodeMutation({
|
|
276
|
-
capabilityId:
|
|
276
|
+
capabilityId: EDITOR_COMMAND_ID.PREFAB_NODE_CREATE_PRIMITIVE,
|
|
277
277
|
state,
|
|
278
278
|
operations,
|
|
279
279
|
renderUi,
|
|
@@ -286,14 +286,14 @@ export function createLocalEditorAgentBridgePrefabSource(state, options, renderU
|
|
|
286
286
|
const nodeId = normalizePrefabNodeId(input.nodeId);
|
|
287
287
|
const details = operations.getPrefabStageDetails();
|
|
288
288
|
if (!details || !nodeId) {
|
|
289
|
-
return
|
|
289
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.PREFAB_NODE_SET_TRANSFORM, nodeId ? 'Prefab stage is not open.' : 'Prefab node id is required.', { code: nodeId ? 'prefab.stageNotOpen' : 'prefab.invalidInput', details: { nodeId: input.nodeId } });
|
|
290
290
|
}
|
|
291
|
-
const beforeScene = createSafePrefabSceneOutput(
|
|
291
|
+
const beforeScene = createSafePrefabSceneOutput(EDITOR_COMMAND_ID.PREFAB_NODE_SET_TRANSFORM, details, operations);
|
|
292
292
|
if ('ok' in beforeScene)
|
|
293
293
|
return beforeScene;
|
|
294
294
|
const node = beforeScene.nodes.find(candidate => candidate.nodeId === nodeId) ?? null;
|
|
295
295
|
if (!node) {
|
|
296
|
-
return
|
|
296
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.PREFAB_NODE_SET_TRANSFORM, `Prefab node not found: ${nodeId}`, { code: 'prefab.nodeNotFound', details: { assetId: details.stage.assetId, nodeId } });
|
|
297
297
|
}
|
|
298
298
|
const transform = createPrefabTransformActionValue({
|
|
299
299
|
position: input.position,
|
|
@@ -307,7 +307,7 @@ export function createLocalEditorAgentBridgePrefabSource(state, options, renderU
|
|
|
307
307
|
value: transform,
|
|
308
308
|
};
|
|
309
309
|
return runPrefabNodeMutation({
|
|
310
|
-
capabilityId:
|
|
310
|
+
capabilityId: EDITOR_COMMAND_ID.PREFAB_NODE_SET_TRANSFORM,
|
|
311
311
|
state,
|
|
312
312
|
operations,
|
|
313
313
|
renderUi,
|
|
@@ -320,24 +320,24 @@ export function createLocalEditorAgentBridgePrefabSource(state, options, renderU
|
|
|
320
320
|
const details = operations.getPrefabStageDetails();
|
|
321
321
|
const nodeId = normalizePrefabNodeId(input.nodeId);
|
|
322
322
|
if (!details || !nodeId) {
|
|
323
|
-
return
|
|
323
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.PREFAB_NODE_SET_MARKER, details ? 'Prefab node id is required.' : 'Prefab stage is not open.', { code: details ? 'prefab.invalidInput' : 'prefab.stageNotOpen', details: { nodeId: input.nodeId } });
|
|
324
324
|
}
|
|
325
|
-
const beforeScene = createSafePrefabSceneOutput(
|
|
325
|
+
const beforeScene = createSafePrefabSceneOutput(EDITOR_COMMAND_ID.PREFAB_NODE_SET_MARKER, details, operations);
|
|
326
326
|
if ('ok' in beforeScene)
|
|
327
327
|
return beforeScene;
|
|
328
328
|
const node = beforeScene.nodes.find(candidate => candidate.nodeId === nodeId) ?? null;
|
|
329
329
|
if (!node)
|
|
330
|
-
return
|
|
330
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.PREFAB_NODE_SET_MARKER, `Prefab node not found: ${nodeId}`, { code: 'prefab.nodeNotFound', details: { nodeId } });
|
|
331
331
|
if (node.kind !== 'marker')
|
|
332
|
-
return
|
|
332
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.PREFAB_NODE_SET_MARKER, `Prefab node is not a Marker: ${nodeId}`, { code: 'prefab.nodeKindMismatch', details: { nodeId, kind: node.kind } });
|
|
333
333
|
const document = state.session?.getState({ cloneDocuments: false }).workingDocument ?? null;
|
|
334
334
|
const markerTypes = document ? options.documentAdapter.getMarkerTypeCatalog?.(document) ?? [] : [];
|
|
335
335
|
if (input.type !== undefined && !markerTypes.some(definition => definition.type === input.type)) {
|
|
336
|
-
return
|
|
336
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.PREFAB_NODE_SET_MARKER, `Unknown Prefab Marker type: ${input.type}`, { code: 'prefab.unknownMarkerType', details: { nodeId, type: input.type } });
|
|
337
337
|
}
|
|
338
338
|
const targetFailure = validatePrefabMarkerTargetInput(beforeScene, input.target, nodeId);
|
|
339
339
|
if (targetFailure)
|
|
340
|
-
return
|
|
340
|
+
return createLocalEditorCommandFailure(EDITOR_COMMAND_ID.PREFAB_NODE_SET_MARKER, targetFailure.message, { code: targetFailure.code, details: targetFailure.details });
|
|
341
341
|
const value = {
|
|
342
342
|
...(input.type !== undefined ? { type: input.type } : {}),
|
|
343
343
|
...(input.target !== undefined ? { target: input.target } : {}),
|
|
@@ -346,7 +346,7 @@ export function createLocalEditorAgentBridgePrefabSource(state, options, renderU
|
|
|
346
346
|
...(input.color !== undefined ? { color: input.color } : {}),
|
|
347
347
|
};
|
|
348
348
|
return runPrefabNodeMutation({
|
|
349
|
-
capabilityId:
|
|
349
|
+
capabilityId: EDITOR_COMMAND_ID.PREFAB_NODE_SET_MARKER,
|
|
350
350
|
state,
|
|
351
351
|
operations,
|
|
352
352
|
renderUi,
|
|
@@ -362,7 +362,7 @@ export function createLocalEditorAgentBridgePrefabSource(state, options, renderU
|
|
|
362
362
|
},
|
|
363
363
|
reparentNode(input) {
|
|
364
364
|
return runNodeIdMutation({
|
|
365
|
-
capabilityId:
|
|
365
|
+
capabilityId: EDITOR_COMMAND_ID.PREFAB_NODE_REPARENT,
|
|
366
366
|
state,
|
|
367
367
|
operations,
|
|
368
368
|
renderUi,
|
|
@@ -373,7 +373,7 @@ export function createLocalEditorAgentBridgePrefabSource(state, options, renderU
|
|
|
373
373
|
},
|
|
374
374
|
renameNode(input) {
|
|
375
375
|
return runNodeIdMutation({
|
|
376
|
-
capabilityId:
|
|
376
|
+
capabilityId: EDITOR_COMMAND_ID.PREFAB_NODE_RENAME,
|
|
377
377
|
state,
|
|
378
378
|
operations,
|
|
379
379
|
renderUi,
|
|
@@ -384,7 +384,7 @@ export function createLocalEditorAgentBridgePrefabSource(state, options, renderU
|
|
|
384
384
|
},
|
|
385
385
|
deleteNode(input) {
|
|
386
386
|
return runNodeIdMutation({
|
|
387
|
-
capabilityId:
|
|
387
|
+
capabilityId: EDITOR_COMMAND_ID.PREFAB_NODE_DELETE,
|
|
388
388
|
state,
|
|
389
389
|
operations,
|
|
390
390
|
renderUi,
|
|
@@ -393,7 +393,7 @@ export function createLocalEditorAgentBridgePrefabSource(state, options, renderU
|
|
|
393
393
|
});
|
|
394
394
|
},
|
|
395
395
|
getSourceStructure(input) {
|
|
396
|
-
const resolved = resolvePrefabAssetForInspection(
|
|
396
|
+
const resolved = resolvePrefabAssetForInspection(EDITOR_COMMAND_ID.PREFAB_SOURCE_STRUCTURE_GET, state, options, operations, input);
|
|
397
397
|
if (!resolved.ok)
|
|
398
398
|
return resolved.result;
|
|
399
399
|
const structure = createPrefabSourceStructure(resolved.asset, resolved.node);
|
|
@@ -405,7 +405,7 @@ export function createLocalEditorAgentBridgePrefabSource(state, options, renderU
|
|
|
405
405
|
};
|
|
406
406
|
},
|
|
407
407
|
listMaterialSlots(input) {
|
|
408
|
-
const resolved = resolvePrefabAssetForInspection(
|
|
408
|
+
const resolved = resolvePrefabAssetForInspection(EDITOR_COMMAND_ID.PREFAB_MATERIAL_SLOTS_LIST, state, options, operations, input);
|
|
409
409
|
if (!resolved.ok)
|
|
410
410
|
return resolved.result;
|
|
411
411
|
const slots = createPrefabMaterialSlots(resolved.asset, resolved.node)
|
|
@@ -420,12 +420,12 @@ export function createLocalEditorAgentBridgePrefabSource(state, options, renderU
|
|
|
420
420
|
};
|
|
421
421
|
}
|
|
422
422
|
function resolvePrefabs(state, options, operations, input) {
|
|
423
|
-
const assetId =
|
|
424
|
-
const browserAssetId =
|
|
425
|
-
const name =
|
|
426
|
-
const query =
|
|
423
|
+
const assetId = normalizeEditorCommandString(input.assetId);
|
|
424
|
+
const browserAssetId = normalizeEditorCommandString(input.browserAssetId);
|
|
425
|
+
const name = normalizeEditorCommandString(input.name).toLowerCase();
|
|
426
|
+
const query = normalizeEditorCommandString(input.query).toLowerCase();
|
|
427
427
|
const includeUnavailable = 'includeUnavailable' in input && input.includeUnavailable === true;
|
|
428
|
-
const prefabs =
|
|
428
|
+
const prefabs = listEditorCommandVisibleAssetInfos(state, options)
|
|
429
429
|
.filter(asset => isPrefabAsset(asset))
|
|
430
430
|
.filter(asset => includeUnavailable || asset.placeable !== false)
|
|
431
431
|
.map(createPrefabSummary);
|
|
@@ -495,13 +495,13 @@ function readPrefabPrimitive(value) {
|
|
|
495
495
|
return shape ? { ...structuredClone(record), shape } : null;
|
|
496
496
|
}
|
|
497
497
|
function createPrefabStageUnavailableMessage(assetId) {
|
|
498
|
-
const normalized =
|
|
498
|
+
const normalized = normalizeEditorCommandString(assetId);
|
|
499
499
|
return normalized
|
|
500
500
|
? `Prefab stage is not open for asset: ${normalized}`
|
|
501
501
|
: 'Prefab stage is not open.';
|
|
502
502
|
}
|
|
503
503
|
function isRequestedPrefabStage(stage, assetId) {
|
|
504
|
-
const normalized =
|
|
504
|
+
const normalized = normalizeEditorCommandString(assetId);
|
|
505
505
|
return !normalized || stage.assetId === normalized || stage.browserAssetId === normalized;
|
|
506
506
|
}
|
|
507
507
|
function createSafePrefabSceneOutput(capabilityId, details, operations) {
|
|
@@ -509,7 +509,7 @@ function createSafePrefabSceneOutput(capabilityId, details, operations) {
|
|
|
509
509
|
const expectedScopeKey = `prefab-stage:${details.stage.assetId}`;
|
|
510
510
|
if (model.snapshot.scopeType !== 'prefab-stage'
|
|
511
511
|
|| model.snapshot.scopeKey !== expectedScopeKey) {
|
|
512
|
-
return
|
|
512
|
+
return createLocalEditorCommandFailure(capabilityId, 'Prefab Hierarchy scope is unavailable or does not match the active Prefab Stage.', {
|
|
513
513
|
code: 'prefab.hierarchyScopeUnavailable',
|
|
514
514
|
details: {
|
|
515
515
|
assetId: details.stage.assetId,
|
|
@@ -521,7 +521,7 @@ function createSafePrefabSceneOutput(capabilityId, details, operations) {
|
|
|
521
521
|
},
|
|
522
522
|
});
|
|
523
523
|
}
|
|
524
|
-
return createPrefabSceneOutput(details,
|
|
524
|
+
return createPrefabSceneOutput(details, createEditorCommandSafePrefabReadModel(model, details.nodeDetails));
|
|
525
525
|
}
|
|
526
526
|
function createPrefabSceneOutput(details, safeModel) {
|
|
527
527
|
const pathByNodeId = new Map();
|
|
@@ -606,7 +606,7 @@ function normalizePrefabNodeRole(role) {
|
|
|
606
606
|
return role === 'object' ? 'model' : null;
|
|
607
607
|
}
|
|
608
608
|
function normalizePrefabNodeId(value) {
|
|
609
|
-
const id =
|
|
609
|
+
const id = normalizeEditorCommandString(value);
|
|
610
610
|
return id.startsWith(PREFAB_STAGE_ITEM_PREFIX) ? id.slice(PREFAB_STAGE_ITEM_PREFIX.length) : id;
|
|
611
611
|
}
|
|
612
612
|
function normalizePrefabEditableName(value) {
|
|
@@ -664,8 +664,8 @@ function validatePrefabMarkerTargetInput(scene, target, markerNodeId) {
|
|
|
664
664
|
return null;
|
|
665
665
|
}
|
|
666
666
|
function createPrefabNodeCreateActionValue(input) {
|
|
667
|
-
const name =
|
|
668
|
-
const sourceNodePath =
|
|
667
|
+
const name = normalizeEditorCommandString(input.name);
|
|
668
|
+
const sourceNodePath = normalizeEditorCommandString(input.sourceNodePath);
|
|
669
669
|
const transform = input.position || input.rotation || input.scale
|
|
670
670
|
? createPrefabTransformActionValue(input)
|
|
671
671
|
: undefined;
|
|
@@ -689,21 +689,21 @@ function readPrefabItemTransform(value) {
|
|
|
689
689
|
if (Object.keys(record).length === 0)
|
|
690
690
|
return undefined;
|
|
691
691
|
const transform = {
|
|
692
|
-
...(
|
|
693
|
-
...(
|
|
694
|
-
...(
|
|
692
|
+
...(isLocalEditorCommandVec3(record.position) ? { position: clonePrefabVec3(record.position) } : {}),
|
|
693
|
+
...(isLocalEditorCommandVec3(record.rotation) ? { rotation: clonePrefabVec3(record.rotation) } : {}),
|
|
694
|
+
...(isLocalEditorCommandVec3(record.scale) ? { scale: clonePrefabVec3(record.scale) } : {}),
|
|
695
695
|
};
|
|
696
696
|
return Object.keys(transform).length > 0 ? transform : undefined;
|
|
697
697
|
}
|
|
698
698
|
function clonePrefabVec3(value) {
|
|
699
|
-
return
|
|
699
|
+
return isLocalEditorCommandVec3(value) ? { x: value.x, y: value.y, z: value.z } : { ...ZERO_VEC3 };
|
|
700
700
|
}
|
|
701
701
|
function runNodeIdMutation(input) {
|
|
702
702
|
const nodeId = normalizePrefabNodeId(input.nodeId);
|
|
703
703
|
const parentNodeId = normalizePrefabNodeId(input.parentNodeId);
|
|
704
704
|
const details = input.operations.getPrefabStageDetails();
|
|
705
705
|
if (!details || !nodeId || (input.actionId === 'prefab.node.reparent' && !parentNodeId)) {
|
|
706
|
-
return
|
|
706
|
+
return createLocalEditorCommandFailure(input.capabilityId, !details ? 'Prefab stage is not open.' : 'Prefab node id is required.', {
|
|
707
707
|
code: !details ? 'prefab.stageNotOpen' : 'prefab.invalidInput',
|
|
708
708
|
details: { nodeId: input.nodeId, parentNodeId: input.parentNodeId },
|
|
709
709
|
});
|
|
@@ -713,26 +713,26 @@ function runNodeIdMutation(input) {
|
|
|
713
713
|
return beforeScene;
|
|
714
714
|
const node = beforeScene.nodes.find(candidate => candidate.nodeId === nodeId) ?? null;
|
|
715
715
|
if (!node) {
|
|
716
|
-
return
|
|
716
|
+
return createLocalEditorCommandFailure(input.capabilityId, `Prefab node not found: ${nodeId}`, { code: 'prefab.nodeNotFound', details: { assetId: details.stage.assetId, nodeId } });
|
|
717
717
|
}
|
|
718
718
|
if (input.actionId === 'prefab.node.delete' && nodeId === beforeScene.rootNodeId) {
|
|
719
|
-
return
|
|
719
|
+
return createLocalEditorCommandFailure(input.capabilityId, 'Prefab root node cannot be deleted.', { code: 'prefab.rootNodeProtected', details: { assetId: details.stage.assetId, nodeId } });
|
|
720
720
|
}
|
|
721
721
|
let renameName = null;
|
|
722
722
|
let previousName = null;
|
|
723
723
|
if (input.actionId === 'prefab.node.rename') {
|
|
724
724
|
if (nodeId === beforeScene.rootNodeId) {
|
|
725
|
-
return
|
|
725
|
+
return createLocalEditorCommandFailure(input.capabilityId, 'Prefab root node name follows the prefab asset displayName; use prefab.asset.rename instead.', { code: 'prefab.rootRenameUseAssetRename', details: { assetId: details.stage.assetId, nodeId } });
|
|
726
726
|
}
|
|
727
727
|
const nameResult = normalizePrefabEditableName(input.value);
|
|
728
728
|
if (!nameResult.ok) {
|
|
729
|
-
return
|
|
729
|
+
return createLocalEditorCommandFailure(input.capabilityId, nameResult.message, { code: 'prefab.invalidName', details: { assetId: details.stage.assetId, nodeId, name: String(input.value ?? '') } });
|
|
730
730
|
}
|
|
731
731
|
const conflict = beforeScene.nodes.find(candidate => candidate.nodeId !== nodeId
|
|
732
732
|
&& candidate.parentNodeId === node.parentNodeId
|
|
733
733
|
&& candidate.name?.trim().toLowerCase() === nameResult.name.toLowerCase());
|
|
734
734
|
if (conflict) {
|
|
735
|
-
return
|
|
735
|
+
return createLocalEditorCommandFailure(input.capabilityId, `Prefab node name already exists under the same parent: ${nameResult.name}`, {
|
|
736
736
|
code: 'prefab.nodeNameConflict',
|
|
737
737
|
details: { assetId: details.stage.assetId, nodeId, conflictingNodeId: conflict.nodeId, name: nameResult.name },
|
|
738
738
|
});
|
|
@@ -781,7 +781,7 @@ function runPrefabNodeMutation(input) {
|
|
|
781
781
|
const previousSelectedItemId = input.beforeScene.stage.selectedItemId ?? null;
|
|
782
782
|
const patched = input.operations.runPrefabStageAssetAction(input.action);
|
|
783
783
|
if (!patched) {
|
|
784
|
-
return
|
|
784
|
+
return createLocalEditorCommandFailure(input.capabilityId, `Prefab action unavailable: ${input.action.actionId}`, {
|
|
785
785
|
code: 'prefab.actionUnavailable',
|
|
786
786
|
details: {
|
|
787
787
|
actionId: input.action.actionId,
|
|
@@ -795,7 +795,7 @@ function runPrefabNodeMutation(input) {
|
|
|
795
795
|
input.renderUi();
|
|
796
796
|
const afterDetails = input.operations.getPrefabStageDetails();
|
|
797
797
|
if (!afterDetails) {
|
|
798
|
-
return
|
|
798
|
+
return createLocalEditorCommandFailure(input.capabilityId, 'Prefab mutation completed, but Prefab stage is no longer open.', { code: 'prefab.stageClosed' });
|
|
799
799
|
}
|
|
800
800
|
const afterScene = createSafePrefabSceneOutput(input.capabilityId, afterDetails, input.operations);
|
|
801
801
|
if ('ok' in afterScene)
|
|
@@ -832,7 +832,7 @@ function resolvePrefabAssetForInspection(capabilityId, state, options, operation
|
|
|
832
832
|
if (!details) {
|
|
833
833
|
return {
|
|
834
834
|
ok: false,
|
|
835
|
-
result:
|
|
835
|
+
result: createLocalEditorCommandFailure(capabilityId, 'Prefab stage is not open.', { code: 'prefab.stageNotOpen' }),
|
|
836
836
|
};
|
|
837
837
|
}
|
|
838
838
|
const scene = createSafePrefabSceneOutput(capabilityId, details, operations);
|
|
@@ -840,15 +840,15 @@ function resolvePrefabAssetForInspection(capabilityId, state, options, operation
|
|
|
840
840
|
return { ok: false, result: scene };
|
|
841
841
|
const nodeId = normalizePrefabNodeId(input.nodeId) || scene.selectedNodeId || '';
|
|
842
842
|
const node = nodeId ? scene.nodes.find(candidate => candidate.nodeId === nodeId) ?? null : null;
|
|
843
|
-
const assetId =
|
|
843
|
+
const assetId = normalizeEditorCommandString(input.assetId)
|
|
844
844
|
|| node?.sourceAssetId
|
|
845
845
|
|| node?.childPrefabId
|
|
846
846
|
|| '';
|
|
847
|
-
const asset = assetId ?
|
|
847
|
+
const asset = assetId ? findEditorCommandVisibleAssetInfo(state, options, assetId) : null;
|
|
848
848
|
if (!asset) {
|
|
849
849
|
return {
|
|
850
850
|
ok: false,
|
|
851
|
-
result:
|
|
851
|
+
result: createLocalEditorCommandFailure(capabilityId, `Prefab source asset not found: ${assetId || '(empty)'}`, { code: 'asset.notFound', details: { assetId, nodeId: node?.nodeId } }),
|
|
852
852
|
};
|
|
853
853
|
}
|
|
854
854
|
return {
|