@threekit-tools/treble 0.0.88 → 0.0.89-next-002
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/components/AttributeValue/index.js +2 -0
- package/dist/components/Wishlist/index.d.ts +1 -1
- package/dist/components/Zoom/index.d.ts +1 -1
- package/dist/components/containers/formInputContainer.d.ts +1 -1
- package/dist/connection.d.ts +4 -0
- package/dist/connection.js +3 -0
- package/dist/hooks/useProductCache/index.d.ts +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/http/request.js +4 -1
- package/dist/icons/Add.d.ts +1 -1
- package/dist/icons/Add.js +3 -3
- package/dist/icons/Angle.d.ts +3 -0
- package/dist/icons/Angle.js +21 -0
- package/dist/icons/ArrowLeft.d.ts +1 -1
- package/dist/icons/ArrowLeft.js +3 -3
- package/dist/icons/ArrowRight.d.ts +1 -1
- package/dist/icons/ArrowRight.js +3 -3
- package/dist/icons/Camera.d.ts +1 -1
- package/dist/icons/Camera.js +3 -3
- package/dist/icons/CaretDown.d.ts +1 -1
- package/dist/icons/CaretDown.js +3 -3
- package/dist/icons/CaretLeft.d.ts +1 -1
- package/dist/icons/CaretLeft.js +3 -3
- package/dist/icons/CaretRight.d.ts +1 -1
- package/dist/icons/CaretRight.js +3 -3
- package/dist/icons/CaretUp.d.ts +1 -1
- package/dist/icons/CaretUp.js +3 -3
- package/dist/icons/Cart.d.ts +1 -1
- package/dist/icons/Cart.js +3 -3
- package/dist/icons/Checkmate.d.ts +1 -1
- package/dist/icons/Checkmate.js +3 -3
- package/dist/icons/Clipboard.d.ts +1 -1
- package/dist/icons/Clipboard.js +3 -3
- package/dist/icons/ColorPicker.d.ts +1 -1
- package/dist/icons/ColorPicker.js +3 -3
- package/dist/icons/Copy.d.ts +1 -1
- package/dist/icons/Copy.js +3 -3
- package/dist/icons/Cursor.d.ts +3 -0
- package/dist/icons/Cursor.js +21 -0
- package/dist/icons/Delete.d.ts +1 -1
- package/dist/icons/Delete.js +3 -3
- package/dist/icons/Door.d.ts +3 -0
- package/dist/icons/Door.js +22 -0
- package/dist/icons/DoubleCaretLeft.d.ts +1 -1
- package/dist/icons/DoubleCaretLeft.js +3 -3
- package/dist/icons/DoubleCaretRight.d.ts +1 -1
- package/dist/icons/DoubleCaretRight.js +3 -3
- package/dist/icons/Download.d.ts +1 -1
- package/dist/icons/Download.js +3 -3
- package/dist/icons/Drag.d.ts +1 -1
- package/dist/icons/Drag.js +3 -3
- package/dist/icons/Draggable.d.ts +1 -1
- package/dist/icons/Draggable.js +3 -3
- package/dist/icons/Draw.d.ts +3 -0
- package/dist/icons/Draw.js +21 -0
- package/dist/icons/Edit.d.ts +1 -1
- package/dist/icons/Edit.js +3 -3
- package/dist/icons/Heart.d.ts +1 -1
- package/dist/icons/Heart.js +3 -3
- package/dist/icons/Image.d.ts +1 -1
- package/dist/icons/Image.js +3 -3
- package/dist/icons/Info.d.ts +1 -1
- package/dist/icons/Info.js +3 -3
- package/dist/icons/Layout.d.ts +3 -0
- package/dist/icons/Layout.js +21 -0
- package/dist/icons/Mail.d.ts +1 -1
- package/dist/icons/Mail.js +3 -3
- package/dist/icons/Menu.d.ts +1 -1
- package/dist/icons/Menu.js +3 -3
- package/dist/icons/More.d.ts +1 -1
- package/dist/icons/More.js +3 -3
- package/dist/icons/NewWindow.d.ts +1 -1
- package/dist/icons/NewWindow.js +3 -3
- package/dist/icons/Opening.d.ts +3 -0
- package/dist/icons/Opening.js +21 -0
- package/dist/icons/Pause.d.ts +1 -1
- package/dist/icons/Pause.js +3 -3
- package/dist/icons/Play.d.ts +1 -1
- package/dist/icons/Play.js +3 -3
- package/dist/icons/Redo.d.ts +1 -1
- package/dist/icons/Redo.js +3 -3
- package/dist/icons/Remove.d.ts +1 -1
- package/dist/icons/Remove.js +3 -3
- package/dist/icons/Ruler.d.ts +1 -1
- package/dist/icons/Ruler.js +3 -3
- package/dist/icons/Search.d.ts +1 -1
- package/dist/icons/Search.js +3 -3
- package/dist/icons/Settings.d.ts +1 -1
- package/dist/icons/Settings.js +3 -3
- package/dist/icons/Share.d.ts +1 -1
- package/dist/icons/Share.js +3 -3
- package/dist/icons/Switch.d.ts +1 -1
- package/dist/icons/Switch.js +3 -3
- package/dist/icons/Tag.d.ts +1 -1
- package/dist/icons/Tag.js +3 -3
- package/dist/icons/TrashCan.d.ts +3 -0
- package/dist/icons/TrashCan.js +21 -0
- package/dist/icons/TrashCanAlt.d.ts +3 -0
- package/dist/icons/TrashCanAlt.js +21 -0
- package/dist/icons/Undo.d.ts +1 -1
- package/dist/icons/Undo.js +3 -3
- package/dist/icons/Wall.d.ts +3 -0
- package/dist/icons/Wall.js +21 -0
- package/dist/icons/Window.d.ts +3 -0
- package/dist/icons/Window.js +22 -0
- package/dist/icons/Wishlist.d.ts +1 -1
- package/dist/icons/Wishlist.js +3 -3
- package/dist/icons/ZoomIn.d.ts +1 -1
- package/dist/icons/ZoomIn.js +3 -3
- package/dist/icons/ZoomOut.d.ts +1 -1
- package/dist/icons/ZoomOut.js +3 -3
- package/dist/icons/index.d.ts +2 -6
- package/dist/icons/index.js +20 -0
- package/dist/icons/types.d.ts +7 -0
- package/dist/icons/types.js +2 -0
- package/dist/index.d.ts +12 -1
- package/dist/index.js +25 -2
- package/dist/store/index.d.ts +8 -29
- package/dist/store/product.d.ts +1 -1
- package/dist/store/product.js +6 -7
- package/dist/store/treble.js +6 -1
- package/dist/types.d.ts +47 -7
- package/dist/types.js +1 -0
- package/package.json +1 -1
package/dist/icons/ZoomOut.d.ts
CHANGED
package/dist/icons/ZoomOut.js
CHANGED
|
@@ -10,9 +10,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
10
10
|
exports.ZoomOut = 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 stroke: ", ";\n }\n"], ["\n .tk-icon {\n stroke: ", ";\n }\n"])), function (props) { return props.theme.textColor; });
|
|
14
|
-
var ZoomOut = function () {
|
|
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" },
|
|
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
|
+
var ZoomOut = function (props) {
|
|
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
16
|
react_1.default.createElement("path", { d: "M16 8.00002L8 8.00002", className: "tk-icon", strokeWidth: "2" }),
|
|
17
17
|
react_1.default.createElement("path", { d: "M7.75737 12.2427C10.1005 14.5858 13.8995 14.5858 16.2427 12.2427C18.5858 9.89951 18.5858 6.10052 16.2427 3.75737C13.8995 1.41423 10.1005 1.41423 7.75737 3.75737C5.41422 6.10052 5.41422 9.89951 7.75737 12.2427ZM7.75737 12.2427L5.9896 14.0104M5.9896 14.0104C6.34316 14.364 6.34316 14.364 5.9896 14.7175C5.63605 15.0711 3.51473 17.1924 3.16118 17.546C2.80762 17.8995 2.80762 17.8995 2.45407 17.546C2.10052 17.1924 2.10052 17.1924 2.45407 16.8389C2.80762 16.4853 4.92894 14.364 5.2825 14.0104C5.63605 13.6569 5.63605 13.6569 5.9896 14.0104Z", className: "tk-icon", strokeWidth: "2" })));
|
|
18
18
|
};
|
package/dist/icons/index.d.ts
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import SpinnerIcon from './Spinner';
|
|
3
|
-
export interface IIcon extends React.FC {
|
|
4
|
-
iconName: string;
|
|
5
|
-
}
|
|
1
|
+
import Spinner from './Spinner';
|
|
6
2
|
declare const _default: {
|
|
7
|
-
[x: string]: IIcon | typeof
|
|
3
|
+
[x: string]: import("./types").IIcon | typeof Spinner;
|
|
8
4
|
};
|
|
9
5
|
export default _default;
|
package/dist/icons/index.js
CHANGED
|
@@ -46,6 +46,16 @@ var Wishlist_1 = __importDefault(require("./Wishlist"));
|
|
|
46
46
|
var ZoomIn_1 = __importDefault(require("./ZoomIn"));
|
|
47
47
|
var ZoomOut_1 = __importDefault(require("./ZoomOut"));
|
|
48
48
|
var Spinner_1 = __importDefault(require("./Spinner"));
|
|
49
|
+
var Angle_1 = __importDefault(require("./Angle"));
|
|
50
|
+
var Cursor_1 = __importDefault(require("./Cursor"));
|
|
51
|
+
var Draw_1 = __importDefault(require("./Draw"));
|
|
52
|
+
var Door_1 = __importDefault(require("./Door"));
|
|
53
|
+
var Layout_1 = __importDefault(require("./Layout"));
|
|
54
|
+
var Opening_1 = __importDefault(require("./Opening"));
|
|
55
|
+
var Window_1 = __importDefault(require("./Window"));
|
|
56
|
+
var Wall_1 = __importDefault(require("./Wall"));
|
|
57
|
+
var TrashCan_1 = __importDefault(require("./TrashCan"));
|
|
58
|
+
var TrashCanAlt_1 = __importDefault(require("./TrashCanAlt"));
|
|
49
59
|
exports.default = (_a = {},
|
|
50
60
|
_a[Add_1.default.iconName] = Add_1.default,
|
|
51
61
|
_a[ArrowLeft_1.default.iconName] = ArrowLeft_1.default,
|
|
@@ -89,4 +99,14 @@ exports.default = (_a = {},
|
|
|
89
99
|
_a[ZoomIn_1.default.iconName] = ZoomIn_1.default,
|
|
90
100
|
_a[ZoomOut_1.default.iconName] = ZoomOut_1.default,
|
|
91
101
|
_a[Spinner_1.default.iconName] = Spinner_1.default,
|
|
102
|
+
_a[Angle_1.default.iconName] = Angle_1.default,
|
|
103
|
+
_a[Cursor_1.default.iconName] = Cursor_1.default,
|
|
104
|
+
_a[Draw_1.default.iconName] = Draw_1.default,
|
|
105
|
+
_a[Door_1.default.iconName] = Door_1.default,
|
|
106
|
+
_a[Layout_1.default.iconName] = Layout_1.default,
|
|
107
|
+
_a[Opening_1.default.iconName] = Opening_1.default,
|
|
108
|
+
_a[Window_1.default.iconName] = Window_1.default,
|
|
109
|
+
_a[Wall_1.default.iconName] = Wall_1.default,
|
|
110
|
+
_a[TrashCan_1.default.iconName] = TrashCan_1.default,
|
|
111
|
+
_a[TrashCanAlt_1.default.iconName] = TrashCanAlt_1.default,
|
|
92
112
|
_a);
|
package/dist/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ import useProductCache from './hooks/useProductCache';
|
|
|
16
16
|
import useNestedConfigurator from './hooks/useNestedConfigurator';
|
|
17
17
|
import useLoadingProgress from './hooks/useLoadingProgress';
|
|
18
18
|
import usePlayer from './hooks/usePlayer';
|
|
19
|
+
import useRoomBuilder from './hooks/useRoomBuilder';
|
|
19
20
|
import ThreekitProvider from './components/ThreekitProvider';
|
|
20
21
|
import Player from './components/Player';
|
|
21
22
|
import Button from './components/Button';
|
|
@@ -96,4 +97,14 @@ import WishlistIcon from './icons/Wishlist';
|
|
|
96
97
|
import ZoomInIcon from './icons/ZoomIn';
|
|
97
98
|
import ZoomOutIcon from './icons/ZoomOut';
|
|
98
99
|
import SpinnerIcon from './icons/Spinner';
|
|
99
|
-
|
|
100
|
+
import AngleIcon from './icons/Angle';
|
|
101
|
+
import TrashCanIcon from './icons/TrashCan';
|
|
102
|
+
import TrashCanAltIcon from './icons/TrashCanAlt';
|
|
103
|
+
import CursorIcon from './icons/Cursor';
|
|
104
|
+
import WindowIcon from './icons/Window';
|
|
105
|
+
import DrawIcon from './icons/Draw';
|
|
106
|
+
import DoorIcon from './icons/Door';
|
|
107
|
+
import OpeningIcon from './icons/Opening';
|
|
108
|
+
import WallIcon from './icons/Wall';
|
|
109
|
+
import LayoutIcon from './icons/Layout';
|
|
110
|
+
export { useAttribute, useConfigurator, useConfigurationLoader, useFirstPlayerInteraction, useMetadata, useName, usePlayerLoadingStatus, usePrice, useThreekitInitStatus, useZoom, useSnapshot, useWishlist, useShare, usePlayerPortal, useProductCache, useNestedConfigurator, useLoadingProgress, usePlayer, useRoomBuilder, 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,8 +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.
|
|
7
|
-
exports.SpinnerIcon = 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 = void 0;
|
|
6
|
+
exports.Share = exports.Wishlist = 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.useRoomBuilder = exports.usePlayer = exports.useLoadingProgress = exports.useNestedConfigurator = exports.useProductCache = exports.usePlayerPortal = exports.useShare = exports.useWishlist = exports.useSnapshot = exports.useZoom = exports.useThreekitInitStatus = exports.usePrice = exports.usePlayerLoadingStatus = exports.useName = exports.useMetadata = exports.useFirstPlayerInteraction = exports.useConfigurationLoader = exports.useConfigurator = exports.useAttribute = void 0;
|
|
7
|
+
exports.AngleIcon = exports.SpinnerIcon = 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 = void 0;
|
|
8
|
+
exports.LayoutIcon = exports.WallIcon = exports.OpeningIcon = exports.DoorIcon = exports.DrawIcon = exports.WindowIcon = exports.CursorIcon = exports.TrashCanAltIcon = exports.TrashCanIcon = void 0;
|
|
8
9
|
var useAttribute_1 = __importDefault(require("./hooks/useAttribute"));
|
|
9
10
|
exports.useAttribute = useAttribute_1.default;
|
|
10
11
|
var useConfigurator_1 = __importDefault(require("./hooks/useConfigurator"));
|
|
@@ -41,6 +42,8 @@ var useLoadingProgress_1 = __importDefault(require("./hooks/useLoadingProgress")
|
|
|
41
42
|
exports.useLoadingProgress = useLoadingProgress_1.default;
|
|
42
43
|
var usePlayer_1 = __importDefault(require("./hooks/usePlayer"));
|
|
43
44
|
exports.usePlayer = usePlayer_1.default;
|
|
45
|
+
var useRoomBuilder_1 = __importDefault(require("./hooks/useRoomBuilder"));
|
|
46
|
+
exports.useRoomBuilder = useRoomBuilder_1.default;
|
|
44
47
|
var ThreekitProvider_1 = __importDefault(require("./components/ThreekitProvider"));
|
|
45
48
|
exports.ThreekitProvider = ThreekitProvider_1.default;
|
|
46
49
|
var Player_1 = __importDefault(require("./components/Player"));
|
|
@@ -201,3 +204,23 @@ var ZoomOut_1 = __importDefault(require("./icons/ZoomOut"));
|
|
|
201
204
|
exports.ZoomOutIcon = ZoomOut_1.default;
|
|
202
205
|
var Spinner_1 = __importDefault(require("./icons/Spinner"));
|
|
203
206
|
exports.SpinnerIcon = Spinner_1.default;
|
|
207
|
+
var Angle_1 = __importDefault(require("./icons/Angle"));
|
|
208
|
+
exports.AngleIcon = Angle_1.default;
|
|
209
|
+
var TrashCan_1 = __importDefault(require("./icons/TrashCan"));
|
|
210
|
+
exports.TrashCanIcon = TrashCan_1.default;
|
|
211
|
+
var TrashCanAlt_1 = __importDefault(require("./icons/TrashCanAlt"));
|
|
212
|
+
exports.TrashCanAltIcon = TrashCanAlt_1.default;
|
|
213
|
+
var Cursor_1 = __importDefault(require("./icons/Cursor"));
|
|
214
|
+
exports.CursorIcon = Cursor_1.default;
|
|
215
|
+
var Window_1 = __importDefault(require("./icons/Window"));
|
|
216
|
+
exports.WindowIcon = Window_1.default;
|
|
217
|
+
var Draw_1 = __importDefault(require("./icons/Draw"));
|
|
218
|
+
exports.DrawIcon = Draw_1.default;
|
|
219
|
+
var Door_1 = __importDefault(require("./icons/Door"));
|
|
220
|
+
exports.DoorIcon = Door_1.default;
|
|
221
|
+
var Opening_1 = __importDefault(require("./icons/Opening"));
|
|
222
|
+
exports.OpeningIcon = Opening_1.default;
|
|
223
|
+
var Wall_1 = __importDefault(require("./icons/Wall"));
|
|
224
|
+
exports.WallIcon = Wall_1.default;
|
|
225
|
+
var Layout_1 = __importDefault(require("./icons/Layout"));
|
|
226
|
+
exports.LayoutIcon = Layout_1.default;
|
package/dist/store/index.d.ts
CHANGED
|
@@ -7,28 +7,21 @@ declare const store: import("@reduxjs/toolkit").EnhancedStore<{
|
|
|
7
7
|
translations: import("./translations").TranslationsState;
|
|
8
8
|
wishlist: import("../Treble").WishlistArray;
|
|
9
9
|
price: import("./price").PriceState;
|
|
10
|
-
}, import("redux").AnyAction, import("@reduxjs/toolkit").MiddlewareArray<import("redux-thunk").ThunkMiddleware<{
|
|
10
|
+
}, import("redux").AnyAction, import("@reduxjs/toolkit").MiddlewareArray<[import("redux-thunk").ThunkMiddleware<{
|
|
11
11
|
treble: import("./treble").TrebleState;
|
|
12
12
|
product: import("./product").ProductState;
|
|
13
13
|
attributes: import("./attributes").AttributesState;
|
|
14
14
|
translations: import("./translations").TranslationsState;
|
|
15
15
|
wishlist: import("../Treble").WishlistArray;
|
|
16
16
|
price: import("./price").PriceState;
|
|
17
|
-
}, import("redux").AnyAction,
|
|
17
|
+
}, import("redux").AnyAction, undefined>]> | import("@reduxjs/toolkit").MiddlewareArray<[import("redux-thunk").ThunkMiddleware<{
|
|
18
18
|
treble: import("./treble").TrebleState;
|
|
19
19
|
product: import("./product").ProductState;
|
|
20
20
|
attributes: import("./attributes").AttributesState;
|
|
21
21
|
translations: import("./translations").TranslationsState;
|
|
22
22
|
wishlist: import("../Treble").WishlistArray;
|
|
23
23
|
price: import("./price").PriceState;
|
|
24
|
-
}, import("redux").AnyAction, undefined
|
|
25
|
-
treble: import("./treble").TrebleState;
|
|
26
|
-
product: import("./product").ProductState;
|
|
27
|
-
attributes: import("./attributes").AttributesState;
|
|
28
|
-
translations: import("./translations").TranslationsState;
|
|
29
|
-
wishlist: import("../Treble").WishlistArray;
|
|
30
|
-
price: import("./price").PriceState;
|
|
31
|
-
}, import("redux").Dispatch<import("redux").AnyAction>>>>;
|
|
24
|
+
}, import("redux").AnyAction, undefined>, import("redux").Middleware<{}, any, import("redux").Dispatch<import("redux").AnyAction>>]>>;
|
|
32
25
|
export declare const createStore: (reducer?: Record<string, Reducer>) => import("@reduxjs/toolkit").EnhancedStore<{
|
|
33
26
|
treble: import("./treble").TrebleState;
|
|
34
27
|
product: import("./product").ProductState;
|
|
@@ -36,44 +29,30 @@ export declare const createStore: (reducer?: Record<string, Reducer>) => import(
|
|
|
36
29
|
translations: import("./translations").TranslationsState;
|
|
37
30
|
wishlist: import("../Treble").WishlistArray;
|
|
38
31
|
price: import("./price").PriceState;
|
|
39
|
-
}, import("redux").AnyAction, import("@reduxjs/toolkit").MiddlewareArray<import("redux-thunk").ThunkMiddleware<{
|
|
40
|
-
treble: import("./treble").TrebleState;
|
|
41
|
-
product: import("./product").ProductState;
|
|
42
|
-
attributes: import("./attributes").AttributesState;
|
|
43
|
-
translations: import("./translations").TranslationsState;
|
|
44
|
-
wishlist: import("../Treble").WishlistArray;
|
|
45
|
-
price: import("./price").PriceState;
|
|
46
|
-
}, import("redux").AnyAction, null> | import("redux-thunk").ThunkMiddleware<{
|
|
32
|
+
}, import("redux").AnyAction, import("@reduxjs/toolkit").MiddlewareArray<[import("redux-thunk").ThunkMiddleware<{
|
|
47
33
|
treble: import("./treble").TrebleState;
|
|
48
34
|
product: import("./product").ProductState;
|
|
49
35
|
attributes: import("./attributes").AttributesState;
|
|
50
36
|
translations: import("./translations").TranslationsState;
|
|
51
37
|
wishlist: import("../Treble").WishlistArray;
|
|
52
38
|
price: import("./price").PriceState;
|
|
53
|
-
}, import("redux").AnyAction, undefined> | import("redux").
|
|
39
|
+
}, import("redux").AnyAction, undefined>]> | import("@reduxjs/toolkit").MiddlewareArray<[import("redux-thunk").ThunkMiddleware<{
|
|
54
40
|
treble: import("./treble").TrebleState;
|
|
55
41
|
product: import("./product").ProductState;
|
|
56
42
|
attributes: import("./attributes").AttributesState;
|
|
57
43
|
translations: import("./translations").TranslationsState;
|
|
58
44
|
wishlist: import("../Treble").WishlistArray;
|
|
59
45
|
price: import("./price").PriceState;
|
|
60
|
-
}, import("redux").Dispatch<import("redux").AnyAction
|
|
46
|
+
}, import("redux").AnyAction, undefined>, import("redux").Middleware<{}, any, import("redux").Dispatch<import("redux").AnyAction>>]>>;
|
|
61
47
|
export declare type RootState = ReturnType<typeof store.getState>;
|
|
62
48
|
export declare type ThreekitDispatch = typeof store.dispatch;
|
|
63
|
-
export declare const useThreekitDispatch: () => import("
|
|
64
|
-
treble: import("./treble").TrebleState;
|
|
65
|
-
product: import("./product").ProductState;
|
|
66
|
-
attributes: import("./attributes").AttributesState;
|
|
67
|
-
translations: import("./translations").TranslationsState;
|
|
68
|
-
wishlist: import("../Treble").WishlistArray;
|
|
69
|
-
price: import("./price").PriceState;
|
|
70
|
-
}, null, import("redux").AnyAction> & import("@reduxjs/toolkit").ThunkDispatch<{
|
|
49
|
+
export declare const useThreekitDispatch: () => import("@reduxjs/toolkit").ThunkDispatch<{
|
|
71
50
|
treble: import("./treble").TrebleState;
|
|
72
51
|
product: import("./product").ProductState;
|
|
73
52
|
attributes: import("./attributes").AttributesState;
|
|
74
53
|
translations: import("./translations").TranslationsState;
|
|
75
54
|
wishlist: import("../Treble").WishlistArray;
|
|
76
55
|
price: import("./price").PriceState;
|
|
77
|
-
}, undefined, import("redux").AnyAction>;
|
|
56
|
+
}, undefined, import("redux").AnyAction> & import("redux").Dispatch<import("redux").AnyAction>;
|
|
78
57
|
export declare const useThreekitSelector: TypedUseSelectorHook<RootState>;
|
|
79
58
|
export default createStore;
|
package/dist/store/product.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ export declare const getProductId: (state: RootState) => undefined | string;
|
|
|
41
41
|
export declare const getName: (state: RootState) => undefined | string;
|
|
42
42
|
export declare const getMetadata: (state: RootState) => undefined | IMetadata;
|
|
43
43
|
export declare const getActiveCacheIdx: (state: RootState) => number;
|
|
44
|
-
export declare const getProductCache: (state: RootState) => Array<Pick<CachedProduct, 'name' | 'label' | 'thumbnail'>>;
|
|
44
|
+
export declare const getProductCache: (state: RootState) => Array<Pick<CachedProduct, 'id' | 'name' | 'label' | 'thumbnail'>>;
|
|
45
45
|
export declare const setProducts: (products: IHydratedProducts) => IHydratedProducts;
|
|
46
46
|
export declare const initProduct: () => (dispatch: ThreekitDispatch, getState: () => RootState) => void;
|
|
47
47
|
export declare const cacheActiveProduct: (config?: Pick<IReloadConfig, 'label' | 'thumbnail'>) => (dispatch: ThreekitDispatch, getState: () => RootState) => {
|
package/dist/store/product.js
CHANGED
|
@@ -139,6 +139,7 @@ exports.getActiveCacheIdx = getActiveCacheIdx;
|
|
|
139
139
|
var getProductCache = function (state) {
|
|
140
140
|
return state.product.cache.map(function (prod) {
|
|
141
141
|
return Object.assign({
|
|
142
|
+
id: prod.id,
|
|
142
143
|
name: prod.name,
|
|
143
144
|
}, prod.label ? { label: prod.label } : {}, prod.thumbnail ? { thumbnail: prod.thumbnail } : {});
|
|
144
145
|
});
|
|
@@ -205,10 +206,9 @@ var loadProduct = function (id, config) {
|
|
|
205
206
|
return [4, dispatch((0, treble_1.reloadPlayer)(productConfig))];
|
|
206
207
|
case 1:
|
|
207
208
|
_a.sent();
|
|
208
|
-
if (cacheProduct)
|
|
209
|
+
if (cacheProduct)
|
|
209
210
|
dispatch((0, exports.incrementActiveCacheIdx)());
|
|
210
|
-
|
|
211
|
-
}
|
|
211
|
+
dispatch((0, exports.cacheActiveProduct)());
|
|
212
212
|
return [2];
|
|
213
213
|
}
|
|
214
214
|
});
|
|
@@ -229,16 +229,15 @@ var loadNewProduct = function (config) {
|
|
|
229
229
|
shouldCacheProduct = false;
|
|
230
230
|
}
|
|
231
231
|
if (shouldCacheProduct)
|
|
232
|
-
dispatch((0, exports.cacheActiveProduct)(
|
|
232
|
+
dispatch((0, exports.cacheActiveProduct)());
|
|
233
233
|
if (config)
|
|
234
234
|
dispatch((0, exports.setProductId)(undefined));
|
|
235
235
|
return [4, dispatch((0, treble_1.reloadPlayer)(config))];
|
|
236
236
|
case 1:
|
|
237
237
|
_a.sent();
|
|
238
|
-
if (shouldCacheProduct)
|
|
238
|
+
if (shouldCacheProduct)
|
|
239
239
|
dispatch((0, exports.incrementActiveCacheIdx)());
|
|
240
|
-
|
|
241
|
-
}
|
|
240
|
+
dispatch((0, exports.cacheActiveProduct)({ label: label, thumbnail: thumbnail }));
|
|
242
241
|
return [2];
|
|
243
242
|
}
|
|
244
243
|
});
|
package/dist/store/treble.js
CHANGED
|
@@ -167,7 +167,7 @@ var getPlayerInteraction = function (state) {
|
|
|
167
167
|
exports.getPlayerInteraction = getPlayerInteraction;
|
|
168
168
|
var initPlayer = function (config) {
|
|
169
169
|
return function (dispatch, getState) { return __awaiter(void 0, void 0, void 0, function () {
|
|
170
|
-
var el, authToken, assetId, stageId, playerConfig, initialConfiguration, player, configurator, orgId, ruleName;
|
|
170
|
+
var el, authToken, assetId, stageId, playerConfig, initialConfiguration, player, configurator, orgId, cacheParameters, ruleName;
|
|
171
171
|
return __generator(this, function (_a) {
|
|
172
172
|
switch (_a.label) {
|
|
173
173
|
case 0:
|
|
@@ -185,6 +185,10 @@ var initPlayer = function (config) {
|
|
|
185
185
|
configurator = _a.sent();
|
|
186
186
|
orgId = player.enableApi(types_1.PRIVATE_APIS.PLAYER).orgId;
|
|
187
187
|
connection_1.default.connect({ orgId: orgId });
|
|
188
|
+
cacheParameters = player.cacheParameters;
|
|
189
|
+
if (cacheParameters) {
|
|
190
|
+
connection_1.default.connect({ cacheParameters: cacheParameters });
|
|
191
|
+
}
|
|
188
192
|
if (window.threekit) {
|
|
189
193
|
window.threekit = Object.assign(window.threekit, {
|
|
190
194
|
player: player,
|
|
@@ -285,6 +289,7 @@ var launch = function (launchConfig) {
|
|
|
285
289
|
}
|
|
286
290
|
else {
|
|
287
291
|
stageId = conf.stageId;
|
|
292
|
+
initialConfiguration = conf.initialConfiguration;
|
|
288
293
|
if (conf.configurationId)
|
|
289
294
|
configurationId = conf.configurationId;
|
|
290
295
|
else if ((0, utils_1.isUuid)(conf.assetId))
|
package/dist/types.d.ts
CHANGED
|
@@ -19,7 +19,8 @@ export declare enum ATTRIBUTE_TYPES {
|
|
|
19
19
|
ASSET = "Asset",
|
|
20
20
|
COLOR = "Color",
|
|
21
21
|
NUMBER = "Number",
|
|
22
|
-
BOOLEAN = "Boolean"
|
|
22
|
+
BOOLEAN = "Boolean",
|
|
23
|
+
ARRAY = "Array"
|
|
23
24
|
}
|
|
24
25
|
export declare enum ASSET_TYPES {
|
|
25
26
|
UPLOAD = "upload",
|
|
@@ -86,15 +87,17 @@ export interface ISceneResult {
|
|
|
86
87
|
}
|
|
87
88
|
export interface IConfigurationAsset {
|
|
88
89
|
assetId: string;
|
|
89
|
-
configuration?:
|
|
90
|
+
configuration?: string | IConfiguration;
|
|
90
91
|
type?: string;
|
|
91
92
|
}
|
|
93
|
+
export interface IConfigurationArray extends Array<IConfigurationAsset> {
|
|
94
|
+
}
|
|
92
95
|
export interface IConfigurationColor {
|
|
93
96
|
r: number;
|
|
94
97
|
g: number;
|
|
95
98
|
b: number;
|
|
96
99
|
}
|
|
97
|
-
export declare type IConfigurationAttribute = IConfigurationAsset | IConfigurationColor | string | number | boolean | undefined;
|
|
100
|
+
export declare type IConfigurationAttribute = IConfigurationAsset | IConfigurationArray | IConfigurationColor | string | number | boolean | undefined;
|
|
98
101
|
export declare type IConfiguration = Record<string, IConfigurationAttribute>;
|
|
99
102
|
export declare type ISetConfiguration = Record<string, IConfigurationAttribute>;
|
|
100
103
|
interface IDisplayAttributeConfig {
|
|
@@ -126,7 +129,7 @@ export interface IHydratedAttributeAssetValue extends IDisplayAttributeAssetValu
|
|
|
126
129
|
}
|
|
127
130
|
export interface IAttributeAssetBase<V> extends IAttributeBase<ATTRIBUTE_TYPES.ASSET, IConfigurationAsset> {
|
|
128
131
|
assetType: ASSET_TYPES;
|
|
129
|
-
blacklist:
|
|
132
|
+
blacklist: Array<string>;
|
|
130
133
|
defaultValue: IConfigurationAsset;
|
|
131
134
|
hiddenValues?: Array<string>;
|
|
132
135
|
disabledValues?: Array<string>;
|
|
@@ -135,6 +138,38 @@ export interface IAttributeAssetBase<V> extends IAttributeBase<ATTRIBUTE_TYPES.A
|
|
|
135
138
|
export declare type IDisplayAttributeAsset = IAttributeAssetBase<IDisplayAttributeAssetValue>;
|
|
136
139
|
export declare type IHydratedAttributeAsset = IAttributeAssetBase<IHydratedAttributeAssetValue>;
|
|
137
140
|
export declare type IAttributeAsset = IAttributeAssetBase<IConfigurationAssetValue>;
|
|
141
|
+
export interface IConfigurationArrayValue {
|
|
142
|
+
assetId: string;
|
|
143
|
+
name: string;
|
|
144
|
+
configuration?: Record<string, IThreekitDisplayAttribute>;
|
|
145
|
+
}
|
|
146
|
+
export interface IDisplayAttributeArrayValue extends IConfigurationArrayValue {
|
|
147
|
+
name: string;
|
|
148
|
+
type: string;
|
|
149
|
+
enabled: boolean;
|
|
150
|
+
visible: boolean;
|
|
151
|
+
metadata: IMetadata;
|
|
152
|
+
tags: Array<string>;
|
|
153
|
+
label: string;
|
|
154
|
+
}
|
|
155
|
+
export interface IHydratedAttributeArrayValue extends IDisplayAttributeArrayValue {
|
|
156
|
+
label: string;
|
|
157
|
+
handleSelect: () => Promise<void>;
|
|
158
|
+
selected: boolean;
|
|
159
|
+
}
|
|
160
|
+
export interface IAttributeArrayBase<V> extends IAttributeBase<ATTRIBUTE_TYPES.ARRAY, IConfigurationArray> {
|
|
161
|
+
blacklist: Array<string>;
|
|
162
|
+
hiddenValues?: Array<string>;
|
|
163
|
+
disabledValues?: Array<string>;
|
|
164
|
+
values: Array<V>;
|
|
165
|
+
of: {
|
|
166
|
+
type: ATTRIBUTE_TYPES.ASSET;
|
|
167
|
+
assetType: ASSET_TYPES;
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
export declare type IDisplayAttributeArray = IAttributeArrayBase<IDisplayAttributeArrayValue>;
|
|
171
|
+
export declare type IHydratedAttributeArray = IAttributeArrayBase<IHydratedAttributeArrayValue>;
|
|
172
|
+
export declare type IAttributeArray = IAttributeArrayBase<Pick<IConfigurationArrayValue, 'assetId'>>;
|
|
138
173
|
export interface IDisplayAttributeStringValue {
|
|
139
174
|
label: string;
|
|
140
175
|
value: string;
|
|
@@ -166,9 +201,9 @@ export interface IAttributeNumber extends IAttributeBase<ATTRIBUTE_TYPES.NUMBER,
|
|
|
166
201
|
export interface IAttributeBoolean extends IAttributeBase<ATTRIBUTE_TYPES.BOOLEAN, boolean> {
|
|
167
202
|
defaultValue: boolean;
|
|
168
203
|
}
|
|
169
|
-
export declare type IThreekitAttribute = IAttributeAsset | IAttributeColor | IAttributeString | IAttributeNumber | IAttributeBoolean;
|
|
170
|
-
export declare type IThreekitDisplayAttribute = IDisplayAttributeAsset | IDisplayAttributeString | IAttributeColor | IAttributeNumber | IAttributeBoolean;
|
|
171
|
-
export declare type IHydratedAttribute = IHydratedAttributeAsset | IHydratedAttributeString | IAttributeColor | IAttributeNumber | IAttributeBoolean;
|
|
204
|
+
export declare type IThreekitAttribute = IAttributeAsset | IAttributeArray | IAttributeColor | IAttributeString | IAttributeNumber | IAttributeBoolean;
|
|
205
|
+
export declare type IThreekitDisplayAttribute = IDisplayAttributeAsset | IDisplayAttributeArray | IDisplayAttributeString | IAttributeColor | IAttributeNumber | IAttributeBoolean;
|
|
206
|
+
export declare type IHydratedAttribute = IHydratedAttributeAsset | IHydratedAttributeArray | IHydratedAttributeString | IAttributeColor | IAttributeNumber | IAttributeBoolean;
|
|
172
207
|
export interface ICoordinates {
|
|
173
208
|
x: number;
|
|
174
209
|
y: number;
|
|
@@ -266,6 +301,10 @@ export interface IThreekitCamera {
|
|
|
266
301
|
setQuaternion: (quaternion: IQuaternion) => void;
|
|
267
302
|
zoom: (delta: number) => void;
|
|
268
303
|
}
|
|
304
|
+
export interface ICacheParameters {
|
|
305
|
+
maxAge: number;
|
|
306
|
+
scope: string;
|
|
307
|
+
}
|
|
269
308
|
export interface IThreekitPlayer {
|
|
270
309
|
assetId: string;
|
|
271
310
|
instanceId: string;
|
|
@@ -279,6 +318,7 @@ export interface IThreekitPlayer {
|
|
|
279
318
|
enableApi: <T extends PRIVATE_APIS>(api: T) => T extends PRIVATE_APIS.PLAYER ? IThreekitPrivatePlayer : any;
|
|
280
319
|
snapshotAsync: (snapshotConfig: ISnapshotConfig) => Promise<string>;
|
|
281
320
|
unload: () => Promise<string>;
|
|
321
|
+
cacheParameters: ICacheParameters;
|
|
282
322
|
}
|
|
283
323
|
export interface IThreekitPrivateConfigurator extends IThreekitConfigurator {
|
|
284
324
|
name: string;
|
package/dist/types.js
CHANGED
|
@@ -24,6 +24,7 @@ var ATTRIBUTE_TYPES;
|
|
|
24
24
|
ATTRIBUTE_TYPES["COLOR"] = "Color";
|
|
25
25
|
ATTRIBUTE_TYPES["NUMBER"] = "Number";
|
|
26
26
|
ATTRIBUTE_TYPES["BOOLEAN"] = "Boolean";
|
|
27
|
+
ATTRIBUTE_TYPES["ARRAY"] = "Array";
|
|
27
28
|
})(ATTRIBUTE_TYPES = exports.ATTRIBUTE_TYPES || (exports.ATTRIBUTE_TYPES = {}));
|
|
28
29
|
var ASSET_TYPES;
|
|
29
30
|
(function (ASSET_TYPES) {
|