@craft_eco/craft-mcp 0.0.0-stage → 0.1.14
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 +32 -2
- package/bin/craft-mcp.mjs +7 -0
- package/dist-server/core/app-paths.mjs +15 -0
- package/dist-server/core/auth-store.mjs +70 -0
- package/dist-server/core/connector-auth.mjs +30 -0
- package/dist-server/core/http-utils.mjs +14 -0
- package/dist-server/game-workflow/asset-formats.mjs +76 -0
- package/dist-server/game-workflow/asset-import.mjs +113 -0
- package/dist-server/game-workflow/asset-inputs.mjs +10 -0
- package/dist-server/game-workflow/assets.mjs +161 -0
- package/dist-server/game-workflow/capture-worker.mjs +14 -0
- package/dist-server/game-workflow/check.mjs +74 -0
- package/dist-server/game-workflow/draft-archive.mjs +91 -0
- package/dist-server/game-workflow/draft-bindings.mjs +35 -0
- package/dist-server/game-workflow/draft-uploads.mjs +207 -0
- package/dist-server/game-workflow/engines.mjs +30 -0
- package/dist-server/game-workflow/library-assets.mjs +77 -0
- package/dist-server/game-workflow/library-candidates.mjs +37 -0
- package/dist-server/game-workflow/library-catalog.mjs +45 -0
- package/dist-server/game-workflow/project-leases.mjs +52 -0
- package/dist-server/game-workflow/projects.mjs +92 -0
- package/dist-server/game-workflow/publication-materials.mjs +67 -0
- package/dist-server/game-workflow/publications.mjs +146 -0
- package/dist-server/game-workflow/publish-capture-worker.mjs +57 -0
- package/dist-server/game-workflow/publish-capture.mjs +75 -0
- package/dist-server/game-workflow/request-store.mjs +52 -0
- package/dist-server/game-workflow/resource-catalog.mjs +97 -0
- package/dist-server/game-workflow/tasks.mjs +93 -0
- package/dist-server/mcp/asset-tools.mjs +42 -0
- package/dist-server/mcp/control-panel.html +17 -0
- package/dist-server/mcp/control-panel.mjs +40 -0
- package/dist-server/mcp/publication-tools.mjs +19 -0
- package/dist-server/mcp/server.mjs +297 -0
- package/dist-server/mcp/start.mjs +20 -0
- package/dist-server/preview/local-static-preview.mjs +71 -0
- package/dist-server/preview/preview-control.mjs +35 -0
- package/dist-server/preview/preview-launcher.mjs +26 -0
- package/dist-server/preview/preview-snapshot.mjs +35 -0
- package/dist-server/preview/preview-start.mjs +12 -0
- package/dist-server/preview/preview-worker.mjs +68 -0
- package/dist-server/upstream/craft-aigc.mjs +197 -0
- package/dist-server/upstream/library-url.mjs +14 -0
- package/dist-server/upstream/publication-transport.mjs +80 -0
- package/package.json +33 -4
- package/resources/craft-game-maker/SKILL.md +67 -0
- package/resources/craft-game-maker/js.md +9 -0
- package/resources/craft-game-maker/js3d.md +12 -0
- package/resources/game_visual_qa.mjs +1143 -0
- package/resources/js/context/CLAUDE.md +54 -0
- package/resources/js/context/agents/aigc-manager.md +91 -0
- package/resources/js/context/hooks/hooks.json +20 -0
- package/resources/js/context/knowledge/AigcEnabled.md +41 -0
- package/resources/js/context/knowledge/AigcWiring.md +200 -0
- package/resources/js/context/knowledge/AssetUrl.md +24 -0
- package/resources/js/context/knowledge/FrontendComponents.md +23 -0
- package/resources/js/context/knowledge/GameProbe.md +74 -0
- package/resources/js/context/knowledge/Lifecycle.md +27 -0
- package/resources/js/context/knowledge/Multiplayer/GameplaySystemKnowledge.md +114 -0
- package/resources/js/context/knowledge/Multiplayer/OverviewKnowledge.md +115 -0
- package/resources/js/context/knowledge/Multiplayer/StateSyncKnowledge.md +392 -0
- package/resources/js/context/knowledge/PlatformServices.md +184 -0
- package/resources/js/context/knowledge/Subsystems/Optional/MultiplayerManagerKnowledge.md +242 -0
- package/resources/js/context/knowledge/Ui.md +11 -0
- package/resources/js/context/knowledge/UiEditorCompat.md +21 -0
- package/resources/js/context/rules/MultiplayerCapability.md +23 -0
- package/resources/js/context/rules/MultiplayerRoomEntryUX.md +63 -0
- package/resources/js/context/rules/PlatformBoundaryModules.md +43 -0
- package/resources/js/context/skills/aigc-generate/SKILL.md +301 -0
- package/resources/js/context/skills/aigc-generate/knowledge/audio.md +39 -0
- package/resources/js/context/skills/aigc-generate/knowledge/batch-replace.md +14 -0
- package/resources/js/context/skills/aigc-generate/knowledge/character2d.md +129 -0
- package/resources/js/context/skills/aigc-generate/knowledge/non-stepwise-aigc.md +54 -0
- package/resources/js/context/skills/aigc-generate/knowledge/texture-prop.md +50 -0
- package/resources/js/context/skills/aigc-generate/knowledge/texture-scene.md +201 -0
- package/resources/js/context/skills/aigc-generate/knowledge/texture-ui.md +53 -0
- package/resources/js/context/skills/aigc-generate/scripts/apply-results.mjs +83 -0
- package/resources/js/context/skills/aigc-generate/scripts/config.json +29 -0
- package/resources/js/context/skills/aigc-generate/scripts/generate.mjs +1016 -0
- package/resources/js/context/skills/aigc-generate/scripts/lib/client.mjs +228 -0
- package/resources/js/context/skills/aigc-generate/scripts/lib/ledger.mjs +119 -0
- package/resources/js/context/skills/aigc-generate/scripts/lib/nstep-handoff.mjs +100 -0
- package/resources/js/context/skills/aigc-generate/scripts/lib/pipelines.mjs +441 -0
- package/resources/js/context/skills/aigc-generate/scripts/lib/queue.mjs +283 -0
- package/resources/js/context/skills/aigc-generate/scripts/lib/submit.mjs +122 -0
- package/resources/js/context/skills/aigc-generate/scripts/worker.mjs +171 -0
- package/resources/js/context/skills/asset-search/SKILL.md +73 -0
- package/resources/js/context/skills/asset-search/scripts/asset_display.mjs +62 -0
- package/resources/js/context/skills/asset-search/scripts/config.json +5 -0
- package/resources/js/context/skills/asset-search/scripts/provided_assets.mjs +125 -0
- package/resources/js/context/skills/asset-search/scripts/recalled_sprite_paths.mjs +47 -0
- package/resources/js/context/skills/asset-search/scripts/search.mjs +749 -0
- package/resources/js/context/skills/asset-search/scripts/sprite_source_materializer.mjs +723 -0
- package/resources/js/context/skills/asset-search/strategies/audio.md +34 -0
- package/resources/js/context/skills/asset-search/strategies/character2d.md +33 -0
- package/resources/js/context/skills/asset-search/strategies/effect2d.md +31 -0
- package/resources/js/context/skills/asset-search/strategies/texture-prop.md +22 -0
- package/resources/js/context/skills/asset-search/strategies/texture-ui.md +35 -0
- package/resources/js/context/skills/asset-search/strategies/ui-common.md +40 -0
- package/resources/js/context/skills/asset-search/strategies/ui-style.md +28 -0
- package/resources/js/context/skills/display-info-setup/SKILL.md +32 -0
- package/resources/js/context/skills/display-info-setup/scripts/init_project.mjs +38 -0
- package/resources/js/context/skills/export-config/SKILL.md +20 -0
- package/resources/js/context/skills/export-config/scripts/assert-asset-wiring.mjs +72 -0
- package/resources/js/context/skills/export-config/scripts/export-config.mjs +43 -0
- package/resources/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/js/context/skills/export-config/scripts/sync-asset-controls.mjs +351 -0
- package/resources/js/context/skills/export-config/scripts/translate-asset-titles.mjs +163 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/SKILL.md +92 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/game-runtime.json +7 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/package.json +22 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/config.d.mts +19 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/config.mjs +1 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/leaderboard.d.mts +39 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/leaderboard.mjs +1 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/platform-capture-video.mjs +227 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/platform-service.d.mts +25 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/platform-service.mjs +1 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/platform.d.mts +79 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/platform.mjs +29 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/save.d.mts +49 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/save.mjs +1 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/release.json +37 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tooling/cli.mjs +2 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tooling/project.d.mts +8 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tooling/project.mjs +2 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tooling/vite.d.mts +3 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tooling/vite.mjs +8 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/assets.d.mts +24 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/assets.mjs +2 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/astc.d.mts +10 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/astc.mjs +1 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/audio.d.mts +20 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/audio.mjs +1 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/canvas.d.mts +21 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/canvas.mjs +1 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/input.d.mts +17 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/input.mjs +1 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/three.d.mts +40 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/three.mjs +1 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/ui.d.mts +10 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/ui.mjs +1 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/video.d.mts +8 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/video.mjs +1 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/config-export.mjs +32 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/refresh-runtime.mjs +50 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/src/display/ui-stage.ts +121 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/src/display/viewport.ts +254 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/src/main.ts +99 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/src/platform.ts +14 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/src/screenUi.ts +172 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/src/style.css +165 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/tsconfig.json +20 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/vite.config.ts +4 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/scripts/install-template.mjs +109 -0
- package/resources/js/context/skills/mobile-adaptation/SKILL.md +260 -0
- package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/input-config.json +50 -0
- package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/input-layer.ts +881 -0
- package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/input-platform.ts +92 -0
- package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/look-pad.ts +245 -0
- package/resources/js/context/skills/mobile-adaptation/assets/example/src/ui/touch-controls.css +134 -0
- package/resources/js/context/skills/mobile-adaptation/references/input-config.md +311 -0
- package/resources/js/context/skills/mobile-adaptation/references/verification.md +106 -0
- package/resources/js/context/skills/optimization-suggestions/SKILL.md +89 -0
- package/resources/js/context/skills/platform-services/SKILL.md +94 -0
- package/resources/js/context/skills/platform-services/assets/modules/MultiplayerManager.ts +783 -0
- package/resources/js/context/skills/platform-services/assets/modules/eventBus.ts +57 -0
- package/resources/js/context/skills/platform-services/assets/modules/leaderboard.d.mts +39 -0
- package/resources/js/context/skills/platform-services/assets/modules/leaderboard.mjs +1 -0
- package/resources/js/context/skills/platform-services/assets/modules/log.ts +35 -0
- package/resources/js/context/skills/platform-services/assets/modules/platform-service.d.mts +25 -0
- package/resources/js/context/skills/platform-services/assets/modules/platform-service.mjs +1 -0
- package/resources/js/context/skills/platform-services/assets/modules/save.d.mts +49 -0
- package/resources/js/context/skills/platform-services/assets/modules/save.mjs +1 -0
- package/resources/js/context/skills/platform-services/assets/release.json +44 -0
- package/resources/js/context/skills/platform-services/assets/scaffold/ds/main.mjs +7 -0
- package/resources/js/context/skills/platform-services/assets/scaffold/ds/rooms/SyncRoom.mjs +264 -0
- package/resources/js/context/skills/platform-services/assets/scaffold/ds/rooms/syncSchema.mjs +39 -0
- package/resources/js/context/skills/platform-services/references/SERVER_GUIDE.md +139 -0
- package/resources/js/context/skills/platform-services/references/api_reference.md +18 -0
- package/resources/js/context/skills/platform-services/scripts/install.mjs +134 -0
- package/resources/js/context/skills/resolution-adaptation/SKILL.md +202 -0
- package/resources/js/context/skills/resolution-adaptation/assets/display/ui-stage.ts +121 -0
- package/resources/js/context/skills/resolution-adaptation/assets/display/viewport.ts +254 -0
- package/resources/js/context/skills/resolution-adaptation/assets/example/main.ts +98 -0
- package/resources/js/context/skills/resolution-adaptation/assets/example/ui-tokens.css +200 -0
- package/resources/js/context/skills/resolution-adaptation/references/layout-rules.md +134 -0
- package/resources/js/context/skills/resolution-adaptation/references/viewport-api.md +119 -0
- package/resources/js/context/skills/resolution-adaptation/scripts/aspect_audit.mjs +338 -0
- package/resources/js/context/skills/scene-editor-compat/SKILL.md +94 -0
- package/resources/js/context/skills/scene-editor-compat/assets/example/localcraft.assets.json +13 -0
- package/resources/js/context/skills/scene-editor-compat/assets/example/localcraft.scene-editor.json +6 -0
- package/resources/js/context/skills/scene-editor-compat/assets/example/src/game/sceneAdapter.ts +25 -0
- package/resources/js/context/skills/scene-editor-compat/assets/example/src/scenes/main.scene.json +18 -0
- package/resources/js/context/skills/scene-editor-compat/assets/runtime/release.json +7 -0
- package/resources/js/context/skills/scene-editor-compat/assets/runtime/scene.d.mts +42 -0
- package/resources/js/context/skills/scene-editor-compat/assets/runtime/scene.mjs +144 -0
- package/resources/js/context/skills/scene-editor-compat/docs/contract.md +330 -0
- package/resources/js/context/skills/scene-editor-compat/docs/resource-sync.md +64 -0
- package/resources/js/context/skills/scene-editor-compat/docs/runtime-state.md +28 -0
- package/resources/js/context/skills/scene-editor-compat/docs/terrain-contract.md +47 -0
- package/resources/js/context/skills/scene-editor-compat/docs/visual-contract.md +64 -0
- package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/localcraft.assets.json +38 -0
- package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/localcraft.scene-editor.json +9 -0
- package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/game/sceneAdapter.ts +59 -0
- package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/game/sceneBlockers.ts +30 -0
- package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/game/sceneFileAssets.ts +66 -0
- package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/scenes/Main.Scene.ts +20 -0
- package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/scenes/SceneTypes.ts +26 -0
- package/resources/js/context/skills/scene-editor-compat/references/contract.md +73 -0
- package/resources/js/context/skills/scene-editor-compat/scripts/apply_scene_marker.py +162 -0
- package/resources/js/context/skills/scene-editor-compat/scripts/check_scene_contract.py +853 -0
- package/resources/js/context/skills/scene-editor-compat/scripts/check_scene_resource_urls.py +173 -0
- package/resources/js/context/skills/scene-editor-compat/scripts/scene-editor.mjs +427 -0
- package/resources/js/context/skills/scene-editor-compat/version.json +1 -0
- package/resources/js/context/skills/ui-editor-compat/SKILL.md +48 -0
- package/resources/js/context/skills/ui-editor-compat/assets/example/hud/WidgetLayout_Hud.ts +35 -0
- package/resources/js/context/skills/ui-editor-compat/assets/example/hud/WidgetLogic_Hud.ts +74 -0
- package/resources/js/context/skills/ui-editor-compat/assets/example/hud/hud.css +60 -0
- package/resources/js/context/skills/ui-editor-compat/assets/runtime/dom-ui.d.mts +45 -0
- package/resources/js/context/skills/ui-editor-compat/assets/runtime/dom-ui.mjs +265 -0
- package/resources/js/context/skills/ui-editor-compat/assets/runtime/release.json +7 -0
- package/resources/js/context/skills/ui-editor-compat/references/contract.md +132 -0
- package/resources/js/context/skills/ui-editor-compat/scripts/editor-contract.mjs +327 -0
- package/resources/js/context/skills/ui-editor-compat/scripts/project-files.mjs +80 -0
- package/resources/js/context/skills/ui-editor-compat/scripts/ui-editor.mjs +84 -0
- package/resources/js/context/skills/version-update/SKILL.md +192 -0
- package/resources/js/context/skills/version-update/scripts/check_runtime_refs.mjs +129 -0
- package/resources/js/context/skills/version-update/scripts/feature_snapshot.mjs +159 -0
- package/resources/js/context/skills/version-update/scripts/update_feature_version.mjs +157 -0
- package/resources/js/context/skills/version-update/upgrade_diffs/.gitkeep +0 -0
- package/resources/js/context/skills/visual-qa/SKILL.md +36 -0
- package/resources/js/context/version/version.json +1 -0
- package/resources/js/project/.gitattributes +2 -0
- package/resources/js/project/README.md +99 -0
- package/resources/js/project/SPEC/assist/.gitkeep +0 -0
- package/resources/js/project/SPEC/guide/.gitkeep +0 -0
- package/resources/js/project/SPEC/plan/.gitkeep +0 -0
- package/resources/js/project/SPEC/readme.md +6 -0
- package/resources/js/project/SPEC/res/.gitkeep +0 -0
- package/resources/js/project/SPEC/task-item/.gitkeep +0 -0
- package/resources/js/project/configs/assets.json +1 -0
- package/resources/js/project/configs/game.controls.json +3 -0
- package/resources/js/project/configs/game.json +3 -0
- package/resources/js/project/game-runtime.json +7 -0
- package/resources/js/project/gameplay-probe.json +37 -0
- package/resources/js/project/index.html +20 -0
- package/resources/js/project/package-lock.json +1155 -0
- package/resources/js/project/package.json +23 -0
- package/resources/js/project/projectDisplayInfo.json +7 -0
- package/resources/js/project/runtime/lightgame/1.0.0/platform/config.d.mts +19 -0
- package/resources/js/project/runtime/lightgame/1.0.0/platform/config.mjs +1 -0
- package/resources/js/project/runtime/lightgame/1.0.0/platform/leaderboard.d.mts +39 -0
- package/resources/js/project/runtime/lightgame/1.0.0/platform/leaderboard.mjs +1 -0
- package/resources/js/project/runtime/lightgame/1.0.0/platform/platform-capture-video.mjs +227 -0
- package/resources/js/project/runtime/lightgame/1.0.0/platform/platform-service.d.mts +25 -0
- package/resources/js/project/runtime/lightgame/1.0.0/platform/platform-service.mjs +1 -0
- package/resources/js/project/runtime/lightgame/1.0.0/platform/platform.d.mts +79 -0
- package/resources/js/project/runtime/lightgame/1.0.0/platform/platform.mjs +29 -0
- package/resources/js/project/runtime/lightgame/1.0.0/platform/save.d.mts +49 -0
- package/resources/js/project/runtime/lightgame/1.0.0/platform/save.mjs +1 -0
- package/resources/js/project/runtime/lightgame/1.0.0/release.json +37 -0
- package/resources/js/project/runtime/lightgame/1.0.0/tooling/cli.mjs +2 -0
- package/resources/js/project/runtime/lightgame/1.0.0/tooling/project.d.mts +8 -0
- package/resources/js/project/runtime/lightgame/1.0.0/tooling/project.mjs +2 -0
- package/resources/js/project/runtime/lightgame/1.0.0/tooling/vite.d.mts +3 -0
- package/resources/js/project/runtime/lightgame/1.0.0/tooling/vite.mjs +8 -0
- package/resources/js/project/runtime/lightgame/1.0.0/tools/assets.d.mts +24 -0
- package/resources/js/project/runtime/lightgame/1.0.0/tools/assets.mjs +2 -0
- package/resources/js/project/runtime/lightgame/1.0.0/tools/astc.d.mts +10 -0
- package/resources/js/project/runtime/lightgame/1.0.0/tools/astc.mjs +1 -0
- package/resources/js/project/runtime/lightgame/1.0.0/tools/audio.d.mts +20 -0
- package/resources/js/project/runtime/lightgame/1.0.0/tools/audio.mjs +1 -0
- package/resources/js/project/runtime/lightgame/1.0.0/tools/canvas.d.mts +21 -0
- package/resources/js/project/runtime/lightgame/1.0.0/tools/canvas.mjs +1 -0
- package/resources/js/project/runtime/lightgame/1.0.0/tools/input.d.mts +17 -0
- package/resources/js/project/runtime/lightgame/1.0.0/tools/input.mjs +1 -0
- package/resources/js/project/runtime/lightgame/1.0.0/tools/three.d.mts +40 -0
- package/resources/js/project/runtime/lightgame/1.0.0/tools/three.mjs +1 -0
- package/resources/js/project/runtime/lightgame/1.0.0/tools/ui.d.mts +10 -0
- package/resources/js/project/runtime/lightgame/1.0.0/tools/ui.mjs +1 -0
- package/resources/js/project/runtime/lightgame/1.0.0/tools/video.d.mts +8 -0
- package/resources/js/project/runtime/lightgame/1.0.0/tools/video.mjs +1 -0
- package/resources/js/project/scripts/config-export.mjs +32 -0
- package/resources/js/project/scripts/refresh-runtime.mjs +50 -0
- package/resources/js/project/src/display/ui-stage.ts +121 -0
- package/resources/js/project/src/display/viewport.ts +254 -0
- package/resources/js/project/src/main.ts +99 -0
- package/resources/js/project/src/platform.ts +14 -0
- package/resources/js/project/src/scenes/LoadScene.ts +89 -0
- package/resources/js/project/src/scenes/PlayScene.ts +17 -0
- package/resources/js/project/src/screenUi.ts +172 -0
- package/resources/js/project/src/style.css +165 -0
- package/resources/js/project/tsconfig.json +20 -0
- package/resources/js/project/unified_data_control_config.json +20 -0
- package/resources/js/project/vendor/core-manager-js/package.json +33 -0
- package/resources/js/project/vendor/core-manager-js/src/.versions.json +42 -0
- package/resources/js/project/vendor/core-manager-js/src/CoreManagerPlugin.ts +41 -0
- package/resources/js/project/vendor/core-manager-js/src/assetManager/AssetRef.ts +90 -0
- package/resources/js/project/vendor/core-manager-js/src/assetManager/AstcFirstImageFile.ts +203 -0
- package/resources/js/project/vendor/core-manager-js/src/assetManager/AstcTextureLoader.ts +106 -0
- package/resources/js/project/vendor/core-manager-js/src/assetManager/resolveAssetUrl.test.ts +25 -0
- package/resources/js/project/vendor/core-manager-js/src/assetManager/resolveAssetUrl.ts +21 -0
- package/resources/js/project/vendor/core-manager-js/src/audioManager/AudioManager.test.ts +65 -0
- package/resources/js/project/vendor/core-manager-js/src/audioManager/AudioManager.ts +340 -0
- package/resources/js/project/vendor/core-manager-js/src/configManager/FeatureConfig.ts +87 -0
- package/resources/js/project/vendor/core-manager-js/src/configManager/tuneRuntime.d.mts +92 -0
- package/resources/js/project/vendor/core-manager-js/src/configManager/tuneRuntime.mjs +271 -0
- package/resources/js/project/vendor/core-manager-js/src/index.ts +31 -0
- package/resources/js/project/vendor/core-manager-js/src/inputManager/InputConfig.ts +81 -0
- package/resources/js/project/vendor/core-manager-js/src/inputManager/InputManager.test.ts +43 -0
- package/resources/js/project/vendor/core-manager-js/src/inputManager/InputManager.ts +32 -0
- package/resources/js/project/vendor/core-manager-js/src/inputManager/InputRuntime.test.ts +141 -0
- package/resources/js/project/vendor/core-manager-js/src/inputManager/InputRuntime.ts +20 -0
- package/resources/js/project/vendor/core-manager-js/src/inputManager/KeyboardProvider.ts +183 -0
- package/resources/js/project/vendor/core-manager-js/src/inputManager/TouchProvider.ts +304 -0
- package/resources/js/project/vendor/core-manager-js/src/inputManager/VirtualJoystick.ts +351 -0
- package/resources/js/project/vendor/core-manager-js/src/inputManager/_internal/InputManagerImpl.ts +180 -0
- package/resources/js/project/vendor/core-manager-js/src/inputManager/icons.b64 +13 -0
- package/resources/js/project/vendor/core-manager-js/src/inputManager/icons.b64.d.ts +14 -0
- package/resources/js/project/vendor/core-manager-js/src/inputManager/input_config.example.json +68 -0
- package/resources/js/project/vendor/core-manager-js/src/logManager/DebugConsole.ts +433 -0
- package/resources/js/project/vendor/core-manager-js/src/logManager/LogCapture.ts +118 -0
- package/resources/js/project/vendor/core-manager-js/src/logManager/LogManager.ts +444 -0
- package/resources/js/project/vendor/core-manager-js/src/logManager/ScreenCapture.ts +485 -0
- package/resources/js/project/vendor/core-manager-js/src/logManager/ScreenCaptureVideo.test.ts +66 -0
- package/resources/js/project/vendor/core-manager-js/src/logManager/ScreenCaptureVideo.ts +149 -0
- package/resources/js/project/vendor/core-manager-js/src/logManager/icons.b64 +9 -0
- package/resources/js/project/vendor/core-manager-js/src/resourceManager/AssetUrlResolver.ts +29 -0
- package/resources/js/project/vendor/core-manager-js/src/resourceManager/ResourceManager.test.ts +88 -0
- package/resources/js/project/vendor/core-manager-js/src/resourceManager/ResourceManager.ts +122 -0
- package/resources/js/project/vendor/core-manager-js/src/runtime.ts +24 -0
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/CharacterEntity.ts +318 -0
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/CharacterPhysicsBinding.test.ts +151 -0
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/CharacterPhysicsBinding.ts +235 -0
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/EffectComposite.test.ts +98 -0
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/EffectComposite.ts +94 -0
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/EffectEntity.ts +209 -0
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxManager.test.ts +106 -0
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxManager.ts +341 -0
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxRecipe.test.ts +68 -0
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxRecipe.ts +236 -0
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/SpriteAnimManager.test.ts +22 -0
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/SpriteAnimManager.ts +29 -0
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/SpriteEntity.test.ts +197 -0
- package/resources/js/project/vendor/core-manager-js/src/uiManager/DomUiContracts.ts +9 -0
- package/resources/js/project/vendor/core-manager-js/src/uiManager/DomUiKit.ts +555 -0
- package/resources/js/project/vendor/core-manager-js/src/uiManager/UIFacadePlugin.test.ts +112 -0
- package/resources/js/project/vendor/core-manager-js/src/uiManager/UIFacadePlugin.ts +178 -0
- package/resources/js/project/vendor/core-manager-js/src/uiManager/ui-base.css +246 -0
- package/resources/js/project/vendor/core-manager-js/src/videoManager/VideoManager.ts +139 -0
- package/resources/js/project/vendor/core-manager-js/tsconfig.json +15 -0
- package/resources/js/project/vendor/run.sh +107 -0
- package/resources/js/project/version/craft_feature_version.json +42 -0
- package/resources/js/project/version/project_feature_version.json +11 -0
- package/resources/js/project/vite.config.ts +4 -0
- package/resources/js3d/context/CLAUDE.md +50 -0
- package/resources/js3d/context/hooks/hooks.json +20 -0
- package/resources/js3d/context/knowledge/3D/PoseInterpolationKnowledge.md +87 -0
- package/resources/js3d/context/knowledge/CodingGuide/Pitfalls.md +69 -0
- package/resources/js3d/context/knowledge/CodingGuide/SceneEditableGuide.md +42 -0
- package/resources/js3d/context/knowledge/FrontendComponents.md +23 -0
- package/resources/js3d/context/knowledge/Multiplayer/GameplaySystemKnowledge.md +114 -0
- package/resources/js3d/context/knowledge/Multiplayer/OverviewKnowledge.md +117 -0
- package/resources/js3d/context/knowledge/Multiplayer/StateSyncKnowledge.md +430 -0
- package/resources/js3d/context/knowledge/PlatformServices.md +162 -0
- package/resources/js3d/context/knowledge/Runtime.md +30 -0
- package/resources/js3d/context/knowledge/SceneEditorCompat.md +34 -0
- package/resources/js3d/context/knowledge/StepByStep.md +21 -0
- package/resources/js3d/context/knowledge/Subsystems/Optional/MultiplayerManagerKnowledge.md +242 -0
- package/resources/js3d/context/knowledge/UiEditorCompat.md +21 -0
- package/resources/js3d/context/rules/MultiplayerCapability.md +27 -0
- package/resources/js3d/context/rules/MultiplayerRoomEntryUX.md +63 -0
- package/resources/js3d/context/rules/PlatformBoundaryModules.md +43 -0
- package/resources/js3d/context/skills/aigc-integration/SKILL.md +176 -0
- package/resources/js3d/context/skills/aigc-integration/callback.md +56 -0
- package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/README.md +22 -0
- package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/audio-aigc-knowledge.md +38 -0
- package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/staticmesh-aigc-knowledge.md +33 -0
- package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/texture-prop-aigc-knowledge.md +36 -0
- package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/texture-scene-aigc-knowledge.md +37 -0
- package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/texture-ui-aigc-knowledge.md +35 -0
- package/resources/js3d/context/skills/aigc-integration/scripts/config.json +3 -0
- package/resources/js3d/context/skills/aigc-integration/scripts/lib/submit.mjs +344 -0
- package/resources/js3d/context/skills/aigc-integration/scripts/query-music.mjs +53 -0
- package/resources/js3d/context/skills/aigc-integration/scripts/query-results.mjs +53 -0
- package/resources/js3d/context/skills/aigc-integration/scripts/submit-cover.mjs +44 -0
- package/resources/js3d/context/skills/aigc-integration/scripts/submit-image.mjs +48 -0
- package/resources/js3d/context/skills/aigc-integration/scripts/submit-music.mjs +34 -0
- package/resources/js3d/context/skills/aigc-integration/scripts/submit-staticmesh.mjs +39 -0
- package/resources/js3d/context/skills/asset-search/SKILL.md +159 -0
- package/resources/js3d/context/skills/asset-search/references/resource-config.md +56 -0
- package/resources/js3d/context/skills/asset-search/scripts/asset_display.mjs +62 -0
- package/resources/js3d/context/skills/asset-search/scripts/config.json +213 -0
- package/resources/js3d/context/skills/asset-search/scripts/manifest_pipeline.mjs +885 -0
- package/resources/js3d/context/skills/asset-search/scripts/preflight.mjs +79 -0
- package/resources/js3d/context/skills/asset-search/scripts/provided_assets.mjs +74 -0
- package/resources/js3d/context/skills/asset-search/scripts/search.mjs +597 -0
- package/resources/js3d/context/skills/export-config/scripts/assert-asset-wiring.mjs +83 -0
- package/resources/js3d/context/skills/export-config/scripts/export-config.mjs +53 -0
- package/resources/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/js3d/context/skills/export-config/scripts/sync-asset-controls.mjs +325 -0
- package/resources/js3d/context/skills/export-config/scripts/sync-scene-assets.mjs +181 -0
- package/resources/js3d/context/skills/export-config/scripts/translate-asset-titles.mjs +163 -0
- package/resources/js3d/context/skills/game-art-style/SKILL.md +60 -0
- package/resources/js3d/context/skills/game-art-style/assets/previews/cartoon.png +0 -0
- package/resources/js3d/context/skills/game-art-style/assets/previews/comic.png +0 -0
- package/resources/js3d/context/skills/game-art-style/assets/previews/cozy.png +0 -0
- package/resources/js3d/context/skills/game-art-style/assets/previews/cyber.png +0 -0
- package/resources/js3d/context/skills/game-art-style/assets/previews/horror.png +0 -0
- package/resources/js3d/context/skills/game-art-style/assets/previews/lowpoly.png +0 -0
- package/resources/js3d/context/skills/game-art-style/assets/previews/paper.png +0 -0
- package/resources/js3d/context/skills/game-art-style/assets/previews/voxel.png +0 -0
- package/resources/js3d/context/skills/game-art-style/references/art-parameters-lite.md +38 -0
- package/resources/js3d/context/skills/game-art-style/references/construction.md +111 -0
- package/resources/js3d/context/skills/game-art-style/references/materials-textures.md +105 -0
- package/resources/js3d/context/skills/game-art-style/references/sources.md +25 -0
- package/resources/js3d/context/skills/game-art-style/references/styles/cartoon.md +175 -0
- package/resources/js3d/context/skills/game-art-style/references/styles/comic.md +168 -0
- package/resources/js3d/context/skills/game-art-style/references/styles/cozy.md +191 -0
- package/resources/js3d/context/skills/game-art-style/references/styles/cyber.md +165 -0
- package/resources/js3d/context/skills/game-art-style/references/styles/horror.md +173 -0
- package/resources/js3d/context/skills/game-art-style/references/styles/lowpoly.md +185 -0
- package/resources/js3d/context/skills/game-art-style/references/styles/paper.md +181 -0
- package/resources/js3d/context/skills/game-art-style/references/styles/voxel.md +189 -0
- package/resources/js3d/context/skills/game-art-style/references/user-style-document.md +88 -0
- package/resources/js3d/context/skills/mobile-adaptation/SKILL.md +284 -0
- package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/input-config.json +104 -0
- package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/input-layer.ts +952 -0
- package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/input-platform.ts +92 -0
- package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/look-pad.ts +245 -0
- package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/ui/touch-controls.css +256 -0
- package/resources/js3d/context/skills/mobile-adaptation/references/input-config.md +311 -0
- package/resources/js3d/context/skills/mobile-adaptation/references/verification.md +106 -0
- package/resources/js3d/context/skills/optimization-suggestions/SKILL.md +74 -0
- package/resources/js3d/context/skills/platform-services/SKILL.md +94 -0
- package/resources/js3d/context/skills/platform-services/assets/modules/MultiplayerManager.ts +783 -0
- package/resources/js3d/context/skills/platform-services/assets/modules/eventBus.ts +57 -0
- package/resources/js3d/context/skills/platform-services/assets/modules/leaderboard.d.mts +39 -0
- package/resources/js3d/context/skills/platform-services/assets/modules/leaderboard.mjs +1 -0
- package/resources/js3d/context/skills/platform-services/assets/modules/log.ts +35 -0
- package/resources/js3d/context/skills/platform-services/assets/modules/platform-service.d.mts +25 -0
- package/resources/js3d/context/skills/platform-services/assets/modules/platform-service.mjs +1 -0
- package/resources/js3d/context/skills/platform-services/assets/modules/save.d.mts +49 -0
- package/resources/js3d/context/skills/platform-services/assets/modules/save.mjs +1 -0
- package/resources/js3d/context/skills/platform-services/assets/release.json +44 -0
- package/resources/js3d/context/skills/platform-services/assets/scaffold/ds/main.mjs +7 -0
- package/resources/js3d/context/skills/platform-services/assets/scaffold/ds/rooms/SyncRoom.mjs +264 -0
- package/resources/js3d/context/skills/platform-services/assets/scaffold/ds/rooms/syncSchema.mjs +39 -0
- package/resources/js3d/context/skills/platform-services/references/SERVER_GUIDE.md +139 -0
- package/resources/js3d/context/skills/platform-services/references/api_reference.md +18 -0
- package/resources/js3d/context/skills/platform-services/scripts/install.mjs +134 -0
- package/resources/js3d/context/skills/resolution-adaptation/SKILL.md +170 -0
- package/resources/js3d/context/skills/resolution-adaptation/assets/display/ui-stage.ts +121 -0
- package/resources/js3d/context/skills/resolution-adaptation/assets/display/viewport.ts +244 -0
- package/resources/js3d/context/skills/resolution-adaptation/assets/example/main.ts +127 -0
- package/resources/js3d/context/skills/resolution-adaptation/assets/example/ui-tokens.css +188 -0
- package/resources/js3d/context/skills/resolution-adaptation/references/layout-rules.md +124 -0
- package/resources/js3d/context/skills/resolution-adaptation/references/viewport-api.md +117 -0
- package/resources/js3d/context/skills/resolution-adaptation/scripts/aspect_audit.mjs +338 -0
- package/resources/js3d/context/skills/scene-editor-compat/SKILL.md +599 -0
- package/resources/js3d/context/skills/scene-editor-compat/references/bundle-contract.md +141 -0
- package/resources/js3d/context/skills/scene-editor-compat/references/editor-integration.md +92 -0
- package/resources/js3d/context/skills/scene-editor-compat/references/scene-data-format.md +125 -0
- package/resources/js3d/context/skills/scene-editor-compat/references/slots-rules.md +113 -0
- package/resources/js3d/context/skills/scene-editor-compat/scripts/scene-editor.mjs +1187 -0
- package/resources/js3d/context/skills/threejs-game-quality/SKILL.md +52 -0
- package/resources/js3d/context/skills/threejs-game-quality/agents/openai.yaml +4 -0
- package/resources/js3d/context/skills/threejs-game-quality/references/01-build.md +94 -0
- package/resources/js3d/context/skills/threejs-game-quality/references/02-avoid.md +50 -0
- package/resources/js3d/context/skills/threejs-game-quality/references/03-detect.md +105 -0
- package/resources/js3d/context/skills/threejs-game-quality/references/camera-by-genre.md +147 -0
- package/resources/js3d/context/skills/threejs-game-quality/references/camera-distance.md +79 -0
- package/resources/js3d/context/skills/threejs-game-quality/references/camera-sources.md +56 -0
- package/resources/js3d/context/skills/threejs-game-quality/references/character-motion-face.md +51 -0
- package/resources/js3d/context/skills/threejs-game-quality/references/parameter-contract.md +55 -0
- package/resources/js3d/context/skills/threejs-game-quality/references/refine-existing.md +78 -0
- package/resources/js3d/context/skills/threejs-game-quality/references/rendering-stability.md +84 -0
- package/resources/js3d/context/skills/threejs-game-quality/references/runtime-tools.md +120 -0
- package/resources/js3d/context/skills/threejs-game-quality/scripts/package.json +4 -0
- package/resources/js3d/context/skills/threejs-game-quality/scripts/runtime-audit.js +238 -0
- package/resources/js3d/context/skills/ui-editor-compat/SKILL.md +59 -0
- package/resources/js3d/context/skills/ui-editor-compat/assets/example/hud/WidgetLayout_Hud.ts +35 -0
- package/resources/js3d/context/skills/ui-editor-compat/assets/example/hud/WidgetLogic_Hud.ts +61 -0
- package/resources/js3d/context/skills/ui-editor-compat/assets/example/hud/hud.css +60 -0
- package/resources/js3d/context/skills/ui-editor-compat/assets/runtime/dom-ui.d.mts +45 -0
- package/resources/js3d/context/skills/ui-editor-compat/assets/runtime/dom-ui.mjs +265 -0
- package/resources/js3d/context/skills/ui-editor-compat/assets/runtime/release.json +7 -0
- package/resources/js3d/context/skills/ui-editor-compat/references/contract.md +110 -0
- package/resources/js3d/context/skills/ui-editor-compat/scripts/editor-contract.mjs +327 -0
- package/resources/js3d/context/skills/ui-editor-compat/scripts/project-files.mjs +80 -0
- package/resources/js3d/context/skills/ui-editor-compat/scripts/ui-editor.mjs +84 -0
- package/resources/js3d/context/skills/version-update/SKILL.md +191 -0
- package/resources/js3d/context/skills/version-update/scripts/check_runtime_refs.mjs +129 -0
- package/resources/js3d/context/skills/version-update/scripts/feature_snapshot.mjs +159 -0
- package/resources/js3d/context/skills/version-update/scripts/update_feature_version.mjs +157 -0
- package/resources/js3d/context/skills/version-update/upgrade_diffs/.gitkeep +0 -0
- package/resources/js3d/context/version/version.json +1 -0
- package/resources/js3d/project/.gitattributes +2 -0
- package/resources/js3d/project/README.md +100 -0
- package/resources/js3d/project/configs/game.controls.json +3 -0
- package/resources/js3d/project/configs/game.json +3 -0
- package/resources/js3d/project/game-runtime.json +7 -0
- package/resources/js3d/project/gameplay-probe.json +38 -0
- package/resources/js3d/project/index.html +12 -0
- package/resources/js3d/project/package-lock.json +1204 -0
- package/resources/js3d/project/package.json +24 -0
- package/resources/js3d/project/projectDisplayInfo.json +7 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/config.d.mts +19 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/config.mjs +1 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/leaderboard.d.mts +39 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/leaderboard.mjs +1 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform-capture-video.mjs +227 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform-service.d.mts +25 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform-service.mjs +1 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform.d.mts +79 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform.mjs +30 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/save.d.mts +49 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/save.mjs +1 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/release.json +39 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/cli.mjs +2 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/project.d.mts +8 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/project.mjs +2 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/vite.d.mts +3 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/vite.mjs +7 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/assets.d.mts +24 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/assets.mjs +2 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/astc.d.mts +10 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/astc.mjs +1 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/audio.d.mts +20 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/audio.mjs +1 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/canvas.d.mts +21 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/canvas.mjs +1 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/glb.d.mts +36 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/glb.mjs +359 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/glb.test.mjs +25 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/input.d.mts +17 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/input.mjs +1 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/three.d.mts +40 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/three.mjs +1 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/ui.d.mts +10 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/ui.mjs +1 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/video.d.mts +8 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/video.mjs +1 -0
- package/resources/js3d/project/scripts/config-export.mjs +32 -0
- package/resources/js3d/project/scripts/refresh-runtime.mjs +50 -0
- package/resources/js3d/project/src/display/ui-stage.ts +121 -0
- package/resources/js3d/project/src/display/viewport.ts +244 -0
- package/resources/js3d/project/src/main.ts +83 -0
- package/resources/js3d/project/src/platform.ts +14 -0
- package/resources/js3d/project/src/style.css +17 -0
- package/resources/js3d/project/tsconfig.json +20 -0
- package/resources/js3d/project/unified_data_control_config.json +20 -0
- package/resources/js3d/project/vendor/core-manager-three/package.json +12 -0
- package/resources/js3d/project/vendor/core-manager-three/src/index.ts +2 -0
- package/resources/js3d/project/vendor/run.sh +4 -0
- package/resources/js3d/project/version/craft_feature_version.json +42 -0
- package/resources/js3d/project/version/project_feature_version.json +11 -0
- package/resources/js3d/project/vite.config.ts +4 -0
- package/vendor/agent-cli/dist/runtime-tools/registry.json +6 -0
- package/vendor/agent-cli/dist/runtime-tools/tool-bundle-types.d.cts +15 -0
- package/vendor/agent-cli/dist/runtime-tools/tool-bundle.cjs +129 -0
- package/vendor/agent-cli/dist/runtime-tools/ue/blender-cook-assets.cjs +296 -0
- package/vendor/agent-cli/dist/runtime-tools/ue/context-adapter.cjs +48 -0
- package/vendor/agent-cli/dist/runtime-tools/ue/scene-process-lock.cjs +110 -0
- package/vendor/agent-cli/dist/runtime-tools/ue/tool-manifest.json +22 -0
- package/vendor/agent-cli/dist/runtime-tools/ue/ue-asset-references.cjs +305 -0
- package/vendor/agent-cli/dist/src/artifacts/context-finalize.d.ts +3 -0
- package/vendor/agent-cli/dist/src/artifacts/context-finalize.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/artifacts/context-finalize.js +45 -0
- package/vendor/agent-cli/dist/src/artifacts/context-finalize.js.map +1 -0
- package/vendor/agent-cli/dist/src/artifacts/prepare.d.ts +57 -0
- package/vendor/agent-cli/dist/src/artifacts/prepare.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/artifacts/prepare.js +198 -0
- package/vendor/agent-cli/dist/src/artifacts/prepare.js.map +1 -0
- package/vendor/agent-cli/dist/src/artifacts/process-artifacts.d.ts +32 -0
- package/vendor/agent-cli/dist/src/artifacts/process-artifacts.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/artifacts/process-artifacts.js +146 -0
- package/vendor/agent-cli/dist/src/artifacts/process-artifacts.js.map +1 -0
- package/vendor/agent-cli/dist/src/artifacts/restore.d.ts +28 -0
- package/vendor/agent-cli/dist/src/artifacts/restore.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/artifacts/restore.js +384 -0
- package/vendor/agent-cli/dist/src/artifacts/restore.js.map +1 -0
- package/vendor/agent-cli/dist/src/artifacts/static.d.ts +15 -0
- package/vendor/agent-cli/dist/src/artifacts/static.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/artifacts/static.js +152 -0
- package/vendor/agent-cli/dist/src/artifacts/static.js.map +1 -0
- package/vendor/agent-cli/dist/src/cli/commands/process.d.ts +4 -0
- package/vendor/agent-cli/dist/src/cli/commands/process.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/cli/commands/process.js +24 -0
- package/vendor/agent-cli/dist/src/cli/commands/process.js.map +1 -0
- package/vendor/agent-cli/dist/src/cli/commands/run-controls.d.ts +23 -0
- package/vendor/agent-cli/dist/src/cli/commands/run-controls.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/cli/commands/run-controls.js +62 -0
- package/vendor/agent-cli/dist/src/cli/commands/run-controls.js.map +1 -0
- package/vendor/agent-cli/dist/src/cli/commands/run-mock.d.ts +9 -0
- package/vendor/agent-cli/dist/src/cli/commands/run-mock.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/cli/commands/run-mock.js +15 -0
- package/vendor/agent-cli/dist/src/cli/commands/run-mock.js.map +1 -0
- package/vendor/agent-cli/dist/src/cli/commands/run.d.ts +3 -0
- package/vendor/agent-cli/dist/src/cli/commands/run.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/cli/commands/run.js +284 -0
- package/vendor/agent-cli/dist/src/cli/commands/run.js.map +1 -0
- package/vendor/agent-cli/dist/src/cli/commands/setup.d.ts +11 -0
- package/vendor/agent-cli/dist/src/cli/commands/setup.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/cli/commands/setup.js +161 -0
- package/vendor/agent-cli/dist/src/cli/commands/setup.js.map +1 -0
- package/vendor/agent-cli/dist/src/cli/options.d.ts +83 -0
- package/vendor/agent-cli/dist/src/cli/options.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/cli/options.js +213 -0
- package/vendor/agent-cli/dist/src/cli/options.js.map +1 -0
- package/vendor/agent-cli/dist/src/cli/process-protocol.d.ts +5 -0
- package/vendor/agent-cli/dist/src/cli/process-protocol.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/cli/process-protocol.js +276 -0
- package/vendor/agent-cli/dist/src/cli/process-protocol.js.map +1 -0
- package/vendor/agent-cli/dist/src/cli/registry.d.ts +55 -0
- package/vendor/agent-cli/dist/src/cli/registry.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/cli/registry.js +99 -0
- package/vendor/agent-cli/dist/src/cli/registry.js.map +1 -0
- package/vendor/agent-cli/dist/src/cli/render/jsonl-sink.d.ts +44 -0
- package/vendor/agent-cli/dist/src/cli/render/jsonl-sink.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/cli/render/jsonl-sink.js +83 -0
- package/vendor/agent-cli/dist/src/cli/render/jsonl-sink.js.map +1 -0
- package/vendor/agent-cli/dist/src/cli/render/text-sink.d.ts +28 -0
- package/vendor/agent-cli/dist/src/cli/render/text-sink.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/cli/render/text-sink.js +52 -0
- package/vendor/agent-cli/dist/src/cli/render/text-sink.js.map +1 -0
- package/vendor/agent-cli/dist/src/cli.d.ts +9 -0
- package/vendor/agent-cli/dist/src/cli.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/cli.js +54 -0
- package/vendor/agent-cli/dist/src/cli.js.map +1 -0
- package/vendor/agent-cli/dist/src/component/execution.d.ts +24 -0
- package/vendor/agent-cli/dist/src/component/execution.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/component/execution.js +131 -0
- package/vendor/agent-cli/dist/src/component/execution.js.map +1 -0
- package/vendor/agent-cli/dist/src/component/platform-access/server.d.ts +24 -0
- package/vendor/agent-cli/dist/src/component/platform-access/server.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/component/platform-access/server.js +200 -0
- package/vendor/agent-cli/dist/src/component/platform-access/server.js.map +1 -0
- package/vendor/agent-cli/dist/src/component/preparation-diagnostics.d.ts +31 -0
- package/vendor/agent-cli/dist/src/component/preparation-diagnostics.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/component/preparation-diagnostics.js +57 -0
- package/vendor/agent-cli/dist/src/component/preparation-diagnostics.js.map +1 -0
- package/vendor/agent-cli/dist/src/component/preparation.d.ts +10 -0
- package/vendor/agent-cli/dist/src/component/preparation.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/component/preparation.js +35 -0
- package/vendor/agent-cli/dist/src/component/preparation.js.map +1 -0
- package/vendor/agent-cli/dist/src/component/runtime-tools.d.ts +15 -0
- package/vendor/agent-cli/dist/src/component/runtime-tools.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/component/runtime-tools.js +37 -0
- package/vendor/agent-cli/dist/src/component/runtime-tools.js.map +1 -0
- package/vendor/agent-cli/dist/src/component/runtime.d.ts +8 -0
- package/vendor/agent-cli/dist/src/component/runtime.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/component/runtime.js +95 -0
- package/vendor/agent-cli/dist/src/component/runtime.js.map +1 -0
- package/vendor/agent-cli/dist/src/config/config-store.d.ts +50 -0
- package/vendor/agent-cli/dist/src/config/config-store.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/config/config-store.js +117 -0
- package/vendor/agent-cli/dist/src/config/config-store.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/cache-lease.d.ts +17 -0
- package/vendor/agent-cli/dist/src/context/cache-lease.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/cache-lease.js +133 -0
- package/vendor/agent-cli/dist/src/context/cache-lease.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/cache-prune-diagnostics.d.ts +9 -0
- package/vendor/agent-cli/dist/src/context/cache-prune-diagnostics.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/cache-prune-diagnostics.js +51 -0
- package/vendor/agent-cli/dist/src/context/cache-prune-diagnostics.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/cache-publication.d.ts +4 -0
- package/vendor/agent-cli/dist/src/context/cache-publication.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/cache-publication.js +54 -0
- package/vendor/agent-cli/dist/src/context/cache-publication.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/client-context-view.d.ts +12 -0
- package/vendor/agent-cli/dist/src/context/client-context-view.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/client-context-view.js +100 -0
- package/vendor/agent-cli/dist/src/context/client-context-view.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/context-budget.d.ts +3 -0
- package/vendor/agent-cli/dist/src/context/context-budget.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/context-budget.js +10 -0
- package/vendor/agent-cli/dist/src/context/context-budget.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/context-cache.d.ts +108 -0
- package/vendor/agent-cli/dist/src/context/context-cache.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/context-cache.js +357 -0
- package/vendor/agent-cli/dist/src/context/context-cache.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/context-project.d.ts +26 -0
- package/vendor/agent-cli/dist/src/context/context-project.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/context-project.js +113 -0
- package/vendor/agent-cli/dist/src/context/context-project.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/context-resource.d.ts +4 -0
- package/vendor/agent-cli/dist/src/context/context-resource.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/context-resource.js +11 -0
- package/vendor/agent-cli/dist/src/context/context-resource.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/context-snapshot-cache.d.ts +9 -0
- package/vendor/agent-cli/dist/src/context/context-snapshot-cache.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/context-snapshot-cache.js +134 -0
- package/vendor/agent-cli/dist/src/context/context-snapshot-cache.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/local-skills.d.ts +4 -0
- package/vendor/agent-cli/dist/src/context/local-skills.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/local-skills.js +157 -0
- package/vendor/agent-cli/dist/src/context/local-skills.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/member-context.d.ts +19 -0
- package/vendor/agent-cli/dist/src/context/member-context.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/member-context.js +105 -0
- package/vendor/agent-cli/dist/src/context/member-context.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/member-documents.d.ts +3 -0
- package/vendor/agent-cli/dist/src/context/member-documents.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/member-documents.js +38 -0
- package/vendor/agent-cli/dist/src/context/member-documents.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/member-profile-header.d.ts +3 -0
- package/vendor/agent-cli/dist/src/context/member-profile-header.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/member-profile-header.js +62 -0
- package/vendor/agent-cli/dist/src/context/member-profile-header.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/member-profile.d.ts +43 -0
- package/vendor/agent-cli/dist/src/context/member-profile.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/member-profile.js +91 -0
- package/vendor/agent-cli/dist/src/context/member-profile.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/member-selection.d.ts +7 -0
- package/vendor/agent-cli/dist/src/context/member-selection.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/member-selection.js +58 -0
- package/vendor/agent-cli/dist/src/context/member-selection.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/script-dependencies.d.ts +6 -0
- package/vendor/agent-cli/dist/src/context/script-dependencies.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/script-dependencies.js +24 -0
- package/vendor/agent-cli/dist/src/context/script-dependencies.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/shared-cache-build.d.ts +3 -0
- package/vendor/agent-cli/dist/src/context/shared-cache-build.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/shared-cache-build.js +55 -0
- package/vendor/agent-cli/dist/src/context/shared-cache-build.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/team-definition.d.ts +39 -0
- package/vendor/agent-cli/dist/src/context/team-definition.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/team-definition.js +78 -0
- package/vendor/agent-cli/dist/src/context/team-definition.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/team-knowledge.d.ts +7 -0
- package/vendor/agent-cli/dist/src/context/team-knowledge.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/team-knowledge.js +37 -0
- package/vendor/agent-cli/dist/src/context/team-knowledge.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/template-cache.d.ts +27 -0
- package/vendor/agent-cli/dist/src/context/template-cache.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/template-cache.js +100 -0
- package/vendor/agent-cli/dist/src/context/template-cache.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/template-seed.d.ts +32 -0
- package/vendor/agent-cli/dist/src/context/template-seed.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/template-seed.js +117 -0
- package/vendor/agent-cli/dist/src/context/template-seed.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/user-skill-bundle.d.ts +19 -0
- package/vendor/agent-cli/dist/src/context/user-skill-bundle.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/user-skill-bundle.js +292 -0
- package/vendor/agent-cli/dist/src/context/user-skill-bundle.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/user-skill-context.d.ts +13 -0
- package/vendor/agent-cli/dist/src/context/user-skill-context.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/user-skill-context.js +178 -0
- package/vendor/agent-cli/dist/src/context/user-skill-context.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/user-skill-install.d.ts +54 -0
- package/vendor/agent-cli/dist/src/context/user-skill-install.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/user-skill-install.js +184 -0
- package/vendor/agent-cli/dist/src/context/user-skill-install.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/zip-extract.d.ts +14 -0
- package/vendor/agent-cli/dist/src/context/zip-extract.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/zip-extract.js +130 -0
- package/vendor/agent-cli/dist/src/context/zip-extract.js.map +1 -0
- package/vendor/agent-cli/dist/src/index.d.ts +56 -0
- package/vendor/agent-cli/dist/src/index.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/index.js +82 -0
- package/vendor/agent-cli/dist/src/index.js.map +1 -0
- package/vendor/agent-cli/dist/src/lifecycle/engine-hooks.d.ts +68 -0
- package/vendor/agent-cli/dist/src/lifecycle/engine-hooks.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/lifecycle/engine-hooks.js +242 -0
- package/vendor/agent-cli/dist/src/lifecycle/engine-hooks.js.map +1 -0
- package/vendor/agent-cli/dist/src/lifecycle/hook-command.d.ts +40 -0
- package/vendor/agent-cli/dist/src/lifecycle/hook-command.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/lifecycle/hook-command.js +87 -0
- package/vendor/agent-cli/dist/src/lifecycle/hook-command.js.map +1 -0
- package/vendor/agent-cli/dist/src/lifecycle/registry.d.ts +134 -0
- package/vendor/agent-cli/dist/src/lifecycle/registry.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/lifecycle/registry.js +152 -0
- package/vendor/agent-cli/dist/src/lifecycle/registry.js.map +1 -0
- package/vendor/agent-cli/dist/src/lifecycle/workspace-change.d.ts +40 -0
- package/vendor/agent-cli/dist/src/lifecycle/workspace-change.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/lifecycle/workspace-change.js +149 -0
- package/vendor/agent-cli/dist/src/lifecycle/workspace-change.js.map +1 -0
- package/vendor/agent-cli/dist/src/mcp/client.d.ts +12 -0
- package/vendor/agent-cli/dist/src/mcp/client.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/mcp/client.js +95 -0
- package/vendor/agent-cli/dist/src/mcp/client.js.map +1 -0
- package/vendor/agent-cli/dist/src/mcp/connection.d.ts +14 -0
- package/vendor/agent-cli/dist/src/mcp/connection.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/mcp/connection.js +115 -0
- package/vendor/agent-cli/dist/src/mcp/connection.js.map +1 -0
- package/vendor/agent-cli/dist/src/mcp/execute.d.ts +5 -0
- package/vendor/agent-cli/dist/src/mcp/execute.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/mcp/execute.js +26 -0
- package/vendor/agent-cli/dist/src/mcp/execute.js.map +1 -0
- package/vendor/agent-cli/dist/src/mcp/instance-lock.d.ts +11 -0
- package/vendor/agent-cli/dist/src/mcp/instance-lock.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/mcp/instance-lock.js +51 -0
- package/vendor/agent-cli/dist/src/mcp/instance-lock.js.map +1 -0
- package/vendor/agent-cli/dist/src/mcp/types.d.ts +27 -0
- package/vendor/agent-cli/dist/src/mcp/types.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/mcp/types.js +2 -0
- package/vendor/agent-cli/dist/src/mcp/types.js.map +1 -0
- package/vendor/agent-cli/dist/src/protocol/input.d.ts +21 -0
- package/vendor/agent-cli/dist/src/protocol/input.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/protocol/input.js +95 -0
- package/vendor/agent-cli/dist/src/protocol/input.js.map +1 -0
- package/vendor/agent-cli/dist/src/protocol/link/channel.d.ts +58 -0
- package/vendor/agent-cli/dist/src/protocol/link/channel.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/protocol/link/channel.js +337 -0
- package/vendor/agent-cli/dist/src/protocol/link/channel.js.map +1 -0
- package/vendor/agent-cli/dist/src/protocol/link/codec-json.d.ts +13 -0
- package/vendor/agent-cli/dist/src/protocol/link/codec-json.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/protocol/link/codec-json.js +27 -0
- package/vendor/agent-cli/dist/src/protocol/link/codec-json.js.map +1 -0
- package/vendor/agent-cli/dist/src/protocol/link/envelope.d.ts +57 -0
- package/vendor/agent-cli/dist/src/protocol/link/envelope.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/protocol/link/envelope.js +93 -0
- package/vendor/agent-cli/dist/src/protocol/link/envelope.js.map +1 -0
- package/vendor/agent-cli/dist/src/protocol/link/liveness.d.ts +28 -0
- package/vendor/agent-cli/dist/src/protocol/link/liveness.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/protocol/link/liveness.js +86 -0
- package/vendor/agent-cli/dist/src/protocol/link/liveness.js.map +1 -0
- package/vendor/agent-cli/dist/src/protocol/link/middleware.d.ts +14 -0
- package/vendor/agent-cli/dist/src/protocol/link/middleware.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/protocol/link/middleware.js +40 -0
- package/vendor/agent-cli/dist/src/protocol/link/middleware.js.map +1 -0
- package/vendor/agent-cli/dist/src/protocol/link/rpc.d.ts +31 -0
- package/vendor/agent-cli/dist/src/protocol/link/rpc.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/protocol/link/rpc.js +90 -0
- package/vendor/agent-cli/dist/src/protocol/link/rpc.js.map +1 -0
- package/vendor/agent-cli/dist/src/protocol/link/transport-ws.d.ts +32 -0
- package/vendor/agent-cli/dist/src/protocol/link/transport-ws.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/protocol/link/transport-ws.js +106 -0
- package/vendor/agent-cli/dist/src/protocol/link/transport-ws.js.map +1 -0
- package/vendor/agent-cli/dist/src/protocol/messages/errors.gen.d.ts +509 -0
- package/vendor/agent-cli/dist/src/protocol/messages/errors.gen.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/protocol/messages/errors.gen.js +131 -0
- package/vendor/agent-cli/dist/src/protocol/messages/errors.gen.js.map +1 -0
- package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.d.ts +351 -0
- package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.js +103 -0
- package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.js.map +1 -0
- package/vendor/agent-cli/dist/src/security/binary-read-receipts.d.ts +9 -0
- package/vendor/agent-cli/dist/src/security/binary-read-receipts.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/security/binary-read-receipts.js +58 -0
- package/vendor/agent-cli/dist/src/security/binary-read-receipts.js.map +1 -0
- package/vendor/agent-cli/dist/src/security/command-parse.d.ts +21 -0
- package/vendor/agent-cli/dist/src/security/command-parse.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/security/command-parse.js +395 -0
- package/vendor/agent-cli/dist/src/security/command-parse.js.map +1 -0
- package/vendor/agent-cli/dist/src/security/command-translate.d.ts +30 -0
- package/vendor/agent-cli/dist/src/security/command-translate.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/security/command-translate.js +161 -0
- package/vendor/agent-cli/dist/src/security/command-translate.js.map +1 -0
- package/vendor/agent-cli/dist/src/security/context-write-policy.d.ts +18 -0
- package/vendor/agent-cli/dist/src/security/context-write-policy.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/security/context-write-policy.js +121 -0
- package/vendor/agent-cli/dist/src/security/context-write-policy.js.map +1 -0
- package/vendor/agent-cli/dist/src/security/guard.d.ts +41 -0
- package/vendor/agent-cli/dist/src/security/guard.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/security/guard.js +154 -0
- package/vendor/agent-cli/dist/src/security/guard.js.map +1 -0
- package/vendor/agent-cli/dist/src/security/mount-table.d.ts +47 -0
- package/vendor/agent-cli/dist/src/security/mount-table.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/security/mount-table.js +164 -0
- package/vendor/agent-cli/dist/src/security/mount-table.js.map +1 -0
- package/vendor/agent-cli/dist/src/security/sandbox-path.d.ts +23 -0
- package/vendor/agent-cli/dist/src/security/sandbox-path.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/security/sandbox-path.js +110 -0
- package/vendor/agent-cli/dist/src/security/sandbox-path.js.map +1 -0
- package/vendor/agent-cli/dist/src/security/tool-run-owner.d.ts +5 -0
- package/vendor/agent-cli/dist/src/security/tool-run-owner.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/security/tool-run-owner.js +16 -0
- package/vendor/agent-cli/dist/src/security/tool-run-owner.js.map +1 -0
- package/vendor/agent-cli/dist/src/security/tool-scope.d.ts +16 -0
- package/vendor/agent-cli/dist/src/security/tool-scope.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/security/tool-scope.js +88 -0
- package/vendor/agent-cli/dist/src/security/tool-scope.js.map +1 -0
- package/vendor/agent-cli/dist/src/session/client.d.ts +116 -0
- package/vendor/agent-cli/dist/src/session/client.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/client.js +376 -0
- package/vendor/agent-cli/dist/src/session/client.js.map +1 -0
- package/vendor/agent-cli/dist/src/session/custom-context.d.ts +6 -0
- package/vendor/agent-cli/dist/src/session/custom-context.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/custom-context.js +100 -0
- package/vendor/agent-cli/dist/src/session/custom-context.js.map +1 -0
- package/vendor/agent-cli/dist/src/session/engine-decide.d.ts +38 -0
- package/vendor/agent-cli/dist/src/session/engine-decide.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/engine-decide.js +87 -0
- package/vendor/agent-cli/dist/src/session/engine-decide.js.map +1 -0
- package/vendor/agent-cli/dist/src/session/execution-settlement.d.ts +4 -0
- package/vendor/agent-cli/dist/src/session/execution-settlement.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/execution-settlement.js +15 -0
- package/vendor/agent-cli/dist/src/session/execution-settlement.js.map +1 -0
- package/vendor/agent-cli/dist/src/session/link-config.d.ts +13 -0
- package/vendor/agent-cli/dist/src/session/link-config.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/link-config.js +29 -0
- package/vendor/agent-cli/dist/src/session/link-config.js.map +1 -0
- package/vendor/agent-cli/dist/src/session/link-outcome.d.ts +30 -0
- package/vendor/agent-cli/dist/src/session/link-outcome.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/link-outcome.js +67 -0
- package/vendor/agent-cli/dist/src/session/link-outcome.js.map +1 -0
- package/vendor/agent-cli/dist/src/session/link-session.d.ts +76 -0
- package/vendor/agent-cli/dist/src/session/link-session.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/link-session.js +412 -0
- package/vendor/agent-cli/dist/src/session/link-session.js.map +1 -0
- package/vendor/agent-cli/dist/src/session/local-execution.d.ts +28 -0
- package/vendor/agent-cli/dist/src/session/local-execution.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/local-execution.js +119 -0
- package/vendor/agent-cli/dist/src/session/local-execution.js.map +1 -0
- package/vendor/agent-cli/dist/src/session/member-tools.d.ts +22 -0
- package/vendor/agent-cli/dist/src/session/member-tools.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/member-tools.js +72 -0
- package/vendor/agent-cli/dist/src/session/member-tools.js.map +1 -0
- package/vendor/agent-cli/dist/src/session/process-artifact-publisher.d.ts +7 -0
- package/vendor/agent-cli/dist/src/session/process-artifact-publisher.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/process-artifact-publisher.js +30 -0
- package/vendor/agent-cli/dist/src/session/process-artifact-publisher.js.map +1 -0
- package/vendor/agent-cli/dist/src/session/process-environment.d.ts +3 -0
- package/vendor/agent-cli/dist/src/session/process-environment.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/process-environment.js +22 -0
- package/vendor/agent-cli/dist/src/session/process-environment.js.map +1 -0
- package/vendor/agent-cli/dist/src/session/process-request.d.ts +36 -0
- package/vendor/agent-cli/dist/src/session/process-request.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/process-request.js +494 -0
- package/vendor/agent-cli/dist/src/session/process-request.js.map +1 -0
- package/vendor/agent-cli/dist/src/session/reference-tools.d.ts +8 -0
- package/vendor/agent-cli/dist/src/session/reference-tools.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/reference-tools.js +34 -0
- package/vendor/agent-cli/dist/src/session/reference-tools.js.map +1 -0
- package/vendor/agent-cli/dist/src/session/run-events.d.ts +81 -0
- package/vendor/agent-cli/dist/src/session/run-events.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/run-events.js +160 -0
- package/vendor/agent-cli/dist/src/session/run-events.js.map +1 -0
- package/vendor/agent-cli/dist/src/session/run-setup.d.ts +76 -0
- package/vendor/agent-cli/dist/src/session/run-setup.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/run-setup.js +273 -0
- package/vendor/agent-cli/dist/src/session/run-setup.js.map +1 -0
- package/vendor/agent-cli/dist/src/session/run-start-body.d.ts +41 -0
- package/vendor/agent-cli/dist/src/session/run-start-body.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/run-start-body.js +64 -0
- package/vendor/agent-cli/dist/src/session/run-start-body.js.map +1 -0
- package/vendor/agent-cli/dist/src/session/team-persistence.d.ts +17 -0
- package/vendor/agent-cli/dist/src/session/team-persistence.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/team-persistence.js +75 -0
- package/vendor/agent-cli/dist/src/session/team-persistence.js.map +1 -0
- package/vendor/agent-cli/dist/src/session/tool-scheduler.d.ts +37 -0
- package/vendor/agent-cli/dist/src/session/tool-scheduler.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/tool-scheduler.js +232 -0
- package/vendor/agent-cli/dist/src/session/tool-scheduler.js.map +1 -0
- package/vendor/agent-cli/dist/src/session/user-choice.d.ts +5 -0
- package/vendor/agent-cli/dist/src/session/user-choice.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/user-choice.js +80 -0
- package/vendor/agent-cli/dist/src/session/user-choice.js.map +1 -0
- package/vendor/agent-cli/dist/src/session/user-skill-loaded.d.ts +31 -0
- package/vendor/agent-cli/dist/src/session/user-skill-loaded.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/user-skill-loaded.js +104 -0
- package/vendor/agent-cli/dist/src/session/user-skill-loaded.js.map +1 -0
- package/vendor/agent-cli/dist/src/shared/app-id.d.ts +13 -0
- package/vendor/agent-cli/dist/src/shared/app-id.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/shared/app-id.js +25 -0
- package/vendor/agent-cli/dist/src/shared/app-id.js.map +1 -0
- package/vendor/agent-cli/dist/src/shared/auth-headers.d.ts +13 -0
- package/vendor/agent-cli/dist/src/shared/auth-headers.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/shared/auth-headers.js +16 -0
- package/vendor/agent-cli/dist/src/shared/auth-headers.js.map +1 -0
- package/vendor/agent-cli/dist/src/shared/cli-version.d.ts +3 -0
- package/vendor/agent-cli/dist/src/shared/cli-version.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/shared/cli-version.js +22 -0
- package/vendor/agent-cli/dist/src/shared/cli-version.js.map +1 -0
- package/vendor/agent-cli/dist/src/shared/error-detail.d.ts +14 -0
- package/vendor/agent-cli/dist/src/shared/error-detail.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/shared/error-detail.js +29 -0
- package/vendor/agent-cli/dist/src/shared/error-detail.js.map +1 -0
- package/vendor/agent-cli/dist/src/shared/output-guard.d.ts +36 -0
- package/vendor/agent-cli/dist/src/shared/output-guard.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/shared/output-guard.js +94 -0
- package/vendor/agent-cli/dist/src/shared/output-guard.js.map +1 -0
- package/vendor/agent-cli/dist/src/shared/process-cwd.d.ts +3 -0
- package/vendor/agent-cli/dist/src/shared/process-cwd.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/shared/process-cwd.js +11 -0
- package/vendor/agent-cli/dist/src/shared/process-cwd.js.map +1 -0
- package/vendor/agent-cli/dist/src/shared/process-types.d.ts +60 -0
- package/vendor/agent-cli/dist/src/shared/process-types.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/shared/process-types.js +10 -0
- package/vendor/agent-cli/dist/src/shared/process-types.js.map +1 -0
- package/vendor/agent-cli/dist/src/shared/server-headers.d.ts +7 -0
- package/vendor/agent-cli/dist/src/shared/server-headers.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/shared/server-headers.js +113 -0
- package/vendor/agent-cli/dist/src/shared/server-headers.js.map +1 -0
- package/vendor/agent-cli/dist/src/shared/shell-runtime.d.ts +47 -0
- package/vendor/agent-cli/dist/src/shared/shell-runtime.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/shared/shell-runtime.js +210 -0
- package/vendor/agent-cli/dist/src/shared/shell-runtime.js.map +1 -0
- package/vendor/agent-cli/dist/src/shared/types.d.ts +458 -0
- package/vendor/agent-cli/dist/src/shared/types.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/shared/types.js +2 -0
- package/vendor/agent-cli/dist/src/shared/types.js.map +1 -0
- package/vendor/agent-cli/dist/src/shared/user-choice.d.ts +22 -0
- package/vendor/agent-cli/dist/src/shared/user-choice.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/shared/user-choice.js +2 -0
- package/vendor/agent-cli/dist/src/shared/user-choice.js.map +1 -0
- package/vendor/agent-cli/dist/src/tools/artifact-publisher.d.ts +9 -0
- package/vendor/agent-cli/dist/src/tools/artifact-publisher.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/tools/artifact-publisher.js +85 -0
- package/vendor/agent-cli/dist/src/tools/artifact-publisher.js.map +1 -0
- package/vendor/agent-cli/dist/src/tools/command-executor.d.ts +30 -0
- package/vendor/agent-cli/dist/src/tools/command-executor.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/tools/command-executor.js +96 -0
- package/vendor/agent-cli/dist/src/tools/command-executor.js.map +1 -0
- package/vendor/agent-cli/dist/src/tools/context-program-publish.d.ts +16 -0
- package/vendor/agent-cli/dist/src/tools/context-program-publish.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/tools/context-program-publish.js +104 -0
- package/vendor/agent-cli/dist/src/tools/context-program-publish.js.map +1 -0
- package/vendor/agent-cli/dist/src/tools/context-program.d.ts +21 -0
- package/vendor/agent-cli/dist/src/tools/context-program.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/tools/context-program.js +207 -0
- package/vendor/agent-cli/dist/src/tools/context-program.js.map +1 -0
- package/vendor/agent-cli/dist/src/tools/file-ops.d.ts +61 -0
- package/vendor/agent-cli/dist/src/tools/file-ops.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/tools/file-ops.js +477 -0
- package/vendor/agent-cli/dist/src/tools/file-ops.js.map +1 -0
- package/vendor/agent-cli/dist/src/tools/local-hands.d.ts +58 -0
- package/vendor/agent-cli/dist/src/tools/local-hands.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/tools/local-hands.js +322 -0
- package/vendor/agent-cli/dist/src/tools/local-hands.js.map +1 -0
- package/vendor/agent-cli/dist/src/tools/ripgrep-search.d.ts +24 -0
- package/vendor/agent-cli/dist/src/tools/ripgrep-search.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/tools/ripgrep-search.js +160 -0
- package/vendor/agent-cli/dist/src/tools/ripgrep-search.js.map +1 -0
- package/vendor/agent-cli/dist/src/tools/tool-contract.gen.d.ts +66 -0
- package/vendor/agent-cli/dist/src/tools/tool-contract.gen.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/tools/tool-contract.gen.js +65 -0
- package/vendor/agent-cli/dist/src/tools/tool-contract.gen.js.map +1 -0
- package/vendor/agent-cli/dist/src/tools/tool-timeout.d.ts +29 -0
- package/vendor/agent-cli/dist/src/tools/tool-timeout.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/tools/tool-timeout.js +88 -0
- package/vendor/agent-cli/dist/src/tools/tool-timeout.js.map +1 -0
- package/vendor/agent-cli/dist/src/tools/write-guard.d.ts +42 -0
- package/vendor/agent-cli/dist/src/tools/write-guard.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/tools/write-guard.js +34 -0
- package/vendor/agent-cli/dist/src/tools/write-guard.js.map +1 -0
- package/vendor/agent-cli/package.json +29 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// SURFACE_MODE: overlay
|
|
2
|
+
import {
|
|
3
|
+
UI_LAYER,
|
|
4
|
+
createButton,
|
|
5
|
+
createImage,
|
|
6
|
+
createPanel,
|
|
7
|
+
createText,
|
|
8
|
+
} from '../DomUiKit';
|
|
9
|
+
import './hud.css';
|
|
10
|
+
|
|
11
|
+
export interface HudRefs {
|
|
12
|
+
root: HTMLDivElement;
|
|
13
|
+
icon: HTMLDivElement;
|
|
14
|
+
title: HTMLDivElement;
|
|
15
|
+
score: HTMLDivElement;
|
|
16
|
+
pauseButton: HTMLButtonElement;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function createHudLayout(): HudRefs {
|
|
20
|
+
const root = createPanel({ layer: UI_LAYER.HUD, className: 'hud-root' });
|
|
21
|
+
const icon = createImage({
|
|
22
|
+
parent: root,
|
|
23
|
+
src: '',
|
|
24
|
+
fit: 'contain',
|
|
25
|
+
className: 'hud-icon',
|
|
26
|
+
});
|
|
27
|
+
const title = createText({ parent: root, text: '游戏状态', className: 'hud-title' });
|
|
28
|
+
const score = createText({ parent: root, text: '分数:0', className: 'hud-score' });
|
|
29
|
+
const pauseButton = createButton({
|
|
30
|
+
parent: root,
|
|
31
|
+
label: '暂停',
|
|
32
|
+
className: 'hud-pause',
|
|
33
|
+
});
|
|
34
|
+
return { root, icon, title, score, pauseButton };
|
|
35
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { createUiContext, setVisible } from '../../../runtime/ui-editor/1.0.0/dom-ui.mjs';
|
|
2
|
+
import { createHudLayout } from './WidgetLayout_Hud';
|
|
3
|
+
|
|
4
|
+
/** Copy this example into src/ui/hud/; preserve existing game logic when adapting a real panel. */
|
|
5
|
+
export class HudPanel {
|
|
6
|
+
readonly refs = createHudLayout();
|
|
7
|
+
private readonly events = new AbortController();
|
|
8
|
+
private ui: ReturnType<typeof createUiContext> | undefined;
|
|
9
|
+
private mounted: { dispose(): void } | undefined;
|
|
10
|
+
private resizeObserver: ResizeObserver | undefined;
|
|
11
|
+
private disposed = false;
|
|
12
|
+
|
|
13
|
+
constructor(onPause: () => void) {
|
|
14
|
+
this.refs.pauseButton.addEventListener('click', onPause, { signal: this.events.signal });
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
mount(container: HTMLElement, designSize: { width: number; height: number }): void {
|
|
18
|
+
if (this.disposed) throw new Error('Create a new HudPanel after dispose().');
|
|
19
|
+
if (this.ui) throw new Error('HudPanel is already mounted.');
|
|
20
|
+
this.ui = createUiContext(container, designSize);
|
|
21
|
+
this.mounted = this.ui.mount(this.refs);
|
|
22
|
+
this.resizeObserver = new ResizeObserver(() => this.ui?.resize());
|
|
23
|
+
this.resizeObserver.observe(container);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
setScore(score: number): void {
|
|
27
|
+
this.refs.score.textContent = `分数:${score}`;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** URL 来自 `configs/assets.json`,加载见 AigcWiring。createImage 是 div,用 backgroundImage。 */
|
|
31
|
+
setIcon(url: string): void {
|
|
32
|
+
const icon = this.refs.icon;
|
|
33
|
+
if (!url) {
|
|
34
|
+
icon.style.backgroundImage = '';
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
icon.style.backgroundImage = `url(${JSON.stringify(url)})`;
|
|
38
|
+
icon.style.backgroundRepeat = 'no-repeat';
|
|
39
|
+
icon.style.backgroundPosition = 'center';
|
|
40
|
+
icon.style.backgroundSize = 'contain';
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
setVisible(visible: boolean): void {
|
|
44
|
+
setVisible(this.refs.root, visible);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
resize(): void {
|
|
48
|
+
this.ui?.resize();
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
dispose(): void {
|
|
52
|
+
if (this.disposed) return;
|
|
53
|
+
this.disposed = true;
|
|
54
|
+
this.events.abort();
|
|
55
|
+
this.resizeObserver?.disconnect();
|
|
56
|
+
this.mounted?.dispose();
|
|
57
|
+
this.ui?.dispose();
|
|
58
|
+
this.refs.root.remove();
|
|
59
|
+
this.resizeObserver = undefined;
|
|
60
|
+
this.mounted = undefined;
|
|
61
|
+
this.ui = undefined;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function mountHud(
|
|
66
|
+
container: HTMLElement,
|
|
67
|
+
width: number,
|
|
68
|
+
height: number,
|
|
69
|
+
onPause: () => void = () => {},
|
|
70
|
+
): HudPanel {
|
|
71
|
+
const hud = new HudPanel(onPause);
|
|
72
|
+
hud.mount(container, { width, height });
|
|
73
|
+
return hud;
|
|
74
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
.hud-root {
|
|
2
|
+
position: absolute;
|
|
3
|
+
top: 24px;
|
|
4
|
+
left: 24px;
|
|
5
|
+
width: 360px;
|
|
6
|
+
height: 90px;
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
border: 1px solid #61718b;
|
|
9
|
+
border-radius: 14px;
|
|
10
|
+
background: #182335;
|
|
11
|
+
color: #f7f9ff;
|
|
12
|
+
font: 16px/1.4 system-ui, sans-serif;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.hud-root[hidden] {
|
|
16
|
+
display: none;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.hud-icon {
|
|
20
|
+
position: absolute;
|
|
21
|
+
top: 20px;
|
|
22
|
+
left: 18px;
|
|
23
|
+
width: 24px;
|
|
24
|
+
height: 24px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.hud-title {
|
|
28
|
+
position: absolute;
|
|
29
|
+
top: 16px;
|
|
30
|
+
left: 56px;
|
|
31
|
+
font-weight: 700;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.hud-score {
|
|
35
|
+
position: absolute;
|
|
36
|
+
top: 46px;
|
|
37
|
+
left: 56px;
|
|
38
|
+
color: #f8cc5b;
|
|
39
|
+
font-variant-numeric: tabular-nums;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.hud-pause {
|
|
43
|
+
position: absolute;
|
|
44
|
+
top: 22px;
|
|
45
|
+
right: 16px;
|
|
46
|
+
width: 72px;
|
|
47
|
+
height: 44px;
|
|
48
|
+
padding: 8px 14px;
|
|
49
|
+
border: 0;
|
|
50
|
+
border-radius: 9px;
|
|
51
|
+
background: #dce8ff;
|
|
52
|
+
color: #182335;
|
|
53
|
+
font: inherit;
|
|
54
|
+
cursor: pointer;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.hud-pause:focus-visible {
|
|
58
|
+
outline: 3px solid #f8cc5b;
|
|
59
|
+
outline-offset: 3px;
|
|
60
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export const UI_LAYER: Readonly<{ BACKGROUND: 0; HUD: 100; PANEL: 300; SCRIM: 600; MODAL: 650; TOAST: 900 }>;
|
|
2
|
+
export type UiLayer = typeof UI_LAYER[keyof typeof UI_LAYER];
|
|
3
|
+
export interface UIRect { x: number; y: number; width: number; height: number }
|
|
4
|
+
export interface NodeOptions {
|
|
5
|
+
/** parent takes priority; without parent the root is attached by UiContext.mount(refs). */
|
|
6
|
+
parent?: HTMLElement;
|
|
7
|
+
layer?: UiLayer | number;
|
|
8
|
+
rect?: UIRect;
|
|
9
|
+
className?: string;
|
|
10
|
+
interactive?: boolean;
|
|
11
|
+
hidden?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface TextOptions extends NodeOptions { text?: string }
|
|
14
|
+
export interface NineSlice { top: number; right: number; bottom: number; left: number }
|
|
15
|
+
export type ImageFit = 'contain' | 'cover' | 'stretch' | 'nine-slice';
|
|
16
|
+
export interface ImageOptions extends NodeOptions { src?: string; fit?: ImageFit; slice?: NineSlice }
|
|
17
|
+
export interface ButtonOptions extends NodeOptions {
|
|
18
|
+
label?: string; background?: string; backgroundFit?: ImageFit; backgroundSlice?: NineSlice;
|
|
19
|
+
icon?: string; disabled?: boolean;
|
|
20
|
+
/** Legacy convenience. Editor-compatible Layouts leave this unset; Logic binds ordinary click events. */
|
|
21
|
+
onClick?: (event: MouseEvent) => void;
|
|
22
|
+
}
|
|
23
|
+
export interface ScrimOptions extends NodeOptions { onClick?: (event: MouseEvent) => void }
|
|
24
|
+
export function createPanel(options?: NodeOptions): HTMLDivElement;
|
|
25
|
+
export function createText(options?: TextOptions): HTMLDivElement;
|
|
26
|
+
export function createImage(options?: ImageOptions): HTMLDivElement;
|
|
27
|
+
export function createButton(options?: ButtonOptions): HTMLButtonElement;
|
|
28
|
+
export function createScrim(options?: ScrimOptions): HTMLDivElement;
|
|
29
|
+
export function setRect(element: HTMLElement, rect: UIRect): void;
|
|
30
|
+
export function setVisible(element: HTMLElement, visible: boolean): void;
|
|
31
|
+
/** Reports the explicit ui-hidden state, not computed CSS or ancestor visibility. */
|
|
32
|
+
export function isVisible(element: HTMLElement): boolean;
|
|
33
|
+
/** Cleans factory-owned listeners. User event subscriptions and timers remain owned by Logic. */
|
|
34
|
+
export function destroy(element: HTMLElement): void;
|
|
35
|
+
export interface UiMount<Refs extends object> { readonly refs: Refs; dispose(): void }
|
|
36
|
+
export interface UiContext {
|
|
37
|
+
readonly root: HTMLDivElement; readonly stage: HTMLDivElement; readonly scale: number;
|
|
38
|
+
getLayer(layer: UiLayer | number): HTMLDivElement;
|
|
39
|
+
getDesignSize(): { width: number; height: number };
|
|
40
|
+
mount<Refs extends object>(refs: Refs): UiMount<Refs>;
|
|
41
|
+
/** Explicit contain resize. No ResizeObserver or requestAnimationFrame is started. */
|
|
42
|
+
resize(cssWidth?: number, cssHeight?: number): void;
|
|
43
|
+
dispose(): void;
|
|
44
|
+
}
|
|
45
|
+
export function createUiContext(container: HTMLElement, options: { width: number; height: number; zIndex?: number }): UiContext;
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Optional DOM adapter for WidgetLayout source files. The five single-options factories
|
|
3
|
+
* match the editor's named mocks. No context, document or event loop is created on import.
|
|
4
|
+
*/
|
|
5
|
+
export const UI_LAYER = Object.freeze({ BACKGROUND: 0, HUD: 100, PANEL: 300, SCRIM: 600, MODAL: 650, TOAST: 900 });
|
|
6
|
+
|
|
7
|
+
// Metadata belongs to individual nodes; there is no global current UI context.
|
|
8
|
+
const nodes = new WeakMap();
|
|
9
|
+
const stages = new WeakMap();
|
|
10
|
+
|
|
11
|
+
// Low-priority layer lets existing owner CSS keep its appearance even when it loaded first.
|
|
12
|
+
const BASE_CSS = `
|
|
13
|
+
@layer lightgame-editor-base {
|
|
14
|
+
.ui-editor-context{--ui-primary:#437eae;--ui-primary-strong:#285a83;--ui-accent:#ebc778;--ui-danger:#bc5660;--ui-success:#59a88d;--ui-text:#eef5fb;--ui-text-dim:#aebdcc;--ui-text-dark:#132538;--ui-panel-bg:rgba(18,34,52,.92);--ui-panel-border:rgba(196,221,245,.24);--ui-scrim:rgba(0,0,0,.5);--ui-font-xl:64px;--ui-font-lg:44px;--ui-font-md:32px;--ui-font-sm:24px;--ui-gap-xs:8px;--ui-gap-sm:16px;--ui-gap-md:28px;--ui-gap-lg:48px;--ui-radius-sm:8px;--ui-radius-md:16px;--ui-radius-lg:28px;--ui-font-family:system-ui,sans-serif;--ui-page-margin:28px;color:var(--ui-text);font-family:var(--ui-font-family)}
|
|
15
|
+
:where(.ui-editor-context) .ui-node{box-sizing:border-box;pointer-events:none}
|
|
16
|
+
:where(.ui-editor-context) .ui-interactive{pointer-events:auto}
|
|
17
|
+
:where(.ui-editor-context) .ui-hidden{display:none!important}
|
|
18
|
+
:where(.ui-editor-context) .ui-row{display:flex;flex-direction:row;gap:var(--ui-gap-sm)}
|
|
19
|
+
:where(.ui-editor-context) .ui-col{display:flex;flex-direction:column;gap:var(--ui-gap-sm)}
|
|
20
|
+
:where(.ui-editor-context) .ui-center{align-items:center;justify-content:center}
|
|
21
|
+
:where(.ui-editor-context) .ui-between{justify-content:space-between}
|
|
22
|
+
:where(.ui-editor-context) .ui-grow{flex:1;min-width:0;min-height:0}
|
|
23
|
+
:where(.ui-editor-context) .ui-grid{display:grid;gap:var(--ui-gap-sm)}
|
|
24
|
+
:where(.ui-editor-context) .ui-clip{overflow:hidden}
|
|
25
|
+
:where(.ui-editor-context) .ui-scroll{overflow:auto;overscroll-behavior:contain}
|
|
26
|
+
:where(.ui-editor-context) .ui-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
|
|
27
|
+
:where(.ui-editor-context) .ui-panel{background:var(--ui-panel-bg);border:1px solid var(--ui-panel-border);border-radius:var(--ui-radius-md);padding:var(--ui-gap-md)}
|
|
28
|
+
:where(.ui-editor-context) .ui-page{position:absolute;inset:var(--ui-page-margin)}
|
|
29
|
+
:where(.ui-editor-context) .ui-modal{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}
|
|
30
|
+
:where(.ui-editor-context) .ui-scrim{background:var(--ui-scrim)}
|
|
31
|
+
:where(.ui-editor-context) .ui-btn{display:inline-flex;align-items:center;justify-content:center;gap:var(--ui-gap-xs);padding:var(--ui-gap-sm) var(--ui-gap-md);border:1px solid var(--ui-panel-border);border-radius:var(--ui-radius-sm);background:var(--ui-primary);color:var(--ui-text);font:inherit;cursor:pointer}
|
|
32
|
+
:where(.ui-editor-context) .ui-btn:active:not(:disabled){filter:brightness(.88)}
|
|
33
|
+
:where(.ui-editor-context) .ui-btn:disabled{opacity:.5;cursor:default}
|
|
34
|
+
:where(.ui-editor-context) .ui-btn:focus-visible{outline:3px solid var(--ui-accent);outline-offset:3px}
|
|
35
|
+
:where(.ui-editor-context) .ui-btn--accent{background:var(--ui-accent);color:var(--ui-text-dark)}
|
|
36
|
+
:where(.ui-editor-context) .ui-btn--danger{background:var(--ui-danger)}
|
|
37
|
+
:where(.ui-editor-context) .ui-btn--ghost{background:transparent}
|
|
38
|
+
:where(.ui-editor-context) .ui-btn-close{width:80px;height:80px;border-radius:50%;padding:0}
|
|
39
|
+
:where(.ui-editor-context) .ui-btn__icon{display:inline-block;width:1em;height:1em;flex:none;background-position:center;background-repeat:no-repeat;background-size:contain}
|
|
40
|
+
:where(.ui-editor-context) .ui-title{font-size:var(--ui-font-xl);font-weight:700}
|
|
41
|
+
:where(.ui-editor-context) .ui-subtitle{font-size:var(--ui-font-lg)}
|
|
42
|
+
:where(.ui-editor-context) .ui-small{font-size:var(--ui-font-sm)}
|
|
43
|
+
:where(.ui-editor-context) .ui-num{font-variant-numeric:tabular-nums}
|
|
44
|
+
:where(.ui-editor-context) .ui-bar{position:relative;overflow:hidden;background:var(--ui-panel-bg);border-radius:var(--ui-radius-sm)}
|
|
45
|
+
:where(.ui-editor-context) .ui-bar__fill{height:100%;width:100%;background:var(--ui-primary);transform-origin:left center}
|
|
46
|
+
}
|
|
47
|
+
`;
|
|
48
|
+
|
|
49
|
+
function documentFor(options) {
|
|
50
|
+
const document = options.parent?.ownerDocument ?? globalThis.document;
|
|
51
|
+
if (!document?.createElement) throw new Error('DOM UI factories require a browser document or a parent with ownerDocument');
|
|
52
|
+
return document;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function validLayer(layer) {
|
|
56
|
+
if (!Number.isFinite(layer)) throw new TypeError('UI layer must be a finite number');
|
|
57
|
+
return layer;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function addClasses(element, value) {
|
|
61
|
+
for (const name of String(value ?? '').split(/\s+/)) if (name) element.classList.add(name);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/** Only explicit rect changes positioning; flex/grid children remain in normal flow. */
|
|
65
|
+
export function setRect(element, { x, y, width, height }) {
|
|
66
|
+
if (![x, y, width, height].every(Number.isFinite) || width < 0 || height < 0) throw new RangeError('UI rect requires finite coordinates and nonnegative dimensions');
|
|
67
|
+
Object.assign(element.style, { position: 'absolute', left: `${x}px`, top: `${y}px`, width: `${width}px`, height: `${height}px` });
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function applyOptions(element, options) {
|
|
71
|
+
const layer = options.parent ? undefined : validLayer(options.layer ?? UI_LAYER.HUD);
|
|
72
|
+
element.classList.add('ui-node'); addClasses(element, options.className);
|
|
73
|
+
if (options.interactive) element.classList.add('ui-interactive');
|
|
74
|
+
if (options.hidden) element.classList.add('ui-hidden');
|
|
75
|
+
if (options.rect) setRect(element, options.rect);
|
|
76
|
+
nodes.set(element, { layer, cleanups: [], owner: null });
|
|
77
|
+
options.parent?.appendChild(element);
|
|
78
|
+
return element;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function listen(element, type, listener, options) {
|
|
82
|
+
element.addEventListener(type, listener, options);
|
|
83
|
+
nodes.get(element).cleanups.push(() => element.removeEventListener(type, listener, options));
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function contextScale(element) {
|
|
87
|
+
for (let parent = element; parent; parent = parent.parentNode) {
|
|
88
|
+
const state = stages.get(parent);
|
|
89
|
+
if (state) return state.scale;
|
|
90
|
+
}
|
|
91
|
+
return 1;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/** Layer-only nodes remain detached until createUiContext(...).mount(refs). Parent takes priority. */
|
|
95
|
+
export function createPanel(options = {}) {
|
|
96
|
+
return applyOptions(documentFor(options).createElement('div'), options);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export function createText(options = {}) {
|
|
100
|
+
const element = documentFor(options).createElement('div');
|
|
101
|
+
if (options.text !== undefined) element.textContent = options.text;
|
|
102
|
+
return applyOptions(element, options);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function applyImage(element, url, fit, slice) {
|
|
106
|
+
if (!['contain', 'cover', 'stretch', 'nine-slice'].includes(fit)) throw new TypeError(`Unknown UI image fit '${fit}'`);
|
|
107
|
+
if (!url) return;
|
|
108
|
+
const source = `url(${JSON.stringify(String(url))})`;
|
|
109
|
+
if (fit === 'nine-slice' && slice) {
|
|
110
|
+
const edges = [slice.top, slice.right, slice.bottom, slice.left];
|
|
111
|
+
if (!edges.every(value => Number.isFinite(value) && value >= 0)) throw new RangeError('Nine-slice borders must be finite and nonnegative');
|
|
112
|
+
const border = edges.map(value => `${value}px`).join(' ');
|
|
113
|
+
Object.assign(element.style, { borderImageSource: source, borderImageSlice: `${edges.join(' ')} fill`, borderImageWidth: border, borderImageRepeat: 'stretch', borderStyle: 'solid', borderColor: 'transparent', borderWidth: border, boxSizing: 'border-box' });
|
|
114
|
+
} else {
|
|
115
|
+
Object.assign(element.style, { backgroundImage: source, backgroundRepeat: 'no-repeat', backgroundPosition: 'center', backgroundSize: fit === 'contain' || fit === 'cover' ? fit : '100% 100%' });
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/** Images are DIVs backed by CSS background-image/border-image, matching editor factories. */
|
|
120
|
+
export function createImage(options = {}) {
|
|
121
|
+
const element = documentFor(options).createElement('div');
|
|
122
|
+
applyImage(element, options.src, options.fit ?? 'contain', options.slice);
|
|
123
|
+
return applyOptions(element, options);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/** Native click stays available to Logic listeners; a capture guard suppresses dragged pointer clicks. */
|
|
127
|
+
export function createButton(options = {}) {
|
|
128
|
+
const document = documentFor(options), element = document.createElement('button');
|
|
129
|
+
element.type = 'button'; element.disabled = Boolean(options.disabled);
|
|
130
|
+
applyImage(element, options.background, options.backgroundFit ?? 'nine-slice', options.backgroundSlice);
|
|
131
|
+
if (options.icon) {
|
|
132
|
+
const icon = document.createElement('span'); icon.className = 'ui-btn__icon';
|
|
133
|
+
applyImage(icon, options.icon, 'contain'); element.appendChild(icon);
|
|
134
|
+
}
|
|
135
|
+
if (options.label !== undefined) {
|
|
136
|
+
const label = document.createElement('span'); label.className = 'ui-btn__label'; label.textContent = options.label; element.appendChild(label);
|
|
137
|
+
}
|
|
138
|
+
applyOptions(element, { ...options, interactive: true });
|
|
139
|
+
const pointers = new Map(); let suppressed = false;
|
|
140
|
+
const down = event => { suppressed = false; pointers.set(event.pointerId, { x: event.clientX, y: event.clientY, moved: false }); };
|
|
141
|
+
const move = event => {
|
|
142
|
+
const point = pointers.get(event.pointerId);
|
|
143
|
+
if (point && Math.hypot(event.clientX - point.x, event.clientY - point.y) > 20 * contextScale(element)) point.moved = true;
|
|
144
|
+
};
|
|
145
|
+
const up = event => { move(event); const point = pointers.get(event.pointerId); suppressed = Boolean(point?.moved); pointers.delete(event.pointerId); };
|
|
146
|
+
const cancel = event => { pointers.delete(event.pointerId); suppressed = true; };
|
|
147
|
+
const click = event => {
|
|
148
|
+
if (element.disabled || (event.detail !== 0 && suppressed)) { suppressed = false; event.preventDefault(); event.stopImmediatePropagation(); return; }
|
|
149
|
+
suppressed = false;
|
|
150
|
+
};
|
|
151
|
+
listen(element, 'pointerdown', down); listen(element, 'pointermove', move); listen(element, 'pointerup', up); listen(element, 'pointercancel', cancel);
|
|
152
|
+
listen(element, 'click', click, true);
|
|
153
|
+
if (options.onClick) listen(element, 'click', options.onClick);
|
|
154
|
+
nodes.get(element).cleanups.push(() => pointers.clear());
|
|
155
|
+
return element;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/** Separate SCRIM-layer root, initially hidden. Include it in Refs and show/hide it with the modal root. */
|
|
159
|
+
export function createScrim(options = {}) {
|
|
160
|
+
const element = createPanel({ ...options, layer: options.layer ?? UI_LAYER.SCRIM, className: `ui-scrim ${options.className ?? ''}`, interactive: true, hidden: options.hidden ?? true });
|
|
161
|
+
if (!options.rect) Object.assign(element.style, { position: 'absolute', left: '0', top: '0', width: '100%', height: '100%' });
|
|
162
|
+
if (options.onClick) listen(element, 'click', options.onClick);
|
|
163
|
+
return element;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/** Preserves the element's flex/grid display declaration. */
|
|
167
|
+
export function setVisible(element, visible) {
|
|
168
|
+
if (visible) element.classList.remove('ui-hidden'); else element.classList.add('ui-hidden');
|
|
169
|
+
}
|
|
170
|
+
export function isVisible(element) { return !element.classList.contains('ui-hidden'); }
|
|
171
|
+
|
|
172
|
+
/** Removes this subtree and its factory-owned listeners; Logic still owns its own listeners/timers. */
|
|
173
|
+
export function destroy(element) {
|
|
174
|
+
const clean = node => {
|
|
175
|
+
for (const child of [...(node.children ?? [])]) clean(child);
|
|
176
|
+
const state = nodes.get(node);
|
|
177
|
+
if (state) { for (const cleanup of state.cleanups) cleanup(); nodes.delete(node); }
|
|
178
|
+
};
|
|
179
|
+
clean(element); element.remove();
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
function collectFactoryNodes(refs) {
|
|
183
|
+
const found = new Set(), visited = new Set();
|
|
184
|
+
const visit = value => {
|
|
185
|
+
if (!value || typeof value !== 'object' || visited.has(value)) return;
|
|
186
|
+
visited.add(value);
|
|
187
|
+
if (nodes.has(value)) { found.add(value); return; }
|
|
188
|
+
// Do not traverse arbitrary native DOM internals or application class instances.
|
|
189
|
+
if (value.nodeType !== undefined) return;
|
|
190
|
+
if (Array.isArray(value)) { value.forEach(visit); return; }
|
|
191
|
+
const prototype = Object.getPrototypeOf(value);
|
|
192
|
+
if (prototype === Object.prototype || prototype === null) Object.values(value).forEach(visit);
|
|
193
|
+
};
|
|
194
|
+
visit(refs); return found;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Explicitly owns a DOM stage. container must establish a CSS containing block
|
|
199
|
+
* (usually position: relative). Call resize yourself; this helper starts no observer or loop.
|
|
200
|
+
*/
|
|
201
|
+
export function createUiContext(container, { width, height, zIndex = 10 } = {}) {
|
|
202
|
+
if (![width, height].every(value => Number.isFinite(value) && value > 0)) throw new RangeError('UI design width and height must be finite and positive');
|
|
203
|
+
if (!container?.ownerDocument?.createElement) throw new TypeError('createUiContext requires a DOM container');
|
|
204
|
+
const document = container.ownerDocument, root = document.createElement('div'), stage = document.createElement('div'), style = document.createElement('style');
|
|
205
|
+
root.className = 'ui-editor-context';
|
|
206
|
+
Object.assign(root.style, { position: 'absolute', left: '0', top: '0', width: '100%', height: '100%', pointerEvents: 'none', overflow: 'hidden', zIndex: String(zIndex) });
|
|
207
|
+
Object.assign(stage.style, { position: 'absolute', left: '50%', top: '50%', width: `${width}px`, height: `${height}px`, transformOrigin: 'center center', pointerEvents: 'none', overflow: 'hidden' });
|
|
208
|
+
style.textContent = BASE_CSS; root.appendChild(style); root.appendChild(stage); container.appendChild(root);
|
|
209
|
+
const state = { scale: 1 }, layers = new Map(), mounts = new Set();
|
|
210
|
+
stages.set(stage, state);
|
|
211
|
+
let disposed = false;
|
|
212
|
+
const requireLive = () => { if (disposed) throw new Error('UI context is disposed'); };
|
|
213
|
+
function getLayer(layer) {
|
|
214
|
+
requireLive(); validLayer(layer);
|
|
215
|
+
let element = layers.get(layer);
|
|
216
|
+
if (!element) {
|
|
217
|
+
element = document.createElement('div'); element.className = 'ui-layer'; element.dataset.layer = String(layer);
|
|
218
|
+
Object.assign(element.style, { position: 'absolute', left: '0', top: '0', width: '100%', height: '100%', pointerEvents: 'none', zIndex: String(layer) });
|
|
219
|
+
stage.appendChild(element); layers.set(layer, element);
|
|
220
|
+
}
|
|
221
|
+
return element;
|
|
222
|
+
}
|
|
223
|
+
for (const layer of Object.values(UI_LAYER)) getLayer(layer);
|
|
224
|
+
function resize(cssWidth = container.clientWidth, cssHeight = container.clientHeight) {
|
|
225
|
+
requireLive();
|
|
226
|
+
if (![cssWidth, cssHeight].every(value => Number.isFinite(value) && value >= 0)) throw new RangeError('UI container dimensions must be finite and nonnegative');
|
|
227
|
+
state.scale = Math.min(cssWidth / width, cssHeight / height);
|
|
228
|
+
stage.style.transform = `translate(-50%, -50%) scale(${state.scale})`;
|
|
229
|
+
}
|
|
230
|
+
resize();
|
|
231
|
+
function mount(refs) {
|
|
232
|
+
requireLive();
|
|
233
|
+
const candidates = collectFactoryNodes(refs), roots = new Set();
|
|
234
|
+
if (!candidates.size) throw new TypeError('mount requires Layout Refs containing factory-created nodes');
|
|
235
|
+
for (const node of candidates) {
|
|
236
|
+
let ancestor = node;
|
|
237
|
+
while (ancestor.parentNode && nodes.has(ancestor.parentNode)) ancestor = ancestor.parentNode;
|
|
238
|
+
if (nodes.get(ancestor)?.owner || ancestor.parentNode) throw new Error('Layout root is already mounted or attached; create a fresh Layout or use its existing mount');
|
|
239
|
+
if (ancestor.ownerDocument !== document) throw new Error('Layout and UI context must use the same document');
|
|
240
|
+
roots.add(ancestor);
|
|
241
|
+
}
|
|
242
|
+
let released = false;
|
|
243
|
+
const handle = {
|
|
244
|
+
refs,
|
|
245
|
+
dispose() {
|
|
246
|
+
if (released) return; released = true;
|
|
247
|
+
for (const element of roots) destroy(element);
|
|
248
|
+
roots.clear(); mounts.delete(handle);
|
|
249
|
+
},
|
|
250
|
+
};
|
|
251
|
+
for (const element of roots) { const metadata = nodes.get(element); getLayer(metadata.layer ?? UI_LAYER.HUD).appendChild(element); metadata.owner = handle; }
|
|
252
|
+
mounts.add(handle); return handle;
|
|
253
|
+
}
|
|
254
|
+
return {
|
|
255
|
+
root, stage, getLayer, mount, resize,
|
|
256
|
+
get scale() { return state.scale; },
|
|
257
|
+
getDesignSize: () => ({ width, height }),
|
|
258
|
+
dispose() {
|
|
259
|
+
if (disposed) return;
|
|
260
|
+
for (const handle of [...mounts]) handle.dispose();
|
|
261
|
+
for (const layer of layers.values()) for (const element of [...layer.children]) destroy(element);
|
|
262
|
+
disposed = true; stages.delete(stage); layers.clear(); root.remove();
|
|
263
|
+
},
|
|
264
|
+
};
|
|
265
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# UI 编辑适配契约
|
|
2
|
+
|
|
3
|
+
检查器复现已知的解析与回写行为;它不是线上 UI 编辑器源码的副本。
|
|
4
|
+
|
|
5
|
+
## 文件与入口
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
src/ui/DomUiKit.ts # install 创建的真实转导出模块
|
|
9
|
+
src/ui/hud/
|
|
10
|
+
WidgetLayout_Hud.ts
|
|
11
|
+
WidgetLogic_Hud.ts
|
|
12
|
+
hud.css
|
|
13
|
+
runtime/ui-editor/1.0.0/
|
|
14
|
+
dom-ui.mjs
|
|
15
|
+
dom-ui.d.mts
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Layout 文件保留以下结构:
|
|
19
|
+
|
|
20
|
+
- `// SURFACE_MODE: fullscreen`、`overlay` 或 `modal`,按实际面板表现选择。
|
|
21
|
+
- 导入同目录 owner CSS,例如 `import './hud.css'`。
|
|
22
|
+
- 导出 `<Name>Refs` 接口,包含 `root` 及 Logic 使用的交互/数据节点。
|
|
23
|
+
- 唯一的 `export function create<Name>Layout()` 入口,返回 Refs。示例采用零参数入口,便于独立执行;不在模块顶层创建节点。
|
|
24
|
+
- 工厂保留直接导入的标识符,不改名、不包装成命名空间调用。每次调用只传一个对象字面量。
|
|
25
|
+
|
|
26
|
+
来自 `src/ui/hud/` 的 Layout 工厂导入必须是 `from '../DomUiKit'`(不加 `.ts`);更深目录按实际位置调整相对路径。`install` 创建 `src/ui/DomUiKit.ts`,内容为:
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
export * from '../../runtime/ui-editor/1.0.0/dom-ui.mjs';
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
当前发布版 UIEditor_0.0.1 在节点解析之前按 import 来源筛选 Layout,直接导入 `dom-ui.mjs` 会被跳过,导致文件存在且 mock 检查有节点却导入零界面。桥接模块既符合该筛选规则,也让 TypeScript/Vite 实际解析到同一个固定 runtime。检查器验证真实 import AST 指向此桥接模块、桥接转导出内容以及发布版可识别的语法;仅写假注释、加 `.ts` 后缀、指向同名但不同位置的文件均不通过。
|
|
33
|
+
|
|
34
|
+
Logic 不受 Layout 导入筛选约束,可以从 `runtime/ui-editor/1.0.0/dom-ui.mjs` 导入。安装保留并拒绝覆盖有冲突的已有桥接文件。
|
|
35
|
+
|
|
36
|
+
## 五个节点工厂
|
|
37
|
+
|
|
38
|
+
| 工厂 | 返回值 | 专用选项 |
|
|
39
|
+
|---|---|---|
|
|
40
|
+
| `createPanel({ ... })` | `HTMLDivElement` | 通用选项 |
|
|
41
|
+
| `createText({ text: '分数', ... })` | `HTMLDivElement` | `text` |
|
|
42
|
+
| `createImage({ src: '', ... })` | `HTMLDivElement` | `src`、`fit`、`slice` |
|
|
43
|
+
| `createButton({ label: '暂停', ... })` | `HTMLButtonElement` | `label`、`background`、`backgroundFit`、`backgroundSlice`、`icon`、`disabled` |
|
|
44
|
+
| `createScrim({ ... })` | `HTMLDivElement` | 通用选项 |
|
|
45
|
+
|
|
46
|
+
通用选项为 `parent`、`layer`、`rect`、`className`、`interactive`、`hidden`。工厂返回原生 DOM,可以通过 Refs 使用 `textContent`、`disabled`、`addEventListener` 等浏览器 API;这些业务操作放在 Logic。
|
|
47
|
+
|
|
48
|
+
工厂运行时支持的所有参数及类型以安装目录的 `dom-ui.d.mts` 为准。即使某参数在运行时可用,也不代表其任意表达式能被编辑器回写。尤其不要在 Layout 的 `onClick` 参数中绑定业务。
|
|
49
|
+
|
|
50
|
+
图片节点是 `div`,使用 CSS 背景/九宫格方式显示图片,不是 `img`;不要向它写 `.src` 或依赖 `img` 选择器。动态资源更新放在 Logic,并使用与工厂渲染方式一致的 DOM/CSS 属性。文本也不是 `span`、`p`。转换前后应检查 owner CSS 中的标签选择器,必要时给节点增加类并更新 CSS。
|
|
51
|
+
|
|
52
|
+
## 命中
|
|
53
|
+
|
|
54
|
+
工厂节点带 `.ui-node`,默认 `pointer-events: none`,装饰不会挡住画布。子节点继承。看得见却点不到,是漏了打开命中,没有编译报错。
|
|
55
|
+
|
|
56
|
+
- `createButton` / `createScrim` 已加 `.ui-interactive`(`pointer-events: auto`)。
|
|
57
|
+
- Logic 里动态创建的可点节点(列表行、格子、覆盖层上的按钮)用 `createButton`,或 `createPanel({ interactive: true })`,或加上 `ui-interactive`。只 `addEventListener` 不够。
|
|
58
|
+
- 需要挡住下层的遮罩 / 战报层同样要打开命中;否则点击会穿透到下面的面板。
|
|
59
|
+
- 浏览器验证用真实指针点 Logic 动态项。脚本对节点 `dispatchEvent('click')` 绕过命中测试,不能当作可点。
|
|
60
|
+
|
|
61
|
+
## 文件资产
|
|
62
|
+
|
|
63
|
+
`configs/assets.json` 里已有的官方 / AIGC URL 转换后仍要显示在对应节点上。接线规则只在 `${CLAUDE_DIR}/knowledge/AigcWiring.md`。
|
|
64
|
+
|
|
65
|
+
Layout 的 `createImage.src`、按钮 `icon` / `background` 必须是工厂调用内的字符串字面量(检查器要求)。写法:
|
|
66
|
+
|
|
67
|
+
- 该槽 URL 转换时已经确定:字面量写成这条 `https://file.craft.qq.com/...` 或 `/Game/...`。
|
|
68
|
+
- 运行时才知道、或随列表变化:Layout 写 `src: ''`,Logic 在加载完成后设 `backgroundImage`(及与 `fit` 一致的 `backgroundSize`)。`createImage` 是 `div`,设 `.src` 无效。
|
|
69
|
+
|
|
70
|
+
示例 HUD 的 `src: ''` 只表示「结构占位」。有真实 URL 时用上面两条,不要改成内联 SVG / data URI / 几何色块来凑字面量。Phaser Image / Sprite 上的图标改挂 DOM 后,走 `createImage` 或按钮 `icon`。
|
|
71
|
+
|
|
72
|
+
## 可解析与可编辑
|
|
73
|
+
|
|
74
|
+
```ts
|
|
75
|
+
const title = createText({
|
|
76
|
+
parent: root,
|
|
77
|
+
text: '游戏状态',
|
|
78
|
+
className: 'hud-title',
|
|
79
|
+
});
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
`text`、`label`、`className` 必须直接写在工厂对象里,值为字符串字面量。变量、模板字符串、对象展开和参数转发可能在浏览器正常显示,却无法定位回写。因此同结构、不同静态文案的控件应显式展开工厂调用。
|
|
83
|
+
|
|
84
|
+
当前检查器还要求其他工厂选项使用内联字符串、数字、布尔值或字面量对象,图片 `src` 也必须是字符串字面量;`parent` 节点引用和 `layer: UI_LAYER.X` 是专门支持的例外。这是本包可验证的范围,不代表线上编辑器所有能力的上限。
|
|
85
|
+
|
|
86
|
+
Layout 仅建立静态结构:
|
|
87
|
+
|
|
88
|
+
- 子节点通过 `parent: 已创建的父节点` 建树;无 parent 的工厂节点是根。Refs 帮助 Logic 稳定取节点,不用 `querySelector` 反查编辑器可能改名的 class。
|
|
89
|
+
- 不使用 `document.createElement`、`append`、事件绑定、业务单例、异步加载或条件/循环创建静态树。检查器不应执行业务依赖来建立树。
|
|
90
|
+
- 随业务数据变化的列表、运行状态及更新放在 Logic。它们可以继续使用 DOM,但不会因此成为编辑器可视化编辑的静态节点。交付时说明范围,不能把应当可编辑的固定控件移到 Logic 以掩盖检查失败。
|
|
91
|
+
- 颜色、字号、间距等视觉样式放 owner CSS;保留原来样式和交互节点对应关系。因工厂改变元素标签而导致样式丢失,类型检查无法发现。
|
|
92
|
+
|
|
93
|
+
## 挂载、缩放与销毁
|
|
94
|
+
|
|
95
|
+
编辑器依赖工厂布局契约,不要求创建运行时 context。保留原 UI 的布局模型:原本按 CSS 像素定位的面板,可以在 Logic 中把工厂根节点直接挂到原宿主,不要强套设计尺寸的 contain 缩放。
|
|
96
|
+
|
|
97
|
+
直接挂载不会注入 context 的基础样式,因此沿用原有 `hidden` 属性和 owner CSS 显隐规则;`setVisible()` 仅切换 `.ui-hidden` 类,脱离 context 使用时需要配套 CSS。卸载时先清理 Logic 的事件、订阅等,再调用 `destroy(root)` 释放工厂监听并移除节点,不能只调用 `remove()`。
|
|
98
|
+
|
|
99
|
+
`createUiContext(container, { width, height })` 显式创建 UI 容器,`width/height` 是设计尺寸。`ui.mount(refs)` 收集 Refs 中无 parent 的工厂根节点并挂到对应层;子节点保持原有 parent。`UI_LAYER` 提供 `BACKGROUND/HUD/PANEL/SCRIM/MODAL/TOAST` 常量。
|
|
100
|
+
|
|
101
|
+
UI 按设计尺寸 contain 缩放并居中。宿主应是定位容器,通常 `position: relative`;业务通过现有布局机制或 `ResizeObserver` 在尺寸变化时调用 `ui.resize()`。运行时不拥有游戏循环,也不自动观察容器尺寸。
|
|
102
|
+
|
|
103
|
+
使用一个已存在的共享 context 时,只销毁自己的 mount handle;由创建共享 context 的上层负责 `ui.dispose()`。示例面板独占 context,因此会同时清理挂载、观察者和 context。Logic 的事件、订阅、计时器、输入和其他业务资源也须清理,HMR 或重挂载不应留下重复 UI 或事件。
|
|
104
|
+
|
|
105
|
+
需要把 HUD 纳入已有截图链路时,保留 `connectPreview` 的原配置,并按项目 DOM 结构设置其 `uiRoot`。这是独立 UI 运行时与现有平台桥接的显式连接,不要为了适配编辑器改写 `runtime/lightgame/1.0.0/`。
|
|
106
|
+
|
|
107
|
+
## 未接入与已接入
|
|
108
|
+
|
|
109
|
+
未接入编辑器时,屏幕 UI 用原生 DOM 或 Phaser。接入后进编辑器的面板只使用 `runtime/ui-editor/1.0.0` 五工厂(Layout 从 `DomUiKit` 导入),挂到游戏现有宿主上的同一棵树。
|
|
110
|
+
|
|
111
|
+
## 验证和标记
|
|
112
|
+
|
|
113
|
+
| 检查层 | 操作 | 能证明什么 |
|
|
114
|
+
|---|---|---|
|
|
115
|
+
| 导入前置 | `ui-editor.mjs check --project <root>` | 桥接内容、工厂 import 路径与 UIEditor_0.0.1 的来源筛选兼容 |
|
|
116
|
+
| 已知契约 | `ui-editor.mjs check --project <root>` | 文件结构、静态工厂调用、mock 节点树、可编辑字面量的内存回写及再解析符合检查器实现 |
|
|
117
|
+
| 游戏工程 | 项目类型检查、构建 | 实际 TypeScript、导入和构建可通过 |
|
|
118
|
+
| 浏览器行为 | 启动游戏,比较画面、操作并销毁/重建 | 转换后的实际 DOM、CSS、事件和生命周期仍能工作 |
|
|
119
|
+
| 实际编辑器 | 导入、Inspector 修改、保存源码、重载游戏 | 当前线上编辑器能够处理并回写该面板 |
|
|
120
|
+
|
|
121
|
+
导入前置、已知契约、游戏工程和浏览器行为检查通过后才执行 `mark`。实际编辑器验证在平台可访问时执行;暂不可访问则单独列为待验项。不能把浏览器行为替换为 mock,也不能把实际编辑器验证替换为内存字符串改写。
|
|
122
|
+
|
|
123
|
+
浏览器至少覆盖本次变动的可观察行为:
|
|
124
|
+
|
|
125
|
+
1. 初始画面与转换前一致;检查标签变化后的字体、排版、图片和层级。转换前 `configs/assets.json` 已接线的图标 / 背景仍在对应 `createImage` 或按钮 `icon` 上,不是内联 SVG 占位。
|
|
126
|
+
2. 数据更新实际落到 Refs 节点;用真实指针点 Layout 静态按钮和 Logic 动态行/格,只触发一次;遮罩打开时下层点不穿。`dispatchEvent('click')` 不算可点。
|
|
127
|
+
3. 面板隐藏/显示、尺寸变化及必要的滚动正常。
|
|
128
|
+
4. 销毁后节点和监听器消失,重新创建无重复 UI/重复事件;已接平台截图的面板检查 HUD 仍可被截入。
|
|
129
|
+
|
|
130
|
+
实际编辑器验证时,选择一个静态标题或按钮文案,以及一项 owner CSS 样式进行修改。确认保存真正改变对应源码,重新打开编辑器仍能解析,重载游戏呈现新值且原交互继续工作。动态分数被 Logic 更新是正常行为,不用它判断静态文案回写是否成功。
|
|
131
|
+
|
|
132
|
+
`mark` 会再次检查代码,成功后合并 `SPEC/plan/dev-config.json` 的 `ui_editor_compat: true` 和 `ui_editor_adapter: { root: 'runtime/ui-editor/1.0.0' }`,保留其他配置字段,并把 `uieditor` 的版本写入 `version/project_feature_version.json`。版本取自 `version/craft_feature_version.json`,由开发者手动维护;该清单不合法或缺少 `uieditor` 时,`mark` 在写标记前报错,工程没有该清单时跳过版本回写。它不运行浏览器,也不验证远端编辑器;已有标记更不代表后续所有改动都仍兼容。适配后的 Layout 改动需按实际影响重新验证。
|