@threekit-tools/treble 0.0.94 → 0.0.95-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 +3 -3
- package/dist/Treble/index.d.ts +1 -1
- package/dist/Treble/index.js +1 -1
- package/dist/Treble/{snapshots.d.ts → snapshot.d.ts} +1 -1
- package/dist/Treble/{snapshots.js → snapshot.js} +1 -1
- package/dist/Treble/wishlist.d.ts +1 -1
- package/dist/Treble/wishlist.js +1 -1
- package/dist/api/assets.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/components/AttributeTitle/index.d.ts +2 -2
- package/dist/components/AttributeValue/index.d.ts +2 -2
- package/dist/components/BreatheAnimation/index.js +1 -1
- package/dist/components/Button/index.d.ts +3 -3
- package/dist/components/Cards/index.d.ts +3 -3
- package/dist/components/DevTools/index.d.ts +2 -2
- package/dist/components/DraggableHint/draggableIndicator.styles.d.ts +1 -1
- package/dist/components/DraggableHint/index.d.ts +2 -2
- package/dist/components/Dropdown/index.d.ts +3 -3
- package/dist/components/FlatForm/index.d.ts +2 -2
- package/dist/components/FormComponentDescription/index.d.ts +1 -1
- package/dist/components/FormComponentTitle/index.d.ts +1 -1
- package/dist/components/Player/index.d.ts +9 -9
- package/dist/components/PlayerLoadingCircular/index.d.ts +2 -2
- package/dist/components/PlayerLoadingSpinner/index.d.ts +2 -2
- package/dist/components/PlayerLoadingSpinner/playerLoadingSpinner.styles.d.ts +1 -1
- package/dist/components/ProductDescription/index.d.ts +3 -3
- package/dist/components/ProductName/index.d.ts +3 -3
- package/dist/components/Share/index.d.ts +2 -2
- package/dist/components/Share/index.js +1 -1
- package/dist/components/Share/share.styles.d.ts +1 -1
- package/dist/components/Snapshots/index.d.ts +2 -2
- package/dist/components/Strips/index.d.ts +3 -3
- package/dist/components/Swatch/index.d.ts +3 -3
- package/dist/components/Switch/index.d.ts +3 -3
- package/dist/components/TextInput/index.d.ts +3 -3
- package/dist/components/ThreekitProvider/index.d.ts +1 -1
- package/dist/components/Tiles/index.d.ts +3 -3
- package/dist/components/TilesGroup/index.d.ts +3 -3
- package/dist/components/TotalPrice/index.d.ts +3 -3
- package/dist/components/TrebleApp/index.d.ts +3 -3
- package/dist/components/TurntableAnimation/index.js +1 -1
- package/dist/components/Upload/index.d.ts +3 -3
- package/dist/components/Upload/index.js +1 -1
- package/dist/components/UploadArea/index.d.ts +3 -3
- package/dist/components/UploadArea/index.js +1 -1
- package/dist/components/Wishlist/WishlistItem.d.ts +2 -2
- package/dist/components/Wishlist/index.d.ts +4 -4
- package/dist/components/Wishlist/index.js +1 -1
- package/dist/components/Zoom/index.d.ts +6 -6
- package/dist/components/containers/formInputContainer.d.ts +2 -2
- package/dist/components/formComponents.d.ts +6 -6
- package/dist/components/message/index.d.ts +1 -1
- package/dist/constants.d.ts +6 -6
- package/dist/hooks/useAttribute/index.d.ts +4 -4
- package/dist/hooks/useAttribute/index.js +1 -1
- 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 -4
- 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/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/useSpaces/SpacesLayout.d.ts +11 -0
- package/dist/hooks/useSpaces/SpacesLayout.js +74 -0
- package/dist/hooks/useSpaces/SpacesState.d.ts +177 -0
- package/dist/hooks/useSpaces/SpacesState.js +1816 -0
- package/dist/hooks/useSpaces/constants.d.ts +79 -0
- package/dist/hooks/useSpaces/constants.js +130 -0
- package/dist/hooks/useSpaces/dataHandlers.d.ts +38 -0
- package/dist/hooks/useSpaces/dataHandlers.js +411 -0
- package/dist/hooks/useSpaces/draw/clearCanvas.d.ts +2 -0
- package/dist/hooks/useSpaces/draw/clearCanvas.js +9 -0
- package/dist/hooks/useSpaces/draw/drawBackground.d.ts +2 -0
- package/dist/hooks/useSpaces/draw/drawBackground.js +12 -0
- package/dist/hooks/useSpaces/draw/drawDimensions.d.ts +3 -0
- package/dist/hooks/useSpaces/draw/drawDimensions.js +53 -0
- package/dist/hooks/useSpaces/draw/drawDoors.d.ts +9 -0
- package/dist/hooks/useSpaces/draw/drawDoors.js +99 -0
- package/dist/hooks/useSpaces/draw/drawFloor.d.ts +3 -0
- package/dist/hooks/useSpaces/draw/drawFloor.js +36 -0
- package/dist/hooks/useSpaces/draw/drawGrid.d.ts +3 -0
- package/dist/hooks/useSpaces/draw/drawGrid.js +36 -0
- package/dist/hooks/useSpaces/draw/drawGuides.d.ts +3 -0
- package/dist/hooks/useSpaces/draw/drawGuides.js +23 -0
- package/dist/hooks/useSpaces/draw/drawOpenings.d.ts +9 -0
- package/dist/hooks/useSpaces/draw/drawOpenings.js +72 -0
- package/dist/hooks/useSpaces/draw/drawVertices.d.ts +8 -0
- package/dist/hooks/useSpaces/draw/drawVertices.js +61 -0
- package/dist/hooks/useSpaces/draw/drawWalls.d.ts +11 -0
- package/dist/hooks/useSpaces/draw/drawWalls.js +90 -0
- package/dist/hooks/useSpaces/draw/drawWindows.d.ts +9 -0
- package/dist/hooks/useSpaces/draw/drawWindows.js +82 -0
- package/dist/hooks/useSpaces/draw/index.d.ts +11 -0
- package/dist/hooks/useSpaces/draw/index.js +129 -0
- package/dist/hooks/useSpaces/geometry/addThicknessToLine.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/addThicknessToLine.js +13 -0
- package/dist/hooks/useSpaces/geometry/areLinesEqual.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/areLinesEqual.js +17 -0
- package/dist/hooks/useSpaces/geometry/arePointsEqual.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/arePointsEqual.js +8 -0
- package/dist/hooks/useSpaces/geometry/arePointsWithinProximity.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/arePointsWithinProximity.js +11 -0
- package/dist/hooks/useSpaces/geometry/closestPointOnLine.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/closestPointOnLine.js +13 -0
- package/dist/hooks/useSpaces/geometry/doLinesOverlap.d.ts +2 -0
- package/dist/hooks/useSpaces/geometry/doLinesOverlap.js +16 -0
- package/dist/hooks/useSpaces/geometry/euclideanMod.d.ts +2 -0
- package/dist/hooks/useSpaces/geometry/euclideanMod.js +6 -0
- package/dist/hooks/useSpaces/geometry/findLoops.d.ts +6 -0
- package/dist/hooks/{useRoomBuilder → useSpaces/geometry}/findLoops.js +31 -13
- package/dist/hooks/useSpaces/geometry/getAllLineIntersections.d.ts +6 -0
- package/dist/hooks/useSpaces/geometry/getAllLineIntersections.js +23 -0
- package/dist/hooks/useSpaces/geometry/getAngleOfLineSegment.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getAngleOfLineSegment.js +7 -0
- package/dist/hooks/useSpaces/geometry/getClosestPointOnLineSegment.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getClosestPointOnLineSegment.js +17 -0
- package/dist/hooks/useSpaces/geometry/getDistanceToLine.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getDistanceToLine.js +10 -0
- package/dist/hooks/useSpaces/geometry/getLengthOfLineSegment.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getLengthOfLineSegment.js +7 -0
- package/dist/hooks/useSpaces/geometry/getLineAtOffsetOnLineSegment.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getLineAtOffsetOnLineSegment.js +17 -0
- package/dist/hooks/useSpaces/geometry/getLineOtherPoint.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getLineOtherPoint.js +11 -0
- package/dist/hooks/useSpaces/geometry/getLineSegmentsIntersection.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getLineSegmentsIntersection.js +43 -0
- package/dist/hooks/useSpaces/geometry/getMidpointOfLineSegment.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getMidpointOfLineSegment.js +9 -0
- package/dist/hooks/useSpaces/geometry/getParallelLineSegmentAtDistance.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getParallelLineSegmentAtDistance.js +20 -0
- package/dist/hooks/useSpaces/geometry/getPointAtOffsetOnLineSegment.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getPointAtOffsetOnLineSegment.js +11 -0
- package/dist/hooks/useSpaces/geometry/getPolygonArea.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getPolygonArea.js +15 -0
- package/dist/hooks/useSpaces/geometry/getQuadrilateralArea.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getQuadrilateralArea.js +16 -0
- package/dist/hooks/useSpaces/geometry/getTangetIntersectionAndOffset.d.ts +6 -0
- package/dist/hooks/useSpaces/geometry/getTangetIntersectionAndOffset.js +17 -0
- package/dist/hooks/useSpaces/geometry/getTriangleArea.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getTriangleArea.js +9 -0
- package/dist/hooks/useSpaces/geometry/getUnitVectorOfLineSegment.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getUnitVectorOfLineSegment.js +12 -0
- package/dist/hooks/useSpaces/geometry/index.d.ts +30 -0
- package/dist/hooks/useSpaces/geometry/index.js +64 -0
- package/dist/hooks/useSpaces/geometry/isPointInPolygon.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/isPointInPolygon.js +21 -0
- package/dist/hooks/useSpaces/geometry/isPointInQuadrilateral.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/isPointInQuadrilateral.js +25 -0
- package/dist/hooks/useSpaces/geometry/orderCoordinatesOnLineSegment.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/orderCoordinatesOnLineSegment.js +11 -0
- package/dist/hooks/useSpaces/geometry/splitLineAtOffset.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/splitLineAtOffset.js +12 -0
- package/dist/hooks/useSpaces/geometry/splitLineAtPoint.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/splitLineAtPoint.js +9 -0
- package/dist/hooks/useSpaces/geometry/splitLineAtPoints.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/splitLineAtPoints.js +28 -0
- package/dist/hooks/useSpaces/index.d.ts +95 -0
- package/dist/hooks/useSpaces/index.js +625 -0
- package/dist/hooks/useSpaces/themes/blueprint.d.ts +3 -0
- package/dist/hooks/useSpaces/themes/blueprint.js +96 -0
- package/dist/hooks/useSpaces/themes/default.d.ts +3 -0
- package/dist/hooks/useSpaces/themes/default.js +96 -0
- package/dist/hooks/{useRoomBuilder/themes.d.ts → useSpaces/themes/index.d.ts} +3 -4
- package/dist/hooks/useSpaces/themes/index.js +21 -0
- package/dist/hooks/useSpaces/themes/light.d.ts +3 -0
- package/dist/hooks/useSpaces/themes/light.js +96 -0
- package/dist/hooks/useSpaces/types.d.ts +378 -0
- package/dist/hooks/useSpaces/types.js +54 -0
- package/dist/hooks/useSpaces/validators/areWallsDuplicated.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/areWallsDuplicated.js +61 -0
- package/dist/hooks/useSpaces/validators/areWallsIntersecting.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/areWallsIntersecting.js +42 -0
- package/dist/hooks/useSpaces/validators/areWallsOrphaningFeatures.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/areWallsOrphaningFeatures.js +52 -0
- package/dist/hooks/useSpaces/validators/areWallsTooShort.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/areWallsTooShort.js +37 -0
- package/dist/hooks/useSpaces/validators/index.d.ts +15 -0
- package/dist/hooks/useSpaces/validators/index.js +40 -0
- package/dist/hooks/useSpaces/validators/isFeatureCollidingWithExistingFeature.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/isFeatureCollidingWithExistingFeature.js +31 -0
- package/dist/hooks/useSpaces/validators/isFeatureOutsideWallBounds.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/isFeatureOutsideWallBounds.js +19 -0
- package/dist/hooks/useSpaces/validators/isLineTooShort.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/isLineTooShort.js +26 -0
- package/dist/hooks/useSpaces/validators/isVertexLandingOnFeature.d.ts +4 -0
- package/dist/hooks/useSpaces/validators/isVertexLandingOnFeature.js +19 -0
- package/dist/hooks/useSpaces/validators/isWallEndingOnFeature.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/isWallEndingOnFeature.js +19 -0
- package/dist/hooks/useSpaces/validators/isWallIntersectingFeature.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/isWallIntersectingFeature.js +41 -0
- package/dist/hooks/useSpaces/validators/isWallOverlappingExisitingWalls.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/isWallOverlappingExisitingWalls.js +54 -0
- package/dist/hooks/useSpaces/validators/isWallTooShort.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/isWallTooShort.js +10 -0
- package/dist/hooks/{useRoomBuilder → useSpaces/validators}/messaging.js +1 -1
- package/dist/hooks/useWishlist/index.d.ts +1 -1
- package/dist/hooks/useZoom/index.d.ts +1 -1
- package/dist/http/assets.d.ts +1 -1
- package/dist/http/orders.d.ts +1 -1
- package/dist/icons/AngleSnapping.d.ts +3 -0
- package/dist/icons/AngleSnapping.js +28 -0
- package/dist/icons/Boundary.d.ts +3 -0
- package/dist/icons/Boundary.js +21 -0
- package/dist/icons/Center.d.ts +3 -0
- package/dist/icons/Center.js +24 -0
- package/dist/icons/Draw.js +3 -3
- package/dist/icons/GridSnapping.d.ts +3 -0
- package/dist/icons/GridSnapping.js +28 -0
- package/dist/icons/LayoutAlt.d.ts +3 -0
- package/dist/icons/LayoutAlt.js +21 -0
- package/dist/icons/Magnet.d.ts +3 -0
- package/dist/icons/Magnet.js +27 -0
- package/dist/icons/Player3D.d.ts +3 -0
- package/dist/icons/Player3D.js +21 -0
- package/dist/icons/RulerBlank.d.ts +3 -0
- package/dist/icons/RulerBlank.js +25 -0
- package/dist/icons/RulerDetailed.d.ts +3 -0
- package/dist/icons/RulerDetailed.js +27 -0
- package/dist/icons/Save.d.ts +3 -0
- package/dist/icons/Save.js +21 -0
- package/dist/icons/Spinner.d.ts +2 -2
- package/dist/icons/UnitCm.d.ts +3 -0
- package/dist/icons/UnitCm.js +22 -0
- package/dist/icons/UnitFeet.d.ts +3 -0
- package/dist/icons/UnitFeet.js +22 -0
- package/dist/icons/UnitInch.d.ts +3 -0
- package/dist/icons/UnitInch.js +22 -0
- package/dist/icons/UnitMeter.d.ts +3 -0
- package/dist/icons/UnitMeter.js +21 -0
- 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 +4 -3
- package/dist/store/attributes.js +1 -1
- package/dist/store/index.d.ts +43 -12
- package/dist/store/index.js +3 -1
- package/dist/store/price.d.ts +1 -1
- package/dist/store/price.js +1 -1
- package/dist/store/product.d.ts +2 -2
- package/dist/store/product.js +5 -8
- package/dist/store/spaces.d.ts +74 -0
- package/dist/store/spaces.js +354 -0
- package/dist/store/translations.d.ts +1 -1
- package/dist/store/translations.js +1 -1
- package/dist/store/treble.d.ts +2 -2
- package/dist/store/treble.js +15 -22
- package/dist/store/wishlist.d.ts +4 -22
- package/dist/store/wishlist.js +1 -1
- package/dist/types.d.ts +20 -18
- package/dist/types.js +9 -9
- package/dist/utils.d.ts +2 -2
- package/dist/utils.js +3 -3
- package/package.json +1 -1
- 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/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/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/hooks/{useRoomBuilder → useSpaces/validators}/messaging.d.ts +0 -0
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;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { RootState, ThreekitDispatch } from './index';
|
|
2
2
|
import { ISetConfiguration, IThreekitDisplayAttribute } from '../types';
|
|
3
3
|
import { ITranslationsMap } from '../http/assets';
|
|
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
|
-
declare const reducer: import("redux").Reducer<AttributesState>;
|
|
6
|
+
declare const reducer: import("redux").Reducer<AttributesState, import("redux").AnyAction>;
|
|
7
7
|
export declare const getAttributes: (state: RootState) => AttributesState;
|
|
8
8
|
export declare const getHydrationData: ((state: {
|
|
9
9
|
treble: import("./treble").TrebleState;
|
|
@@ -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
|
+
}) => readonly [Record<string, IThreekitDisplayAttribute>, ITranslationsMap]) & import("reselect").OutputSelectorFields<(args_0: AttributesState, args_1: ITranslationsMap) => readonly [Record<string, IThreekitDisplayAttribute>, ITranslationsMap] & {
|
|
16
17
|
clearCache: () => void;
|
|
17
18
|
}> & {
|
|
18
19
|
clearCache: () => void;
|
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
|
@@ -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
|
-
|
|
47
|
-
|
|
48
|
-
export type ThreekitDispatch = typeof store.dispatch;
|
|
49
|
-
export declare const useThreekitDispatch: () => import("@reduxjs/toolkit").ThunkDispatch<{
|
|
51
|
+
spaces: import("./spaces").SpacesState;
|
|
52
|
+
}, import("redux").AnyAction, null> | import("redux-thunk").ThunkMiddleware<{
|
|
50
53
|
treble: import("./treble").TrebleState;
|
|
51
54
|
product: import("./product").ProductState;
|
|
52
55
|
attributes: import("./attributes").AttributesState;
|
|
53
56
|
translations: import("./translations").TranslationsState;
|
|
54
57
|
wishlist: import("../Treble").WishlistArray;
|
|
55
58
|
price: import("./price").PriceState;
|
|
56
|
-
|
|
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>>>>;
|
|
69
|
+
export declare type RootState = ReturnType<typeof store.getState>;
|
|
70
|
+
export declare type ThreekitDispatch = typeof store.dispatch;
|
|
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<{
|
|
80
|
+
treble: import("./treble").TrebleState;
|
|
81
|
+
product: import("./product").ProductState;
|
|
82
|
+
attributes: import("./attributes").AttributesState;
|
|
83
|
+
translations: import("./translations").TranslationsState;
|
|
84
|
+
wishlist: import("../Treble").WishlistArray;
|
|
85
|
+
price: import("./price").PriceState;
|
|
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/price.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export interface PriceState {
|
|
|
15
15
|
export declare const setPriceConfig: import("@reduxjs/toolkit").ActionCreatorWithPayload<IPriceConfig, string>;
|
|
16
16
|
export declare const setPrice: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, string>;
|
|
17
17
|
export declare const initPrice: () => (dispatch: ThreekitDispatch) => Promise<void>;
|
|
18
|
-
declare const reducer: import("redux").Reducer<PriceState>;
|
|
18
|
+
declare const reducer: import("redux").Reducer<PriceState, import("redux").AnyAction>;
|
|
19
19
|
export declare const getPrice: (state: RootState) => undefined | IPrice;
|
|
20
20
|
export declare const getPriceConfig: (state: RootState) => undefined | IPriceConfig;
|
|
21
21
|
export declare const updatePrice: () => (dispatch: ThreekitDispatch, getState: () => RootState) => void;
|
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 {
|
|
@@ -36,7 +36,7 @@ export declare const removeFromCache: import("@reduxjs/toolkit").ActionCreatorWi
|
|
|
36
36
|
export declare const setActiveCacheIdx: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, string>;
|
|
37
37
|
export declare const incrementActiveCacheIdx: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<undefined, string>;
|
|
38
38
|
export declare const decrementActiveCacheIdx: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<undefined, string>;
|
|
39
|
-
declare const reducer: import("redux").Reducer<ProductState>;
|
|
39
|
+
declare const reducer: import("redux").Reducer<ProductState, import("redux").AnyAction>;
|
|
40
40
|
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;
|
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,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
|
});
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { RootState, ThreekitDispatch } from './index';
|
|
2
|
+
import { IConfiguration } from '../types';
|
|
3
|
+
import { IAttributeDefaults, ICoordinate2D, IDimensionOptions, IModes, ISpacesAttributes, ISpacesConfigUser, IUnits } from '../hooks/useSpaces/types';
|
|
4
|
+
import { WallModes } from '../hooks/useSpaces/constants';
|
|
5
|
+
import Spaces from '../hooks/useSpaces/SpacesState';
|
|
6
|
+
interface ILayout {
|
|
7
|
+
label: string;
|
|
8
|
+
configuration: IConfiguration;
|
|
9
|
+
loop: Array<ICoordinate2D[]>;
|
|
10
|
+
}
|
|
11
|
+
interface IAttributeMap {
|
|
12
|
+
walls: string;
|
|
13
|
+
startX: string;
|
|
14
|
+
startZ: string;
|
|
15
|
+
endX: string;
|
|
16
|
+
endZ: string;
|
|
17
|
+
}
|
|
18
|
+
interface InitConfig {
|
|
19
|
+
parameters: Partial<ISpacesConfigUser>;
|
|
20
|
+
layoutIds: Array<string>;
|
|
21
|
+
attributeNames: ISpacesAttributes;
|
|
22
|
+
canvasDimensions?: ICoordinate2D;
|
|
23
|
+
setPendingStatus: (status: boolean) => void;
|
|
24
|
+
}
|
|
25
|
+
export interface SpacesState {
|
|
26
|
+
initialized: boolean;
|
|
27
|
+
mode: IModes;
|
|
28
|
+
layouts: Array<ILayout>;
|
|
29
|
+
unit: IUnits;
|
|
30
|
+
zoom: number;
|
|
31
|
+
translation: ICoordinate2D;
|
|
32
|
+
showDimensions: IDimensionOptions;
|
|
33
|
+
angleSnappingEnabled: boolean;
|
|
34
|
+
guideSnappingEnabled: boolean;
|
|
35
|
+
gridSnappingEnabled: boolean;
|
|
36
|
+
defaults: IAttributeDefaults;
|
|
37
|
+
wallModeOptions: WallModes[];
|
|
38
|
+
wallModeAssetIds: Record<WallModes, string>;
|
|
39
|
+
wallModeValue: WallModes;
|
|
40
|
+
}
|
|
41
|
+
export declare const setInitialized: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>;
|
|
42
|
+
export declare const setLayouts: import("@reduxjs/toolkit").ActionCreatorWithPayload<ILayout[], string>;
|
|
43
|
+
export declare const setZoom: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, string>;
|
|
44
|
+
export declare const setUnit: import("@reduxjs/toolkit").ActionCreatorWithPayload<IUnits, string>;
|
|
45
|
+
export declare const setTranslation: import("@reduxjs/toolkit").ActionCreatorWithPayload<ICoordinate2D, string>;
|
|
46
|
+
export declare const setMode: import("@reduxjs/toolkit").ActionCreatorWithPayload<IModes, string>;
|
|
47
|
+
export declare const setShowDimensions: import("@reduxjs/toolkit").ActionCreatorWithPayload<IDimensionOptions, string>;
|
|
48
|
+
export declare const setAngleSnappingEnabled: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>;
|
|
49
|
+
export declare const setGuideSnappingEnabled: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>;
|
|
50
|
+
export declare const setGridSnappingEnabled: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>;
|
|
51
|
+
export declare const setDefaults: import("@reduxjs/toolkit").ActionCreatorWithPayload<IAttributeDefaults, string>;
|
|
52
|
+
export declare const setWallModeOptions: import("@reduxjs/toolkit").ActionCreatorWithPayload<WallModes[], string>;
|
|
53
|
+
export declare const setWallModeAssetIds: import("@reduxjs/toolkit").ActionCreatorWithPayload<Record<WallModes, string>, string>;
|
|
54
|
+
export declare const setWallModeValue: import("@reduxjs/toolkit").ActionCreatorWithPayload<WallModes, string>;
|
|
55
|
+
declare const reducer: import("redux").Reducer<SpacesState, import("redux").AnyAction>;
|
|
56
|
+
export declare const getInitialized: (state: RootState) => boolean;
|
|
57
|
+
export declare const getMode: (state: RootState) => IModes;
|
|
58
|
+
export declare const getLayouts: (state: RootState) => Array<ILayout>;
|
|
59
|
+
export declare const getUnit: (state: RootState) => IUnits;
|
|
60
|
+
export declare const getZoom: (state: RootState) => number;
|
|
61
|
+
export declare const getTranslation: (state: RootState) => ICoordinate2D;
|
|
62
|
+
export declare const getShowDimensions: (state: RootState) => IDimensionOptions;
|
|
63
|
+
export declare const getAngleSnappingEnabled: (state: RootState) => boolean;
|
|
64
|
+
export declare const getGuideSnappingEnabled: (state: RootState) => boolean;
|
|
65
|
+
export declare const getGridSnappingEnabled: (state: RootState) => boolean;
|
|
66
|
+
export declare const getDefaults: (state: RootState) => IAttributeDefaults;
|
|
67
|
+
export declare const getWallMode: (state: RootState) => {
|
|
68
|
+
options: WallModes[];
|
|
69
|
+
value: WallModes;
|
|
70
|
+
assetId: string;
|
|
71
|
+
};
|
|
72
|
+
export declare const hydrateLayouts: (configurationIds: Array<string>, attributeMap: IAttributeMap) => (dispatch: ThreekitDispatch, getState: () => RootState) => Promise<void>;
|
|
73
|
+
export declare const initSpaces: (initConfig: InitConfig) => (dispatch: ThreekitDispatch, getState: () => RootState) => Promise<Spaces>;
|
|
74
|
+
export default reducer;
|