@eyeon/map 2.0.2 → 2.0.4
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/assets/MapViewer.css +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/chunks/MapViewer.js +2656 -1290
- package/dist/chunks/MapViewer.js.map +1 -1
- package/dist/chunks/stacking.js +1496 -873
- package/dist/chunks/stacking.js.map +1 -1
- package/dist/chunks/wheelZoom.js +259 -0
- package/dist/chunks/wheelZoom.js.map +1 -0
- package/dist/core/assignment.d.ts +97 -0
- package/dist/core/assignment.d.ts.map +1 -0
- package/dist/core/color.d.ts +5 -0
- package/dist/core/color.d.ts.map +1 -0
- package/dist/core/entranceIcon.d.ts +12 -0
- package/dist/core/entranceIcon.d.ts.map +1 -0
- package/dist/core/filletPolygon.d.ts +10 -0
- package/dist/core/filletPolygon.d.ts.map +1 -0
- package/dist/core/hostChrome.d.ts +2 -4
- package/dist/core/hostChrome.d.ts.map +1 -1
- package/dist/core/import/index.d.ts +4 -0
- package/dist/core/import/index.d.ts.map +1 -1
- package/dist/core/index.d.ts +9 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +160 -219
- package/dist/core/index.js.map +1 -1
- package/dist/core/labelAlign.d.ts +7 -0
- package/dist/core/labelAlign.d.ts.map +1 -0
- package/dist/core/layerStyles.d.ts +54 -5
- package/dist/core/layerStyles.d.ts.map +1 -1
- package/dist/core/mediaUrl.d.ts +3 -0
- package/dist/core/mediaUrl.d.ts.map +1 -0
- package/dist/core/outdoorDecoration.d.ts +16 -0
- package/dist/core/outdoorDecoration.d.ts.map +1 -0
- package/dist/core/publish/index.d.ts +6 -4
- package/dist/core/publish/index.d.ts.map +1 -1
- package/dist/core/routing/graph-tools.d.ts +23 -1
- package/dist/core/routing/graph-tools.d.ts.map +1 -1
- package/dist/core/routing/pathfinding.d.ts.map +1 -1
- package/dist/core/stacking.d.ts +50 -3
- package/dist/core/stacking.d.ts.map +1 -1
- package/dist/core/types.d.ts +34 -2
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/voids.d.ts +41 -0
- package/dist/core/voids.d.ts.map +1 -0
- package/dist/core/wheelZoom.d.ts +30 -0
- package/dist/core/wheelZoom.d.ts.map +1 -0
- package/dist/editor/FieldResetButton.d.ts +7 -0
- package/dist/editor/FieldResetButton.d.ts.map +1 -0
- package/dist/editor/MapEditor.d.ts +13 -3
- package/dist/editor/MapEditor.d.ts.map +1 -1
- package/dist/editor/canvas/EditorCanvas.d.ts +49 -7
- package/dist/editor/canvas/EditorCanvas.d.ts.map +1 -1
- package/dist/editor/canvas/OutdoorSvgUnderlay.d.ts +8 -0
- package/dist/editor/canvas/OutdoorSvgUnderlay.d.ts.map +1 -0
- package/dist/editor/canvas/coords.d.ts +56 -3
- package/dist/editor/canvas/coords.d.ts.map +1 -1
- package/dist/editor/canvas/editorFill.d.ts +12 -0
- package/dist/editor/canvas/editorFill.d.ts.map +1 -0
- package/dist/editor/canvas/editorHover.d.ts +18 -0
- package/dist/editor/canvas/editorHover.d.ts.map +1 -0
- package/dist/editor/canvas/underlayHint.d.ts +13 -0
- package/dist/editor/canvas/underlayHint.d.ts.map +1 -0
- package/dist/editor/connectorAssignments.d.ts +125 -0
- package/dist/editor/connectorAssignments.d.ts.map +1 -0
- package/dist/editor/draftOps.d.ts +12 -1
- package/dist/editor/draftOps.d.ts.map +1 -1
- package/dist/editor/editorSectionReturn.d.ts +12 -0
- package/dist/editor/editorSectionReturn.d.ts.map +1 -0
- package/dist/editor/ellipseDraw.d.ts +12 -0
- package/dist/editor/ellipseDraw.d.ts.map +1 -0
- package/dist/editor/entranceIcon.d.ts +15 -0
- package/dist/editor/entranceIcon.d.ts.map +1 -0
- package/dist/editor/floorsListReturn.d.ts +5 -0
- package/dist/editor/floorsListReturn.d.ts.map +1 -0
- package/dist/editor/geometryEdit.d.ts +23 -3
- package/dist/editor/geometryEdit.d.ts.map +1 -1
- package/dist/editor/hexColor.d.ts +6 -0
- package/dist/editor/hexColor.d.ts.map +1 -0
- package/dist/editor/history.d.ts +31 -0
- package/dist/editor/history.d.ts.map +1 -0
- package/dist/editor/index.css +1038 -68
- package/dist/editor/index.d.ts +6 -4
- package/dist/editor/index.d.ts.map +1 -1
- package/dist/editor/index.js +8744 -2136
- package/dist/editor/index.js.map +1 -1
- package/dist/editor/labelText.d.ts +25 -0
- package/dist/editor/labelText.d.ts.map +1 -0
- package/dist/editor/labels.d.ts +8 -0
- package/dist/editor/labels.d.ts.map +1 -1
- package/dist/editor/panels/AssignForm.d.ts +17 -0
- package/dist/editor/panels/AssignForm.d.ts.map +1 -0
- package/dist/editor/panels/AssignmentStyleFields.d.ts +14 -0
- package/dist/editor/panels/AssignmentStyleFields.d.ts.map +1 -0
- package/dist/editor/panels/BulkAssignForm.d.ts +11 -0
- package/dist/editor/panels/BulkAssignForm.d.ts.map +1 -0
- package/dist/editor/panels/CatalogKioskForm.d.ts +18 -0
- package/dist/editor/panels/CatalogKioskForm.d.ts.map +1 -0
- package/dist/editor/panels/ConnectorAssign.d.ts +16 -0
- package/dist/editor/panels/ConnectorAssign.d.ts.map +1 -0
- package/dist/editor/panels/CopyToLevelButton.d.ts +10 -0
- package/dist/editor/panels/CopyToLevelButton.d.ts.map +1 -0
- package/dist/editor/panels/EntranceIconForm.d.ts +11 -0
- package/dist/editor/panels/EntranceIconForm.d.ts.map +1 -0
- package/dist/editor/panels/FloorsPanel.d.ts +4 -0
- package/dist/editor/panels/FloorsPanel.d.ts.map +1 -1
- package/dist/editor/panels/ImportReviewPanel.d.ts.map +1 -1
- package/dist/editor/panels/Inspector.d.ts +24 -2
- package/dist/editor/panels/Inspector.d.ts.map +1 -1
- package/dist/editor/panels/LeftRail.d.ts +24 -11
- package/dist/editor/panels/LeftRail.d.ts.map +1 -1
- package/dist/editor/panels/PreviewOverlay.d.ts +9 -3
- package/dist/editor/panels/PreviewOverlay.d.ts.map +1 -1
- package/dist/editor/panels/TextLabelForm.d.ts +11 -0
- package/dist/editor/panels/TextLabelForm.d.ts.map +1 -0
- package/dist/editor/panels/formRows.d.ts +41 -0
- package/dist/editor/panels/formRows.d.ts.map +1 -0
- package/dist/editor/pathRings.d.ts +79 -0
- package/dist/editor/pathRings.d.ts.map +1 -0
- package/dist/editor/portalSurface.d.ts +37 -3
- package/dist/editor/portalSurface.d.ts.map +1 -1
- package/dist/editor/previewDocument.d.ts +2 -1
- package/dist/editor/previewDocument.d.ts.map +1 -1
- package/dist/editor/railAssignments.d.ts +29 -0
- package/dist/editor/railAssignments.d.ts.map +1 -0
- package/dist/editor/railKiosks.d.ts +27 -0
- package/dist/editor/railKiosks.d.ts.map +1 -0
- package/dist/editor/railListCopy.d.ts +31 -0
- package/dist/editor/railListCopy.d.ts.map +1 -0
- package/dist/editor/routeStubs.d.ts +103 -0
- package/dist/editor/routeStubs.d.ts.map +1 -0
- package/dist/editor/shapeCopy.d.ts +40 -0
- package/dist/editor/shapeCopy.d.ts.map +1 -0
- package/dist/editor/shapeSelection.d.ts +6 -0
- package/dist/editor/shapeSelection.d.ts.map +1 -0
- package/dist/editor/snapPoint.d.ts +5 -0
- package/dist/editor/snapPoint.d.ts.map +1 -0
- package/dist/editor/splitJoin.d.ts +78 -0
- package/dist/editor/splitJoin.d.ts.map +1 -0
- package/dist/editor/tools.d.ts +46 -7
- package/dist/editor/tools.d.ts.map +1 -1
- package/dist/fonts/assets.d.ts +4 -0
- package/dist/fonts/mapFont.d.ts +5 -0
- package/dist/fonts/mapFont.d.ts.map +1 -0
- package/dist/fonts/mapFontUrl.d.ts +8 -0
- package/dist/fonts/mapFontUrl.d.ts.map +1 -0
- package/dist/specialIcons.d.ts +39 -0
- package/dist/specialIcons.d.ts.map +1 -0
- package/dist/test-maps/shops-at-south-town/BASE - Shops At South Town.ai +6326 -6407
- package/dist/test-maps/shops-at-south-town/LF - Shops At South Town.ai +458 -484
- package/dist/test-maps/shops-at-south-town/SVG/BASE - Shops At South Town.svg +6 -6
- package/dist/test-maps/shops-at-south-town/SVG/LF - Shops At South Town.svg +52 -52
- package/dist/test-maps/shops-at-south-town/SVG/UF - Shops At South Town.svg +74 -74
- package/dist/test-maps/shops-at-south-town/UF - Shops At South Town.ai +341 -436
- package/dist/ui/ModernSelect.d.ts +14 -0
- package/dist/ui/ModernSelect.d.ts.map +1 -0
- package/dist/ui/selectSearch.d.ts +12 -0
- package/dist/ui/selectSearch.d.ts.map +1 -0
- package/dist/viewer/MapViewer.d.ts +14 -1
- package/dist/viewer/MapViewer.d.ts.map +1 -1
- package/dist/viewer/camera.d.ts +85 -1
- package/dist/viewer/camera.d.ts.map +1 -1
- package/dist/viewer/components/CameraRig.d.ts +18 -1
- package/dist/viewer/components/CameraRig.d.ts.map +1 -1
- package/dist/viewer/components/LevelMeshes.d.ts +15 -4
- package/dist/viewer/components/LevelMeshes.d.ts.map +1 -1
- package/dist/viewer/components/MapScene.d.ts +10 -4
- package/dist/viewer/components/MapScene.d.ts.map +1 -1
- package/dist/viewer/components/OpeningWell.d.ts +7 -0
- package/dist/viewer/components/OpeningWell.d.ts.map +1 -0
- package/dist/viewer/components/RouteLine.d.ts.map +1 -1
- package/dist/viewer/components/SvgVectorLayer.d.ts +5 -3
- package/dist/viewer/components/SvgVectorLayer.d.ts.map +1 -1
- package/dist/viewer/components/openingGeometry.d.ts +7 -0
- package/dist/viewer/components/openingGeometry.d.ts.map +1 -0
- package/dist/viewer/index.css +251 -9
- package/dist/viewer/index.d.ts +1 -1
- package/dist/viewer/index.d.ts.map +1 -1
- package/dist/viewer/index.js +5 -5
- package/dist/viewer/pointer.d.ts +26 -0
- package/dist/viewer/pointer.d.ts.map +1 -0
- package/dist/viewer/ui/MapControls.d.ts +11 -3
- package/dist/viewer/ui/MapControls.d.ts.map +1 -1
- package/dist/viewer/ui/RuntimeChrome.d.ts.map +1 -1
- package/package.json +4 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"previewDocument.d.ts","sourceRoot":"","sources":["../../src/editor/previewDocument.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"previewDocument.d.ts","sourceRoot":"","sources":["../../src/editor/previewDocument.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,gBAAgB,EACvB,MAAM,CAAC,EAAE;IACP,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,WAAW,EAAE,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,iBAAiB,EAAE,CAAC;CACjC,GACA,iBAAiB,CA8BnB"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { CmShapeAssignment } from '../core';
|
|
2
|
+
export declare const ASSIGNABLE_SHAPE_KINDS: readonly ["unit", "parking_zone", "amenity", "kiosk_screen"];
|
|
3
|
+
export type AssignableShapeKind = (typeof ASSIGNABLE_SHAPE_KINDS)[number];
|
|
4
|
+
export type AssignmentLike = Pick<CmShapeAssignment, 'shapeId' | 'targetType' | 'retailerId' | 'amenityId' | 'kioskId'> & {
|
|
5
|
+
customLabel?: string | null;
|
|
6
|
+
};
|
|
7
|
+
export type AssignableShape = {
|
|
8
|
+
id: number;
|
|
9
|
+
kind: string;
|
|
10
|
+
orphanedAt?: string | null;
|
|
11
|
+
};
|
|
12
|
+
export declare function isAssignableKind(kind: string): kind is AssignableShapeKind;
|
|
13
|
+
export declare function isStoreShapeKind(kind: string): boolean;
|
|
14
|
+
export declare function isRetailerAssigned(assignment: AssignmentLike | null | undefined): boolean;
|
|
15
|
+
export declare function isAmenityAssigned(assignment: AssignmentLike | null | undefined): boolean;
|
|
16
|
+
export declare function isKioskAssigned(assignment: AssignmentLike | null | undefined): boolean;
|
|
17
|
+
export declare function isPolygonAssigned(assignment: AssignmentLike | null | undefined): boolean;
|
|
18
|
+
export declare function assignmentByShapeId(assignments: AssignmentLike[]): Map<number, AssignmentLike>;
|
|
19
|
+
/** Assigned store / amenity / kiosk polygons, plus unassigned of each kind. */
|
|
20
|
+
export declare function railAssignmentGroups<T extends AssignableShape>(shapes: T[], assignments: AssignmentLike[]): {
|
|
21
|
+
stores: T[];
|
|
22
|
+
amenities: T[];
|
|
23
|
+
kiosks: T[];
|
|
24
|
+
unassignedStores: T[];
|
|
25
|
+
unassignedAmenities: T[];
|
|
26
|
+
unassignedKiosks: T[];
|
|
27
|
+
unassigned: T[];
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=railAssignments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"railAssignments.d.ts","sourceRoot":"","sources":["../../src/editor/railAssignments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEtE,eAAO,MAAM,sBAAsB,8DAKzB,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1E,MAAM,MAAM,cAAc,GAAG,IAAI,CAC/B,iBAAiB,EACjB,SAAS,GAAG,YAAY,GAAG,YAAY,GAAG,WAAW,GAAG,SAAS,CAClE,GAAG;IACF,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,mBAAmB,CAE1E;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,cAAc,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAIzF;AAED,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,cAAc,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAMxF;AAED,wBAAgB,eAAe,CAAC,UAAU,EAAE,cAAc,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAMtF;AAED,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,cAAc,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAExF;AAED,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,cAAc,EAAE,GAC5B,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAE7B;AAED,+EAA+E;AAC/E,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,eAAe,EAC5D,MAAM,EAAE,CAAC,EAAE,EACX,WAAW,EAAE,cAAc,EAAE,GAC5B;IACD,MAAM,EAAE,CAAC,EAAE,CAAC;IACZ,SAAS,EAAE,CAAC,EAAE,CAAC;IACf,MAAM,EAAE,CAAC,EAAE,CAAC;IACZ,gBAAgB,EAAE,CAAC,EAAE,CAAC;IACtB,mBAAmB,EAAE,CAAC,EAAE,CAAC;IACzB,gBAAgB,EAAE,CAAC,EAAE,CAAC;IACtB,UAAU,EAAE,CAAC,EAAE,CAAC;CACjB,CA+BA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { MapAssignKiosk } from '../core';
|
|
2
|
+
export type KioskShapeOption = {
|
|
3
|
+
id: number;
|
|
4
|
+
key: string;
|
|
5
|
+
kind: string;
|
|
6
|
+
orphanedAt?: string | null;
|
|
7
|
+
};
|
|
8
|
+
export type CatalogKioskAssignment = {
|
|
9
|
+
shapeId: number;
|
|
10
|
+
kioskId?: number | null;
|
|
11
|
+
};
|
|
12
|
+
export declare function isKioskScreenKind(kind: string): boolean;
|
|
13
|
+
export declare function kioskScreenShapes<T extends KioskShapeOption>(shapes: T[]): T[];
|
|
14
|
+
export declare function catalogKioskShapeOptions(shapes: KioskShapeOption[]): Array<{
|
|
15
|
+
value: string;
|
|
16
|
+
label: string;
|
|
17
|
+
}>;
|
|
18
|
+
export declare function shapeIdForCatalogKiosk(kioskId: number, assignments: CatalogKioskAssignment[]): number | null;
|
|
19
|
+
export declare function leftoverCatalogKiosks<T extends {
|
|
20
|
+
id: number;
|
|
21
|
+
}>(kiosks: T[], assignments: CatalogKioskAssignment[]): T[];
|
|
22
|
+
export declare function catalogKioskRowLabel(kiosk: MapAssignKiosk, assignedKey: string | null): {
|
|
23
|
+
title: string;
|
|
24
|
+
id: string;
|
|
25
|
+
tags: string[];
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=railKiosks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"railKiosks.d.ts","sourceRoot":"","sources":["../../src/editor/railKiosks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,gBAAgB,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAE9E;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,gBAAgB,EAAE,GACzB,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAKzC;AAED,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,sBAAsB,EAAE,GACpC,MAAM,GAAG,IAAI,CAEf;AAED,wBAAgB,qBAAqB,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,EAC5D,MAAM,EAAE,CAAC,EAAE,EACX,WAAW,EAAE,sBAAsB,EAAE,GACpC,CAAC,EAAE,CAOL;AAED,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,cAAc,EACrB,WAAW,EAAE,MAAM,GAAG,IAAI,GACzB;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,CAM/C"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** Title + tags for Map options shape lists (Stores, Amenities, …). */
|
|
2
|
+
export declare function railRowLabels(input: {
|
|
3
|
+
key: string;
|
|
4
|
+
kindLabel: string;
|
|
5
|
+
levelName: string;
|
|
6
|
+
assignedName?: string | null;
|
|
7
|
+
/** Kind tag is only for the Unassigned module (mixed types). */
|
|
8
|
+
showKindTag?: boolean;
|
|
9
|
+
}): {
|
|
10
|
+
title: string | null;
|
|
11
|
+
id: string;
|
|
12
|
+
tags: string[];
|
|
13
|
+
};
|
|
14
|
+
export declare const RAIL_ITEM_SECTIONS: readonly ["stores", "amenities", "kiosks", "unassigned", "escalators", "elevators"];
|
|
15
|
+
export type RailItemSection = (typeof RAIL_ITEM_SECTIONS)[number];
|
|
16
|
+
export declare function isRailItemSection(section: string | null): section is RailItemSection;
|
|
17
|
+
/** Third sidebar screen: field options for the selected list item. */
|
|
18
|
+
export declare function railShowsItemOptions(section: string | null, selectedCount: number): boolean;
|
|
19
|
+
type RailLevel = {
|
|
20
|
+
id: number;
|
|
21
|
+
kind: string;
|
|
22
|
+
ordering: number;
|
|
23
|
+
levelIndex: number;
|
|
24
|
+
};
|
|
25
|
+
/** Outdoor first, then the lowest building floor, then each floor above it. */
|
|
26
|
+
export declare function railListLevelOrder<T extends RailLevel>(levels: T[]): T[];
|
|
27
|
+
export declare function sortShapesByRailLevel<T extends {
|
|
28
|
+
levelId: number;
|
|
29
|
+
}>(shapes: T[], levels: RailLevel[]): T[];
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=railListCopy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"railListCopy.d.ts","sourceRoot":"","sources":["../../src/editor/railListCopy.ts"],"names":[],"mappings":"AAEA,uEAAuE;AACvE,wBAAgB,aAAa,CAAC,KAAK,EAAE;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,gEAAgE;IAChE,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,GAAG;IAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,CAKvD;AAED,eAAO,MAAM,kBAAkB,qFAOrB,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAElE,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,MAAM,GAAG,IAAI,GACrB,OAAO,IAAI,eAAe,CAK5B;AAED,sEAAsE;AACtE,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,MAAM,GAAG,IAAI,EACtB,aAAa,EAAE,MAAM,GACpB,OAAO,CAET;AAED,KAAK,SAAS,GAAG;IACf,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,+EAA+E;AAC/E,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,SAAS,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAIxE;AAED,wBAAgB,qBAAqB,CAAC,CAAC,SAAS;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,EACjE,MAAM,EAAE,CAAC,EAAE,EACX,MAAM,EAAE,SAAS,EAAE,GAClB,CAAC,EAAE,CASL"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { AnchorKind, BatchOp, CmAnchor, CmRouteEdge, CmShape, ShapeKind, Vec2 } from '../core';
|
|
2
|
+
export declare const WAYFINDING_SNAP_PX = 28;
|
|
3
|
+
/**
|
|
4
|
+
* One pick radius (CSS pixels) for wayfinding: the anchor dot, the + on a
|
|
5
|
+
* route, and click-to-connect. On-route and off-route use the same circle.
|
|
6
|
+
*/
|
|
7
|
+
export declare const WAYFINDING_ANCHOR_HIT_PX = 10;
|
|
8
|
+
export declare function showsWayfinding(tool: string, routeMode?: boolean): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* First empty Create Route click is a preview. A second click commits both
|
|
11
|
+
* ends. Leaving the tool drops the draft so a lone start is never kept.
|
|
12
|
+
*/
|
|
13
|
+
/** Esc and Undo share this: a lone preview start is local; anything else undoes. */
|
|
14
|
+
export declare function routeSessionUndoKind(session: {
|
|
15
|
+
routeDraftPoint: Vec2 | null;
|
|
16
|
+
storeLinkPreview: unknown;
|
|
17
|
+
}): 'clear-only' | 'clear-and-undo';
|
|
18
|
+
export declare function beginOrContinueRouteDraft(draft: Vec2 | null, world: Vec2): {
|
|
19
|
+
nextDraft: Vec2 | null;
|
|
20
|
+
start: Vec2 | null;
|
|
21
|
+
end: Vec2 | null;
|
|
22
|
+
};
|
|
23
|
+
/** Preview line from a started route/store-link to the cursor or snap. */
|
|
24
|
+
export declare function routeRubberBand(from: Vec2 | null | undefined, to: Vec2 | null | undefined): {
|
|
25
|
+
from: Vec2;
|
|
26
|
+
to: Vec2;
|
|
27
|
+
} | null;
|
|
28
|
+
export declare function isWayfindingShape(kind: ShapeKind): boolean;
|
|
29
|
+
/** Outdoor pad sites are not routed — helpers and store links stay indoor. */
|
|
30
|
+
export declare function wayfindingLinksShapes(level: {
|
|
31
|
+
kind?: string;
|
|
32
|
+
} | null | undefined): boolean;
|
|
33
|
+
export declare function anchorKindForShape(kind: ShapeKind): AnchorKind;
|
|
34
|
+
export declare function shapeRoutePoint(shape: Pick<CmShape, 'geometry'>): Vec2;
|
|
35
|
+
export declare function shapeRouteAnchor(shapeId: number, anchors: Array<Pick<CmAnchor, 'id' | 'shapeId'>>): Pick<CmAnchor, 'id' | 'shapeId'> | undefined;
|
|
36
|
+
export declare function anchorHasEdge(anchorId: number, edges: Array<Pick<CmRouteEdge, 'fromAnchorId' | 'toAnchorId'>>): boolean;
|
|
37
|
+
export declare function walkEdgeExists(edges: Array<Pick<CmRouteEdge, 'fromAnchorId' | 'toAnchorId'>>, a: number, b: number): boolean;
|
|
38
|
+
export type RouteSnapTarget = {
|
|
39
|
+
type: 'junction';
|
|
40
|
+
anchorId: number;
|
|
41
|
+
point: Vec2;
|
|
42
|
+
distance: number;
|
|
43
|
+
} | {
|
|
44
|
+
type: 'edge';
|
|
45
|
+
edgeId: number;
|
|
46
|
+
fromAnchorId: number;
|
|
47
|
+
toAnchorId: number;
|
|
48
|
+
point: Vec2;
|
|
49
|
+
distance: number;
|
|
50
|
+
};
|
|
51
|
+
/** The orange point we are linking from — not every destination on that store. */
|
|
52
|
+
export declare function storeLinkOriginIds(anchors: Array<Pick<CmAnchor, 'id' | 'shapeId' | 'x' | 'y'>>, preview: {
|
|
53
|
+
shapeId: number;
|
|
54
|
+
origin: Vec2;
|
|
55
|
+
} | null | undefined): Set<number>;
|
|
56
|
+
/**
|
|
57
|
+
* Nearest route point or edge within `maxDist` (same circular hit on and off
|
|
58
|
+
* the path). An existing anchor wins only when the cursor is inside that
|
|
59
|
+
* circle; otherwise a mid-edge hit stays a split so the + can sit close to
|
|
60
|
+
* a neighboring point.
|
|
61
|
+
*/
|
|
62
|
+
export declare function nearestRouteSnap(point: Vec2, anchors: CmAnchor[], edges: CmRouteEdge[], excludeIds: ReadonlySet<number>, maxDist: number, anchorById?: ReadonlyMap<number, CmAnchor>): RouteSnapTarget | null;
|
|
63
|
+
export interface ConnectShapeToRouteInput {
|
|
64
|
+
shape: CmShape;
|
|
65
|
+
anchors: CmAnchor[];
|
|
66
|
+
edges: CmRouteEdge[];
|
|
67
|
+
mapId: number;
|
|
68
|
+
from: Vec2;
|
|
69
|
+
drop: Vec2;
|
|
70
|
+
maxDist: number;
|
|
71
|
+
allocId: () => number;
|
|
72
|
+
}
|
|
73
|
+
/** Create a store/amenity route point at the click. Another click elsewhere adds another. */
|
|
74
|
+
export declare function ensureShapeRouteAnchorOps(input: {
|
|
75
|
+
shape: CmShape;
|
|
76
|
+
anchors: CmAnchor[];
|
|
77
|
+
allocId: () => number;
|
|
78
|
+
point?: Vec2;
|
|
79
|
+
}): {
|
|
80
|
+
ops: BatchOp[];
|
|
81
|
+
anchorId: number;
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Ensure the shape has a destination anchor, then hook it to the walking path
|
|
85
|
+
* at `drop` (existing junction or a split in a walk edge).
|
|
86
|
+
*/
|
|
87
|
+
export declare function connectShapeToRouteOps(input: ConnectShapeToRouteInput): BatchOp[];
|
|
88
|
+
export declare function linkRouteAnchorsOp(mapId: number, fromAnchorId: number, toAnchorId: number, edges: Array<Pick<CmRouteEdge, 'fromAnchorId' | 'toAnchorId'>>, allocId: () => number): BatchOp | null;
|
|
89
|
+
export declare function insertJunctionOnWalkEdgeOps(input: {
|
|
90
|
+
levelId: number;
|
|
91
|
+
mapId: number;
|
|
92
|
+
edge: CmRouteEdge;
|
|
93
|
+
point: Vec2;
|
|
94
|
+
allocId: () => number;
|
|
95
|
+
}): {
|
|
96
|
+
ops: BatchOp[];
|
|
97
|
+
junctionId: number;
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* Remove a route point. A 2-way corridor is healed so the path stays joined.
|
|
101
|
+
*/
|
|
102
|
+
export declare function deleteRouteAnchorOps(anchorId: number, mapId: number, edges: CmRouteEdge[], allocId: () => number): BatchOp[];
|
|
103
|
+
//# sourceMappingURL=routeStubs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routeStubs.d.ts","sourceRoot":"","sources":["../../src/editor/routeStubs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,OAAO,EACP,QAAQ,EACR,WAAW,EACX,OAAO,EACP,SAAS,EACT,IAAI,EACL,MAAM,SAAS,CAAC;AAUjB,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC;;;GAGG;AACH,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAE3C,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,UAAQ,GAAG,OAAO,CASxE;AAED;;;GAGG;AACH,oFAAoF;AACpF,wBAAgB,oBAAoB,CAAC,OAAO,EAAE;IAC5C,eAAe,EAAE,IAAI,GAAG,IAAI,CAAC;IAC7B,gBAAgB,EAAE,OAAO,CAAC;CAC3B,GAAG,YAAY,GAAG,gBAAgB,CAKlC;AAED,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,IAAI,GAAG,IAAI,EAClB,KAAK,EAAE,IAAI,GACV;IAAE,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IAAC,KAAK,EAAE,IAAI,GAAG,IAAI,CAAC;IAAC,GAAG,EAAE,IAAI,GAAG,IAAI,CAAA;CAAE,CAGlE;AAED,0EAA0E;AAC1E,wBAAgB,eAAe,CAC7B,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,EAC7B,EAAE,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,GAC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AAE,CAmBvC;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,EAAE,CAsEjF;AAED,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,GAAG,YAAY,CAAC,CAAC,EAC9D,OAAO,EAAE,MAAM,MAAM,GACpB,OAAO,GAAG,IAAI,CAOhB;AAED,wBAAgB,2BAA2B,CAAC,KAAK,EAAE;IACjD,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,WAAW,CAAC;IAClB,KAAK,EAAE,IAAI,CAAC;IACZ,OAAO,EAAE,MAAM,MAAM,CAAC;CACvB,GAAG;IAAE,GAAG,EAAE,OAAO,EAAE,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CA6BzC;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,WAAW,EAAE,EACpB,OAAO,EAAE,MAAM,MAAM,GACpB,OAAO,EAAE,CA4BX"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { BatchOp, CmShape, CmShapeAssignment, ShapeGeometry } from '../core';
|
|
2
|
+
/** No 0/O/1/I/L — keeps IDs short and easy to read. */
|
|
3
|
+
export declare const SHAPE_KEY_ALPHABET = "abcdefghjkmnpqrstuvwxyz23456789";
|
|
4
|
+
export declare const SHAPE_KEY_SUFFIX_LENGTH = 4;
|
|
5
|
+
export declare function shapeKeyPrefix(kind: string): string;
|
|
6
|
+
export declare function randomShapeKeySuffix(length?: number): string;
|
|
7
|
+
/** True for the short IDs we mint (`unit-k4n8`), not SVG ids like `unit-101`. */
|
|
8
|
+
export declare function isAllocatedShapeKey(key: string): boolean;
|
|
9
|
+
export declare function liveShapeKeysOnLevel(shapes: Array<{
|
|
10
|
+
levelId: number;
|
|
11
|
+
key: string;
|
|
12
|
+
orphanedAt?: string | null;
|
|
13
|
+
}>, levelId: number): string[];
|
|
14
|
+
export declare function copyDestinationLevels<T extends {
|
|
15
|
+
id: number;
|
|
16
|
+
}>(levels: T[], currentLevelId: number): T[];
|
|
17
|
+
/**
|
|
18
|
+
* Mint a short unique key for a new or copied shape.
|
|
19
|
+
* `suffix` is injectable so tests can pin the random part.
|
|
20
|
+
*/
|
|
21
|
+
export declare function allocShapeKey(kind: string, taken: Iterable<string>, suffix?: () => string): string;
|
|
22
|
+
export declare function cloneShapeGeometry(geometry: ShapeGeometry): ShapeGeometry;
|
|
23
|
+
export declare function copyShapeToLevelOps(args: {
|
|
24
|
+
shape: CmShape;
|
|
25
|
+
assignment?: CmShapeAssignment | null;
|
|
26
|
+
targetLevelId: number;
|
|
27
|
+
shapes: Array<{
|
|
28
|
+
id: number;
|
|
29
|
+
levelId: number;
|
|
30
|
+
key: string;
|
|
31
|
+
orphanedAt?: string | null;
|
|
32
|
+
}>;
|
|
33
|
+
allocId: () => number;
|
|
34
|
+
allocKey?: (kind: string, taken: Iterable<string>) => string;
|
|
35
|
+
}): {
|
|
36
|
+
ops: BatchOp[];
|
|
37
|
+
shapeId: number;
|
|
38
|
+
key: string;
|
|
39
|
+
} | null;
|
|
40
|
+
//# sourceMappingURL=shapeCopy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shapeCopy.d.ts","sourceRoot":"","sources":["../../src/editor/shapeCopy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,OAAO,EACP,iBAAiB,EACjB,aAAa,EAEd,MAAM,SAAS,CAAC;AAuBjB,uDAAuD;AACvD,eAAO,MAAM,kBAAkB,oCAAoC,CAAC;AACpE,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAEzC,wBAAgB,cAAc,CAAC,IAAI,EAA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CAAC;CAC9D,GAAG;IAAE,GAAG,EAAE,OAAO,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAgC1D"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type ShapeSelectOpts = {
|
|
2
|
+
additive?: boolean;
|
|
3
|
+
};
|
|
4
|
+
/** Plain click replaces; Shift-click toggles the id in the set. */
|
|
5
|
+
export declare function nextSelectedShapeIds(current: number[], id: number | null, opts?: ShapeSelectOpts): number[];
|
|
6
|
+
//# sourceMappingURL=shapeSelection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shapeSelection.d.ts","sourceRoot":"","sources":["../../src/editor/shapeSelection.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAErD,mEAAmE;AACnE,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,MAAM,EAAE,EACjB,EAAE,EAAE,MAAM,GAAG,IAAI,EACjB,IAAI,CAAC,EAAE,eAAe,GACrB,MAAM,EAAE,CAKV"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Vec2 } from '../core';
|
|
2
|
+
/** Closest candidate within `tol` world units, or null. */
|
|
3
|
+
export declare function nearestSnapPoint(point: Vec2, candidates: Vec2[], tol: number): Vec2 | null;
|
|
4
|
+
export declare function sameSnapPoint(a: Vec2 | null, b: Vec2 | null, eps?: number): boolean;
|
|
5
|
+
//# sourceMappingURL=snapPoint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snapPoint.d.ts","sourceRoot":"","sources":["../../src/editor/snapPoint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAEpC,2DAA2D;AAC3D,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,IAAI,EACX,UAAU,EAAE,IAAI,EAAE,EAClB,GAAG,EAAE,MAAM,GACV,IAAI,GAAG,IAAI,CASb;AAED,wBAAgB,aAAa,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,GAAG,SAAO,GAAG,OAAO,CAGjF"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { ShapeGeometry, ShapeKind, ShapeStyle, Vec2 } from '../core';
|
|
2
|
+
export type OpenEndId = {
|
|
3
|
+
shapeId: number;
|
|
4
|
+
ringIndex: number;
|
|
5
|
+
end: 'start' | 'end';
|
|
6
|
+
};
|
|
7
|
+
export type OpenEndHit = OpenEndId & {
|
|
8
|
+
point: Vec2;
|
|
9
|
+
distance: number;
|
|
10
|
+
};
|
|
11
|
+
export type SplitJoinEdgeHit = {
|
|
12
|
+
shapeId: number;
|
|
13
|
+
ringIndex: number;
|
|
14
|
+
edgeIndex: number;
|
|
15
|
+
point: Vec2;
|
|
16
|
+
shared: boolean;
|
|
17
|
+
distance: number;
|
|
18
|
+
};
|
|
19
|
+
export type ShapeGeo = {
|
|
20
|
+
id: number;
|
|
21
|
+
kind: ShapeKind;
|
|
22
|
+
style?: ShapeStyle;
|
|
23
|
+
geometry: ShapeGeometry;
|
|
24
|
+
};
|
|
25
|
+
export type ShapeBatchEdit = {
|
|
26
|
+
action: 'update';
|
|
27
|
+
shapeId: number;
|
|
28
|
+
geometry: ShapeGeometry;
|
|
29
|
+
} | {
|
|
30
|
+
action: 'create';
|
|
31
|
+
kind: ShapeKind;
|
|
32
|
+
geometry: ShapeGeometry;
|
|
33
|
+
style?: ShapeStyle;
|
|
34
|
+
} | {
|
|
35
|
+
action: 'delete';
|
|
36
|
+
shapeId: number;
|
|
37
|
+
};
|
|
38
|
+
export declare function canSplitJoinKind(kind: ShapeKind): boolean;
|
|
39
|
+
export declare function sameOpenEnd(a: OpenEndId, b: OpenEndId): boolean;
|
|
40
|
+
export declare function listOpenEnds(geometry: ShapeGeometry): Array<{
|
|
41
|
+
ringIndex: number;
|
|
42
|
+
end: 'start' | 'end';
|
|
43
|
+
point: Vec2;
|
|
44
|
+
}>;
|
|
45
|
+
export declare function edgeLiesOnOtherShape(from: Vec2, to: Vec2, others: Array<{
|
|
46
|
+
geometry: ShapeGeometry;
|
|
47
|
+
}>, tol?: number): boolean;
|
|
48
|
+
export declare function openWholeEdge(geometry: ShapeGeometry, ringIndex: number, edgeIndex: number): ShapeGeometry;
|
|
49
|
+
export declare function cutEdgeOpen(geometry: ShapeGeometry, ringIndex: number, edgeIndex: number, point: Vec2, gap: number): ShapeGeometry;
|
|
50
|
+
export declare function joinOpenEndpoints(geometry: ShapeGeometry, a: {
|
|
51
|
+
ringIndex: number;
|
|
52
|
+
end: 'start' | 'end';
|
|
53
|
+
}, b: {
|
|
54
|
+
ringIndex: number;
|
|
55
|
+
end: 'start' | 'end';
|
|
56
|
+
}, tol?: number): ShapeGeometry;
|
|
57
|
+
export declare function weldCoincidentOpenEnds(shapes: ShapeGeo[], tol?: number): {
|
|
58
|
+
shapes: ShapeGeo[];
|
|
59
|
+
deleteIds: number[];
|
|
60
|
+
};
|
|
61
|
+
export declare function forkClosedRings(shape: ShapeGeo): {
|
|
62
|
+
keep: ShapeGeo;
|
|
63
|
+
extras: ShapeGeometry[];
|
|
64
|
+
};
|
|
65
|
+
export declare function applySplitJoinCut(shapes: ShapeGeo[], hit: {
|
|
66
|
+
shapeId: number;
|
|
67
|
+
ringIndex: number;
|
|
68
|
+
edgeIndex: number;
|
|
69
|
+
point: Vec2;
|
|
70
|
+
}, gap: number): ShapeBatchEdit[];
|
|
71
|
+
export declare function applySplitJoinJoin(shapes: ShapeGeo[], a: OpenEndId, b: OpenEndId): ShapeBatchEdit[];
|
|
72
|
+
export declare function hitOpenEnd(shapes: ShapeGeo[], point: Vec2, tol: number, skip?: OpenEndId | null): OpenEndHit | null;
|
|
73
|
+
export declare function hitSplitJoinEdge(shapes: ShapeGeo[], point: Vec2, tol: number): SplitJoinEdgeHit | null;
|
|
74
|
+
export declare function previewCutPoints(geometry: ShapeGeometry, ringIndex: number, edgeIndex: number, point: Vec2, gap: number): {
|
|
75
|
+
p1: Vec2;
|
|
76
|
+
p2: Vec2;
|
|
77
|
+
} | null;
|
|
78
|
+
//# sourceMappingURL=splitJoin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"splitJoin.d.ts","sourceRoot":"","sources":["../../src/editor/splitJoin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAmB1E,MAAM,MAAM,SAAS,GAAG;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,OAAO,GAAG,KAAK,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG;IAAE,KAAK,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,IAAI,CAAC;IACZ,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,QAAQ,EAAE,aAAa,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,cAAc,GACtB;IAAE,MAAM,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,aAAa,CAAA;CAAE,GAC9D;IACE,MAAM,E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CAAA;CAAE,GAAG,IAAI,CAY/B"}
|
package/dist/editor/tools.d.ts
CHANGED
|
@@ -1,20 +1,59 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
export type EditorTool = 'select' | 'pan' | 'draw-unit' | 'draw-polygon' | 'draw-
|
|
2
|
+
export type EditorTool = 'select' | 'pan' | 'draw-unit' | 'draw-polygon' | 'draw-circle' | 'draw-void' | 'draw-void-circle' | 'curve' | 'split-join' | 'draw-text' | 'draw-entrance' | 'draw-route' | 'create-route' | 'create-route-multi';
|
|
3
3
|
export declare const EDITOR_TOOLS: Array<{
|
|
4
4
|
id: EditorTool;
|
|
5
5
|
label: string;
|
|
6
6
|
draw?: boolean;
|
|
7
|
+
/** Route tools sit after a separator, apart from shape tools. */
|
|
8
|
+
group?: 'map' | 'route';
|
|
9
|
+
/** When set, the label is shown beside the icon instead of only as a tooltip. */
|
|
10
|
+
caption?: string;
|
|
11
|
+
/** Draw a toolbar separator immediately before this tool. */
|
|
12
|
+
sepBefore?: boolean;
|
|
7
13
|
}>;
|
|
8
|
-
export declare function
|
|
14
|
+
export declare function isRouteTool(tool: string): boolean;
|
|
15
|
+
/** Empty-canvas clicks start a new path with Create Route or Multi Route. */
|
|
16
|
+
export declare function canPlaceNewRoute(tool: string): boolean;
|
|
17
|
+
/** Multi Route keeps adding segments until Esc or another tool. */
|
|
18
|
+
export declare function canChainRoute(tool: string): boolean;
|
|
19
|
+
/** After a segment is committed, keep the end only for Multi Route. */
|
|
20
|
+
export declare function nextRouteChainAnchor(tool: string, endAnchorId: number | null | undefined): number | null;
|
|
21
|
+
/** Select and Curve can click a shape to make it the edit target. */
|
|
22
|
+
export declare function canSelectShapes(tool: EditorTool): boolean;
|
|
23
|
+
export declare function isSplitJoinTool(tool: EditorTool): boolean;
|
|
24
|
+
/** Click-to-place closed polygons — stores or atrium openings. */
|
|
25
|
+
export declare function isPolygonDrawTool(tool: EditorTool): boolean;
|
|
26
|
+
/** Click-drag oval / circle — stores or Open to Below. */
|
|
27
|
+
export declare function isEllipseDrawTool(tool: EditorTool): boolean;
|
|
28
|
+
/** Rectangle, polygon, circle, and Open to Below — plus cursor for placement. */
|
|
29
|
+
export declare function isShapeDrawTool(tool: EditorTool): boolean;
|
|
30
|
+
/** Click-to-place text or entrance stamps. */
|
|
31
|
+
export declare function isStampDrawTool(tool: EditorTool): boolean;
|
|
32
|
+
/** Click two open ends to join them — Select after a split, or Split / Join. */
|
|
33
|
+
export declare function canJoinOpenEnds(tool: EditorTool): boolean;
|
|
34
|
+
/** Corner anchors — Select, Curve, and Split / Join. */
|
|
35
|
+
export declare function showsShapeAnchors(tool: EditorTool): boolean;
|
|
36
|
+
/** Midpoint bend dots and cubic handles — only the Curve tool. */
|
|
37
|
+
export declare function showsCurveHandles(tool: EditorTool): boolean;
|
|
38
|
+
/** Empty-canvas drag pans in Select, Curve, Pan, and Wayfinding edit. */
|
|
39
|
+
export declare function emptyCanvasDragPans(tool: EditorTool): boolean;
|
|
40
|
+
/** Create Route or Multi Route again returns to Select. */
|
|
41
|
+
export declare function nextEditorTool(current: EditorTool, next: EditorTool): EditorTool;
|
|
42
|
+
export declare function toolHint(tool: EditorTool, group?: 'map' | 'route'): string;
|
|
9
43
|
export interface EditorToolButtonsProps {
|
|
10
44
|
tool: EditorTool;
|
|
11
45
|
onToolChange: (tool: EditorTool) => void;
|
|
12
46
|
canEdit: boolean;
|
|
47
|
+
/** Omit to show every tool. PORTAL Edit Map is `map`; Wayfinding is `route`. */
|
|
48
|
+
group?: 'map' | 'route';
|
|
13
49
|
}
|
|
14
|
-
export declare function EditorToolButtons({ tool, onToolChange, canEdit, }: EditorToolButtonsProps): React.JSX.Element;
|
|
15
|
-
export interface
|
|
16
|
-
|
|
17
|
-
|
|
50
|
+
export declare function EditorToolButtons({ tool, onToolChange, canEdit, group, }: EditorToolButtonsProps): React.JSX.Element;
|
|
51
|
+
export interface EditorHistoryButtonsProps {
|
|
52
|
+
canUndo: boolean;
|
|
53
|
+
canRedo: boolean;
|
|
54
|
+
disabled?: boolean;
|
|
55
|
+
onUndo: () => void;
|
|
56
|
+
onRedo: () => void;
|
|
18
57
|
}
|
|
19
|
-
export declare function
|
|
58
|
+
export declare function EditorHistoryButtons({ canUndo, canRedo, disabled, onUndo, onRedo, }: EditorHistoryButtonsProps): React.JSX.Element;
|
|
20
59
|
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/editor/tools.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,MAAM,UAAU,GAClB,QAAQ,GACR,KAAK,GACL,WAAW,GACX,cAAc,GACd,WAAW,GACX,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/editor/tools.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,MAAM,UAAU,GAClB,QAAQ,GACR,KAAK,GACL,WAAW,GACX,cAAc,GACd,aAAa,GACb,WAAW,GACX,kBAAkB,GAClB,OAAO,GACP,YAAY,GACZ,WAAW,GACX,eAAe,GACf,YAAY,GACZ,cAAc,GACd,oBAAoB,CAAC;AAEzB,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC;IAC/B,EAAE,EAAE,UAAU,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,iEAAiE;IACjE,KAAK,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC;IACxB,iFAAiF;IACjF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6DAA6D;IAC7D,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAyCA,CAAC;AAEF,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAMjD;AAED,6EAA6E;AAC7E,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,M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,WAAW,sBAAsB;IACrC,IAAI,EAAE,UAAU,CAAC;IACjB,YAAY,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;IACzC,OAAO,EAAE,OAAO,CAAC;IACjB,gFAAgF;IAChF,KAAK,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC;CACzB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,IAAI,EACJ,YAAY,EACZ,OAAO,EACP,KAAK,GACN,EAAE,sBAAsB,qBAkDxB;AAED,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,wBAAgB,oBAAoB,CAAC,EACnC,OAAO,EACP,OAAO,EACP,QAAgB,EAChB,MAAM,EACN,MAAM,GACP,EAAE,yBAAyB,qBAyB3B"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** CSS family — same Montserrat as admin-portal / Edit Map chrome. */
|
|
2
|
+
export declare const MAP_FONT_FAMILY = "Montserrat, sans-serif";
|
|
3
|
+
/** Shared by Edit Map SVG tspans and default-map troika `<Text>`. */
|
|
4
|
+
export declare const MAP_LABEL_LINE_HEIGHT = 1.15;
|
|
5
|
+
//# sourceMappingURL=mapFont.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapFont.d.ts","sourceRoot":"","sources":["../../src/fonts/mapFont.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,eAAO,MAAM,eAAe,2BAA2B,CAAC;AAExD,qEAAqE;AACrE,eAAO,MAAM,qBAAqB,OAAO,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Troika (drei `<Text>`) cannot use CSS `font-family`; it needs a font file.
|
|
3
|
+
* Latin 400 WOFF, same face as `@fontsource/montserrat` / admin-portal.
|
|
4
|
+
*/
|
|
5
|
+
export declare const MAP_FONT_URL: string;
|
|
6
|
+
/** Register Montserrat so SVG + canvas measurement match the 3D overlay. */
|
|
7
|
+
export declare function ensureMapFont(): void;
|
|
8
|
+
//# sourceMappingURL=mapFontUrl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapFontUrl.d.ts","sourceRoot":"","sources":["../../src/fonts/mapFontUrl.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,YAAY,QAAa,CAAC;AAIvC,4EAA4E;AAC5E,wBAAgB,aAAa,IAAI,IAAI,CASpC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { AllAmenities, AssignAmenities, getAmenityByType, getMapSpecialSvg, isAssignAmenity, mapSpecialSvgToDataUrl, recolorMapSvg } from '../../threejs-map/src/amenities.ts';
|
|
2
|
+
import { CmAmenityCatalogItem, CmShapeAssignment } from './core';
|
|
3
|
+
export { AllAmenities, AssignAmenities, getAmenityByType, isAssignAmenity, getMapSpecialSvg, mapSpecialSvgToDataUrl, recolorMapSvg, };
|
|
4
|
+
export declare function entranceIconDataUrl(color?: string | null): string | undefined;
|
|
5
|
+
/** v1 amenity list for the assign dropdown — elevator / escalator are separate modules. */
|
|
6
|
+
export declare function amenityAssignOptions(): {
|
|
7
|
+
value: string;
|
|
8
|
+
label: string;
|
|
9
|
+
}[];
|
|
10
|
+
export declare function amenityTypeFromCatalogId(amenityId: number | null | undefined, amenities: CmAmenityCatalogItem[]): string;
|
|
11
|
+
export declare function amenityCatalogIdForType(type: string, amenities: CmAmenityCatalogItem[]): number | null;
|
|
12
|
+
export declare function assignmentSpecialIconDataUrl(assignment: CmShapeAssignment | null | undefined, amenities: Array<{
|
|
13
|
+
id: number;
|
|
14
|
+
code: string;
|
|
15
|
+
}>, color?: string | null): string | undefined;
|
|
16
|
+
export type ConnectorSpecialKind = 'escalator' | 'elevator';
|
|
17
|
+
/** Escalator / elevator SVG ids from the floor file (`escalator-5-up-start`). */
|
|
18
|
+
export declare function connectorSpecialKind(shape: {
|
|
19
|
+
key: string;
|
|
20
|
+
sourceSvgId?: string | null;
|
|
21
|
+
}): ConnectorSpecialKind | null;
|
|
22
|
+
export declare function connectorSpecialIconDataUrl(kind: ConnectorSpecialKind, assigned: boolean, color?: string | null): string | undefined;
|
|
23
|
+
/** Landings that belong to a linked escalator ride / elevator shaft. */
|
|
24
|
+
export declare function assignedConnectorShapeIds(anchors: Array<{
|
|
25
|
+
shapeId?: number | null;
|
|
26
|
+
connectorId?: number | null;
|
|
27
|
+
}>): Set<number>;
|
|
28
|
+
/**
|
|
29
|
+
* Map overlay: only a linked landing gets an icon. Unassigned escalators
|
|
30
|
+
* (and elevators) stay as empty polygons so the floor is not covered in gray
|
|
31
|
+
* markers.
|
|
32
|
+
*/
|
|
33
|
+
export declare function connectorMapIconKind(shape: {
|
|
34
|
+
id: number;
|
|
35
|
+
key: string;
|
|
36
|
+
sourceSvgId?: string | null;
|
|
37
|
+
orphanedAt?: string | Date | null;
|
|
38
|
+
}, assignedShapeIds: Set<number>): ConnectorSpecialKind | null;
|
|
39
|
+
//# sourceMappingURL=specialIcons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"specialIcons.d.ts","sourceRoot":"","sources":["../src/specialIcons.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACL,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,sBAAsB,EACtB,aAAa,EACd,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAGtE,OAAO,EACL,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,sBAAsB,EACtB,aAAa,GACd,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,KAAK,C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