@babylonjs/gui-editor 5.26.0 → 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.
@@ -1540,7 +1540,7 @@ export class HexColor extends React.Component<IHexColorProps, {
|
|
1540
1540
|
|
1541
1541
|
}
|
1542
1542
|
declare module "@babylonjs/gui-editor/components/bars/CommandBarComponent" {
|
1543
|
-
import
|
1543
|
+
import { FC } from "react";
|
1544
1544
|
export interface ICommandBarComponentProps {
|
1545
1545
|
onSaveButtonClicked?: () => void;
|
1546
1546
|
onSaveToSnippetButtonClicked?: () => void;
|
@@ -1551,8 +1551,11 @@ export interface ICommandBarComponentProps {
|
|
1551
1551
|
onPanButtonClicked?: () => void;
|
1552
1552
|
onZoomButtonClicked?: () => void;
|
1553
1553
|
onFitButtonClicked?: () => void;
|
1554
|
+
onArtboardColorChanged?: (newColor: string) => void;
|
1555
|
+
artboardColor?: string;
|
1556
|
+
artboardColorPickerColor?: string;
|
1554
1557
|
}
|
1555
|
-
export const CommandBarComponent:
|
1558
|
+
export const CommandBarComponent: FC<ICommandBarComponentProps>;
|
1556
1559
|
|
1557
1560
|
}
|
1558
1561
|
declare module "@babylonjs/gui-editor/components/bars/CommandButtonComponent" {
|
@@ -1615,6 +1618,96 @@ declare module "@babylonjs/gui-editor/components/classNames" {
|
|
1615
1618
|
export function ClassNames(names: any, styleObject: any): string;
|
1616
1619
|
export function JoinClassNames(styleObject: any, ...names: string[]): string;
|
1617
1620
|
|
1621
|
+
}
|
1622
|
+
declare module "@babylonjs/gui-editor/components/colorPicker/ColorComponentEntry" {
|
1623
|
+
import * as React from "react";
|
1624
|
+
import { LockObject } from "@babylonjs/gui-editor/tabs/propertyGrids/lockObject";
|
1625
|
+
export interface IColorComponentEntryProps {
|
1626
|
+
value: number;
|
1627
|
+
label: string;
|
1628
|
+
max?: number;
|
1629
|
+
min?: number;
|
1630
|
+
onChange: (value: number) => void;
|
1631
|
+
disabled?: boolean;
|
1632
|
+
lockObject: LockObject;
|
1633
|
+
}
|
1634
|
+
export class ColorComponentEntry extends React.Component<IColorComponentEntryProps> {
|
1635
|
+
constructor(props: IColorComponentEntryProps);
|
1636
|
+
updateValue(valueString: string): void;
|
1637
|
+
lock(): void;
|
1638
|
+
unlock(): void;
|
1639
|
+
render(): JSX.Element;
|
1640
|
+
}
|
1641
|
+
|
1642
|
+
}
|
1643
|
+
declare module "@babylonjs/gui-editor/components/colorPicker/ColorPicker" {
|
1644
|
+
import * as React from "react";
|
1645
|
+
import { Color3, Color4 } from "@babylonjs/core/Maths/math.color";
|
1646
|
+
import { LockObject } from "@babylonjs/gui-editor/tabs/propertyGrids/lockObject";
|
1647
|
+
/**
|
1648
|
+
* Interface used to specify creation options for color picker
|
1649
|
+
*/
|
1650
|
+
export interface IColorPickerProps {
|
1651
|
+
color: Color3 | Color4;
|
1652
|
+
linearhint?: boolean;
|
1653
|
+
debugMode?: boolean;
|
1654
|
+
onColorChanged?: (color: Color3 | Color4) => void;
|
1655
|
+
lockObject: LockObject;
|
1656
|
+
backgroundColor?: string;
|
1657
|
+
}
|
1658
|
+
/**
|
1659
|
+
* Interface used to specify creation options for color picker
|
1660
|
+
*/
|
1661
|
+
export interface IColorPickerState {
|
1662
|
+
color: Color3;
|
1663
|
+
alpha: number;
|
1664
|
+
}
|
1665
|
+
/**
|
1666
|
+
* Class used to create a color picker
|
1667
|
+
*/
|
1668
|
+
export class ColorPicker extends React.Component<IColorPickerProps, IColorPickerState> {
|
1669
|
+
private _saturationRef;
|
1670
|
+
private _hueRef;
|
1671
|
+
private _isSaturationPointerDown;
|
1672
|
+
private _isHuePointerDown;
|
1673
|
+
constructor(props: IColorPickerProps);
|
1674
|
+
shouldComponentUpdate(nextProps: IColorPickerProps, nextState: IColorPickerState): boolean;
|
1675
|
+
onSaturationPointerDown(evt: React.PointerEvent<HTMLDivElement>): void;
|
1676
|
+
onSaturationPointerUp(evt: React.PointerEvent<HTMLDivElement>): void;
|
1677
|
+
onSaturationPointerMove(evt: React.PointerEvent<HTMLDivElement>): void;
|
1678
|
+
onHuePointerDown(evt: React.PointerEvent<HTMLDivElement>): void;
|
1679
|
+
onHuePointerUp(evt: React.PointerEvent<HTMLDivElement>): void;
|
1680
|
+
onHuePointerMove(evt: React.PointerEvent<HTMLDivElement>): void;
|
1681
|
+
private _evaluateSaturation;
|
1682
|
+
private _evaluateHue;
|
1683
|
+
componentDidUpdate(): void;
|
1684
|
+
raiseOnColorChanged(): void;
|
1685
|
+
render(): JSX.Element;
|
1686
|
+
}
|
1687
|
+
|
1688
|
+
}
|
1689
|
+
declare module "@babylonjs/gui-editor/components/colorPicker/HexColor" {
|
1690
|
+
import * as React from "react";
|
1691
|
+
import { LockObject } from "@babylonjs/gui-editor/tabs/propertyGrids/lockObject";
|
1692
|
+
export interface IHexColorProps {
|
1693
|
+
value: string;
|
1694
|
+
expectedLength: number;
|
1695
|
+
onChange: (value: string) => void;
|
1696
|
+
lockObject: LockObject;
|
1697
|
+
}
|
1698
|
+
export class HexColor extends React.Component<IHexColorProps, {
|
1699
|
+
hex: string;
|
1700
|
+
}> {
|
1701
|
+
constructor(props: IHexColorProps);
|
1702
|
+
shouldComponentUpdate(nextProps: IHexColorProps, nextState: {
|
1703
|
+
hex: string;
|
1704
|
+
}): boolean;
|
1705
|
+
lock(): void;
|
1706
|
+
unlock(): void;
|
1707
|
+
updateHexValue(valueString: string): void;
|
1708
|
+
render(): JSX.Element;
|
1709
|
+
}
|
1710
|
+
|
1618
1711
|
}
|
1619
1712
|
declare module "@babylonjs/gui-editor/components/Icon" {
|
1620
1713
|
/// <reference types="react" />
|
@@ -1634,6 +1727,85 @@ export type LabelProps = {
|
|
1634
1727
|
};
|
1635
1728
|
export const Label: React.FC<LabelProps>;
|
1636
1729
|
|
1730
|
+
}
|
1731
|
+
declare module "@babylonjs/gui-editor/components/lines/ColorLineComponent" {
|
1732
|
+
import * as React from "react";
|
1733
|
+
import { Observable } from "@babylonjs/core/Misc/observable";
|
1734
|
+
import { Color4 } from "@babylonjs/core/Maths/math.color";
|
1735
|
+
import { PropertyChangedEvent } from "@babylonjs/gui-editor/propertyChangedEvent";
|
1736
|
+
import { LockObject } from "@babylonjs/gui-editor/tabs/propertyGrids/lockObject";
|
1737
|
+
export interface IColorLineComponentProps {
|
1738
|
+
label: string;
|
1739
|
+
target: any;
|
1740
|
+
propertyName: string;
|
1741
|
+
onPropertyChangedObservable: Observable<PropertyChangedEvent>;
|
1742
|
+
onChange?: () => void;
|
1743
|
+
isLinear?: boolean;
|
1744
|
+
icon?: string;
|
1745
|
+
iconLabel?: string;
|
1746
|
+
disableAlpha?: boolean;
|
1747
|
+
lockObject: LockObject;
|
1748
|
+
}
|
1749
|
+
interface IColorLineComponentState {
|
1750
|
+
isExpanded: boolean;
|
1751
|
+
color: Color4;
|
1752
|
+
}
|
1753
|
+
export class ColorLineComponent extends React.Component<IColorLineComponentProps, IColorLineComponentState> {
|
1754
|
+
constructor(props: IColorLineComponentProps);
|
1755
|
+
shouldComponentUpdate(nextProps: IColorLineComponentProps, nextState: IColorLineComponentState): boolean;
|
1756
|
+
getValue(props?: Readonly<IColorLineComponentProps> & Readonly<{
|
1757
|
+
children?: React.ReactNode;
|
1758
|
+
}>): Color4;
|
1759
|
+
setColorFromString(colorString: string): void;
|
1760
|
+
setColor(newColor: Color4): void;
|
1761
|
+
switchExpandState(): void;
|
1762
|
+
updateStateR(value: number): void;
|
1763
|
+
updateStateG(value: number): void;
|
1764
|
+
updateStateB(value: number): void;
|
1765
|
+
updateStateA(value: number): void;
|
1766
|
+
copyToClipboard(): void;
|
1767
|
+
private _convertToColor;
|
1768
|
+
private _toColor3;
|
1769
|
+
render(): JSX.Element;
|
1770
|
+
}
|
1771
|
+
export {};
|
1772
|
+
|
1773
|
+
}
|
1774
|
+
declare module "@babylonjs/gui-editor/components/lines/ColorPickerLineComponent" {
|
1775
|
+
import * as React from "react";
|
1776
|
+
import { Color4, Color3 } from "@babylonjs/core/Maths/math.color";
|
1777
|
+
import { LockObject } from "@babylonjs/gui-editor/tabs/propertyGrids/lockObject";
|
1778
|
+
export interface IColorPickerComponentProps {
|
1779
|
+
value: Color4 | Color3;
|
1780
|
+
linearHint?: boolean;
|
1781
|
+
onColorChanged: (newOne: string) => void;
|
1782
|
+
icon?: string;
|
1783
|
+
iconLabel?: string;
|
1784
|
+
shouldPopRight?: boolean;
|
1785
|
+
lockObject?: LockObject;
|
1786
|
+
backgroundColor?: string;
|
1787
|
+
}
|
1788
|
+
interface IColorPickerComponentState {
|
1789
|
+
pickerEnabled: boolean;
|
1790
|
+
color: Color3 | Color4;
|
1791
|
+
hex: string;
|
1792
|
+
}
|
1793
|
+
export class ColorPickerLineComponent extends React.Component<IColorPickerComponentProps, IColorPickerComponentState> {
|
1794
|
+
private _floatRef;
|
1795
|
+
private _floatHostRef;
|
1796
|
+
private _coverRef;
|
1797
|
+
constructor(props: IColorPickerComponentProps);
|
1798
|
+
syncPositions(): void;
|
1799
|
+
shouldComponentUpdate(nextProps: IColorPickerComponentProps, nextState: IColorPickerComponentState): boolean;
|
1800
|
+
getHexString(props?: Readonly<IColorPickerComponentProps> & Readonly<{
|
1801
|
+
children?: React.ReactNode;
|
1802
|
+
}>): string;
|
1803
|
+
componentDidUpdate(): void;
|
1804
|
+
componentDidMount(): void;
|
1805
|
+
render(): JSX.Element;
|
1806
|
+
}
|
1807
|
+
export {};
|
1808
|
+
|
1637
1809
|
}
|
1638
1810
|
declare module "@babylonjs/gui-editor/components/lines/FileButtonLineComponent" {
|
1639
1811
|
import * as React from "react";
|
@@ -1653,6 +1825,40 @@ export class FileButtonLineComponent extends React.Component<IFileButtonLineComp
|
|
1653
1825
|
render(): JSX.Element;
|
1654
1826
|
}
|
1655
1827
|
|
1828
|
+
}
|
1829
|
+
declare module "@babylonjs/gui-editor/components/lines/NumericInputComponent" {
|
1830
|
+
import * as React from "react";
|
1831
|
+
import { LockObject } from "@babylonjs/gui-editor/tabs/propertyGrids/lockObject";
|
1832
|
+
interface INumericInputComponentProps {
|
1833
|
+
label: string;
|
1834
|
+
value: number;
|
1835
|
+
step?: number;
|
1836
|
+
onChange: (value: number) => void;
|
1837
|
+
precision?: number;
|
1838
|
+
icon?: string;
|
1839
|
+
iconLabel?: string;
|
1840
|
+
lockObject: LockObject;
|
1841
|
+
}
|
1842
|
+
export class NumericInputComponent extends React.Component<INumericInputComponentProps, {
|
1843
|
+
value: string;
|
1844
|
+
}> {
|
1845
|
+
static defaultProps: {
|
1846
|
+
step: number;
|
1847
|
+
};
|
1848
|
+
private _localChange;
|
1849
|
+
constructor(props: INumericInputComponentProps);
|
1850
|
+
componentWillUnmount(): void;
|
1851
|
+
shouldComponentUpdate(nextProps: INumericInputComponentProps, nextState: {
|
1852
|
+
value: string;
|
1853
|
+
}): boolean;
|
1854
|
+
updateValue(valueString: string): void;
|
1855
|
+
onBlur(): void;
|
1856
|
+
incrementValue(amount: number): void;
|
1857
|
+
onKeyDown(evt: React.KeyboardEvent<HTMLInputElement>): void;
|
1858
|
+
render(): JSX.Element;
|
1859
|
+
}
|
1860
|
+
export {};
|
1861
|
+
|
1656
1862
|
}
|
1657
1863
|
declare module "@babylonjs/gui-editor/components/MessageDialog" {
|
1658
1864
|
import * as React from "react";
|
@@ -3265,6 +3471,11 @@ const _default: {
|
|
3265
3471
|
};
|
3266
3472
|
export default _default;
|
3267
3473
|
export const Default: {};
|
3474
|
+
export const WithArtboardColor: {
|
3475
|
+
parameters: {
|
3476
|
+
onArtboardColorChanged: (color: string) => void;
|
3477
|
+
};
|
3478
|
+
};
|
3268
3479
|
|
3269
3480
|
}
|
3270
3481
|
declare module "@babylonjs/gui-editor/stories/bars/CommandButtonComponent.stories" {
|
@@ -3288,6 +3499,20 @@ export const Default: any;
|
|
3288
3499
|
export const Wide: any;
|
3289
3500
|
export const Small: any;
|
3290
3501
|
|
3502
|
+
}
|
3503
|
+
declare module "@babylonjs/gui-editor/stories/colorPicker/ColorPicker.stories" {
|
3504
|
+
import { Color3 } from "@babylonjs/core/Maths/math.color";
|
3505
|
+
import { ColorPicker } from "@babylonjs/gui-editor/components/colorPicker/ColorPicker";
|
3506
|
+
const _default: {
|
3507
|
+
component: typeof ColorPicker;
|
3508
|
+
};
|
3509
|
+
export default _default;
|
3510
|
+
export const Default: {
|
3511
|
+
args: {
|
3512
|
+
color: Color3;
|
3513
|
+
};
|
3514
|
+
};
|
3515
|
+
|
3291
3516
|
}
|
3292
3517
|
declare module "@babylonjs/gui-editor/stories/Icon.stories" {
|
3293
3518
|
/// <reference types="react" />
|
@@ -3311,6 +3536,47 @@ const _default: {
|
|
3311
3536
|
export default _default;
|
3312
3537
|
export const Default: any;
|
3313
3538
|
|
3539
|
+
}
|
3540
|
+
declare module "@babylonjs/gui-editor/stories/lines/ColorLineComponent.stories" {
|
3541
|
+
/// <reference types="react" />
|
3542
|
+
import { Observable } from "@babylonjs/core/Misc/observable";
|
3543
|
+
import { PropertyChangedEvent } from "@babylonjs/gui-editor/propertyChangedEvent";
|
3544
|
+
import { IColorLineComponentProps } from "@babylonjs/gui-editor/components/lines/ColorLineComponent";
|
3545
|
+
import { ColorLineComponent } from "@babylonjs/gui-editor/components/lines/ColorLineComponent";
|
3546
|
+
const _default: {
|
3547
|
+
component: typeof ColorLineComponent;
|
3548
|
+
};
|
3549
|
+
export default _default;
|
3550
|
+
export const Default: {
|
3551
|
+
render: (args: IColorLineComponentProps) => JSX.Element;
|
3552
|
+
args: {
|
3553
|
+
target: {};
|
3554
|
+
label: string;
|
3555
|
+
propertyName: string;
|
3556
|
+
lockObject: {
|
3557
|
+
lock: boolean;
|
3558
|
+
};
|
3559
|
+
onPropertyChangedObservable: Observable<PropertyChangedEvent>;
|
3560
|
+
};
|
3561
|
+
};
|
3562
|
+
|
3563
|
+
}
|
3564
|
+
declare module "@babylonjs/gui-editor/stories/lines/ColorPickerLineComponent.stories" {
|
3565
|
+
/// <reference types="react" />
|
3566
|
+
import { Color3 } from "@babylonjs/core/Maths/math.color";
|
3567
|
+
import { IColorPickerComponentProps } from "@babylonjs/gui-editor/components/lines/ColorPickerLineComponent";
|
3568
|
+
import { ColorPickerLineComponent } from "@babylonjs/gui-editor/components/lines/ColorPickerLineComponent";
|
3569
|
+
const _default: {
|
3570
|
+
component: typeof ColorPickerLineComponent;
|
3571
|
+
};
|
3572
|
+
export default _default;
|
3573
|
+
export const Default: {
|
3574
|
+
render: (args: IColorPickerComponentProps) => JSX.Element;
|
3575
|
+
args: {
|
3576
|
+
value: Color3;
|
3577
|
+
};
|
3578
|
+
};
|
3579
|
+
|
3314
3580
|
}
|
3315
3581
|
declare module "@babylonjs/gui-editor/stories/lines/FileButtonLineComponent.stories" {
|
3316
3582
|
import { FileButtonLineComponent } from "@babylonjs/gui-editor/components/lines/FileButtonLineComponent";
|
@@ -3320,6 +3586,20 @@ const _default: {
|
|
3320
3586
|
export default _default;
|
3321
3587
|
export const Default: {};
|
3322
3588
|
|
3589
|
+
}
|
3590
|
+
declare module "@babylonjs/gui-editor/stories/lines/NumericInputComponent.stories" {
|
3591
|
+
import { NumericInputComponent } from "@babylonjs/gui-editor/components/lines/NumericInputComponent";
|
3592
|
+
const _default: {
|
3593
|
+
component: typeof NumericInputComponent;
|
3594
|
+
};
|
3595
|
+
export default _default;
|
3596
|
+
export const Default: {
|
3597
|
+
args: {
|
3598
|
+
label: string;
|
3599
|
+
value: number;
|
3600
|
+
};
|
3601
|
+
};
|
3602
|
+
|
3323
3603
|
}
|
3324
3604
|
declare module "@babylonjs/gui-editor/stories/MessageDialog.stories" {
|
3325
3605
|
/// <reference types="react" />
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@babylonjs/gui-editor",
|
3
|
-
"version": "5.
|
3
|
+
"version": "5.27.0",
|
4
4
|
"main": "dist/babylon.guiEditor.max.js",
|
5
5
|
"module": "dist/babylon.guiEditor.max.js",
|
6
6
|
"esnext": "dist/babylon.guiEditor.max.js",
|
@@ -24,8 +24,8 @@
|
|
24
24
|
"@types/react-dom": ">=16.0.9"
|
25
25
|
},
|
26
26
|
"devDependencies": {
|
27
|
-
"@babylonjs/core": "^5.
|
28
|
-
"@babylonjs/gui": "^5.
|
27
|
+
"@babylonjs/core": "^5.27.0",
|
28
|
+
"@babylonjs/gui": "^5.27.0",
|
29
29
|
"react": "^17.0.2",
|
30
30
|
"react-dom": "^17.0.2",
|
31
31
|
"rimraf": "^3.0.2",
|