@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.
- package/dist/Treble/Treble.d.ts +2 -2
- package/dist/Treble/Treble.js +6 -5
- package/dist/Treble/index.d.ts +1 -1
- package/dist/Treble/index.js +1 -1
- package/dist/Treble/{snapshot.d.ts → snapshots.d.ts} +1 -1
- package/dist/Treble/{snapshot.js → snapshots.js} +1 -1
- package/dist/Treble/wishlist.d.ts +1 -1
- package/dist/Treble/wishlist.js +1 -1
- package/dist/api/assets.d.ts +1 -0
- package/dist/api/{products.js → assets.js} +12 -33
- package/dist/api/catalog.js +1 -1
- package/dist/api/configurations.d.ts +1 -0
- package/dist/api/configurations.js +10 -3
- package/dist/api/datatables.js +1 -1
- package/dist/api/index.d.ts +2 -2
- package/dist/api/index.js +2 -2
- 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 +6 -3
- package/dist/components/ThreekitProvider/index.js +27 -2
- 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 +3 -3
- package/dist/hooks/useConfigurationLoader/index.js +1 -1
- package/dist/hooks/useConfigurator/index.d.ts +3 -3
- package/dist/hooks/useConfigurator/index.js +3 -5
- package/dist/hooks/useDevTools/index.d.ts +1 -1
- package/dist/hooks/useNestedConfigurator/index.d.ts +2 -2
- package/dist/hooks/useNestedConfigurator/index.js +5 -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/useRoomBuilder/RoomBuilderState.d.ts +95 -0
- package/dist/hooks/useRoomBuilder/RoomBuilderState.js +1237 -0
- package/dist/hooks/useRoomBuilder/constants.d.ts +41 -0
- package/dist/hooks/useRoomBuilder/constants.js +48 -0
- package/dist/hooks/useRoomBuilder/dataHandlers.d.ts +18 -0
- package/dist/hooks/useRoomBuilder/dataHandlers.js +187 -0
- package/dist/hooks/useRoomBuilder/draw.d.ts +55 -0
- package/dist/hooks/useRoomBuilder/draw.js +573 -0
- package/dist/hooks/useRoomBuilder/findLoops.d.ts +5 -0
- package/dist/hooks/{useSpaces/geometry → useRoomBuilder}/findLoops.js +13 -31
- package/dist/hooks/useRoomBuilder/geometry.d.ts +33 -0
- package/dist/hooks/useRoomBuilder/geometry.js +325 -0
- package/dist/hooks/useRoomBuilder/index.d.ts +40 -0
- package/dist/hooks/useRoomBuilder/index.js +303 -0
- package/dist/hooks/{useSpaces/validators → useRoomBuilder}/messaging.js +1 -1
- package/dist/hooks/{useSpaces/themes/index.d.ts → useRoomBuilder/themes.d.ts} +4 -3
- package/dist/hooks/useRoomBuilder/themes.js +273 -0
- package/dist/hooks/useRoomBuilder/types.d.ts +238 -0
- package/dist/hooks/useRoomBuilder/types.js +36 -0
- package/dist/hooks/useRoomBuilder/validators.d.ts +36 -0
- package/dist/hooks/useRoomBuilder/validators.js +362 -0
- package/dist/hooks/useShare/index.d.ts +1 -1
- package/dist/hooks/useShare/index.js +4 -2
- package/dist/hooks/useSingleAnimation/index.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 +2 -0
- package/dist/http/assets.js +16 -0
- package/dist/http/index.d.ts +2 -2
- package/dist/http/index.js +2 -2
- package/dist/http/orders.d.ts +1 -1
- package/dist/icons/Draw.js +3 -3
- package/dist/icons/Spinner.d.ts +2 -2
- package/dist/icons/Window.js +4 -4
- package/dist/icons/index.js +0 -28
- package/dist/icons/types.d.ts +1 -1
- package/dist/index.d.ts +2 -17
- package/dist/index.js +5 -35
- package/dist/store/attributes.d.ts +4 -5
- package/dist/store/attributes.js +2 -4
- package/dist/store/index.d.ts +6 -13
- package/dist/store/index.js +1 -3
- 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 +8 -5
- package/dist/store/translations.d.ts +10 -8
- package/dist/store/translations.js +39 -19
- package/dist/store/treble.d.ts +2 -2
- package/dist/store/treble.js +22 -15
- package/dist/store/wishlist.d.ts +2 -2
- package/dist/store/wishlist.js +1 -1
- package/dist/types.d.ts +19 -20
- package/dist/types.js +9 -9
- package/dist/utils.d.ts +2 -6
- package/dist/utils.js +5 -12
- package/package.json +1 -2
- package/dist/api/products.d.ts +0 -4
- package/dist/hooks/useSpaces/SpacesLayout.d.ts +0 -11
- package/dist/hooks/useSpaces/SpacesLayout.js +0 -74
- package/dist/hooks/useSpaces/SpacesState.d.ts +0 -177
- package/dist/hooks/useSpaces/SpacesState.js +0 -1814
- package/dist/hooks/useSpaces/constants.d.ts +0 -79
- package/dist/hooks/useSpaces/constants.js +0 -130
- package/dist/hooks/useSpaces/dataHandlers.d.ts +0 -38
- package/dist/hooks/useSpaces/dataHandlers.js +0 -407
- package/dist/hooks/useSpaces/draw/clearCanvas.d.ts +0 -2
- package/dist/hooks/useSpaces/draw/clearCanvas.js +0 -9
- package/dist/hooks/useSpaces/draw/drawBackground.d.ts +0 -2
- package/dist/hooks/useSpaces/draw/drawBackground.js +0 -12
- package/dist/hooks/useSpaces/draw/drawDimensions.d.ts +0 -3
- package/dist/hooks/useSpaces/draw/drawDimensions.js +0 -53
- package/dist/hooks/useSpaces/draw/drawDoors.d.ts +0 -9
- package/dist/hooks/useSpaces/draw/drawDoors.js +0 -99
- package/dist/hooks/useSpaces/draw/drawFloor.d.ts +0 -3
- package/dist/hooks/useSpaces/draw/drawFloor.js +0 -36
- package/dist/hooks/useSpaces/draw/drawGrid.d.ts +0 -3
- package/dist/hooks/useSpaces/draw/drawGrid.js +0 -36
- package/dist/hooks/useSpaces/draw/drawGuides.d.ts +0 -3
- package/dist/hooks/useSpaces/draw/drawGuides.js +0 -23
- package/dist/hooks/useSpaces/draw/drawOpenings.d.ts +0 -9
- package/dist/hooks/useSpaces/draw/drawOpenings.js +0 -72
- package/dist/hooks/useSpaces/draw/drawVertices.d.ts +0 -8
- package/dist/hooks/useSpaces/draw/drawVertices.js +0 -61
- package/dist/hooks/useSpaces/draw/drawWalls.d.ts +0 -11
- package/dist/hooks/useSpaces/draw/drawWalls.js +0 -90
- package/dist/hooks/useSpaces/draw/drawWindows.d.ts +0 -9
- package/dist/hooks/useSpaces/draw/drawWindows.js +0 -82
- package/dist/hooks/useSpaces/draw/index.d.ts +0 -11
- package/dist/hooks/useSpaces/draw/index.js +0 -129
- package/dist/hooks/useSpaces/geometry/addThicknessToLine.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/addThicknessToLine.js +0 -13
- package/dist/hooks/useSpaces/geometry/areLinesEqual.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/areLinesEqual.js +0 -17
- package/dist/hooks/useSpaces/geometry/arePointsEqual.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/arePointsEqual.js +0 -8
- package/dist/hooks/useSpaces/geometry/arePointsWithinProximity.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/arePointsWithinProximity.js +0 -11
- package/dist/hooks/useSpaces/geometry/closestPointOnLine.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/closestPointOnLine.js +0 -13
- package/dist/hooks/useSpaces/geometry/doLinesOverlap.d.ts +0 -2
- package/dist/hooks/useSpaces/geometry/doLinesOverlap.js +0 -16
- package/dist/hooks/useSpaces/geometry/euclideanMod.d.ts +0 -2
- package/dist/hooks/useSpaces/geometry/euclideanMod.js +0 -6
- package/dist/hooks/useSpaces/geometry/findLoops.d.ts +0 -6
- package/dist/hooks/useSpaces/geometry/getAllLineIntersections.d.ts +0 -6
- package/dist/hooks/useSpaces/geometry/getAllLineIntersections.js +0 -23
- package/dist/hooks/useSpaces/geometry/getAngleOfLineSegment.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/getAngleOfLineSegment.js +0 -7
- package/dist/hooks/useSpaces/geometry/getClosestPointOnLineSegment.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/getClosestPointOnLineSegment.js +0 -17
- package/dist/hooks/useSpaces/geometry/getDistanceToLine.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/getDistanceToLine.js +0 -10
- package/dist/hooks/useSpaces/geometry/getLengthOfLineSegment.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/getLengthOfLineSegment.js +0 -7
- package/dist/hooks/useSpaces/geometry/getLineAtOffsetOnLineSegment.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/getLineAtOffsetOnLineSegment.js +0 -17
- package/dist/hooks/useSpaces/geometry/getLineOtherPoint.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/getLineOtherPoint.js +0 -11
- package/dist/hooks/useSpaces/geometry/getLineSegmentsIntersection.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/getLineSegmentsIntersection.js +0 -43
- package/dist/hooks/useSpaces/geometry/getMidpointOfLineSegment.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/getMidpointOfLineSegment.js +0 -9
- package/dist/hooks/useSpaces/geometry/getParallelLineSegmentAtDistance.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/getParallelLineSegmentAtDistance.js +0 -20
- package/dist/hooks/useSpaces/geometry/getPointAtOffsetOnLineSegment.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/getPointAtOffsetOnLineSegment.js +0 -11
- package/dist/hooks/useSpaces/geometry/getPolygonArea.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/getPolygonArea.js +0 -15
- package/dist/hooks/useSpaces/geometry/getQuadrilateralArea.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/getQuadrilateralArea.js +0 -16
- package/dist/hooks/useSpaces/geometry/getTangetIntersectionAndOffset.d.ts +0 -6
- package/dist/hooks/useSpaces/geometry/getTangetIntersectionAndOffset.js +0 -17
- package/dist/hooks/useSpaces/geometry/getTriangleArea.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/getTriangleArea.js +0 -9
- package/dist/hooks/useSpaces/geometry/getUnitVectorOfLineSegment.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/getUnitVectorOfLineSegment.js +0 -12
- package/dist/hooks/useSpaces/geometry/index.d.ts +0 -30
- package/dist/hooks/useSpaces/geometry/index.js +0 -64
- package/dist/hooks/useSpaces/geometry/isPointInPolygon.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/isPointInPolygon.js +0 -21
- package/dist/hooks/useSpaces/geometry/isPointInQuadrilateral.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/isPointInQuadrilateral.js +0 -25
- package/dist/hooks/useSpaces/geometry/orderCoordinatesOnLineSegment.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/orderCoordinatesOnLineSegment.js +0 -11
- package/dist/hooks/useSpaces/geometry/splitLineAtOffset.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/splitLineAtOffset.js +0 -12
- package/dist/hooks/useSpaces/geometry/splitLineAtPoint.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/splitLineAtPoint.js +0 -9
- package/dist/hooks/useSpaces/geometry/splitLineAtPoints.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/splitLineAtPoints.js +0 -28
- package/dist/hooks/useSpaces/index.d.ts +0 -95
- package/dist/hooks/useSpaces/index.js +0 -557
- package/dist/hooks/useSpaces/themes/blueprint.d.ts +0 -3
- package/dist/hooks/useSpaces/themes/blueprint.js +0 -96
- package/dist/hooks/useSpaces/themes/default.d.ts +0 -3
- package/dist/hooks/useSpaces/themes/default.js +0 -96
- package/dist/hooks/useSpaces/themes/index.js +0 -21
- package/dist/hooks/useSpaces/themes/light.d.ts +0 -3
- package/dist/hooks/useSpaces/themes/light.js +0 -96
- package/dist/hooks/useSpaces/types.d.ts +0 -378
- package/dist/hooks/useSpaces/types.js +0 -54
- package/dist/hooks/useSpaces/validators/areWallsDuplicated.d.ts +0 -3
- package/dist/hooks/useSpaces/validators/areWallsDuplicated.js +0 -61
- package/dist/hooks/useSpaces/validators/areWallsIntersecting.d.ts +0 -3
- package/dist/hooks/useSpaces/validators/areWallsIntersecting.js +0 -42
- package/dist/hooks/useSpaces/validators/areWallsOrphaningFeatures.d.ts +0 -3
- package/dist/hooks/useSpaces/validators/areWallsOrphaningFeatures.js +0 -52
- package/dist/hooks/useSpaces/validators/areWallsTooShort.d.ts +0 -3
- package/dist/hooks/useSpaces/validators/areWallsTooShort.js +0 -37
- package/dist/hooks/useSpaces/validators/index.d.ts +0 -15
- package/dist/hooks/useSpaces/validators/index.js +0 -40
- package/dist/hooks/useSpaces/validators/isFeatureCollidingWithExistingFeature.d.ts +0 -3
- package/dist/hooks/useSpaces/validators/isFeatureCollidingWithExistingFeature.js +0 -31
- package/dist/hooks/useSpaces/validators/isFeatureOutsideWallBounds.d.ts +0 -3
- package/dist/hooks/useSpaces/validators/isFeatureOutsideWallBounds.js +0 -19
- package/dist/hooks/useSpaces/validators/isLineTooShort.d.ts +0 -3
- package/dist/hooks/useSpaces/validators/isLineTooShort.js +0 -26
- package/dist/hooks/useSpaces/validators/isVertexLandingOnFeature.d.ts +0 -4
- package/dist/hooks/useSpaces/validators/isVertexLandingOnFeature.js +0 -19
- package/dist/hooks/useSpaces/validators/isWallEndingOnFeature.d.ts +0 -3
- package/dist/hooks/useSpaces/validators/isWallEndingOnFeature.js +0 -19
- package/dist/hooks/useSpaces/validators/isWallIntersectingFeature.d.ts +0 -3
- package/dist/hooks/useSpaces/validators/isWallIntersectingFeature.js +0 -41
- package/dist/hooks/useSpaces/validators/isWallOverlappingExisitingWalls.d.ts +0 -3
- package/dist/hooks/useSpaces/validators/isWallOverlappingExisitingWalls.js +0 -54
- package/dist/hooks/useSpaces/validators/isWallTooShort.d.ts +0 -3
- package/dist/hooks/useSpaces/validators/isWallTooShort.js +0 -10
- package/dist/http/products.d.ts +0 -1
- package/dist/http/products.js +0 -12
- package/dist/icons/AngleSnapping.d.ts +0 -3
- package/dist/icons/AngleSnapping.js +0 -28
- package/dist/icons/Boundary.d.ts +0 -3
- package/dist/icons/Boundary.js +0 -21
- package/dist/icons/Center.d.ts +0 -3
- package/dist/icons/Center.js +0 -24
- package/dist/icons/GridSnapping.d.ts +0 -3
- package/dist/icons/GridSnapping.js +0 -28
- package/dist/icons/LayoutAlt.d.ts +0 -3
- package/dist/icons/LayoutAlt.js +0 -21
- package/dist/icons/Magnet.d.ts +0 -3
- package/dist/icons/Magnet.js +0 -27
- package/dist/icons/Player3D.d.ts +0 -3
- package/dist/icons/Player3D.js +0 -21
- package/dist/icons/RulerBlank.d.ts +0 -3
- package/dist/icons/RulerBlank.js +0 -25
- package/dist/icons/RulerDetailed.d.ts +0 -3
- package/dist/icons/RulerDetailed.js +0 -27
- package/dist/icons/Save.d.ts +0 -3
- package/dist/icons/Save.js +0 -21
- package/dist/icons/UnitCm.d.ts +0 -3
- package/dist/icons/UnitCm.js +0 -22
- package/dist/icons/UnitFeet.d.ts +0 -3
- package/dist/icons/UnitFeet.js +0 -22
- package/dist/icons/UnitInch.d.ts +0 -3
- package/dist/icons/UnitInch.js +0 -22
- package/dist/icons/UnitMeter.d.ts +0 -3
- package/dist/icons/UnitMeter.js +0 -21
- package/dist/store/spaces.d.ts +0 -74
- package/dist/store/spaces.js +0 -354
- /package/dist/hooks/{useSpaces/validators → useRoomBuilder}/messaging.d.ts +0 -0
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var HIGHLIGHT_COLOR = '#36738E';
|
|
4
|
-
var ACTIVE_COLOR = 'green';
|
|
5
|
-
var ERROR_COLOR = 'red';
|
|
6
|
-
var WALL_THICKNESS = 18;
|
|
7
|
-
var VERTEX_RADIUS = (WALL_THICKNESS - 6) / 2;
|
|
8
|
-
var FEATURE_THICKNESS = WALL_THICKNESS + 6;
|
|
9
|
-
var theme = {
|
|
10
|
-
grid: {
|
|
11
|
-
lineThickness: 2,
|
|
12
|
-
lineColor: '#ddd',
|
|
13
|
-
showSubdivisions: true,
|
|
14
|
-
subdivisionLineThickness: 1,
|
|
15
|
-
subdivisionLineColor: '#ddd',
|
|
16
|
-
subdivisionThreshold: 20,
|
|
17
|
-
backgroundColor: '#fff',
|
|
18
|
-
},
|
|
19
|
-
guides: {
|
|
20
|
-
color: '#00F8FB',
|
|
21
|
-
thickness: 1,
|
|
22
|
-
},
|
|
23
|
-
floor: {
|
|
24
|
-
color: '#eee',
|
|
25
|
-
textColor: '#666',
|
|
26
|
-
},
|
|
27
|
-
dimensions: {
|
|
28
|
-
padding: WALL_THICKNESS / 2 + 12,
|
|
29
|
-
lineThickness: 1,
|
|
30
|
-
lineColor: '#444',
|
|
31
|
-
fontSize: 14,
|
|
32
|
-
font: 'Helvetica',
|
|
33
|
-
textColor: '#444',
|
|
34
|
-
textBackgroundColor: 'white',
|
|
35
|
-
},
|
|
36
|
-
wall: {
|
|
37
|
-
fill: '#d9d9d9',
|
|
38
|
-
stroke: '#d9d9d9',
|
|
39
|
-
strokeWidth: 0,
|
|
40
|
-
thickness: WALL_THICKNESS,
|
|
41
|
-
highlight: {
|
|
42
|
-
fill: HIGHLIGHT_COLOR,
|
|
43
|
-
stroke: HIGHLIGHT_COLOR,
|
|
44
|
-
},
|
|
45
|
-
active: {
|
|
46
|
-
fill: ACTIVE_COLOR,
|
|
47
|
-
stroke: ACTIVE_COLOR,
|
|
48
|
-
},
|
|
49
|
-
error: {
|
|
50
|
-
fill: ERROR_COLOR,
|
|
51
|
-
stroke: ERROR_COLOR,
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
vertex: {
|
|
55
|
-
innerFill: '#36738E',
|
|
56
|
-
outerFill: 'white',
|
|
57
|
-
stroke: '#36738E',
|
|
58
|
-
strokeWidth: 2,
|
|
59
|
-
outerRadius: VERTEX_RADIUS,
|
|
60
|
-
innerRadius: VERTEX_RADIUS / 2,
|
|
61
|
-
highlight: {
|
|
62
|
-
innerFill: HIGHLIGHT_COLOR,
|
|
63
|
-
outerFill: HIGHLIGHT_COLOR,
|
|
64
|
-
stroke: HIGHLIGHT_COLOR,
|
|
65
|
-
},
|
|
66
|
-
active: {
|
|
67
|
-
innerFill: ACTIVE_COLOR,
|
|
68
|
-
outerFill: ACTIVE_COLOR,
|
|
69
|
-
stroke: ACTIVE_COLOR,
|
|
70
|
-
},
|
|
71
|
-
error: {
|
|
72
|
-
innerFill: ERROR_COLOR,
|
|
73
|
-
outerFill: ERROR_COLOR,
|
|
74
|
-
stroke: ERROR_COLOR,
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
feature: {
|
|
78
|
-
fill: '#888',
|
|
79
|
-
stroke: '#888',
|
|
80
|
-
strokeWidth: 0,
|
|
81
|
-
thickness: FEATURE_THICKNESS,
|
|
82
|
-
highlight: {
|
|
83
|
-
fill: HIGHLIGHT_COLOR,
|
|
84
|
-
stroke: HIGHLIGHT_COLOR,
|
|
85
|
-
},
|
|
86
|
-
active: {
|
|
87
|
-
fill: ACTIVE_COLOR,
|
|
88
|
-
stroke: ACTIVE_COLOR,
|
|
89
|
-
},
|
|
90
|
-
error: {
|
|
91
|
-
fill: ERROR_COLOR,
|
|
92
|
-
stroke: ERROR_COLOR,
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
};
|
|
96
|
-
exports.default = theme;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
var _a;
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.IThemes = void 0;
|
|
8
|
-
var default_1 = __importDefault(require("./default"));
|
|
9
|
-
var blueprint_1 = __importDefault(require("./blueprint"));
|
|
10
|
-
var light_1 = __importDefault(require("./light"));
|
|
11
|
-
var IThemes;
|
|
12
|
-
(function (IThemes) {
|
|
13
|
-
IThemes["DEFAULT"] = "default";
|
|
14
|
-
IThemes["BLUEPRINT"] = "blueprint";
|
|
15
|
-
IThemes["LIGHT"] = "light";
|
|
16
|
-
})(IThemes = exports.IThemes || (exports.IThemes = {}));
|
|
17
|
-
exports.default = (_a = {},
|
|
18
|
-
_a[IThemes.DEFAULT] = default_1.default,
|
|
19
|
-
_a[IThemes.BLUEPRINT] = blueprint_1.default,
|
|
20
|
-
_a[IThemes.LIGHT] = light_1.default,
|
|
21
|
-
_a);
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var HIGHCOLOR = '#36738E';
|
|
4
|
-
var ACTIVE_COLOR = 'green';
|
|
5
|
-
var ERROR_COLOR = 'red';
|
|
6
|
-
var WALL_THICKNESS = 8;
|
|
7
|
-
var VERTEX_RADIUS = (WALL_THICKNESS + 8) / 2;
|
|
8
|
-
var FEATURE_THICKNESS = WALL_THICKNESS + 4;
|
|
9
|
-
var theme = {
|
|
10
|
-
grid: {
|
|
11
|
-
lineThickness: 2,
|
|
12
|
-
lineColor: '#ddd',
|
|
13
|
-
showSubdivisions: true,
|
|
14
|
-
subdivisionLineThickness: 1,
|
|
15
|
-
subdivisionLineColor: '#ddd',
|
|
16
|
-
subdivisionThreshold: 20,
|
|
17
|
-
backgroundColor: '#fff',
|
|
18
|
-
},
|
|
19
|
-
guides: {
|
|
20
|
-
color: '#00F8FB',
|
|
21
|
-
thickness: 1,
|
|
22
|
-
},
|
|
23
|
-
floor: {
|
|
24
|
-
color: '#eee',
|
|
25
|
-
textColor: '#666',
|
|
26
|
-
},
|
|
27
|
-
dimensions: {
|
|
28
|
-
padding: WALL_THICKNESS / 2 + 12,
|
|
29
|
-
lineThickness: 1,
|
|
30
|
-
lineColor: '#444',
|
|
31
|
-
fontSize: 14,
|
|
32
|
-
font: 'Helvetica',
|
|
33
|
-
textColor: '#444',
|
|
34
|
-
textBackgroundColor: '#fff',
|
|
35
|
-
},
|
|
36
|
-
wall: {
|
|
37
|
-
fill: '#000',
|
|
38
|
-
stroke: '#000',
|
|
39
|
-
strokeWidth: 0,
|
|
40
|
-
thickness: WALL_THICKNESS,
|
|
41
|
-
highlight: {
|
|
42
|
-
fill: HIGHCOLOR,
|
|
43
|
-
stroke: HIGHCOLOR,
|
|
44
|
-
},
|
|
45
|
-
active: {
|
|
46
|
-
fill: ACTIVE_COLOR,
|
|
47
|
-
stroke: ACTIVE_COLOR,
|
|
48
|
-
},
|
|
49
|
-
error: {
|
|
50
|
-
fill: ERROR_COLOR,
|
|
51
|
-
stroke: ERROR_COLOR,
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
vertex: {
|
|
55
|
-
innerFill: '#aaa',
|
|
56
|
-
outerFill: '#fff',
|
|
57
|
-
stroke: '#000',
|
|
58
|
-
strokeWidth: 1,
|
|
59
|
-
outerRadius: VERTEX_RADIUS,
|
|
60
|
-
innerRadius: (VERTEX_RADIUS / 5) * 3,
|
|
61
|
-
highlight: {
|
|
62
|
-
innerFill: HIGHCOLOR,
|
|
63
|
-
outerFill: '#fff',
|
|
64
|
-
stroke: '#000',
|
|
65
|
-
},
|
|
66
|
-
active: {
|
|
67
|
-
innerFill: ACTIVE_COLOR,
|
|
68
|
-
outerFill: '#fff',
|
|
69
|
-
stroke: '#000',
|
|
70
|
-
},
|
|
71
|
-
error: {
|
|
72
|
-
innerFill: ERROR_COLOR,
|
|
73
|
-
outerFill: ERROR_COLOR,
|
|
74
|
-
stroke: ERROR_COLOR,
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
feature: {
|
|
78
|
-
fill: '#888',
|
|
79
|
-
stroke: '#888',
|
|
80
|
-
strokeWidth: 0,
|
|
81
|
-
thickness: FEATURE_THICKNESS,
|
|
82
|
-
highlight: {
|
|
83
|
-
fill: HIGHCOLOR,
|
|
84
|
-
stroke: HIGHCOLOR,
|
|
85
|
-
},
|
|
86
|
-
active: {
|
|
87
|
-
fill: ACTIVE_COLOR,
|
|
88
|
-
stroke: ACTIVE_COLOR,
|
|
89
|
-
},
|
|
90
|
-
error: {
|
|
91
|
-
fill: ERROR_COLOR,
|
|
92
|
-
stroke: ERROR_COLOR,
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
};
|
|
96
|
-
exports.default = theme;
|
|
@@ -1,378 +0,0 @@
|
|
|
1
|
-
import { IHydratedAttribute } from '../../types';
|
|
2
|
-
import { DoorOpeningDirections, DoorOrientations, DoorShowSwing, WallModes } from './constants';
|
|
3
|
-
export declare type ICoordinate2D = [x: number, y: number];
|
|
4
|
-
export declare type ICoordinate3D = [x: number, y: number, z: number];
|
|
5
|
-
export declare type ICoordinatesLine = [
|
|
6
|
-
startPoint: ICoordinate2D,
|
|
7
|
-
endPoint: ICoordinate2D
|
|
8
|
-
];
|
|
9
|
-
export declare type ICoordinatesQuadrilateral = [
|
|
10
|
-
point1: ICoordinate2D,
|
|
11
|
-
point2: ICoordinate2D,
|
|
12
|
-
point3: ICoordinate2D,
|
|
13
|
-
point4: ICoordinate2D
|
|
14
|
-
];
|
|
15
|
-
export declare enum IElements {
|
|
16
|
-
WALL = "walls",
|
|
17
|
-
VERTEX = "vertex",
|
|
18
|
-
FEATURE = "features",
|
|
19
|
-
WINDOW = "windows",
|
|
20
|
-
DOOR = "doors",
|
|
21
|
-
OPENING = "openings"
|
|
22
|
-
}
|
|
23
|
-
export declare type IFeatureName = IElements.WINDOW | IElements.DOOR | IElements.OPENING;
|
|
24
|
-
export declare type IElementName = IElements.WALL | IElements.VERTEX | IFeatureName;
|
|
25
|
-
export interface IWall {
|
|
26
|
-
assetId: string;
|
|
27
|
-
line: ICoordinatesLine;
|
|
28
|
-
path?: ICoordinatesQuadrilateral;
|
|
29
|
-
connections: Array<[elementType: IFeatureName, index: number]>;
|
|
30
|
-
restConfiguration: string;
|
|
31
|
-
mode: WallModes;
|
|
32
|
-
}
|
|
33
|
-
export interface IWalls extends Array<IWall> {
|
|
34
|
-
}
|
|
35
|
-
export interface INewWall {
|
|
36
|
-
start: ISnapPoint;
|
|
37
|
-
end?: ISnapPoint;
|
|
38
|
-
}
|
|
39
|
-
export interface IVertexConnections extends Array<[wallIndex: number, anchorIndex: number]> {
|
|
40
|
-
}
|
|
41
|
-
export interface IVerticesState extends Record<string, IVertexConnections> {
|
|
42
|
-
}
|
|
43
|
-
export interface IVertex {
|
|
44
|
-
point: ICoordinate2D;
|
|
45
|
-
connections: IVertexConnections;
|
|
46
|
-
}
|
|
47
|
-
export interface ILineDimensions {
|
|
48
|
-
label: string;
|
|
49
|
-
line: ICoordinatesLine;
|
|
50
|
-
}
|
|
51
|
-
export interface IEnclosedSpace {
|
|
52
|
-
area: string;
|
|
53
|
-
center: ICoordinate2D;
|
|
54
|
-
loop: Array<ICoordinate2D>;
|
|
55
|
-
}
|
|
56
|
-
export interface IFeature {
|
|
57
|
-
assetId: string;
|
|
58
|
-
offset: number;
|
|
59
|
-
length: number;
|
|
60
|
-
height: number;
|
|
61
|
-
altitude: number;
|
|
62
|
-
path?: ICoordinatesQuadrilateral;
|
|
63
|
-
connectedTo: [elementType: IElements.WALL, index: number];
|
|
64
|
-
restConfiguration: string;
|
|
65
|
-
}
|
|
66
|
-
export interface IFeatureDoor extends IFeature {
|
|
67
|
-
orientation: DoorOrientations;
|
|
68
|
-
openingDirection: DoorOpeningDirections;
|
|
69
|
-
showSwing: DoorShowSwing;
|
|
70
|
-
}
|
|
71
|
-
interface IFeatureHydratedShared {
|
|
72
|
-
line: ICoordinatesLine;
|
|
73
|
-
}
|
|
74
|
-
export interface IFeatureHydrated extends IFeature, IFeatureHydratedShared {
|
|
75
|
-
}
|
|
76
|
-
export interface IFeatureDoorHydrated extends IFeatureDoor, IFeatureHydratedShared {
|
|
77
|
-
}
|
|
78
|
-
export interface IFeaturesShared<T, D> {
|
|
79
|
-
[IElements.WINDOW]?: Array<T>;
|
|
80
|
-
[IElements.DOOR]?: Array<D>;
|
|
81
|
-
[IElements.OPENING]?: Array<T>;
|
|
82
|
-
}
|
|
83
|
-
export interface IFeatures extends IFeaturesShared<IFeature, IFeatureDoor> {
|
|
84
|
-
}
|
|
85
|
-
export interface IFeaturesHydrated extends IFeaturesShared<IFeatureHydrated, IFeatureDoorHydrated> {
|
|
86
|
-
}
|
|
87
|
-
export declare enum IElementStyleModes {
|
|
88
|
-
HIGHLIGHT = "highlight",
|
|
89
|
-
ACTIVE = "active",
|
|
90
|
-
ERROR = "error"
|
|
91
|
-
}
|
|
92
|
-
export interface ISpacesStylesShared {
|
|
93
|
-
fill: string;
|
|
94
|
-
stroke?: string;
|
|
95
|
-
strokeWidth?: number;
|
|
96
|
-
[IElementStyleModes.HIGHLIGHT]: {
|
|
97
|
-
fill: string;
|
|
98
|
-
stroke: string;
|
|
99
|
-
};
|
|
100
|
-
[IElementStyleModes.ACTIVE]: {
|
|
101
|
-
fill: string;
|
|
102
|
-
stroke: string;
|
|
103
|
-
};
|
|
104
|
-
[IElementStyleModes.ERROR]: {
|
|
105
|
-
fill: string;
|
|
106
|
-
stroke: string;
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
export interface IStylesGrid {
|
|
110
|
-
lineThickness: number;
|
|
111
|
-
lineColor: string;
|
|
112
|
-
showSubdivisions: boolean;
|
|
113
|
-
subdivisionLineThickness: number;
|
|
114
|
-
subdivisionLineColor: string;
|
|
115
|
-
subdivisionThreshold: number;
|
|
116
|
-
backgroundColor?: string;
|
|
117
|
-
}
|
|
118
|
-
export interface IStylesGuides {
|
|
119
|
-
color: string;
|
|
120
|
-
thickness: number;
|
|
121
|
-
}
|
|
122
|
-
export interface IStylesFloor {
|
|
123
|
-
color: string;
|
|
124
|
-
textColor: string;
|
|
125
|
-
}
|
|
126
|
-
export interface IStylesDimension {
|
|
127
|
-
padding: number;
|
|
128
|
-
lineThickness: number;
|
|
129
|
-
lineColor: string;
|
|
130
|
-
fontSize: number;
|
|
131
|
-
font: string;
|
|
132
|
-
textColor: string;
|
|
133
|
-
textBackgroundColor: string;
|
|
134
|
-
}
|
|
135
|
-
export interface IStylesWall extends ISpacesStylesShared {
|
|
136
|
-
thickness: number;
|
|
137
|
-
}
|
|
138
|
-
export interface IStylesVertex extends Omit<ISpacesStylesShared, 'fill' | IElementStyleModes.HIGHLIGHT | IElementStyleModes.ACTIVE | IElementStyleModes.ERROR> {
|
|
139
|
-
innerFill: string;
|
|
140
|
-
outerFill: string;
|
|
141
|
-
innerRadius: number;
|
|
142
|
-
outerRadius?: number;
|
|
143
|
-
[IElementStyleModes.HIGHLIGHT]: {
|
|
144
|
-
innerFill: string;
|
|
145
|
-
outerFill: string;
|
|
146
|
-
stroke?: string;
|
|
147
|
-
};
|
|
148
|
-
[IElementStyleModes.ACTIVE]: {
|
|
149
|
-
innerFill: string;
|
|
150
|
-
outerFill: string;
|
|
151
|
-
stroke?: string;
|
|
152
|
-
};
|
|
153
|
-
[IElementStyleModes.ERROR]: {
|
|
154
|
-
innerFill: string;
|
|
155
|
-
outerFill: string;
|
|
156
|
-
stroke?: string;
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
export interface IStylesFeature extends IStylesWall {
|
|
160
|
-
}
|
|
161
|
-
export interface ISpacesStyles {
|
|
162
|
-
grid: IStylesGrid;
|
|
163
|
-
guides: IStylesGuides;
|
|
164
|
-
floor: IStylesFloor;
|
|
165
|
-
dimensions: IStylesDimension;
|
|
166
|
-
wall: IStylesWall;
|
|
167
|
-
vertex: IStylesVertex;
|
|
168
|
-
feature: IStylesFeature;
|
|
169
|
-
}
|
|
170
|
-
export interface ISpacesThemePartial {
|
|
171
|
-
grid: Partial<IStylesGrid>;
|
|
172
|
-
guides: Partial<IStylesGuides>;
|
|
173
|
-
floor: Partial<IStylesFloor>;
|
|
174
|
-
dimensions: Partial<IStylesDimension>;
|
|
175
|
-
wall: Partial<IStylesWall>;
|
|
176
|
-
vertex: Partial<IStylesVertex>;
|
|
177
|
-
feature: Partial<IStylesFeature>;
|
|
178
|
-
}
|
|
179
|
-
export interface IGridToDraw {
|
|
180
|
-
unitLength: number;
|
|
181
|
-
offset: ICoordinate2D;
|
|
182
|
-
subdivisions: number;
|
|
183
|
-
showSubdivisions: boolean;
|
|
184
|
-
}
|
|
185
|
-
export interface IWallsValidationConfig {
|
|
186
|
-
minLength: number;
|
|
187
|
-
padding: number;
|
|
188
|
-
}
|
|
189
|
-
export interface ISharedValidatorInput {
|
|
190
|
-
walls: IWalls;
|
|
191
|
-
features: IFeatures;
|
|
192
|
-
}
|
|
193
|
-
export interface IFeatureValidatorInput {
|
|
194
|
-
wall: IWall;
|
|
195
|
-
updatedFeature: Pick<IFeature, 'length' | 'offset'> & {
|
|
196
|
-
address: IElementAddress;
|
|
197
|
-
};
|
|
198
|
-
}
|
|
199
|
-
export interface IAddWallValidatorInput {
|
|
200
|
-
newWall: Pick<IWall, 'line'> & Pick<INewWall, 'start' | 'end'>;
|
|
201
|
-
}
|
|
202
|
-
export interface IMoveVertexValidatorInput {
|
|
203
|
-
updatedPosition: ISnapPoint;
|
|
204
|
-
vertex: IVertex;
|
|
205
|
-
}
|
|
206
|
-
export declare type IValidatorFunction<T> = (input: T, wallsAndFeatures: ISharedValidatorInput, validationConfig: IWallsValidationConfig) => false | IErrorElement;
|
|
207
|
-
export declare enum SNAPPING_TYPES {
|
|
208
|
-
NONE = "none",
|
|
209
|
-
ANGLE = "angle",
|
|
210
|
-
GUIDE = "guide",
|
|
211
|
-
GRID = "grid"
|
|
212
|
-
}
|
|
213
|
-
export declare enum GUIDE_ORIENTATIONS {
|
|
214
|
-
HORIZONTAL = "horizontal",
|
|
215
|
-
VERTICAL = "vertical"
|
|
216
|
-
}
|
|
217
|
-
export interface IGuides {
|
|
218
|
-
point: ICoordinate2D;
|
|
219
|
-
orientations: Array<GUIDE_ORIENTATIONS>;
|
|
220
|
-
}
|
|
221
|
-
export interface IElementAddress {
|
|
222
|
-
type: IElementName;
|
|
223
|
-
index: number;
|
|
224
|
-
}
|
|
225
|
-
export interface IFeatureAddress {
|
|
226
|
-
type: IFeatureName;
|
|
227
|
-
index: number;
|
|
228
|
-
}
|
|
229
|
-
export interface ISnapPointShared<T> {
|
|
230
|
-
type: T;
|
|
231
|
-
point: ICoordinate2D;
|
|
232
|
-
locked: [boolean, boolean];
|
|
233
|
-
}
|
|
234
|
-
export interface ISnapPointNone extends ISnapPointShared<SNAPPING_TYPES.NONE> {
|
|
235
|
-
locked: [false, false];
|
|
236
|
-
}
|
|
237
|
-
export interface ISnapPointVertex extends ISnapPointShared<IElements.VERTEX> {
|
|
238
|
-
index: number;
|
|
239
|
-
locked: [true, true];
|
|
240
|
-
}
|
|
241
|
-
export interface ISnapPointWall extends ISnapPointShared<IElements.WALL> {
|
|
242
|
-
offset: number;
|
|
243
|
-
index: number;
|
|
244
|
-
}
|
|
245
|
-
export interface ISnapPointFeature extends ISnapPointShared<IFeatureName> {
|
|
246
|
-
index: number;
|
|
247
|
-
}
|
|
248
|
-
export interface ISnapPointAngle extends ISnapPointShared<SNAPPING_TYPES.ANGLE>, Pick<IGuides, 'orientations'> {
|
|
249
|
-
}
|
|
250
|
-
export interface ISnapPointGuide extends ISnapPointShared<SNAPPING_TYPES.GUIDE>, Pick<IGuides, 'orientations'> {
|
|
251
|
-
}
|
|
252
|
-
export interface ISnapPointGrid extends ISnapPointShared<SNAPPING_TYPES.GRID>, Pick<IGuides, 'orientations'> {
|
|
253
|
-
locked: [true, true];
|
|
254
|
-
}
|
|
255
|
-
export declare type ISnapPoint = ISnapPointNone | ISnapPointVertex | ISnapPointWall | ISnapPointFeature | ISnapPointAngle | ISnapPointGuide | ISnapPointGrid;
|
|
256
|
-
export interface IActiveElement extends IElementAddress {
|
|
257
|
-
snapPoint?: ISnapPoint;
|
|
258
|
-
}
|
|
259
|
-
export declare enum IErrorTypes {
|
|
260
|
-
HARD = "hard",
|
|
261
|
-
SOFT = "soft",
|
|
262
|
-
WARN = "warning"
|
|
263
|
-
}
|
|
264
|
-
export interface IErrorElement {
|
|
265
|
-
address?: IElementAddress;
|
|
266
|
-
message: string;
|
|
267
|
-
type: IErrorTypes;
|
|
268
|
-
}
|
|
269
|
-
export interface IElementUi {
|
|
270
|
-
path: [type: IFeatureName | IElements.WALL, index: number];
|
|
271
|
-
uiAnchor: ICoordinate2D;
|
|
272
|
-
}
|
|
273
|
-
export interface IElementPublic extends Pick<IElementUi, 'uiAnchor'> {
|
|
274
|
-
path: [attribute: string, index: number];
|
|
275
|
-
type: IFeatureName | IElements.WALL;
|
|
276
|
-
deleteElement: () => void;
|
|
277
|
-
splitWall?: (offset?: number) => void;
|
|
278
|
-
addFeature?: (type: IFeatureName, feature?: Partial<IFeature>) => void;
|
|
279
|
-
}
|
|
280
|
-
export declare enum IModes {
|
|
281
|
-
SELECT = "select",
|
|
282
|
-
DRAW = "draw"
|
|
283
|
-
}
|
|
284
|
-
export declare enum IUnits {
|
|
285
|
-
FEET = "feet",
|
|
286
|
-
METER = "meter",
|
|
287
|
-
INCH = "inch",
|
|
288
|
-
CM = "cm"
|
|
289
|
-
}
|
|
290
|
-
export declare enum IDimensionOptions {
|
|
291
|
-
NONE = "none",
|
|
292
|
-
DEFAULT = "default",
|
|
293
|
-
DETAILED = "detailed"
|
|
294
|
-
}
|
|
295
|
-
export interface ISpacesConfigShared<T> {
|
|
296
|
-
scale: number;
|
|
297
|
-
unit: IUnits;
|
|
298
|
-
snapProximity: number;
|
|
299
|
-
styles: T;
|
|
300
|
-
zoomDefault: number;
|
|
301
|
-
zoomMin: number;
|
|
302
|
-
zoomMax: number;
|
|
303
|
-
translateDefault: ICoordinate2D;
|
|
304
|
-
enableAngleSnapping: boolean;
|
|
305
|
-
enableGuideSnapping: boolean;
|
|
306
|
-
enableGridSnapping: boolean;
|
|
307
|
-
showDimensions: IDimensionOptions;
|
|
308
|
-
}
|
|
309
|
-
export interface ISpacesConfigInternal extends ISpacesConfigShared<ISpacesStyles> {
|
|
310
|
-
}
|
|
311
|
-
export interface ISpacesConfigUser extends ISpacesConfigShared<Partial<ISpacesStyles>> {
|
|
312
|
-
theme: string;
|
|
313
|
-
zoomDisabled: boolean;
|
|
314
|
-
translateDisabled: boolean;
|
|
315
|
-
zoomSensitivity: number;
|
|
316
|
-
}
|
|
317
|
-
export interface ISpacesAttributes {
|
|
318
|
-
[IElements.WALL]: string;
|
|
319
|
-
[IElements.WINDOW]: string;
|
|
320
|
-
[IElements.DOOR]: string;
|
|
321
|
-
[IElements.OPENING]: string;
|
|
322
|
-
featurePositionX: string;
|
|
323
|
-
featurePositionY: string;
|
|
324
|
-
featureConnectedTo: string;
|
|
325
|
-
featureHeight: string;
|
|
326
|
-
featureLength: string;
|
|
327
|
-
wallStartX: string;
|
|
328
|
-
wallStartY: string;
|
|
329
|
-
wallStartZ: string;
|
|
330
|
-
wallEndX: string;
|
|
331
|
-
wallEndY: string;
|
|
332
|
-
wallEndZ: string;
|
|
333
|
-
wallConnections: string;
|
|
334
|
-
wallMode: string;
|
|
335
|
-
doorOrientation: string;
|
|
336
|
-
doorOpeningDirection: string;
|
|
337
|
-
doorShowSwing: string;
|
|
338
|
-
}
|
|
339
|
-
export interface IAttributeDefaults extends Partial<Record<IElements.WALL | IElements.WINDOW | IElements.DOOR | IElements.OPENING, string>> {
|
|
340
|
-
doorOrientation: DoorOrientations;
|
|
341
|
-
doorOpeningDirection: DoorOpeningDirections;
|
|
342
|
-
doorShowSwing: DoorShowSwing;
|
|
343
|
-
}
|
|
344
|
-
interface ISpacesPropsShared<T, U> {
|
|
345
|
-
config: T;
|
|
346
|
-
attributes: U;
|
|
347
|
-
layouts?: Array<string>;
|
|
348
|
-
}
|
|
349
|
-
export interface ISpacesHookProps extends ISpacesPropsShared<undefined | Partial<ISpacesConfigUser>, undefined | Partial<ISpacesAttributes>> {
|
|
350
|
-
}
|
|
351
|
-
export interface ISpacesStateProps extends ISpacesPropsShared<ISpacesConfigInternal, ISpacesAttributes> {
|
|
352
|
-
attributesState?: Record<string, IHydratedAttribute>;
|
|
353
|
-
attributeDefaults: IAttributeDefaults;
|
|
354
|
-
canvasDimensions?: ICoordinate2D;
|
|
355
|
-
wallMode: {
|
|
356
|
-
value: WallModes;
|
|
357
|
-
assetId: string;
|
|
358
|
-
};
|
|
359
|
-
setPendingStatus: (status: boolean) => void;
|
|
360
|
-
}
|
|
361
|
-
export interface ISpacesSync extends Pick<ISpacesConfigInternal, 'unit' | 'showDimensions'> {
|
|
362
|
-
canvasDimensions: ICoordinate2D;
|
|
363
|
-
angleSnappingEnabled: boolean;
|
|
364
|
-
guideSnappingEnabled: boolean;
|
|
365
|
-
gridSnappingEnabled: boolean;
|
|
366
|
-
translate: ICoordinate2D;
|
|
367
|
-
zoom: number;
|
|
368
|
-
wallMode: {
|
|
369
|
-
value: WallModes;
|
|
370
|
-
assetId: string;
|
|
371
|
-
};
|
|
372
|
-
selectedElement: {
|
|
373
|
-
type: IElementName;
|
|
374
|
-
index: number;
|
|
375
|
-
} | null;
|
|
376
|
-
attributesState: Record<string, IHydratedAttribute>;
|
|
377
|
-
}
|
|
378
|
-
export {};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IDimensionOptions = exports.IUnits = exports.IModes = exports.IErrorTypes = exports.GUIDE_ORIENTATIONS = exports.SNAPPING_TYPES = exports.IElementStyleModes = exports.IElements = void 0;
|
|
4
|
-
var IElements;
|
|
5
|
-
(function (IElements) {
|
|
6
|
-
IElements["WALL"] = "walls";
|
|
7
|
-
IElements["VERTEX"] = "vertex";
|
|
8
|
-
IElements["FEATURE"] = "features";
|
|
9
|
-
IElements["WINDOW"] = "windows";
|
|
10
|
-
IElements["DOOR"] = "doors";
|
|
11
|
-
IElements["OPENING"] = "openings";
|
|
12
|
-
})(IElements = exports.IElements || (exports.IElements = {}));
|
|
13
|
-
var IElementStyleModes;
|
|
14
|
-
(function (IElementStyleModes) {
|
|
15
|
-
IElementStyleModes["HIGHLIGHT"] = "highlight";
|
|
16
|
-
IElementStyleModes["ACTIVE"] = "active";
|
|
17
|
-
IElementStyleModes["ERROR"] = "error";
|
|
18
|
-
})(IElementStyleModes = exports.IElementStyleModes || (exports.IElementStyleModes = {}));
|
|
19
|
-
var SNAPPING_TYPES;
|
|
20
|
-
(function (SNAPPING_TYPES) {
|
|
21
|
-
SNAPPING_TYPES["NONE"] = "none";
|
|
22
|
-
SNAPPING_TYPES["ANGLE"] = "angle";
|
|
23
|
-
SNAPPING_TYPES["GUIDE"] = "guide";
|
|
24
|
-
SNAPPING_TYPES["GRID"] = "grid";
|
|
25
|
-
})(SNAPPING_TYPES = exports.SNAPPING_TYPES || (exports.SNAPPING_TYPES = {}));
|
|
26
|
-
var GUIDE_ORIENTATIONS;
|
|
27
|
-
(function (GUIDE_ORIENTATIONS) {
|
|
28
|
-
GUIDE_ORIENTATIONS["HORIZONTAL"] = "horizontal";
|
|
29
|
-
GUIDE_ORIENTATIONS["VERTICAL"] = "vertical";
|
|
30
|
-
})(GUIDE_ORIENTATIONS = exports.GUIDE_ORIENTATIONS || (exports.GUIDE_ORIENTATIONS = {}));
|
|
31
|
-
var IErrorTypes;
|
|
32
|
-
(function (IErrorTypes) {
|
|
33
|
-
IErrorTypes["HARD"] = "hard";
|
|
34
|
-
IErrorTypes["SOFT"] = "soft";
|
|
35
|
-
IErrorTypes["WARN"] = "warning";
|
|
36
|
-
})(IErrorTypes = exports.IErrorTypes || (exports.IErrorTypes = {}));
|
|
37
|
-
var IModes;
|
|
38
|
-
(function (IModes) {
|
|
39
|
-
IModes["SELECT"] = "select";
|
|
40
|
-
IModes["DRAW"] = "draw";
|
|
41
|
-
})(IModes = exports.IModes || (exports.IModes = {}));
|
|
42
|
-
var IUnits;
|
|
43
|
-
(function (IUnits) {
|
|
44
|
-
IUnits["FEET"] = "feet";
|
|
45
|
-
IUnits["METER"] = "meter";
|
|
46
|
-
IUnits["INCH"] = "inch";
|
|
47
|
-
IUnits["CM"] = "cm";
|
|
48
|
-
})(IUnits = exports.IUnits || (exports.IUnits = {}));
|
|
49
|
-
var IDimensionOptions;
|
|
50
|
-
(function (IDimensionOptions) {
|
|
51
|
-
IDimensionOptions["NONE"] = "none";
|
|
52
|
-
IDimensionOptions["DEFAULT"] = "default";
|
|
53
|
-
IDimensionOptions["DETAILED"] = "detailed";
|
|
54
|
-
})(IDimensionOptions = exports.IDimensionOptions || (exports.IDimensionOptions = {}));
|