@babylonjs/inspector 9.6.2 → 9.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,8 @@
1
+ import { type ServiceDefinition } from "@babylonjs/shared-ui-components/modularTool/modularity/serviceDefinition.js";
2
+ import { type IShellService } from "@babylonjs/shared-ui-components/modularTool/services/shellService.js";
3
+ import { type ISceneContext } from "../sceneContext";
4
+ import { type ISelectionService } from "../selectionService";
5
+ /**
6
+ * Inspector pane service that hosts the Smart Assets pane.
7
+ */
8
+ export declare const SmartAssetsServiceDefinition: ServiceDefinition<[], [IShellService, ISceneContext, ISelectionService]>;
@@ -0,0 +1,10 @@
1
+ import { type FunctionComponent } from "react";
2
+ import { type Scene } from "@babylonjs/core/scene.js";
3
+ /**
4
+ * Save/load controls for a scene's Smart Asset map.
5
+ * @param props - Component props.
6
+ * @returns The Smart Asset map controls.
7
+ */
8
+ export declare const SmartAssetProjectTools: FunctionComponent<{
9
+ scene: Scene;
10
+ }>;
@@ -0,0 +1,22 @@
1
+ import { type SmartAssetManager } from "@babylonjs/core/SmartAssets/smartAssetManager.js";
2
+ type InspectorAssetNotFoundPromptHandlerCallback = (key: string, expectedUrl: string) => Promise<string | File | null>;
3
+ /**
4
+ * Sets the Inspector-owned prompt handler used by Smart Assets when an asset is missing.
5
+ * @param handler - The handler installed by the Inspector UI, or null to clear it.
6
+ */
7
+ export declare function SetInspectorAssetNotFoundPromptHandler(handler: InspectorAssetNotFoundPromptHandlerCallback | null): void;
8
+ /**
9
+ * Default handler for missing assets. Delegates to the Inspector UI when it is open.
10
+ * Pane focus is handled by the prompt host itself once the user picks a file.
11
+ * @param key - The smart asset key that was not found.
12
+ * @param expectedUrl - The URL that failed to load.
13
+ * @returns A promise resolving to a new URL, File, or null to skip.
14
+ */
15
+ export declare function inspectorAssetNotFoundHandler(key: string, expectedUrl: string): Promise<string | File | null>;
16
+ /**
17
+ * Installs the Inspector `onAssetNotFound` handler while preserving any existing handler for restoration.
18
+ * @param sam - The SmartAssetManager to install the handler on.
19
+ * @returns A function that restores the previous handler if the Inspector handler is still installed.
20
+ */
21
+ export declare function installInspectorAssetNotFoundHandler(sam: SmartAssetManager): () => void;
22
+ export {};
@@ -0,0 +1,7 @@
1
+ import { type ServiceDefinition } from "@babylonjs/shared-ui-components/modularTool/modularity/serviceDefinition.js";
2
+ import { type IShellService } from "@babylonjs/shared-ui-components/modularTool/services/shellService.js";
3
+ import { type ISceneContext } from "./sceneContext";
4
+ /**
5
+ * Registers the Inspector Smart Asset missing-file prompt host.
6
+ */
7
+ export declare const SmartAssetPromptServiceDefinition: ServiceDefinition<[], [IShellService, ISceneContext]>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babylonjs/inspector",
3
- "version": "9.6.2",
3
+ "version": "9.7.0",
4
4
  "main": "lib/index.js",
5
5
  "module": "lib/index.js",
6
6
  "esnext": "lib/index.js",