@babylonjs/node-editor 5.24.0 → 5.26.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.
@@ -1368,6 +1368,65 @@ export class HexColor extends React.Component<IHexColorProps, {
1368
1368
  render(): JSX.Element;
1369
1369
  }
1370
1370
 
1371
+ }
1372
+ declare module "@babylonjs/node-editor/components/bars/CommandBarComponent" {
1373
+ import * as React from "react";
1374
+ export interface ICommandBarComponentProps {
1375
+ onSaveButtonClicked?: () => void;
1376
+ onSaveToSnippetButtonClicked?: () => void;
1377
+ onLoadFromSnippetButtonClicked?: () => void;
1378
+ onHelpButtonClicked?: () => void;
1379
+ onGiveFeedbackButtonClicked?: () => void;
1380
+ onSelectButtonClicked?: () => void;
1381
+ onPanButtonClicked?: () => void;
1382
+ onZoomButtonClicked?: () => void;
1383
+ onFitButtonClicked?: () => void;
1384
+ }
1385
+ export const CommandBarComponent: React.FC<ICommandBarComponentProps>;
1386
+
1387
+ }
1388
+ declare module "@babylonjs/node-editor/components/bars/CommandButtonComponent" {
1389
+ import * as React from "react";
1390
+ export interface ICommandButtonComponentProps {
1391
+ tooltip: string;
1392
+ shortcut?: string;
1393
+ icon: string;
1394
+ iconLabel?: string;
1395
+ isActive: boolean;
1396
+ onClick: () => void;
1397
+ disabled?: boolean;
1398
+ }
1399
+ export const CommandButtonComponent: React.FC<ICommandButtonComponentProps>;
1400
+
1401
+ }
1402
+ declare module "@babylonjs/node-editor/components/bars/CommandDropdownComponent" {
1403
+ import * as React from "react";
1404
+ interface ICommandDropdownComponentProps {
1405
+ icon?: string;
1406
+ tooltip: string;
1407
+ defaultValue?: string;
1408
+ items: {
1409
+ label: string;
1410
+ icon?: string;
1411
+ fileButton?: boolean;
1412
+ onClick?: () => void;
1413
+ onCheck?: (value: boolean) => void;
1414
+ storeKey?: string;
1415
+ isActive?: boolean;
1416
+ defaultValue?: boolean | string;
1417
+ subItems?: string[];
1418
+ }[];
1419
+ toRight?: boolean;
1420
+ }
1421
+ export class CommandDropdownComponent extends React.Component<ICommandDropdownComponentProps, {
1422
+ isExpanded: boolean;
1423
+ activeState: string;
1424
+ }> {
1425
+ constructor(props: ICommandDropdownComponentProps);
1426
+ render(): JSX.Element;
1427
+ }
1428
+ export {};
1429
+
1371
1430
  }
1372
1431
  declare module "@babylonjs/node-editor/components/Button" {
1373
1432
  /// <reference types="react" />
@@ -1384,6 +1443,7 @@ export const Button: React.FC<ButtonProps>;
1384
1443
  }
1385
1444
  declare module "@babylonjs/node-editor/components/classNames" {
1386
1445
  export function ClassNames(names: any, styleObject: any): string;
1446
+ export function JoinClassNames(styleObject: any, ...names: string[]): string;
1387
1447
 
1388
1448
  }
1389
1449
  declare module "@babylonjs/node-editor/components/Icon" {
@@ -1404,6 +1464,25 @@ export type LabelProps = {
1404
1464
  };
1405
1465
  export const Label: React.FC<LabelProps>;
1406
1466
 
1467
+ }
1468
+ declare module "@babylonjs/node-editor/components/lines/FileButtonLineComponent" {
1469
+ import * as React from "react";
1470
+ export interface IFileButtonLineComponentProps {
1471
+ label: string;
1472
+ onClick: (file: File) => void;
1473
+ accept: string;
1474
+ icon?: string;
1475
+ iconLabel?: string;
1476
+ }
1477
+ export class FileButtonLineComponent extends React.Component<IFileButtonLineComponentProps> {
1478
+ private static _IDGenerator;
1479
+ private _id;
1480
+ private _uploadInputRef;
1481
+ constructor(props: IFileButtonLineComponentProps);
1482
+ onChange(evt: any): void;
1483
+ render(): JSX.Element;
1484
+ }
1485
+
1407
1486
  }
1408
1487
  declare module "@babylonjs/node-editor/components/MessageDialog" {
1409
1488
  import * as React from "react";
@@ -1969,9 +2048,14 @@ export interface IOptionsLineComponentProps {
1969
2048
  target: any;
1970
2049
  propertyName: string;
1971
2050
  options: IInspectableOptions[];
2051
+ addInput?: boolean;
1972
2052
  noDirectUpdate?: boolean;
1973
2053
  onSelect?: (value: number | string) => void;
1974
2054
  extractValue?: (target: any) => number | string;
2055
+ addVal?: (newVal: {
2056
+ label: string;
2057
+ value: number;
2058
+ }, prevVal: number) => void;
1975
2059
  onPropertyChangedObservable?: Observable<PropertyChangedEvent>;
1976
2060
  allowNullValue?: boolean;
1977
2061
  icon?: string;
@@ -1979,9 +2063,13 @@ export interface IOptionsLineComponentProps {
1979
2063
  className?: string;
1980
2064
  valuesAreStrings?: boolean;
1981
2065
  defaultIfNull?: number;
2066
+ fromFontDropdown?: boolean;
2067
+ valueProp?: number;
2068
+ fallbackValue?: number;
1982
2069
  }
1983
2070
  export class OptionsLineComponent extends React.Component<IOptionsLineComponentProps, {
1984
2071
  value: number | string;
2072
+ addCustom: boolean;
1985
2073
  }> {
1986
2074
  private _localChange;
1987
2075
  private _remapValueIn;
@@ -1990,10 +2078,12 @@ export class OptionsLineComponent extends React.Component<IOptionsLineComponentP
1990
2078
  constructor(props: IOptionsLineComponentProps);
1991
2079
  shouldComponentUpdate(nextProps: IOptionsLineComponentProps, nextState: {
1992
2080
  value: number;
2081
+ addCustom: boolean;
1993
2082
  }): boolean;
1994
2083
  raiseOnPropertyChanged(newValue: number, previousValue: number): void;
1995
2084
  setValue(value: string | number): void;
1996
2085
  updateValue(valueString: string): void;
2086
+ updateCustomValue(): void;
1997
2087
  render(): JSX.Element;
1998
2088
  }
1999
2089
 
@@ -2997,6 +3087,24 @@ export class PropertyChangedEvent {
2997
3087
  allowNullValue?: boolean;
2998
3088
  }
2999
3089
 
3090
+ }
3091
+ declare module "@babylonjs/node-editor/stories/bars/CommandBarComponent.stories" {
3092
+ /// <reference types="react" />
3093
+ const _default: {
3094
+
3095
+ };
3096
+ export default _default;
3097
+ export const Default: {};
3098
+
3099
+ }
3100
+ declare module "@babylonjs/node-editor/stories/bars/CommandButtonComponent.stories" {
3101
+ /// <reference types="react" />
3102
+ const _default: {
3103
+
3104
+ };
3105
+ export default _default;
3106
+ export const Default: {};
3107
+
3000
3108
  }
3001
3109
  declare module "@babylonjs/node-editor/stories/Button.stories" {
3002
3110
  /// <reference types="react" />
@@ -3033,6 +3141,15 @@ const _default: {
3033
3141
  export default _default;
3034
3142
  export const Default: any;
3035
3143
 
3144
+ }
3145
+ declare module "@babylonjs/node-editor/stories/lines/FileButtonLineComponent.stories" {
3146
+ import { FileButtonLineComponent } from "@babylonjs/node-editor/components/lines/FileButtonLineComponent";
3147
+ const _default: {
3148
+ component: typeof FileButtonLineComponent;
3149
+ };
3150
+ export default _default;
3151
+ export const Default: {};
3152
+
3036
3153
  }
3037
3154
  declare module "@babylonjs/node-editor/stories/MessageDialog.stories" {
3038
3155
  /// <reference types="react" />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babylonjs/node-editor",
3
- "version": "5.24.0",
3
+ "version": "5.26.0",
4
4
  "main": "dist/babylon.nodeEditor.max.js",
5
5
  "module": "dist/babylon.nodeEditor.max.js",
6
6
  "esnext": "dist/babylon.nodeEditor.max.js",
@@ -23,7 +23,7 @@
23
23
  "@types/react-dom": ">=16.0.9"
24
24
  },
25
25
  "devDependencies": {
26
- "@babylonjs/core": "^5.24.0",
26
+ "@babylonjs/core": "^5.26.0",
27
27
  "react": "^17.0.2",
28
28
  "react-dom": "^17.0.2",
29
29
  "rimraf": "^3.0.2",