@threekit-tools/treble 0.0.92 → 0.0.94

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.
Files changed (281) hide show
  1. package/dist/Treble/Treble.js +4 -3
  2. package/dist/Treble/snapshots.d.ts +2 -2
  3. package/dist/Treble/snapshots.js +1 -1
  4. package/dist/Treble/wishlist.d.ts +1 -1
  5. package/dist/Treble/wishlist.js +1 -1
  6. package/dist/api/assets.d.ts +1 -0
  7. package/dist/api/{products.js → assets.js} +12 -33
  8. package/dist/api/catalog.js +1 -1
  9. package/dist/api/configurations.d.ts +1 -0
  10. package/dist/api/configurations.js +10 -3
  11. package/dist/api/datatables.js +1 -1
  12. package/dist/api/index.d.ts +2 -2
  13. package/dist/api/index.js +2 -2
  14. package/dist/api/orders.js +1 -1
  15. package/dist/api/price.js +1 -1
  16. package/dist/components/AttributeTitle/index.d.ts +2 -2
  17. package/dist/components/AttributeValue/index.d.ts +2 -2
  18. package/dist/components/BreatheAnimation/index.js +1 -1
  19. package/dist/components/Button/index.d.ts +3 -3
  20. package/dist/components/Cards/index.d.ts +3 -3
  21. package/dist/components/DevTools/index.d.ts +2 -2
  22. package/dist/components/DraggableHint/draggableIndicator.styles.d.ts +1 -1
  23. package/dist/components/DraggableHint/index.d.ts +2 -2
  24. package/dist/components/Dropdown/index.d.ts +3 -3
  25. package/dist/components/FlatForm/index.d.ts +2 -2
  26. package/dist/components/FormComponentDescription/index.d.ts +1 -1
  27. package/dist/components/FormComponentTitle/index.d.ts +1 -1
  28. package/dist/components/Player/index.d.ts +9 -9
  29. package/dist/components/PlayerLoadingCircular/index.d.ts +2 -2
  30. package/dist/components/PlayerLoadingSpinner/index.d.ts +2 -2
  31. package/dist/components/PlayerLoadingSpinner/playerLoadingSpinner.styles.d.ts +1 -1
  32. package/dist/components/ProductDescription/index.d.ts +3 -3
  33. package/dist/components/ProductName/index.d.ts +3 -3
  34. package/dist/components/Share/index.d.ts +2 -2
  35. package/dist/components/Share/index.js +1 -1
  36. package/dist/components/Share/share.styles.d.ts +1 -1
  37. package/dist/components/Snapshots/index.d.ts +2 -2
  38. package/dist/components/Strips/index.d.ts +3 -3
  39. package/dist/components/Swatch/index.d.ts +3 -3
  40. package/dist/components/Switch/index.d.ts +3 -3
  41. package/dist/components/TextInput/index.d.ts +3 -3
  42. package/dist/components/ThreekitProvider/index.d.ts +6 -3
  43. package/dist/components/ThreekitProvider/index.js +27 -2
  44. package/dist/components/Tiles/index.d.ts +3 -3
  45. package/dist/components/TilesGroup/index.d.ts +3 -3
  46. package/dist/components/TotalPrice/index.d.ts +3 -3
  47. package/dist/components/TrebleApp/index.d.ts +3 -3
  48. package/dist/components/TrebleApp/index.js +5 -0
  49. package/dist/components/TurntableAnimation/index.js +1 -1
  50. package/dist/components/Upload/index.d.ts +3 -3
  51. package/dist/components/Upload/index.js +1 -1
  52. package/dist/components/UploadArea/index.d.ts +3 -3
  53. package/dist/components/UploadArea/index.js +1 -1
  54. package/dist/components/Wishlist/WishlistItem.d.ts +2 -2
  55. package/dist/components/Wishlist/index.d.ts +4 -4
  56. package/dist/components/Wishlist/index.js +1 -1
  57. package/dist/components/Zoom/index.d.ts +6 -6
  58. package/dist/components/containers/formInputContainer.d.ts +2 -2
  59. package/dist/components/formComponents.d.ts +6 -6
  60. package/dist/components/message/index.d.ts +1 -1
  61. package/dist/constants.d.ts +6 -6
  62. package/dist/hooks/useAttribute/index.d.ts +4 -4
  63. package/dist/hooks/useAttribute/index.js +3 -3
  64. package/dist/hooks/useConfigurationLoader/index.js +1 -1
  65. package/dist/hooks/useConfigurator/index.d.ts +3 -3
  66. package/dist/hooks/useConfigurator/index.js +3 -5
  67. package/dist/hooks/useDevTools/index.d.ts +1 -1
  68. package/dist/hooks/useNestedConfigurator/index.d.ts +2 -2
  69. package/dist/hooks/useNestedConfigurator/index.js +3 -3
  70. package/dist/hooks/usePlayer/index.d.ts +1 -1
  71. package/dist/hooks/usePlayerPortal/index.d.ts +1 -1
  72. package/dist/hooks/useProductCache/index.js +1 -1
  73. package/dist/hooks/useResetProduct/index.d.ts +1 -1
  74. package/dist/hooks/useResetProduct/index.js +1 -1
  75. package/dist/hooks/useRoomBuilder/RoomBuilderState.js +1 -1
  76. package/dist/hooks/useRoomBuilder/constants.js +2 -2
  77. package/dist/hooks/useRoomBuilder/themes.js +1 -1
  78. package/dist/hooks/useRoomBuilder/types.d.ts +7 -7
  79. package/dist/hooks/useRoomBuilder/types.js +5 -5
  80. package/dist/hooks/useRoomBuilder/validators.d.ts +1 -1
  81. package/dist/hooks/useShare/index.d.ts +1 -1
  82. package/dist/hooks/useShare/index.js +4 -2
  83. package/dist/hooks/useSingleAnimation/index.js +1 -1
  84. package/dist/hooks/useSnapshot/index.d.ts +1 -1
  85. package/dist/hooks/useWishlist/index.d.ts +1 -1
  86. package/dist/hooks/useZoom/index.d.ts +1 -1
  87. package/dist/http/assets.d.ts +2 -0
  88. package/dist/http/assets.js +16 -0
  89. package/dist/http/index.d.ts +2 -2
  90. package/dist/http/index.js +2 -2
  91. package/dist/http/orders.d.ts +1 -1
  92. package/dist/icons/Spinner.d.ts +2 -2
  93. package/dist/store/attributes.d.ts +4 -4
  94. package/dist/store/attributes.js +2 -4
  95. package/dist/store/index.d.ts +6 -6
  96. package/dist/store/price.d.ts +1 -1
  97. package/dist/store/price.js +1 -1
  98. package/dist/store/product.d.ts +2 -2
  99. package/dist/store/product.js +1 -1
  100. package/dist/store/translations.d.ts +10 -8
  101. package/dist/store/translations.js +39 -19
  102. package/dist/store/treble.d.ts +1 -1
  103. package/dist/store/treble.js +1 -1
  104. package/dist/store/wishlist.d.ts +2 -2
  105. package/dist/store/wishlist.js +1 -1
  106. package/dist/types.d.ts +19 -17
  107. package/dist/types.js +9 -9
  108. package/dist/utils.d.ts +2 -6
  109. package/dist/utils.js +12 -13
  110. package/package.json +1 -2
  111. package/dist/Treble/snapshot.d.ts +0 -22
  112. package/dist/Treble/snapshot.js +0 -247
  113. package/dist/api/products.d.ts +0 -4
  114. package/dist/hooks/useSpaces/SpacesLayout.d.ts +0 -11
  115. package/dist/hooks/useSpaces/SpacesLayout.js +0 -74
  116. package/dist/hooks/useSpaces/SpacesState.d.ts +0 -164
  117. package/dist/hooks/useSpaces/SpacesState.js +0 -1751
  118. package/dist/hooks/useSpaces/constants.d.ts +0 -64
  119. package/dist/hooks/useSpaces/constants.js +0 -109
  120. package/dist/hooks/useSpaces/dataHandlers.d.ts +0 -20
  121. package/dist/hooks/useSpaces/dataHandlers.js +0 -254
  122. package/dist/hooks/useSpaces/draw/clearCanvas.d.ts +0 -2
  123. package/dist/hooks/useSpaces/draw/clearCanvas.js +0 -9
  124. package/dist/hooks/useSpaces/draw/drawBackground.d.ts +0 -2
  125. package/dist/hooks/useSpaces/draw/drawBackground.js +0 -12
  126. package/dist/hooks/useSpaces/draw/drawDimensions.d.ts +0 -3
  127. package/dist/hooks/useSpaces/draw/drawDimensions.js +0 -53
  128. package/dist/hooks/useSpaces/draw/drawDoors.d.ts +0 -9
  129. package/dist/hooks/useSpaces/draw/drawDoors.js +0 -99
  130. package/dist/hooks/useSpaces/draw/drawFloor.d.ts +0 -3
  131. package/dist/hooks/useSpaces/draw/drawFloor.js +0 -36
  132. package/dist/hooks/useSpaces/draw/drawGrid.d.ts +0 -3
  133. package/dist/hooks/useSpaces/draw/drawGrid.js +0 -33
  134. package/dist/hooks/useSpaces/draw/drawGuides.d.ts +0 -3
  135. package/dist/hooks/useSpaces/draw/drawGuides.js +0 -23
  136. package/dist/hooks/useSpaces/draw/drawOpenings.d.ts +0 -9
  137. package/dist/hooks/useSpaces/draw/drawOpenings.js +0 -72
  138. package/dist/hooks/useSpaces/draw/drawVertices.d.ts +0 -8
  139. package/dist/hooks/useSpaces/draw/drawVertices.js +0 -61
  140. package/dist/hooks/useSpaces/draw/drawWalls.d.ts +0 -10
  141. package/dist/hooks/useSpaces/draw/drawWalls.js +0 -88
  142. package/dist/hooks/useSpaces/draw/drawWindows.d.ts +0 -9
  143. package/dist/hooks/useSpaces/draw/drawWindows.js +0 -82
  144. package/dist/hooks/useSpaces/draw/index.d.ts +0 -11
  145. package/dist/hooks/useSpaces/draw/index.js +0 -129
  146. package/dist/hooks/useSpaces/geometry/addThicknessToLine.d.ts +0 -3
  147. package/dist/hooks/useSpaces/geometry/addThicknessToLine.js +0 -13
  148. package/dist/hooks/useSpaces/geometry/areLinesEqual.d.ts +0 -3
  149. package/dist/hooks/useSpaces/geometry/areLinesEqual.js +0 -17
  150. package/dist/hooks/useSpaces/geometry/arePointsEqual.d.ts +0 -3
  151. package/dist/hooks/useSpaces/geometry/arePointsEqual.js +0 -8
  152. package/dist/hooks/useSpaces/geometry/arePointsWithinProximity.d.ts +0 -3
  153. package/dist/hooks/useSpaces/geometry/arePointsWithinProximity.js +0 -11
  154. package/dist/hooks/useSpaces/geometry/closestPointOnLine.d.ts +0 -3
  155. package/dist/hooks/useSpaces/geometry/closestPointOnLine.js +0 -13
  156. package/dist/hooks/useSpaces/geometry/doLinesOverlap.d.ts +0 -2
  157. package/dist/hooks/useSpaces/geometry/doLinesOverlap.js +0 -16
  158. package/dist/hooks/useSpaces/geometry/euclideanMod.d.ts +0 -2
  159. package/dist/hooks/useSpaces/geometry/euclideanMod.js +0 -6
  160. package/dist/hooks/useSpaces/geometry/findLoops.d.ts +0 -6
  161. package/dist/hooks/useSpaces/geometry/findLoops.js +0 -117
  162. package/dist/hooks/useSpaces/geometry/getAllLineIntersections.d.ts +0 -6
  163. package/dist/hooks/useSpaces/geometry/getAllLineIntersections.js +0 -23
  164. package/dist/hooks/useSpaces/geometry/getAngleOfLineSegment.d.ts +0 -3
  165. package/dist/hooks/useSpaces/geometry/getAngleOfLineSegment.js +0 -7
  166. package/dist/hooks/useSpaces/geometry/getClosestPointOnLineSegment.d.ts +0 -3
  167. package/dist/hooks/useSpaces/geometry/getClosestPointOnLineSegment.js +0 -17
  168. package/dist/hooks/useSpaces/geometry/getDistanceToLine.d.ts +0 -3
  169. package/dist/hooks/useSpaces/geometry/getDistanceToLine.js +0 -10
  170. package/dist/hooks/useSpaces/geometry/getLengthOfLineSegment.d.ts +0 -3
  171. package/dist/hooks/useSpaces/geometry/getLengthOfLineSegment.js +0 -7
  172. package/dist/hooks/useSpaces/geometry/getLineAtOffsetOnLineSegment.d.ts +0 -3
  173. package/dist/hooks/useSpaces/geometry/getLineAtOffsetOnLineSegment.js +0 -17
  174. package/dist/hooks/useSpaces/geometry/getLineOtherPoint.d.ts +0 -3
  175. package/dist/hooks/useSpaces/geometry/getLineOtherPoint.js +0 -11
  176. package/dist/hooks/useSpaces/geometry/getLineSegmentsIntersection.d.ts +0 -3
  177. package/dist/hooks/useSpaces/geometry/getLineSegmentsIntersection.js +0 -43
  178. package/dist/hooks/useSpaces/geometry/getMidpointOfLineSegment.d.ts +0 -3
  179. package/dist/hooks/useSpaces/geometry/getMidpointOfLineSegment.js +0 -9
  180. package/dist/hooks/useSpaces/geometry/getParallelLineSegmentAtDistance.d.ts +0 -3
  181. package/dist/hooks/useSpaces/geometry/getParallelLineSegmentAtDistance.js +0 -20
  182. package/dist/hooks/useSpaces/geometry/getPointAtOffsetOnLineSegment.d.ts +0 -3
  183. package/dist/hooks/useSpaces/geometry/getPointAtOffsetOnLineSegment.js +0 -11
  184. package/dist/hooks/useSpaces/geometry/getPolygonArea.d.ts +0 -3
  185. package/dist/hooks/useSpaces/geometry/getPolygonArea.js +0 -15
  186. package/dist/hooks/useSpaces/geometry/getQuadrilateralArea.d.ts +0 -3
  187. package/dist/hooks/useSpaces/geometry/getQuadrilateralArea.js +0 -16
  188. package/dist/hooks/useSpaces/geometry/getTangetIntersectionAndOffset.d.ts +0 -6
  189. package/dist/hooks/useSpaces/geometry/getTangetIntersectionAndOffset.js +0 -17
  190. package/dist/hooks/useSpaces/geometry/getTriangleArea.d.ts +0 -3
  191. package/dist/hooks/useSpaces/geometry/getTriangleArea.js +0 -9
  192. package/dist/hooks/useSpaces/geometry/getUnitVectorOfLineSegment.d.ts +0 -3
  193. package/dist/hooks/useSpaces/geometry/getUnitVectorOfLineSegment.js +0 -12
  194. package/dist/hooks/useSpaces/geometry/index.d.ts +0 -30
  195. package/dist/hooks/useSpaces/geometry/index.js +0 -64
  196. package/dist/hooks/useSpaces/geometry/isPointInPolygon.d.ts +0 -3
  197. package/dist/hooks/useSpaces/geometry/isPointInPolygon.js +0 -21
  198. package/dist/hooks/useSpaces/geometry/isPointInQuadrilateral.d.ts +0 -3
  199. package/dist/hooks/useSpaces/geometry/isPointInQuadrilateral.js +0 -25
  200. package/dist/hooks/useSpaces/geometry/orderCoordinatesOnLineSegment.d.ts +0 -3
  201. package/dist/hooks/useSpaces/geometry/orderCoordinatesOnLineSegment.js +0 -11
  202. package/dist/hooks/useSpaces/geometry/splitLineAtOffset.d.ts +0 -3
  203. package/dist/hooks/useSpaces/geometry/splitLineAtOffset.js +0 -12
  204. package/dist/hooks/useSpaces/geometry/splitLineAtPoint.d.ts +0 -3
  205. package/dist/hooks/useSpaces/geometry/splitLineAtPoint.js +0 -9
  206. package/dist/hooks/useSpaces/geometry/splitLineAtPoints.d.ts +0 -3
  207. package/dist/hooks/useSpaces/geometry/splitLineAtPoints.js +0 -28
  208. package/dist/hooks/useSpaces/index.d.ts +0 -82
  209. package/dist/hooks/useSpaces/index.js +0 -482
  210. package/dist/hooks/useSpaces/themes/blueprint.d.ts +0 -3
  211. package/dist/hooks/useSpaces/themes/blueprint.js +0 -96
  212. package/dist/hooks/useSpaces/themes/default.d.ts +0 -3
  213. package/dist/hooks/useSpaces/themes/default.js +0 -96
  214. package/dist/hooks/useSpaces/themes/index.d.ts +0 -11
  215. package/dist/hooks/useSpaces/themes/index.js +0 -21
  216. package/dist/hooks/useSpaces/themes/light.d.ts +0 -3
  217. package/dist/hooks/useSpaces/themes/light.js +0 -96
  218. package/dist/hooks/useSpaces/types.d.ts +0 -339
  219. package/dist/hooks/useSpaces/types.js +0 -54
  220. package/dist/hooks/useSpaces/validators/areWallsDuplicated.d.ts +0 -3
  221. package/dist/hooks/useSpaces/validators/areWallsDuplicated.js +0 -61
  222. package/dist/hooks/useSpaces/validators/areWallsIntersecting.d.ts +0 -3
  223. package/dist/hooks/useSpaces/validators/areWallsIntersecting.js +0 -42
  224. package/dist/hooks/useSpaces/validators/areWallsOrphaningFeatures.d.ts +0 -3
  225. package/dist/hooks/useSpaces/validators/areWallsOrphaningFeatures.js +0 -52
  226. package/dist/hooks/useSpaces/validators/areWallsTooShort.d.ts +0 -3
  227. package/dist/hooks/useSpaces/validators/areWallsTooShort.js +0 -37
  228. package/dist/hooks/useSpaces/validators/index.d.ts +0 -15
  229. package/dist/hooks/useSpaces/validators/index.js +0 -40
  230. package/dist/hooks/useSpaces/validators/isFeatureCollidingWithExistingFeature.d.ts +0 -3
  231. package/dist/hooks/useSpaces/validators/isFeatureCollidingWithExistingFeature.js +0 -31
  232. package/dist/hooks/useSpaces/validators/isFeatureOutsideWallBounds.d.ts +0 -3
  233. package/dist/hooks/useSpaces/validators/isFeatureOutsideWallBounds.js +0 -19
  234. package/dist/hooks/useSpaces/validators/isLineTooShort.d.ts +0 -3
  235. package/dist/hooks/useSpaces/validators/isLineTooShort.js +0 -26
  236. package/dist/hooks/useSpaces/validators/isVertexLandingOnFeature.d.ts +0 -4
  237. package/dist/hooks/useSpaces/validators/isVertexLandingOnFeature.js +0 -19
  238. package/dist/hooks/useSpaces/validators/isWallEndingOnFeature.d.ts +0 -3
  239. package/dist/hooks/useSpaces/validators/isWallEndingOnFeature.js +0 -19
  240. package/dist/hooks/useSpaces/validators/isWallIntersectingFeature.d.ts +0 -3
  241. package/dist/hooks/useSpaces/validators/isWallIntersectingFeature.js +0 -41
  242. package/dist/hooks/useSpaces/validators/isWallOverlappingExisitingWalls.d.ts +0 -3
  243. package/dist/hooks/useSpaces/validators/isWallOverlappingExisitingWalls.js +0 -54
  244. package/dist/hooks/useSpaces/validators/isWallTooShort.d.ts +0 -3
  245. package/dist/hooks/useSpaces/validators/isWallTooShort.js +0 -10
  246. package/dist/hooks/useSpaces/validators/messaging.d.ts +0 -8
  247. package/dist/hooks/useSpaces/validators/messaging.js +0 -18
  248. package/dist/http/products.d.ts +0 -1
  249. package/dist/http/products.js +0 -12
  250. package/dist/icons/AngleSnapping.d.ts +0 -3
  251. package/dist/icons/AngleSnapping.js +0 -28
  252. package/dist/icons/Center.d.ts +0 -3
  253. package/dist/icons/Center.js +0 -24
  254. package/dist/icons/GridSnapping.d.ts +0 -3
  255. package/dist/icons/GridSnapping.js +0 -28
  256. package/dist/icons/LayoutAlt.d.ts +0 -3
  257. package/dist/icons/LayoutAlt.js +0 -21
  258. package/dist/icons/Magnet.d.ts +0 -3
  259. package/dist/icons/Magnet.js +0 -27
  260. package/dist/icons/Player3D.d.ts +0 -3
  261. package/dist/icons/Player3D.js +0 -21
  262. package/dist/icons/Ruler copy.d.ts +0 -3
  263. package/dist/icons/Ruler copy.js +0 -22
  264. package/dist/icons/RulerBlank.d.ts +0 -3
  265. package/dist/icons/RulerBlank.js +0 -25
  266. package/dist/icons/RulerDetailed copy.d.ts +0 -3
  267. package/dist/icons/RulerDetailed copy.js +0 -27
  268. package/dist/icons/RulerDetailed.d.ts +0 -3
  269. package/dist/icons/RulerDetailed.js +0 -27
  270. package/dist/icons/Save.d.ts +0 -3
  271. package/dist/icons/Save.js +0 -21
  272. package/dist/icons/UnitCm.d.ts +0 -3
  273. package/dist/icons/UnitCm.js +0 -22
  274. package/dist/icons/UnitFeet.d.ts +0 -3
  275. package/dist/icons/UnitFeet.js +0 -22
  276. package/dist/icons/UnitInch.d.ts +0 -3
  277. package/dist/icons/UnitInch.js +0 -22
  278. package/dist/icons/UnitMeter.d.ts +0 -3
  279. package/dist/icons/UnitMeter.js +0 -21
  280. package/dist/store/spaces.d.ts +0 -47
  281. package/dist/store/spaces.js +0 -197
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { ATTRIBUTE_TYPES } from '../../types';
4
4
  import { IFormComponentProps, IOption } from '../containers/formInputContainer';
@@ -6,7 +6,7 @@ export interface ISwitch extends IFormComponentProps<IOption> {
6
6
  showDescription?: boolean;
7
7
  }
8
8
  export declare const Switch: {
9
- (props: ISwitch): JSX.Element;
9
+ (props: ISwitch): React.JSX.Element;
10
10
  propTypes: {
11
11
  attribute: PropTypes.Requireable<string>;
12
12
  title: PropTypes.Requireable<string>;
@@ -30,5 +30,5 @@ export declare const Switch: {
30
30
  componentName: string;
31
31
  compatibleAttributes: Set<ATTRIBUTE_TYPES>;
32
32
  };
33
- declare const _default: (props: ISwitch) => JSX.Element | null;
33
+ declare const _default: (props: ISwitch) => React.JSX.Element | null;
34
34
  export default _default;
@@ -1,13 +1,13 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { ATTRIBUTE_TYPES } from '../../types';
3
3
  import { IFormComponentProps } from '../containers/formInputContainer';
4
4
  export interface ITextInput extends IFormComponentProps<undefined> {
5
5
  maxLength?: number;
6
6
  }
7
7
  export declare const TextInput: {
8
- (props: ITextInput): JSX.Element;
8
+ (props: ITextInput): React.JSX.Element;
9
9
  componentName: string;
10
10
  compatibleAttributes: Set<ATTRIBUTE_TYPES>;
11
11
  };
12
- declare const _default: (props: ITextInput) => JSX.Element | null;
12
+ declare const _default: (props: ITextInput) => React.JSX.Element | null;
13
13
  export default _default;
@@ -4,11 +4,14 @@ import { ILaunchConfig } from '../../store/treble';
4
4
  interface Theme {
5
5
  [key: string]: string | number;
6
6
  }
7
- export interface ThreekitProviderProps extends Partial<ILaunchConfig> {
7
+ interface AppProps extends Partial<ILaunchConfig> {
8
8
  productId?: string;
9
9
  theme?: Theme;
10
- reducer?: Record<string, Reducer>;
11
10
  children: React.ReactNode;
12
11
  }
13
- declare const ThreekitProvider: (props: ThreekitProviderProps) => JSX.Element;
12
+ export interface ThreekitProviderProps extends AppProps {
13
+ reducer?: Record<string, Reducer>;
14
+ removeTheme?: boolean;
15
+ }
16
+ declare const ThreekitProvider: (props: ThreekitProviderProps) => React.JSX.Element;
14
17
  export default ThreekitProvider;
@@ -1,4 +1,15 @@
1
1
  "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
2
13
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
14
  if (k2 === undefined) k2 = k;
4
15
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -57,10 +68,24 @@ var App = function (props) {
57
68
  return react_1.default.createElement(react_1.default.Fragment, null, props.children);
58
69
  };
59
70
  var ThreekitProvider = function (props) {
71
+ var appProps = {
72
+ locale: props.locale,
73
+ assetId: props.assetId,
74
+ customId: props.customId,
75
+ productId: props.productId,
76
+ project: props.project,
77
+ playerConfig: props.playerConfig,
78
+ threekitEnv: props.threekitEnv,
79
+ eventHandlers: props.eventHandlers,
80
+ };
81
+ if (props.removeTheme)
82
+ return (react_1.default.createElement(react_redux_1.Provider, { store: (0, store_1.default)(props.reducer) },
83
+ react_1.default.createElement(App, __assign({}, appProps), props.children),
84
+ constants_1.TREBLE_DEBUG ? null : react_1.default.createElement(DevTools_1.default, null)));
60
85
  return (react_1.default.createElement(react_redux_1.Provider, { store: (0, store_1.default)(props.reducer) },
61
86
  react_1.default.createElement(styled_components_1.ThemeProvider, { theme: theme_1.default },
62
- react_1.default.createElement(GlobalStyles_styles_1.default, null),
63
- react_1.default.createElement(App, { locale: props.locale, assetId: props.assetId, customId: props.customId, productId: props.productId, project: props.project, playerConfig: props.playerConfig, threekitEnv: props.threekitEnv, eventHandlers: props.eventHandlers }, props.children),
87
+ props.removeTheme ? null : react_1.default.createElement(GlobalStyles_styles_1.default, null),
88
+ react_1.default.createElement(App, __assign({}, appProps), props.children),
64
89
  constants_1.TREBLE_DEBUG ? null : react_1.default.createElement(DevTools_1.default, null))));
65
90
  };
66
91
  exports.default = ThreekitProvider;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { ATTRIBUTE_TYPES } from '../../types';
4
4
  import { IFormComponentProps, IOptionShared } from '../containers/formInputContainer';
@@ -6,7 +6,7 @@ export interface ITiles extends IFormComponentProps<IOptionShared> {
6
6
  columns?: number;
7
7
  }
8
8
  export declare const Tiles: {
9
- (props: ITiles): JSX.Element;
9
+ (props: ITiles): React.JSX.Element;
10
10
  propTypes: {
11
11
  attribute: PropTypes.Requireable<string>;
12
12
  title: PropTypes.Requireable<string>;
@@ -35,5 +35,5 @@ export declare const Tiles: {
35
35
  componentName: string;
36
36
  compatibleAttributes: Set<ATTRIBUTE_TYPES>;
37
37
  };
38
- declare const _default: (props: ITiles) => JSX.Element | null;
38
+ declare const _default: (props: ITiles) => React.JSX.Element | null;
39
39
  export default _default;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { ATTRIBUTE_TYPES } from '../../types';
4
4
  import { IFormComponentProps, IOptionShared } from '../containers/formInputContainer';
@@ -6,7 +6,7 @@ export interface ITilesGroup extends IFormComponentProps<IOptionShared> {
6
6
  columns?: number;
7
7
  }
8
8
  export declare const TilesGroup: {
9
- (props: ITilesGroup): JSX.Element;
9
+ (props: ITilesGroup): React.JSX.Element;
10
10
  propTypes: {
11
11
  attribute: PropTypes.Requireable<string>;
12
12
  title: PropTypes.Requireable<string>;
@@ -33,5 +33,5 @@ export declare const TilesGroup: {
33
33
  componentName: string;
34
34
  compatibleAttributes: Set<ATTRIBUTE_TYPES>;
35
35
  };
36
- declare const _default: (props: ITilesGroup) => JSX.Element | null;
36
+ declare const _default: (props: ITilesGroup) => React.JSX.Element | null;
37
37
  export default _default;
@@ -1,11 +1,11 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  interface IPrice {
4
4
  price?: string;
5
5
  className?: string;
6
6
  }
7
7
  export declare const TotalPriceComponent: {
8
- (props: IPrice): JSX.Element;
8
+ (props: IPrice): React.JSX.Element;
9
9
  propTypes: {
10
10
  price: PropTypes.Requireable<string>;
11
11
  className: PropTypes.Requireable<string>;
@@ -15,5 +15,5 @@ export declare const TotalPriceComponent: {
15
15
  className: string;
16
16
  };
17
17
  };
18
- export declare const TotalPrice: (props: IPrice) => JSX.Element | null;
18
+ export declare const TotalPrice: (props: IPrice) => React.JSX.Element | null;
19
19
  export default TotalPrice;
@@ -1,8 +1,8 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { ThreekitProviderProps } from '../ThreekitProvider';
3
3
  interface TrebleAppProps extends Omit<ThreekitProviderProps, 'children'> {
4
4
  productId?: string;
5
5
  }
6
- export declare const Products: () => JSX.Element | null;
7
- export default function TrebleApp(props: TrebleAppProps): JSX.Element | null;
6
+ export declare const Products: () => React.JSX.Element | null;
7
+ export default function TrebleApp(props: TrebleAppProps): React.JSX.Element | null;
8
8
  export {};
@@ -66,6 +66,11 @@ function TrebleApp(props) {
66
66
  react_1.Children.forEach(Object.values(productComponents).map(function (el) { return el({}); }), function (jsx, i) {
67
67
  if (!jsx)
68
68
  return;
69
+ if (typeof jsx === 'string' ||
70
+ typeof jsx === 'boolean' ||
71
+ typeof jsx === 'number' ||
72
+ !('props' in jsx))
73
+ return;
69
74
  if (!jsx.props.products)
70
75
  return;
71
76
  var products = jsx.props.products;
@@ -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 (_) try {
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) 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]) {
@@ -1,13 +1,13 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { ATTRIBUTE_TYPES } from '../../types';
3
3
  import { IFormComponentProps, IOptionShared } from '../containers/formInputContainer';
4
4
  export interface IUpload extends Pick<IFormComponentProps<IOptionShared>, 'title' | 'description' | 'className' | 'value'> {
5
5
  onChange: (file: File | undefined) => Promise<void>;
6
6
  }
7
7
  export declare const Upload: {
8
- (props: IUpload): JSX.Element;
8
+ (props: IUpload): React.JSX.Element;
9
9
  componentName: string;
10
10
  compatibleAttributes: Set<ATTRIBUTE_TYPES>;
11
11
  };
12
- declare const _default: (props: IUpload) => JSX.Element | null;
12
+ declare const _default: (props: IUpload) => React.JSX.Element | null;
13
13
  export default _default;
@@ -37,7 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
37
37
  function verb(n) { return function (v) { return step([n, v]); }; }
38
38
  function step(op) {
39
39
  if (f) throw new TypeError("Generator is already executing.");
40
- while (_) try {
40
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
41
41
  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;
42
42
  if (y = 0, t) op = [op[0] & 2, t.value];
43
43
  switch (op[0]) {
@@ -1,13 +1,13 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { ATTRIBUTE_TYPES } from '../../types';
3
3
  import { IFormComponentProps, IOptionShared } from '../containers/formInputContainer';
4
4
  export interface IUpload extends Pick<IFormComponentProps<IOptionShared>, 'title' | 'description' | 'className' | 'value'> {
5
5
  onChange: (file: File) => Promise<void>;
6
6
  }
7
7
  export declare const UploadArea: {
8
- (props: IUpload): JSX.Element;
8
+ (props: IUpload): React.JSX.Element;
9
9
  componentName: string;
10
10
  compatibleAttributes: Set<ATTRIBUTE_TYPES>;
11
11
  };
12
- declare const _default: (props: IUpload) => JSX.Element | null;
12
+ declare const _default: (props: IUpload) => React.JSX.Element | null;
13
13
  export default _default;
@@ -37,7 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
37
37
  function verb(n) { return function (v) { return step([n, v]); }; }
38
38
  function step(op) {
39
39
  if (f) throw new TypeError("Generator is already executing.");
40
- while (_) try {
40
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
41
41
  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;
42
42
  if (y = 0, t) op = [op[0] & 2, t.value];
43
43
  switch (op[0]) {
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { IMetadata } from '../../types';
3
3
  interface WishlistItemProps {
4
4
  thumbnail?: string;
@@ -7,5 +7,5 @@ interface WishlistItemProps {
7
7
  onShare: () => void;
8
8
  onDelete: () => void;
9
9
  }
10
- export declare const WishlistItem: (props: WishlistItemProps) => JSX.Element;
10
+ export declare const WishlistItem: (props: WishlistItemProps) => React.JSX.Element;
11
11
  export default WishlistItem;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { BUTTON_SHAPES, BUTTON_TYPES } from '../Button';
4
4
  interface WidgetButtonProps {
@@ -14,10 +14,10 @@ interface WishlistProps {
14
14
  shape?: BUTTON_SHAPES;
15
15
  className?: string;
16
16
  }
17
- export declare const AddWishlistButton: (props: WidgetButtonProps) => JSX.Element;
18
- export declare const WishlistButton: (props: WidgetButtonProps) => JSX.Element;
17
+ export declare const AddWishlistButton: (props: WidgetButtonProps) => React.JSX.Element;
18
+ export declare const WishlistButton: (props: WidgetButtonProps) => React.JSX.Element;
19
19
  export declare const Wishlist: {
20
- (props: WishlistProps): JSX.Element | null;
20
+ (props: WishlistProps): React.JSX.Element | null;
21
21
  propTypes: {
22
22
  className: PropTypes.Requireable<string>;
23
23
  };
@@ -37,7 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
37
37
  function verb(n) { return function (v) { return step([n, v]); }; }
38
38
  function step(op) {
39
39
  if (f) throw new TypeError("Generator is already executing.");
40
- while (_) try {
40
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
41
41
  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;
42
42
  if (y = 0, t) op = [op[0] & 2, t.value];
43
43
  switch (op[0]) {
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { BUTTON_SHAPES, BUTTON_TYPES } from '../Button';
4
4
  interface ZoomComponentProps {
@@ -10,10 +10,10 @@ interface ZoomComponentProps {
10
10
  interface ZoomProps extends ZoomComponentProps {
11
11
  orientation?: string;
12
12
  }
13
- export declare const ZoomOutComponent: (props: ZoomComponentProps) => JSX.Element | null;
14
- export declare const ZoomInComponent: (props: ZoomComponentProps) => JSX.Element | null;
13
+ export declare const ZoomOutComponent: (props: ZoomComponentProps) => React.JSX.Element | null;
14
+ export declare const ZoomInComponent: (props: ZoomComponentProps) => React.JSX.Element | null;
15
15
  export declare const Zoom: {
16
- (props: ZoomProps): JSX.Element;
16
+ (props: ZoomProps): React.JSX.Element;
17
17
  propTypes: {
18
18
  step: PropTypes.Requireable<number>;
19
19
  orientation: PropTypes.Requireable<string>;
@@ -30,7 +30,7 @@ export declare const Zoom: {
30
30
  };
31
31
  componentName: string;
32
32
  Icon: import("../../icons/types").IIcon;
33
- ZoomOut: (props: ZoomComponentProps) => JSX.Element | null;
34
- ZoomIn: (props: ZoomComponentProps) => JSX.Element | null;
33
+ ZoomOut: (props: ZoomComponentProps) => React.JSX.Element | null;
34
+ ZoomIn: (props: ZoomComponentProps) => React.JSX.Element | null;
35
35
  };
36
36
  export default Zoom;
@@ -1,4 +1,4 @@
1
- import { FunctionComponent } from 'react';
1
+ import React, { FunctionComponent } from 'react';
2
2
  import { RawAttributeValue } from '../../hooks/useAttribute';
3
3
  import { IHydratedAttribute, IHydratedAttributeAssetValue } from '../../types';
4
4
  export interface IOptionShared {
@@ -50,5 +50,5 @@ export declare const hydrateAttributeForComponent: (attribute: IHydratedAttribut
50
50
  value: string;
51
51
  }[] | IHydratedAttributeAssetValue[] | undefined;
52
52
  };
53
- declare function formComponentContainer<P extends IFormContainerProps>(FormComponent: IFormComponent<Omit<P, 'options'>>): (props: P) => JSX.Element | null;
53
+ declare function formComponentContainer<P extends IFormContainerProps>(FormComponent: IFormComponent<Omit<P, 'options'>>): (props: P) => React.JSX.Element | null;
54
54
  export default formComponentContainer;
@@ -4,21 +4,21 @@ export declare const FORM_COMPONENT_TYPES: {
4
4
  };
5
5
  export declare const formComponents: {
6
6
  [x: string]: {
7
- [x: string]: ((props: import("./Cards").ICards) => JSX.Element | null) | ((props: import("./TextInput").ITextInput) => JSX.Element | null) | ((props: import("./Tiles").ITiles) => JSX.Element | null);
7
+ [x: string]: ((props: import("./Cards").ICards) => import("react").JSX.Element | null) | ((props: import("./TextInput").ITextInput) => import("react").JSX.Element | null) | ((props: import("./Tiles").ITiles) => import("react").JSX.Element | null);
8
8
  } | {
9
- [x: string]: (props: import("./Upload").IUpload) => JSX.Element | null;
9
+ [x: string]: (props: import("./Upload").IUpload) => import("react").JSX.Element | null;
10
10
  };
11
11
  Asset: {
12
- [x: string]: ((props: import("./Cards").ICards) => JSX.Element | null) | ((props: import("./Tiles").ITiles) => JSX.Element | null);
12
+ [x: string]: ((props: import("./Cards").ICards) => import("react").JSX.Element | null) | ((props: import("./Tiles").ITiles) => import("react").JSX.Element | null);
13
13
  };
14
14
  String: {
15
- [x: string]: ((props: import("./Cards").ICards) => JSX.Element | null) | ((props: import("./TextInput").ITextInput) => JSX.Element | null) | ((props: import("./Tiles").ITiles) => JSX.Element | null);
15
+ [x: string]: ((props: import("./Cards").ICards) => import("react").JSX.Element | null) | ((props: import("./TextInput").ITextInput) => import("react").JSX.Element | null) | ((props: import("./Tiles").ITiles) => import("react").JSX.Element | null);
16
16
  };
17
17
  upload: {
18
- [x: string]: (props: import("./Upload").IUpload) => JSX.Element | null;
18
+ [x: string]: (props: import("./Upload").IUpload) => import("react").JSX.Element | null;
19
19
  };
20
20
  Boolean: {
21
- [x: string]: (props: import("./Switch").ISwitch) => JSX.Element | null;
21
+ [x: string]: (props: import("./Switch").ISwitch) => import("react").JSX.Element | null;
22
22
  };
23
23
  };
24
24
  export default formComponents;
@@ -10,7 +10,7 @@ interface MessageComponentProps {
10
10
  icon: string;
11
11
  }
12
12
  export declare const MessageComponent: {
13
- (props: MessageComponentProps): JSX.Element | null;
13
+ (props: MessageComponentProps): React.JSX.Element | null;
14
14
  propTypes: {
15
15
  content: PropTypes.Requireable<string>;
16
16
  icon: PropTypes.Requireable<string>;
@@ -1,12 +1,12 @@
1
1
  export declare const TREBLE_DEBUG: boolean;
2
2
  export declare const DEFAULT_CLASS_NAME = "threekit-react";
3
3
  export declare const CLASS_NAME_PREFIX = "tk";
4
- export declare const INPUT_COMPONENT_CLASS_NAME: string;
5
- export declare const WIDGET_CLASS_NAME: string;
6
- export declare const LAYOUT_CLASS_NAME: string;
7
- export declare const TOOL_CLASS_NAME: string;
8
- export declare const DISPLAY_CLASS_NAME: string;
9
- export declare const FORM_CLASS_NAME: string;
4
+ export declare const INPUT_COMPONENT_CLASS_NAME = "threekit-react tk-input";
5
+ export declare const WIDGET_CLASS_NAME = "threekit-react tk-widget";
6
+ export declare const LAYOUT_CLASS_NAME = "threekit-react tk-layout";
7
+ export declare const TOOL_CLASS_NAME = "threekit-react tk-tool";
8
+ export declare const DISPLAY_CLASS_NAME = "threekit-react tk-display";
9
+ export declare const FORM_CLASS_NAME = "threekit-react tk-form";
10
10
  export declare const IS_TREBLE_SCRIPTS: boolean;
11
11
  export declare const TK_PRODUCT_ID_PARAM_KEY = "tkProduct";
12
12
  export declare const TK_SAVED_CONFIG_PARAM_KEY = "tkConfigId";
@@ -1,10 +1,10 @@
1
1
  import { IHydratedAttribute, IConfigurationColor } from '../../types';
2
- export declare type RawAttributeValue = string | number | boolean | IConfigurationColor | File | undefined;
3
- declare type UseAttributeError = [undefined, undefined];
4
- declare type UseAttributeSuccess = [
2
+ export type RawAttributeValue = string | number | boolean | IConfigurationColor | File | undefined;
3
+ type UseAttributeError = [undefined, undefined];
4
+ type UseAttributeSuccess = [
5
5
  IHydratedAttribute,
6
6
  (val: RawAttributeValue) => Promise<void>
7
7
  ];
8
- declare type UseAttributeHook = UseAttributeError | UseAttributeSuccess;
8
+ type UseAttributeHook = UseAttributeError | UseAttributeSuccess;
9
9
  declare const useAttribute: (attributeName?: string) => UseAttributeHook;
10
10
  export default useAttribute;
@@ -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 (_) try {
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) 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]) {
@@ -45,13 +45,13 @@ var useAttribute = function (attributeName) {
45
45
  if (!attributeName)
46
46
  return [undefined, undefined];
47
47
  var dispatch = (0, store_1.useThreekitDispatch)();
48
- var _b = (0, store_1.useThreekitSelector)(attributes_1.getHydrationData), attributes = _b[0], translations = _b[1], language = _b[2];
48
+ var _b = (0, store_1.useThreekitSelector)(attributes_1.getHydrationData), attributes = _b[0], translations = _b[1];
49
49
  if (!attributeName || !attributes)
50
50
  return [undefined, undefined];
51
51
  var attribute = attributes[attributeName];
52
52
  if (!attribute)
53
53
  return [undefined, undefined];
54
- var preppedAttributes = (0, utils_2.hydrateAttribute)([(_a = {}, _a[attributeName] = attribute, _a), translations, language], function (config) { return dispatch((0, attributes_1.setConfiguration)(config)); });
54
+ var preppedAttributes = (0, utils_2.hydrateAttribute)([(_a = {}, _a[attributeName] = attribute, _a), translations], function (config) { return dispatch((0, attributes_1.setConfiguration)(config)); });
55
55
  var handleChange = function (value) { return __awaiter(void 0, void 0, void 0, function () {
56
56
  var preppedValue, assetId;
57
57
  var _a;
@@ -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 (_) try {
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) 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]) {
@@ -1,9 +1,9 @@
1
1
  import { ISetConfiguration, IHydratedAttribute } from '../../types';
2
- declare type UseConfiguratorError = [undefined, undefined];
3
- declare type UseConfiguratorSuccess = [
2
+ type UseConfiguratorError = [undefined, undefined];
3
+ type UseConfiguratorSuccess = [
4
4
  Record<string, IHydratedAttribute>,
5
5
  (configuration: ISetConfiguration) => void
6
6
  ];
7
- declare type UseConfiguratorHook = UseConfiguratorError | UseConfiguratorSuccess;
7
+ type UseConfiguratorHook = UseConfiguratorError | UseConfiguratorSuccess;
8
8
  declare const useConfigurator: () => UseConfiguratorHook;
9
9
  export default useConfigurator;
@@ -5,12 +5,10 @@ var store_1 = require("../../store");
5
5
  var utils_1 = require("../../utils");
6
6
  var useConfigurator = function () {
7
7
  var dispatch = (0, store_1.useThreekitDispatch)();
8
- var hydrationData = (0, store_1.useThreekitSelector)(attributes_1.getHydrationData);
9
- if (!hydrationData)
8
+ var _a = (0, store_1.useThreekitSelector)(attributes_1.getHydrationData), attributes = _a[0], translations = _a[1];
9
+ if (!attributes || !translations)
10
10
  return [undefined, undefined];
11
- var preppedAttributes = (0, utils_1.hydrateAttribute)(hydrationData, function (config) {
12
- return dispatch((0, attributes_1.setConfiguration)(config));
13
- });
11
+ var preppedAttributes = (0, utils_1.hydrateAttribute)([attributes, translations], function (config) { return dispatch((0, attributes_1.setConfiguration)(config)); });
14
12
  var handleChange = function (configuration) {
15
13
  return dispatch((0, attributes_1.setConfiguration)(configuration));
16
14
  };
@@ -1,3 +1,3 @@
1
- declare type UseDevToolsHook = [boolean, (val: boolean) => void];
1
+ type UseDevToolsHook = [boolean, (val: boolean) => void];
2
2
  export declare const useDevTools: () => UseDevToolsHook;
3
3
  export default useDevTools;
@@ -1,6 +1,6 @@
1
1
  import { IHydratedAttribute, IMetadata, ISetConfiguration } from '../../types';
2
- declare type UseNestedConfiguratorError = [undefined, undefined, undefined, undefined];
3
- declare type UseNestedConfiguratorSuccess = [
2
+ type UseNestedConfiguratorError = [undefined, undefined, undefined, undefined];
3
+ type UseNestedConfiguratorSuccess = [
4
4
  Record<string, IHydratedAttribute>,
5
5
  (val: ISetConfiguration) => Promise<void>,
6
6
  IMetadata,
@@ -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 (_) try {
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) 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]) {
@@ -47,7 +47,7 @@ var useNestedConfigurator = function (address) {
47
47
  var hasInitialized = (0, store_1.useThreekitSelector)(treble_1.isThreekitInitialized);
48
48
  var playerLoading = (0, store_1.useThreekitSelector)(treble_1.isPlayerLoading);
49
49
  var priceConfig = (0, store_1.useThreekitSelector)(price_1.getPriceConfig);
50
- var _a = (0, store_1.useThreekitSelector)(attributes_1.getHydrationData), _ = _a[0], translations = _a[1], language = _a[2];
50
+ var _a = (0, store_1.useThreekitSelector)(attributes_1.getHydrationData), _ = _a[0], translations = _a[1];
51
51
  var _b = (0, react_1.useState)(), attributes = _b[0], setAttributes = _b[1];
52
52
  var metadataRef = (0, react_1.useRef)({});
53
53
  var configurator = (0, react_1.useRef)();
@@ -90,7 +90,7 @@ var useNestedConfigurator = function (address) {
90
90
  var _a;
91
91
  return Object.assign(output, (_a = {}, _a[attr.name] = attr, _a));
92
92
  }, {});
93
- var preppedAttributes = (0, utils_1.hydrateAttribute)([attributeObj, translations, language], handleSelect);
93
+ var preppedAttributes = (0, utils_1.hydrateAttribute)([attributeObj, translations], handleSelect);
94
94
  var price = priceConfig
95
95
  ? configurator.current.getPrice(priceConfig.id, priceConfig.currency)
96
96
  : undefined;
@@ -1,3 +1,3 @@
1
- declare type UsePlayer = [undefined] | [(node: null | HTMLDivElement) => void];
1
+ type UsePlayer = [undefined] | [(node: null | HTMLDivElement) => void];
2
2
  declare const usePlayer: () => UsePlayer;
3
3
  export default usePlayer;
@@ -1,3 +1,3 @@
1
- declare type UsePlayerPortal = [undefined, undefined] | [(toEl: string) => void, () => void];
1
+ type UsePlayerPortal = [undefined, undefined] | [(toEl: string) => void, () => void];
2
2
  declare const usePlayerPortal: () => UsePlayerPortal;
3
3
  export default usePlayerPortal;
@@ -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 (_) try {
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) 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]) {
@@ -1,3 +1,3 @@
1
- declare type UseShareHook = undefined | (() => Promise<void>);
1
+ type UseShareHook = undefined | (() => Promise<void>);
2
2
  declare const useResetProduct: () => UseShareHook;
3
3
  export default useResetProduct;
@@ -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 (_) try {
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) 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]) {
@@ -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 (_) try {
28
+ while (g && (g = 0, op[0] && (_ = 0)), _) 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]) {
@@ -12,7 +12,7 @@ var IWallAttributes;
12
12
  IWallAttributes["HEIGHT"] = "Height";
13
13
  IWallAttributes["THICKNESS"] = "Thickness";
14
14
  IWallAttributes["CONNECTIONS"] = "Connections";
15
- })(IWallAttributes = exports.IWallAttributes || (exports.IWallAttributes = {}));
15
+ })(IWallAttributes || (exports.IWallAttributes = IWallAttributes = {}));
16
16
  var IFeatureAttribute;
17
17
  (function (IFeatureAttribute) {
18
18
  IFeatureAttribute["POSITION_X"] = "Start X";
@@ -21,7 +21,7 @@ var IFeatureAttribute;
21
21
  IFeatureAttribute["HEIGHT"] = "Height";
22
22
  IFeatureAttribute["LENGTH"] = "Length";
23
23
  IFeatureAttribute["CONNECTED_TO"] = "Connected To";
24
- })(IFeatureAttribute = exports.IFeatureAttribute || (exports.IFeatureAttribute = {}));
24
+ })(IFeatureAttribute || (exports.IFeatureAttribute = IFeatureAttribute = {}));
25
25
  exports.SCALE = 0.02;
26
26
  exports.SNAP_PROXIMITY = 10;
27
27
  exports.MIN_WALL_LENGTH = 50;
@@ -7,7 +7,7 @@ var IThemes;
7
7
  IThemes["DEFAULT"] = "default";
8
8
  IThemes["BLUEPRINT"] = "blueprint";
9
9
  IThemes["LIGHT"] = "light";
10
- })(IThemes = exports.IThemes || (exports.IThemes = {}));
10
+ })(IThemes || (exports.IThemes = IThemes = {}));
11
11
  var HIGHLIGHT_COLOR = '#36738E';
12
12
  var ACTIVE_COLOR = 'green';
13
13
  var ERROR_COLOR = 'red';