@babylonjs/inspector 9.2.2 → 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.
@@ -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-DB_fpb1t.js';
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-5IVRhqd-.js.map
192
+ //# sourceMappingURL=reflectorService-Cd41l6Tr.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"reflectorService-5IVRhqd-.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,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A,GAAG,EAAE,WAAW;AAChB,YAAA,OAAO,EAAE,WAAW;AACpB,YAAA,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,KAAKA,GAAA,CAAC,cAAc,EAAA,EAAC,KAAK,EAAE,OAAO,EAAA,CAAI;AACjE,SAAA,CAAC,CACL;QAED,OAAO;YACH,OAAO,EAAE,MAAK;AACV,gBAAA,oBAAoB,CAAC,OAAO,CAAC,CAAC,YAAY,KAAK,YAAY,CAAC,OAAO,EAAE,CAAC;YAC1E,CAAC;SACJ;IACL,CAAC;;AAGL,uBAAe;IACX,kBAAkB,EAAE,CAAC,0BAA0B,CAAC;CAC1C;;;;"}
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,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AACV,gBAAA,oBAAoB,CAAC,OAAO,CAAC,CAAC,YAAY,KAAK,YAAY,CAAC,OAAO,EAAE,CAAC;YAC1E,CAAC;SACJ;IACL,CAAC;;AAGL,uBAAe;IACX,kBAAkB,EAAE,CAAC,0BAA0B,CAAC;CAC1C;;;;"}
@@ -11,6 +11,8 @@ 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;
16
18
  /**
@@ -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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babylonjs/inspector",
3
- "version": "9.2.2",
3
+ "version": "9.3.0",
4
4
  "main": "lib/index.js",
5
5
  "module": "lib/index.js",
6
6
  "esnext": "lib/index.js",