@vgai/engine 0.2.0 → 0.3.0
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/README.md +3 -1
- package/dist/adapter/authoring.d.ts +404 -0
- package/dist/adapter/authoring.d.ts.map +1 -0
- package/dist/adapter/authoring.js +22 -0
- package/dist/adapter/colyseus-networking-adapter.d.ts +43 -0
- package/dist/adapter/colyseus-networking-adapter.d.ts.map +1 -0
- package/dist/adapter/colyseus-networking-adapter.js +38 -0
- package/dist/adapter/first-party-systems.d.ts +38 -0
- package/dist/adapter/first-party-systems.d.ts.map +1 -0
- package/dist/adapter/first-party-systems.js +77 -0
- package/dist/adapter/game-adapter.d.ts +133 -0
- package/dist/adapter/game-adapter.d.ts.map +1 -0
- package/dist/adapter/game-adapter.js +10 -0
- package/dist/adapter/host-context.d.ts +73 -0
- package/dist/adapter/host-context.d.ts.map +1 -0
- package/dist/adapter/host-context.js +16 -0
- package/dist/adapter/index.d.ts +22 -0
- package/dist/adapter/index.d.ts.map +1 -0
- package/dist/adapter/index.js +15 -0
- package/dist/adapter/ingest/game-contract.d.ts +53 -0
- package/dist/adapter/ingest/game-contract.d.ts.map +1 -0
- package/dist/adapter/ingest/game-contract.js +30 -0
- package/dist/adapter/ingest/overlay-applier.d.ts +118 -0
- package/dist/adapter/ingest/overlay-applier.d.ts.map +1 -0
- package/dist/adapter/ingest/overlay-applier.js +132 -0
- package/dist/adapter/ingest/overlay-apply.d.ts +60 -0
- package/dist/adapter/ingest/overlay-apply.d.ts.map +1 -0
- package/dist/adapter/ingest/overlay-apply.js +101 -0
- package/dist/adapter/ingest/overlay-file.d.ts +79 -0
- package/dist/adapter/ingest/overlay-file.d.ts.map +1 -0
- package/dist/adapter/ingest/overlay-file.js +66 -0
- package/dist/adapter/ingest/overlay-report.d.ts +113 -0
- package/dist/adapter/ingest/overlay-report.d.ts.map +1 -0
- package/dist/adapter/ingest/overlay-report.js +103 -0
- package/dist/adapter/ingest/scene-capture.d.ts +97 -0
- package/dist/adapter/ingest/scene-capture.d.ts.map +1 -0
- package/dist/adapter/ingest/scene-capture.js +248 -0
- package/dist/adapter/ingest/upstream-pin.d.ts +47 -0
- package/dist/adapter/ingest/upstream-pin.d.ts.map +1 -0
- package/dist/adapter/ingest/upstream-pin.js +50 -0
- package/dist/adapter/loop-gate-report.d.ts +34 -0
- package/dist/adapter/loop-gate-report.d.ts.map +1 -0
- package/dist/adapter/loop-gate-report.js +37 -0
- package/dist/adapter/rapier-physics-adapter.d.ts +12 -0
- package/dist/adapter/rapier-physics-adapter.d.ts.map +1 -0
- package/dist/adapter/rapier-physics-adapter.js +46 -0
- package/dist/adapter/system-adapter.d.ts +133 -0
- package/dist/adapter/system-adapter.d.ts.map +1 -0
- package/dist/adapter/system-adapter.js +13 -0
- package/dist/adapter/transform.d.ts +18 -0
- package/dist/adapter/transform.d.ts.map +1 -0
- package/dist/adapter/transform.js +1 -0
- package/dist/adapter/vgai-scene-game-adapter.d.ts +116 -0
- package/dist/adapter/vgai-scene-game-adapter.d.ts.map +1 -0
- package/dist/adapter/vgai-scene-game-adapter.js +714 -0
- package/dist/adapter/world-kind.d.ts +30 -0
- package/dist/adapter/world-kind.d.ts.map +1 -0
- package/dist/adapter/world-kind.js +18 -0
- package/dist/ai/navigation.d.ts +64 -0
- package/dist/ai/navigation.d.ts.map +1 -0
- package/dist/ai/navigation.js +133 -0
- package/dist/animation/anim-graph-types.d.ts +25 -0
- package/dist/animation/anim-graph-types.d.ts.map +1 -0
- package/dist/animation/anim-graph-types.js +1 -0
- package/dist/animation/animation-clock.d.ts +213 -0
- package/dist/animation/animation-clock.d.ts.map +1 -0
- package/dist/animation/animation-clock.js +301 -0
- package/dist/animation/blend-node.d.ts +22 -0
- package/dist/animation/blend-node.d.ts.map +1 -0
- package/dist/animation/blend-node.js +97 -0
- package/dist/animation/camera-ownership.d.ts +250 -0
- package/dist/animation/camera-ownership.d.ts.map +1 -0
- package/dist/animation/camera-ownership.js +169 -0
- package/dist/animation/cinematic-cues.d.ts +200 -0
- package/dist/animation/cinematic-cues.d.ts.map +1 -0
- package/dist/animation/cinematic-cues.js +213 -0
- package/dist/animation/clip-map.d.ts +12 -0
- package/dist/animation/clip-map.d.ts.map +1 -0
- package/dist/animation/clip-map.js +37 -0
- package/dist/animation/gsap-registration.d.ts +119 -0
- package/dist/animation/gsap-registration.d.ts.map +1 -0
- package/dist/animation/gsap-registration.js +92 -0
- package/dist/animation/theatre-clock-binding.d.ts +89 -0
- package/dist/animation/theatre-clock-binding.d.ts.map +1 -0
- package/dist/animation/theatre-clock-binding.js +29 -0
- package/dist/animation/theatre-director.d.ts +242 -0
- package/dist/animation/theatre-director.d.ts.map +1 -0
- package/dist/animation/theatre-director.js +235 -0
- package/dist/animation/theatre-object-binding.d.ts +305 -0
- package/dist/animation/theatre-object-binding.d.ts.map +1 -0
- package/dist/animation/theatre-object-binding.js +351 -0
- package/dist/animation/xstate-animation-binding.d.ts +111 -0
- package/dist/animation/xstate-animation-binding.d.ts.map +1 -0
- package/dist/animation/xstate-animation-binding.js +307 -0
- package/dist/animation/xstate-animation-meta.d.ts +228 -0
- package/dist/animation/xstate-animation-meta.d.ts.map +1 -0
- package/dist/animation/xstate-animation-meta.js +221 -0
- package/dist/assets.d.ts +26 -0
- package/dist/assets.d.ts.map +1 -0
- package/dist/assets.js +55 -0
- package/dist/audio/index.d.ts +4 -0
- package/dist/audio/index.d.ts.map +1 -0
- package/dist/audio/index.js +24 -0
- package/dist/audio/tone-clock-binding.d.ts +75 -0
- package/dist/audio/tone-clock-binding.d.ts.map +1 -0
- package/dist/audio/tone-clock-binding.js +29 -0
- package/dist/audio/tone-context.d.ts +114 -0
- package/dist/audio/tone-context.d.ts.map +1 -0
- package/dist/audio/tone-context.js +39 -0
- package/dist/audio/tone-offline-render.d.ts +90 -0
- package/dist/audio/tone-offline-render.d.ts.map +1 -0
- package/dist/audio/tone-offline-render.js +56 -0
- package/dist/audio/wav-encode.d.ts +38 -0
- package/dist/audio/wav-encode.d.ts.map +1 -0
- package/dist/audio/wav-encode.js +97 -0
- package/dist/core/game-loop.d.ts +21 -0
- package/dist/core/game-loop.d.ts.map +1 -0
- package/dist/core/game-loop.js +130 -0
- package/dist/core/system-runner.d.ts +120 -0
- package/dist/core/system-runner.d.ts.map +1 -0
- package/dist/core/system-runner.js +286 -0
- package/dist/core/types.d.ts +58 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +25 -0
- package/dist/data/data-asset.d.ts +101 -0
- package/dist/data/data-asset.d.ts.map +1 -0
- package/dist/data/data-asset.js +122 -0
- package/dist/data/data-check-core.d.ts +110 -0
- package/dist/data/data-check-core.d.ts.map +1 -0
- package/dist/data/data-check-core.js +178 -0
- package/dist/data/data-ref.d.ts +79 -0
- package/dist/data/data-ref.d.ts.map +1 -0
- package/dist/data/data-ref.js +130 -0
- package/dist/data/vite-plugin-data.d.ts +79 -0
- package/dist/data/vite-plugin-data.d.ts.map +1 -0
- package/dist/data/vite-plugin-data.js +217 -0
- package/dist/dev/console-bridge.d.ts +22 -0
- package/dist/dev/console-bridge.d.ts.map +1 -0
- package/dist/dev/console-bridge.js +71 -0
- package/dist/dev/debug-draw.d.ts +24 -0
- package/dist/dev/debug-draw.d.ts.map +1 -0
- package/dist/dev/debug-draw.js +73 -0
- package/dist/dev/logger.d.ts +30 -0
- package/dist/dev/logger.d.ts.map +1 -0
- package/dist/dev/logger.js +90 -0
- package/dist/ecs/component-manager.d.ts +189 -0
- package/dist/ecs/component-manager.d.ts.map +1 -0
- package/dist/ecs/component-manager.js +676 -0
- package/dist/ecs/game-component.d.ts +97 -0
- package/dist/ecs/game-component.d.ts.map +1 -0
- package/dist/ecs/game-component.js +80 -0
- package/dist/ecs/hmr-swap-report.d.ts +53 -0
- package/dist/ecs/hmr-swap-report.d.ts.map +1 -0
- package/dist/ecs/hmr-swap-report.js +55 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +30 -0
- package/dist/input/input-manager.d.ts +596 -0
- package/dist/input/input-manager.d.ts.map +1 -0
- package/dist/input/input-manager.js +1564 -0
- package/dist/input/input-types.d.ts +171 -0
- package/dist/input/input-types.d.ts.map +1 -0
- package/dist/input/input-types.js +1 -0
- package/dist/input/prompt-labels.d.ts +21 -0
- package/dist/input/prompt-labels.d.ts.map +1 -0
- package/dist/input/prompt-labels.js +121 -0
- package/dist/input/rebind-controller.d.ts +59 -0
- package/dist/input/rebind-controller.d.ts.map +1 -0
- package/dist/input/rebind-controller.js +85 -0
- package/dist/input/schema.d.ts +16 -0
- package/dist/input/schema.d.ts.map +1 -0
- package/dist/input/schema.js +228 -0
- package/dist/loader.d.ts +43 -0
- package/dist/loader.d.ts.map +1 -0
- package/dist/loader.js +59 -0
- package/dist/manifest/index.d.ts +5 -0
- package/dist/manifest/index.d.ts.map +1 -0
- package/dist/manifest/index.js +8 -0
- package/dist/manifest/load-file.d.ts +4 -0
- package/dist/manifest/load-file.d.ts.map +1 -0
- package/dist/manifest/load-file.js +14 -0
- package/dist/manifest/load.d.ts +117 -0
- package/dist/manifest/load.d.ts.map +1 -0
- package/dist/manifest/load.js +255 -0
- package/dist/manifest/schema.d.ts +173 -0
- package/dist/manifest/schema.d.ts.map +1 -0
- package/dist/manifest/schema.js +302 -0
- package/dist/physics/collision-system.d.ts +41 -0
- package/dist/physics/collision-system.d.ts.map +1 -0
- package/dist/physics/collision-system.js +64 -0
- package/dist/physics/physics-registry.d.ts +45 -0
- package/dist/physics/physics-registry.d.ts.map +1 -0
- package/dist/physics/physics-registry.js +65 -0
- package/dist/physics/transform-writer.d.ts +16 -0
- package/dist/physics/transform-writer.d.ts.map +1 -0
- package/dist/physics/transform-writer.js +38 -0
- package/dist/physics/trigger-dispatch.d.ts +24 -0
- package/dist/physics/trigger-dispatch.d.ts.map +1 -0
- package/dist/physics/trigger-dispatch.js +80 -0
- package/dist/react/game-state.d.ts +105 -0
- package/dist/react/game-state.d.ts.map +1 -0
- package/dist/react/game-state.js +144 -0
- package/dist/react/use-data.d.ts +60 -0
- package/dist/react/use-data.d.ts.map +1 -0
- package/dist/react/use-data.js +96 -0
- package/dist/react/use-selection.d.ts +75 -0
- package/dist/react/use-selection.d.ts.map +1 -0
- package/dist/react/use-selection.js +90 -0
- package/dist/render/auto-batcher.d.ts +34 -0
- package/dist/render/auto-batcher.d.ts.map +1 -0
- package/dist/render/auto-batcher.js +140 -0
- package/dist/render/render-batch-system.d.ts +33 -0
- package/dist/render/render-batch-system.d.ts.map +1 -0
- package/dist/render/render-batch-system.js +230 -0
- package/dist/render/render-features.d.ts +47 -0
- package/dist/render/render-features.d.ts.map +1 -0
- package/dist/render/render-features.js +105 -0
- package/dist/render/render-settings.d.ts +36 -0
- package/dist/render/render-settings.d.ts.map +1 -0
- package/dist/render/render-settings.js +51 -0
- package/dist/runtime/create-runtime.d.ts +280 -0
- package/dist/runtime/create-runtime.d.ts.map +1 -0
- package/dist/runtime/create-runtime.js +795 -0
- package/dist/runtime/frame-selector-cache.d.ts +41 -0
- package/dist/runtime/frame-selector-cache.d.ts.map +1 -0
- package/dist/runtime/frame-selector-cache.js +65 -0
- package/dist/runtime/game.d.ts +433 -0
- package/dist/runtime/game.d.ts.map +1 -0
- package/dist/runtime/game.js +569 -0
- package/dist/runtime/input-router.d.ts +78 -0
- package/dist/runtime/input-router.d.ts.map +1 -0
- package/dist/runtime/input-router.js +171 -0
- package/dist/runtime/mount-game.d.ts +129 -0
- package/dist/runtime/mount-game.d.ts.map +1 -0
- package/dist/runtime/mount-game.js +152 -0
- package/dist/runtime/mount-manifest.d.ts +119 -0
- package/dist/runtime/mount-manifest.d.ts.map +1 -0
- package/dist/runtime/mount-manifest.js +204 -0
- package/dist/runtime/render-audio-control.d.ts +110 -0
- package/dist/runtime/render-audio-control.d.ts.map +1 -0
- package/dist/runtime/render-audio-control.js +111 -0
- package/dist/runtime/render-control.d.ts +291 -0
- package/dist/runtime/render-control.d.ts.map +1 -0
- package/dist/runtime/render-control.js +264 -0
- package/dist/runtime/render-seed.d.ts +57 -0
- package/dist/runtime/render-seed.d.ts.map +1 -0
- package/dist/runtime/render-seed.js +74 -0
- package/dist/runtime/scene-ui-bridge.d.ts +69 -0
- package/dist/runtime/scene-ui-bridge.d.ts.map +1 -0
- package/dist/runtime/scene-ui-bridge.js +23 -0
- package/dist/runtime/scene-ui-data.d.ts +13 -0
- package/dist/runtime/scene-ui-data.d.ts.map +1 -0
- package/dist/runtime/scene-ui-data.js +92 -0
- package/dist/runtime/state-bridge.d.ts +47 -0
- package/dist/runtime/state-bridge.d.ts.map +1 -0
- package/dist/runtime/state-bridge.js +53 -0
- package/dist/runtime/types.d.ts +179 -0
- package/dist/runtime/types.d.ts.map +1 -0
- package/dist/runtime/types.js +1 -0
- package/dist/scene/asset-loaders.d.ts +79 -0
- package/dist/scene/asset-loaders.d.ts.map +1 -0
- package/dist/scene/asset-loaders.js +141 -0
- package/dist/scene/asset-paths.d.ts +11 -0
- package/dist/scene/asset-paths.d.ts.map +1 -0
- package/dist/scene/asset-paths.js +108 -0
- package/dist/scene/asset-ref-check.d.ts +88 -0
- package/dist/scene/asset-ref-check.d.ts.map +1 -0
- package/dist/scene/asset-ref-check.js +214 -0
- package/dist/scene/asset-registry.d.ts +30 -0
- package/dist/scene/asset-registry.d.ts.map +1 -0
- package/dist/scene/asset-registry.js +50 -0
- package/dist/scene/collider-dimensions.d.ts +63 -0
- package/dist/scene/collider-dimensions.d.ts.map +1 -0
- package/dist/scene/collider-dimensions.js +98 -0
- package/dist/scene/component-registry.d.ts +17 -0
- package/dist/scene/component-registry.d.ts.map +1 -0
- package/dist/scene/component-registry.js +28 -0
- package/dist/scene/defaults.d.ts +252 -0
- package/dist/scene/defaults.d.ts.map +1 -0
- package/dist/scene/defaults.js +151 -0
- package/dist/scene/geometries/index.d.ts +8 -0
- package/dist/scene/geometries/index.d.ts.map +1 -0
- package/dist/scene/geometries/index.js +7 -0
- package/dist/scene/geometries/terrain.d.ts +2 -0
- package/dist/scene/geometries/terrain.d.ts.map +1 -0
- package/dist/scene/geometries/terrain.js +37 -0
- package/dist/scene/geometry-registry.d.ts +24 -0
- package/dist/scene/geometry-registry.d.ts.map +1 -0
- package/dist/scene/geometry-registry.js +20 -0
- package/dist/scene/instance-registry.d.ts +36 -0
- package/dist/scene/instance-registry.d.ts.map +1 -0
- package/dist/scene/instance-registry.js +55 -0
- package/dist/scene/instancers/grid.d.ts +2 -0
- package/dist/scene/instancers/grid.d.ts.map +1 -0
- package/dist/scene/instancers/grid.js +36 -0
- package/dist/scene/instancers/index.d.ts +8 -0
- package/dist/scene/instancers/index.d.ts.map +1 -0
- package/dist/scene/instancers/index.js +7 -0
- package/dist/scene/light-camera-factory.d.ts +23 -0
- package/dist/scene/light-camera-factory.d.ts.map +1 -0
- package/dist/scene/light-camera-factory.js +68 -0
- package/dist/scene/material-factory.d.ts +17 -0
- package/dist/scene/material-factory.d.ts.map +1 -0
- package/dist/scene/material-factory.js +197 -0
- package/dist/scene/material-registry.d.ts +40 -0
- package/dist/scene/material-registry.d.ts.map +1 -0
- package/dist/scene/material-registry.js +44 -0
- package/dist/scene/materials/index.d.ts +8 -0
- package/dist/scene/materials/index.d.ts.map +1 -0
- package/dist/scene/materials/index.js +7 -0
- package/dist/scene/materials/water.d.ts +2 -0
- package/dist/scene/materials/water.d.ts.map +1 -0
- package/dist/scene/materials/water.js +54 -0
- package/dist/scene/parse.d.ts +23 -0
- package/dist/scene/parse.d.ts.map +1 -0
- package/dist/scene/parse.js +179 -0
- package/dist/scene/particles-factory.d.ts +33 -0
- package/dist/scene/particles-factory.d.ts.map +1 -0
- package/dist/scene/particles-factory.js +282 -0
- package/dist/scene/scene-apply.d.ts +109 -0
- package/dist/scene/scene-apply.d.ts.map +1 -0
- package/dist/scene/scene-apply.js +326 -0
- package/dist/scene/scene-diff-schema.d.ts +285 -0
- package/dist/scene/scene-diff-schema.d.ts.map +1 -0
- package/dist/scene/scene-diff-schema.js +92 -0
- package/dist/scene/scene-diff-types.d.ts +40 -0
- package/dist/scene/scene-diff-types.d.ts.map +1 -0
- package/dist/scene/scene-diff-types.js +14 -0
- package/dist/scene/scene-loader.d.ts +177 -0
- package/dist/scene/scene-loader.d.ts.map +1 -0
- package/dist/scene/scene-loader.js +1213 -0
- package/dist/scene/scene-query.d.ts +11 -0
- package/dist/scene/scene-query.d.ts.map +1 -0
- package/dist/scene/scene-query.js +63 -0
- package/dist/scene/scene-types.d.ts +10 -0
- package/dist/scene/scene-types.d.ts.map +1 -0
- package/dist/scene/scene-types.js +8 -0
- package/dist/scene/scene-version.d.ts +26 -0
- package/dist/scene/scene-version.d.ts.map +1 -0
- package/dist/scene/scene-version.js +34 -0
- package/dist/scene/schema/animation.d.ts +8 -0
- package/dist/scene/schema/animation.d.ts.map +1 -0
- package/dist/scene/schema/animation.js +42 -0
- package/dist/scene/schema/audio.d.ts +13 -0
- package/dist/scene/schema/audio.d.ts.map +1 -0
- package/dist/scene/schema/audio.js +22 -0
- package/dist/scene/schema/camera.d.ts +28 -0
- package/dist/scene/schema/camera.d.ts.map +1 -0
- package/dist/scene/schema/camera.js +17 -0
- package/dist/scene/schema/collider.d.ts +40 -0
- package/dist/scene/schema/collider.d.ts.map +1 -0
- package/dist/scene/schema/collider.js +55 -0
- package/dist/scene/schema/entity-ref.d.ts +31 -0
- package/dist/scene/schema/entity-ref.d.ts.map +1 -0
- package/dist/scene/schema/entity-ref.js +61 -0
- package/dist/scene/schema/entity.d.ts +1036 -0
- package/dist/scene/schema/entity.d.ts.map +1 -0
- package/dist/scene/schema/entity.js +153 -0
- package/dist/scene/schema/environment.d.ts +425 -0
- package/dist/scene/schema/environment.d.ts.map +1 -0
- package/dist/scene/schema/environment.js +357 -0
- package/dist/scene/schema/index.d.ts +39 -0
- package/dist/scene/schema/index.d.ts.map +1 -0
- package/dist/scene/schema/index.js +20 -0
- package/dist/scene/schema/instances.d.ts +14 -0
- package/dist/scene/schema/instances.d.ts.map +1 -0
- package/dist/scene/schema/instances.js +28 -0
- package/dist/scene/schema/joint.d.ts +23 -0
- package/dist/scene/schema/joint.d.ts.map +1 -0
- package/dist/scene/schema/joint.js +23 -0
- package/dist/scene/schema/light.d.ts +38 -0
- package/dist/scene/schema/light.d.ts.map +1 -0
- package/dist/scene/schema/light.js +26 -0
- package/dist/scene/schema/material.d.ts +199 -0
- package/dist/scene/schema/material.d.ts.map +1 -0
- package/dist/scene/schema/material.js +99 -0
- package/dist/scene/schema/mesh.d.ts +48 -0
- package/dist/scene/schema/mesh.d.ts.map +1 -0
- package/dist/scene/schema/mesh.js +82 -0
- package/dist/scene/schema/particles.d.ts +2178 -0
- package/dist/scene/schema/particles.d.ts.map +1 -0
- package/dist/scene/schema/particles.js +321 -0
- package/dist/scene/schema/physics.d.ts +56 -0
- package/dist/scene/schema/physics.d.ts.map +1 -0
- package/dist/scene/schema/physics.js +37 -0
- package/dist/scene/schema/scene-file.d.ts +304 -0
- package/dist/scene/schema/scene-file.d.ts.map +1 -0
- package/dist/scene/schema/scene-file.js +262 -0
- package/dist/scene/schema/shadow.d.ts +28 -0
- package/dist/scene/schema/shadow.d.ts.map +1 -0
- package/dist/scene/schema/shadow.js +20 -0
- package/dist/scene/schema/spline.d.ts +25 -0
- package/dist/scene/schema/spline.d.ts.map +1 -0
- package/dist/scene/schema/spline.js +15 -0
- package/dist/scene/schema/tuples.d.ts +12 -0
- package/dist/scene/schema/tuples.d.ts.map +1 -0
- package/dist/scene/schema/tuples.js +14 -0
- package/dist/scene/schema/ui.d.ts +880 -0
- package/dist/scene/schema/ui.d.ts.map +1 -0
- package/dist/scene/schema/ui.js +506 -0
- package/dist/scene/user-data.d.ts +171 -0
- package/dist/scene/user-data.d.ts.map +1 -0
- package/dist/scene/user-data.js +137 -0
- package/dist/setup/setup-audio.d.ts +20 -0
- package/dist/setup/setup-audio.d.ts.map +1 -0
- package/dist/setup/setup-audio.js +41 -0
- package/dist/setup/setup-particles.d.ts +17 -0
- package/dist/setup/setup-particles.d.ts.map +1 -0
- package/dist/setup/setup-particles.js +16 -0
- package/dist/setup/setup-physics.d.ts +25 -0
- package/dist/setup/setup-physics.d.ts.map +1 -0
- package/dist/setup/setup-physics.js +51 -0
- package/dist/setup/setup-renderer.d.ts +69 -0
- package/dist/setup/setup-renderer.d.ts.map +1 -0
- package/dist/setup/setup-renderer.js +363 -0
- package/dist/tools/define-tool.d.ts +105 -0
- package/dist/tools/define-tool.d.ts.map +1 -0
- package/dist/tools/define-tool.js +82 -0
- package/dist/world2d/authoring-2d.d.ts +76 -0
- package/dist/world2d/authoring-2d.d.ts.map +1 -0
- package/dist/world2d/authoring-2d.js +176 -0
- package/dist/world2d/capture-to-scene2d.d.ts +5 -0
- package/dist/world2d/capture-to-scene2d.d.ts.map +1 -0
- package/dist/world2d/capture-to-scene2d.js +49 -0
- package/dist/world2d/collision-2d.d.ts +52 -0
- package/dist/world2d/collision-2d.d.ts.map +1 -0
- package/dist/world2d/collision-2d.js +70 -0
- package/dist/world2d/components-2d.d.ts +47 -0
- package/dist/world2d/components-2d.d.ts.map +1 -0
- package/dist/world2d/components-2d.js +77 -0
- package/dist/world2d/index.d.ts +34 -0
- package/dist/world2d/index.d.ts.map +1 -0
- package/dist/world2d/index.js +32 -0
- package/dist/world2d/ingest-iframe-2d.d.ts +82 -0
- package/dist/world2d/ingest-iframe-2d.d.ts.map +1 -0
- package/dist/world2d/ingest-iframe-2d.js +166 -0
- package/dist/world2d/ingest2d.d.ts +97 -0
- package/dist/world2d/ingest2d.d.ts.map +1 -0
- package/dist/world2d/ingest2d.js +40 -0
- package/dist/world2d/physics2d-registry.d.ts +24 -0
- package/dist/world2d/physics2d-registry.d.ts.map +1 -0
- package/dist/world2d/physics2d-registry.js +38 -0
- package/dist/world2d/pixi-game-adapter.d.ts +107 -0
- package/dist/world2d/pixi-game-adapter.d.ts.map +1 -0
- package/dist/world2d/pixi-game-adapter.js +211 -0
- package/dist/world2d/pixi-surface.d.ts +39 -0
- package/dist/world2d/pixi-surface.d.ts.map +1 -0
- package/dist/world2d/pixi-surface.js +47 -0
- package/dist/world2d/scene-capture-2d.d.ts +43 -0
- package/dist/world2d/scene-capture-2d.d.ts.map +1 -0
- package/dist/world2d/scene-capture-2d.js +92 -0
- package/dist/world2d/scene2d-loader.d.ts +27 -0
- package/dist/world2d/scene2d-loader.d.ts.map +1 -0
- package/dist/world2d/scene2d-loader.js +274 -0
- package/dist/world2d/schema/entity2d.d.ts +102 -0
- package/dist/world2d/schema/entity2d.d.ts.map +1 -0
- package/dist/world2d/schema/entity2d.js +119 -0
- package/dist/world2d/schema/physics2d.d.ts +46 -0
- package/dist/world2d/schema/physics2d.d.ts.map +1 -0
- package/dist/world2d/schema/physics2d.js +45 -0
- package/dist/world2d/schema/sprite.d.ts +42 -0
- package/dist/world2d/schema/sprite.d.ts.map +1 -0
- package/dist/world2d/schema/sprite.js +63 -0
- package/dist/world2d/schema/tilemap.d.ts +15 -0
- package/dist/world2d/schema/tilemap.d.ts.map +1 -0
- package/dist/world2d/schema/tilemap.js +19 -0
- package/dist/world2d/schema/tuples2d.d.ts +20 -0
- package/dist/world2d/schema/tuples2d.d.ts.map +1 -0
- package/dist/world2d/schema/tuples2d.js +19 -0
- package/dist/world2d/system-adapters-2d.d.ts +16 -0
- package/dist/world2d/system-adapters-2d.d.ts.map +1 -0
- package/dist/world2d/system-adapters-2d.js +37 -0
- package/dist/world2d/transform-writer-2d.d.ts +16 -0
- package/dist/world2d/transform-writer-2d.d.ts.map +1 -0
- package/dist/world2d/transform-writer-2d.js +22 -0
- package/dist/world2d/types.d.ts +53 -0
- package/dist/world2d/types.d.ts.map +1 -0
- package/dist/world2d/types.js +1 -0
- package/package.json +18 -4
- package/src/adapter/authoring.ts +10 -0
- package/src/adapter/first-party-systems.ts +23 -34
- package/src/adapter/index.ts +1 -3
- package/src/adapter/system-adapter.ts +15 -22
- package/src/adapter/vgai-scene-game-adapter.ts +5 -14
- package/src/animation/anim-graph-types.ts +12 -43
- package/src/animation/animation-clock.ts +479 -0
- package/src/animation/camera-ownership.ts +467 -0
- package/src/animation/cinematic-cues.ts +451 -0
- package/src/animation/clip-map.ts +41 -0
- package/src/animation/gsap-registration.ts +184 -0
- package/src/animation/theatre-clock-binding.ts +111 -0
- package/src/animation/theatre-director.ts +347 -0
- package/src/animation/theatre-object-binding.ts +661 -0
- package/src/animation/xstate-animation-binding.ts +398 -0
- package/src/animation/xstate-animation-meta.ts +282 -0
- package/src/audio/index.ts +39 -7
- package/src/audio/tone-clock-binding.ts +98 -0
- package/src/audio/tone-context.ts +129 -0
- package/src/audio/tone-offline-render.ts +167 -0
- package/src/audio/wav-encode.ts +119 -0
- package/src/core/game-loop.ts +17 -0
- package/src/core/types.ts +13 -0
- package/src/data/data-asset.ts +167 -0
- package/src/data/data-check-core.ts +242 -0
- package/src/data/data-ref.ts +145 -0
- package/src/data/vite-plugin-data.ts +290 -0
- package/src/index.ts +48 -0
- package/src/input/input-manager.ts +1206 -32
- package/src/input/input-types.ts +155 -3
- package/src/input/prompt-labels.ts +122 -0
- package/src/input/rebind-controller.ts +105 -0
- package/src/input/schema.ts +206 -52
- package/src/react/use-data.ts +114 -0
- package/src/react/use-selection.tsx +135 -0
- package/src/runtime/create-runtime.ts +30 -9
- package/src/runtime/render-audio-control.ts +168 -0
- package/src/runtime/render-control.ts +522 -0
- package/src/runtime/render-seed.ts +79 -0
- package/src/runtime/types.ts +0 -5
- package/src/scene/asset-loaders.ts +10 -36
- package/src/scene/asset-paths.ts +0 -2
- package/src/scene/asset-ref-check.ts +248 -0
- package/src/scene/parse.ts +133 -0
- package/src/scene/scene-loader.ts +81 -96
- package/src/scene/schema/animation.ts +30 -79
- package/src/scene/schema/entity.ts +20 -0
- package/src/scene/schema/index.ts +2 -12
- package/src/scene/user-data.ts +8 -9
- package/src/setup/setup-renderer.ts +9 -2
- package/src/tools/define-tool.ts +152 -0
- package/src/animation/anim-graph.ts +0 -406
- package/src/animation/anim-system.ts +0 -28
- package/src/animation/property-track.ts +0 -178
- package/src/animation/schema.ts +0 -204
- package/src/audio/ambient.ts +0 -300
- package/src/audio/impacts.ts +0 -212
- package/src/audio/movement.ts +0 -140
- package/src/audio/musical.ts +0 -200
- package/src/audio/ui-sounds.ts +0 -171
- package/src/audio/vehicle.ts +0 -235
- package/src/audio/weapons.ts +0 -152
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../../src/scene/schema/ui.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA6CxB;;;;GAIG;AACH,eAAO,MAAM,eAAe;;;;;;;;iBAiB4C,CAAC;AACzE,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AA4CxD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoEuD,CAAC;AACnF,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAMtD;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA4B0D,CAAC;AACrF,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAEpD,oFAAoF;AACpF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAOe,CAAC;AAEhD;;;;;GAKG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAW+D,CAAC;AAC1F,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAEpD,oFAAoF;AACpF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAKoB,CAAC;AACnD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAM5D;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;EA2BgC,CAAC;AAC9D,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAwB1D,wEAAwE;AACxE,eAAO,MAAM,cAAc;;;;;;EAEiD,CAAC;AAC7E,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD;;;GAGG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;EAYoB,CAAC;AAC5D,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,kFAAkF;AAClF,eAAO,MAAM,gBAAgB;;;;;;;;;;iBAM2B,CAAC;AACzD,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,2EAA2E;AAC3E,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;iBAKuD,CAAC;AAClF,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAEpD,qFAAqF;AACrF,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAanB,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkBqC,CAAC;AACpE,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAmF1D;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,GAAG;IAChD,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;CACjC,CAAC;AAEF,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAA+B,CAAC;AAEhD,eAAO,MAAM,YAAY,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAIrB,CAAC;AAMvB,uDAAuD;AACvD,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;iBAiBmD,CAAC;AAEzE;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CA2CrB,CAAC;AAEvB,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,GAAG;IAChD,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,CAAC,EAAE,QAAQ,GAAG,eAAe,GAAG,SAAS,CAAC;IAC/C,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,OAAO,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,GAAG,SAAS,CAAC;IACtD,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;CACjC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;;;;iBAW+C,CAAC;AAC/E,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
|
@@ -0,0 +1,506 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* UI scene-graph schema — React game UI represented AS scene-graph data.
|
|
4
|
+
*
|
|
5
|
+
* This is the engine-side (framework-agnostic, data-only) source of truth for the
|
|
6
|
+
* `.vscn.json` `ui` field and `.uitheme.json` theme assets. The React runtime
|
|
7
|
+
* renderer (editor-side, `packages/editor/src/ui-runtime/`) and the editor's
|
|
8
|
+
* UI-authoring layer both read/write THIS data — the engine never imports React.
|
|
9
|
+
*
|
|
10
|
+
* Design follows the cross-engine UI model distilled from Godot Control nodes,
|
|
11
|
+
* Unity uGUI/UI Toolkit, and Unreal UMG (see docs/UI-VISUAL-EDIT-MAXIMAL-SPEC.json
|
|
12
|
+
* groups A/D/E/F/G): a nested node tree (root canvas -> containers -> controls) with
|
|
13
|
+
* an anchor+offset layout model on top of a flexbox auto-layout engine, a reusable
|
|
14
|
+
* theme/token resource with per-element overrides and per-state styling, declarative
|
|
15
|
+
* data bindings (one-/two-way), data-bound list templates, and reusable component
|
|
16
|
+
* references. Every field is `.describe()`d to power JSON Schema generation.
|
|
17
|
+
*/
|
|
18
|
+
// ---------------------------------------------------------------------------
|
|
19
|
+
// Primitives
|
|
20
|
+
// ---------------------------------------------------------------------------
|
|
21
|
+
/** A 2-tuple [x, y] in 0..1 fraction or px depending on the field. */
|
|
22
|
+
const UIVec2Schema = z.tuple([z.number(), z.number()]);
|
|
23
|
+
/**
|
|
24
|
+
* A length: a number (logical px) or a CSS-like string token ('auto', '50%',
|
|
25
|
+
* '1fr', 'min-content'). Strings let containers express fractional/intrinsic
|
|
26
|
+
* sizing (Godot size flags / Unity flexible size / UMG Fill) without inventing a
|
|
27
|
+
* parallel unit system — the flex runtime maps them to CSS directly.
|
|
28
|
+
*/
|
|
29
|
+
const UILengthSchema = z.union([z.number(), z.string()]);
|
|
30
|
+
/**
|
|
31
|
+
* A style value: a literal string/number, OR a theme-token reference of the form
|
|
32
|
+
* "$tokenName" resolved against the active theme (F1). Kept as a permissive
|
|
33
|
+
* union so the schema-driven inspector round-trips both forms.
|
|
34
|
+
*/
|
|
35
|
+
const UIStyleValueSchema = z.union([z.string(), z.number()]);
|
|
36
|
+
// ---------------------------------------------------------------------------
|
|
37
|
+
// Data binding (G1/G2/G4)
|
|
38
|
+
// ---------------------------------------------------------------------------
|
|
39
|
+
/**
|
|
40
|
+
* A declarative binding to the game's reactive data source. The runtime resolves
|
|
41
|
+
* `source` (a dotted path, e.g. "player.health") against the UIDataSource the
|
|
42
|
+
* game provides; `mode` controls write-back for input controls (two-way / MVVM).
|
|
43
|
+
*/
|
|
44
|
+
export const UIBindingSchema = z
|
|
45
|
+
.object({
|
|
46
|
+
source: z
|
|
47
|
+
.string()
|
|
48
|
+
.describe('Dotted path into the game data source, e.g. "player.health" or "settings.volume"'),
|
|
49
|
+
mode: z
|
|
50
|
+
.enum(['one-way', 'two-way'])
|
|
51
|
+
.optional()
|
|
52
|
+
.describe('one-way: source -> UI (default). two-way: input controls also write back (MVVM)'),
|
|
53
|
+
transform: z
|
|
54
|
+
.string()
|
|
55
|
+
.optional()
|
|
56
|
+
.describe('Optional named transform/formatter applied to the value before display'),
|
|
57
|
+
fallback: UIStyleValueSchema.optional().describe('Value used when the source path is undefined at runtime'),
|
|
58
|
+
})
|
|
59
|
+
.describe('A data binding from the game data source to a UI property');
|
|
60
|
+
/**
|
|
61
|
+
* A prop value is either a literal (scalar / scalar array) or a binding wrapper
|
|
62
|
+
* `{ $bind: {...} }` (G4 — bindings are first-class and distinguishable from
|
|
63
|
+
* literals, mirroring visual-edit's literal-vs-dynamic guard but editable).
|
|
64
|
+
*/
|
|
65
|
+
const UIBoundValueSchema = z
|
|
66
|
+
.object({ $bind: UIBindingSchema })
|
|
67
|
+
.describe('A bound value: { $bind: { source, mode, ... } }');
|
|
68
|
+
const UIPropValueSchema = z.union([
|
|
69
|
+
z.string(),
|
|
70
|
+
z.number(),
|
|
71
|
+
z.boolean(),
|
|
72
|
+
z.array(z.string()),
|
|
73
|
+
z.array(z.number()),
|
|
74
|
+
UIBoundValueSchema,
|
|
75
|
+
]);
|
|
76
|
+
// ---------------------------------------------------------------------------
|
|
77
|
+
// Layout & anchoring (D1/D2/D3) + containers (E1-E4)
|
|
78
|
+
// ---------------------------------------------------------------------------
|
|
79
|
+
/** Anchor fractions (0..1) of each edge against the parent rect (D1). */
|
|
80
|
+
const UIAnchorSchema = z
|
|
81
|
+
.object({
|
|
82
|
+
left: z.number().describe('Left-edge anchor as a fraction of parent width (0=left, 1=right)'),
|
|
83
|
+
top: z.number().describe('Top-edge anchor as a fraction of parent height (0=top, 1=bottom)'),
|
|
84
|
+
right: z.number().describe('Right-edge anchor as a fraction of parent width'),
|
|
85
|
+
bottom: z.number().describe('Bottom-edge anchor as a fraction of parent height'),
|
|
86
|
+
})
|
|
87
|
+
.describe('Anchor preset (fractions of parent). Equal L/R or T/B = fixed size; split = stretch');
|
|
88
|
+
/** Pixel offsets of each edge from its anchor (D1). */
|
|
89
|
+
const UIOffsetSchema = z
|
|
90
|
+
.object({
|
|
91
|
+
left: z.number().describe('Left offset in px from the left anchor'),
|
|
92
|
+
top: z.number().describe('Top offset in px from the top anchor'),
|
|
93
|
+
right: z.number().describe('Right offset in px from the right anchor'),
|
|
94
|
+
bottom: z.number().describe('Bottom offset in px from the bottom anchor'),
|
|
95
|
+
})
|
|
96
|
+
.describe('Pixel offsets from the anchors');
|
|
97
|
+
export const UILayoutSchema = z
|
|
98
|
+
.object({
|
|
99
|
+
position: z
|
|
100
|
+
.enum(['flow', 'absolute'])
|
|
101
|
+
.optional()
|
|
102
|
+
.describe('flow: laid out by the parent container (flex). absolute: anchored free placement'),
|
|
103
|
+
anchor: UIAnchorSchema.optional().describe('Anchor fractions (absolute/anchored nodes) (D1)'),
|
|
104
|
+
offset: UIOffsetSchema.optional().describe('Pixel offsets from anchors (absolute/anchored) (D1)'),
|
|
105
|
+
pivot: UIVec2Schema.optional().describe('Pivot/alignment point (0..1 each axis) for rotation/scale/position origin (D3)'),
|
|
106
|
+
width: UILengthSchema.optional().describe('Width: px number or token ("auto","50%","1fr")'),
|
|
107
|
+
height: UILengthSchema.optional().describe('Height: px number or token'),
|
|
108
|
+
minWidth: UILengthSchema.optional().describe('Minimum width'),
|
|
109
|
+
maxWidth: UILengthSchema.optional().describe('Maximum width'),
|
|
110
|
+
minHeight: UILengthSchema.optional().describe('Minimum height'),
|
|
111
|
+
maxHeight: UILengthSchema.optional().describe('Maximum height'),
|
|
112
|
+
aspectRatio: z
|
|
113
|
+
.number()
|
|
114
|
+
.optional()
|
|
115
|
+
.describe('Locked width/height ratio (AspectRatio container)'),
|
|
116
|
+
// --- container (parent) flex props (E1/E4) ---
|
|
117
|
+
direction: z
|
|
118
|
+
.enum(['row', 'column', 'row-reverse', 'column-reverse'])
|
|
119
|
+
.optional()
|
|
120
|
+
.describe('Flex main-axis direction for box containers (E1)'),
|
|
121
|
+
justify: z
|
|
122
|
+
.enum(['start', 'center', 'end', 'space-between', 'space-around', 'space-evenly'])
|
|
123
|
+
.optional()
|
|
124
|
+
.describe('Main-axis alignment of children'),
|
|
125
|
+
align: z
|
|
126
|
+
.enum(['start', 'center', 'end', 'stretch', 'baseline'])
|
|
127
|
+
.optional()
|
|
128
|
+
.describe('Cross-axis alignment of children'),
|
|
129
|
+
wrap: z
|
|
130
|
+
.boolean()
|
|
131
|
+
.optional()
|
|
132
|
+
.describe('Wrap children to the next line (Wrap/Flow container) (E3)'),
|
|
133
|
+
gap: z.number().optional().describe('Gap (px) between children'),
|
|
134
|
+
columns: z.number().optional().describe('Column count for grid containers (E2)'),
|
|
135
|
+
// --- child (item) flex props (Godot size flags / Unity flexible / UMG Fill) ---
|
|
136
|
+
grow: z.number().optional().describe('Flex grow factor (expand to fill / stretch ratio)'),
|
|
137
|
+
shrink: z.number().optional().describe('Flex shrink factor'),
|
|
138
|
+
basis: UILengthSchema.optional().describe('Flex basis (initial main-axis size)'),
|
|
139
|
+
alignSelf: z
|
|
140
|
+
.enum(['auto', 'start', 'center', 'end', 'stretch', 'baseline'])
|
|
141
|
+
.optional()
|
|
142
|
+
.describe('Per-child cross-axis alignment override'),
|
|
143
|
+
// --- spacing & layering ---
|
|
144
|
+
padding: z
|
|
145
|
+
.array(z.number())
|
|
146
|
+
.optional()
|
|
147
|
+
.describe('Padding [top,right,bottom,left] in px (MarginContainer / slot padding)'),
|
|
148
|
+
margin: z.array(z.number()).optional().describe('Margin [top,right,bottom,left] in px'),
|
|
149
|
+
zIndex: z
|
|
150
|
+
.number()
|
|
151
|
+
.optional()
|
|
152
|
+
.describe('Stacking order within the parent (Overlay/Canvas z) (E3)'),
|
|
153
|
+
overflow: z
|
|
154
|
+
.enum(['visible', 'hidden', 'scroll', 'auto'])
|
|
155
|
+
.optional()
|
|
156
|
+
.describe('Overflow behaviour (Scroll container = scroll/auto) (E3)'),
|
|
157
|
+
})
|
|
158
|
+
.describe('Layout: anchor+offset model over a flexbox auto-layout engine (D/E)');
|
|
159
|
+
// ---------------------------------------------------------------------------
|
|
160
|
+
// Styling & theming (F1-F6)
|
|
161
|
+
// ---------------------------------------------------------------------------
|
|
162
|
+
/**
|
|
163
|
+
* A flat style bag. Values are literal CSS-ish values OR theme-token refs
|
|
164
|
+
* ("$accent"). Kept open (record) for forward-compat, with the common authored
|
|
165
|
+
* properties documented. Numbers are treated as px where a length is expected.
|
|
166
|
+
*/
|
|
167
|
+
export const UIStyleSchema = z
|
|
168
|
+
.object({
|
|
169
|
+
backgroundColor: UIStyleValueSchema.optional().describe('Background color (hex/rgb/"$token")'),
|
|
170
|
+
backgroundImage: z.string().optional().describe('Background image asset ref or url (A5)'),
|
|
171
|
+
backgroundSize: z.string().optional().describe('Background sizing (e.g. "cover","9-slice")'),
|
|
172
|
+
color: UIStyleValueSchema.optional().describe('Text/foreground color'),
|
|
173
|
+
fontSize: UIStyleValueSchema.optional().describe('Font size (px or "$token")'),
|
|
174
|
+
fontFamily: z.string().optional().describe('Font family or font asset ref (A5)'),
|
|
175
|
+
fontWeight: UIStyleValueSchema.optional().describe('Font weight (e.g. 400/700/"bold")'),
|
|
176
|
+
fontStyle: z.string().optional().describe('Font style (normal/italic)'),
|
|
177
|
+
textAlign: z.enum(['left', 'center', 'right', 'justify']).optional().describe('Text alignment'),
|
|
178
|
+
lineHeight: UIStyleValueSchema.optional().describe('Line height'),
|
|
179
|
+
letterSpacing: UIStyleValueSchema.optional().describe('Letter spacing'),
|
|
180
|
+
opacity: z.number().optional().describe('Opacity 0..1'),
|
|
181
|
+
borderRadius: UIStyleValueSchema.optional().describe('Corner radius (px or "$token")'),
|
|
182
|
+
borderWidth: UIStyleValueSchema.optional().describe('Border width (px)'),
|
|
183
|
+
borderColor: UIStyleValueSchema.optional().describe('Border color'),
|
|
184
|
+
borderStyle: z.enum(['solid', 'dashed', 'dotted', 'none']).optional().describe('Border style'),
|
|
185
|
+
boxShadow: z.string().optional().describe('Box shadow CSS value'),
|
|
186
|
+
// 9-slice / scalable box image (F4): border image inset for non-distorting scale
|
|
187
|
+
sliceInset: z
|
|
188
|
+
.array(z.number())
|
|
189
|
+
.optional()
|
|
190
|
+
.describe('9-slice inset [top,right,bottom,left] px for backgroundImage scaling (F4)'),
|
|
191
|
+
cursor: z.string().optional().describe('Cursor over this element (e.g. "pointer")'),
|
|
192
|
+
// transition (F6): animated state changes
|
|
193
|
+
transition: z.string().optional().describe('CSS-like transition for state changes (F6)'),
|
|
194
|
+
})
|
|
195
|
+
.describe('Style bag. Values may reference theme tokens via "$tokenName" (F1/F2)');
|
|
196
|
+
/** Per-state style overrides (F3): normal is the base style; these layer on top. */
|
|
197
|
+
export const UIStateStylesSchema = z
|
|
198
|
+
.object({
|
|
199
|
+
hover: UIStyleSchema.optional().describe('Style applied on pointer hover'),
|
|
200
|
+
pressed: UIStyleSchema.optional().describe('Style applied while pressed/active'),
|
|
201
|
+
disabled: UIStyleSchema.optional().describe('Style applied when disabled'),
|
|
202
|
+
focus: UIStyleSchema.optional().describe('Style applied when focused (keyboard/gamepad)'),
|
|
203
|
+
})
|
|
204
|
+
.describe('Per-state styling overrides (F3)');
|
|
205
|
+
/**
|
|
206
|
+
* A reusable theme/style resource (F1). `tokens` is a flat map of token name ->
|
|
207
|
+
* value referenced by style props as "$name". `variants` are named style
|
|
208
|
+
* variations of a base look (F4 / Godot type variations). Authored inline on a
|
|
209
|
+
* UI root OR as a standalone `.uitheme.json` referenced by `themeRef`.
|
|
210
|
+
*/
|
|
211
|
+
export const UIThemeSchema = z
|
|
212
|
+
.object({
|
|
213
|
+
name: z.string().describe('Theme name'),
|
|
214
|
+
tokens: z
|
|
215
|
+
.record(z.string(), UIStyleValueSchema)
|
|
216
|
+
.describe('Design tokens: tokenName -> value, referenced in styles as "$tokenName" (F1)'),
|
|
217
|
+
variants: z
|
|
218
|
+
.record(z.string(), UIStyleSchema)
|
|
219
|
+
.optional()
|
|
220
|
+
.describe('Named style variations of a base type (F4 / type variations)'),
|
|
221
|
+
})
|
|
222
|
+
.describe('Reusable theme resource (F1). Inline on a UI root or a .uitheme.json asset');
|
|
223
|
+
/** Standalone theme asset file (.uitheme.json) — the chosen theme file boundary. */
|
|
224
|
+
export const UIThemeFileSchema = z
|
|
225
|
+
.object({
|
|
226
|
+
version: z.number().describe('Theme file format version'),
|
|
227
|
+
theme: UIThemeSchema.describe('The theme resource'),
|
|
228
|
+
})
|
|
229
|
+
.describe('UI theme asset file (.uitheme.json)');
|
|
230
|
+
// ---------------------------------------------------------------------------
|
|
231
|
+
// UI node tree (A2) + controls (J1) + lists (G3) + components (H)
|
|
232
|
+
// ---------------------------------------------------------------------------
|
|
233
|
+
/**
|
|
234
|
+
* Node kinds. Containers (canvas/box/grid/stack/scroll/panel/tab/center/wrap/
|
|
235
|
+
* aspect/sizebox) arrange children; controls (text/richtext/button/image/input/
|
|
236
|
+
* toggle/slider/dropdown/progress) are leaves; `component` references a reusable
|
|
237
|
+
* React component or a saved UI prefab.
|
|
238
|
+
*/
|
|
239
|
+
export const UINodeKindSchema = z
|
|
240
|
+
.enum([
|
|
241
|
+
// containers (E1-E4)
|
|
242
|
+
'canvas',
|
|
243
|
+
'box',
|
|
244
|
+
'grid',
|
|
245
|
+
'stack', // z-layered overlay
|
|
246
|
+
'scroll',
|
|
247
|
+
'panel', // styled background container
|
|
248
|
+
'center',
|
|
249
|
+
'wrap',
|
|
250
|
+
'aspect',
|
|
251
|
+
'sizebox',
|
|
252
|
+
'tab', // shows one child at a time (WidgetSwitcher)
|
|
253
|
+
// controls (J1) + text (F4 rich text)
|
|
254
|
+
'text',
|
|
255
|
+
'richtext',
|
|
256
|
+
'button',
|
|
257
|
+
'image',
|
|
258
|
+
'input',
|
|
259
|
+
'toggle',
|
|
260
|
+
'slider',
|
|
261
|
+
'dropdown',
|
|
262
|
+
'progress',
|
|
263
|
+
// reuse (H) — a referenced React component or saved UI prefab
|
|
264
|
+
'component',
|
|
265
|
+
])
|
|
266
|
+
.describe('UI node kind (container / control / component)');
|
|
267
|
+
/** A data-bound list template descriptor (G3). */
|
|
268
|
+
const UIRepeatSchema = z
|
|
269
|
+
.object({
|
|
270
|
+
items: UIBindingSchema.describe('Binding to the collection to repeat over (G3)'),
|
|
271
|
+
as: z
|
|
272
|
+
.string()
|
|
273
|
+
.describe('Alias name each item is exposed under inside the template (e.g. "item")'),
|
|
274
|
+
keyPath: z
|
|
275
|
+
.string()
|
|
276
|
+
.optional()
|
|
277
|
+
.describe('Per-item key path for stable per-instance ids/selection (overcomes shared-OID) (G3)'),
|
|
278
|
+
})
|
|
279
|
+
.describe('Repeat this node as a template over a bound collection (data-bound list) (G3)');
|
|
280
|
+
// ---------------------------------------------------------------------------
|
|
281
|
+
// Keyframe / timeline animation (S1 — FLOOR per the union rule: Godot
|
|
282
|
+
// AnimationPlayer, Unity Timeline, Unreal UMG Animations all author multi-keyframe
|
|
283
|
+
// multi-property UI animation on a dope-sheet/timeline).
|
|
284
|
+
// ---------------------------------------------------------------------------
|
|
285
|
+
/** Easing applied to the segment LEAVING a keyframe toward the next. */
|
|
286
|
+
export const UIEasingSchema = z
|
|
287
|
+
.enum(['linear', 'ease-in', 'ease-out', 'ease-in-out', 'step'])
|
|
288
|
+
.describe('Interpolation easing for the segment after this keyframe (S1)');
|
|
289
|
+
/**
|
|
290
|
+
* The animatable properties. Curated so each maps to a GPU-friendly CSS output
|
|
291
|
+
* (transform/opacity/color/size) — animating these does not reflow per frame.
|
|
292
|
+
*/
|
|
293
|
+
export const UIAnimatablePropertySchema = z
|
|
294
|
+
.enum([
|
|
295
|
+
'opacity',
|
|
296
|
+
'translateX',
|
|
297
|
+
'translateY',
|
|
298
|
+
'rotate',
|
|
299
|
+
'scale',
|
|
300
|
+
'backgroundColor',
|
|
301
|
+
'color',
|
|
302
|
+
'width',
|
|
303
|
+
'height',
|
|
304
|
+
])
|
|
305
|
+
.describe('A property a keyframe track can animate (S1)');
|
|
306
|
+
/** A single keyframe: a value at a time (seconds), with the easing leaving it. */
|
|
307
|
+
export const UIKeyframeSchema = z
|
|
308
|
+
.object({
|
|
309
|
+
time: z.number().describe('Keyframe time in seconds from the clip start (S1)'),
|
|
310
|
+
value: z.union([z.number(), z.string()]).describe('Value at this time (number, px, or color)'),
|
|
311
|
+
easing: UIEasingSchema.optional().describe('Easing of the segment after this keyframe'),
|
|
312
|
+
})
|
|
313
|
+
.describe('A keyframe (time + value) on a track (S1)');
|
|
314
|
+
/** A track animates ONE property via an ordered list of keyframes (S1). */
|
|
315
|
+
export const UITrackSchema = z
|
|
316
|
+
.object({
|
|
317
|
+
property: UIAnimatablePropertySchema.describe('Property this track animates'),
|
|
318
|
+
keyframes: z.array(UIKeyframeSchema).describe('Ordered keyframes (by time)'),
|
|
319
|
+
})
|
|
320
|
+
.describe('A keyframe track for one animatable property (dope-sheet row) (S1)');
|
|
321
|
+
/** A named animation clip: multiple tracks (multi-property), duration, loop (S1). */
|
|
322
|
+
const UIAnimationBase = z.object({
|
|
323
|
+
name: z.string().describe('Clip name'),
|
|
324
|
+
duration: z.number().describe('Clip duration in seconds'),
|
|
325
|
+
loop: z.boolean().optional().describe('Whether the clip loops'),
|
|
326
|
+
autoplay: z.boolean().optional().describe('Play automatically on mount'),
|
|
327
|
+
playOnEvent: z
|
|
328
|
+
.string()
|
|
329
|
+
.optional()
|
|
330
|
+
.describe('Trigger id that plays this clip (e.g. onClick). REJECTED at parse (T4.1): declared but ' +
|
|
331
|
+
'has no runtime reader — authoring this field throws. Do not author.'),
|
|
332
|
+
tracks: z.array(UITrackSchema).describe('Tracks (one per animated property)'),
|
|
333
|
+
});
|
|
334
|
+
export const UIAnimationSchema = UIAnimationBase
|
|
335
|
+
// T4.1: `playOnEvent` is authored/typed but has no runtime reader — the UI
|
|
336
|
+
// runtime (`packages/editor/src/ui-runtime/mount.tsx`) only ever looks up
|
|
337
|
+
// `autoplay` clips; `SceneUI.tsx`'s event firing (`fire('onClick')`) never
|
|
338
|
+
// cross-references a clip's `playOnEvent` id. Authoring it silently does
|
|
339
|
+
// nothing today, so it's a loud load error until a reader exists — see
|
|
340
|
+
// docs/BACKBONE-TASKS.md T4.1.
|
|
341
|
+
.superRefine((clip, ctx) => {
|
|
342
|
+
if (clip.playOnEvent !== undefined) {
|
|
343
|
+
ctx.addIssue({
|
|
344
|
+
code: z.ZodIssueCode.custom,
|
|
345
|
+
message: `UI animation clip "${clip.name}": \`playOnEvent\` is authored but not implemented — ` +
|
|
346
|
+
'no runtime reader consumes it (only `autoplay` clips are played). See T4.1.',
|
|
347
|
+
path: ['playOnEvent'],
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
})
|
|
351
|
+
.describe('A keyframe/timeline animation clip on a UI node (S1)');
|
|
352
|
+
const UISharedNodeFields = {
|
|
353
|
+
id: z.string().optional().describe('Stable unique node id. Auto-generated if omitted'),
|
|
354
|
+
name: z.string().describe('Human-readable node name (shown in the UI hierarchy)'),
|
|
355
|
+
kind: UINodeKindSchema.describe('Node kind'),
|
|
356
|
+
visible: z.boolean().optional().describe('Whether the node renders'),
|
|
357
|
+
locked: z
|
|
358
|
+
.boolean()
|
|
359
|
+
.optional()
|
|
360
|
+
.describe('Prevent selection/editing in the editor. REJECTED at parse (T4.1): declared but has no ' +
|
|
361
|
+
'runtime reader — authoring this field throws. Do not author.'),
|
|
362
|
+
tags: z
|
|
363
|
+
.array(z.string())
|
|
364
|
+
.optional()
|
|
365
|
+
.describe('Arbitrary tags for runtime queries. REJECTED at parse (T4.1): declared but has no runtime ' +
|
|
366
|
+
'reader — authoring this field throws. Do not author.'),
|
|
367
|
+
layout: UILayoutSchema.optional().describe('Layout/anchor/flex properties (D/E)'),
|
|
368
|
+
style: UIStyleSchema.optional().describe('Base style (F1/F2)'),
|
|
369
|
+
states: UIStateStylesSchema.optional().describe('Per-state style overrides (F3)'),
|
|
370
|
+
variant: z.string().optional().describe('Named theme variant to apply (F4)'),
|
|
371
|
+
props: z
|
|
372
|
+
.record(z.string(), UIPropValueSchema)
|
|
373
|
+
.optional()
|
|
374
|
+
.describe('Control/component props (text, value, placeholder, min/max, …). May be bound (G)'),
|
|
375
|
+
bindings: z
|
|
376
|
+
.record(z.string(), UIBindingSchema)
|
|
377
|
+
.optional()
|
|
378
|
+
.describe('Explicit prop/style bindings keyed by target path (G1/G2)'),
|
|
379
|
+
events: z
|
|
380
|
+
.record(z.string(), z.string())
|
|
381
|
+
.optional()
|
|
382
|
+
.describe('Event wiring: eventName ("onClick") -> game handler/action id (J2)'),
|
|
383
|
+
component: z
|
|
384
|
+
.string()
|
|
385
|
+
.optional()
|
|
386
|
+
.describe('For kind:"component" — referenced React component name or saved UI prefab path (H)'),
|
|
387
|
+
repeat: UIRepeatSchema.optional().describe('Make this node a data-bound list template (G3)'),
|
|
388
|
+
animations: z
|
|
389
|
+
.array(UIAnimationSchema)
|
|
390
|
+
.optional()
|
|
391
|
+
.describe('Keyframe/timeline animation clips on this node (S1)'),
|
|
392
|
+
};
|
|
393
|
+
/**
|
|
394
|
+
* T4.1: `locked`/`tags` (UISharedNodeFields — shared by every UI node AND the
|
|
395
|
+
* root) are authored/typed but have no runtime reader anywhere. Unlike their
|
|
396
|
+
* 3D `SceneEntity` namesakes (editor-store.ts locking, scene-query.ts tag
|
|
397
|
+
* queries), the UI-authoring side only wires `locked` as far as
|
|
398
|
+
* `ui-authoring-adapter.ts`'s `EditorNode.flags.locked` — which nothing
|
|
399
|
+
* downstream reads (that adapter isn't wired into the live editor shell yet;
|
|
400
|
+
* see its file doc comment) — and `tags` isn't touched at all. Loud load
|
|
401
|
+
* error until real readers exist — see T4.1.
|
|
402
|
+
*/
|
|
403
|
+
function checkDeadSharedNodeFields(node, ctx) {
|
|
404
|
+
if (node.locked !== undefined) {
|
|
405
|
+
ctx.addIssue({
|
|
406
|
+
code: z.ZodIssueCode.custom,
|
|
407
|
+
message: `UI node "${node.name}": \`locked\` is authored but not implemented — no runtime reader ` +
|
|
408
|
+
'gates selection/editing on it (the UI-authoring adapter sets it but nothing downstream ' +
|
|
409
|
+
'reads it yet). See T4.1.',
|
|
410
|
+
path: ['locked'],
|
|
411
|
+
});
|
|
412
|
+
}
|
|
413
|
+
if (node.tags !== undefined) {
|
|
414
|
+
ctx.addIssue({
|
|
415
|
+
code: z.ZodIssueCode.custom,
|
|
416
|
+
message: `UI node "${node.name}": \`tags\` is authored but not implemented — no runtime query ` +
|
|
417
|
+
'reader consumes it (no UI equivalent of scene-query.ts exists yet). See T4.1.',
|
|
418
|
+
path: ['tags'],
|
|
419
|
+
});
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
const UINodeBase = z.object(UISharedNodeFields);
|
|
423
|
+
export const UINodeSchema = z.lazy(() => UINodeBase.extend({
|
|
424
|
+
children: z.array(UINodeSchema).optional().describe('Child UI nodes (A2)'),
|
|
425
|
+
}).superRefine(checkDeadSharedNodeFields));
|
|
426
|
+
// ---------------------------------------------------------------------------
|
|
427
|
+
// UI root / canvas (A1/A3, I1-I3)
|
|
428
|
+
// ---------------------------------------------------------------------------
|
|
429
|
+
/** Responsive scaling config for a UI root (I1/I2). */
|
|
430
|
+
const UIScalingSchema = z
|
|
431
|
+
.object({
|
|
432
|
+
referenceWidth: z.number().describe('Design/reference resolution width (I1)'),
|
|
433
|
+
referenceHeight: z.number().describe('Design/reference resolution height (I1)'),
|
|
434
|
+
mode: z
|
|
435
|
+
.enum(['scale-with-size', 'constant-pixel', 'constant-physical'])
|
|
436
|
+
.optional()
|
|
437
|
+
.describe('Global scaling mode (Unity CanvasScaler analog) (I1)'),
|
|
438
|
+
aspect: z
|
|
439
|
+
.enum(['expand', 'keep', 'keep-width', 'keep-height'])
|
|
440
|
+
.optional()
|
|
441
|
+
.describe('Aspect-ratio policy (Godot stretch aspect / Unity match mode) (I2)'),
|
|
442
|
+
match: z
|
|
443
|
+
.number()
|
|
444
|
+
.optional()
|
|
445
|
+
.describe('0..1 width/height match factor for scale-with-size mode'),
|
|
446
|
+
})
|
|
447
|
+
.describe('Responsive resolution/DPI scaling for the UI root (I1/I2)');
|
|
448
|
+
/**
|
|
449
|
+
* A UI root — a canvas placed screen-space or screen-tracked to a 3D entity (A3).
|
|
450
|
+
* Carries the responsive scaling config and an optional inline theme / theme ref.
|
|
451
|
+
*/
|
|
452
|
+
export const UIRootSchema = z.lazy(() => z
|
|
453
|
+
.object({
|
|
454
|
+
...UISharedNodeFields,
|
|
455
|
+
kind: z.literal('canvas').describe('A UI root is always a canvas'),
|
|
456
|
+
space: z
|
|
457
|
+
.enum(['screen', 'world-tracked'])
|
|
458
|
+
.optional()
|
|
459
|
+
.describe('screen: overlay. world-tracked: billboarded to trackEntity screen pos (A3)'),
|
|
460
|
+
trackEntity: z
|
|
461
|
+
.string()
|
|
462
|
+
.optional()
|
|
463
|
+
.describe('Entity id this canvas is screen-tracked to (world-tracked space) (A3)'),
|
|
464
|
+
scaling: UIScalingSchema.optional().describe('Responsive scaling config (I1/I2)'),
|
|
465
|
+
theme: UIThemeSchema.optional().describe('Inline theme resource (F1)'),
|
|
466
|
+
themeRef: z
|
|
467
|
+
.string()
|
|
468
|
+
.optional()
|
|
469
|
+
.describe('Path to a shared .uitheme.json theme asset (F1). REJECTED at parse (T4.1): declared ' +
|
|
470
|
+
'but has no runtime reader — authoring this field throws. Do not author.'),
|
|
471
|
+
locale: z.string().optional().describe('Active locale for localized text (G5)'),
|
|
472
|
+
children: z.array(UINodeSchema).optional().describe('Child UI nodes (A2)'),
|
|
473
|
+
})
|
|
474
|
+
// T4.1: `themeRef` is authored/typed but has no runtime reader anywhere —
|
|
475
|
+
// only the inline `theme` field is ever read (`SceneUI.tsx` passes
|
|
476
|
+
// `root.theme` into render context; nothing fetches/resolves a
|
|
477
|
+
// `.uitheme.json` by path). Authoring it silently does nothing today, so
|
|
478
|
+
// it's a loud load error until a resolver exists — see T4.1.
|
|
479
|
+
.superRefine((root, ctx) => {
|
|
480
|
+
checkDeadSharedNodeFields(root, ctx);
|
|
481
|
+
if (root.themeRef !== undefined) {
|
|
482
|
+
ctx.addIssue({
|
|
483
|
+
code: z.ZodIssueCode.custom,
|
|
484
|
+
message: '`themeRef` is authored but not implemented — no runtime reader resolves a shared ' +
|
|
485
|
+
'.uitheme.json asset (only inline `theme` is read). See T4.1.',
|
|
486
|
+
path: ['themeRef'],
|
|
487
|
+
});
|
|
488
|
+
}
|
|
489
|
+
})
|
|
490
|
+
.describe('A UI root canvas attached to the scene graph (A1/A3)'));
|
|
491
|
+
/**
|
|
492
|
+
* A saved reusable UI prefab/component (H1). Mirrors PrefabFile but for a UI
|
|
493
|
+
* subtree, with declared exposed props/slots (H3).
|
|
494
|
+
*/
|
|
495
|
+
export const UIPrefabFileSchema = z
|
|
496
|
+
.object({
|
|
497
|
+
version: z.number().describe('UI prefab file format version'),
|
|
498
|
+
name: z.string().describe('UI prefab display name'),
|
|
499
|
+
root: UINodeSchema.describe('Root UI node of the prefab (H1)'),
|
|
500
|
+
exposedProps: z
|
|
501
|
+
.array(z.string())
|
|
502
|
+
.optional()
|
|
503
|
+
.describe('Prop names exposed for per-instance override (H3)'),
|
|
504
|
+
slots: z.array(z.string()).optional().describe('Named content slots for injection (H3)'),
|
|
505
|
+
})
|
|
506
|
+
.describe('UI prefab file (.uiprefab.json) — a reusable UI subtree (H1/H3)');
|