@fps-games/editor 0.2.1-beta.1 → 0.2.1-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-bridge/capabilities/ui-regions.d.ts.map +1 -1
- package/dist/agent-bridge/capabilities/ui-regions.js +16 -0
- package/dist/agent-bridge/capabilities/ui-regions.js.map +1 -1
- package/dist/build-info.json +43 -43
- package/dist/internal/material-preview.d.ts +22 -0
- package/dist/internal/material-preview.d.ts.map +1 -0
- package/dist/internal/material-preview.js +186 -0
- package/dist/internal/material-preview.js.map +1 -0
- package/dist/internal/project-model-preview.d.ts +4 -0
- package/dist/internal/project-model-preview.d.ts.map +1 -0
- package/dist/internal/project-model-preview.js +359 -0
- package/dist/internal/project-model-preview.js.map +1 -0
- package/dist/local-editor-agent-context.d.ts +12 -1
- package/dist/local-editor-agent-context.d.ts.map +1 -1
- package/dist/local-editor-agent-context.js +47 -0
- package/dist/local-editor-agent-context.js.map +1 -1
- package/dist/local-editor-harness.d.ts +15 -2
- package/dist/local-editor-harness.d.ts.map +1 -1
- package/dist/local-editor-harness.js +310 -21
- package/dist/local-editor-harness.js.map +1 -1
- package/dist/local-editor-tools.d.ts +1 -0
- package/dist/local-editor-tools.d.ts.map +1 -1
- package/dist/local-editor-tools.js +3 -0
- package/dist/local-editor-tools.js.map +1 -1
- package/dist/playable-local-editor-host.d.ts +4 -0
- package/dist/playable-local-editor-host.d.ts.map +1 -1
- package/dist/playable-local-editor-host.js +27 -0
- package/dist/playable-local-editor-host.js.map +1 -1
- package/dist/playable-product-scene-capabilities.d.ts.map +1 -1
- package/dist/playable-product-scene-capabilities.js +9 -3
- package/dist/playable-product-scene-capabilities.js.map +1 -1
- package/dist/playable-standard-project.d.ts.map +1 -1
- package/dist/playable-standard-project.js +5 -2
- package/dist/playable-standard-project.js.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/package.json +7 -7
- package/node_modules/@fps-games/editor-babylon/dist/marker-overlay.js +24 -0
- package/node_modules/@fps-games/editor-babylon/dist/marker-overlay.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts +10 -1
- package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/projection.js +96 -1
- package/node_modules/@fps-games/editor-babylon/dist/projection.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/scene-view-spatial-overlay-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/scene-view-spatial-overlay-controller.js +85 -22
- package/node_modules/@fps-games/editor-babylon/dist/scene-view-spatial-overlay-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.d.ts +2 -0
- package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.js +150 -4
- package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.d.ts +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js +249 -15
- package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/types.d.ts +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/types.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/package.json +6 -6
- package/node_modules/@fps-games/editor-browser/dist/index.d.ts +5 -0
- package/node_modules/@fps-games/editor-browser/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/index.js +3 -0
- package/node_modules/@fps-games/editor-browser/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-browser-continuity.d.ts +35 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-browser-continuity.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-browser-continuity.js +136 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-browser-continuity.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-filesystem.d.ts +46 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-filesystem.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-filesystem.js +283 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-filesystem.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-preview-cleanup-registry.d.ts +12 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-preview-cleanup-registry.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-preview-cleanup-registry.js +67 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-preview-cleanup-registry.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-open.d.ts +6 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-open.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-open.js +9 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-open.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-preview.d.ts +7 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-preview.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-preview.js +20 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-preview.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-project-media-thumbnail-cache.d.ts +9 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-project-media-thumbnail-cache.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-project-media-thumbnail-cache.js +219 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-project-media-thumbnail-cache.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-tool-presentation.d.ts +14 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-tool-presentation.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-tool-presentation.js +42 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-tool-presentation.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-asset-kind.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-asset-kind.js +2 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-asset-kind.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-console.d.ts +27 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-console.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-console.js +288 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-console.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.d.ts +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.js +29 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.d.ts +20 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js +321 -60
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-prefab-stage.d.ts +2 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-prefab-stage.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-prefab-stage.js +4 -2
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-prefab-stage.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts +63 -3
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-workbench.d.ts +9 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-workbench.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-workbench.js +88 -16
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-workbench.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts +2 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js +1463 -356
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-viewport-orientation.d.ts +13 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-viewport-orientation.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-viewport-orientation.js +15 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-viewport-orientation.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/package.json +7 -7
- package/node_modules/@fps-games/editor-core/dist/editor-tools.d.ts +1 -0
- package/node_modules/@fps-games/editor-core/dist/editor-tools.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/editor-tools.js +3 -1
- package/node_modules/@fps-games/editor-core/dist/editor-tools.js.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/viewport-tools.d.ts +11 -2
- package/node_modules/@fps-games/editor-core/dist/viewport-tools.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/viewport-tools.js +12 -1
- package/node_modules/@fps-games/editor-core/dist/viewport-tools.js.map +1 -1
- package/node_modules/@fps-games/editor-core/package.json +6 -6
- package/node_modules/@fps-games/editor-forge-play/package.json +2 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/catalog.d.ts +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/catalog.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/catalog.js +5 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/catalog.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/index.d.ts +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/index.js +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/handler.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/handler.js +15 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/handler.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/routes.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/routes.js +3 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/routes.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/types.d.ts +6 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/types.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/index.d.ts +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/index.js +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-source.d.ts +4 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-source.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-source.js +10 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-source.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/index.d.ts +4 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/index.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/index.js +4 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/index.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/protocol.d.ts +4 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/protocol.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/protocol.js +86 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/protocol.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/support.d.ts +9 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/support.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/support.js +76 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/support.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/types.d.ts +34 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/types.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/types.js +2 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/types.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.d.ts +4 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.js +40 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.d.ts +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.js +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.d.ts +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.js +94 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-file-handle.d.ts +14 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-file-handle.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-file-handle.js +101 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-file-handle.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-files.d.ts +23 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-files.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-files.js +180 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-files.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/package.json +6 -6
- package/node_modules/@fps-games/editor-protocol/dist/agent.d.ts +23 -3
- package/node_modules/@fps-games/editor-protocol/dist/agent.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-protocol/dist/agent.js.map +1 -1
- package/node_modules/@fps-games/editor-protocol/package.json +2 -2
- package/node_modules/@fps-games/editor-tooling/package.json +3 -3
- package/node_modules/@fps-games/editor-ui/dist/editor-ui-theme.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-ui/dist/editor-ui-theme.js +103 -10
- package/node_modules/@fps-games/editor-ui/dist/editor-ui-theme.js.map +1 -1
- package/node_modules/@fps-games/editor-ui/package.json +1 -1
- package/node_modules/@fps-games/playable-assets/package.json +1 -1
- package/node_modules/@fps-games/playable-contracts/package.json +1 -1
- package/node_modules/@fps-games/playable-rendering/package.json +2 -2
- package/node_modules/@fps-games/playable-runtime/package.json +12 -12
- package/node_modules/@fps-games/playable-runtime-data/package.json +4 -4
- package/node_modules/@fps-games/playable-scene/package.json +2 -2
- package/node_modules/@fps-games/plugin-api/package.json +1 -1
- package/node_modules/@fps-games/plugin-assets/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-assets/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-assets/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-assets/package.json +5 -5
- package/node_modules/@fps-games/plugin-hierarchy/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-hierarchy/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-hierarchy/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-hierarchy/package.json +5 -5
- package/node_modules/@fps-games/plugin-host/package.json +2 -2
- package/node_modules/@fps-games/plugin-markers/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-markers/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-markers/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-markers/package.json +5 -5
- package/node_modules/@fps-games/plugin-materials/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-materials/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-materials/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-materials/package.json +5 -5
- package/node_modules/@fps-games/plugin-rendering/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-rendering/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-rendering/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-rendering/package.json +5 -5
- package/node_modules/@fps-games/plugin-scene/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-scene/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-scene/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-scene/package.json +5 -5
- package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-shadow-map-experiment/package.json +5 -5
- package/node_modules/@fps-games/plugin-shadows/dist/version.d.ts +1 -1
- package/node_modules/@fps-games/plugin-shadows/dist/version.js +1 -1
- package/node_modules/@fps-games/plugin-shadows/dist/version.js.map +1 -1
- package/node_modules/@fps-games/plugin-shadows/package.json +7 -7
- package/package.json +22 -22
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { BrowserHost } from '@fps-games/editor-browser';\nimport type {\n EditorRuntimeChange,\n EditorTool,\n MaterialProp,\n MaterialRuntimeKind,\n MaterialValue,\n OutlineProp,\n OutlineValue,\n PersistentBinding,\n RuntimeProp,\n} from '@fps-games/editor-protocol';\n\nexport type RuntimeScene = any;\nexport type RuntimeCamera = any;\nexport type RuntimeNode = any;\n\nexport type BabylonRuntimeGlobal = {\n Scene?: new (engine: any) => RuntimeScene;\n UniversalCamera?: new (name: string, position: any, scene: RuntimeScene) => RuntimeCamera;\n ArcRotateCamera?: new (\n name: string,\n alpha: number,\n beta: number,\n radius: number,\n target: any,\n scene: RuntimeScene,\n ) => RuntimeCamera;\n Camera?: {\n PERSPECTIVE_CAMERA?: number;\n ORTHOGRAPHIC_CAMERA?: number;\n };\n Vector3?: new (x: number, y: number, z: number) => any;\n Matrix?: {\n FromArray: (array: readonly number[]) => any;\n Identity?: () => any;\n };\n Color3?: new (r: number, g: number, b: number) => any;\n Color4?: new (r: number, g: number, b: number, a: number) => any;\n TransformNode?: new (name: string, scene?: RuntimeScene) => any;\n HemisphericLight?: new (name: string, direction: any, scene: RuntimeScene) => any;\n DirectionalLight?: new (name: string, direction: any, scene: RuntimeScene) => any;\n Texture?: new (url: string, scene: RuntimeScene, noMipmap?: boolean, invertY?: boolean) => any;\n MaterialPluginBase?: new (\n material: any,\n name: string,\n priority: number,\n defines?: Record<string, unknown>,\n addToPluginList?: boolean,\n enable?: boolean,\n resolveIncludes?: boolean,\n ) => any;\n GizmoManager?: new (scene: RuntimeScene) => any;\n UtilityLayerRenderer?: any;\n PointerDragBehavior?: any;\n MeshBuilder?: {\n CreateBox?: (name: string, options: Record<string, unknown>, scene: RuntimeScene) => any;\n CreateSphere?: (name: string, options: Record<string, unknown>, scene: RuntimeScene) => any;\n CreatePlane?: (name: string, options: Record<string, unknown>, scene: RuntimeScene) => any;\n CreateGround?: (name: string, options: Record<string, unknown>, scene: RuntimeScene) => any;\n CreateCapsule?: (name: string, options: Record<string, unknown>, scene: RuntimeScene) => any;\n };\n StandardMaterial?: new (name: string, scene: RuntimeScene) => any;\n PBRMaterial?: new (name: string, scene: RuntimeScene) => any;\n DynamicTexture?: new (\n name: string,\n options: { width: number; height: number } | number,\n scene: RuntimeScene,\n generateMipMaps?: boolean,\n ) => any;\n ShaderMaterial?: new (\n name: string,\n scene: RuntimeScene,\n shaderPath: string | Record<string, unknown>,\n options?: Record<string, unknown>,\n ) => any;\n Effect?: {\n ShadersStore?: Record<string, string>;\n };\n Inspector?: any;\n DebugLayerTab?: any;\n InstancedMesh?: any;\n RotationGizmo?: any;\n PlaneRotationGizmo?: any;\n};\n\nexport type EditorGameLike = {\n scene?: RuntimeScene | null;\n pause?: () => void;\n resume?: () => void;\n isPausedState?: () => boolean;\n enterPreview?: () => Promise<void> | void;\n exitPreview?: (save?: boolean) => Promise<void> | void;\n onEditEnter?: () => Promise<void> | void;\n onEditExit?: () => Promise<void> | void;\n};\n\nexport type ViewportNavigationButton = 'left' | 'middle' | 'right';\n\nexport interface EditorInputControllerApi {\n init(options: EditorInputOptions): void;\n dispose(): void;\n isViewportNavigationActive(): boolean;\n activeViewportNavigationButton(): ViewportNavigationButton | null;\n consumeViewportPointerDelta(): { dx: number; dy: number };\n pressedViewportMovementKeys(): Set<string>;\n resetViewportNavigation(): void;\n}\n\nexport interface EditorInputOptions {\n host?: BrowserHost;\n getCanvas: () => HTMLCanvasElement | null;\n isEditActive: () => boolean;\n onSetTool: (tool: EditorTool) => void;\n onFocusSelected: () => void;\n onUndo?: () => void;\n onRedo?: () => void;\n onDuplicateSelected?: () => void | Promise<void>;\n}\n\nexport type RuntimeTransformSnapshot = {\n position: { x: number; y: number; z: number };\n rotation: { x: number; y: number; z: number };\n scaling: { x: number; y: number; z: number };\n};\n\nexport type CanonicalTransformChange = {\n runtimeNode: RuntimeNode;\n binding: PersistentBinding | null;\n prop: RuntimeProp;\n before: RuntimeTransformSnapshot[RuntimeProp];\n after: RuntimeTransformSnapshot[RuntimeProp];\n};\n\nexport type CanonicalMaterialChange = {\n runtimeNode: RuntimeNode;\n binding: PersistentBinding;\n ownerNodePath: string;\n target: 'root' | 'childMaterial';\n materialName: string;\n materialType: string | null;\n materialRuntimeKind: MaterialRuntimeKind;\n path: MaterialProp;\n before: MaterialValue;\n after: MaterialValue;\n};\n\nexport type CanonicalOutlineChange = {\n runtimeNode: RuntimeNode;\n binding: PersistentBinding;\n ownerNodePath: string;\n target: 'root' | 'childOutline';\n shared: boolean;\n path: OutlineProp;\n before: OutlineValue;\n after: OutlineValue;\n};\n\nexport type BabylonRuntimeChange =\n | ({ kind: 'transform' } & CanonicalTransformChange)\n | ({ kind: 'material' } & CanonicalMaterialChange)\n | ({ kind: 'outline' } & CanonicalOutlineChange);\n\nexport type PersistedRuntimeChange = EditorRuntimeChange;\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { BrowserHost } from '@fps-games/editor-browser';\nimport type {\n EditorRuntimeChange,\n EditorTool,\n MaterialProp,\n MaterialRuntimeKind,\n MaterialValue,\n OutlineProp,\n OutlineValue,\n PersistentBinding,\n RuntimeProp,\n} from '@fps-games/editor-protocol';\n\nexport type RuntimeScene = any;\nexport type RuntimeCamera = any;\nexport type RuntimeNode = any;\n\nexport type BabylonRuntimeGlobal = {\n Scene?: new (engine: any) => RuntimeScene;\n UniversalCamera?: new (name: string, position: any, scene: RuntimeScene) => RuntimeCamera;\n ArcRotateCamera?: new (\n name: string,\n alpha: number,\n beta: number,\n radius: number,\n target: any,\n scene: RuntimeScene,\n ) => RuntimeCamera;\n Camera?: {\n PERSPECTIVE_CAMERA?: number;\n ORTHOGRAPHIC_CAMERA?: number;\n };\n Vector3?: new (x: number, y: number, z: number) => any;\n Matrix?: {\n FromArray: (array: readonly number[]) => any;\n Identity?: () => any;\n };\n Color3?: new (r: number, g: number, b: number) => any;\n Color4?: new (r: number, g: number, b: number, a: number) => any;\n TransformNode?: new (name: string, scene?: RuntimeScene) => any;\n HemisphericLight?: new (name: string, direction: any, scene: RuntimeScene) => any;\n DirectionalLight?: new (name: string, direction: any, scene: RuntimeScene) => any;\n Texture?: new (url: string, scene: RuntimeScene, noMipmap?: boolean, invertY?: boolean) => any;\n MaterialPluginBase?: new (\n material: any,\n name: string,\n priority: number,\n defines?: Record<string, unknown>,\n addToPluginList?: boolean,\n enable?: boolean,\n resolveIncludes?: boolean,\n ) => any;\n GizmoManager?: new (\n scene: RuntimeScene,\n thickness?: number,\n utilityLayer?: any,\n keepDepthUtilityLayer?: any,\n ) => any;\n UtilityLayerRenderer?: any;\n PointerDragBehavior?: any;\n MeshBuilder?: {\n CreateBox?: (name: string, options: Record<string, unknown>, scene: RuntimeScene) => any;\n CreateSphere?: (name: string, options: Record<string, unknown>, scene: RuntimeScene) => any;\n CreatePlane?: (name: string, options: Record<string, unknown>, scene: RuntimeScene) => any;\n CreateGround?: (name: string, options: Record<string, unknown>, scene: RuntimeScene) => any;\n CreateCapsule?: (name: string, options: Record<string, unknown>, scene: RuntimeScene) => any;\n };\n StandardMaterial?: new (name: string, scene: RuntimeScene) => any;\n PBRMaterial?: new (name: string, scene: RuntimeScene) => any;\n DynamicTexture?: new (\n name: string,\n options: { width: number; height: number } | number,\n scene: RuntimeScene,\n generateMipMaps?: boolean,\n ) => any;\n ShaderMaterial?: new (\n name: string,\n scene: RuntimeScene,\n shaderPath: string | Record<string, unknown>,\n options?: Record<string, unknown>,\n ) => any;\n Effect?: {\n ShadersStore?: Record<string, string>;\n };\n Inspector?: any;\n DebugLayerTab?: any;\n InstancedMesh?: any;\n RotationGizmo?: any;\n PlaneRotationGizmo?: any;\n};\n\nexport type EditorGameLike = {\n scene?: RuntimeScene | null;\n pause?: () => void;\n resume?: () => void;\n isPausedState?: () => boolean;\n enterPreview?: () => Promise<void> | void;\n exitPreview?: (save?: boolean) => Promise<void> | void;\n onEditEnter?: () => Promise<void> | void;\n onEditExit?: () => Promise<void> | void;\n};\n\nexport type ViewportNavigationButton = 'left' | 'middle' | 'right';\n\nexport interface EditorInputControllerApi {\n init(options: EditorInputOptions): void;\n dispose(): void;\n isViewportNavigationActive(): boolean;\n activeViewportNavigationButton(): ViewportNavigationButton | null;\n consumeViewportPointerDelta(): { dx: number; dy: number };\n pressedViewportMovementKeys(): Set<string>;\n resetViewportNavigation(): void;\n}\n\nexport interface EditorInputOptions {\n host?: BrowserHost;\n getCanvas: () => HTMLCanvasElement | null;\n isEditActive: () => boolean;\n onSetTool: (tool: EditorTool) => void;\n onFocusSelected: () => void;\n onUndo?: () => void;\n onRedo?: () => void;\n onDuplicateSelected?: () => void | Promise<void>;\n}\n\nexport type RuntimeTransformSnapshot = {\n position: { x: number; y: number; z: number };\n rotation: { x: number; y: number; z: number };\n scaling: { x: number; y: number; z: number };\n};\n\nexport type CanonicalTransformChange = {\n runtimeNode: RuntimeNode;\n binding: PersistentBinding | null;\n prop: RuntimeProp;\n before: RuntimeTransformSnapshot[RuntimeProp];\n after: RuntimeTransformSnapshot[RuntimeProp];\n};\n\nexport type CanonicalMaterialChange = {\n runtimeNode: RuntimeNode;\n binding: PersistentBinding;\n ownerNodePath: string;\n target: 'root' | 'childMaterial';\n materialName: string;\n materialType: string | null;\n materialRuntimeKind: MaterialRuntimeKind;\n path: MaterialProp;\n before: MaterialValue;\n after: MaterialValue;\n};\n\nexport type CanonicalOutlineChange = {\n runtimeNode: RuntimeNode;\n binding: PersistentBinding;\n ownerNodePath: string;\n target: 'root' | 'childOutline';\n shared: boolean;\n path: OutlineProp;\n before: OutlineValue;\n after: OutlineValue;\n};\n\nexport type BabylonRuntimeChange =\n | ({ kind: 'transform' } & CanonicalTransformChange)\n | ({ kind: 'material' } & CanonicalMaterialChange)\n | ({ kind: 'outline' } & CanonicalOutlineChange);\n\nexport type PersistedRuntimeChange = EditorRuntimeChange;\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fps-games/editor-babylon",
|
|
3
|
-
"version": "0.2.1-beta.
|
|
3
|
+
"version": "0.2.1-beta.2",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "BabylonJS runtime integrations for fps-game-editor.",
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@fps-games/babylon-renderer": "0.2.1-beta.
|
|
18
|
-
"@fps-games/editor-browser": "0.2.1-beta.
|
|
19
|
-
"@fps-games/editor-core": "0.2.1-beta.
|
|
20
|
-
"@fps-games/editor-protocol": "0.2.1-beta.
|
|
21
|
-
"@fps-games/playable-contracts": "0.2.1-beta.
|
|
17
|
+
"@fps-games/babylon-renderer": "0.2.1-beta.2",
|
|
18
|
+
"@fps-games/editor-browser": "0.2.1-beta.2",
|
|
19
|
+
"@fps-games/editor-core": "0.2.1-beta.2",
|
|
20
|
+
"@fps-games/editor-protocol": "0.2.1-beta.2",
|
|
21
|
+
"@fps-games/playable-contracts": "0.2.1-beta.2"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** Browser host adapter for editor runtimes running inside a project page. */
|
|
2
2
|
export * from './local-editor-ui';
|
|
3
|
+
export * from './local-editor-project-file-preview';
|
|
3
4
|
export type { LocalEditorBrowserAgentBridgeStatus, LocalEditorBrowserAgentBridgeStatusKind, LocalEditorBrowserPerformanceMeshCategoryCounts, LocalEditorBrowserPerformanceMeshClassCounts, LocalEditorBrowserPerformanceProjectionRoleCounts, LocalEditorBrowserPerformanceStats, LocalEditorBrowserPluginPanelDiagnostic, LocalEditorBrowserPluginPanelItem, LocalEditorBrowserPluginPanelState, LocalEditorBrowserPluginLifecycleState, LocalEditorBrowserInspectorActionInput, LocalEditorBrowserPrefabStageImportStats, LocalEditorBrowserPrefabStageState, LocalEditorBrowserPrefabStageStructureItem, LocalEditorBrowserPrefabStageStructureItemKind, LocalEditorBrowserPreviewCommandSurface, LocalEditorBrowserPreviewScope, LocalEditorBrowserPreviewScopeKind, LocalEditorBrowserPreviewTarget, LocalEditorBrowserUi, LocalEditorBrowserUiPreviewState, LocalEditorBrowserMarkerRelationActionInput, LocalEditorBrowserMarkerRelationEndpointItem, LocalEditorBrowserMarkerRelationEndpointInput, LocalEditorBrowserMarkerRelationItem, LocalEditorBrowserMarkerRelationPickState, LocalEditorBrowserMarkerRelationTypeItem, } from './local-editor-ui-types';
|
|
4
5
|
export * from './runtime-debug';
|
|
5
6
|
export { registerLocalEditorBrowserInspectorControl, resolveLocalEditorBrowserInspectorControls, } from './plugin-contributions';
|
|
@@ -7,6 +8,10 @@ export { toTransformOperationPolicyStatusLabel, } from './local-editor-ui-shared
|
|
|
7
8
|
export { createLocalEditorModalDialog, } from './local-editor-ui-modal-dialog';
|
|
8
9
|
export type { LocalEditorModalDialogController, LocalEditorModalDialogInput, LocalEditorModalDialogOptions, LocalEditorModalDialogTone, } from './local-editor-ui-modal-dialog';
|
|
9
10
|
export { resolveLocalEditorAssetBrowserTab, resolveLocalEditorBrowserAssetKind, } from './local-editor-ui-asset-kind';
|
|
11
|
+
export { createLocalEditorAssetFilesystemSnapshot, filterLocalEditorAssetFilesystemEntries, filterLocalEditorAssetFilesystemAssets, resolveLocalEditorAssetFilesystemBreadcrumbs, resolveLocalEditorAssetFilesystemEntryTab, resolveLocalEditorAssetFilesystemFolderPath, resolveLocalEditorAssetFilesystemParentPath, resolveLocalEditorAssetFilesystemVisibleFolders, resolveLocalEditorProjectMediaThumbnailCacheKey, resolveLocalEditorProjectMediaThumbnailKind, } from './local-editor-asset-filesystem';
|
|
12
|
+
export { LOCAL_EDITOR_COORDINATE_AXIS_DIRECTIONS, resolveLocalEditorCoordinateAxisActiveDirection, resolveLocalEditorCoordinateAxisDirection, } from './local-editor-viewport-orientation';
|
|
13
|
+
export type { LocalEditorCoordinateAxisDirection, LocalEditorCoordinateAxisDirectionId, } from './local-editor-viewport-orientation';
|
|
14
|
+
export type { LocalEditorAssetFilesystemFolder, LocalEditorAssetFilesystemBreadcrumb, LocalEditorAssetFilesystemEntry, LocalEditorAssetFilesystemSnapshot, LocalEditorAssetFilesystemViewMode, LocalEditorProjectMediaThumbnailKind, } from './local-editor-asset-filesystem';
|
|
10
15
|
export { createLocalEditorPrefabStageTitle, findLocalEditorPrefabStageStructureItem, flattenLocalEditorPrefabStageStructureItems, resolveLocalEditorPreviewToolSupport, resolveLocalEditorRightDockVisibility, resolveLocalEditorPrefabStageWorkbenchLayout, shouldLocalEditorClosePerformanceMonitor, type LocalEditorPreviewControlKey, type LocalEditorPreviewToolSupport, type LocalEditorPreviewToolSupportState, } from './local-editor-ui-prefab-stage';
|
|
11
16
|
export { isHierarchyMenuAuthorityCurrent, isHierarchyCompositionSessionCurrent, isHierarchyRenderedAuthorityCurrent, resolveHierarchyTransportDragIds, sameHierarchyIdSet, shouldDeferHierarchyDomRender, shouldCommitHierarchyRenameAfterCompositionEnd, type HierarchyCompositionSession, type HierarchyRenderedAuthority, } from './local-editor-ui-hierarchy-controller';
|
|
12
17
|
export { formatLocalEditorStatusDiagnostic, formatLocalEditorStatusDiagnosticDetails, } from './local-editor-ui-status-format';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAE9E,cAAc,mBAAmB,CAAC;AAClC,YAAY,EACV,mCAAmC,EACnC,uCAAuC,EACvC,+CAA+C,EAC/C,4CAA4C,EAC5C,iDAAiD,EACjD,kCAAkC,EAClC,uCAAuC,EACvC,iCAAiC,EACjC,kCAAkC,EAClC,sCAAsC,EACtC,sCAAsC,EACtC,wCAAwC,EACxC,kCAAkC,EAClC,0CAA0C,EAC1C,8CAA8C,EAC9C,uCAAuC,EACvC,8BAA8B,EAC9B,kCAAkC,EAClC,+BAA+B,EAC/B,oBAAoB,EACpB,gCAAgC,EAChC,2CAA2C,EAC3C,4CAA4C,EAC5C,6CAA6C,EAC7C,oCAAoC,EACpC,yCAAyC,EACzC,wCAAwC,GACzC,MAAM,yBAAyB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,OAAO,EACL,0CAA0C,EAC1C,0CAA0C,GAC3C,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,qCAAqC,GACtC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,4BAA4B,GAC7B,MAAM,gCAAgC,CAAC;AACxC,YAAY,EACV,gCAAgC,EAChC,2BAA2B,EAC3B,6BAA6B,EAC7B,0BAA0B,GAC3B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,iCAAiC,EACjC,kCAAkC,GACnC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,iCAAiC,EACjC,uCAAuC,EACvC,2CAA2C,EAC3C,oCAAoC,EACpC,qCAAqC,EACrC,4CAA4C,EAC5C,wCAAwC,EACxC,KAAK,4BAA4B,EACjC,KAAK,6BAA6B,EAClC,KAAK,kCAAkC,GACxC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,+BAA+B,EAC/B,oCAAoC,EACpC,mCAAmC,E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GAC1C,MAAM,IAAI,CAAC;IACd,gBAAgB,CAAC,CAAC,SAAS,MAAM,gBAAgB,EAC/C,IAAI,EAAE,CAAC,EACP,QAAQ,EAAE,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,KAAK,IAAI,EAC9C,OAAO,CAAC,EAAE,OAAO,GAAG,uBAAuB,GAC1C,MAAM,IAAI,CAAC;IACd,qBAAqB,CAAC,QAAQ,EAAE,oBAAoB,GAAG,MAAM,CAAC;IAC9D,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3C,UAAU,CAAC,QAAQ,EAAE,MAAM,IAAI,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5D,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC;AAaD,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAMnD;AAED,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,QAAQ,EACb,MAAM,CAAC,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI,GACzC,iBAAiB,GAAG,IAAI,CAI1B;AAED,wBAAgB,iBAAiB,CAAC,OAAO,GAAE,kBAAuB,GAAG,WAAW,CA2B/E"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
/** Browser host adapter for editor runtimes running inside a project page. */
|
|
2
2
|
export * from './local-editor-ui.js';
|
|
3
|
+
export * from './local-editor-project-file-preview.js';
|
|
3
4
|
export * from './runtime-debug.js';
|
|
4
5
|
export { registerLocalEditorBrowserInspectorControl, resolveLocalEditorBrowserInspectorControls, } from './plugin-contributions.js';
|
|
5
6
|
export { toTransformOperationPolicyStatusLabel, } from './local-editor-ui-shared.js';
|
|
6
7
|
export { createLocalEditorModalDialog, } from './local-editor-ui-modal-dialog.js';
|
|
7
8
|
export { resolveLocalEditorAssetBrowserTab, resolveLocalEditorBrowserAssetKind, } from './local-editor-ui-asset-kind.js';
|
|
9
|
+
export { createLocalEditorAssetFilesystemSnapshot, filterLocalEditorAssetFilesystemEntries, filterLocalEditorAssetFilesystemAssets, resolveLocalEditorAssetFilesystemBreadcrumbs, resolveLocalEditorAssetFilesystemEntryTab, resolveLocalEditorAssetFilesystemFolderPath, resolveLocalEditorAssetFilesystemParentPath, resolveLocalEditorAssetFilesystemVisibleFolders, resolveLocalEditorProjectMediaThumbnailCacheKey, resolveLocalEditorProjectMediaThumbnailKind, } from './local-editor-asset-filesystem.js';
|
|
10
|
+
export { LOCAL_EDITOR_COORDINATE_AXIS_DIRECTIONS, resolveLocalEditorCoordinateAxisActiveDirection, resolveLocalEditorCoordinateAxisDirection, } from './local-editor-viewport-orientation.js';
|
|
8
11
|
export { createLocalEditorPrefabStageTitle, findLocalEditorPrefabStageStructureItem, flattenLocalEditorPrefabStageStructureItems, resolveLocalEditorPreviewToolSupport, resolveLocalEditorRightDockVisibility, resolveLocalEditorPrefabStageWorkbenchLayout, shouldLocalEditorClosePerformanceMonitor, } from './local-editor-ui-prefab-stage.js';
|
|
9
12
|
export { isHierarchyMenuAuthorityCurrent, isHierarchyCompositionSessionCurrent, isHierarchyRenderedAuthorityCurrent, resolveHierarchyTransportDragIds, sameHierarchyIdSet, shouldDeferHierarchyDomRender, shouldCommitHierarchyRenameAfterCompositionEnd, } from './local-editor-ui-hierarchy-controller.js';
|
|
10
13
|
export { formatLocalEditorStatusDiagnostic, formatLocalEditorStatusDiagnosticDetails, } from './local-editor-ui-status-format.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAE9E,cAAc,mBAAmB,CAAC;AA8BlC,cAAc,iBAAiB,CAAC;AAChC,OAAO,EACL,0CAA0C,EAC1C,0CAA0C,GAC3C,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,qCAAqC,GACtC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,4BAA4B,GAC7B,MAAM,g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AAgB,CAAC,IAAI,EAAE,QAAyB,EAAE,YAAY,CAAC,CAAC;YACpE,OAAO,GAAG,EAAE,CAAC,GAAG,CAAC,mBAAmB,CAAC,IAAI,EAAE,QAAyB,EAAE,YAAY,CAAC,CAAC;QACtF,CAAC;QACD,qBAAqB,EAAE,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC,qBAAqB,CAAC,QAAQ,CAAC;QACtE,oBAAoB,EAAE,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,oBAAoB,CAAC,MAAM,CAAC;QAChE,UAAU,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,QAAQ,EAAE,SAAS,CAAC;QACxE,YAAY,EAAE,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC;KACjD,CAAC;AACJ,CAAC","sourcesContent":["/** Browser host adapter for editor runtimes running inside a project page. */\n\nexport * from './local-editor-ui';\nexport type {\n LocalEditorBrowserAgentBridgeStatus,\n LocalEditorBrowserAgentBridgeStatusKind,\n LocalEditorBrowserPerformanceMeshCategoryCounts,\n LocalEditorBrowserPerformanceMeshClassCounts,\n LocalEditorBrowserPerformanceProjectionRoleCounts,\n LocalEditorBrowserPerformanceStats,\n LocalEditorBrowserPluginPanelDiagnostic,\n LocalEditorBrowserPluginPanelItem,\n LocalEditorBrowserPluginPanelState,\n LocalEditorBrowserPluginLifecycleState,\n LocalEditorBrowserInspectorActionInput,\n LocalEditorBrowserPrefabStageImportStats,\n LocalEditorBrowserPrefabStageState,\n LocalEditorBrowserPrefabStageStructureItem,\n LocalEditorBrowserPrefabStageStructureItemKind,\n LocalEditorBrowserPreviewCommandSurface,\n LocalEditorBrowserPreviewScope,\n LocalEditorBrowserPreviewScopeKind,\n LocalEditorBrowserPreviewTarget,\n LocalEditorBrowserUi,\n LocalEditorBrowserUiPreviewState,\n LocalEditorBrowserMarkerRelationActionInput,\n LocalEditorBrowserMarkerRelationEndpointItem,\n LocalEditorBrowserMarkerRelationEndpointInput,\n LocalEditorBrowserMarkerRelationItem,\n LocalEditorBrowserMarkerRelationPickState,\n LocalEditorBrowserMarkerRelationTypeItem,\n} from './local-editor-ui-types';\nexport * from './runtime-debug';\nexport {\n registerLocalEditorBrowserInspectorControl,\n resolveLocalEditorBrowserInspectorControls,\n} from './plugin-contributions';\nexport {\n toTransformOperationPolicyStatusLabel,\n} from './local-editor-ui-shared';\nexport {\n createLocalEditorModalDialog,\n} from './local-editor-ui-modal-dialog';\nexport type {\n LocalEditorModalDialogController,\n LocalEditorModalDialogInput,\n LocalEditorModalDialogOptions,\n LocalEditorModalDialogTone,\n} from './local-editor-ui-modal-dialog';\nexport {\n resolveLocalEditorAssetBrowserTab,\n resolveLocalEditorBrowserAssetKind,\n} from './local-editor-ui-asset-kind';\nexport {\n createLocalEditorPrefabStageTitle,\n findLocalEditorPrefabStageStructureItem,\n flattenLocalEditorPrefabStageStructureItems,\n resolveLocalEditorPreviewToolSupport,\n resolveLocalEditorRightDockVisibility,\n resolveLocalEditorPrefabStageWorkbenchLayout,\n shouldLocalEditorClosePerformanceMonitor,\n type LocalEditorPreviewControlKey,\n type LocalEditorPreviewToolSupport,\n type LocalEditorPreviewToolSupportState,\n} from './local-editor-ui-prefab-stage';\nexport {\n isHierarchyMenuAuthorityCurrent,\n isHierarchyCompositionSessionCurrent,\n isHierarchyRenderedAuthorityCurrent,\n resolveHierarchyTransportDragIds,\n sameHierarchyIdSet,\n shouldDeferHierarchyDomRender,\n shouldCommitHierarchyRenameAfterCompositionEnd,\n type HierarchyCompositionSession,\n type HierarchyRenderedAuthority,\n} from './local-editor-ui-hierarchy-controller';\nexport {\n formatLocalEditorStatusDiagnostic,\n formatLocalEditorStatusDiagnosticDetails,\n} from './local-editor-ui-status-format';\nexport {\n createLocalEditorStatusCenterViewModel,\n resolveLocalEditorStatusDiagnosticLocatePlan,\n resolveLocalEditorStatusDiagnosticLocator,\n settleLocalEditorStatusDiagnosticRequest,\n resolveLocalEditorStatusDiagnostics,\n resolveLocalEditorStatusDiagnosticSeverity,\n shouldCloseLocalEditorStatusCenter,\n type LocalEditorStatusCenterViewModel,\n type LocalEditorStatusDiagnosticLocatePlan,\n type LocalEditorStatusDiagnosticRequestToken,\n} from './local-editor-ui-status-diagnostics';\nexport type {\n LocalEditorBrowserStatusDiagnostic,\n LocalEditorBrowserStatusDiagnosticPhase,\n LocalEditorBrowserStatusDiagnosticSeverity,\n} from './local-editor-ui-types';\nexport type {\n LocalEditorBrowserResolvedAssetKind,\n} from './local-editor-ui-asset-kind';\nexport {\n resolveLocalEditorHierarchyDragOperation,\n resolveLocalEditorHierarchyDropSlot,\n type LocalEditorHierarchyDragLayout,\n type LocalEditorHierarchyDragLayoutRow,\n type LocalEditorHierarchyDragOperation,\n type LocalEditorHierarchyDropPreview,\n type LocalEditorHierarchyDropSlot,\n type LocalEditorHierarchyDropSlotKind,\n} from './local-editor-ui-hierarchy-drag-policy';\nexport {\n resolveLocalEditorHierarchyAutoScroll,\n type LocalEditorHierarchyAutoScrollInput,\n type LocalEditorHierarchyAutoScrollResolution,\n} from './local-editor-ui-hierarchy-auto-scroll';\nexport {\n normalizeLocalEditorWorkbenchLayout,\n normalizeLocalEditorWorkbenchUserLayout,\n resolveLocalEditorWorkbenchDockDisplay,\n resolveLocalEditorWorkbenchVisibility,\n} from './local-editor-ui-workbench';\nexport type {\n LocalEditorWorkbenchDockDisplay,\n LocalEditorWorkbenchLayoutControllerOptions,\n LocalEditorWorkbenchLayoutState,\n LocalEditorWorkbenchOverlayState,\n LocalEditorWorkbenchVisibility,\n LocalEditorWorkbenchViewport,\n} from './local-editor-ui-workbench';\n\nexport type BrowserEventTargetLike = Pick<EventTarget, 'addEventListener' | 'removeEventListener'>;\n\nexport interface BrowserHostOptions {\n window?: Window;\n document?: Document;\n canvas?: HTMLCanvasElement | string | null;\n}\n\nexport interface BrowserHost {\n window: Window;\n document: Document;\n canvas: HTMLCanvasElement | null;\n isIframe: boolean;\n searchParams: URLSearchParams;\n hasFocus(): boolean;\n getActiveElement(): Element | null;\n resolveCanvas(canvas?: HTMLCanvasElement | string | null): HTMLCanvasElement | null;\n addWindowEvent<K extends keyof WindowEventMap>(\n type: K,\n listener: (event: WindowEventMap[K]) => void,\n options?: boolean | AddEventListenerOptions,\n ): () => void;\n addDocumentEvent<K extends keyof DocumentEventMap>(\n type: K,\n listener: (event: DocumentEventMap[K]) => void,\n options?: boolean | AddEventListenerOptions,\n ): () => void;\n requestAnimationFrame(callback: FrameRequestCallback): number;\n cancelAnimationFrame(handle: number): void;\n setTimeout(callback: () => void, timeoutMs: number): number;\n clearTimeout(handle: number): void;\n}\n\nfunction getDefaultWindow(): Window {\n if (typeof window === 'undefined') {\n throw new Error('createBrowserHost requires a browser Window. Pass options.window in non-browser environments.');\n }\n return window;\n}\n\nfunction resolveDocument(win: Window, doc?: Document): Document {\n return doc ?? win.document;\n}\n\nexport function isIframeWindow(win: Window): boolean {\n try {\n return win.self !== win.top;\n } catch {\n return true;\n }\n}\n\nexport function resolveCanvasElement(\n doc: Document,\n canvas?: HTMLCanvasElement | string | null,\n): HTMLCanvasElement | null {\n if (!canvas) return null;\n if (typeof canvas !== 'string') return canvas;\n return doc.getElementById(canvas) as HTMLCanvasElement | null;\n}\n\nexport function createBrowserHost(options: BrowserHostOptions = {}): BrowserHost {\n const win = options.window ?? getDefaultWindow();\n const doc = resolveDocument(win, options.document);\n const resolveCanvas = (canvas = options.canvas ?? null) => resolveCanvasElement(doc, canvas);\n\n return {\n window: win,\n document: doc,\n canvas: resolveCanvas(),\n isIframe: isIframeWindow(win),\n searchParams: new URLSearchParams(win.location?.search ?? ''),\n hasFocus: () => doc.hasFocus(),\n getActiveElement: () => doc.activeElement,\n resolveCanvas,\n addWindowEvent(type, listener, eventOptions) {\n win.addEventListener(type, listener as EventListener, eventOptions);\n return () => win.removeEventListener(type, listener as EventListener, eventOptions);\n },\n addDocumentEvent(type, listener, eventOptions) {\n doc.addEventListener(type, listener as EventListener, eventOptions);\n return () => doc.removeEventListener(type, listener as EventListener, eventOptions);\n },\n requestAnimationFrame: callback => win.requestAnimationFrame(callback),\n cancelAnimationFrame: handle => win.cancelAnimationFrame(handle),\n setTimeout: (callback, timeoutMs) => win.setTimeout(callback, timeoutMs),\n clearTimeout: handle => win.clearTimeout(handle),\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAE9E,cAAc,mBAAmB,CAAC;AAClC,cAAc,qCAAqC,CAAC;AA8BpD,cAAc,iBAAiB,CAAC;AAChC,OAAO,EACL,0CAA0C,EAC1C,0CAA0C,GAC3C,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,qCAAqC,GACtC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,4BAA4B,GAC7B,MAAM,gCAAgC,CAAC;AAOxC,OAAO,EACL,iCAAiC,EACjC,kCAAkC,GACnC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,wCAAwC,EACxC,uCAAuC,EACvC,sCAAsC,EACtC,4CAA4C,EAC5C,yCAAyC,EACzC,2CAA2C,EAC3C,2CAA2C,EAC3C,+CAA+C,EAC/C,+CAA+C,EAC/C,2CAA2C,GAC5C,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,uCAAuC,EACvC,+CAA+C,EAC/C,yCAAyC,GAC1C,MAAM,qCAAqC,CAAC;AAa7C,OAAO,EACL,iCAAiC,EACjC,uCAAuC,EACvC,2CAA2C,EAC3C,oCAAoC,EACpC,qCAAqC,EACrC,4CAA4C,EAC5C,wCAAwC,GAIzC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,+BAA+B,EAC/B,oCAAoC,EACpC,mCAAmC,EACnC,gCAAgC,EAChC,kBAAkB,EAClB,6BAA6B,EAC7B,8CAA8C,GAG/C,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,iCAAiC,EACjC,wCAAwC,GAC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,UAAU,CAAC,QAAQ,EAAE,SAAS,CAAC;QACxE,YAAY,EAAE,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC;KACjD,CAAC;AACJ,CAAC","sourcesContent":["/** Browser host adapter for editor runtimes running inside a project page. */\n\nexport * from './local-editor-ui';\nexport * from './local-editor-project-file-preview';\nexport type {\n LocalEditorBrowserAgentBridgeStatus,\n LocalEditorBrowserAgentBridgeStatusKind,\n LocalEditorBrowserPerformanceMeshCategoryCounts,\n LocalEditorBrowserPerformanceMeshClassCounts,\n LocalEditorBrowserPerformanceProjectionRoleCounts,\n LocalEditorBrowserPerformanceStats,\n LocalEditorBrowserPluginPanelDiagnostic,\n LocalEditorBrowserPluginPanelItem,\n LocalEditorBrowserPluginPanelState,\n LocalEditorBrowserPluginLifecycleState,\n LocalEditorBrowserInspectorActionInput,\n LocalEditorBrowserPrefabStageImportStats,\n LocalEditorBrowserPrefabStageState,\n LocalEditorBrowserPrefabStageStructureItem,\n LocalEditorBrowserPrefabStageStructureItemKind,\n LocalEditorBrowserPreviewCommandSurface,\n LocalEditorBrowserPreviewScope,\n LocalEditorBrowserPreviewScopeKind,\n LocalEditorBrowserPreviewTarget,\n LocalEditorBrowserUi,\n LocalEditorBrowserUiPreviewState,\n LocalEditorBrowserMarkerRelationActionInput,\n LocalEditorBrowserMarkerRelationEndpointItem,\n LocalEditorBrowserMarkerRelationEndpointInput,\n LocalEditorBrowserMarkerRelationItem,\n LocalEditorBrowserMarkerRelationPickState,\n LocalEditorBrowserMarkerRelationTypeItem,\n} from './local-editor-ui-types';\nexport * from './runtime-debug';\nexport {\n registerLocalEditorBrowserInspectorControl,\n resolveLocalEditorBrowserInspectorControls,\n} from './plugin-contributions';\nexport {\n toTransformOperationPolicyStatusLabel,\n} from './local-editor-ui-shared';\nexport {\n createLocalEditorModalDialog,\n} from './local-editor-ui-modal-dialog';\nexport type {\n LocalEditorModalDialogController,\n LocalEditorModalDialogInput,\n LocalEditorModalDialogOptions,\n LocalEditorModalDialogTone,\n} from './local-editor-ui-modal-dialog';\nexport {\n resolveLocalEditorAssetBrowserTab,\n resolveLocalEditorBrowserAssetKind,\n} from './local-editor-ui-asset-kind';\nexport {\n createLocalEditorAssetFilesystemSnapshot,\n filterLocalEditorAssetFilesystemEntries,\n filterLocalEditorAssetFilesystemAssets,\n resolveLocalEditorAssetFilesystemBreadcrumbs,\n resolveLocalEditorAssetFilesystemEntryTab,\n resolveLocalEditorAssetFilesystemFolderPath,\n resolveLocalEditorAssetFilesystemParentPath,\n resolveLocalEditorAssetFilesystemVisibleFolders,\n resolveLocalEditorProjectMediaThumbnailCacheKey,\n resolveLocalEditorProjectMediaThumbnailKind,\n} from './local-editor-asset-filesystem';\nexport {\n LOCAL_EDITOR_COORDINATE_AXIS_DIRECTIONS,\n resolveLocalEditorCoordinateAxisActiveDirection,\n resolveLocalEditorCoordinateAxisDirection,\n} from './local-editor-viewport-orientation';\nexport type {\n LocalEditorCoordinateAxisDirection,\n LocalEditorCoordinateAxisDirectionId,\n} from './local-editor-viewport-orientation';\nexport type {\n LocalEditorAssetFilesystemFolder,\n LocalEditorAssetFilesystemBreadcrumb,\n LocalEditorAssetFilesystemEntry,\n LocalEditorAssetFilesystemSnapshot,\n LocalEditorAssetFilesystemViewMode,\n LocalEditorProjectMediaThumbnailKind,\n} from './local-editor-asset-filesystem';\nexport {\n createLocalEditorPrefabStageTitle,\n findLocalEditorPrefabStageStructureItem,\n flattenLocalEditorPrefabStageStructureItems,\n resolveLocalEditorPreviewToolSupport,\n resolveLocalEditorRightDockVisibility,\n resolveLocalEditorPrefabStageWorkbenchLayout,\n shouldLocalEditorClosePerformanceMonitor,\n type LocalEditorPreviewControlKey,\n type LocalEditorPreviewToolSupport,\n type LocalEditorPreviewToolSupportState,\n} from './local-editor-ui-prefab-stage';\nexport {\n isHierarchyMenuAuthorityCurrent,\n isHierarchyCompositionSessionCurrent,\n isHierarchyRenderedAuthorityCurrent,\n resolveHierarchyTransportDragIds,\n sameHierarchyIdSet,\n shouldDeferHierarchyDomRender,\n shouldCommitHierarchyRenameAfterCompositionEnd,\n type HierarchyCompositionSession,\n type HierarchyRenderedAuthority,\n} from './local-editor-ui-hierarchy-controller';\nexport {\n formatLocalEditorStatusDiagnostic,\n formatLocalEditorStatusDiagnosticDetails,\n} from './local-editor-ui-status-format';\nexport {\n createLocalEditorStatusCenterViewModel,\n resolveLocalEditorStatusDiagnosticLocatePlan,\n resolveLocalEditorStatusDiagnosticLocator,\n settleLocalEditorStatusDiagnosticRequest,\n resolveLocalEditorStatusDiagnostics,\n resolveLocalEditorStatusDiagnosticSeverity,\n shouldCloseLocalEditorStatusCenter,\n type LocalEditorStatusCenterViewModel,\n type LocalEditorStatusDiagnosticLocatePlan,\n type LocalEditorStatusDiagnosticRequestToken,\n} from './local-editor-ui-status-diagnostics';\nexport type {\n LocalEditorBrowserStatusDiagnostic,\n LocalEditorBrowserStatusDiagnosticPhase,\n LocalEditorBrowserStatusDiagnosticSeverity,\n} from './local-editor-ui-types';\nexport type {\n LocalEditorBrowserResolvedAssetKind,\n} from './local-editor-ui-asset-kind';\nexport {\n resolveLocalEditorHierarchyDragOperation,\n resolveLocalEditorHierarchyDropSlot,\n type LocalEditorHierarchyDragLayout,\n type LocalEditorHierarchyDragLayoutRow,\n type LocalEditorHierarchyDragOperation,\n type LocalEditorHierarchyDropPreview,\n type LocalEditorHierarchyDropSlot,\n type LocalEditorHierarchyDropSlotKind,\n} from './local-editor-ui-hierarchy-drag-policy';\nexport {\n resolveLocalEditorHierarchyAutoScroll,\n type LocalEditorHierarchyAutoScrollInput,\n type LocalEditorHierarchyAutoScrollResolution,\n} from './local-editor-ui-hierarchy-auto-scroll';\nexport {\n normalizeLocalEditorWorkbenchLayout,\n normalizeLocalEditorWorkbenchUserLayout,\n resolveLocalEditorWorkbenchDockDisplay,\n resolveLocalEditorWorkbenchVisibility,\n} from './local-editor-ui-workbench';\nexport type {\n LocalEditorWorkbenchDockDisplay,\n LocalEditorWorkbenchLayoutControllerOptions,\n LocalEditorWorkbenchLayoutState,\n LocalEditorWorkbenchOverlayState,\n LocalEditorWorkbenchVisibility,\n LocalEditorWorkbenchViewport,\n} from './local-editor-ui-workbench';\n\nexport type BrowserEventTargetLike = Pick<EventTarget, 'addEventListener' | 'removeEventListener'>;\n\nexport interface BrowserHostOptions {\n window?: Window;\n document?: Document;\n canvas?: HTMLCanvasElement | string | null;\n}\n\nexport interface BrowserHost {\n window: Window;\n document: Document;\n canvas: HTMLCanvasElement | null;\n isIframe: boolean;\n searchParams: URLSearchParams;\n hasFocus(): boolean;\n getActiveElement(): Element | null;\n resolveCanvas(canvas?: HTMLCanvasElement | string | null): HTMLCanvasElement | null;\n addWindowEvent<K extends keyof WindowEventMap>(\n type: K,\n listener: (event: WindowEventMap[K]) => void,\n options?: boolean | AddEventListenerOptions,\n ): () => void;\n addDocumentEvent<K extends keyof DocumentEventMap>(\n type: K,\n listener: (event: DocumentEventMap[K]) => void,\n options?: boolean | AddEventListenerOptions,\n ): () => void;\n requestAnimationFrame(callback: FrameRequestCallback): number;\n cancelAnimationFrame(handle: number): void;\n setTimeout(callback: () => void, timeoutMs: number): number;\n clearTimeout(handle: number): void;\n}\n\nfunction getDefaultWindow(): Window {\n if (typeof window === 'undefined') {\n throw new Error('createBrowserHost requires a browser Window. Pass options.window in non-browser environments.');\n }\n return window;\n}\n\nfunction resolveDocument(win: Window, doc?: Document): Document {\n return doc ?? win.document;\n}\n\nexport function isIframeWindow(win: Window): boolean {\n try {\n return win.self !== win.top;\n } catch {\n return true;\n }\n}\n\nexport function resolveCanvasElement(\n doc: Document,\n canvas?: HTMLCanvasElement | string | null,\n): HTMLCanvasElement | null {\n if (!canvas) return null;\n if (typeof canvas !== 'string') return canvas;\n return doc.getElementById(canvas) as HTMLCanvasElement | null;\n}\n\nexport function createBrowserHost(options: BrowserHostOptions = {}): BrowserHost {\n const win = options.window ?? getDefaultWindow();\n const doc = resolveDocument(win, options.document);\n const resolveCanvas = (canvas = options.canvas ?? null) => resolveCanvasElement(doc, canvas);\n\n return {\n window: win,\n document: doc,\n canvas: resolveCanvas(),\n isIframe: isIframeWindow(win),\n searchParams: new URLSearchParams(win.location?.search ?? ''),\n hasFocus: () => doc.hasFocus(),\n getActiveElement: () => doc.activeElement,\n resolveCanvas,\n addWindowEvent(type, listener, eventOptions) {\n win.addEventListener(type, listener as EventListener, eventOptions);\n return () => win.removeEventListener(type, listener as EventListener, eventOptions);\n },\n addDocumentEvent(type, listener, eventOptions) {\n doc.addEventListener(type, listener as EventListener, eventOptions);\n return () => doc.removeEventListener(type, listener as EventListener, eventOptions);\n },\n requestAnimationFrame: callback => win.requestAnimationFrame(callback),\n cancelAnimationFrame: handle => win.cancelAnimationFrame(handle),\n setTimeout: (callback, timeoutMs) => win.setTimeout(callback, timeoutMs),\n clearTimeout: handle => win.clearTimeout(handle),\n };\n}\n"]}
|
package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-browser-continuity.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export interface LocalEditorAssetBrowserContentContext {
|
|
2
|
+
assetFilter: string;
|
|
3
|
+
folderPath: string;
|
|
4
|
+
tab: string;
|
|
5
|
+
viewMode: string;
|
|
6
|
+
}
|
|
7
|
+
export interface LocalEditorAssetBrowserContinuitySnapshot {
|
|
8
|
+
contentKey: string | null;
|
|
9
|
+
contentScrollTop: number | null;
|
|
10
|
+
focusedControl: LocalEditorAssetBrowserFocusedControl | null;
|
|
11
|
+
}
|
|
12
|
+
type LocalEditorAssetBrowserFocusedControl = {
|
|
13
|
+
kind: 'folder' | 'toggle';
|
|
14
|
+
value: string;
|
|
15
|
+
} | {
|
|
16
|
+
kind: 'bottom-tab' | 'create-material' | 'filter-clear' | 'parent' | 'refresh' | 'type-filter' | 'view-mode';
|
|
17
|
+
value: string;
|
|
18
|
+
};
|
|
19
|
+
export interface LocalEditorAssetBrowserContinuityController {
|
|
20
|
+
capture(contentKey: string | null): LocalEditorAssetBrowserContinuitySnapshot;
|
|
21
|
+
restore(snapshot: LocalEditorAssetBrowserContinuitySnapshot, contentKey: string, active: boolean): void;
|
|
22
|
+
}
|
|
23
|
+
export interface LocalEditorAssetBrowserReturnFocusTarget {
|
|
24
|
+
element: HTMLElement;
|
|
25
|
+
identity: {
|
|
26
|
+
kind: 'asset' | 'file';
|
|
27
|
+
value: string;
|
|
28
|
+
} | null;
|
|
29
|
+
}
|
|
30
|
+
export declare function resolveLocalEditorAssetBrowserContentKey(context: LocalEditorAssetBrowserContentContext): string;
|
|
31
|
+
export declare function createLocalEditorAssetBrowserContinuityController(getPanel: () => HTMLElement): LocalEditorAssetBrowserContinuityController;
|
|
32
|
+
export declare function captureLocalEditorAssetBrowserReturnFocus(panel: HTMLElement, candidate: HTMLElement | null): LocalEditorAssetBrowserReturnFocusTarget | null;
|
|
33
|
+
export declare function restoreLocalEditorAssetBrowserReturnFocus(panel: HTMLElement, target: LocalEditorAssetBrowserReturnFocusTarget | null): void;
|
|
34
|
+
export {};
|
|
35
|
+
//# sourceMappingURL=local-editor-asset-browser-continuity.d.ts.map
|
package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-browser-continuity.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local-editor-asset-browser-continuity.d.ts","sourceRoot":"","sources":["../src/local-editor-asset-browser-continuity.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,qCAAqC;IACpD,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,yCAAyC;IACxD,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,cAAc,EAAE,qCAAqC,GAAG,IAAI,CAAC;CAC9D;AAED,KAAK,qCAAqC,GACtC;IAAE,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC5C;IACE,IAAI,EAAE,YAAY,GACd,iBAAiB,GACjB,cAAc,GACd,QAAQ,GACR,SAAS,GACT,aAAa,GACb,WAAW,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEN,MAAM,WAAW,2CAA2C;IAC1D,OAAO,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,yCAAyC,CAAC;IAC9E,OAAO,CACL,QAAQ,EAAE,yCAAyC,EACnD,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,OAAO,GACd,IAAI,CAAC;CACT;AAED,MAAM,WAAW,wCAAwC;IACvD,OAAO,EAAE,WAAW,CAAC;IACrB,QAAQ,EAAE;QAAE,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CAC5D;AAED,wBAAgB,wCAAwC,CACtD,OAAO,EAAE,qCAAqC,GAC7C,MAAM,CAOR;AAED,wBAAgB,iDAAiD,CAC/D,QAAQ,EAAE,MAAM,WAAW,GAC1B,2CAA2C,CA4B7C;AAED,wBAAgB,yCAAyC,CACvD,KAAK,EAAE,WAAW,EAClB,SAAS,EAAE,WAAW,GAAG,IAAI,GAC5B,wCAAwC,GAAG,IAAI,CAajD;AAED,wBAAgB,yCAAyC,CACvD,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,wCAAwC,GAAG,IAAI,GACtD,IAAI,CAeN"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
export function resolveLocalEditorAssetBrowserContentKey(context) {
|
|
2
|
+
return JSON.stringify([
|
|
3
|
+
context.folderPath,
|
|
4
|
+
context.tab,
|
|
5
|
+
context.assetFilter.trim().toLowerCase(),
|
|
6
|
+
context.viewMode,
|
|
7
|
+
]);
|
|
8
|
+
}
|
|
9
|
+
export function createLocalEditorAssetBrowserContinuityController(getPanel) {
|
|
10
|
+
let folderTreeScrollTop = 0;
|
|
11
|
+
return {
|
|
12
|
+
capture(contentKey) {
|
|
13
|
+
const panel = getPanel();
|
|
14
|
+
const tree = panel.querySelector('.fps-editor-ui-asset-folder-tree');
|
|
15
|
+
if (tree)
|
|
16
|
+
folderTreeScrollTop = tree.scrollTop;
|
|
17
|
+
const viewport = panel.querySelector('[data-editor-asset-browser-scroll-viewport]');
|
|
18
|
+
return {
|
|
19
|
+
contentKey,
|
|
20
|
+
contentScrollTop: viewport?.scrollTop ?? null,
|
|
21
|
+
focusedControl: readFocusedControl(panel),
|
|
22
|
+
};
|
|
23
|
+
},
|
|
24
|
+
restore(snapshot, contentKey, active) {
|
|
25
|
+
const panel = getPanel();
|
|
26
|
+
if (active) {
|
|
27
|
+
const tree = panel.querySelector('.fps-editor-ui-asset-folder-tree');
|
|
28
|
+
if (tree)
|
|
29
|
+
tree.scrollTop = folderTreeScrollTop;
|
|
30
|
+
if (snapshot.contentKey === contentKey && snapshot.contentScrollTop != null) {
|
|
31
|
+
const viewport = panel.querySelector('[data-editor-asset-browser-scroll-viewport]');
|
|
32
|
+
if (viewport)
|
|
33
|
+
viewport.scrollTop = snapshot.contentScrollTop;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
restoreFocusedControl(panel, snapshot.focusedControl);
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export function captureLocalEditorAssetBrowserReturnFocus(panel, candidate) {
|
|
41
|
+
if (!candidate)
|
|
42
|
+
return null;
|
|
43
|
+
const assetId = candidate.dataset.editorAssetId;
|
|
44
|
+
const projectFilePath = candidate.dataset.editorProjectFilePath;
|
|
45
|
+
if (!panel.contains(candidate) && !assetId && !projectFilePath)
|
|
46
|
+
return null;
|
|
47
|
+
return {
|
|
48
|
+
element: candidate,
|
|
49
|
+
identity: assetId
|
|
50
|
+
? { kind: 'asset', value: assetId }
|
|
51
|
+
: projectFilePath
|
|
52
|
+
? { kind: 'file', value: projectFilePath }
|
|
53
|
+
: null,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
export function restoreLocalEditorAssetBrowserReturnFocus(panel, target) {
|
|
57
|
+
if (!target)
|
|
58
|
+
return;
|
|
59
|
+
if (target.element.isConnected && panel.contains(target.element)) {
|
|
60
|
+
target.element.focus({ preventScroll: true });
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
if (!target.identity)
|
|
64
|
+
return;
|
|
65
|
+
const attribute = target.identity.kind === 'asset'
|
|
66
|
+
? 'data-editor-asset-id'
|
|
67
|
+
: 'data-editor-project-file-path';
|
|
68
|
+
for (const candidate of panel.querySelectorAll(`[${attribute}]`)) {
|
|
69
|
+
if (candidate.getAttribute(attribute) !== target.identity.value)
|
|
70
|
+
continue;
|
|
71
|
+
candidate.focus({ preventScroll: true });
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
function readFocusedControl(panel) {
|
|
76
|
+
const active = panel.ownerDocument.activeElement;
|
|
77
|
+
if (!active || !panel.contains(active))
|
|
78
|
+
return null;
|
|
79
|
+
const folderPath = active.dataset.editorAssetFolderTreePath;
|
|
80
|
+
if (folderPath)
|
|
81
|
+
return { kind: 'folder', value: folderPath };
|
|
82
|
+
const togglePath = active.dataset.editorAssetFolderToggle;
|
|
83
|
+
if (togglePath)
|
|
84
|
+
return { kind: 'toggle', value: togglePath };
|
|
85
|
+
const candidates = [
|
|
86
|
+
['bottom-tab', active.dataset.editorDockTab],
|
|
87
|
+
['create-material', active.dataset.editorCreateMaterialAsset],
|
|
88
|
+
['filter-clear', active.dataset.editorAssetFilterClear],
|
|
89
|
+
['parent', active.dataset.editorAssetBrowserParent],
|
|
90
|
+
['refresh', active.dataset.editorAssetBrowserRefresh],
|
|
91
|
+
['type-filter', active.dataset.editorAssetBrowserTypeFilter],
|
|
92
|
+
['view-mode', active.dataset.editorAssetViewMode],
|
|
93
|
+
];
|
|
94
|
+
for (const [kind, value] of candidates) {
|
|
95
|
+
if (value != null)
|
|
96
|
+
return { kind, value };
|
|
97
|
+
}
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
function restoreFocusedControl(panel, focused) {
|
|
101
|
+
if (!focused)
|
|
102
|
+
return;
|
|
103
|
+
const attribute = resolveFocusedControlAttribute(focused.kind);
|
|
104
|
+
const candidates = panel.querySelectorAll(`[${attribute}]`);
|
|
105
|
+
for (const candidate of candidates) {
|
|
106
|
+
if (candidate.getAttribute(attribute) !== focused.value)
|
|
107
|
+
continue;
|
|
108
|
+
if (focused.kind === 'parent' && isDisabledControl(candidate))
|
|
109
|
+
break;
|
|
110
|
+
candidate.focus({ preventScroll: true });
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
if (focused.kind === 'parent') {
|
|
114
|
+
panel.querySelector('[data-editor-asset-folder-tree-path][data-selected="true"]')
|
|
115
|
+
?.focus({ preventScroll: true });
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
function isDisabledControl(candidate) {
|
|
119
|
+
return candidate.getAttribute('disabled') != null
|
|
120
|
+
|| (typeof candidate.disabled === 'boolean'
|
|
121
|
+
&& candidate.disabled);
|
|
122
|
+
}
|
|
123
|
+
function resolveFocusedControlAttribute(kind) {
|
|
124
|
+
switch (kind) {
|
|
125
|
+
case 'folder': return 'data-editor-asset-folder-tree-path';
|
|
126
|
+
case 'toggle': return 'data-editor-asset-folder-toggle';
|
|
127
|
+
case 'bottom-tab': return 'data-editor-dock-tab';
|
|
128
|
+
case 'create-material': return 'data-editor-create-material-asset';
|
|
129
|
+
case 'filter-clear': return 'data-editor-asset-filter';
|
|
130
|
+
case 'parent': return 'data-editor-asset-browser-parent';
|
|
131
|
+
case 'refresh': return 'data-editor-asset-browser-refresh';
|
|
132
|
+
case 'type-filter': return 'data-editor-asset-browser-type-filter';
|
|
133
|
+
case 'view-mode': return 'data-editor-asset-view-mode';
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
//# sourceMappingURL=local-editor-asset-browser-continuity.js.map
|
package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-browser-continuity.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local-editor-asset-browser-continuity.js","sourceRoot":"","sources":["../src/local-editor-asset-browser-continuity.ts"],"names":[],"mappings":"AAwCA,MAAM,UAAU,wCAAwC,CACtD,OAA8C;IAE9C,OAAO,IAAI,CAAC,SAAS,CAAC;QACpB,OAAO,CAAC,UAAU;QAClB,OAAO,CAAC,GAAG;QACX,OAAO,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE;QACxC,OAAO,CAAC,QAAQ;KACjB,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,iDAAiD,CAC/D,QAA2B;IAE3B,IAAI,mBAAmB,GAAG,CAAC,CAAC;IAE5B,OAAO;QACL,OAAO,CAAC,UAAU;YAChB,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;YACzB,MAAM,IAAI,GAAG,KAAK,CAAC,aAAa,CAAc,kCAAkC,CAAC,CAAC;YAClF,IAAI,IAAI;gBAAE,mBAAmB,GAAG,IAAI,CAAC,SAAS,CAAC;YAC/C,MAAM,QAAQ,GAAG,KAAK,CAAC,aAAa,CAAc,6CAA6C,CAAC,CAAC;YACjG,OAAO;gBACL,UAAU;gBACV,gBAAgB,EAAE,QAAQ,EAAE,SAAS,IAAI,IAAI;gBAC7C,cAAc,EAAE,kBAAkB,CAAC,KAAK,CAAC;aAC1C,CAAC;QACJ,CAAC;QACD,OAAO,CAAC,QAAQ,EAAE,UAAU,EAAE,MAAM;YAClC,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;YACzB,IAAI,MAAM,EAAE,CAAC;gBACX,MAAM,IAAI,GAAG,KAAK,CAAC,aAAa,CAAc,kCAAkC,CAAC,CAAC;gBAClF,IAAI,IAAI;oBAAE,IAAI,CAAC,SAAS,GAAG,mBAAmB,CAAC;gBAC/C,IAAI,QAAQ,CAAC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sB;IAC/C,OAAO,SAAS,CAAC,YAAY,CAAC,UAAU,CAAC,IAAI,IAAI;WAC5C,CAAC,OAAQ,SAA+B,CAAC,QAAQ,KAAK,SAAS;eAC5D,SAA+B,CAAC,QAAQ,CAAC,CAAC;AACpD,CAAC;AAED,SAAS,8BAA8B,CAAC,IAAmD;IACzF,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,QAAQ,CAAC,CAAC,OAAO,oCAAoC,CAAC;QAC3D,KAAK,QAAQ,CAAC,CAAC,OAAO,iCAAiC,CAAC;QACxD,KAAK,YAAY,CAAC,CAAC,OAAO,sBAAsB,CAAC;QACjD,KAAK,iBAAiB,CAAC,CAAC,OAAO,mCAAmC,CAAC;QACnE,KAAK,cAAc,CAAC,CAAC,OAAO,0BAA0B,CAAC;QACvD,KAAK,QAAQ,CAAC,CAAC,OAAO,kCAAkC,CAAC;QACzD,KAAK,SAAS,CAAC,CAAC,OAAO,mCAAmC,CAAC;QAC3D,KAAK,aAAa,CAAC,CAAC,OAAO,uCAAuC,CAAC;QACnE,KAAK,WAAW,CAAC,CAAC,OAAO,6BAA6B,CAAC;IACzD,CAAC;AACH,CAAC","sourcesContent":["export interface LocalEditorAssetBrowserContentContext {\n assetFilter: string;\n folderPath: string;\n tab: string;\n viewMode: string;\n}\n\nexport interface LocalEditorAssetBrowserContinuitySnapshot {\n contentKey: string | null;\n contentScrollTop: number | null;\n focusedControl: LocalEditorAssetBrowserFocusedControl | null;\n}\n\ntype LocalEditorAssetBrowserFocusedControl =\n | { kind: 'folder' | 'toggle'; value: string }\n | {\n kind: 'bottom-tab'\n | 'create-material'\n | 'filter-clear'\n | 'parent'\n | 'refresh'\n | 'type-filter'\n | 'view-mode';\n value: string;\n };\n\nexport interface LocalEditorAssetBrowserContinuityController {\n capture(contentKey: string | null): LocalEditorAssetBrowserContinuitySnapshot;\n restore(\n snapshot: LocalEditorAssetBrowserContinuitySnapshot,\n contentKey: string,\n active: boolean,\n ): void;\n}\n\nexport interface LocalEditorAssetBrowserReturnFocusTarget {\n element: HTMLElement;\n identity: { kind: 'asset' | 'file'; value: string } | null;\n}\n\nexport function resolveLocalEditorAssetBrowserContentKey(\n context: LocalEditorAssetBrowserContentContext,\n): string {\n return JSON.stringify([\n context.folderPath,\n context.tab,\n context.assetFilter.trim().toLowerCase(),\n context.viewMode,\n ]);\n}\n\nexport function createLocalEditorAssetBrowserContinuityController(\n getPanel: () => HTMLElement,\n): LocalEditorAssetBrowserContinuityController {\n let folderTreeScrollTop = 0;\n\n return {\n capture(contentKey) {\n const panel = getPanel();\n const tree = panel.querySelector<HTMLElement>('.fps-editor-ui-asset-folder-tree');\n if (tree) folderTreeScrollTop = tree.scrollTop;\n const viewport = panel.querySelector<HTMLElement>('[data-editor-asset-browser-scroll-viewport]');\n return {\n contentKey,\n contentScrollTop: viewport?.scrollTop ?? null,\n focusedControl: readFocusedControl(panel),\n };\n },\n restore(snapshot, contentKey, active) {\n const panel = getPanel();\n if (active) {\n const tree = panel.querySelector<HTMLElement>('.fps-editor-ui-asset-folder-tree');\n if (tree) tree.scrollTop = folderTreeScrollTop;\n if (snapshot.contentKey === contentKey && snapshot.contentScrollTop != null) {\n const viewport = panel.querySelector<HTMLElement>('[data-editor-asset-browser-scroll-viewport]');\n if (viewport) viewport.scrollTop = snapshot.contentScrollTop;\n }\n }\n restoreFocusedControl(panel, snapshot.focusedControl);\n },\n };\n}\n\nexport function captureLocalEditorAssetBrowserReturnFocus(\n panel: HTMLElement,\n candidate: HTMLElement | null,\n): LocalEditorAssetBrowserReturnFocusTarget | null {\n if (!candidate) return null;\n const assetId = candidate.dataset.editorAssetId;\n const projectFilePath = candidate.dataset.editorProjectFilePath;\n if (!panel.contains(candidate) && !assetId && !projectFilePath) return null;\n return {\n element: candidate,\n identity: assetId\n ? { kind: 'asset', value: assetId }\n : projectFilePath\n ? { kind: 'file', value: projectFilePath }\n : null,\n };\n}\n\nexport function restoreLocalEditorAssetBrowserReturnFocus(\n panel: HTMLElement,\n target: LocalEditorAssetBrowserReturnFocusTarget | null,\n): void {\n if (!target) return;\n if (target.element.isConnected && panel.contains(target.element)) {\n target.element.focus({ preventScroll: true });\n return;\n }\n if (!target.identity) return;\n const attribute = target.identity.kind === 'asset'\n ? 'data-editor-asset-id'\n : 'data-editor-project-file-path';\n for (const candidate of panel.querySelectorAll<HTMLElement>(`[${attribute}]`)) {\n if (candidate.getAttribute(attribute) !== target.identity.value) continue;\n candidate.focus({ preventScroll: true });\n return;\n }\n}\n\nfunction readFocusedControl(\n panel: HTMLElement,\n): LocalEditorAssetBrowserContinuitySnapshot['focusedControl'] {\n const active = panel.ownerDocument.activeElement as HTMLElement | null;\n if (!active || !panel.contains(active)) return null;\n const folderPath = active.dataset.editorAssetFolderTreePath;\n if (folderPath) return { kind: 'folder', value: folderPath };\n const togglePath = active.dataset.editorAssetFolderToggle;\n if (togglePath) return { kind: 'toggle', value: togglePath };\n const candidates: Array<[LocalEditorAssetBrowserFocusedControl['kind'], string | undefined]> = [\n ['bottom-tab', active.dataset.editorDockTab],\n ['create-material', active.dataset.editorCreateMaterialAsset],\n ['filter-clear', active.dataset.editorAssetFilterClear],\n ['parent', active.dataset.editorAssetBrowserParent],\n ['refresh', active.dataset.editorAssetBrowserRefresh],\n ['type-filter', active.dataset.editorAssetBrowserTypeFilter],\n ['view-mode', active.dataset.editorAssetViewMode],\n ];\n for (const [kind, value] of candidates) {\n if (value != null) return { kind, value };\n }\n return null;\n}\n\nfunction restoreFocusedControl(\n panel: HTMLElement,\n focused: LocalEditorAssetBrowserContinuitySnapshot['focusedControl'],\n): void {\n if (!focused) return;\n const attribute = resolveFocusedControlAttribute(focused.kind);\n const candidates = panel.querySelectorAll<HTMLElement>(`[${attribute}]`);\n for (const candidate of candidates) {\n if (candidate.getAttribute(attribute) !== focused.value) continue;\n if (focused.kind === 'parent' && isDisabledControl(candidate)) break;\n candidate.focus({ preventScroll: true });\n return;\n }\n if (focused.kind === 'parent') {\n panel.querySelector<HTMLElement>('[data-editor-asset-folder-tree-path][data-selected=\"true\"]')\n ?.focus({ preventScroll: true });\n }\n}\n\nfunction isDisabledControl(candidate: HTMLElement): boolean {\n return candidate.getAttribute('disabled') != null\n || (typeof (candidate as HTMLButtonElement).disabled === 'boolean'\n && (candidate as HTMLButtonElement).disabled);\n}\n\nfunction resolveFocusedControlAttribute(kind: LocalEditorAssetBrowserFocusedControl['kind']): string {\n switch (kind) {\n case 'folder': return 'data-editor-asset-folder-tree-path';\n case 'toggle': return 'data-editor-asset-folder-toggle';\n case 'bottom-tab': return 'data-editor-dock-tab';\n case 'create-material': return 'data-editor-create-material-asset';\n case 'filter-clear': return 'data-editor-asset-filter';\n case 'parent': return 'data-editor-asset-browser-parent';\n case 'refresh': return 'data-editor-asset-browser-refresh';\n case 'type-filter': return 'data-editor-asset-browser-type-filter';\n case 'view-mode': return 'data-editor-asset-view-mode';\n }\n}\n"]}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { LocalEditorAssetBrowserTab, LocalEditorBrowserProjectFileSnapshot, LocalEditorBrowserUiAssetItem } from './local-editor-ui-types';
|
|
2
|
+
export type LocalEditorAssetFilesystemViewMode = 'grid' | 'list';
|
|
3
|
+
export interface LocalEditorAssetFilesystemFolder {
|
|
4
|
+
id: string;
|
|
5
|
+
path: string;
|
|
6
|
+
parentPath: string | null;
|
|
7
|
+
label: string;
|
|
8
|
+
depth: number;
|
|
9
|
+
descendantItemCount: number;
|
|
10
|
+
virtual: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface LocalEditorAssetFilesystemEntry {
|
|
13
|
+
id: string;
|
|
14
|
+
path: string;
|
|
15
|
+
parentPath: string;
|
|
16
|
+
label: string;
|
|
17
|
+
kind: 'directory' | 'file' | 'asset';
|
|
18
|
+
extension?: string;
|
|
19
|
+
asset?: LocalEditorBrowserUiAssetItem;
|
|
20
|
+
virtual: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface LocalEditorAssetFilesystemSnapshot {
|
|
23
|
+
rootPath: '/';
|
|
24
|
+
rootName: string;
|
|
25
|
+
folders: LocalEditorAssetFilesystemFolder[];
|
|
26
|
+
entries: LocalEditorAssetFilesystemEntry[];
|
|
27
|
+
assetFolderPaths: ReadonlyMap<string, string>;
|
|
28
|
+
truncated: boolean;
|
|
29
|
+
}
|
|
30
|
+
export type LocalEditorProjectMediaThumbnailKind = 'image' | 'model';
|
|
31
|
+
export interface LocalEditorAssetFilesystemBreadcrumb {
|
|
32
|
+
label: string;
|
|
33
|
+
path: string;
|
|
34
|
+
}
|
|
35
|
+
export declare function createLocalEditorAssetFilesystemSnapshot(assets: readonly LocalEditorBrowserUiAssetItem[], projectFiles?: LocalEditorBrowserProjectFileSnapshot | null): LocalEditorAssetFilesystemSnapshot;
|
|
36
|
+
export declare function filterLocalEditorAssetFilesystemEntries(snapshot: LocalEditorAssetFilesystemSnapshot, folderPath: string, recursive: boolean, tab?: LocalEditorAssetBrowserTab): LocalEditorAssetFilesystemEntry[];
|
|
37
|
+
export declare function resolveLocalEditorAssetFilesystemExistingFolderPath(snapshot: LocalEditorAssetFilesystemSnapshot, requestedFolderPath: string): string;
|
|
38
|
+
export declare function resolveLocalEditorProjectMediaThumbnailKind(entry: LocalEditorAssetFilesystemEntry): LocalEditorProjectMediaThumbnailKind | null;
|
|
39
|
+
export declare function resolveLocalEditorProjectMediaThumbnailCacheKey(entry: LocalEditorAssetFilesystemEntry): string | null;
|
|
40
|
+
export declare function filterLocalEditorAssetFilesystemAssets(snapshot: LocalEditorAssetFilesystemSnapshot, assets: readonly LocalEditorBrowserUiAssetItem[], folderPath: string, recursive: boolean): LocalEditorBrowserUiAssetItem[];
|
|
41
|
+
export declare function resolveLocalEditorAssetFilesystemVisibleFolders(snapshot: LocalEditorAssetFilesystemSnapshot, expandedFolderPaths: ReadonlySet<string>): LocalEditorAssetFilesystemFolder[];
|
|
42
|
+
export declare function resolveLocalEditorAssetFilesystemEntryTab(entry: LocalEditorAssetFilesystemEntry): Exclude<LocalEditorAssetBrowserTab, 'all'> | null;
|
|
43
|
+
export declare function resolveLocalEditorAssetFilesystemFolderPath(snapshot: LocalEditorAssetFilesystemSnapshot, assetId: string): string;
|
|
44
|
+
export declare function resolveLocalEditorAssetFilesystemParentPath(snapshot: LocalEditorAssetFilesystemSnapshot, folderPath: string): string | null;
|
|
45
|
+
export declare function resolveLocalEditorAssetFilesystemBreadcrumbs(snapshot: LocalEditorAssetFilesystemSnapshot, folderPath: string): LocalEditorAssetFilesystemBreadcrumb[];
|
|
46
|
+
//# sourceMappingURL=local-editor-asset-filesystem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local-editor-asset-filesystem.d.ts","sourceRoot":"","sources":["../src/local-editor-asset-filesystem.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,0BAA0B,EAC1B,qCAAqC,EACrC,6BAA6B,EAC9B,MAAM,yBAAyB,CAAC;AAEjC,MAAM,MAAM,kCAAkC,GAAG,MAAM,GAAG,MAAM,CAAC;AAEjE,MAAM,WAAW,gCAAgC;IAC/C,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,mBAAmB,EAAE,MAAM,CAAC;IAC5B,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,+BAA+B;IAC9C,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,WAAW,GAAG,MAAM,GAAG,OAAO,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,6BAA6B,CAAC;IACtC,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,kCAAkC;IACjD,QAAQ,EAAE,GA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