@threekit-tools/treble 0.0.92-next-01 → 0.0.93

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 (297) hide show
  1. package/dist/Treble/Treble.d.ts +2 -2
  2. package/dist/Treble/Treble.js +6 -5
  3. package/dist/Treble/index.d.ts +1 -1
  4. package/dist/Treble/index.js +1 -1
  5. package/dist/Treble/{snapshot.d.ts → snapshots.d.ts} +1 -1
  6. package/dist/Treble/{snapshot.js → snapshots.js} +1 -1
  7. package/dist/Treble/wishlist.d.ts +1 -1
  8. package/dist/Treble/wishlist.js +1 -1
  9. package/dist/api/assets.d.ts +1 -0
  10. package/dist/api/{products.js → assets.js} +12 -33
  11. package/dist/api/catalog.js +1 -1
  12. package/dist/api/configurations.d.ts +1 -0
  13. package/dist/api/configurations.js +10 -3
  14. package/dist/api/datatables.js +1 -1
  15. package/dist/api/index.d.ts +2 -2
  16. package/dist/api/index.js +2 -2
  17. package/dist/api/orders.js +1 -1
  18. package/dist/api/price.js +1 -1
  19. package/dist/components/AttributeTitle/index.d.ts +2 -2
  20. package/dist/components/AttributeValue/index.d.ts +2 -2
  21. package/dist/components/BreatheAnimation/index.js +1 -1
  22. package/dist/components/Button/index.d.ts +3 -3
  23. package/dist/components/Cards/index.d.ts +3 -3
  24. package/dist/components/DevTools/index.d.ts +2 -2
  25. package/dist/components/DraggableHint/draggableIndicator.styles.d.ts +1 -1
  26. package/dist/components/DraggableHint/index.d.ts +2 -2
  27. package/dist/components/Dropdown/index.d.ts +3 -3
  28. package/dist/components/FlatForm/index.d.ts +2 -2
  29. package/dist/components/FormComponentDescription/index.d.ts +1 -1
  30. package/dist/components/FormComponentTitle/index.d.ts +1 -1
  31. package/dist/components/Player/index.d.ts +9 -9
  32. package/dist/components/PlayerLoadingCircular/index.d.ts +2 -2
  33. package/dist/components/PlayerLoadingSpinner/index.d.ts +2 -2
  34. package/dist/components/PlayerLoadingSpinner/playerLoadingSpinner.styles.d.ts +1 -1
  35. package/dist/components/ProductDescription/index.d.ts +3 -3
  36. package/dist/components/ProductName/index.d.ts +3 -3
  37. package/dist/components/Share/index.d.ts +2 -2
  38. package/dist/components/Share/index.js +1 -1
  39. package/dist/components/Share/share.styles.d.ts +1 -1
  40. package/dist/components/Snapshots/index.d.ts +2 -2
  41. package/dist/components/Strips/index.d.ts +3 -3
  42. package/dist/components/Swatch/index.d.ts +3 -3
  43. package/dist/components/Switch/index.d.ts +3 -3
  44. package/dist/components/TextInput/index.d.ts +3 -3
  45. package/dist/components/ThreekitProvider/index.d.ts +6 -3
  46. package/dist/components/ThreekitProvider/index.js +27 -2
  47. package/dist/components/Tiles/index.d.ts +3 -3
  48. package/dist/components/TilesGroup/index.d.ts +3 -3
  49. package/dist/components/TotalPrice/index.d.ts +3 -3
  50. package/dist/components/TrebleApp/index.d.ts +3 -3
  51. package/dist/components/TurntableAnimation/index.js +1 -1
  52. package/dist/components/Upload/index.d.ts +3 -3
  53. package/dist/components/Upload/index.js +1 -1
  54. package/dist/components/UploadArea/index.d.ts +3 -3
  55. package/dist/components/UploadArea/index.js +1 -1
  56. package/dist/components/Wishlist/WishlistItem.d.ts +2 -2
  57. package/dist/components/Wishlist/index.d.ts +4 -4
  58. package/dist/components/Wishlist/index.js +1 -1
  59. package/dist/components/Zoom/index.d.ts +6 -6
  60. package/dist/components/containers/formInputContainer.d.ts +2 -2
  61. package/dist/components/formComponents.d.ts +6 -6
  62. package/dist/components/message/index.d.ts +1 -1
  63. package/dist/constants.d.ts +6 -6
  64. package/dist/hooks/useAttribute/index.d.ts +4 -4
  65. package/dist/hooks/useAttribute/index.js +3 -3
  66. package/dist/hooks/useConfigurationLoader/index.js +1 -1
  67. package/dist/hooks/useConfigurator/index.d.ts +3 -3
  68. package/dist/hooks/useConfigurator/index.js +3 -5
  69. package/dist/hooks/useDevTools/index.d.ts +1 -1
  70. package/dist/hooks/useNestedConfigurator/index.d.ts +2 -2
  71. package/dist/hooks/useNestedConfigurator/index.js +5 -4
  72. package/dist/hooks/usePlayer/index.d.ts +1 -1
  73. package/dist/hooks/usePlayerPortal/index.d.ts +1 -1
  74. package/dist/hooks/useProductCache/index.js +1 -1
  75. package/dist/hooks/useResetProduct/index.d.ts +1 -1
  76. package/dist/hooks/useResetProduct/index.js +1 -1
  77. package/dist/hooks/useRoomBuilder/RoomBuilderState.d.ts +95 -0
  78. package/dist/hooks/useRoomBuilder/RoomBuilderState.js +1237 -0
  79. package/dist/hooks/useRoomBuilder/constants.d.ts +41 -0
  80. package/dist/hooks/useRoomBuilder/constants.js +48 -0
  81. package/dist/hooks/useRoomBuilder/dataHandlers.d.ts +18 -0
  82. package/dist/hooks/useRoomBuilder/dataHandlers.js +187 -0
  83. package/dist/hooks/useRoomBuilder/draw.d.ts +55 -0
  84. package/dist/hooks/useRoomBuilder/draw.js +573 -0
  85. package/dist/hooks/useRoomBuilder/findLoops.d.ts +5 -0
  86. package/dist/hooks/{useSpaces/geometry → useRoomBuilder}/findLoops.js +13 -31
  87. package/dist/hooks/useRoomBuilder/geometry.d.ts +33 -0
  88. package/dist/hooks/useRoomBuilder/geometry.js +325 -0
  89. package/dist/hooks/useRoomBuilder/index.d.ts +40 -0
  90. package/dist/hooks/useRoomBuilder/index.js +303 -0
  91. package/dist/hooks/{useSpaces/validators → useRoomBuilder}/messaging.js +1 -1
  92. package/dist/hooks/{useSpaces/themes/index.d.ts → useRoomBuilder/themes.d.ts} +4 -3
  93. package/dist/hooks/useRoomBuilder/themes.js +273 -0
  94. package/dist/hooks/useRoomBuilder/types.d.ts +238 -0
  95. package/dist/hooks/useRoomBuilder/types.js +36 -0
  96. package/dist/hooks/useRoomBuilder/validators.d.ts +36 -0
  97. package/dist/hooks/useRoomBuilder/validators.js +362 -0
  98. package/dist/hooks/useShare/index.d.ts +1 -1
  99. package/dist/hooks/useShare/index.js +4 -2
  100. package/dist/hooks/useSingleAnimation/index.js +1 -1
  101. package/dist/hooks/useWishlist/index.d.ts +1 -1
  102. package/dist/hooks/useZoom/index.d.ts +1 -1
  103. package/dist/http/assets.d.ts +2 -0
  104. package/dist/http/assets.js +16 -0
  105. package/dist/http/index.d.ts +2 -2
  106. package/dist/http/index.js +2 -2
  107. package/dist/http/orders.d.ts +1 -1
  108. package/dist/icons/Draw.js +3 -3
  109. package/dist/icons/Spinner.d.ts +2 -2
  110. package/dist/icons/Window.js +4 -4
  111. package/dist/icons/index.js +0 -28
  112. package/dist/icons/types.d.ts +1 -1
  113. package/dist/index.d.ts +2 -17
  114. package/dist/index.js +5 -35
  115. package/dist/store/attributes.d.ts +4 -5
  116. package/dist/store/attributes.js +2 -4
  117. package/dist/store/index.d.ts +6 -13
  118. package/dist/store/index.js +1 -3
  119. package/dist/store/price.d.ts +1 -1
  120. package/dist/store/price.js +1 -1
  121. package/dist/store/product.d.ts +2 -2
  122. package/dist/store/product.js +8 -5
  123. package/dist/store/translations.d.ts +10 -8
  124. package/dist/store/translations.js +39 -19
  125. package/dist/store/treble.d.ts +2 -2
  126. package/dist/store/treble.js +22 -15
  127. package/dist/store/wishlist.d.ts +2 -2
  128. package/dist/store/wishlist.js +1 -1
  129. package/dist/types.d.ts +19 -20
  130. package/dist/types.js +9 -9
  131. package/dist/utils.d.ts +2 -6
  132. package/dist/utils.js +5 -12
  133. package/package.json +1 -2
  134. package/dist/api/products.d.ts +0 -4
  135. package/dist/hooks/useSpaces/SpacesLayout.d.ts +0 -11
  136. package/dist/hooks/useSpaces/SpacesLayout.js +0 -74
  137. package/dist/hooks/useSpaces/SpacesState.d.ts +0 -177
  138. package/dist/hooks/useSpaces/SpacesState.js +0 -1814
  139. package/dist/hooks/useSpaces/constants.d.ts +0 -79
  140. package/dist/hooks/useSpaces/constants.js +0 -130
  141. package/dist/hooks/useSpaces/dataHandlers.d.ts +0 -38
  142. package/dist/hooks/useSpaces/dataHandlers.js +0 -407
  143. package/dist/hooks/useSpaces/draw/clearCanvas.d.ts +0 -2
  144. package/dist/hooks/useSpaces/draw/clearCanvas.js +0 -9
  145. package/dist/hooks/useSpaces/draw/drawBackground.d.ts +0 -2
  146. package/dist/hooks/useSpaces/draw/drawBackground.js +0 -12
  147. package/dist/hooks/useSpaces/draw/drawDimensions.d.ts +0 -3
  148. package/dist/hooks/useSpaces/draw/drawDimensions.js +0 -53
  149. package/dist/hooks/useSpaces/draw/drawDoors.d.ts +0 -9
  150. package/dist/hooks/useSpaces/draw/drawDoors.js +0 -99
  151. package/dist/hooks/useSpaces/draw/drawFloor.d.ts +0 -3
  152. package/dist/hooks/useSpaces/draw/drawFloor.js +0 -36
  153. package/dist/hooks/useSpaces/draw/drawGrid.d.ts +0 -3
  154. package/dist/hooks/useSpaces/draw/drawGrid.js +0 -36
  155. package/dist/hooks/useSpaces/draw/drawGuides.d.ts +0 -3
  156. package/dist/hooks/useSpaces/draw/drawGuides.js +0 -23
  157. package/dist/hooks/useSpaces/draw/drawOpenings.d.ts +0 -9
  158. package/dist/hooks/useSpaces/draw/drawOpenings.js +0 -72
  159. package/dist/hooks/useSpaces/draw/drawVertices.d.ts +0 -8
  160. package/dist/hooks/useSpaces/draw/drawVertices.js +0 -61
  161. package/dist/hooks/useSpaces/draw/drawWalls.d.ts +0 -11
  162. package/dist/hooks/useSpaces/draw/drawWalls.js +0 -90
  163. package/dist/hooks/useSpaces/draw/drawWindows.d.ts +0 -9
  164. package/dist/hooks/useSpaces/draw/drawWindows.js +0 -82
  165. package/dist/hooks/useSpaces/draw/index.d.ts +0 -11
  166. package/dist/hooks/useSpaces/draw/index.js +0 -129
  167. package/dist/hooks/useSpaces/geometry/addThicknessToLine.d.ts +0 -3
  168. package/dist/hooks/useSpaces/geometry/addThicknessToLine.js +0 -13
  169. package/dist/hooks/useSpaces/geometry/areLinesEqual.d.ts +0 -3
  170. package/dist/hooks/useSpaces/geometry/areLinesEqual.js +0 -17
  171. package/dist/hooks/useSpaces/geometry/arePointsEqual.d.ts +0 -3
  172. package/dist/hooks/useSpaces/geometry/arePointsEqual.js +0 -8
  173. package/dist/hooks/useSpaces/geometry/arePointsWithinProximity.d.ts +0 -3
  174. package/dist/hooks/useSpaces/geometry/arePointsWithinProximity.js +0 -11
  175. package/dist/hooks/useSpaces/geometry/closestPointOnLine.d.ts +0 -3
  176. package/dist/hooks/useSpaces/geometry/closestPointOnLine.js +0 -13
  177. package/dist/hooks/useSpaces/geometry/doLinesOverlap.d.ts +0 -2
  178. package/dist/hooks/useSpaces/geometry/doLinesOverlap.js +0 -16
  179. package/dist/hooks/useSpaces/geometry/euclideanMod.d.ts +0 -2
  180. package/dist/hooks/useSpaces/geometry/euclideanMod.js +0 -6
  181. package/dist/hooks/useSpaces/geometry/findLoops.d.ts +0 -6
  182. package/dist/hooks/useSpaces/geometry/getAllLineIntersections.d.ts +0 -6
  183. package/dist/hooks/useSpaces/geometry/getAllLineIntersections.js +0 -23
  184. package/dist/hooks/useSpaces/geometry/getAngleOfLineSegment.d.ts +0 -3
  185. package/dist/hooks/useSpaces/geometry/getAngleOfLineSegment.js +0 -7
  186. package/dist/hooks/useSpaces/geometry/getClosestPointOnLineSegment.d.ts +0 -3
  187. package/dist/hooks/useSpaces/geometry/getClosestPointOnLineSegment.js +0 -17
  188. package/dist/hooks/useSpaces/geometry/getDistanceToLine.d.ts +0 -3
  189. package/dist/hooks/useSpaces/geometry/getDistanceToLine.js +0 -10
  190. package/dist/hooks/useSpaces/geometry/getLengthOfLineSegment.d.ts +0 -3
  191. package/dist/hooks/useSpaces/geometry/getLengthOfLineSegment.js +0 -7
  192. package/dist/hooks/useSpaces/geometry/getLineAtOffsetOnLineSegment.d.ts +0 -3
  193. package/dist/hooks/useSpaces/geometry/getLineAtOffsetOnLineSegment.js +0 -17
  194. package/dist/hooks/useSpaces/geometry/getLineOtherPoint.d.ts +0 -3
  195. package/dist/hooks/useSpaces/geometry/getLineOtherPoint.js +0 -11
  196. package/dist/hooks/useSpaces/geometry/getLineSegmentsIntersection.d.ts +0 -3
  197. package/dist/hooks/useSpaces/geometry/getLineSegmentsIntersection.js +0 -43
  198. package/dist/hooks/useSpaces/geometry/getMidpointOfLineSegment.d.ts +0 -3
  199. package/dist/hooks/useSpaces/geometry/getMidpointOfLineSegment.js +0 -9
  200. package/dist/hooks/useSpaces/geometry/getParallelLineSegmentAtDistance.d.ts +0 -3
  201. package/dist/hooks/useSpaces/geometry/getParallelLineSegmentAtDistance.js +0 -20
  202. package/dist/hooks/useSpaces/geometry/getPointAtOffsetOnLineSegment.d.ts +0 -3
  203. package/dist/hooks/useSpaces/geometry/getPointAtOffsetOnLineSegment.js +0 -11
  204. package/dist/hooks/useSpaces/geometry/getPolygonArea.d.ts +0 -3
  205. package/dist/hooks/useSpaces/geometry/getPolygonArea.js +0 -15
  206. package/dist/hooks/useSpaces/geometry/getQuadrilateralArea.d.ts +0 -3
  207. package/dist/hooks/useSpaces/geometry/getQuadrilateralArea.js +0 -16
  208. package/dist/hooks/useSpaces/geometry/getTangetIntersectionAndOffset.d.ts +0 -6
  209. package/dist/hooks/useSpaces/geometry/getTangetIntersectionAndOffset.js +0 -17
  210. package/dist/hooks/useSpaces/geometry/getTriangleArea.d.ts +0 -3
  211. package/dist/hooks/useSpaces/geometry/getTriangleArea.js +0 -9
  212. package/dist/hooks/useSpaces/geometry/getUnitVectorOfLineSegment.d.ts +0 -3
  213. package/dist/hooks/useSpaces/geometry/getUnitVectorOfLineSegment.js +0 -12
  214. package/dist/hooks/useSpaces/geometry/index.d.ts +0 -30
  215. package/dist/hooks/useSpaces/geometry/index.js +0 -64
  216. package/dist/hooks/useSpaces/geometry/isPointInPolygon.d.ts +0 -3
  217. package/dist/hooks/useSpaces/geometry/isPointInPolygon.js +0 -21
  218. package/dist/hooks/useSpaces/geometry/isPointInQuadrilateral.d.ts +0 -3
  219. package/dist/hooks/useSpaces/geometry/isPointInQuadrilateral.js +0 -25
  220. package/dist/hooks/useSpaces/geometry/orderCoordinatesOnLineSegment.d.ts +0 -3
  221. package/dist/hooks/useSpaces/geometry/orderCoordinatesOnLineSegment.js +0 -11
  222. package/dist/hooks/useSpaces/geometry/splitLineAtOffset.d.ts +0 -3
  223. package/dist/hooks/useSpaces/geometry/splitLineAtOffset.js +0 -12
  224. package/dist/hooks/useSpaces/geometry/splitLineAtPoint.d.ts +0 -3
  225. package/dist/hooks/useSpaces/geometry/splitLineAtPoint.js +0 -9
  226. package/dist/hooks/useSpaces/geometry/splitLineAtPoints.d.ts +0 -3
  227. package/dist/hooks/useSpaces/geometry/splitLineAtPoints.js +0 -28
  228. package/dist/hooks/useSpaces/index.d.ts +0 -95
  229. package/dist/hooks/useSpaces/index.js +0 -557
  230. package/dist/hooks/useSpaces/themes/blueprint.d.ts +0 -3
  231. package/dist/hooks/useSpaces/themes/blueprint.js +0 -96
  232. package/dist/hooks/useSpaces/themes/default.d.ts +0 -3
  233. package/dist/hooks/useSpaces/themes/default.js +0 -96
  234. package/dist/hooks/useSpaces/themes/index.js +0 -21
  235. package/dist/hooks/useSpaces/themes/light.d.ts +0 -3
  236. package/dist/hooks/useSpaces/themes/light.js +0 -96
  237. package/dist/hooks/useSpaces/types.d.ts +0 -378
  238. package/dist/hooks/useSpaces/types.js +0 -54
  239. package/dist/hooks/useSpaces/validators/areWallsDuplicated.d.ts +0 -3
  240. package/dist/hooks/useSpaces/validators/areWallsDuplicated.js +0 -61
  241. package/dist/hooks/useSpaces/validators/areWallsIntersecting.d.ts +0 -3
  242. package/dist/hooks/useSpaces/validators/areWallsIntersecting.js +0 -42
  243. package/dist/hooks/useSpaces/validators/areWallsOrphaningFeatures.d.ts +0 -3
  244. package/dist/hooks/useSpaces/validators/areWallsOrphaningFeatures.js +0 -52
  245. package/dist/hooks/useSpaces/validators/areWallsTooShort.d.ts +0 -3
  246. package/dist/hooks/useSpaces/validators/areWallsTooShort.js +0 -37
  247. package/dist/hooks/useSpaces/validators/index.d.ts +0 -15
  248. package/dist/hooks/useSpaces/validators/index.js +0 -40
  249. package/dist/hooks/useSpaces/validators/isFeatureCollidingWithExistingFeature.d.ts +0 -3
  250. package/dist/hooks/useSpaces/validators/isFeatureCollidingWithExistingFeature.js +0 -31
  251. package/dist/hooks/useSpaces/validators/isFeatureOutsideWallBounds.d.ts +0 -3
  252. package/dist/hooks/useSpaces/validators/isFeatureOutsideWallBounds.js +0 -19
  253. package/dist/hooks/useSpaces/validators/isLineTooShort.d.ts +0 -3
  254. package/dist/hooks/useSpaces/validators/isLineTooShort.js +0 -26
  255. package/dist/hooks/useSpaces/validators/isVertexLandingOnFeature.d.ts +0 -4
  256. package/dist/hooks/useSpaces/validators/isVertexLandingOnFeature.js +0 -19
  257. package/dist/hooks/useSpaces/validators/isWallEndingOnFeature.d.ts +0 -3
  258. package/dist/hooks/useSpaces/validators/isWallEndingOnFeature.js +0 -19
  259. package/dist/hooks/useSpaces/validators/isWallIntersectingFeature.d.ts +0 -3
  260. package/dist/hooks/useSpaces/validators/isWallIntersectingFeature.js +0 -41
  261. package/dist/hooks/useSpaces/validators/isWallOverlappingExisitingWalls.d.ts +0 -3
  262. package/dist/hooks/useSpaces/validators/isWallOverlappingExisitingWalls.js +0 -54
  263. package/dist/hooks/useSpaces/validators/isWallTooShort.d.ts +0 -3
  264. package/dist/hooks/useSpaces/validators/isWallTooShort.js +0 -10
  265. package/dist/http/products.d.ts +0 -1
  266. package/dist/http/products.js +0 -12
  267. package/dist/icons/AngleSnapping.d.ts +0 -3
  268. package/dist/icons/AngleSnapping.js +0 -28
  269. package/dist/icons/Boundary.d.ts +0 -3
  270. package/dist/icons/Boundary.js +0 -21
  271. package/dist/icons/Center.d.ts +0 -3
  272. package/dist/icons/Center.js +0 -24
  273. package/dist/icons/GridSnapping.d.ts +0 -3
  274. package/dist/icons/GridSnapping.js +0 -28
  275. package/dist/icons/LayoutAlt.d.ts +0 -3
  276. package/dist/icons/LayoutAlt.js +0 -21
  277. package/dist/icons/Magnet.d.ts +0 -3
  278. package/dist/icons/Magnet.js +0 -27
  279. package/dist/icons/Player3D.d.ts +0 -3
  280. package/dist/icons/Player3D.js +0 -21
  281. package/dist/icons/RulerBlank.d.ts +0 -3
  282. package/dist/icons/RulerBlank.js +0 -25
  283. package/dist/icons/RulerDetailed.d.ts +0 -3
  284. package/dist/icons/RulerDetailed.js +0 -27
  285. package/dist/icons/Save.d.ts +0 -3
  286. package/dist/icons/Save.js +0 -21
  287. package/dist/icons/UnitCm.d.ts +0 -3
  288. package/dist/icons/UnitCm.js +0 -22
  289. package/dist/icons/UnitFeet.d.ts +0 -3
  290. package/dist/icons/UnitFeet.js +0 -22
  291. package/dist/icons/UnitInch.d.ts +0 -3
  292. package/dist/icons/UnitInch.js +0 -22
  293. package/dist/icons/UnitMeter.d.ts +0 -3
  294. package/dist/icons/UnitMeter.js +0 -21
  295. package/dist/store/spaces.d.ts +0 -74
  296. package/dist/store/spaces.js +0 -354
  297. /package/dist/hooks/{useSpaces/validators → useRoomBuilder}/messaging.d.ts +0 -0
@@ -0,0 +1,303 @@
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
+ };
13
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ var desc = Object.getOwnPropertyDescriptor(m, k);
16
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
+ desc = { enumerable: true, get: function() { return m[k]; } };
18
+ }
19
+ Object.defineProperty(o, k2, desc);
20
+ }) : (function(o, m, k, k2) {
21
+ if (k2 === undefined) k2 = k;
22
+ o[k2] = m[k];
23
+ }));
24
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
26
+ }) : function(o, v) {
27
+ o["default"] = v;
28
+ });
29
+ var __importStar = (this && this.__importStar) || function (mod) {
30
+ if (mod && mod.__esModule) return mod;
31
+ var result = {};
32
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33
+ __setModuleDefault(result, mod);
34
+ return result;
35
+ };
36
+ var __importDefault = (this && this.__importDefault) || function (mod) {
37
+ return (mod && mod.__esModule) ? mod : { "default": mod };
38
+ };
39
+ Object.defineProperty(exports, "__esModule", { value: true });
40
+ var react_1 = require("react");
41
+ var types_1 = require("./types");
42
+ var useConfigurator_1 = __importDefault(require("../useConfigurator"));
43
+ var RoomBuilderState_1 = __importDefault(require("./RoomBuilderState"));
44
+ var constants_1 = require("./constants");
45
+ var themes_1 = __importStar(require("./themes"));
46
+ var useRoomBuilder = function (props) {
47
+ var _a;
48
+ var attributesState = (0, useConfigurator_1.default)()[0];
49
+ var _b = (0, react_1.useState)(types_1.IModes.DRAW), modeValue = _b[0], setMode = _b[1];
50
+ var _c = (0, react_1.useState)(true), showDimensions = _c[0], setShowDimensions = _c[1];
51
+ var _d = (0, react_1.useState)(true), angleSnappingEnabled = _d[0], setAngleSnappingEnabled = _d[1];
52
+ var _e = (0, react_1.useState)(null), selectedElement = _e[0], setSelectedElement = _e[1];
53
+ var _f = (0, react_1.useState)(null), selectedWallAsset = _f[0], setSelectedWallAsset = _f[1];
54
+ var canvasRef = (0, react_1.useRef)(null);
55
+ var selectElementPending = (0, react_1.useRef)(null);
56
+ var preppedConfig = Object.assign({
57
+ scale: constants_1.SCALE,
58
+ unit: types_1.IUnits.FEET,
59
+ snapProximity: constants_1.SNAP_PROXIMITY,
60
+ styles: ((_a = props.config) === null || _a === void 0 ? void 0 : _a.theme) && themes_1.default[props.config.theme]
61
+ ? themes_1.default[props.config.theme]
62
+ : themes_1.default[themes_1.IThemes.DEFAULT],
63
+ }, props.config);
64
+ var roomBuilderRef = (0, react_1.useRef)(new RoomBuilderState_1.default(__assign(__assign({}, props), { config: preppedConfig })));
65
+ var drawRoom = function () { return roomBuilderRef.current.drawRoom(canvasRef.current); };
66
+ (0, react_1.useEffect)(function () {
67
+ var _a;
68
+ if (!selectedWallAsset &&
69
+ (attributesState === null || attributesState === void 0 ? void 0 : attributesState[props.attributes[types_1.IElements.WALL]]))
70
+ setSelectedWallAsset(((_a = attributesState === null || attributesState === void 0 ? void 0 : attributesState[props.attributes[types_1.IElements.WALL]]) === null || _a === void 0 ? void 0 : _a.values[0].assetId) || null);
71
+ var attributesDelinked = JSON.parse(JSON.stringify(attributesState));
72
+ roomBuilderRef.current.setAttributesToState(attributesDelinked);
73
+ drawRoom();
74
+ }, [attributesState]);
75
+ (0, react_1.useEffect)(function () {
76
+ if (canvasRef === null || canvasRef === void 0 ? void 0 : canvasRef.current) {
77
+ canvasRef.current.addEventListener('mousedown', handleDrawWallStart);
78
+ canvasRef.current.addEventListener('mousemove', handleDrawWallMouseMove);
79
+ document.addEventListener('mouseup', handleDrawWallFinish);
80
+ canvasRef.current.addEventListener('mousemove', handleSelectModeHover);
81
+ canvasRef.current.addEventListener('mousedown', handleSelectElement);
82
+ canvasRef.current.addEventListener('mousemove', handleMoveSelectedElement);
83
+ document.addEventListener('mouseup', handleSetSelectedElement);
84
+ }
85
+ return function () {
86
+ if (canvasRef === null || canvasRef === void 0 ? void 0 : canvasRef.current) {
87
+ canvasRef.current.removeEventListener('mousedown', handleDrawWallStart);
88
+ canvasRef.current.removeEventListener('mousemove', handleDrawWallMouseMove);
89
+ document.removeEventListener('mouseup', handleDrawWallFinish);
90
+ canvasRef.current.removeEventListener('mousemove', handleSelectModeHover);
91
+ canvasRef.current.removeEventListener('mousedown', handleSelectElement);
92
+ canvasRef.current.removeEventListener('mousemove', handleMoveSelectedElement);
93
+ document.removeEventListener('mouseup', handleSetSelectedElement);
94
+ }
95
+ };
96
+ });
97
+ (0, react_1.useEffect)(function () {
98
+ roomBuilderRef.current.showDimensions = showDimensions;
99
+ roomBuilderRef.current.angleSnappingEnabled = angleSnappingEnabled;
100
+ roomBuilderRef.current.selectedElement = selectedElement
101
+ ? {
102
+ type: selectedElement.path[0],
103
+ index: selectedElement.path[1],
104
+ }
105
+ : null;
106
+ drawRoom();
107
+ }, [selectedElement, showDimensions, angleSnappingEnabled]);
108
+ var handleSelectModeHover = function (e) {
109
+ if (!canvasRef.current)
110
+ return;
111
+ if (modeValue !== types_1.IModes.SELECT)
112
+ return;
113
+ if (roomBuilderRef.current.activeElement !== null)
114
+ return;
115
+ var cursorPoint = [e.offsetX, e.offsetY];
116
+ roomBuilderRef.current.highlightElementIfInProximity(canvasRef.current, cursorPoint);
117
+ };
118
+ var handleSelectElement = function (e) {
119
+ if (!canvasRef.current)
120
+ return;
121
+ if (modeValue !== types_1.IModes.SELECT)
122
+ return;
123
+ var cursorPoint = [e.offsetX, e.offsetY];
124
+ roomBuilderRef.current.selectElementIfInProximity(canvasRef.current, cursorPoint);
125
+ var element = roomBuilderRef.current.getClickedElement(cursorPoint);
126
+ if (!element) {
127
+ if (selectedElement !== null)
128
+ setSelectedElement(null);
129
+ return;
130
+ }
131
+ if (roomBuilderRef.current.activeElement ||
132
+ (selectedElement &&
133
+ JSON.stringify(element.path) !== JSON.stringify(selectedElement.path)))
134
+ setSelectedElement(null);
135
+ selectElementPending.current = element;
136
+ };
137
+ var handleMoveSelectedElement = function (e) {
138
+ if (modeValue !== types_1.IModes.SELECT)
139
+ return;
140
+ if (!canvasRef.current)
141
+ return;
142
+ var point = [e.offsetX, e.offsetY];
143
+ roomBuilderRef.current.moveActiveElement(canvasRef.current, point);
144
+ selectElementPending.current = null;
145
+ };
146
+ var handleSetSelectedElement = function (e) {
147
+ var _a;
148
+ if (modeValue !== types_1.IModes.SELECT)
149
+ return;
150
+ if (!canvasRef.current)
151
+ return;
152
+ if (!((_a = canvasRef.current) === null || _a === void 0 ? void 0 : _a.contains(e.target))) {
153
+ roomBuilderRef.current.cancelMoveActiveElement(canvasRef.current);
154
+ return;
155
+ }
156
+ roomBuilderRef.current.finishMoveActiveElement(canvasRef.current);
157
+ if (selectElementPending.current) {
158
+ setSelectedElement(selectElementPending.current);
159
+ selectElementPending.current = null;
160
+ }
161
+ };
162
+ var handleDrawWallStart = function (e) {
163
+ if (modeValue !== types_1.IModes.DRAW)
164
+ return;
165
+ var cursorPoint = [e.offsetX, e.offsetY];
166
+ roomBuilderRef.current.startDrawNewWall(cursorPoint);
167
+ };
168
+ var handleDrawWallMouseMove = function (e) {
169
+ if (modeValue !== types_1.IModes.DRAW)
170
+ return;
171
+ if (!canvasRef.current)
172
+ return;
173
+ var cursorPoint = [e.offsetX, e.offsetY];
174
+ roomBuilderRef.current.drawNewWall(canvasRef.current, cursorPoint);
175
+ };
176
+ var handleDrawWallFinish = function (e) {
177
+ var _a;
178
+ if (modeValue !== types_1.IModes.DRAW)
179
+ return;
180
+ if (!canvasRef.current)
181
+ return;
182
+ if (!selectedWallAsset)
183
+ return;
184
+ if (!((_a = canvasRef.current) === null || _a === void 0 ? void 0 : _a.contains(e.target))) {
185
+ roomBuilderRef.current.cancelDrawNewWall(canvasRef.current);
186
+ return;
187
+ }
188
+ roomBuilderRef.current.finishDrawNewWall(canvasRef.current, selectedWallAsset);
189
+ };
190
+ var prepFeatureAttributeForOutput = function (type, attribute) {
191
+ if (!attribute)
192
+ return undefined;
193
+ var values = attribute.values.map(function (val) { return (__assign(__assign({}, val), { add: function (addToWallIndex, offset) {
194
+ return roomBuilderRef.current.addFeature(type, {
195
+ assetId: val.assetId,
196
+ length: constants_1.FEATURE_LENGTH,
197
+ offset: offset,
198
+ }, addToWallIndex);
199
+ } })); });
200
+ var value = attribute.value.map(function (val, i) { return (__assign(__assign({}, val), { delete: function () { return roomBuilderRef.current.deleteFeature(type, i); } })); });
201
+ return __assign(__assign({}, attribute), { values: values, value: value });
202
+ };
203
+ var prepWallAttributeForOutput = function (attribute) {
204
+ if (!attribute)
205
+ return undefined;
206
+ var values = attribute.values.map(function (val) { return (__assign(__assign({}, val), { selected: val.assetId === selectedWallAsset, selectToDraw: function () {
207
+ setMode(types_1.IModes.DRAW);
208
+ setSelectedWallAsset(val.assetId);
209
+ } })); });
210
+ var value = attribute.value.map(function (val, i) { return (__assign(__assign({}, val), { delete: function () { var _a; return (_a = roomBuilderRef.current) === null || _a === void 0 ? void 0 : _a.deleteWall(i); } })); });
211
+ return __assign(__assign({}, attribute), { values: values, value: value });
212
+ };
213
+ var getElementFromAttributeName = function (attributeName) {
214
+ var elementAttr = Object.entries(props.attributes).find(function (_a) {
215
+ var _ = _a[0], attrName = _a[1];
216
+ return attrName === attributeName;
217
+ });
218
+ if (!elementAttr)
219
+ return;
220
+ return elementAttr[0];
221
+ };
222
+ var handleSetMode = function (mode) {
223
+ if (mode === modeValue)
224
+ return;
225
+ drawRoom();
226
+ setMode(mode);
227
+ setSelectedElement(null);
228
+ };
229
+ var handleReset = function () {
230
+ var _a;
231
+ (_a = roomBuilderRef.current) === null || _a === void 0 ? void 0 : _a.deleteAll();
232
+ setSelectedElement(null);
233
+ };
234
+ var handleDeleteElement = function (type, index) {
235
+ var _a;
236
+ var elementType = type;
237
+ if (Object.values(props.attributes).includes(type)) {
238
+ var updatedType = getElementFromAttributeName(type);
239
+ if (!updatedType)
240
+ return;
241
+ elementType = updatedType;
242
+ }
243
+ (_a = roomBuilderRef.current) === null || _a === void 0 ? void 0 : _a.deleteElement(elementType, index);
244
+ setSelectedElement(null);
245
+ };
246
+ var handleToggleDimensions = function (val) {
247
+ if (val === undefined)
248
+ setShowDimensions(!showDimensions);
249
+ else
250
+ setShowDimensions(val);
251
+ setSelectedElement(null);
252
+ };
253
+ var handleToggleAngleSnapping = function (val) {
254
+ if (val === undefined)
255
+ setAngleSnappingEnabled(!angleSnappingEnabled);
256
+ else
257
+ setAngleSnappingEnabled(val);
258
+ setSelectedElement(null);
259
+ };
260
+ return {
261
+ canvasRef: canvasRef,
262
+ selectedElement: selectedElement === null
263
+ ? selectedElement
264
+ : __assign(__assign({}, selectedElement), { path: [
265
+ props.attributes[selectedElement.path[0]],
266
+ selectedElement.path[1],
267
+ ] }),
268
+ mode: {
269
+ value: modeValue,
270
+ options: [types_1.IModes.DRAW, types_1.IModes.SELECT].map(function (el) { return ({
271
+ value: el,
272
+ label: el,
273
+ selected: modeValue === el,
274
+ handleSelect: function () { return handleSetMode(el); },
275
+ }); }),
276
+ handleChange: handleSetMode,
277
+ },
278
+ dimensions: {
279
+ enabled: showDimensions,
280
+ handleToggle: handleToggleDimensions,
281
+ },
282
+ angleSnapping: {
283
+ enabled: angleSnappingEnabled,
284
+ handleToggle: handleToggleAngleSnapping,
285
+ },
286
+ reset: handleReset,
287
+ deleteElement: handleDeleteElement,
288
+ walls: prepWallAttributeForOutput(attributesState === null || attributesState === void 0 ? void 0 : attributesState[props.attributes[types_1.IElements.WALL]]),
289
+ windows: props.attributes[types_1.IElements.WINDOW]
290
+ ? prepFeatureAttributeForOutput(types_1.IElements.WINDOW, attributesState === null || attributesState === void 0 ? void 0 : attributesState[props.attributes[types_1.IElements.WINDOW]])
291
+ : undefined,
292
+ doors: props.attributes[types_1.IElements.DOOR]
293
+ ? prepFeatureAttributeForOutput(types_1.IElements.DOOR, attributesState === null || attributesState === void 0 ? void 0 : attributesState[props.attributes[types_1.IElements.DOOR]])
294
+ : undefined,
295
+ openings: props.attributes[types_1.IElements.OPENING]
296
+ ? prepFeatureAttributeForOutput(types_1.IElements.OPENING, attributesState === null || attributesState === void 0 ? void 0 : attributesState[props.attributes[types_1.IElements.OPENING]])
297
+ : undefined,
298
+ };
299
+ };
300
+ useRoomBuilder.themes = themes_1.IThemes;
301
+ useRoomBuilder.units = types_1.IUnits;
302
+ useRoomBuilder.modes = types_1.IModes;
303
+ exports.default = useRoomBuilder;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.errorMessages = void 0;
4
- var constants_1 = require("../constants");
4
+ var constants_1 = require("./constants");
5
5
  exports.errorMessages = {
6
6
  addWallCollidingWithWall: function () { return 'Wall cannot collide with another wall.'; },
7
7
  addWallCollidingWithFeature: function (feature) {
@@ -1,11 +1,12 @@
1
+ import type { IRoomBuilderStyles } from './types';
1
2
  export declare enum IThemes {
2
3
  DEFAULT = "default",
3
4
  BLUEPRINT = "blueprint",
4
5
  LIGHT = "light"
5
6
  }
6
7
  declare const _default: {
7
- default: import("../types").ISpacesStyles;
8
- blueprint: import("../types").ISpacesStyles;
9
- light: import("../types").ISpacesStyles;
8
+ default: IRoomBuilderStyles;
9
+ blueprint: IRoomBuilderStyles;
10
+ light: IRoomBuilderStyles;
10
11
  };
11
12
  export default _default;
@@ -0,0 +1,273 @@
1
+ "use strict";
2
+ var _a;
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.IThemes = void 0;
5
+ var IThemes;
6
+ (function (IThemes) {
7
+ IThemes["DEFAULT"] = "default";
8
+ IThemes["BLUEPRINT"] = "blueprint";
9
+ IThemes["LIGHT"] = "light";
10
+ })(IThemes || (exports.IThemes = IThemes = {}));
11
+ var HIGHLIGHT_COLOR = '#36738E';
12
+ var ACTIVE_COLOR = 'green';
13
+ var ERROR_COLOR = 'red';
14
+ var DEFAULT_WALL_THICKNESS = 18;
15
+ var DEFAULT_VERTEX_RADIUS = (DEFAULT_WALL_THICKNESS - 6) / 2;
16
+ var DEFAULT_FEATURE_THICKNESS = DEFAULT_WALL_THICKNESS + 6;
17
+ var defaultTheme = {
18
+ grid: {
19
+ gridStepGap: 12,
20
+ lineThickness: 1,
21
+ secondaryLineThickness: 2,
22
+ lineColor: '#ddd',
23
+ backgroundColor: '#fff',
24
+ secondaryLineIncrement: 4,
25
+ },
26
+ floor: {
27
+ color: '#eee',
28
+ textColor: '#666',
29
+ },
30
+ dimensions: {
31
+ padding: DEFAULT_WALL_THICKNESS / 2 + 12,
32
+ lineThickness: 1,
33
+ lineColor: '#444',
34
+ fontSize: 14,
35
+ font: 'Helvetica',
36
+ textColor: '#444',
37
+ textBackgroundColor: 'white',
38
+ },
39
+ wall: {
40
+ fill: '#d9d9d9',
41
+ stroke: '#d9d9d9',
42
+ strokeWidth: 0,
43
+ thickness: DEFAULT_WALL_THICKNESS,
44
+ highlight: {
45
+ fill: HIGHLIGHT_COLOR,
46
+ stroke: HIGHLIGHT_COLOR,
47
+ },
48
+ active: {
49
+ fill: ACTIVE_COLOR,
50
+ stroke: ACTIVE_COLOR,
51
+ },
52
+ error: {
53
+ fill: ERROR_COLOR,
54
+ stroke: ERROR_COLOR,
55
+ },
56
+ },
57
+ vertex: {
58
+ innerFill: '#36738E',
59
+ outerFill: 'white',
60
+ stroke: '#36738E',
61
+ strokeWidth: 2,
62
+ outerRadius: DEFAULT_VERTEX_RADIUS,
63
+ innerRadius: DEFAULT_VERTEX_RADIUS / 2,
64
+ highlight: {
65
+ innerFill: HIGHLIGHT_COLOR,
66
+ outerFill: HIGHLIGHT_COLOR,
67
+ stroke: HIGHLIGHT_COLOR,
68
+ },
69
+ active: {
70
+ innerFill: ACTIVE_COLOR,
71
+ outerFill: ACTIVE_COLOR,
72
+ stroke: ACTIVE_COLOR,
73
+ },
74
+ error: {
75
+ innerFill: ERROR_COLOR,
76
+ outerFill: ERROR_COLOR,
77
+ stroke: ERROR_COLOR,
78
+ },
79
+ },
80
+ feature: {
81
+ fill: '#888',
82
+ stroke: '#888',
83
+ strokeWidth: 0,
84
+ thickness: DEFAULT_FEATURE_THICKNESS,
85
+ highlight: {
86
+ fill: HIGHLIGHT_COLOR,
87
+ stroke: HIGHLIGHT_COLOR,
88
+ },
89
+ active: {
90
+ fill: ACTIVE_COLOR,
91
+ stroke: ACTIVE_COLOR,
92
+ },
93
+ error: {
94
+ fill: ERROR_COLOR,
95
+ stroke: ERROR_COLOR,
96
+ },
97
+ },
98
+ };
99
+ var BLUEPRINT_WALL_THICKNESS = 22;
100
+ var BLUEPRINT_VERTEX_RADIUS = (BLUEPRINT_WALL_THICKNESS - 8) / 2;
101
+ var BLUEPRINT_FEATURE_THICKNESS = BLUEPRINT_WALL_THICKNESS + 6;
102
+ var blueprint = {
103
+ grid: {
104
+ gridStepGap: 20,
105
+ lineThickness: 1,
106
+ secondaryLineThickness: 2,
107
+ lineColor: '#fff',
108
+ backgroundColor: '#37588B',
109
+ secondaryLineIncrement: 3,
110
+ },
111
+ floor: {
112
+ color: '#eee',
113
+ textColor: '#666',
114
+ },
115
+ dimensions: {
116
+ padding: DEFAULT_WALL_THICKNESS / 2 + 12,
117
+ lineThickness: 1,
118
+ lineColor: '#fff',
119
+ fontSize: 14,
120
+ font: 'Helvetica',
121
+ textColor: '#444',
122
+ textBackgroundColor: '#fff',
123
+ },
124
+ wall: {
125
+ fill: '#848484',
126
+ stroke: '#fff',
127
+ strokeWidth: 1,
128
+ thickness: BLUEPRINT_WALL_THICKNESS,
129
+ highlight: {
130
+ fill: HIGHLIGHT_COLOR,
131
+ stroke: HIGHLIGHT_COLOR,
132
+ },
133
+ active: {
134
+ fill: ACTIVE_COLOR,
135
+ stroke: ACTIVE_COLOR,
136
+ },
137
+ error: {
138
+ fill: ERROR_COLOR,
139
+ stroke: ERROR_COLOR,
140
+ },
141
+ },
142
+ vertex: {
143
+ innerFill: '#fff',
144
+ outerFill: '#fff',
145
+ stroke: '#36738E',
146
+ strokeWidth: 0,
147
+ outerRadius: BLUEPRINT_VERTEX_RADIUS,
148
+ innerRadius: BLUEPRINT_VERTEX_RADIUS / 2,
149
+ highlight: {
150
+ innerFill: HIGHLIGHT_COLOR,
151
+ outerFill: HIGHLIGHT_COLOR,
152
+ stroke: HIGHLIGHT_COLOR,
153
+ },
154
+ active: {
155
+ innerFill: ACTIVE_COLOR,
156
+ outerFill: ACTIVE_COLOR,
157
+ stroke: ACTIVE_COLOR,
158
+ },
159
+ error: {
160
+ innerFill: ERROR_COLOR,
161
+ outerFill: ERROR_COLOR,
162
+ stroke: ERROR_COLOR,
163
+ },
164
+ },
165
+ feature: {
166
+ fill: '#888',
167
+ stroke: '#888',
168
+ strokeWidth: 0,
169
+ thickness: BLUEPRINT_FEATURE_THICKNESS,
170
+ highlight: {
171
+ fill: HIGHLIGHT_COLOR,
172
+ stroke: HIGHLIGHT_COLOR,
173
+ },
174
+ active: {
175
+ fill: ACTIVE_COLOR,
176
+ stroke: ACTIVE_COLOR,
177
+ },
178
+ error: {
179
+ fill: ERROR_COLOR,
180
+ stroke: ERROR_COLOR,
181
+ },
182
+ },
183
+ };
184
+ var LIGHT_WALL_THICKNESS = 8;
185
+ var LIGHT_VERTEX_RADIUS = (LIGHT_WALL_THICKNESS + 8) / 2;
186
+ var LIGHT_FEATURE_THICKNESS = LIGHT_WALL_THICKNESS + 4;
187
+ var light = {
188
+ grid: {
189
+ gridStepGap: 15,
190
+ lineThickness: 1,
191
+ secondaryLineThickness: 2,
192
+ lineColor: '#ddd',
193
+ backgroundColor: '#fff',
194
+ secondaryLineIncrement: undefined,
195
+ },
196
+ floor: {
197
+ color: '#eee',
198
+ textColor: '#666',
199
+ },
200
+ dimensions: {
201
+ padding: DEFAULT_WALL_THICKNESS / 2 + 12,
202
+ lineThickness: 1,
203
+ lineColor: '#444',
204
+ fontSize: 14,
205
+ font: 'Helvetica',
206
+ textColor: '#444',
207
+ textBackgroundColor: '#fff',
208
+ },
209
+ wall: {
210
+ fill: '#000',
211
+ stroke: '#000',
212
+ strokeWidth: 0,
213
+ thickness: LIGHT_WALL_THICKNESS,
214
+ highlight: {
215
+ fill: HIGHLIGHT_COLOR,
216
+ stroke: HIGHLIGHT_COLOR,
217
+ },
218
+ active: {
219
+ fill: ACTIVE_COLOR,
220
+ stroke: ACTIVE_COLOR,
221
+ },
222
+ error: {
223
+ fill: ERROR_COLOR,
224
+ stroke: ERROR_COLOR,
225
+ },
226
+ },
227
+ vertex: {
228
+ innerFill: '#aaa',
229
+ outerFill: '#fff',
230
+ stroke: '#000',
231
+ strokeWidth: 1,
232
+ outerRadius: LIGHT_VERTEX_RADIUS,
233
+ innerRadius: (LIGHT_VERTEX_RADIUS / 5) * 3,
234
+ highlight: {
235
+ innerFill: HIGHLIGHT_COLOR,
236
+ outerFill: '#fff',
237
+ stroke: '#000',
238
+ },
239
+ active: {
240
+ innerFill: ACTIVE_COLOR,
241
+ outerFill: '#fff',
242
+ stroke: '#000',
243
+ },
244
+ error: {
245
+ innerFill: ERROR_COLOR,
246
+ outerFill: ERROR_COLOR,
247
+ stroke: ERROR_COLOR,
248
+ },
249
+ },
250
+ feature: {
251
+ fill: '#888',
252
+ stroke: '#888',
253
+ strokeWidth: 0,
254
+ thickness: LIGHT_FEATURE_THICKNESS,
255
+ highlight: {
256
+ fill: HIGHLIGHT_COLOR,
257
+ stroke: HIGHLIGHT_COLOR,
258
+ },
259
+ active: {
260
+ fill: ACTIVE_COLOR,
261
+ stroke: ACTIVE_COLOR,
262
+ },
263
+ error: {
264
+ fill: ERROR_COLOR,
265
+ stroke: ERROR_COLOR,
266
+ },
267
+ },
268
+ };
269
+ exports.default = (_a = {},
270
+ _a[IThemes.DEFAULT] = defaultTheme,
271
+ _a[IThemes.BLUEPRINT] = blueprint,
272
+ _a[IThemes.LIGHT] = light,
273
+ _a);