@babylonjs/inspector 5.32.1 → 5.33.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.
@@ -4960,7 +4960,7 @@ export enum ResizeDirections {
4960
4960
 
4961
4961
  }
4962
4962
  declare module "@babylonjs/inspector/components/layout/utils" {
4963
- import { Layout } from "@babylonjs/inspector/components/layout/types";
4963
+ import { Layout, LayoutColumn, LayoutTabsRow } from "@babylonjs/inspector/components/layout/types";
4964
4964
  /**
4965
4965
  * Given a column and row number in the layout, return the corresponding column/row
4966
4966
  * @param layout
@@ -4968,7 +4968,7 @@ import { Layout } from "@babylonjs/inspector/components/layout/types";
4968
4968
  * @param row
4969
4969
  * @returns
4970
4970
  */
4971
- export const getPosInLayout: (layout: Layout, column: number, row?: number | undefined) => import("@babylonjs/inspector/components/layout/types").LayoutTabsRow | import("./types").LayoutColumn;
4971
+ export const getPosInLayout: (layout: Layout, column: number, row?: number | undefined) => LayoutColumn | LayoutTabsRow;
4972
4972
  /**
4973
4973
  * Remove a row in position row, column from the layout, and redistribute heights of remaining rows
4974
4974
  * @param layout
@@ -5151,6 +5151,248 @@ export interface MessageDialogProps {
5151
5151
  }
5152
5152
  export const MessageDialog: React.FC<MessageDialogProps>;
5153
5153
 
5154
+ }
5155
+ declare module "@babylonjs/inspector/components/reactGraphSystem/GraphConnectorHandle" {
5156
+ import { FC } from "react";
5157
+ /**
5158
+ * Props for the connector
5159
+ */
5160
+ export interface IGraphConnectorHandlerProps {
5161
+ /**
5162
+ * id of the parent node
5163
+ */
5164
+ parentId: string;
5165
+ /**
5166
+ * x position of the parent node
5167
+ */
5168
+ parentX: number;
5169
+ /**
5170
+ * y position of the parent node
5171
+ */
5172
+ parentY: number;
5173
+ /**
5174
+ * x position of the connector relative to the parent node
5175
+ */
5176
+ offsetX?: number;
5177
+ /**
5178
+ * y position of the connector relative to the parent node
5179
+ */
5180
+ offsetY?: number;
5181
+ /**
5182
+ * width of the parent node
5183
+ */
5184
+ parentWidth: number;
5185
+ /**
5186
+ * height of the parent node
5187
+ */
5188
+ parentHeight: number;
5189
+ /**
5190
+ * id of the container where its parent node is
5191
+ */
5192
+ parentContainerId: string;
5193
+ }
5194
+ /**
5195
+ * This component is used to initiate a connection between two nodes. Simply
5196
+ * drag the handle in a node and drop it in another node to create a connection.
5197
+ */
5198
+ export const GraphConnectorHandler: FC<IGraphConnectorHandlerProps>;
5199
+
5200
+ }
5201
+ declare module "@babylonjs/inspector/components/reactGraphSystem/GraphContainer" {
5202
+ import { FC } from "react";
5203
+ export interface IGraphContainerProps {
5204
+ }
5205
+ /**
5206
+ * This component is just a simple container to keep the nodes and lines containers
5207
+ * together
5208
+ * @param props
5209
+ * @returns
5210
+ */
5211
+ export const GraphContainer: FC<IGraphContainerProps>;
5212
+
5213
+ }
5214
+ declare module "@babylonjs/inspector/components/reactGraphSystem/GraphContextManager" {
5215
+ /// <reference types="react" />
5216
+ /**
5217
+ * this context is used to pass callbacks to the graph nodes and connections
5218
+ */
5219
+ export interface IGraphContext {
5220
+ onNodesConnected?: (sourceId: string, targetId: string) => void;
5221
+ onLineSelected?: (lineId: string) => void;
5222
+ onNodeSelected?: (nodeId: string) => void;
5223
+ }
5224
+ export const GraphContextManager: import("react").Context<IGraphContext>;
5225
+
5226
+ }
5227
+ declare module "@babylonjs/inspector/components/reactGraphSystem/GraphLine" {
5228
+ import { FC } from "react";
5229
+ /**
5230
+ * props for the GraphLine component
5231
+ */
5232
+ export interface IGraphLineProps {
5233
+ /**
5234
+ * id of the line. temporary lines can have no id
5235
+ */
5236
+ id?: string;
5237
+ /**
5238
+ * starting x pos of the line
5239
+ */
5240
+ x1: number;
5241
+ /**
5242
+ * ending x pos of the line
5243
+ */
5244
+ x2: number;
5245
+ /**
5246
+ * starting y pos of the line
5247
+ */
5248
+ y1: number;
5249
+ /**
5250
+ * ending y pos of the line
5251
+ */
5252
+ y2: number;
5253
+ /**
5254
+ * is the line selected
5255
+ */
5256
+ selected?: boolean;
5257
+ /**
5258
+ * does the line have a direction
5259
+ */
5260
+ directional?: boolean;
5261
+ }
5262
+ export const MarkerArrowId = "arrow";
5263
+ /**
5264
+ * This component draws a SVG line between two points, with an optional marker
5265
+ * indicating direction
5266
+ */
5267
+ export const GraphLine: FC<IGraphLineProps>;
5268
+
5269
+ }
5270
+ declare module "@babylonjs/inspector/components/reactGraphSystem/GraphLinesContainer" {
5271
+ import { FC } from "react";
5272
+ /**
5273
+ * props for the GraphLineContainer
5274
+ */
5275
+ export interface IGraphLinesContainerProps {
5276
+ /**
5277
+ * id of the container
5278
+ */
5279
+ id: string;
5280
+ }
5281
+ /**
5282
+ * this component handles the dragging of new connections
5283
+ * @param props
5284
+ * @returns
5285
+ */
5286
+ export const GraphLinesContainer: FC<IGraphLinesContainerProps>;
5287
+
5288
+ }
5289
+ declare module "@babylonjs/inspector/components/reactGraphSystem/GraphNode" {
5290
+ import { FC } from "react";
5291
+ export interface IGraphNodeProps {
5292
+ id: string;
5293
+ name: string;
5294
+ x: number;
5295
+ y: number;
5296
+ selected?: boolean;
5297
+ width?: number;
5298
+ height?: number;
5299
+ highlighted?: boolean;
5300
+ parentContainerId: string;
5301
+ }
5302
+ export const GraphNode: FC<IGraphNodeProps>;
5303
+
5304
+ }
5305
+ declare module "@babylonjs/inspector/components/reactGraphSystem/GraphNodesContainer" {
5306
+ import { FC } from "react";
5307
+ export interface IGraphContainerProps {
5308
+ onNodeMoved: (id: string, x: number, y: number) => void;
5309
+ id: string;
5310
+ }
5311
+ /**
5312
+ * This component contains all the nodes and handles their dragging
5313
+ */
5314
+ export const GraphNodesContainer: FC<IGraphContainerProps>;
5315
+
5316
+ }
5317
+ declare module "@babylonjs/inspector/components/reactGraphSystem/NodeRenderer" {
5318
+ import { ComponentType } from "react";
5319
+ import { Nullable } from "@babylonjs/core/types";
5320
+ export type IVisualRecordsType = Record<string, {
5321
+ x: number;
5322
+ y: number;
5323
+ }>;
5324
+ export type IConnectionType = {
5325
+ id: string;
5326
+ sourceId: string;
5327
+ targetId: string;
5328
+ };
5329
+ export type ICustomDataType = {
5330
+ type: string;
5331
+ value: any;
5332
+ };
5333
+ export type INodeType = {
5334
+ id: string;
5335
+ label: string;
5336
+ customData?: ICustomDataType;
5337
+ };
5338
+ /**
5339
+ * props for the node renderer
5340
+ */
5341
+ export interface INodeRendererProps {
5342
+ /**
5343
+ * array of connections between nodes
5344
+ */
5345
+ connections: IConnectionType[];
5346
+ /**
5347
+ * function called when a new connection is created
5348
+ */
5349
+ updateConnections: (sourceId: string, targetId: string) => void;
5350
+ /**
5351
+ * function called when a connection is deleted
5352
+ */
5353
+ deleteLine: (lineId: string) => void;
5354
+ /**
5355
+ * function called when a node is deleted
5356
+ */
5357
+ deleteNode: (nodeId: string) => void;
5358
+ /**
5359
+ * array of all nodes
5360
+ */
5361
+ nodes: INodeType[];
5362
+ /**
5363
+ * id of the node to highlight
5364
+ */
5365
+ highlightedNode?: Nullable<string>;
5366
+ /**
5367
+ * function to be called if a node is selected
5368
+ */
5369
+ selectNode?: (nodeId: Nullable<string>) => void;
5370
+ /**
5371
+ * id of this renderer
5372
+ */
5373
+ id: string;
5374
+ /**
5375
+ * optional list of custom components to be rendered inside nodes of
5376
+ * a certain type
5377
+ */
5378
+ customComponents?: Record<string, ComponentType<any>>;
5379
+ }
5380
+ /**
5381
+ * This component is a bridge between the app logic related to the graph, and the actual rendering
5382
+ * of it. It manages the nodes' positions and selection states.
5383
+ * @param props
5384
+ * @returns
5385
+ */
5386
+ export const NodeRenderer: (props: INodeRendererProps) => JSX.Element;
5387
+
5388
+ }
5389
+ declare module "@babylonjs/inspector/components/reactGraphSystem/useGraphContext" {
5390
+ /**
5391
+ * utility hook to assist using the graph context
5392
+ * @returns
5393
+ */
5394
+ export const useGraphContext: () => import("@babylonjs/inspector/components/reactGraphSystem/GraphContextManager").IGraphContext;
5395
+
5154
5396
  }
5155
5397
  declare module "@babylonjs/inspector/components/TextInputWithSubmit" {
5156
5398
  /// <reference types="react" />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babylonjs/inspector",
3
- "version": "5.32.1",
3
+ "version": "5.33.0",
4
4
  "module": "dist/babylon.inspector.bundle.max.js",
5
5
  "main": "dist/babylon.inspector.bundle.max.js",
6
6
  "typings": "dist/babylon.inspector.module.d.ts",
@@ -32,12 +32,12 @@
32
32
  "@types/react-dom": ">=16.0.9"
33
33
  },
34
34
  "devDependencies": {
35
- "@babylonjs/core": "^5.32.1",
36
- "@babylonjs/gui": "^5.32.1",
37
- "@babylonjs/gui-editor": "^5.32.1",
38
- "@babylonjs/loaders": "^5.32.1",
39
- "@babylonjs/materials": "^5.32.1",
40
- "@babylonjs/serializers": "^5.32.1",
35
+ "@babylonjs/core": "^5.33.0",
36
+ "@babylonjs/gui": "^5.33.0",
37
+ "@babylonjs/gui-editor": "^5.33.0",
38
+ "@babylonjs/loaders": "^5.33.0",
39
+ "@babylonjs/materials": "^5.33.0",
40
+ "@babylonjs/serializers": "^5.33.0",
41
41
  "@lts/gui": "1.0.0",
42
42
  "react": "^17.0.2",
43
43
  "react-dom": "^17.0.2",
package/readme.md CHANGED
@@ -1,7 +1,7 @@
1
1
  Babylon.js inspector module
2
2
  =====================
3
3
 
4
- For usage documentation please visit http://doc.babylonjs.com/how_to/debug_layer.
4
+ For usage documentation please visit https://doc.babylonjs.com/how_to/debug_layer.
5
5
 
6
6
  # Installation instructions
7
7