@babylonjs/inspector 9.2.1 → 9.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/inspector-bridge.mjs +20 -2
- package/bin/inspector-cli.mjs +17 -2
- package/lib/cli/protocol.d.ts +24 -2
- package/lib/components/properties/postProcesses/postProcessProperties.d.ts +1 -1
- package/lib/{extensionsListService-CBQwBhYh.js → extensionsListService-DPHWDyzb.js} +2 -2
- package/lib/{extensionsListService-CBQwBhYh.js.map → extensionsListService-DPHWDyzb.js.map} +1 -1
- package/lib/{index-DmfAhsIm.js → index-BaFR1FRV.js} +278 -99
- package/lib/index-BaFR1FRV.js.map +1 -0
- package/lib/index.js +1 -1
- package/lib/inspectable.d.ts +5 -0
- package/lib/{quickCreateToolsService-C38aK2nP.js → quickCreateToolsService-DJ1GVvH-.js} +2 -2
- package/lib/{quickCreateToolsService-C38aK2nP.js.map → quickCreateToolsService-DJ1GVvH-.js.map} +1 -1
- package/lib/{reflectorService-Bs9E2OMh.js → reflectorService-Cd41l6Tr.js} +2 -2
- package/lib/{reflectorService-Bs9E2OMh.js.map → reflectorService-Cd41l6Tr.js.map} +1 -1
- package/lib/services/cli/cliConnectionStatus.d.ts +9 -3
- package/lib/services/cli/inspectableBridgeService.d.ts +6 -0
- package/lib/services/cli/inspectableCommandRegistry.d.ts +11 -0
- package/lib/services/panes/tools/import/gltfLoaderOptionsService.d.ts +3 -1
- package/package.json +1 -1
- package/lib/index-DmfAhsIm.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { T as TextInputPropertyLine, N as NumberInputPropertyLine, j as ButtonLine, k as ToolsServiceIdentity } from './index-
|
|
2
|
+
import { T as TextInputPropertyLine, N as NumberInputPropertyLine, j as ButtonLine, k as ToolsServiceIdentity } from './index-BaFR1FRV.js';
|
|
3
3
|
import { useState, useRef, useCallback } from 'react';
|
|
4
4
|
import { Reflector } from '@babylonjs/core/Misc/reflector.js';
|
|
5
5
|
import { PlugConnectedRegular } from '@fluentui/react-icons';
|
|
@@ -189,4 +189,4 @@ var reflectorService = {
|
|
|
189
189
|
};
|
|
190
190
|
|
|
191
191
|
export { ReflectorServiceDefinition, reflectorService as default };
|
|
192
|
-
//# sourceMappingURL=reflectorService-
|
|
192
|
+
//# sourceMappingURL=reflectorService-Cd41l6Tr.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reflectorService-
|
|
1
|
+
{"version":3,"file":"reflectorService-Cd41l6Tr.js","sources":["../../../../../../../../dev/inspector-v2/src/components/tools/reflectorTools.tsx","../../../../../../../../dev/inspector-v2/src/services/panes/tools/reflectorService.tsx"],"sourcesContent":["import { ButtonLine } from \"shared-ui-components/fluent/hoc/buttonLine\";\r\nimport { useState, useCallback, useRef, type FunctionComponent } from \"react\";\r\nimport { type Scene } from \"core/scene\";\r\nimport { TextInputPropertyLine, NumberInputPropertyLine } from \"shared-ui-components/fluent/hoc/propertyLines/inputPropertyLine\";\r\nimport { Reflector } from \"core/Misc/reflector\";\r\nimport { PlugConnectedRegular } from \"@fluentui/react-icons\";\r\n\r\nexport const ReflectorTools: FunctionComponent<{ scene: Scene }> = ({ scene }) => {\r\n const [hostname, setHostname] = useState(\"localhost\");\r\n const [port, setPort] = useState(1234);\r\n const reflectorRef = useRef<Reflector | null>(null);\r\n\r\n const connectReflector = useCallback(() => {\r\n if (reflectorRef.current) {\r\n reflectorRef.current.close();\r\n }\r\n\r\n reflectorRef.current = new Reflector(scene, hostname, port);\r\n }, [scene, hostname, port]);\r\n\r\n return (\r\n <>\r\n <TextInputPropertyLine label=\"Hostname\" value={hostname} onChange={(value) => setHostname(value)} />\r\n <NumberInputPropertyLine label=\"Port\" value={port} onChange={(value) => setPort(value)} forceInt />\r\n <ButtonLine label=\"Connect\" icon={PlugConnectedRegular} onClick={connectReflector} />\r\n </>\r\n );\r\n};\r\n","import { type ServiceDefinition } from \"shared-ui-components/modularTool/modularity/serviceDefinition\";\r\nimport { ToolsServiceIdentity, type IToolsService } from \"../toolsService\";\r\nimport { type IDisposable } from \"core/scene\";\r\nimport { ReflectorTools } from \"../../../components/tools/reflectorTools\";\r\n\r\nexport const ReflectorServiceDefinition: ServiceDefinition<[], [IToolsService]> = {\r\n friendlyName: \"Reflector Tools\",\r\n consumes: [ToolsServiceIdentity],\r\n factory: (toolsService) => {\r\n const contentRegistrations: IDisposable[] = [];\r\n\r\n // Reflector content\r\n contentRegistrations.push(\r\n toolsService.addSectionContent({\r\n key: \"Reflector\",\r\n section: \"Reflector\",\r\n component: ({ context }) => <ReflectorTools scene={context} />,\r\n })\r\n );\r\n\r\n return {\r\n dispose: () => {\r\n contentRegistrations.forEach((registration) => registration.dispose());\r\n },\r\n };\r\n },\r\n};\r\n\r\nexport default {\r\n serviceDefinitions: [ReflectorServiceDefinition],\r\n} as const;\r\n"],"names":["_jsxs","_Fragment","_jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOO,MAAM,cAAc,GAAwC,CAAC,EAAE,KAAK,EAAE,KAAI;IAC7E,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,WAAW,CAAC;IACrD,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC;AACtC,IAAA,MAAM,YAAY,GAAG,MAAM,CAAmB,IAAI,CAAC;AAEnD,IAAA,MAAM,gBAAgB,GAAG,WAAW,CAAC,MAAK;AACtC,QAAA,IAAI,YAAY,CAAC,OAAO,EAAE;AACtB,YAAA,YAAY,CAAC,OAAO,CAAC,KAAK,EAAE;QAChC;AAEA,QAAA,YAAY,CA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OAAO,EAAE,CAAC;YAC1E,CAAC;SACJ;IACL,CAAC;;AAGL,uBAAe;IACX,kBAAkB,EAAE,CAAC,0BAA0B,CAAC;CAC1C;;;;"}
|
|
@@ -5,15 +5,21 @@ import { type IService } from "@babylonjs/shared-ui-components/modularTool/modul
|
|
|
5
5
|
*/
|
|
6
6
|
export declare const CliConnectionStatusIdentity: unique symbol;
|
|
7
7
|
/**
|
|
8
|
-
* Provides the connection status
|
|
8
|
+
* Provides the connection status and enable/disable control for the Inspector CLI bridge.
|
|
9
9
|
*/
|
|
10
10
|
export interface ICliConnectionStatus extends IService<typeof CliConnectionStatusIdentity> {
|
|
11
|
+
/**
|
|
12
|
+
* Whether the bridge is enabled. When true, the bridge actively tries to
|
|
13
|
+
* maintain a WebSocket connection. When false, the bridge is disconnected
|
|
14
|
+
* and idle.
|
|
15
|
+
*/
|
|
16
|
+
isEnabled: boolean;
|
|
11
17
|
/**
|
|
12
18
|
* Whether the bridge WebSocket is currently connected.
|
|
13
19
|
*/
|
|
14
20
|
readonly isConnected: boolean;
|
|
15
21
|
/**
|
|
16
|
-
* Observable that fires when
|
|
22
|
+
* Observable that fires when either {@link isEnabled} or {@link isConnected} changes.
|
|
17
23
|
*/
|
|
18
|
-
readonly onConnectionStatusChanged: IReadonlyObservable<
|
|
24
|
+
readonly onConnectionStatusChanged: IReadonlyObservable<void>;
|
|
19
25
|
}
|
|
@@ -11,8 +11,14 @@ export interface IInspectableBridgeServiceOptions {
|
|
|
11
11
|
port: number;
|
|
12
12
|
/**
|
|
13
13
|
* The session display name sent to the bridge.
|
|
14
|
+
* Can be a getter to provide a dynamic value that is re-read
|
|
15
|
+
* each time the bridge queries session information.
|
|
14
16
|
*/
|
|
15
17
|
name: string;
|
|
18
|
+
/**
|
|
19
|
+
* Whether to automatically start connecting when the service is created.
|
|
20
|
+
*/
|
|
21
|
+
autoStart: boolean;
|
|
16
22
|
}
|
|
17
23
|
/**
|
|
18
24
|
* Creates the service definition for the InspectableBridgeService.
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { type IDisposable } from "@babylonjs/core/index.js";
|
|
2
2
|
import { type IService } from "@babylonjs/shared-ui-components/modularTool/modularity/serviceDefinition.js";
|
|
3
|
+
/**
|
|
4
|
+
* The type of an inspectable command argument, which determines how
|
|
5
|
+
* the CLI processes the value before sending it to the browser.
|
|
6
|
+
*/
|
|
7
|
+
export type InspectableCommandArgType = "string" | "file";
|
|
3
8
|
/**
|
|
4
9
|
* Describes an argument for an inspectable command.
|
|
5
10
|
*/
|
|
@@ -16,6 +21,12 @@ export type InspectableCommandArg = {
|
|
|
16
21
|
* Whether the argument is required.
|
|
17
22
|
*/
|
|
18
23
|
required?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* The type of the argument. Defaults to "string".
|
|
26
|
+
* When set to "file", the CLI reads the file at the given path
|
|
27
|
+
* and passes its contents as the argument value.
|
|
28
|
+
*/
|
|
29
|
+
type?: InspectableCommandArgType;
|
|
19
30
|
};
|
|
20
31
|
/**
|
|
21
32
|
* Describes a command that can be invoked from the CLI.
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { type ServiceDefinition } from "@babylonjs/shared-ui-components/modularTool/modularity/serviceDefinition.js";
|
|
2
|
+
import { type ISettingsStore } from "@babylonjs/shared-ui-components/modularTool/services/settingsStore.js";
|
|
3
|
+
import { type IToastService } from "@babylonjs/shared-ui-components/modularTool/services/toastService.js";
|
|
2
4
|
import { type IToolsService } from "../../toolsService";
|
|
3
5
|
export declare const GLTFLoaderServiceIdentity: unique symbol;
|
|
4
|
-
export declare const GLTFLoaderOptionsServiceDefinition: ServiceDefinition<[], [IToolsService]>;
|
|
6
|
+
export declare const GLTFLoaderOptionsServiceDefinition: ServiceDefinition<[], [IToolsService, ISettingsStore, IToastService]>;
|