@threekit-tools/treble 0.0.91-next-03 → 0.0.92
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 +3 -3
- package/dist/Treble/index.d.ts +1 -1
- package/dist/Treble/index.js +1 -1
- package/dist/Treble/snapshot.d.ts +1 -1
- package/dist/Treble/snapshots.d.ts +22 -0
- package/dist/Treble/snapshots.js +247 -0
- package/dist/Treble/wishlist.d.ts +1 -1
- package/dist/Treble/wishlist.js +1 -1
- package/dist/api/catalog.js +1 -1
- package/dist/api/configurations.js +1 -1
- package/dist/api/datatables.js +1 -1
- package/dist/api/orders.js +1 -1
- package/dist/api/price.js +1 -1
- package/dist/api/products.d.ts +2 -2
- package/dist/api/products.js +1 -1
- package/dist/components/BreatheAnimation/index.js +1 -1
- package/dist/components/Button/index.d.ts +2 -2
- package/dist/components/DraggableHint/draggableIndicator.styles.d.ts +1 -1
- package/dist/components/PlayerLoadingSpinner/playerLoadingSpinner.styles.d.ts +1 -1
- package/dist/components/Share/index.js +1 -1
- package/dist/components/Share/share.styles.d.ts +1 -1
- package/dist/components/ThreekitProvider/index.js +3 -2
- package/dist/components/TurntableAnimation/index.js +1 -1
- package/dist/components/Upload/index.js +1 -1
- package/dist/components/UploadArea/index.js +1 -1
- package/dist/components/Wishlist/index.js +1 -1
- package/dist/connection.d.ts +4 -1
- package/dist/connection.js +16 -53
- package/dist/hooks/useAttribute/index.d.ts +4 -4
- package/dist/hooks/useAttribute/index.js +2 -6
- package/dist/hooks/useConfigurationLoader/index.js +1 -1
- package/dist/hooks/useConfigurator/index.d.ts +3 -3
- package/dist/hooks/useDevTools/index.d.ts +1 -1
- package/dist/hooks/useNestedConfigurator/index.d.ts +2 -2
- package/dist/hooks/useNestedConfigurator/index.js +3 -2
- package/dist/hooks/usePlayer/index.d.ts +1 -1
- package/dist/hooks/usePlayerPortal/index.d.ts +1 -1
- package/dist/hooks/useProductCache/index.js +1 -1
- package/dist/hooks/useResetProduct/index.d.ts +1 -1
- package/dist/hooks/useResetProduct/index.js +1 -1
- package/dist/hooks/useRoomBuilder/RoomBuilderState.d.ts +95 -0
- package/dist/hooks/useRoomBuilder/RoomBuilderState.js +1237 -0
- package/dist/hooks/useRoomBuilder/constants.d.ts +41 -0
- package/dist/hooks/useRoomBuilder/constants.js +48 -0
- package/dist/hooks/useRoomBuilder/dataHandlers.d.ts +18 -0
- package/dist/hooks/useRoomBuilder/dataHandlers.js +187 -0
- package/dist/hooks/useRoomBuilder/draw.d.ts +55 -0
- package/dist/hooks/useRoomBuilder/draw.js +573 -0
- package/dist/hooks/useRoomBuilder/findLoops.d.ts +5 -0
- package/dist/hooks/useRoomBuilder/findLoops.js +99 -0
- package/dist/hooks/useRoomBuilder/geometry.d.ts +33 -0
- package/dist/hooks/useRoomBuilder/geometry.js +325 -0
- package/dist/hooks/useRoomBuilder/index.d.ts +40 -0
- package/dist/hooks/useRoomBuilder/index.js +303 -0
- package/dist/hooks/useRoomBuilder/messaging.d.ts +8 -0
- package/dist/hooks/useRoomBuilder/messaging.js +18 -0
- package/dist/hooks/useRoomBuilder/themes.d.ts +12 -0
- package/dist/hooks/useRoomBuilder/themes.js +273 -0
- package/dist/hooks/useRoomBuilder/types.d.ts +238 -0
- package/dist/hooks/useRoomBuilder/types.js +36 -0
- package/dist/hooks/useRoomBuilder/validators.d.ts +36 -0
- package/dist/hooks/useRoomBuilder/validators.js +362 -0
- package/dist/hooks/useShare/index.d.ts +1 -1
- package/dist/hooks/useShare/index.js +1 -1
- package/dist/hooks/useSingleAnimation/index.js +1 -1
- package/dist/hooks/useSnapshot/index.d.ts +1 -1
- package/dist/hooks/useWishlist/index.d.ts +1 -1
- package/dist/hooks/useZoom/index.d.ts +1 -1
- package/dist/http/orders.d.ts +1 -1
- package/dist/icons/Draw.js +3 -3
- package/dist/icons/Window.js +4 -4
- package/dist/icons/index.js +0 -26
- package/dist/index.d.ts +2 -16
- package/dist/index.js +5 -33
- package/dist/store/attributes.d.ts +1 -2
- package/dist/store/attributes.js +1 -1
- package/dist/store/index.d.ts +2 -9
- package/dist/store/index.js +1 -3
- package/dist/store/price.js +1 -1
- package/dist/store/product.d.ts +1 -1
- package/dist/store/product.js +8 -5
- package/dist/store/translations.js +1 -1
- package/dist/store/treble.d.ts +4 -2
- package/dist/store/treble.js +60 -43
- package/dist/store/wishlist.d.ts +1 -1
- package/dist/store/wishlist.js +1 -1
- package/dist/types.d.ts +25 -21
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/package.json +2 -1
|
@@ -25,7 +25,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
25
25
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
26
|
function step(op) {
|
|
27
27
|
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (
|
|
28
|
+
while (_) try {
|
|
29
29
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
30
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
31
|
switch (op[0]) {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ISnapshotsCameras, ITakeSnapshotsConfig } from '../../Treble';
|
|
2
|
-
declare const useSnapshot: (cameras: ISnapshotsCameras, config: ITakeSnapshotsConfig) => (() => Promise<void | string[] |
|
|
2
|
+
declare const useSnapshot: (cameras: ISnapshotsCameras, config: ITakeSnapshotsConfig) => (() => Promise<void | string[] | Blob[] | File[] | null>) | undefined;
|
|
3
3
|
export default useSnapshot;
|
|
@@ -5,7 +5,7 @@ interface HydratedWishlistItem extends IConfigurationResponse {
|
|
|
5
5
|
handleRemove: () => void;
|
|
6
6
|
handleShare: () => void;
|
|
7
7
|
}
|
|
8
|
-
type UseWishlistHook = [
|
|
8
|
+
declare type UseWishlistHook = [
|
|
9
9
|
Array<HydratedWishlistItem>,
|
|
10
10
|
(config?: Omit<ISaveConfiguration, 'configuration'>) => void,
|
|
11
11
|
() => void
|
package/dist/http/orders.d.ts
CHANGED
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 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
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", color: props.color },
|
|
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", className: "tk-icon" })));
|
|
17
17
|
};
|
|
18
18
|
exports.Draw = Draw;
|
|
19
19
|
exports.Draw.iconName = 'draw';
|
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 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
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", color: props.color },
|
|
16
|
+
react_1.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", 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", className: "tk-icon" }),
|
|
17
|
+
react_1.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", 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", className: "tk-icon" })));
|
|
18
18
|
};
|
|
19
19
|
exports.Window = Window;
|
|
20
20
|
exports.Window.iconName = 'window';
|
package/dist/icons/index.js
CHANGED
|
@@ -33,12 +33,9 @@ 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"));
|
|
37
36
|
var Redo_1 = __importDefault(require("./Redo"));
|
|
38
37
|
var Remove_1 = __importDefault(require("./Remove"));
|
|
39
38
|
var Ruler_1 = __importDefault(require("./Ruler"));
|
|
40
|
-
var RulerBlank_1 = __importDefault(require("./RulerBlank"));
|
|
41
|
-
var RulerDetailed_1 = __importDefault(require("./RulerDetailed"));
|
|
42
39
|
var Search_1 = __importDefault(require("./Search"));
|
|
43
40
|
var Settings_1 = __importDefault(require("./Settings"));
|
|
44
41
|
var Share_1 = __importDefault(require("./Share"));
|
|
@@ -59,16 +56,6 @@ var Window_1 = __importDefault(require("./Window"));
|
|
|
59
56
|
var Wall_1 = __importDefault(require("./Wall"));
|
|
60
57
|
var TrashCan_1 = __importDefault(require("./TrashCan"));
|
|
61
58
|
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
59
|
exports.default = (_a = {},
|
|
73
60
|
_a[Add_1.default.iconName] = Add_1.default,
|
|
74
61
|
_a[ArrowLeft_1.default.iconName] = ArrowLeft_1.default,
|
|
@@ -99,12 +86,9 @@ exports.default = (_a = {},
|
|
|
99
86
|
_a[NewWindow_1.default.iconName] = NewWindow_1.default,
|
|
100
87
|
_a[Pause_1.default.iconName] = Pause_1.default,
|
|
101
88
|
_a[Play_1.default.iconName] = Play_1.default,
|
|
102
|
-
_a[Player3D_1.default.iconName] = Player3D_1.default,
|
|
103
89
|
_a[Redo_1.default.iconName] = Redo_1.default,
|
|
104
90
|
_a[Remove_1.default.iconName] = Remove_1.default,
|
|
105
91
|
_a[Ruler_1.default.iconName] = Ruler_1.default,
|
|
106
|
-
_a[RulerBlank_1.default.iconName] = RulerBlank_1.default,
|
|
107
|
-
_a[RulerDetailed_1.default.iconName] = RulerDetailed_1.default,
|
|
108
92
|
_a[Search_1.default.iconName] = Search_1.default,
|
|
109
93
|
_a[Settings_1.default.iconName] = Settings_1.default,
|
|
110
94
|
_a[Share_1.default.iconName] = Share_1.default,
|
|
@@ -125,14 +109,4 @@ exports.default = (_a = {},
|
|
|
125
109
|
_a[Wall_1.default.iconName] = Wall_1.default,
|
|
126
110
|
_a[TrashCan_1.default.iconName] = TrashCan_1.default,
|
|
127
111
|
_a[TrashCanAlt_1.default.iconName] = TrashCanAlt_1.default,
|
|
128
|
-
_a[GridSnapping_1.default.iconName] = GridSnapping_1.default,
|
|
129
|
-
_a[AngleSnapping_1.default.iconName] = AngleSnapping_1.default,
|
|
130
|
-
_a[Center_1.default.iconName] = Center_1.default,
|
|
131
|
-
_a[LayoutAlt_1.default.iconName] = LayoutAlt_1.default,
|
|
132
|
-
_a[Magnet_1.default.iconName] = Magnet_1.default,
|
|
133
|
-
_a[Save_1.default.iconName] = Save_1.default,
|
|
134
|
-
_a[UnitCm_1.default.iconName] = UnitCm_1.default,
|
|
135
|
-
_a[UnitMeter_1.default.iconName] = UnitMeter_1.default,
|
|
136
|
-
_a[UnitFeet_1.default.iconName] = UnitFeet_1.default,
|
|
137
|
-
_a[UnitInch_1.default.iconName] = UnitInch_1.default,
|
|
138
112
|
_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 useRoomBuilder from './hooks/useRoomBuilder';
|
|
22
22
|
import ThreekitProvider from './components/ThreekitProvider';
|
|
23
23
|
import Player from './components/Player';
|
|
24
24
|
import Button from './components/Button';
|
|
@@ -57,7 +57,6 @@ 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';
|
|
61
60
|
import AddIcon from './icons/Add';
|
|
62
61
|
import ArrowLeftIcon from './icons/ArrowLeft';
|
|
63
62
|
import ArrowRightIcon from './icons/ArrowRight';
|
|
@@ -87,12 +86,9 @@ import MoreIcon from './icons/More';
|
|
|
87
86
|
import NewWindowIcon from './icons/NewWindow';
|
|
88
87
|
import PauseIcon from './icons/Pause';
|
|
89
88
|
import PlayIcon from './icons/Play';
|
|
90
|
-
import Player3DIcon from './icons/Player3D';
|
|
91
89
|
import RedoIcon from './icons/Redo';
|
|
92
90
|
import RemoveIcon from './icons/Remove';
|
|
93
91
|
import RulerIcon from './icons/Ruler';
|
|
94
|
-
import RulerBlankIcon from './icons/RulerBlank';
|
|
95
|
-
import RulerDetailedIcon from './icons/RulerDetailed';
|
|
96
92
|
import SearchIcon from './icons/Search';
|
|
97
93
|
import SettingsIcon from './icons/Settings';
|
|
98
94
|
import ShareIcon from './icons/Share';
|
|
@@ -113,14 +109,4 @@ import DoorIcon from './icons/Door';
|
|
|
113
109
|
import OpeningIcon from './icons/Opening';
|
|
114
110
|
import WallIcon from './icons/Wall';
|
|
115
111
|
import LayoutIcon from './icons/Layout';
|
|
116
|
-
|
|
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
|
-
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, };
|
|
112
|
+
export { useAttribute, useConfigurator, useConfigurationLoader, useFirstPlayerInteraction, useMetadata, useName, usePlayerLoadingStatus, useConfigurationChangeStatus, usePrice, useThreekitInitStatus, useZoom, useSnapshot, useWishlist, useShare, usePlayerPortal, useProductCache, useNestedConfigurator, useLoadingProgress, usePlayer, useRoomBuilder, 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, 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, RedoIcon, RemoveIcon, RulerIcon, SearchIcon, SettingsIcon, ShareIcon, SwitchIcon, TagIcon, UndoIcon, WishlistIcon, ZoomInIcon, ZoomOutIcon, SpinnerIcon, AngleIcon, TrashCanIcon, TrashCanAltIcon, CursorIcon, WindowIcon, DrawIcon, DoorIcon, OpeningIcon, WallIcon, LayoutIcon, };
|
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.
|
|
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.useRoomBuilder = 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.ZoomOutIcon = exports.ZoomInIcon = exports.WishlistIcon = exports.UndoIcon = exports.TagIcon = exports.SwitchIcon = exports.ShareIcon = exports.SettingsIcon = exports.SearchIcon = exports.RulerIcon = exports.RemoveIcon = exports.RedoIcon = 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.BreatheAnimation = exports.TurntableAnimation = exports.DraggableHint = exports.PlayerLoadingSpinner = exports.PlayerLoadingCircular = exports.ProductLayout = exports.TrebleApp = exports.Share = exports.Wishlist = void 0;
|
|
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;
|
|
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 useRoomBuilder_1 = __importDefault(require("./hooks/useRoomBuilder"));
|
|
50
|
+
exports.useRoomBuilder = useRoomBuilder_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,8 +124,6 @@ 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;
|
|
129
127
|
var Add_1 = __importDefault(require("./icons/Add"));
|
|
130
128
|
exports.AddIcon = Add_1.default;
|
|
131
129
|
var ArrowLeft_1 = __importDefault(require("./icons/ArrowLeft"));
|
|
@@ -184,18 +182,12 @@ var Pause_1 = __importDefault(require("./icons/Pause"));
|
|
|
184
182
|
exports.PauseIcon = Pause_1.default;
|
|
185
183
|
var Play_1 = __importDefault(require("./icons/Play"));
|
|
186
184
|
exports.PlayIcon = Play_1.default;
|
|
187
|
-
var Player3D_1 = __importDefault(require("./icons/Player3D"));
|
|
188
|
-
exports.Player3DIcon = Player3D_1.default;
|
|
189
185
|
var Redo_1 = __importDefault(require("./icons/Redo"));
|
|
190
186
|
exports.RedoIcon = Redo_1.default;
|
|
191
187
|
var Remove_1 = __importDefault(require("./icons/Remove"));
|
|
192
188
|
exports.RemoveIcon = Remove_1.default;
|
|
193
189
|
var Ruler_1 = __importDefault(require("./icons/Ruler"));
|
|
194
190
|
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;
|
|
199
191
|
var Search_1 = __importDefault(require("./icons/Search"));
|
|
200
192
|
exports.SearchIcon = Search_1.default;
|
|
201
193
|
var Settings_1 = __importDefault(require("./icons/Settings"));
|
|
@@ -236,23 +228,3 @@ var Wall_1 = __importDefault(require("./icons/Wall"));
|
|
|
236
228
|
exports.WallIcon = Wall_1.default;
|
|
237
229
|
var Layout_1 = __importDefault(require("./icons/Layout"));
|
|
238
230
|
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;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RootState, ThreekitDispatch } from './index';
|
|
2
2
|
import { ISetConfiguration, IThreekitDisplayAttribute } from '../types';
|
|
3
3
|
import { ITranslationMap } from '../api/products';
|
|
4
|
-
export type AttributesState = Record<string, IThreekitDisplayAttribute>;
|
|
4
|
+
export declare type AttributesState = Record<string, IThreekitDisplayAttribute>;
|
|
5
5
|
export declare const setAttributes: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[attributes: IThreekitDisplayAttribute[]], Record<string, IThreekitDisplayAttribute>, "treble/attributes/set-attributes", never, never>;
|
|
6
6
|
declare const reducer: import("redux").Reducer<AttributesState, import("redux").AnyAction>;
|
|
7
7
|
export declare const getAttributes: (state: RootState) => AttributesState;
|
|
@@ -12,7 +12,6 @@ export declare const getHydrationData: ((state: {
|
|
|
12
12
|
translations: import("./translations").TranslationsState;
|
|
13
13
|
wishlist: import("../Treble").WishlistArray;
|
|
14
14
|
price: import("./price").PriceState;
|
|
15
|
-
spaces: import("./spaces").SpacesState;
|
|
16
15
|
}) => [Record<string, IThreekitDisplayAttribute>, ITranslationMap | undefined, string | undefined]) & import("reselect").OutputSelectorFields<(args_0: AttributesState, args_1: string | undefined) => [Record<string, IThreekitDisplayAttribute>, ITranslationMap | undefined, string | undefined], {
|
|
17
16
|
clearCache: () => void;
|
|
18
17
|
}> & {
|
package/dist/store/attributes.js
CHANGED
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (
|
|
17
|
+
while (_) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
package/dist/store/index.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ declare const store: import("@reduxjs/toolkit/dist/configureStore").ToolkitStore
|
|
|
7
7
|
translations: import("./translations").TranslationsState;
|
|
8
8
|
wishlist: import("../Treble").WishlistArray;
|
|
9
9
|
price: import("./price").PriceState;
|
|
10
|
-
spaces: import("./spaces").SpacesState;
|
|
11
10
|
}, import("redux").AnyAction, import("@reduxjs/toolkit").MiddlewareArray<[import("@reduxjs/toolkit").ThunkMiddleware<{
|
|
12
11
|
treble: import("./treble").TrebleState;
|
|
13
12
|
product: import("./product").ProductState;
|
|
@@ -15,7 +14,6 @@ declare const store: import("@reduxjs/toolkit/dist/configureStore").ToolkitStore
|
|
|
15
14
|
translations: import("./translations").TranslationsState;
|
|
16
15
|
wishlist: import("../Treble").WishlistArray;
|
|
17
16
|
price: import("./price").PriceState;
|
|
18
|
-
spaces: import("./spaces").SpacesState;
|
|
19
17
|
}, import("redux").AnyAction, undefined>]> | import("@reduxjs/toolkit").MiddlewareArray<[import("@reduxjs/toolkit").ThunkMiddleware<{
|
|
20
18
|
treble: import("./treble").TrebleState;
|
|
21
19
|
product: import("./product").ProductState;
|
|
@@ -23,7 +21,6 @@ declare const store: import("@reduxjs/toolkit/dist/configureStore").ToolkitStore
|
|
|
23
21
|
translations: import("./translations").TranslationsState;
|
|
24
22
|
wishlist: import("../Treble").WishlistArray;
|
|
25
23
|
price: import("./price").PriceState;
|
|
26
|
-
spaces: import("./spaces").SpacesState;
|
|
27
24
|
}, import("redux").AnyAction, undefined>, import("redux").Middleware<{}, any, import("redux").Dispatch<import("redux").AnyAction>>]>>;
|
|
28
25
|
export declare const createStore: (reducer?: Record<string, Reducer>) => import("@reduxjs/toolkit/dist/configureStore").ToolkitStore<{
|
|
29
26
|
treble: import("./treble").TrebleState;
|
|
@@ -32,7 +29,6 @@ export declare const createStore: (reducer?: Record<string, Reducer>) => import(
|
|
|
32
29
|
translations: import("./translations").TranslationsState;
|
|
33
30
|
wishlist: import("../Treble").WishlistArray;
|
|
34
31
|
price: import("./price").PriceState;
|
|
35
|
-
spaces: import("./spaces").SpacesState;
|
|
36
32
|
}, import("redux").AnyAction, import("@reduxjs/toolkit").MiddlewareArray<[import("@reduxjs/toolkit").ThunkMiddleware<{
|
|
37
33
|
treble: import("./treble").TrebleState;
|
|
38
34
|
product: import("./product").ProductState;
|
|
@@ -40,7 +36,6 @@ export declare const createStore: (reducer?: Record<string, Reducer>) => import(
|
|
|
40
36
|
translations: import("./translations").TranslationsState;
|
|
41
37
|
wishlist: import("../Treble").WishlistArray;
|
|
42
38
|
price: import("./price").PriceState;
|
|
43
|
-
spaces: import("./spaces").SpacesState;
|
|
44
39
|
}, import("redux").AnyAction, undefined>]> | import("@reduxjs/toolkit").MiddlewareArray<[import("@reduxjs/toolkit").ThunkMiddleware<{
|
|
45
40
|
treble: import("./treble").TrebleState;
|
|
46
41
|
product: import("./product").ProductState;
|
|
@@ -48,10 +43,9 @@ export declare const createStore: (reducer?: Record<string, Reducer>) => import(
|
|
|
48
43
|
translations: import("./translations").TranslationsState;
|
|
49
44
|
wishlist: import("../Treble").WishlistArray;
|
|
50
45
|
price: import("./price").PriceState;
|
|
51
|
-
spaces: import("./spaces").SpacesState;
|
|
52
46
|
}, import("redux").AnyAction, undefined>, import("redux").Middleware<{}, any, import("redux").Dispatch<import("redux").AnyAction>>]>>;
|
|
53
|
-
export type RootState = ReturnType<typeof store.getState>;
|
|
54
|
-
export type ThreekitDispatch = typeof store.dispatch;
|
|
47
|
+
export declare type RootState = ReturnType<typeof store.getState>;
|
|
48
|
+
export declare type ThreekitDispatch = typeof store.dispatch;
|
|
55
49
|
export declare const useThreekitDispatch: () => import("@reduxjs/toolkit").ThunkDispatch<{
|
|
56
50
|
treble: import("./treble").TrebleState;
|
|
57
51
|
product: import("./product").ProductState;
|
|
@@ -59,7 +53,6 @@ export declare const useThreekitDispatch: () => import("@reduxjs/toolkit").Thunk
|
|
|
59
53
|
translations: import("./translations").TranslationsState;
|
|
60
54
|
wishlist: import("../Treble").WishlistArray;
|
|
61
55
|
price: import("./price").PriceState;
|
|
62
|
-
spaces: import("./spaces").SpacesState;
|
|
63
56
|
}, undefined, import("redux").AnyAction> & import("redux").Dispatch<import("redux").AnyAction>;
|
|
64
57
|
export declare const useThreekitSelector: TypedUseSelectorHook<RootState>;
|
|
65
58
|
export default createStore;
|
package/dist/store/index.js
CHANGED
|
@@ -25,7 +25,6 @@ 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"));
|
|
29
28
|
var store = (0, toolkit_1.configureStore)({
|
|
30
29
|
reducer: {
|
|
31
30
|
treble: treble_1.default,
|
|
@@ -34,7 +33,6 @@ var store = (0, toolkit_1.configureStore)({
|
|
|
34
33
|
translations: translations_1.default,
|
|
35
34
|
wishlist: wishlist_1.default,
|
|
36
35
|
price: price_1.default,
|
|
37
|
-
spaces: spaces_1.default,
|
|
38
36
|
},
|
|
39
37
|
middleware: function (getDefaultMiddleware) {
|
|
40
38
|
return constants_1.TREBLE_DEBUG
|
|
@@ -46,7 +44,7 @@ var createStore = function (reducer) {
|
|
|
46
44
|
if (!reducer)
|
|
47
45
|
return store;
|
|
48
46
|
return (0, toolkit_1.configureStore)({
|
|
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
|
|
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 }),
|
|
50
48
|
middleware: function (getDefaultMiddleware) {
|
|
51
49
|
return constants_1.TREBLE_DEBUG
|
|
52
50
|
? getDefaultMiddleware().concat(redux_logger_1.default)
|
package/dist/store/price.js
CHANGED
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (
|
|
17
|
+
while (_) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
package/dist/store/product.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export interface LoadProductConfig {
|
|
|
16
16
|
export interface CachedProductState extends Pick<CachedProduct, 'id' | 'name' | 'label' | 'thumbnail'> {
|
|
17
17
|
data: string;
|
|
18
18
|
}
|
|
19
|
-
type IEnvConfig = Record<string, Partial<IProduct>>;
|
|
19
|
+
declare type IEnvConfig = Record<string, Partial<IProduct>>;
|
|
20
20
|
export interface IHydratedProducts extends Record<string, IEnvConfig> {
|
|
21
21
|
}
|
|
22
22
|
export interface ProductState {
|
package/dist/store/product.js
CHANGED
|
@@ -25,7 +25,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
25
25
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
26
|
function step(op) {
|
|
27
27
|
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (
|
|
28
|
+
while (_) try {
|
|
29
29
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
30
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
31
|
switch (op[0]) {
|
|
@@ -52,6 +52,7 @@ 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");
|
|
55
56
|
var connection_1 = __importDefault(require("../connection"));
|
|
56
57
|
var treble_1 = require("./treble");
|
|
57
58
|
var attributes_1 = require("./attributes");
|
|
@@ -156,7 +157,8 @@ var initProduct = function () { return function (dispatch, getState) {
|
|
|
156
157
|
var metadata = window.threekit.configurator.getMetadata();
|
|
157
158
|
var productId = state.product.id;
|
|
158
159
|
if (productId && !INITIAL_CONFIGURATIONS[productId]) {
|
|
159
|
-
var
|
|
160
|
+
var player = window.threekit.player.enableApi(types_1.PRIVATE_APIS.PLAYER);
|
|
161
|
+
var configuration = player.configurator.getFullConfiguration();
|
|
160
162
|
INITIAL_CONFIGURATIONS[productId] = JSON.stringify(configuration);
|
|
161
163
|
}
|
|
162
164
|
dispatch((0, exports.setName)(name));
|
|
@@ -174,7 +176,8 @@ var cacheActiveProduct = function (config) {
|
|
|
174
176
|
var thumbnail = config === null || config === void 0 ? void 0 : config.thumbnail;
|
|
175
177
|
var connectionObj = connection_1.default.getConnection();
|
|
176
178
|
delete connectionObj.threekitDomain;
|
|
177
|
-
var
|
|
179
|
+
var player = window.threekit.player.enableApi(types_1.PRIVATE_APIS.PLAYER);
|
|
180
|
+
var configuration = player.configurator.getFullConfiguration();
|
|
178
181
|
var data = { connection: connectionObj, configuration: configuration };
|
|
179
182
|
var product = Object.assign({
|
|
180
183
|
id: state.product.id,
|
|
@@ -250,19 +253,19 @@ var changeActiveCacheIdx = function (idx) {
|
|
|
250
253
|
state = getState();
|
|
251
254
|
cache = state.product.cache;
|
|
252
255
|
if (idx >= cache.length)
|
|
253
|
-
return [2];
|
|
256
|
+
return [2, Promise.resolve()];
|
|
254
257
|
dispatch((0, exports.cacheActiveProduct)());
|
|
255
258
|
cachedProduct = __assign({}, state.product.cache[idx]);
|
|
256
259
|
data = JSON.parse(cachedProduct.data);
|
|
257
260
|
connection_1.default.connect(data.connection);
|
|
258
261
|
dispatch((0, exports.setActiveCacheIdx)(idx));
|
|
262
|
+
dispatch((0, exports.setProductId)(cachedProduct.id));
|
|
259
263
|
return [4, dispatch((0, treble_1.reloadPlayer)({
|
|
260
264
|
assetId: data.connection.assetId,
|
|
261
265
|
configuration: data.configuration,
|
|
262
266
|
}))];
|
|
263
267
|
case 1:
|
|
264
268
|
_a.sent();
|
|
265
|
-
dispatch((0, exports.setProductId)(cachedProduct.id));
|
|
266
269
|
return [2];
|
|
267
270
|
}
|
|
268
271
|
});
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (
|
|
17
|
+
while (_) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
package/dist/store/treble.d.ts
CHANGED
|
@@ -3,13 +3,15 @@ import { IProject, IPlayerConfig, IThreekitDisplayAttribute, ISetConfiguration,
|
|
|
3
3
|
export interface IPlayerInit {
|
|
4
4
|
el: HTMLElement;
|
|
5
5
|
authToken: string;
|
|
6
|
-
assetId
|
|
6
|
+
assetId?: string;
|
|
7
|
+
customId?: string;
|
|
7
8
|
stageId?: string;
|
|
8
9
|
playerConfig: IPlayerConfig;
|
|
9
10
|
initialConfiguration?: IConfiguration;
|
|
10
11
|
}
|
|
11
12
|
export interface ILaunchConfig {
|
|
12
13
|
assetId?: string;
|
|
14
|
+
customId?: string;
|
|
13
15
|
productId: string;
|
|
14
16
|
threekitEnv: string;
|
|
15
17
|
serverUrl: string;
|
|
@@ -64,6 +66,6 @@ export declare const getLoadingProgress: (state: RootState) => undefined | numbe
|
|
|
64
66
|
export declare const getPlayerInteraction: (state: RootState) => undefined | boolean;
|
|
65
67
|
export declare const initPlayer: (config: IPlayerInit) => (dispatch: ThreekitDispatch, getState: () => RootState) => Promise<void>;
|
|
66
68
|
export declare const launch: (launchConfig?: Partial<ILaunchConfig>) => (dispatch: ThreekitDispatch) => Promise<void>;
|
|
67
|
-
export declare const unloadPlayer: (dispatch: ThreekitDispatch) => Promise<
|
|
69
|
+
export declare const unloadPlayer: () => (dispatch: ThreekitDispatch) => Promise<void>;
|
|
68
70
|
export declare const reloadPlayer: (config: undefined | string | Pick<IReloadConfig, 'assetId' | 'stageId' | 'configurationId' | 'configuration'>) => (dispatch: ThreekitDispatch, getState: () => RootState) => Promise<void>;
|
|
69
71
|
export default reducer;
|