@babylonjs/inspector 5.26.1 → 5.27.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.
@@ -4434,7 +4434,7 @@ export class HexColor extends React.Component<IHexColorProps, {
4434
4434
 
4435
4435
  }
4436
4436
  declare module "@babylonjs/inspector/components/bars/CommandBarComponent" {
4437
- import * as React from "react";
4437
+ import { FC } from "react";
4438
4438
  export interface ICommandBarComponentProps {
4439
4439
  onSaveButtonClicked?: () => void;
4440
4440
  onSaveToSnippetButtonClicked?: () => void;
@@ -4445,8 +4445,11 @@ export interface ICommandBarComponentProps {
4445
4445
  onPanButtonClicked?: () => void;
4446
4446
  onZoomButtonClicked?: () => void;
4447
4447
  onFitButtonClicked?: () => void;
4448
+ onArtboardColorChanged?: (newColor: string) => void;
4449
+ artboardColor?: string;
4450
+ artboardColorPickerColor?: string;
4448
4451
  }
4449
- export const CommandBarComponent: React.FC<ICommandBarComponentProps>;
4452
+ export const CommandBarComponent: FC<ICommandBarComponentProps>;
4450
4453
 
4451
4454
  }
4452
4455
  declare module "@babylonjs/inspector/components/bars/CommandButtonComponent" {
@@ -4509,6 +4512,96 @@ declare module "@babylonjs/inspector/components/classNames" {
4509
4512
  export function ClassNames(names: any, styleObject: any): string;
4510
4513
  export function JoinClassNames(styleObject: any, ...names: string[]): string;
4511
4514
 
4515
+ }
4516
+ declare module "@babylonjs/inspector/components/colorPicker/ColorComponentEntry" {
4517
+ import * as React from "react";
4518
+ import { LockObject } from "@babylonjs/inspector/tabs/propertyGrids/lockObject";
4519
+ export interface IColorComponentEntryProps {
4520
+ value: number;
4521
+ label: string;
4522
+ max?: number;
4523
+ min?: number;
4524
+ onChange: (value: number) => void;
4525
+ disabled?: boolean;
4526
+ lockObject: LockObject;
4527
+ }
4528
+ export class ColorComponentEntry extends React.Component<IColorComponentEntryProps> {
4529
+ constructor(props: IColorComponentEntryProps);
4530
+ updateValue(valueString: string): void;
4531
+ lock(): void;
4532
+ unlock(): void;
4533
+ render(): JSX.Element;
4534
+ }
4535
+
4536
+ }
4537
+ declare module "@babylonjs/inspector/components/colorPicker/ColorPicker" {
4538
+ import * as React from "react";
4539
+ import { Color3, Color4 } from "@babylonjs/core/Maths/math.color";
4540
+ import { LockObject } from "@babylonjs/inspector/tabs/propertyGrids/lockObject";
4541
+ /**
4542
+ * Interface used to specify creation options for color picker
4543
+ */
4544
+ export interface IColorPickerProps {
4545
+ color: Color3 | Color4;
4546
+ linearhint?: boolean;
4547
+ debugMode?: boolean;
4548
+ onColorChanged?: (color: Color3 | Color4) => void;
4549
+ lockObject: LockObject;
4550
+ backgroundColor?: string;
4551
+ }
4552
+ /**
4553
+ * Interface used to specify creation options for color picker
4554
+ */
4555
+ export interface IColorPickerState {
4556
+ color: Color3;
4557
+ alpha: number;
4558
+ }
4559
+ /**
4560
+ * Class used to create a color picker
4561
+ */
4562
+ export class ColorPicker extends React.Component<IColorPickerProps, IColorPickerState> {
4563
+ private _saturationRef;
4564
+ private _hueRef;
4565
+ private _isSaturationPointerDown;
4566
+ private _isHuePointerDown;
4567
+ constructor(props: IColorPickerProps);
4568
+ shouldComponentUpdate(nextProps: IColorPickerProps, nextState: IColorPickerState): boolean;
4569
+ onSaturationPointerDown(evt: React.PointerEvent<HTMLDivElement>): void;
4570
+ onSaturationPointerUp(evt: React.PointerEvent<HTMLDivElement>): void;
4571
+ onSaturationPointerMove(evt: React.PointerEvent<HTMLDivElement>): void;
4572
+ onHuePointerDown(evt: React.PointerEvent<HTMLDivElement>): void;
4573
+ onHuePointerUp(evt: React.PointerEvent<HTMLDivElement>): void;
4574
+ onHuePointerMove(evt: React.PointerEvent<HTMLDivElement>): void;
4575
+ private _evaluateSaturation;
4576
+ private _evaluateHue;
4577
+ componentDidUpdate(): void;
4578
+ raiseOnColorChanged(): void;
4579
+ render(): JSX.Element;
4580
+ }
4581
+
4582
+ }
4583
+ declare module "@babylonjs/inspector/components/colorPicker/HexColor" {
4584
+ import * as React from "react";
4585
+ import { LockObject } from "@babylonjs/inspector/tabs/propertyGrids/lockObject";
4586
+ export interface IHexColorProps {
4587
+ value: string;
4588
+ expectedLength: number;
4589
+ onChange: (value: string) => void;
4590
+ lockObject: LockObject;
4591
+ }
4592
+ export class HexColor extends React.Component<IHexColorProps, {
4593
+ hex: string;
4594
+ }> {
4595
+ constructor(props: IHexColorProps);
4596
+ shouldComponentUpdate(nextProps: IHexColorProps, nextState: {
4597
+ hex: string;
4598
+ }): boolean;
4599
+ lock(): void;
4600
+ unlock(): void;
4601
+ updateHexValue(valueString: string): void;
4602
+ render(): JSX.Element;
4603
+ }
4604
+
4512
4605
  }
4513
4606
  declare module "@babylonjs/inspector/components/Icon" {
4514
4607
  /// <reference types="react" />
@@ -4528,6 +4621,85 @@ export type LabelProps = {
4528
4621
  };
4529
4622
  export const Label: React.FC<LabelProps>;
4530
4623
 
4624
+ }
4625
+ declare module "@babylonjs/inspector/components/lines/ColorLineComponent" {
4626
+ import * as React from "react";
4627
+ import { Observable } from "@babylonjs/core/Misc/observable";
4628
+ import { Color4 } from "@babylonjs/core/Maths/math.color";
4629
+ import { PropertyChangedEvent } from "@babylonjs/inspector/propertyChangedEvent";
4630
+ import { LockObject } from "@babylonjs/inspector/tabs/propertyGrids/lockObject";
4631
+ export interface IColorLineComponentProps {
4632
+ label: string;
4633
+ target: any;
4634
+ propertyName: string;
4635
+ onPropertyChangedObservable: Observable<PropertyChangedEvent>;
4636
+ onChange?: () => void;
4637
+ isLinear?: boolean;
4638
+ icon?: string;
4639
+ iconLabel?: string;
4640
+ disableAlpha?: boolean;
4641
+ lockObject: LockObject;
4642
+ }
4643
+ interface IColorLineComponentState {
4644
+ isExpanded: boolean;
4645
+ color: Color4;
4646
+ }
4647
+ export class ColorLineComponent extends React.Component<IColorLineComponentProps, IColorLineComponentState> {
4648
+ constructor(props: IColorLineComponentProps);
4649
+ shouldComponentUpdate(nextProps: IColorLineComponentProps, nextState: IColorLineComponentState): boolean;
4650
+ getValue(props?: Readonly<IColorLineComponentProps> & Readonly<{
4651
+ children?: React.ReactNode;
4652
+ }>): Color4;
4653
+ setColorFromString(colorString: string): void;
4654
+ setColor(newColor: Color4): void;
4655
+ switchExpandState(): void;
4656
+ updateStateR(value: number): void;
4657
+ updateStateG(value: number): void;
4658
+ updateStateB(value: number): void;
4659
+ updateStateA(value: number): void;
4660
+ copyToClipboard(): void;
4661
+ private _convertToColor;
4662
+ private _toColor3;
4663
+ render(): JSX.Element;
4664
+ }
4665
+ export {};
4666
+
4667
+ }
4668
+ declare module "@babylonjs/inspector/components/lines/ColorPickerLineComponent" {
4669
+ import * as React from "react";
4670
+ import { Color4, Color3 } from "@babylonjs/core/Maths/math.color";
4671
+ import { LockObject } from "@babylonjs/inspector/tabs/propertyGrids/lockObject";
4672
+ export interface IColorPickerComponentProps {
4673
+ value: Color4 | Color3;
4674
+ linearHint?: boolean;
4675
+ onColorChanged: (newOne: string) => void;
4676
+ icon?: string;
4677
+ iconLabel?: string;
4678
+ shouldPopRight?: boolean;
4679
+ lockObject?: LockObject;
4680
+ backgroundColor?: string;
4681
+ }
4682
+ interface IColorPickerComponentState {
4683
+ pickerEnabled: boolean;
4684
+ color: Color3 | Color4;
4685
+ hex: string;
4686
+ }
4687
+ export class ColorPickerLineComponent extends React.Component<IColorPickerComponentProps, IColorPickerComponentState> {
4688
+ private _floatRef;
4689
+ private _floatHostRef;
4690
+ private _coverRef;
4691
+ constructor(props: IColorPickerComponentProps);
4692
+ syncPositions(): void;
4693
+ shouldComponentUpdate(nextProps: IColorPickerComponentProps, nextState: IColorPickerComponentState): boolean;
4694
+ getHexString(props?: Readonly<IColorPickerComponentProps> & Readonly<{
4695
+ children?: React.ReactNode;
4696
+ }>): string;
4697
+ componentDidUpdate(): void;
4698
+ componentDidMount(): void;
4699
+ render(): JSX.Element;
4700
+ }
4701
+ export {};
4702
+
4531
4703
  }
4532
4704
  declare module "@babylonjs/inspector/components/lines/FileButtonLineComponent" {
4533
4705
  import * as React from "react";
@@ -4547,6 +4719,40 @@ export class FileButtonLineComponent extends React.Component<IFileButtonLineComp
4547
4719
  render(): JSX.Element;
4548
4720
  }
4549
4721
 
4722
+ }
4723
+ declare module "@babylonjs/inspector/components/lines/NumericInputComponent" {
4724
+ import * as React from "react";
4725
+ import { LockObject } from "@babylonjs/inspector/tabs/propertyGrids/lockObject";
4726
+ interface INumericInputComponentProps {
4727
+ label: string;
4728
+ value: number;
4729
+ step?: number;
4730
+ onChange: (value: number) => void;
4731
+ precision?: number;
4732
+ icon?: string;
4733
+ iconLabel?: string;
4734
+ lockObject: LockObject;
4735
+ }
4736
+ export class NumericInputComponent extends React.Component<INumericInputComponentProps, {
4737
+ value: string;
4738
+ }> {
4739
+ static defaultProps: {
4740
+ step: number;
4741
+ };
4742
+ private _localChange;
4743
+ constructor(props: INumericInputComponentProps);
4744
+ componentWillUnmount(): void;
4745
+ shouldComponentUpdate(nextProps: INumericInputComponentProps, nextState: {
4746
+ value: string;
4747
+ }): boolean;
4748
+ updateValue(valueString: string): void;
4749
+ onBlur(): void;
4750
+ incrementValue(amount: number): void;
4751
+ onKeyDown(evt: React.KeyboardEvent<HTMLInputElement>): void;
4752
+ render(): JSX.Element;
4753
+ }
4754
+ export {};
4755
+
4550
4756
  }
4551
4757
  declare module "@babylonjs/inspector/components/MessageDialog" {
4552
4758
  import * as React from "react";
@@ -6159,6 +6365,11 @@ const _default: {
6159
6365
  };
6160
6366
  export default _default;
6161
6367
  export const Default: {};
6368
+ export const WithArtboardColor: {
6369
+ parameters: {
6370
+ onArtboardColorChanged: (color: string) => void;
6371
+ };
6372
+ };
6162
6373
 
6163
6374
  }
6164
6375
  declare module "@babylonjs/inspector/stories/bars/CommandButtonComponent.stories" {
@@ -6182,6 +6393,20 @@ export const Default: any;
6182
6393
  export const Wide: any;
6183
6394
  export const Small: any;
6184
6395
 
6396
+ }
6397
+ declare module "@babylonjs/inspector/stories/colorPicker/ColorPicker.stories" {
6398
+ import { Color3 } from "@babylonjs/core/Maths/math.color";
6399
+ import { ColorPicker } from "@babylonjs/inspector/components/colorPicker/ColorPicker";
6400
+ const _default: {
6401
+ component: typeof ColorPicker;
6402
+ };
6403
+ export default _default;
6404
+ export const Default: {
6405
+ args: {
6406
+ color: Color3;
6407
+ };
6408
+ };
6409
+
6185
6410
  }
6186
6411
  declare module "@babylonjs/inspector/stories/Icon.stories" {
6187
6412
  /// <reference types="react" />
@@ -6205,6 +6430,47 @@ const _default: {
6205
6430
  export default _default;
6206
6431
  export const Default: any;
6207
6432
 
6433
+ }
6434
+ declare module "@babylonjs/inspector/stories/lines/ColorLineComponent.stories" {
6435
+ /// <reference types="react" />
6436
+ import { Observable } from "@babylonjs/core/Misc/observable";
6437
+ import { PropertyChangedEvent } from "@babylonjs/inspector/propertyChangedEvent";
6438
+ import { IColorLineComponentProps } from "@babylonjs/inspector/components/lines/ColorLineComponent";
6439
+ import { ColorLineComponent } from "@babylonjs/inspector/components/lines/ColorLineComponent";
6440
+ const _default: {
6441
+ component: typeof ColorLineComponent;
6442
+ };
6443
+ export default _default;
6444
+ export const Default: {
6445
+ render: (args: IColorLineComponentProps) => JSX.Element;
6446
+ args: {
6447
+ target: {};
6448
+ label: string;
6449
+ propertyName: string;
6450
+ lockObject: {
6451
+ lock: boolean;
6452
+ };
6453
+ onPropertyChangedObservable: Observable<PropertyChangedEvent>;
6454
+ };
6455
+ };
6456
+
6457
+ }
6458
+ declare module "@babylonjs/inspector/stories/lines/ColorPickerLineComponent.stories" {
6459
+ /// <reference types="react" />
6460
+ import { Color3 } from "@babylonjs/core/Maths/math.color";
6461
+ import { IColorPickerComponentProps } from "@babylonjs/inspector/components/lines/ColorPickerLineComponent";
6462
+ import { ColorPickerLineComponent } from "@babylonjs/inspector/components/lines/ColorPickerLineComponent";
6463
+ const _default: {
6464
+ component: typeof ColorPickerLineComponent;
6465
+ };
6466
+ export default _default;
6467
+ export const Default: {
6468
+ render: (args: IColorPickerComponentProps) => JSX.Element;
6469
+ args: {
6470
+ value: Color3;
6471
+ };
6472
+ };
6473
+
6208
6474
  }
6209
6475
  declare module "@babylonjs/inspector/stories/lines/FileButtonLineComponent.stories" {
6210
6476
  import { FileButtonLineComponent } from "@babylonjs/inspector/components/lines/FileButtonLineComponent";
@@ -6214,6 +6480,20 @@ const _default: {
6214
6480
  export default _default;
6215
6481
  export const Default: {};
6216
6482
 
6483
+ }
6484
+ declare module "@babylonjs/inspector/stories/lines/NumericInputComponent.stories" {
6485
+ import { NumericInputComponent } from "@babylonjs/inspector/components/lines/NumericInputComponent";
6486
+ const _default: {
6487
+ component: typeof NumericInputComponent;
6488
+ };
6489
+ export default _default;
6490
+ export const Default: {
6491
+ args: {
6492
+ label: string;
6493
+ value: number;
6494
+ };
6495
+ };
6496
+
6217
6497
  }
6218
6498
  declare module "@babylonjs/inspector/stories/MessageDialog.stories" {
6219
6499
  /// <reference types="react" />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babylonjs/inspector",
3
- "version": "5.26.1",
3
+ "version": "5.27.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.26.1",
36
- "@babylonjs/gui": "^5.26.1",
37
- "@babylonjs/gui-editor": "^5.26.1",
38
- "@babylonjs/loaders": "^5.26.1",
39
- "@babylonjs/materials": "^5.26.1",
40
- "@babylonjs/serializers": "^5.26.1",
35
+ "@babylonjs/core": "^5.27.0",
36
+ "@babylonjs/gui": "^5.27.0",
37
+ "@babylonjs/gui-editor": "^5.27.0",
38
+ "@babylonjs/loaders": "^5.27.0",
39
+ "@babylonjs/materials": "^5.27.0",
40
+ "@babylonjs/serializers": "^5.27.0",
41
41
  "@lts/gui": "1.0.0",
42
42
  "react": "^17.0.2",
43
43
  "react-dom": "^17.0.2",