@threekit-tools/treble 0.0.93 → 0.0.94-next-01
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Treble/Treble.d.ts +2 -2
- package/dist/Treble/Treble.js +5 -6
- package/dist/Treble/index.d.ts +1 -1
- package/dist/Treble/index.js +1 -1
- package/dist/Treble/{snapshots.d.ts → snapshot.d.ts} +1 -1
- package/dist/Treble/{snapshots.js → snapshot.js} +1 -1
- package/dist/Treble/wishlist.d.ts +1 -1
- package/dist/Treble/wishlist.js +1 -1
- package/dist/api/catalog.js +1 -1
- package/dist/api/configurations.d.ts +0 -1
- package/dist/api/configurations.js +3 -10
- 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/api/products.d.ts +4 -0
- package/dist/api/{assets.js → products.js} +33 -12
- 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 +3 -6
- package/dist/components/ThreekitProvider/index.js +2 -27
- 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 +5 -3
- package/dist/hooks/useDevTools/index.d.ts +1 -1
- package/dist/hooks/useNestedConfigurator/index.d.ts +2 -2
- package/dist/hooks/useNestedConfigurator/index.js +4 -5
- package/dist/hooks/usePlayer/index.d.ts +1 -1
- package/dist/hooks/usePlayerPortal/index.d.ts +1 -1
- package/dist/hooks/useProductCache/index.js +1 -1
- package/dist/hooks/useResetProduct/index.d.ts +1 -1
- package/dist/hooks/useResetProduct/index.js +1 -1
- package/dist/hooks/useShare/index.d.ts +1 -1
- package/dist/hooks/useShare/index.js +2 -4
- package/dist/hooks/useSingleAnimation/index.js +1 -1
- package/dist/hooks/useSpaces/SpacesLayout.d.ts +11 -0
- package/dist/hooks/useSpaces/SpacesLayout.js +74 -0
- package/dist/hooks/useSpaces/SpacesState.d.ts +177 -0
- package/dist/hooks/useSpaces/SpacesState.js +1814 -0
- package/dist/hooks/useSpaces/constants.d.ts +79 -0
- package/dist/hooks/useSpaces/constants.js +130 -0
- package/dist/hooks/useSpaces/dataHandlers.d.ts +38 -0
- package/dist/hooks/useSpaces/dataHandlers.js +411 -0
- package/dist/hooks/useSpaces/draw/clearCanvas.d.ts +2 -0
- package/dist/hooks/useSpaces/draw/clearCanvas.js +9 -0
- package/dist/hooks/useSpaces/draw/drawBackground.d.ts +2 -0
- package/dist/hooks/useSpaces/draw/drawBackground.js +12 -0
- package/dist/hooks/useSpaces/draw/drawDimensions.d.ts +3 -0
- package/dist/hooks/useSpaces/draw/drawDimensions.js +53 -0
- package/dist/hooks/useSpaces/draw/drawDoors.d.ts +9 -0
- package/dist/hooks/useSpaces/draw/drawDoors.js +99 -0
- package/dist/hooks/useSpaces/draw/drawFloor.d.ts +3 -0
- package/dist/hooks/useSpaces/draw/drawFloor.js +36 -0
- package/dist/hooks/useSpaces/draw/drawGrid.d.ts +3 -0
- package/dist/hooks/useSpaces/draw/drawGrid.js +36 -0
- package/dist/hooks/useSpaces/draw/drawGuides.d.ts +3 -0
- package/dist/hooks/useSpaces/draw/drawGuides.js +23 -0
- package/dist/hooks/useSpaces/draw/drawOpenings.d.ts +9 -0
- package/dist/hooks/useSpaces/draw/drawOpenings.js +72 -0
- package/dist/hooks/useSpaces/draw/drawVertices.d.ts +8 -0
- package/dist/hooks/useSpaces/draw/drawVertices.js +61 -0
- package/dist/hooks/useSpaces/draw/drawWalls.d.ts +11 -0
- package/dist/hooks/useSpaces/draw/drawWalls.js +90 -0
- package/dist/hooks/useSpaces/draw/drawWindows.d.ts +9 -0
- package/dist/hooks/useSpaces/draw/drawWindows.js +82 -0
- package/dist/hooks/useSpaces/draw/index.d.ts +11 -0
- package/dist/hooks/useSpaces/draw/index.js +129 -0
- package/dist/hooks/useSpaces/geometry/addThicknessToLine.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/addThicknessToLine.js +13 -0
- package/dist/hooks/useSpaces/geometry/areLinesEqual.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/areLinesEqual.js +17 -0
- package/dist/hooks/useSpaces/geometry/arePointsEqual.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/arePointsEqual.js +8 -0
- package/dist/hooks/useSpaces/geometry/arePointsWithinProximity.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/arePointsWithinProximity.js +11 -0
- package/dist/hooks/useSpaces/geometry/closestPointOnLine.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/closestPointOnLine.js +13 -0
- package/dist/hooks/useSpaces/geometry/doLinesOverlap.d.ts +2 -0
- package/dist/hooks/useSpaces/geometry/doLinesOverlap.js +16 -0
- package/dist/hooks/useSpaces/geometry/euclideanMod.d.ts +2 -0
- package/dist/hooks/useSpaces/geometry/euclideanMod.js +6 -0
- package/dist/hooks/useSpaces/geometry/findLoops.d.ts +6 -0
- package/dist/hooks/{useRoomBuilder → useSpaces/geometry}/findLoops.js +31 -13
- package/dist/hooks/useSpaces/geometry/getAllLineIntersections.d.ts +6 -0
- package/dist/hooks/useSpaces/geometry/getAllLineIntersections.js +23 -0
- package/dist/hooks/useSpaces/geometry/getAngleOfLineSegment.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getAngleOfLineSegment.js +7 -0
- package/dist/hooks/useSpaces/geometry/getClosestPointOnLineSegment.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getClosestPointOnLineSegment.js +17 -0
- package/dist/hooks/useSpaces/geometry/getDistanceToLine.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getDistanceToLine.js +10 -0
- package/dist/hooks/useSpaces/geometry/getLengthOfLineSegment.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getLengthOfLineSegment.js +7 -0
- package/dist/hooks/useSpaces/geometry/getLineAtOffsetOnLineSegment.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getLineAtOffsetOnLineSegment.js +17 -0
- package/dist/hooks/useSpaces/geometry/getLineOtherPoint.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getLineOtherPoint.js +11 -0
- package/dist/hooks/useSpaces/geometry/getLineSegmentsIntersection.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getLineSegmentsIntersection.js +43 -0
- package/dist/hooks/useSpaces/geometry/getMidpointOfLineSegment.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getMidpointOfLineSegment.js +9 -0
- package/dist/hooks/useSpaces/geometry/getParallelLineSegmentAtDistance.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getParallelLineSegmentAtDistance.js +20 -0
- package/dist/hooks/useSpaces/geometry/getPointAtOffsetOnLineSegment.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getPointAtOffsetOnLineSegment.js +11 -0
- package/dist/hooks/useSpaces/geometry/getPolygonArea.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getPolygonArea.js +15 -0
- package/dist/hooks/useSpaces/geometry/getQuadrilateralArea.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getQuadrilateralArea.js +16 -0
- package/dist/hooks/useSpaces/geometry/getTangetIntersectionAndOffset.d.ts +6 -0
- package/dist/hooks/useSpaces/geometry/getTangetIntersectionAndOffset.js +17 -0
- package/dist/hooks/useSpaces/geometry/getTriangleArea.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getTriangleArea.js +9 -0
- package/dist/hooks/useSpaces/geometry/getUnitVectorOfLineSegment.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getUnitVectorOfLineSegment.js +12 -0
- package/dist/hooks/useSpaces/geometry/index.d.ts +30 -0
- package/dist/hooks/useSpaces/geometry/index.js +64 -0
- package/dist/hooks/useSpaces/geometry/isPointInPolygon.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/isPointInPolygon.js +21 -0
- package/dist/hooks/useSpaces/geometry/isPointInQuadrilateral.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/isPointInQuadrilateral.js +25 -0
- package/dist/hooks/useSpaces/geometry/orderCoordinatesOnLineSegment.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/orderCoordinatesOnLineSegment.js +11 -0
- package/dist/hooks/useSpaces/geometry/splitLineAtOffset.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/splitLineAtOffset.js +12 -0
- package/dist/hooks/useSpaces/geometry/splitLineAtPoint.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/splitLineAtPoint.js +9 -0
- package/dist/hooks/useSpaces/geometry/splitLineAtPoints.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/splitLineAtPoints.js +28 -0
- package/dist/hooks/useSpaces/index.d.ts +95 -0
- package/dist/hooks/useSpaces/index.js +625 -0
- package/dist/hooks/useSpaces/themes/blueprint.d.ts +3 -0
- package/dist/hooks/useSpaces/themes/blueprint.js +96 -0
- package/dist/hooks/useSpaces/themes/default.d.ts +3 -0
- package/dist/hooks/useSpaces/themes/default.js +96 -0
- package/dist/hooks/{useRoomBuilder/themes.d.ts → useSpaces/themes/index.d.ts} +3 -4
- package/dist/hooks/useSpaces/themes/index.js +21 -0
- package/dist/hooks/useSpaces/themes/light.d.ts +3 -0
- package/dist/hooks/useSpaces/themes/light.js +96 -0
- package/dist/hooks/useSpaces/types.d.ts +378 -0
- package/dist/hooks/useSpaces/types.js +54 -0
- package/dist/hooks/useSpaces/validators/areWallsDuplicated.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/areWallsDuplicated.js +61 -0
- package/dist/hooks/useSpaces/validators/areWallsIntersecting.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/areWallsIntersecting.js +42 -0
- package/dist/hooks/useSpaces/validators/areWallsOrphaningFeatures.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/areWallsOrphaningFeatures.js +52 -0
- package/dist/hooks/useSpaces/validators/areWallsTooShort.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/areWallsTooShort.js +37 -0
- package/dist/hooks/useSpaces/validators/index.d.ts +15 -0
- package/dist/hooks/useSpaces/validators/index.js +40 -0
- package/dist/hooks/useSpaces/validators/isFeatureCollidingWithExistingFeature.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/isFeatureCollidingWithExistingFeature.js +31 -0
- package/dist/hooks/useSpaces/validators/isFeatureOutsideWallBounds.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/isFeatureOutsideWallBounds.js +19 -0
- package/dist/hooks/useSpaces/validators/isLineTooShort.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/isLineTooShort.js +26 -0
- package/dist/hooks/useSpaces/validators/isVertexLandingOnFeature.d.ts +4 -0
- package/dist/hooks/useSpaces/validators/isVertexLandingOnFeature.js +19 -0
- package/dist/hooks/useSpaces/validators/isWallEndingOnFeature.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/isWallEndingOnFeature.js +19 -0
- package/dist/hooks/useSpaces/validators/isWallIntersectingFeature.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/isWallIntersectingFeature.js +41 -0
- package/dist/hooks/useSpaces/validators/isWallOverlappingExisitingWalls.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/isWallOverlappingExisitingWalls.js +54 -0
- package/dist/hooks/useSpaces/validators/isWallTooShort.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/isWallTooShort.js +10 -0
- package/dist/hooks/{useRoomBuilder → useSpaces/validators}/messaging.js +1 -1
- package/dist/hooks/useWishlist/index.d.ts +1 -1
- package/dist/hooks/useZoom/index.d.ts +1 -1
- package/dist/http/index.d.ts +2 -2
- package/dist/http/index.js +2 -2
- package/dist/http/orders.d.ts +1 -1
- package/dist/http/products.d.ts +1 -0
- package/dist/http/products.js +12 -0
- package/dist/icons/AngleSnapping.d.ts +3 -0
- package/dist/icons/AngleSnapping.js +28 -0
- package/dist/icons/Boundary.d.ts +3 -0
- package/dist/icons/Boundary.js +21 -0
- package/dist/icons/Center.d.ts +3 -0
- package/dist/icons/Center.js +24 -0
- package/dist/icons/Draw.js +3 -3
- package/dist/icons/GridSnapping.d.ts +3 -0
- package/dist/icons/GridSnapping.js +28 -0
- package/dist/icons/LayoutAlt.d.ts +3 -0
- package/dist/icons/LayoutAlt.js +21 -0
- package/dist/icons/Magnet.d.ts +3 -0
- package/dist/icons/Magnet.js +27 -0
- package/dist/icons/Player3D.d.ts +3 -0
- package/dist/icons/Player3D.js +21 -0
- package/dist/icons/RulerBlank.d.ts +3 -0
- package/dist/icons/RulerBlank.js +25 -0
- package/dist/icons/RulerDetailed.d.ts +3 -0
- package/dist/icons/RulerDetailed.js +27 -0
- package/dist/icons/Save.d.ts +3 -0
- package/dist/icons/Save.js +21 -0
- package/dist/icons/Spinner.d.ts +2 -2
- package/dist/icons/UnitCm.d.ts +3 -0
- package/dist/icons/UnitCm.js +22 -0
- package/dist/icons/UnitFeet.d.ts +3 -0
- package/dist/icons/UnitFeet.js +22 -0
- package/dist/icons/UnitInch.d.ts +3 -0
- package/dist/icons/UnitInch.js +22 -0
- package/dist/icons/UnitMeter.d.ts +3 -0
- package/dist/icons/UnitMeter.js +21 -0
- package/dist/icons/Window.js +4 -4
- package/dist/icons/index.js +28 -0
- package/dist/icons/types.d.ts +1 -1
- package/dist/index.d.ts +17 -2
- package/dist/index.js +35 -5
- package/dist/store/attributes.d.ts +5 -4
- package/dist/store/attributes.js +4 -2
- package/dist/store/index.d.ts +43 -12
- package/dist/store/index.js +3 -1
- package/dist/store/price.d.ts +1 -1
- package/dist/store/price.js +1 -1
- package/dist/store/product.d.ts +2 -2
- package/dist/store/product.js +5 -8
- package/dist/store/spaces.d.ts +74 -0
- package/dist/store/spaces.js +354 -0
- package/dist/store/translations.d.ts +8 -10
- package/dist/store/translations.js +19 -39
- package/dist/store/treble.d.ts +2 -2
- package/dist/store/treble.js +15 -22
- package/dist/store/wishlist.d.ts +4 -22
- package/dist/store/wishlist.js +1 -1
- package/dist/types.d.ts +20 -19
- package/dist/types.js +9 -9
- package/dist/utils.d.ts +6 -2
- package/dist/utils.js +12 -5
- package/package.json +1 -1
- package/dist/api/assets.d.ts +0 -1
- package/dist/hooks/useRoomBuilder/RoomBuilderState.d.ts +0 -95
- package/dist/hooks/useRoomBuilder/RoomBuilderState.js +0 -1237
- package/dist/hooks/useRoomBuilder/constants.d.ts +0 -41
- package/dist/hooks/useRoomBuilder/constants.js +0 -48
- package/dist/hooks/useRoomBuilder/dataHandlers.d.ts +0 -18
- package/dist/hooks/useRoomBuilder/dataHandlers.js +0 -187
- package/dist/hooks/useRoomBuilder/draw.d.ts +0 -55
- package/dist/hooks/useRoomBuilder/draw.js +0 -573
- package/dist/hooks/useRoomBuilder/findLoops.d.ts +0 -5
- package/dist/hooks/useRoomBuilder/geometry.d.ts +0 -33
- package/dist/hooks/useRoomBuilder/geometry.js +0 -325
- package/dist/hooks/useRoomBuilder/index.d.ts +0 -40
- package/dist/hooks/useRoomBuilder/index.js +0 -303
- package/dist/hooks/useRoomBuilder/themes.js +0 -273
- package/dist/hooks/useRoomBuilder/types.d.ts +0 -238
- package/dist/hooks/useRoomBuilder/types.js +0 -36
- package/dist/hooks/useRoomBuilder/validators.d.ts +0 -36
- package/dist/hooks/useRoomBuilder/validators.js +0 -362
- package/dist/http/assets.d.ts +0 -2
- package/dist/http/assets.js +0 -16
- /package/dist/hooks/{useRoomBuilder → useSpaces/validators}/messaging.d.ts +0 -0
|
@@ -1,273 +0,0 @@
|
|
|
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);
|
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
export type ICoordinate2D = [x: number, y: number];
|
|
2
|
-
export type ICoordinate3D = [x: number, y: number, z: number];
|
|
3
|
-
export type ICoordinatesLine = [
|
|
4
|
-
startPoint: ICoordinate2D,
|
|
5
|
-
endPoint: ICoordinate2D
|
|
6
|
-
];
|
|
7
|
-
export type ICoordinatesQuadrilateral = [
|
|
8
|
-
point1: ICoordinate2D,
|
|
9
|
-
point2: ICoordinate2D,
|
|
10
|
-
point3: ICoordinate2D,
|
|
11
|
-
point4: ICoordinate2D
|
|
12
|
-
];
|
|
13
|
-
export declare enum IElements {
|
|
14
|
-
WALL = "walls",
|
|
15
|
-
VERTEX = "vertex",
|
|
16
|
-
FEATURE = "features",
|
|
17
|
-
WINDOW = "windows",
|
|
18
|
-
DOOR = "doors",
|
|
19
|
-
OPENING = "openings"
|
|
20
|
-
}
|
|
21
|
-
export type IFeatureName = IElements.WINDOW | IElements.DOOR | IElements.OPENING;
|
|
22
|
-
export type IElementName = IElements.WALL | IElements.VERTEX | IFeatureName;
|
|
23
|
-
export interface IWall {
|
|
24
|
-
assetId: string;
|
|
25
|
-
line: ICoordinatesLine;
|
|
26
|
-
path?: ICoordinatesQuadrilateral;
|
|
27
|
-
height?: number;
|
|
28
|
-
thickness?: number;
|
|
29
|
-
connections: Array<[elementType: IFeatureName, index: number]>;
|
|
30
|
-
}
|
|
31
|
-
export interface IWalls extends Array<IWall> {
|
|
32
|
-
}
|
|
33
|
-
export interface INewWall {
|
|
34
|
-
start: ICoordinate2D;
|
|
35
|
-
end?: ICoordinate2D;
|
|
36
|
-
snapStartTo?: ISnapPoint;
|
|
37
|
-
snapEndTo?: 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
|
-
path?: ICoordinatesQuadrilateral;
|
|
61
|
-
connectedTo: [elementType: IElements.WALL, index: number];
|
|
62
|
-
}
|
|
63
|
-
export interface IFeatureHydrated extends IFeature {
|
|
64
|
-
line: ICoordinatesLine;
|
|
65
|
-
}
|
|
66
|
-
export interface IFeaturesShared<T> {
|
|
67
|
-
[IElements.WINDOW]?: Array<T>;
|
|
68
|
-
[IElements.DOOR]?: Array<T>;
|
|
69
|
-
[IElements.OPENING]?: Array<T>;
|
|
70
|
-
}
|
|
71
|
-
export interface IFeatures extends IFeaturesShared<IFeature> {
|
|
72
|
-
}
|
|
73
|
-
export interface IFeaturesHydrated extends IFeaturesShared<IFeatureHydrated> {
|
|
74
|
-
}
|
|
75
|
-
export declare enum IElementStyleModes {
|
|
76
|
-
HIGHLIGHT = "highlight",
|
|
77
|
-
ACTIVE = "active",
|
|
78
|
-
ERROR = "error"
|
|
79
|
-
}
|
|
80
|
-
export interface IRoomBuilderStylesShared {
|
|
81
|
-
fill: string;
|
|
82
|
-
stroke?: string;
|
|
83
|
-
strokeWidth?: number;
|
|
84
|
-
[IElementStyleModes.HIGHLIGHT]: {
|
|
85
|
-
fill: string;
|
|
86
|
-
stroke: string;
|
|
87
|
-
};
|
|
88
|
-
[IElementStyleModes.ACTIVE]: {
|
|
89
|
-
fill: string;
|
|
90
|
-
stroke: string;
|
|
91
|
-
};
|
|
92
|
-
[IElementStyleModes.ERROR]: {
|
|
93
|
-
fill: string;
|
|
94
|
-
stroke: string;
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
export interface IStylesGrid {
|
|
98
|
-
gridStepGap: number;
|
|
99
|
-
lineThickness: number;
|
|
100
|
-
secondaryLineThickness: number;
|
|
101
|
-
lineColor: string;
|
|
102
|
-
backgroundColor?: string;
|
|
103
|
-
secondaryLineIncrement?: number;
|
|
104
|
-
}
|
|
105
|
-
export interface IStylesFloor {
|
|
106
|
-
color: string;
|
|
107
|
-
textColor: string;
|
|
108
|
-
}
|
|
109
|
-
export interface IStylesDimension {
|
|
110
|
-
padding: number;
|
|
111
|
-
lineThickness: number;
|
|
112
|
-
lineColor: string;
|
|
113
|
-
fontSize: number;
|
|
114
|
-
font: string;
|
|
115
|
-
textColor: string;
|
|
116
|
-
textBackgroundColor: string;
|
|
117
|
-
}
|
|
118
|
-
export interface IStylesWall extends IRoomBuilderStylesShared {
|
|
119
|
-
thickness: number;
|
|
120
|
-
}
|
|
121
|
-
export interface IStylesVertex extends Omit<IRoomBuilderStylesShared, 'fill' | IElementStyleModes.HIGHLIGHT | IElementStyleModes.ACTIVE | IElementStyleModes.ERROR> {
|
|
122
|
-
innerFill: string;
|
|
123
|
-
outerFill: string;
|
|
124
|
-
innerRadius: number;
|
|
125
|
-
outerRadius?: number;
|
|
126
|
-
[IElementStyleModes.HIGHLIGHT]: {
|
|
127
|
-
innerFill: string;
|
|
128
|
-
outerFill: string;
|
|
129
|
-
stroke?: string;
|
|
130
|
-
};
|
|
131
|
-
[IElementStyleModes.ACTIVE]: {
|
|
132
|
-
innerFill: string;
|
|
133
|
-
outerFill: string;
|
|
134
|
-
stroke?: string;
|
|
135
|
-
};
|
|
136
|
-
[IElementStyleModes.ERROR]: {
|
|
137
|
-
innerFill: string;
|
|
138
|
-
outerFill: string;
|
|
139
|
-
stroke?: string;
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
export interface IStylesFeature extends IStylesWall {
|
|
143
|
-
}
|
|
144
|
-
export interface IRoomBuilderStyles {
|
|
145
|
-
grid: IStylesGrid;
|
|
146
|
-
floor: IStylesFloor;
|
|
147
|
-
dimensions: IStylesDimension;
|
|
148
|
-
wall: IStylesWall;
|
|
149
|
-
vertex: IStylesVertex;
|
|
150
|
-
feature: IStylesFeature;
|
|
151
|
-
}
|
|
152
|
-
export interface IRoomBuilderThemePartial {
|
|
153
|
-
grid: Partial<IStylesGrid>;
|
|
154
|
-
floor: Partial<IStylesFloor>;
|
|
155
|
-
dimensions: Partial<IStylesDimension>;
|
|
156
|
-
wall: Partial<IStylesWall>;
|
|
157
|
-
vertex: Partial<IStylesVertex>;
|
|
158
|
-
feature: Partial<IStylesFeature>;
|
|
159
|
-
}
|
|
160
|
-
export interface IElementAddress {
|
|
161
|
-
type: IElementName;
|
|
162
|
-
index: number;
|
|
163
|
-
}
|
|
164
|
-
export interface IFeatureAddress {
|
|
165
|
-
type: IFeatureName;
|
|
166
|
-
index: number;
|
|
167
|
-
}
|
|
168
|
-
export interface ISnapPointShared<T> {
|
|
169
|
-
type: T;
|
|
170
|
-
index: number;
|
|
171
|
-
point: ICoordinate2D;
|
|
172
|
-
}
|
|
173
|
-
export interface ISnapPointVertex extends ISnapPointShared<IElements.VERTEX> {
|
|
174
|
-
}
|
|
175
|
-
export interface ISnapPointWall extends ISnapPointShared<IElements.WALL> {
|
|
176
|
-
offset: number;
|
|
177
|
-
}
|
|
178
|
-
export interface ISnapPointFeature extends ISnapPointShared<IFeatureName> {
|
|
179
|
-
}
|
|
180
|
-
export interface ISnapPointAngle extends Omit<ISnapPointShared<'Angle'>, 'index'> {
|
|
181
|
-
}
|
|
182
|
-
export type ISnapPoint = ISnapPointVertex | ISnapPointWall | ISnapPointFeature | ISnapPointAngle;
|
|
183
|
-
export interface IActiveElement extends IElementAddress {
|
|
184
|
-
snapPoint?: ISnapPoint;
|
|
185
|
-
}
|
|
186
|
-
export declare enum IErrorTypes {
|
|
187
|
-
HARD = "hard",
|
|
188
|
-
SOFT = "soft",
|
|
189
|
-
WARN = "warning"
|
|
190
|
-
}
|
|
191
|
-
export interface IErrorElement {
|
|
192
|
-
address?: IElementAddress;
|
|
193
|
-
message: string;
|
|
194
|
-
type: IErrorTypes;
|
|
195
|
-
}
|
|
196
|
-
export interface IElementUi {
|
|
197
|
-
path: [type: IFeatureName | IElements.WALL, index: number];
|
|
198
|
-
uiAnchor: ICoordinate2D;
|
|
199
|
-
}
|
|
200
|
-
export interface IElementPublic extends Pick<IElementUi, 'uiAnchor'> {
|
|
201
|
-
path: [attribute: string, index: number];
|
|
202
|
-
}
|
|
203
|
-
export declare enum IModes {
|
|
204
|
-
SELECT = "select",
|
|
205
|
-
DRAW = "draw"
|
|
206
|
-
}
|
|
207
|
-
export declare enum IUnits {
|
|
208
|
-
FEET = "feet",
|
|
209
|
-
METER = "meter",
|
|
210
|
-
INCH = "inch",
|
|
211
|
-
CM = "cm"
|
|
212
|
-
}
|
|
213
|
-
export interface IRoomBuilderConfigShared<T> {
|
|
214
|
-
scale: number;
|
|
215
|
-
unit: IUnits;
|
|
216
|
-
snapProximity: number;
|
|
217
|
-
styles: T;
|
|
218
|
-
}
|
|
219
|
-
export interface IRoomBuilderConfigInternal extends IRoomBuilderConfigShared<IRoomBuilderStyles> {
|
|
220
|
-
}
|
|
221
|
-
export interface IRoomBuilderConfigUser extends IRoomBuilderConfigShared<Partial<IRoomBuilderStyles>> {
|
|
222
|
-
theme?: string;
|
|
223
|
-
}
|
|
224
|
-
export interface IRoomBuilderAttributes {
|
|
225
|
-
[IElements.WALL]: string;
|
|
226
|
-
[IElements.WINDOW]?: string;
|
|
227
|
-
[IElements.DOOR]?: string;
|
|
228
|
-
[IElements.OPENING]?: string;
|
|
229
|
-
}
|
|
230
|
-
interface IRoomBuilderPropsShared<T> {
|
|
231
|
-
config: T;
|
|
232
|
-
attributes: IRoomBuilderAttributes;
|
|
233
|
-
}
|
|
234
|
-
export interface IRoomBuilderHookProps extends IRoomBuilderPropsShared<undefined | Partial<IRoomBuilderConfigUser>> {
|
|
235
|
-
}
|
|
236
|
-
export interface IRoomBuilderStateProps extends IRoomBuilderPropsShared<IRoomBuilderConfigInternal> {
|
|
237
|
-
}
|
|
238
|
-
export {};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IUnits = exports.IModes = exports.IErrorTypes = 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 = IElements = {}));
|
|
13
|
-
var IElementStyleModes;
|
|
14
|
-
(function (IElementStyleModes) {
|
|
15
|
-
IElementStyleModes["HIGHLIGHT"] = "highlight";
|
|
16
|
-
IElementStyleModes["ACTIVE"] = "active";
|
|
17
|
-
IElementStyleModes["ERROR"] = "error";
|
|
18
|
-
})(IElementStyleModes || (exports.IElementStyleModes = IElementStyleModes = {}));
|
|
19
|
-
var IErrorTypes;
|
|
20
|
-
(function (IErrorTypes) {
|
|
21
|
-
IErrorTypes["HARD"] = "hard";
|
|
22
|
-
IErrorTypes["SOFT"] = "soft";
|
|
23
|
-
IErrorTypes["WARN"] = "warning";
|
|
24
|
-
})(IErrorTypes || (exports.IErrorTypes = IErrorTypes = {}));
|
|
25
|
-
var IModes;
|
|
26
|
-
(function (IModes) {
|
|
27
|
-
IModes["SELECT"] = "select";
|
|
28
|
-
IModes["DRAW"] = "draw";
|
|
29
|
-
})(IModes || (exports.IModes = IModes = {}));
|
|
30
|
-
var IUnits;
|
|
31
|
-
(function (IUnits) {
|
|
32
|
-
IUnits["FEET"] = "feet";
|
|
33
|
-
IUnits["METER"] = "meter";
|
|
34
|
-
IUnits["INCH"] = "inch";
|
|
35
|
-
IUnits["CM"] = "cm";
|
|
36
|
-
})(IUnits || (exports.IUnits = IUnits = {}));
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { IWall, IFeatures, IElementAddress, IWalls, IErrorElement, IFeature, INewWall, ICoordinate2D, IVertex, ISnapPoint } from './types';
|
|
2
|
-
export interface IFeatureValidatorInput {
|
|
3
|
-
updatedFeature: Pick<IFeature, 'length' | 'offset'> & {
|
|
4
|
-
address: IElementAddress;
|
|
5
|
-
};
|
|
6
|
-
wall: IWall;
|
|
7
|
-
features: IFeatures;
|
|
8
|
-
}
|
|
9
|
-
export interface IAddWallValidatorInput {
|
|
10
|
-
newWall: Pick<IWall, 'line'> & Pick<INewWall, 'snapStartTo' | 'snapEndTo'>;
|
|
11
|
-
walls: IWalls;
|
|
12
|
-
features: IFeatures;
|
|
13
|
-
}
|
|
14
|
-
export interface IMoveVertexValidatorInput {
|
|
15
|
-
updatedPosition: {
|
|
16
|
-
point: ICoordinate2D;
|
|
17
|
-
snapTo?: ISnapPoint;
|
|
18
|
-
};
|
|
19
|
-
walls: IWalls;
|
|
20
|
-
vertex: IVertex;
|
|
21
|
-
features: IFeatures;
|
|
22
|
-
}
|
|
23
|
-
type IValidatorFunction<T> = (input: T) => false | IErrorElement;
|
|
24
|
-
export declare function isWallTooShort(input: IAddWallValidatorInput): false | IErrorElement;
|
|
25
|
-
export declare function isWallIntersectingFeature(input: IAddWallValidatorInput): false | IErrorElement;
|
|
26
|
-
export declare function isWallOverlappingExisitingWalls(input: IAddWallValidatorInput): false | IErrorElement;
|
|
27
|
-
export declare function isWallEndingOnFeature(input: IAddWallValidatorInput): false | IErrorElement;
|
|
28
|
-
export declare function isFeatureOutsideWallBounds(input: IFeatureValidatorInput): false | IErrorElement;
|
|
29
|
-
export declare function isFeatureCollidingWithExistingFeature(input: IFeatureValidatorInput): false | IErrorElement;
|
|
30
|
-
export declare function areWallsTooShort(input: IMoveVertexValidatorInput): false | IErrorElement;
|
|
31
|
-
export declare function areWallsIntersecting(input: IMoveVertexValidatorInput): false | IErrorElement;
|
|
32
|
-
export declare function areWallsOrphaningFeatures(input: IMoveVertexValidatorInput): false | IErrorElement;
|
|
33
|
-
export declare function areWallsDuplicated(input: IMoveVertexValidatorInput): false | IErrorElement;
|
|
34
|
-
export declare function isVertexLandingOnFeature(input: IMoveVertexValidatorInput): false | IErrorElement;
|
|
35
|
-
export declare function runValidators<T>(validators: Array<IValidatorFunction<T>>, input: T): IErrorElement[] | null;
|
|
36
|
-
export {};
|