@threekit-tools/treble 0.0.92 → 0.0.94-next-01
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.
- package/dist/Treble/Treble.d.ts +2 -2
- package/dist/Treble/Treble.js +2 -2
- package/dist/Treble/index.d.ts +1 -1
- package/dist/Treble/index.js +1 -1
- package/dist/Treble/snapshot.d.ts +2 -2
- package/dist/Treble/snapshot.js +1 -1
- package/dist/hooks/useNestedConfigurator/index.js +1 -2
- package/dist/hooks/useSnapshot/index.d.ts +1 -1
- package/dist/hooks/useSpaces/SpacesState.d.ts +15 -2
- package/dist/hooks/useSpaces/SpacesState.js +85 -22
- package/dist/hooks/useSpaces/constants.d.ts +17 -2
- package/dist/hooks/useSpaces/constants.js +58 -37
- package/dist/hooks/useSpaces/dataHandlers.d.ts +22 -4
- package/dist/hooks/useSpaces/dataHandlers.js +197 -40
- package/dist/hooks/useSpaces/draw/drawDoors.js +1 -1
- package/dist/hooks/useSpaces/draw/drawGrid.d.ts +1 -1
- package/dist/hooks/useSpaces/draw/drawGrid.js +4 -1
- package/dist/hooks/useSpaces/draw/drawWalls.d.ts +3 -2
- package/dist/hooks/useSpaces/draw/drawWalls.js +6 -4
- package/dist/hooks/useSpaces/index.d.ts +13 -0
- package/dist/hooks/useSpaces/index.js +269 -126
- package/dist/hooks/useSpaces/types.d.ts +52 -13
- package/dist/icons/Boundary.d.ts +3 -0
- package/dist/icons/{Ruler copy.js → Boundary.js} +7 -8
- package/dist/icons/Draw.js +3 -3
- package/dist/icons/RulerBlank.js +2 -2
- package/dist/icons/RulerDetailed.js +2 -2
- package/dist/icons/Window.js +4 -4
- package/dist/icons/index.js +28 -0
- package/dist/index.d.ts +17 -2
- package/dist/index.js +35 -5
- package/dist/store/attributes.d.ts +2 -1
- package/dist/store/index.d.ts +41 -10
- package/dist/store/index.js +3 -1
- package/dist/store/product.js +4 -7
- package/dist/store/spaces.d.ts +32 -5
- package/dist/store/spaces.js +164 -7
- package/dist/store/treble.d.ts +1 -1
- package/dist/store/treble.js +14 -21
- package/dist/store/wishlist.d.ts +2 -20
- package/dist/types.d.ts +3 -1
- package/package.json +1 -2
- package/dist/Treble/snapshots.d.ts +0 -22
- package/dist/Treble/snapshots.js +0 -247
- package/dist/hooks/useRoomBuilder/RoomBuilderState.d.ts +0 -95
- package/dist/hooks/useRoomBuilder/RoomBuilderState.js +0 -1237
- package/dist/hooks/useRoomBuilder/constants.d.ts +0 -41
- package/dist/hooks/useRoomBuilder/constants.js +0 -48
- package/dist/hooks/useRoomBuilder/dataHandlers.d.ts +0 -18
- package/dist/hooks/useRoomBuilder/dataHandlers.js +0 -187
- package/dist/hooks/useRoomBuilder/draw.d.ts +0 -55
- package/dist/hooks/useRoomBuilder/draw.js +0 -573
- package/dist/hooks/useRoomBuilder/findLoops.d.ts +0 -5
- package/dist/hooks/useRoomBuilder/findLoops.js +0 -99
- package/dist/hooks/useRoomBuilder/geometry.d.ts +0 -33
- package/dist/hooks/useRoomBuilder/geometry.js +0 -325
- package/dist/hooks/useRoomBuilder/index.d.ts +0 -40
- package/dist/hooks/useRoomBuilder/index.js +0 -303
- package/dist/hooks/useRoomBuilder/messaging.d.ts +0 -8
- package/dist/hooks/useRoomBuilder/messaging.js +0 -18
- package/dist/hooks/useRoomBuilder/themes.d.ts +0 -12
- package/dist/hooks/useRoomBuilder/themes.js +0 -273
- package/dist/hooks/useRoomBuilder/types.d.ts +0 -238
- package/dist/hooks/useRoomBuilder/types.js +0 -36
- package/dist/hooks/useRoomBuilder/validators.d.ts +0 -36
- package/dist/hooks/useRoomBuilder/validators.js +0 -362
- package/dist/icons/Ruler copy.d.ts +0 -3
- package/dist/icons/RulerDetailed copy.d.ts +0 -3
- package/dist/icons/RulerDetailed copy.js +0 -27
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export type
|
|
1
|
+
import { IHydratedAttribute } from '../../types';
|
|
2
|
+
import { DoorOpeningDirections, DoorOrientations, DoorShowSwing, WallModes } from './constants';
|
|
3
|
+
export declare type ICoordinate2D = [x: number, y: number];
|
|
4
|
+
export declare type ICoordinate3D = [x: number, y: number, z: number];
|
|
5
|
+
export declare type ICoordinatesLine = [
|
|
4
6
|
startPoint: ICoordinate2D,
|
|
5
7
|
endPoint: ICoordinate2D
|
|
6
8
|
];
|
|
7
|
-
export type ICoordinatesQuadrilateral = [
|
|
9
|
+
export declare type ICoordinatesQuadrilateral = [
|
|
8
10
|
point1: ICoordinate2D,
|
|
9
11
|
point2: ICoordinate2D,
|
|
10
12
|
point3: ICoordinate2D,
|
|
@@ -18,15 +20,15 @@ export declare enum IElements {
|
|
|
18
20
|
DOOR = "doors",
|
|
19
21
|
OPENING = "openings"
|
|
20
22
|
}
|
|
21
|
-
export type IFeatureName = IElements.WINDOW | IElements.DOOR | IElements.OPENING;
|
|
22
|
-
export type IElementName = IElements.WALL | IElements.VERTEX | IFeatureName;
|
|
23
|
+
export declare type IFeatureName = IElements.WINDOW | IElements.DOOR | IElements.OPENING;
|
|
24
|
+
export declare type IElementName = IElements.WALL | IElements.VERTEX | IFeatureName;
|
|
23
25
|
export interface IWall {
|
|
24
26
|
assetId: string;
|
|
25
27
|
line: ICoordinatesLine;
|
|
26
28
|
path?: ICoordinatesQuadrilateral;
|
|
27
29
|
connections: Array<[elementType: IFeatureName, index: number]>;
|
|
28
30
|
restConfiguration: string;
|
|
29
|
-
|
|
31
|
+
mode: WallModes;
|
|
30
32
|
}
|
|
31
33
|
export interface IWalls extends Array<IWall> {
|
|
32
34
|
}
|
|
@@ -62,9 +64,9 @@ export interface IFeature {
|
|
|
62
64
|
restConfiguration: string;
|
|
63
65
|
}
|
|
64
66
|
export interface IFeatureDoor extends IFeature {
|
|
65
|
-
orientation:
|
|
66
|
-
openingDirection:
|
|
67
|
-
showSwing:
|
|
67
|
+
orientation: DoorOrientations;
|
|
68
|
+
openingDirection: DoorOpeningDirections;
|
|
69
|
+
showSwing: DoorShowSwing;
|
|
68
70
|
}
|
|
69
71
|
interface IFeatureHydratedShared {
|
|
70
72
|
line: ICoordinatesLine;
|
|
@@ -201,7 +203,7 @@ export interface IMoveVertexValidatorInput {
|
|
|
201
203
|
updatedPosition: ISnapPoint;
|
|
202
204
|
vertex: IVertex;
|
|
203
205
|
}
|
|
204
|
-
export type IValidatorFunction<T> = (input: T, wallsAndFeatures: ISharedValidatorInput, validationConfig: IWallsValidationConfig) => false | IErrorElement;
|
|
206
|
+
export declare type IValidatorFunction<T> = (input: T, wallsAndFeatures: ISharedValidatorInput, validationConfig: IWallsValidationConfig) => false | IErrorElement;
|
|
205
207
|
export declare enum SNAPPING_TYPES {
|
|
206
208
|
NONE = "none",
|
|
207
209
|
ANGLE = "angle",
|
|
@@ -250,7 +252,7 @@ export interface ISnapPointGuide extends ISnapPointShared<SNAPPING_TYPES.GUIDE>,
|
|
|
250
252
|
export interface ISnapPointGrid extends ISnapPointShared<SNAPPING_TYPES.GRID>, Pick<IGuides, 'orientations'> {
|
|
251
253
|
locked: [true, true];
|
|
252
254
|
}
|
|
253
|
-
export type ISnapPoint = ISnapPointNone | ISnapPointVertex | ISnapPointWall | ISnapPointFeature | ISnapPointAngle | ISnapPointGuide | ISnapPointGrid;
|
|
255
|
+
export declare type ISnapPoint = ISnapPointNone | ISnapPointVertex | ISnapPointWall | ISnapPointFeature | ISnapPointAngle | ISnapPointGuide | ISnapPointGrid;
|
|
254
256
|
export interface IActiveElement extends IElementAddress {
|
|
255
257
|
snapPoint?: ISnapPoint;
|
|
256
258
|
}
|
|
@@ -296,8 +298,13 @@ export interface ISpacesConfigShared<T> {
|
|
|
296
298
|
snapProximity: number;
|
|
297
299
|
styles: T;
|
|
298
300
|
zoomDefault: number;
|
|
301
|
+
zoomMin: number;
|
|
302
|
+
zoomMax: number;
|
|
299
303
|
translateDefault: ICoordinate2D;
|
|
300
|
-
|
|
304
|
+
enableAngleSnapping: boolean;
|
|
305
|
+
enableGuideSnapping: boolean;
|
|
306
|
+
enableGridSnapping: boolean;
|
|
307
|
+
showDimensions: IDimensionOptions;
|
|
301
308
|
}
|
|
302
309
|
export interface ISpacesConfigInternal extends ISpacesConfigShared<ISpacesStyles> {
|
|
303
310
|
}
|
|
@@ -324,8 +331,15 @@ export interface ISpacesAttributes {
|
|
|
324
331
|
wallEndY: string;
|
|
325
332
|
wallEndZ: string;
|
|
326
333
|
wallConnections: string;
|
|
334
|
+
wallMode: string;
|
|
335
|
+
doorOrientation: string;
|
|
336
|
+
doorOpeningDirection: string;
|
|
337
|
+
doorShowSwing: string;
|
|
327
338
|
}
|
|
328
339
|
export interface IAttributeDefaults extends Partial<Record<IElements.WALL | IElements.WINDOW | IElements.DOOR | IElements.OPENING, string>> {
|
|
340
|
+
doorOrientation: DoorOrientations;
|
|
341
|
+
doorOpeningDirection: DoorOpeningDirections;
|
|
342
|
+
doorShowSwing: DoorShowSwing;
|
|
329
343
|
}
|
|
330
344
|
interface ISpacesPropsShared<T, U> {
|
|
331
345
|
config: T;
|
|
@@ -335,5 +349,30 @@ interface ISpacesPropsShared<T, U> {
|
|
|
335
349
|
export interface ISpacesHookProps extends ISpacesPropsShared<undefined | Partial<ISpacesConfigUser>, undefined | Partial<ISpacesAttributes>> {
|
|
336
350
|
}
|
|
337
351
|
export interface ISpacesStateProps extends ISpacesPropsShared<ISpacesConfigInternal, ISpacesAttributes> {
|
|
352
|
+
attributesState?: Record<string, IHydratedAttribute>;
|
|
353
|
+
attributeDefaults: IAttributeDefaults;
|
|
354
|
+
canvasDimensions?: ICoordinate2D;
|
|
355
|
+
wallMode: {
|
|
356
|
+
value: WallModes;
|
|
357
|
+
assetId: string;
|
|
358
|
+
};
|
|
359
|
+
setPendingStatus: (status: boolean) => void;
|
|
360
|
+
}
|
|
361
|
+
export interface ISpacesSync extends Pick<ISpacesConfigInternal, 'unit' | 'showDimensions'> {
|
|
362
|
+
canvasDimensions: ICoordinate2D;
|
|
363
|
+
angleSnappingEnabled: boolean;
|
|
364
|
+
guideSnappingEnabled: boolean;
|
|
365
|
+
gridSnappingEnabled: boolean;
|
|
366
|
+
translate: ICoordinate2D;
|
|
367
|
+
zoom: number;
|
|
368
|
+
wallMode: {
|
|
369
|
+
value: WallModes;
|
|
370
|
+
assetId: string;
|
|
371
|
+
};
|
|
372
|
+
selectedElement: {
|
|
373
|
+
type: IElementName;
|
|
374
|
+
index: number;
|
|
375
|
+
} | null;
|
|
376
|
+
attributesState: Record<string, IHydratedAttribute>;
|
|
338
377
|
}
|
|
339
378
|
export {};
|
|
@@ -7,16 +7,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
7
7
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
8
|
};
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.
|
|
10
|
+
exports.Boundary = void 0;
|
|
11
11
|
var react_1 = __importDefault(require("react"));
|
|
12
12
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
13
|
-
var SVG = styled_components_1.default.svg(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n .tk-icon {\n
|
|
14
|
-
var
|
|
13
|
+
var SVG = styled_components_1.default.svg(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n .tk-icon {\n fill: ", ";\n }\n"], ["\n .tk-icon {\n fill: ", ";\n }\n"])), function (props) { return props.color || props.theme.textColor; });
|
|
14
|
+
var Boundary = function (props) {
|
|
15
15
|
return (react_1.default.createElement(SVG, { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", color: props.color },
|
|
16
|
-
react_1.default.createElement("
|
|
17
|
-
react_1.default.createElement("path", { d: "M8.93934 4.6967L6.11091 7.52513M11.0607 6.81802L8.93934 8.93934M13.182 8.93934L11.0607 11.0607M15.3033 11.0607L12.4749 13.8891", className: "tk-icon", strokeWidth: "1" })));
|
|
16
|
+
react_1.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", className: "tk-icon", d: "M1 3H2V18H1V3ZM18 3H19V18H18V3ZM5 10.3274H3V10.8274H5V10.3274ZM6 10.3274H8V10.8274H6V10.3274ZM11 10.3274H9V10.8274H11V10.3274ZM12 10.3274H14V10.8274H12V10.3274ZM17 10.3274H15V10.8274H17V10.3274Z" })));
|
|
18
17
|
};
|
|
19
|
-
exports.
|
|
20
|
-
exports.
|
|
21
|
-
exports.default = exports.
|
|
18
|
+
exports.Boundary = Boundary;
|
|
19
|
+
exports.Boundary.iconName = 'boundary';
|
|
20
|
+
exports.default = exports.Boundary;
|
|
22
21
|
var templateObject_1;
|
package/dist/icons/Draw.js
CHANGED
|
@@ -10,10 +10,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
10
10
|
exports.Draw = void 0;
|
|
11
11
|
var react_1 = __importDefault(require("react"));
|
|
12
12
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
13
|
-
var
|
|
13
|
+
var Path = styled_components_1.default.path(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n fill: ", ";\n"], ["\n fill: ", ";\n"])), function (props) { return props.color || props.theme.textColor; });
|
|
14
14
|
var Draw = function (props) {
|
|
15
|
-
return (react_1.default.createElement(
|
|
16
|
-
react_1.default.createElement(
|
|
15
|
+
return (react_1.default.createElement("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
16
|
+
react_1.default.createElement(Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M3.74417 0.637287C4.59388 -0.212428 5.97154 -0.21243 6.82126 0.637287L19.3627 13.1787C19.7708 13.5868 20 14.1402 20 14.7173V20H14.7173C14.1402 20 13.5868 19.7708 13.1787 19.3627L0.637287 6.82126C-0.21243 5.97154 -0.21243 4.59388 0.637286 3.74417L3.74417 0.637287ZM5.50251 1.95604C5.38112 1.83465 5.18431 1.83465 5.06292 1.95604L1.95604 5.06292C1.83465 5.18431 1.83465 5.38112 1.95604 5.50251L4.20155 7.74802L7.74802 4.20155L5.50251 1.95604ZM9.06677 5.52031L18.044 14.4975C18.1023 14.5558 18.135 14.6348 18.135 14.7173V18.135H14.7173C14.6348 18.135 14.5558 18.1023 14.4975 18.044L5.52031 9.06677L9.06677 5.52031Z", color: props.color })));
|
|
17
17
|
};
|
|
18
18
|
exports.Draw = Draw;
|
|
19
19
|
exports.Draw.iconName = 'draw';
|
package/dist/icons/RulerBlank.js
CHANGED
|
@@ -13,8 +13,8 @@ var styled_components_1 = __importDefault(require("styled-components"));
|
|
|
13
13
|
var SVG = styled_components_1.default.svg(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n .tk-icon {\n stroke: ", ";\n }\n"], ["\n .tk-icon {\n stroke: ", ";\n }\n"])), function (props) { return props.color || props.theme.textColor; });
|
|
14
14
|
var Ruler = function (props) {
|
|
15
15
|
return (react_1.default.createElement(SVG, { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", color: props.color },
|
|
16
|
-
react_1.default.createElement("g", {
|
|
17
|
-
react_1.default.createElement("rect", { x: "5.75732", y: "1.51465", width: "18", height: "6", transform: "rotate(45 5.75732 1.51465)", className: "tk-icon",
|
|
16
|
+
react_1.default.createElement("g", { clipPath: "url(#clip0_1031_536)" },
|
|
17
|
+
react_1.default.createElement("rect", { x: "5.75732", y: "1.51465", width: "18", height: "6", transform: "rotate(45 5.75732 1.51465)", className: "tk-icon", strokeWidth: "2" })),
|
|
18
18
|
react_1.default.createElement("defs", null,
|
|
19
19
|
react_1.default.createElement("clipPath", { id: "clip0_1031_536" },
|
|
20
20
|
react_1.default.createElement("rect", { width: "20", height: "20", fill: "white" })))));
|
|
@@ -13,8 +13,8 @@ var styled_components_1 = __importDefault(require("styled-components"));
|
|
|
13
13
|
var SVG = styled_components_1.default.svg(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n .tk-icon {\n stroke: ", ";\n }\n"], ["\n .tk-icon {\n stroke: ", ";\n }\n"])), function (props) { return props.color || props.theme.textColor; });
|
|
14
14
|
var Ruler = function (props) {
|
|
15
15
|
return (react_1.default.createElement(SVG, { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", color: props.color },
|
|
16
|
-
react_1.default.createElement("g", {
|
|
17
|
-
react_1.default.createElement("rect", { x: "5.75732", y: "1.51465", width: "18", height: "6", transform: "rotate(45 5.75732 1.51465)", className: "tk-icon",
|
|
16
|
+
react_1.default.createElement("g", { clipPath: "url(#clip0_1031_521)" },
|
|
17
|
+
react_1.default.createElement("rect", { x: "5.75732", y: "1.51465", width: "18", height: "6", transform: "rotate(45 5.75732 1.51465)", className: "tk-icon", strokeWidth: "2" }),
|
|
18
18
|
react_1.default.createElement("path", { d: "M7.82837 4L4.99994 6.82843M9.16899 5.34062L7.04767 7.46194M10.5096 6.68123L8.38828 8.80255M11.8502 8.02185L9.02179 10.8503", className: "tk-icon" }),
|
|
19
19
|
react_1.default.createElement("path", { d: "M11.8284 8L8.99994 10.8284M13.169 9.34062L11.0477 11.4619M14.5096 10.6812L12.3883 12.8026M15.8502 12.0219L13.0218 14.8503", className: "tk-icon" })),
|
|
20
20
|
react_1.default.createElement("defs", null,
|
package/dist/icons/Window.js
CHANGED
|
@@ -10,11 +10,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
10
10
|
exports.Window = void 0;
|
|
11
11
|
var react_1 = __importDefault(require("react"));
|
|
12
12
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
13
|
-
var
|
|
13
|
+
var Path = styled_components_1.default.path(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n fill: ", ";\n"], ["\n fill: ", ";\n"])), function (props) { return props.color || props.theme.textColor; });
|
|
14
14
|
var Window = function (props) {
|
|
15
|
-
return (react_1.default.createElement(
|
|
16
|
-
react_1.default.createElement(
|
|
17
|
-
react_1.default.createElement(
|
|
15
|
+
return (react_1.default.createElement("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
16
|
+
react_1.default.createElement(Path, { fillRule: "evenodd", clipRule: "evenodd", color: props.color, d: "M2.28571 15.4286V4.42858H17.7603V15.4286H2.28571ZM10.4891 10.3947V14.5714H16.9031V10.3947H10.4891ZM16.9031 9.46248V5.28572H10.4891V9.46248H16.9031ZM9.55688 5.28572H3.14286V9.46248H9.55688V5.28572ZM3.14286 14.5714V10.3947H9.55688V14.5714H3.14286Z" }),
|
|
17
|
+
react_1.default.createElement(Path, { fillRule: "evenodd", clipRule: "evenodd", color: props.color, d: "M0.285714 2.71429C0.127919 2.71429 0 2.84221 0 3.00001V17C0 17.1578 0.127918 17.2857 0.285714 17.2857H19.7143C19.8721 17.2857 20 17.1578 20 17V3.00001C20 2.84221 19.8721 2.71429 19.7143 2.71429H0.285714ZM0.857143 3.57144V16.4286H19.1429V3.57144H0.857143Z" })));
|
|
18
18
|
};
|
|
19
19
|
exports.Window = Window;
|
|
20
20
|
exports.Window.iconName = 'window';
|
package/dist/icons/index.js
CHANGED
|
@@ -33,9 +33,12 @@ var More_1 = __importDefault(require("./More"));
|
|
|
33
33
|
var NewWindow_1 = __importDefault(require("./NewWindow"));
|
|
34
34
|
var Pause_1 = __importDefault(require("./Pause"));
|
|
35
35
|
var Play_1 = __importDefault(require("./Play"));
|
|
36
|
+
var Player3D_1 = __importDefault(require("./Player3D"));
|
|
36
37
|
var Redo_1 = __importDefault(require("./Redo"));
|
|
37
38
|
var Remove_1 = __importDefault(require("./Remove"));
|
|
38
39
|
var Ruler_1 = __importDefault(require("./Ruler"));
|
|
40
|
+
var RulerBlank_1 = __importDefault(require("./RulerBlank"));
|
|
41
|
+
var RulerDetailed_1 = __importDefault(require("./RulerDetailed"));
|
|
39
42
|
var Search_1 = __importDefault(require("./Search"));
|
|
40
43
|
var Settings_1 = __importDefault(require("./Settings"));
|
|
41
44
|
var Share_1 = __importDefault(require("./Share"));
|
|
@@ -56,6 +59,17 @@ var Window_1 = __importDefault(require("./Window"));
|
|
|
56
59
|
var Wall_1 = __importDefault(require("./Wall"));
|
|
57
60
|
var TrashCan_1 = __importDefault(require("./TrashCan"));
|
|
58
61
|
var TrashCanAlt_1 = __importDefault(require("./TrashCanAlt"));
|
|
62
|
+
var GridSnapping_1 = __importDefault(require("./GridSnapping"));
|
|
63
|
+
var AngleSnapping_1 = __importDefault(require("./AngleSnapping"));
|
|
64
|
+
var Center_1 = __importDefault(require("./Center"));
|
|
65
|
+
var LayoutAlt_1 = __importDefault(require("./LayoutAlt"));
|
|
66
|
+
var Magnet_1 = __importDefault(require("./Magnet"));
|
|
67
|
+
var Save_1 = __importDefault(require("./Save"));
|
|
68
|
+
var UnitCm_1 = __importDefault(require("./UnitCm"));
|
|
69
|
+
var UnitMeter_1 = __importDefault(require("./UnitMeter"));
|
|
70
|
+
var UnitFeet_1 = __importDefault(require("./UnitFeet"));
|
|
71
|
+
var UnitInch_1 = __importDefault(require("./UnitInch"));
|
|
72
|
+
var Boundary_1 = __importDefault(require("./Boundary"));
|
|
59
73
|
exports.default = (_a = {},
|
|
60
74
|
_a[Add_1.default.iconName] = Add_1.default,
|
|
61
75
|
_a[ArrowLeft_1.default.iconName] = ArrowLeft_1.default,
|
|
@@ -86,9 +100,12 @@ exports.default = (_a = {},
|
|
|
86
100
|
_a[NewWindow_1.default.iconName] = NewWindow_1.default,
|
|
87
101
|
_a[Pause_1.default.iconName] = Pause_1.default,
|
|
88
102
|
_a[Play_1.default.iconName] = Play_1.default,
|
|
103
|
+
_a[Player3D_1.default.iconName] = Player3D_1.default,
|
|
89
104
|
_a[Redo_1.default.iconName] = Redo_1.default,
|
|
90
105
|
_a[Remove_1.default.iconName] = Remove_1.default,
|
|
91
106
|
_a[Ruler_1.default.iconName] = Ruler_1.default,
|
|
107
|
+
_a[RulerBlank_1.default.iconName] = RulerBlank_1.default,
|
|
108
|
+
_a[RulerDetailed_1.default.iconName] = RulerDetailed_1.default,
|
|
92
109
|
_a[Search_1.default.iconName] = Search_1.default,
|
|
93
110
|
_a[Settings_1.default.iconName] = Settings_1.default,
|
|
94
111
|
_a[Share_1.default.iconName] = Share_1.default,
|
|
@@ -109,4 +126,15 @@ exports.default = (_a = {},
|
|
|
109
126
|
_a[Wall_1.default.iconName] = Wall_1.default,
|
|
110
127
|
_a[TrashCan_1.default.iconName] = TrashCan_1.default,
|
|
111
128
|
_a[TrashCanAlt_1.default.iconName] = TrashCanAlt_1.default,
|
|
129
|
+
_a[GridSnapping_1.default.iconName] = GridSnapping_1.default,
|
|
130
|
+
_a[AngleSnapping_1.default.iconName] = AngleSnapping_1.default,
|
|
131
|
+
_a[Center_1.default.iconName] = Center_1.default,
|
|
132
|
+
_a[LayoutAlt_1.default.iconName] = LayoutAlt_1.default,
|
|
133
|
+
_a[Magnet_1.default.iconName] = Magnet_1.default,
|
|
134
|
+
_a[Save_1.default.iconName] = Save_1.default,
|
|
135
|
+
_a[UnitCm_1.default.iconName] = UnitCm_1.default,
|
|
136
|
+
_a[UnitMeter_1.default.iconName] = UnitMeter_1.default,
|
|
137
|
+
_a[UnitFeet_1.default.iconName] = UnitFeet_1.default,
|
|
138
|
+
_a[UnitInch_1.default.iconName] = UnitInch_1.default,
|
|
139
|
+
_a[Boundary_1.default.iconName] = Boundary_1.default,
|
|
112
140
|
_a);
|
package/dist/index.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ import useNestedConfigurator from './hooks/useNestedConfigurator';
|
|
|
18
18
|
import useLoadingProgress from './hooks/useLoadingProgress';
|
|
19
19
|
import usePlayerReady from './hooks/usePlayerReady';
|
|
20
20
|
import usePlayer from './hooks/usePlayer';
|
|
21
|
-
import
|
|
21
|
+
import useSpaces from './hooks/useSpaces';
|
|
22
22
|
import ThreekitProvider from './components/ThreekitProvider';
|
|
23
23
|
import Player from './components/Player';
|
|
24
24
|
import Button from './components/Button';
|
|
@@ -57,6 +57,7 @@ import PlayerLoadingSpinner from './components/PlayerLoadingSpinner';
|
|
|
57
57
|
import DraggableHint from './components/DraggableHint';
|
|
58
58
|
import TurntableAnimation from './components/TurntableAnimation';
|
|
59
59
|
import BreatheAnimation from './components/BreatheAnimation';
|
|
60
|
+
import SpacesLayoutIcon from './hooks/useSpaces/SpacesLayout';
|
|
60
61
|
import AddIcon from './icons/Add';
|
|
61
62
|
import ArrowLeftIcon from './icons/ArrowLeft';
|
|
62
63
|
import ArrowRightIcon from './icons/ArrowRight';
|
|
@@ -86,9 +87,12 @@ import MoreIcon from './icons/More';
|
|
|
86
87
|
import NewWindowIcon from './icons/NewWindow';
|
|
87
88
|
import PauseIcon from './icons/Pause';
|
|
88
89
|
import PlayIcon from './icons/Play';
|
|
90
|
+
import Player3DIcon from './icons/Player3D';
|
|
89
91
|
import RedoIcon from './icons/Redo';
|
|
90
92
|
import RemoveIcon from './icons/Remove';
|
|
91
93
|
import RulerIcon from './icons/Ruler';
|
|
94
|
+
import RulerBlankIcon from './icons/RulerBlank';
|
|
95
|
+
import RulerDetailedIcon from './icons/RulerDetailed';
|
|
92
96
|
import SearchIcon from './icons/Search';
|
|
93
97
|
import SettingsIcon from './icons/Settings';
|
|
94
98
|
import ShareIcon from './icons/Share';
|
|
@@ -109,4 +113,15 @@ import DoorIcon from './icons/Door';
|
|
|
109
113
|
import OpeningIcon from './icons/Opening';
|
|
110
114
|
import WallIcon from './icons/Wall';
|
|
111
115
|
import LayoutIcon from './icons/Layout';
|
|
112
|
-
|
|
116
|
+
import GridSnappingIcon from './icons/GridSnapping';
|
|
117
|
+
import AngleSnappingIcon from './icons/AngleSnapping';
|
|
118
|
+
import CenterIcon from './icons/Center';
|
|
119
|
+
import LayoutAltIcon from './icons/LayoutAlt';
|
|
120
|
+
import MagnetIcon from './icons/Magnet';
|
|
121
|
+
import SaveIcon from './icons/Save';
|
|
122
|
+
import UnitCmIcon from './icons/UnitCm';
|
|
123
|
+
import UnitMeterIcon from './icons/UnitMeter';
|
|
124
|
+
import UnitFeetIcon from './icons/UnitFeet';
|
|
125
|
+
import UnitInchIcon from './icons/UnitInch';
|
|
126
|
+
import BoundaryIcon from './icons/Boundary';
|
|
127
|
+
export { useAttribute, useConfigurator, useConfigurationLoader, useFirstPlayerInteraction, useMetadata, useName, usePlayerLoadingStatus, useConfigurationChangeStatus, usePrice, useThreekitInitStatus, useZoom, useSnapshot, useWishlist, useShare, usePlayerPortal, useProductCache, useNestedConfigurator, useLoadingProgress, usePlayer, useSpaces, usePlayerReady, ThreekitProvider, Player, Button, Cards, Dropdown, Strips, Swatch, TextInput, Tiles, TilesGroup, Upload, Switch, ProductName, ProductDescription, AttributeTitle, AttributeValue, TotalPrice, Skeleton, message, Modal, Drawer, Accordion, Tabs, PortalToArOverlay, PortalToElement, AwaitThreekitLoad, FlatForm, Zoom, Snapshots, Wishlist, Share, TrebleApp, ProductLayout, PlayerLoadingCircular, PlayerLoadingSpinner, DraggableHint, TurntableAnimation, BreatheAnimation, SpacesLayoutIcon, AddIcon, ArrowLeftIcon, ArrowRightIcon, CameraIcon, CaretDownIcon, CaretUpIcon, CaretLeftIcon, CaretRightIcon, CartIcon, CheckmateIcon, ClipboardIcon, ColorPickerIcon, CopyIcon, DeleteIcon, DoubleCaretLeftIcon, DoubleCaretRightIcon, DownloadIcon, DraggableIcon, DragIcon, EditIcon, HeartIcon, ImageIcon, InfoIcon, MailIcon, MenuIcon, MoreIcon, NewWindowIcon, PauseIcon, PlayIcon, Player3DIcon, RedoIcon, RemoveIcon, RulerIcon, RulerBlankIcon, RulerDetailedIcon, SearchIcon, SettingsIcon, ShareIcon, SwitchIcon, TagIcon, UndoIcon, WishlistIcon, ZoomInIcon, ZoomOutIcon, SpinnerIcon, AngleIcon, TrashCanIcon, TrashCanAltIcon, CursorIcon, WindowIcon, DrawIcon, DoorIcon, OpeningIcon, WallIcon, LayoutIcon, GridSnappingIcon, AngleSnappingIcon, CenterIcon, LayoutAltIcon, MagnetIcon, SaveIcon, UnitCmIcon, UnitMeterIcon, UnitFeetIcon, UnitInchIcon, BoundaryIcon, };
|
package/dist/index.js
CHANGED
|
@@ -3,9 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Snapshots = exports.Zoom = exports.FlatForm = exports.AwaitThreekitLoad = exports.PortalToElement = exports.PortalToArOverlay = exports.Tabs = exports.Accordion = exports.Drawer = exports.Modal = exports.message = exports.Skeleton = exports.TotalPrice = exports.AttributeValue = exports.AttributeTitle = exports.ProductDescription = exports.ProductName = exports.Switch = exports.Upload = exports.TilesGroup = exports.Tiles = exports.TextInput = exports.Swatch = exports.Strips = exports.Dropdown = exports.Cards = exports.Button = exports.Player = exports.ThreekitProvider = exports.usePlayerReady = exports.
|
|
7
|
-
exports.
|
|
8
|
-
exports.LayoutIcon = exports.WallIcon = exports.OpeningIcon = exports.DoorIcon = exports.DrawIcon = exports.WindowIcon = exports.CursorIcon = exports.TrashCanAltIcon = exports.TrashCanIcon = exports.AngleIcon = exports.SpinnerIcon = void 0;
|
|
6
|
+
exports.Snapshots = exports.Zoom = exports.FlatForm = exports.AwaitThreekitLoad = exports.PortalToElement = exports.PortalToArOverlay = exports.Tabs = exports.Accordion = exports.Drawer = exports.Modal = exports.message = exports.Skeleton = exports.TotalPrice = exports.AttributeValue = exports.AttributeTitle = exports.ProductDescription = exports.ProductName = exports.Switch = exports.Upload = exports.TilesGroup = exports.Tiles = exports.TextInput = exports.Swatch = exports.Strips = exports.Dropdown = exports.Cards = exports.Button = exports.Player = exports.ThreekitProvider = exports.usePlayerReady = exports.useSpaces = exports.usePlayer = exports.useLoadingProgress = exports.useNestedConfigurator = exports.useProductCache = exports.usePlayerPortal = exports.useShare = exports.useWishlist = exports.useSnapshot = exports.useZoom = exports.useThreekitInitStatus = exports.usePrice = exports.useConfigurationChangeStatus = exports.usePlayerLoadingStatus = exports.useName = exports.useMetadata = exports.useFirstPlayerInteraction = exports.useConfigurationLoader = exports.useConfigurator = exports.useAttribute = void 0;
|
|
7
|
+
exports.TagIcon = exports.SwitchIcon = exports.ShareIcon = exports.SettingsIcon = exports.SearchIcon = exports.RulerDetailedIcon = exports.RulerBlankIcon = exports.RulerIcon = exports.RemoveIcon = exports.RedoIcon = exports.Player3DIcon = exports.PlayIcon = exports.PauseIcon = exports.NewWindowIcon = exports.MoreIcon = exports.MenuIcon = exports.MailIcon = exports.InfoIcon = exports.ImageIcon = exports.HeartIcon = exports.EditIcon = exports.DragIcon = exports.DraggableIcon = exports.DownloadIcon = exports.DoubleCaretRightIcon = exports.DoubleCaretLeftIcon = exports.DeleteIcon = exports.CopyIcon = exports.ColorPickerIcon = exports.ClipboardIcon = exports.CheckmateIcon = exports.CartIcon = exports.CaretRightIcon = exports.CaretLeftIcon = exports.CaretUpIcon = exports.CaretDownIcon = exports.CameraIcon = exports.ArrowRightIcon = exports.ArrowLeftIcon = exports.AddIcon = exports.SpacesLayoutIcon = exports.BreatheAnimation = exports.TurntableAnimation = exports.DraggableHint = exports.PlayerLoadingSpinner = exports.PlayerLoadingCircular = exports.ProductLayout = exports.TrebleApp = exports.Share = exports.Wishlist = void 0;
|
|
8
|
+
exports.BoundaryIcon = exports.UnitInchIcon = exports.UnitFeetIcon = exports.UnitMeterIcon = exports.UnitCmIcon = exports.SaveIcon = exports.MagnetIcon = exports.LayoutAltIcon = exports.CenterIcon = exports.AngleSnappingIcon = exports.GridSnappingIcon = exports.LayoutIcon = exports.WallIcon = exports.OpeningIcon = exports.DoorIcon = exports.DrawIcon = exports.WindowIcon = exports.CursorIcon = exports.TrashCanAltIcon = exports.TrashCanIcon = exports.AngleIcon = exports.SpinnerIcon = exports.ZoomOutIcon = exports.ZoomInIcon = exports.WishlistIcon = exports.UndoIcon = void 0;
|
|
9
9
|
var useAttribute_1 = __importDefault(require("./hooks/useAttribute"));
|
|
10
10
|
exports.useAttribute = useAttribute_1.default;
|
|
11
11
|
var useConfigurator_1 = __importDefault(require("./hooks/useConfigurator"));
|
|
@@ -46,8 +46,8 @@ var usePlayerReady_1 = __importDefault(require("./hooks/usePlayerReady"));
|
|
|
46
46
|
exports.usePlayerReady = usePlayerReady_1.default;
|
|
47
47
|
var usePlayer_1 = __importDefault(require("./hooks/usePlayer"));
|
|
48
48
|
exports.usePlayer = usePlayer_1.default;
|
|
49
|
-
var
|
|
50
|
-
exports.
|
|
49
|
+
var useSpaces_1 = __importDefault(require("./hooks/useSpaces"));
|
|
50
|
+
exports.useSpaces = useSpaces_1.default;
|
|
51
51
|
var ThreekitProvider_1 = __importDefault(require("./components/ThreekitProvider"));
|
|
52
52
|
exports.ThreekitProvider = ThreekitProvider_1.default;
|
|
53
53
|
var Player_1 = __importDefault(require("./components/Player"));
|
|
@@ -124,6 +124,8 @@ var TurntableAnimation_1 = __importDefault(require("./components/TurntableAnimat
|
|
|
124
124
|
exports.TurntableAnimation = TurntableAnimation_1.default;
|
|
125
125
|
var BreatheAnimation_1 = __importDefault(require("./components/BreatheAnimation"));
|
|
126
126
|
exports.BreatheAnimation = BreatheAnimation_1.default;
|
|
127
|
+
var SpacesLayout_1 = __importDefault(require("./hooks/useSpaces/SpacesLayout"));
|
|
128
|
+
exports.SpacesLayoutIcon = SpacesLayout_1.default;
|
|
127
129
|
var Add_1 = __importDefault(require("./icons/Add"));
|
|
128
130
|
exports.AddIcon = Add_1.default;
|
|
129
131
|
var ArrowLeft_1 = __importDefault(require("./icons/ArrowLeft"));
|
|
@@ -182,12 +184,18 @@ var Pause_1 = __importDefault(require("./icons/Pause"));
|
|
|
182
184
|
exports.PauseIcon = Pause_1.default;
|
|
183
185
|
var Play_1 = __importDefault(require("./icons/Play"));
|
|
184
186
|
exports.PlayIcon = Play_1.default;
|
|
187
|
+
var Player3D_1 = __importDefault(require("./icons/Player3D"));
|
|
188
|
+
exports.Player3DIcon = Player3D_1.default;
|
|
185
189
|
var Redo_1 = __importDefault(require("./icons/Redo"));
|
|
186
190
|
exports.RedoIcon = Redo_1.default;
|
|
187
191
|
var Remove_1 = __importDefault(require("./icons/Remove"));
|
|
188
192
|
exports.RemoveIcon = Remove_1.default;
|
|
189
193
|
var Ruler_1 = __importDefault(require("./icons/Ruler"));
|
|
190
194
|
exports.RulerIcon = Ruler_1.default;
|
|
195
|
+
var RulerBlank_1 = __importDefault(require("./icons/RulerBlank"));
|
|
196
|
+
exports.RulerBlankIcon = RulerBlank_1.default;
|
|
197
|
+
var RulerDetailed_1 = __importDefault(require("./icons/RulerDetailed"));
|
|
198
|
+
exports.RulerDetailedIcon = RulerDetailed_1.default;
|
|
191
199
|
var Search_1 = __importDefault(require("./icons/Search"));
|
|
192
200
|
exports.SearchIcon = Search_1.default;
|
|
193
201
|
var Settings_1 = __importDefault(require("./icons/Settings"));
|
|
@@ -228,3 +236,25 @@ var Wall_1 = __importDefault(require("./icons/Wall"));
|
|
|
228
236
|
exports.WallIcon = Wall_1.default;
|
|
229
237
|
var Layout_1 = __importDefault(require("./icons/Layout"));
|
|
230
238
|
exports.LayoutIcon = Layout_1.default;
|
|
239
|
+
var GridSnapping_1 = __importDefault(require("./icons/GridSnapping"));
|
|
240
|
+
exports.GridSnappingIcon = GridSnapping_1.default;
|
|
241
|
+
var AngleSnapping_1 = __importDefault(require("./icons/AngleSnapping"));
|
|
242
|
+
exports.AngleSnappingIcon = AngleSnapping_1.default;
|
|
243
|
+
var Center_1 = __importDefault(require("./icons/Center"));
|
|
244
|
+
exports.CenterIcon = Center_1.default;
|
|
245
|
+
var LayoutAlt_1 = __importDefault(require("./icons/LayoutAlt"));
|
|
246
|
+
exports.LayoutAltIcon = LayoutAlt_1.default;
|
|
247
|
+
var Magnet_1 = __importDefault(require("./icons/Magnet"));
|
|
248
|
+
exports.MagnetIcon = Magnet_1.default;
|
|
249
|
+
var Save_1 = __importDefault(require("./icons/Save"));
|
|
250
|
+
exports.SaveIcon = Save_1.default;
|
|
251
|
+
var UnitCm_1 = __importDefault(require("./icons/UnitCm"));
|
|
252
|
+
exports.UnitCmIcon = UnitCm_1.default;
|
|
253
|
+
var UnitMeter_1 = __importDefault(require("./icons/UnitMeter"));
|
|
254
|
+
exports.UnitMeterIcon = UnitMeter_1.default;
|
|
255
|
+
var UnitFeet_1 = __importDefault(require("./icons/UnitFeet"));
|
|
256
|
+
exports.UnitFeetIcon = UnitFeet_1.default;
|
|
257
|
+
var UnitInch_1 = __importDefault(require("./icons/UnitInch"));
|
|
258
|
+
exports.UnitInchIcon = UnitInch_1.default;
|
|
259
|
+
var Boundary_1 = __importDefault(require("./icons/Boundary"));
|
|
260
|
+
exports.BoundaryIcon = Boundary_1.default;
|
|
@@ -12,7 +12,8 @@ export declare const getHydrationData: ((state: {
|
|
|
12
12
|
translations: import("./translations").TranslationsState;
|
|
13
13
|
wishlist: import("../Treble").WishlistArray;
|
|
14
14
|
price: import("./price").PriceState;
|
|
15
|
-
|
|
15
|
+
spaces: import("./spaces").SpacesState;
|
|
16
|
+
}) => [Record<string, IThreekitDisplayAttribute>, ITranslationMap | undefined, string | undefined]) & import("reselect").OutputSelectorFields<(args_0: AttributesState, args_1: string | undefined) => [Record<string, IThreekitDisplayAttribute>, ITranslationMap | undefined, string | undefined] & {
|
|
16
17
|
clearCache: () => void;
|
|
17
18
|
}> & {
|
|
18
19
|
clearCache: () => void;
|
package/dist/store/index.d.ts
CHANGED
|
@@ -1,58 +1,89 @@
|
|
|
1
1
|
import { TypedUseSelectorHook } from 'react-redux';
|
|
2
2
|
import { Reducer } from 'redux';
|
|
3
|
-
declare const store: import("@reduxjs/toolkit
|
|
3
|
+
declare const store: import("@reduxjs/toolkit").EnhancedStore<{
|
|
4
4
|
treble: import("./treble").TrebleState;
|
|
5
5
|
product: import("./product").ProductState;
|
|
6
6
|
attributes: import("./attributes").AttributesState;
|
|
7
7
|
translations: import("./translations").TranslationsState;
|
|
8
8
|
wishlist: import("../Treble").WishlistArray;
|
|
9
9
|
price: import("./price").PriceState;
|
|
10
|
-
|
|
10
|
+
spaces: import("./spaces").SpacesState;
|
|
11
|
+
}, import("redux").AnyAction, import("@reduxjs/toolkit").MiddlewareArray<import("redux-thunk").ThunkMiddleware<{
|
|
11
12
|
treble: import("./treble").TrebleState;
|
|
12
13
|
product: import("./product").ProductState;
|
|
13
14
|
attributes: import("./attributes").AttributesState;
|
|
14
15
|
translations: import("./translations").TranslationsState;
|
|
15
16
|
wishlist: import("../Treble").WishlistArray;
|
|
16
17
|
price: import("./price").PriceState;
|
|
17
|
-
|
|
18
|
+
spaces: import("./spaces").SpacesState;
|
|
19
|
+
}, import("redux").AnyAction, null> | import("redux-thunk").ThunkMiddleware<{
|
|
18
20
|
treble: import("./treble").TrebleState;
|
|
19
21
|
product: import("./product").ProductState;
|
|
20
22
|
attributes: import("./attributes").AttributesState;
|
|
21
23
|
translations: import("./translations").TranslationsState;
|
|
22
24
|
wishlist: import("../Treble").WishlistArray;
|
|
23
25
|
price: import("./price").PriceState;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
spaces: import("./spaces").SpacesState;
|
|
27
|
+
}, import("redux").AnyAction, undefined> | import("redux").Middleware<{}, {
|
|
26
28
|
treble: import("./treble").TrebleState;
|
|
27
29
|
product: import("./product").ProductState;
|
|
28
30
|
attributes: import("./attributes").AttributesState;
|
|
29
31
|
translations: import("./translations").TranslationsState;
|
|
30
32
|
wishlist: import("../Treble").WishlistArray;
|
|
31
33
|
price: import("./price").PriceState;
|
|
32
|
-
|
|
34
|
+
spaces: import("./spaces").SpacesState;
|
|
35
|
+
}, import("redux").Dispatch<import("redux").AnyAction>>>>;
|
|
36
|
+
export declare const createStore: (reducer?: Record<string, Reducer>) => import("@reduxjs/toolkit").EnhancedStore<{
|
|
33
37
|
treble: import("./treble").TrebleState;
|
|
34
38
|
product: import("./product").ProductState;
|
|
35
39
|
attributes: import("./attributes").AttributesState;
|
|
36
40
|
translations: import("./translations").TranslationsState;
|
|
37
41
|
wishlist: import("../Treble").WishlistArray;
|
|
38
42
|
price: import("./price").PriceState;
|
|
39
|
-
|
|
43
|
+
spaces: import("./spaces").SpacesState;
|
|
44
|
+
}, import("redux").AnyAction, import("@reduxjs/toolkit").MiddlewareArray<import("redux-thunk").ThunkMiddleware<{
|
|
40
45
|
treble: import("./treble").TrebleState;
|
|
41
46
|
product: import("./product").ProductState;
|
|
42
47
|
attributes: import("./attributes").AttributesState;
|
|
43
48
|
translations: import("./translations").TranslationsState;
|
|
44
49
|
wishlist: import("../Treble").WishlistArray;
|
|
45
50
|
price: import("./price").PriceState;
|
|
46
|
-
|
|
51
|
+
spaces: import("./spaces").SpacesState;
|
|
52
|
+
}, import("redux").AnyAction, null> | import("redux-thunk").ThunkMiddleware<{
|
|
53
|
+
treble: import("./treble").TrebleState;
|
|
54
|
+
product: import("./product").ProductState;
|
|
55
|
+
attributes: import("./attributes").AttributesState;
|
|
56
|
+
translations: import("./translations").TranslationsState;
|
|
57
|
+
wishlist: import("../Treble").WishlistArray;
|
|
58
|
+
price: import("./price").PriceState;
|
|
59
|
+
spaces: import("./spaces").SpacesState;
|
|
60
|
+
}, import("redux").AnyAction, undefined> | import("redux").Middleware<{}, {
|
|
61
|
+
treble: import("./treble").TrebleState;
|
|
62
|
+
product: import("./product").ProductState;
|
|
63
|
+
attributes: import("./attributes").AttributesState;
|
|
64
|
+
translations: import("./translations").TranslationsState;
|
|
65
|
+
wishlist: import("../Treble").WishlistArray;
|
|
66
|
+
price: import("./price").PriceState;
|
|
67
|
+
spaces: import("./spaces").SpacesState;
|
|
68
|
+
}, import("redux").Dispatch<import("redux").AnyAction>>>>;
|
|
47
69
|
export declare type RootState = ReturnType<typeof store.getState>;
|
|
48
70
|
export declare type ThreekitDispatch = typeof store.dispatch;
|
|
49
|
-
export declare const useThreekitDispatch: () => import("@reduxjs/toolkit").ThunkDispatch<{
|
|
71
|
+
export declare const useThreekitDispatch: () => import("redux").Dispatch<import("redux").AnyAction> & import("@reduxjs/toolkit").ThunkDispatch<{
|
|
72
|
+
treble: import("./treble").TrebleState;
|
|
73
|
+
product: import("./product").ProductState;
|
|
74
|
+
attributes: import("./attributes").AttributesState;
|
|
75
|
+
translations: import("./translations").TranslationsState;
|
|
76
|
+
wishlist: import("../Treble").WishlistArray;
|
|
77
|
+
price: import("./price").PriceState;
|
|
78
|
+
spaces: import("./spaces").SpacesState;
|
|
79
|
+
}, null, import("redux").AnyAction> & import("@reduxjs/toolkit").ThunkDispatch<{
|
|
50
80
|
treble: import("./treble").TrebleState;
|
|
51
81
|
product: import("./product").ProductState;
|
|
52
82
|
attributes: import("./attributes").AttributesState;
|
|
53
83
|
translations: import("./translations").TranslationsState;
|
|
54
84
|
wishlist: import("../Treble").WishlistArray;
|
|
55
85
|
price: import("./price").PriceState;
|
|
56
|
-
|
|
86
|
+
spaces: import("./spaces").SpacesState;
|
|
87
|
+
}, undefined, import("redux").AnyAction>;
|
|
57
88
|
export declare const useThreekitSelector: TypedUseSelectorHook<RootState>;
|
|
58
89
|
export default createStore;
|
package/dist/store/index.js
CHANGED
|
@@ -25,6 +25,7 @@ var attributes_1 = __importDefault(require("./attributes"));
|
|
|
25
25
|
var wishlist_1 = __importDefault(require("./wishlist"));
|
|
26
26
|
var translations_1 = __importDefault(require("./translations"));
|
|
27
27
|
var price_1 = __importDefault(require("./price"));
|
|
28
|
+
var spaces_1 = __importDefault(require("./spaces"));
|
|
28
29
|
var store = (0, toolkit_1.configureStore)({
|
|
29
30
|
reducer: {
|
|
30
31
|
treble: treble_1.default,
|
|
@@ -33,6 +34,7 @@ var store = (0, toolkit_1.configureStore)({
|
|
|
33
34
|
translations: translations_1.default,
|
|
34
35
|
wishlist: wishlist_1.default,
|
|
35
36
|
price: price_1.default,
|
|
37
|
+
spaces: spaces_1.default,
|
|
36
38
|
},
|
|
37
39
|
middleware: function (getDefaultMiddleware) {
|
|
38
40
|
return constants_1.TREBLE_DEBUG
|
|
@@ -44,7 +46,7 @@ var createStore = function (reducer) {
|
|
|
44
46
|
if (!reducer)
|
|
45
47
|
return store;
|
|
46
48
|
return (0, toolkit_1.configureStore)({
|
|
47
|
-
reducer: __assign(__assign({}, reducer), { treble: treble_1.default, product: product_1.default, attributes: attributes_1.default, translations: translations_1.default, wishlist: wishlist_1.default, price: price_1.default }),
|
|
49
|
+
reducer: __assign(__assign({}, reducer), { treble: treble_1.default, product: product_1.default, attributes: attributes_1.default, translations: translations_1.default, wishlist: wishlist_1.default, price: price_1.default, spaces: spaces_1.default }),
|
|
48
50
|
middleware: function (getDefaultMiddleware) {
|
|
49
51
|
return constants_1.TREBLE_DEBUG
|
|
50
52
|
? getDefaultMiddleware().concat(redux_logger_1.default)
|
package/dist/store/product.js
CHANGED
|
@@ -52,7 +52,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
52
52
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53
53
|
exports.resetProductConfiguration = exports.removeProductIdx = exports.changeActiveCacheIdx = exports.loadNewProduct = exports.loadProduct = exports.cacheActiveProduct = exports.initProduct = exports.setProducts = exports.getProductCache = exports.getActiveCacheIdx = exports.getMetadata = exports.getName = exports.getProductId = exports.decrementActiveCacheIdx = exports.incrementActiveCacheIdx = exports.setActiveCacheIdx = exports.removeFromCache = exports.updateActiveProductCache = exports.appendToCache = exports.setMetadata = exports.setName = exports.setProductId = exports.PRODUCTS = void 0;
|
|
54
54
|
var toolkit_1 = require("@reduxjs/toolkit");
|
|
55
|
-
var types_1 = require("../types");
|
|
56
55
|
var connection_1 = __importDefault(require("../connection"));
|
|
57
56
|
var treble_1 = require("./treble");
|
|
58
57
|
var attributes_1 = require("./attributes");
|
|
@@ -157,8 +156,7 @@ var initProduct = function () { return function (dispatch, getState) {
|
|
|
157
156
|
var metadata = window.threekit.configurator.getMetadata();
|
|
158
157
|
var productId = state.product.id;
|
|
159
158
|
if (productId && !INITIAL_CONFIGURATIONS[productId]) {
|
|
160
|
-
var
|
|
161
|
-
var configuration = player.configurator.getFullConfiguration();
|
|
159
|
+
var configuration = window.threekit.configurator.getFullConfiguration();
|
|
162
160
|
INITIAL_CONFIGURATIONS[productId] = JSON.stringify(configuration);
|
|
163
161
|
}
|
|
164
162
|
dispatch((0, exports.setName)(name));
|
|
@@ -176,8 +174,7 @@ var cacheActiveProduct = function (config) {
|
|
|
176
174
|
var thumbnail = config === null || config === void 0 ? void 0 : config.thumbnail;
|
|
177
175
|
var connectionObj = connection_1.default.getConnection();
|
|
178
176
|
delete connectionObj.threekitDomain;
|
|
179
|
-
var
|
|
180
|
-
var configuration = player.configurator.getFullConfiguration();
|
|
177
|
+
var configuration = window.threekit.configurator.getFullConfiguration();
|
|
181
178
|
var data = { connection: connectionObj, configuration: configuration };
|
|
182
179
|
var product = Object.assign({
|
|
183
180
|
id: state.product.id,
|
|
@@ -253,19 +250,19 @@ var changeActiveCacheIdx = function (idx) {
|
|
|
253
250
|
state = getState();
|
|
254
251
|
cache = state.product.cache;
|
|
255
252
|
if (idx >= cache.length)
|
|
256
|
-
return [2
|
|
253
|
+
return [2];
|
|
257
254
|
dispatch((0, exports.cacheActiveProduct)());
|
|
258
255
|
cachedProduct = __assign({}, state.product.cache[idx]);
|
|
259
256
|
data = JSON.parse(cachedProduct.data);
|
|
260
257
|
connection_1.default.connect(data.connection);
|
|
261
258
|
dispatch((0, exports.setActiveCacheIdx)(idx));
|
|
262
|
-
dispatch((0, exports.setProductId)(cachedProduct.id));
|
|
263
259
|
return [4, dispatch((0, treble_1.reloadPlayer)({
|
|
264
260
|
assetId: data.connection.assetId,
|
|
265
261
|
configuration: data.configuration,
|
|
266
262
|
}))];
|
|
267
263
|
case 1:
|
|
268
264
|
_a.sent();
|
|
265
|
+
dispatch((0, exports.setProductId)(cachedProduct.id));
|
|
269
266
|
return [2];
|
|
270
267
|
}
|
|
271
268
|
});
|