@ray-js/robot-map-sdk 0.0.16-beta.9 → 0.0.17-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/dist/constant/methods.js +1 -1
  2. package/dist/index.d.ts +141 -2
  3. package/dist/index.rjs.js +1 -1
  4. package/dist-app/assets/index-BhBznOX2.js +1 -0
  5. package/dist-app/index.html +1 -1
  6. package/dist-docs/404.html +2 -2
  7. package/dist-docs/adr/0001-threshold-mirrors-virtual-wall.html +25 -0
  8. package/dist-docs/adr/0002-threshold-edit-surface-quad-family.html +25 -0
  9. package/dist-docs/agents/domain.html +3 -3
  10. package/dist-docs/agents/issue-tracker.html +3 -3
  11. package/dist-docs/agents/triage-labels.html +3 -3
  12. package/dist-docs/assets/adr_0001-threshold-mirrors-virtual-wall.md.BGtyf9GS.js +1 -0
  13. package/dist-docs/assets/adr_0001-threshold-mirrors-virtual-wall.md.BGtyf9GS.lean.js +1 -0
  14. package/dist-docs/assets/adr_0002-threshold-edit-surface-quad-family.md.BlvHYJT5.js +1 -0
  15. package/dist-docs/assets/adr_0002-threshold-edit-surface-quad-family.md.BlvHYJT5.lean.js +1 -0
  16. package/dist-docs/assets/{app.B8hs7_X-.js → app.tuTOhCpg.js} +1 -1
  17. package/dist-docs/assets/chunks/@localSearchIndexroot.7eWxrBA2.js +1 -0
  18. package/dist-docs/assets/chunks/{BitmapFont.DLy0SZnT.js → BitmapFont.Bn4Xj5K-.js} +1 -1
  19. package/dist-docs/assets/chunks/{BufferResource.BFWw7m1Q.js → BufferResource.DTCsTJzt.js} +1 -1
  20. package/dist-docs/assets/chunks/{CanvasRenderer.Bc_dThoq.js → CanvasRenderer.DflYBGLD.js} +1 -1
  21. package/dist-docs/assets/chunks/{RenderTargetSystem.BOdX2jvG.js → RenderTargetSystem.DBrMOqFS.js} +1 -1
  22. package/dist-docs/assets/chunks/{VPLocalSearchBox.6OPr0A3R.js → VPLocalSearchBox.D4ShZjav.js} +1 -1
  23. package/dist-docs/assets/chunks/{WebGLRenderer.hhgrJQl3.js → WebGLRenderer.CmlR6hDG.js} +1 -1
  24. package/dist-docs/assets/chunks/{WebGPURenderer.BAD7ncFI.js → WebGPURenderer.C7Xo_Nj6.js} +1 -1
  25. package/dist-docs/assets/chunks/{browserAll.D3TQ4Ojs.js → browserAll.CIjY9VGZ.js} +1 -1
  26. package/dist-docs/assets/chunks/index.BCZVCQiT.js +744 -0
  27. package/dist-docs/assets/chunks/theme.BwMYfKet.js +4 -0
  28. package/dist-docs/assets/chunks/{webworkerAll.BKEKVYer.js → webworkerAll.rjNztTjs.js} +1 -1
  29. package/dist-docs/assets/{guide_advanced-usage.md.B1LO3kNP.js → guide_advanced-usage.md.dxD8u9v3.js} +75 -3
  30. package/dist-docs/assets/{guide_advanced-usage.md.B1LO3kNP.lean.js → guide_advanced-usage.md.dxD8u9v3.lean.js} +1 -1
  31. package/dist-docs/assets/{guide_getting-started.md.RnJcv_dw.js → guide_getting-started.md.DcbNPHUc.js} +1 -1
  32. package/dist-docs/assets/reference_callbacks.md.Cm_LNx97.js +33 -0
  33. package/dist-docs/assets/{reference_callbacks.md.4Y7lqLLW.lean.js → reference_callbacks.md.Cm_LNx97.lean.js} +1 -1
  34. package/dist-docs/assets/{reference_config.md.Dr5HxVZt.js → reference_config.md.DpjGhNQS.js} +3 -3
  35. package/dist-docs/assets/reference_config.md.DpjGhNQS.lean.js +1 -0
  36. package/dist-docs/assets/{reference_data.md.C3E1VcWx.js → reference_data.md.DL6rfzez.js} +15 -3
  37. package/dist-docs/assets/{reference_data.md.C3E1VcWx.lean.js → reference_data.md.DL6rfzez.lean.js} +1 -1
  38. package/dist-docs/assets/{reference_methods.md.CxMQMj53.js → reference_methods.md.yWEfqPKf.js} +3 -3
  39. package/dist-docs/assets/{reference_methods.md.CxMQMj53.lean.js → reference_methods.md.yWEfqPKf.lean.js} +1 -1
  40. package/dist-docs/assets/reference_runtime.md.CE2QTAiD.js +20 -0
  41. package/dist-docs/assets/{reference_runtime.md.CX2K6JLY.lean.js → reference_runtime.md.CE2QTAiD.lean.js} +1 -1
  42. package/dist-docs/assets/{reference_types.md.Btpi6Kd9.js → reference_types.md.ZQU03iAA.js} +15 -2
  43. package/dist-docs/assets/reference_types.md.ZQU03iAA.lean.js +1 -0
  44. package/dist-docs/guide/advanced-usage.html +78 -6
  45. package/dist-docs/guide/concepts.html +3 -3
  46. package/dist-docs/guide/getting-started.html +5 -5
  47. package/dist-docs/guide/mcp.html +3 -3
  48. package/dist-docs/guide/spot-room-binding.html +3 -3
  49. package/dist-docs/hashmap.json +1 -1
  50. package/dist-docs/index.html +3 -3
  51. package/dist-docs/plans/2026-03-04-detected-objects-visibility-design.html +3 -3
  52. package/dist-docs/plans/2026-03-04-show-detected-objects-implementation-plan.html +3 -3
  53. package/dist-docs/plans/2026-03-10-simulator-debug-design.html +3 -3
  54. package/dist-docs/plans/2026-03-10-simulator-events-console-design.html +3 -3
  55. package/dist-docs/plans/2026-03-10-simulator-events-console-implementation-plan.html +3 -3
  56. package/dist-docs/plans/2026-03-10-simulator-runtime-controls-design.html +3 -3
  57. package/dist-docs/plans/2026-03-10-simulator-runtime-controls-implementation-plan.html +3 -3
  58. package/dist-docs/plans/2026-03-10-testing-rollout-next-steps-plan.html +3 -3
  59. package/dist-docs/plans/2026-03-11-simulator-logger-dump-implementation-plan.html +3 -3
  60. package/dist-docs/reference/callbacks.html +5 -5
  61. package/dist-docs/reference/config.html +6 -6
  62. package/dist-docs/reference/data.html +18 -6
  63. package/dist-docs/reference/methods.html +6 -6
  64. package/dist-docs/reference/runtime.html +5 -5
  65. package/dist-docs/reference/types.html +18 -5
  66. package/dist-docs/reference/utils.html +3 -3
  67. package/dist-docs/simulator/index.html +3 -3
  68. package/package.json +1 -1
  69. package/dist-app/assets/index-ZtQQb8gt.js +0 -1
  70. package/dist-docs/assets/chunks/@localSearchIndexroot.CHVWB7VI.js +0 -1
  71. package/dist-docs/assets/chunks/index.D_0j0U-Y.js +0 -744
  72. package/dist-docs/assets/chunks/theme.DDBFso_7.js +0 -4
  73. package/dist-docs/assets/reference_callbacks.md.4Y7lqLLW.js +0 -33
  74. package/dist-docs/assets/reference_config.md.Dr5HxVZt.lean.js +0 -1
  75. package/dist-docs/assets/reference_runtime.md.CX2K6JLY.js +0 -20
  76. package/dist-docs/assets/reference_types.md.Btpi6Kd9.lean.js +0 -1
  77. /package/dist-docs/assets/{guide_getting-started.md.RnJcv_dw.lean.js → guide_getting-started.md.DcbNPHUc.lean.js} +0 -0
@@ -1 +1 @@
1
- const e=["areRoomsAdjacent","getForbiddenSweepZones","getForbiddenMopZones","getCleanZones","getVirtualWalls","getSpots","getRoomAnchors","getWayPoints","getViewportCenterPoint","getMapCenterPoint","getWallPointsByViewportCenter","getForbiddenSweepZonePointsByViewportCenter","getForbiddenMopZonePointsByViewportCenter","getCleanZonePointsByViewportCenter","getSpotPointByViewportCenter","getEffectiveDividerPoints","getDividerEndPoints","isNearChargerOrRobot","isPointInAnyRoom","isWallIntersectsAnyRoom","isZoneIntersectsAnyRoom","resetPanZoom","snapshot","snapshotByData","getCustomCarpets","forceEndGesture","getFurniturePointsByViewportCenter","getCustomCarpetPointsByViewportCenter","getRectPointsByCenter","getFurnitures","drawCustomZones","getCustomZones","clearCustomZones","setEditingCustomZones"],o=["onMapFirstDrawed","onMapDrawed","onPathDrawed","onRoomPropertiesDrawed","onRoomsDrawed","onClickRoom","onClickRoomProperties","onRemoveForbiddenSweepZone","onRemoveForbiddenMopZone","onRemoveCleanZone","onRemoveVirtualWall","onUpdateForbiddenSweepZone","onUpdateForbiddenMopZone","onUpdateCleanZone","onUpdateVirtualWall","onUpdateSpot","onUpdateRoomAnchor","onUpdateWayPoint","onUpdateDivider","onClickForbiddenSweepZone","onClickForbiddenMopZone","onClickCleanZone","onClickVirtualWall","onClickSpot","onClickRoomAnchor","onClickWayPoint","onClickDetectedObject","onClickCustomElement","onClickMap","onClickCarpet","onDeleteCarpet","onUpdateCustomCarpet","onDeleteCustomCarpet","onGestureStart","onGestureEnd","onClickRobot","onClickChargingStation","onRemoveFurniture","onUpdateFurniture","onClickFurniture","onRemoveCustomZone","onUpdateCustomZone","onClickCustomZone"];export{e as MAP_API_METHODS,o as MAP_CALLBACK_METHODS};
1
+ const e=["areRoomsAdjacent","getForbiddenSweepZones","getForbiddenMopZones","getCleanZones","getVirtualWalls","getThresholds","getSpots","getRoomAnchors","getWayPoints","getViewportCenterPoint","getMapCenterPoint","getWallPointsByViewportCenter","getForbiddenSweepZonePointsByViewportCenter","getForbiddenMopZonePointsByViewportCenter","getCleanZonePointsByViewportCenter","getSpotPointByViewportCenter","getEffectiveDividerPoints","getDividerEndPoints","isNearChargerOrRobot","isPointInAnyRoom","isWallIntersectsAnyRoom","isZoneIntersectsAnyRoom","resetPanZoom","snapshot","snapshotByData","getCustomCarpets","forceEndGesture","getFurniturePointsByViewportCenter","getCustomCarpetPointsByViewportCenter","getRectPointsByCenter","getFurnitures","drawCustomZones","getCustomZones","clearCustomZones","setEditingCustomZones"],o=["onMapFirstDrawed","onMapDrawed","onPathDrawed","onRoomPropertiesDrawed","onRoomsDrawed","onClickRoom","onClickRoomProperties","onRemoveForbiddenSweepZone","onRemoveForbiddenMopZone","onRemoveCleanZone","onRemoveVirtualWall","onRemoveThreshold","onUpdateForbiddenSweepZone","onUpdateForbiddenMopZone","onUpdateCleanZone","onUpdateVirtualWall","onUpdateThreshold","onUpdateSpot","onUpdateRoomAnchor","onUpdateWayPoint","onUpdateDivider","onClickForbiddenSweepZone","onClickForbiddenMopZone","onClickCleanZone","onClickVirtualWall","onClickThreshold","onClickSpot","onClickRoomAnchor","onClickWayPoint","onClickDetectedObject","onClickCustomElement","onClickMap","onClickCarpet","onDeleteCarpet","onUpdateCustomCarpet","onDeleteCustomCarpet","onGestureStart","onGestureEnd","onClickRobot","onClickChargingStation","onRemoveFurniture","onUpdateFurniture","onClickFurniture","onRemoveCustomZone","onUpdateCustomZone","onClickCustomZone"];export{e as MAP_API_METHODS,o as MAP_CALLBACK_METHODS};
package/dist/index.d.ts CHANGED
@@ -745,6 +745,7 @@ export declare type ControlRenderItem =
745
745
  | 'forbiddenMopZone'
746
746
  | 'cleanZone'
747
747
  | 'virtualWall'
748
+ | 'threshold'
748
749
  | 'spot'
749
750
  | 'roomAnchor'
750
751
  | 'wayPoint'
@@ -799,6 +800,8 @@ export declare type ControlsConfig = {
799
800
  carpet: CarpetConfig
800
801
  /** 虚拟墙配置 */
801
802
  virtualWall: VirtualWallConfig
803
+ /** 门槛配置 */
804
+ threshold: ThresholdConfig
802
805
  /** 定点清扫配置 */
803
806
  spot: SpotConfig
804
807
  /**
@@ -1090,9 +1093,9 @@ export declare type LoggerPayload = {
1090
1093
  ts: number
1091
1094
  }
1092
1095
 
1093
- export declare const MAP_API_METHODS: readonly ["areRoomsAdjacent", "getForbiddenSweepZones", "getForbiddenMopZones", "getCleanZones", "getVirtualWalls", "getSpots", "getRoomAnchors", "getWayPoints", "getViewportCenterPoint", "getMapCenterPoint", "getWallPointsByViewportCenter", "getForbiddenSweepZonePointsByViewportCenter", "getForbiddenMopZonePointsByViewportCenter", "getCleanZonePointsByViewportCenter", "getSpotPointByViewportCenter", "getEffectiveDividerPoints", "getDividerEndPoints", "isNearChargerOrRobot", "isPointInAnyRoom", "isWallIntersectsAnyRoom", "isZoneIntersectsAnyRoom", "resetPanZoom", "snapshot", "snapshotByData", "getCustomCarpets", "forceEndGesture", "getFurniturePointsByViewportCenter", "getCustomCarpetPointsByViewportCenter", "getRectPointsByCenter", "getFurnitures", "drawCustomZones", "getCustomZones", "clearCustomZones", "setEditingCustomZones"];
1096
+ export declare const MAP_API_METHODS: readonly ["areRoomsAdjacent", "getForbiddenSweepZones", "getForbiddenMopZones", "getCleanZones", "getVirtualWalls", "getThresholds", "getSpots", "getRoomAnchors", "getWayPoints", "getViewportCenterPoint", "getMapCenterPoint", "getWallPointsByViewportCenter", "getForbiddenSweepZonePointsByViewportCenter", "getForbiddenMopZonePointsByViewportCenter", "getCleanZonePointsByViewportCenter", "getSpotPointByViewportCenter", "getEffectiveDividerPoints", "getDividerEndPoints", "isNearChargerOrRobot", "isPointInAnyRoom", "isWallIntersectsAnyRoom", "isZoneIntersectsAnyRoom", "resetPanZoom", "snapshot", "snapshotByData", "getCustomCarpets", "forceEndGesture", "getFurniturePointsByViewportCenter", "getCustomCarpetPointsByViewportCenter", "getRectPointsByCenter", "getFurnitures", "drawCustomZones", "getCustomZones", "clearCustomZones", "setEditingCustomZones"];
1094
1097
 
1095
- export declare const MAP_CALLBACK_METHODS: readonly ["onMapFirstDrawed", "onMapDrawed", "onPathDrawed", "onRoomPropertiesDrawed", "onRoomsDrawed", "onClickRoom", "onClickRoomProperties", "onRemoveForbiddenSweepZone", "onRemoveForbiddenMopZone", "onRemoveCleanZone", "onRemoveVirtualWall", "onUpdateForbiddenSweepZone", "onUpdateForbiddenMopZone", "onUpdateCleanZone", "onUpdateVirtualWall", "onUpdateSpot", "onUpdateRoomAnchor", "onUpdateWayPoint", "onUpdateDivider", "onClickForbiddenSweepZone", "onClickForbiddenMopZone", "onClickCleanZone", "onClickVirtualWall", "onClickSpot", "onClickRoomAnchor", "onClickWayPoint", "onClickDetectedObject", "onClickCustomElement", "onClickMap", "onClickCarpet", "onDeleteCarpet", "onUpdateCustomCarpet", "onDeleteCustomCarpet", "onGestureStart", "onGestureEnd", "onClickRobot", "onClickChargingStation", "onRemoveFurniture", "onUpdateFurniture", "onClickFurniture", "onRemoveCustomZone", "onUpdateCustomZone", "onClickCustomZone"];
1098
+ export declare const MAP_CALLBACK_METHODS: readonly ["onMapFirstDrawed", "onMapDrawed", "onPathDrawed", "onRoomPropertiesDrawed", "onRoomsDrawed", "onClickRoom", "onClickRoomProperties", "onRemoveForbiddenSweepZone", "onRemoveForbiddenMopZone", "onRemoveCleanZone", "onRemoveVirtualWall", "onRemoveThreshold", "onUpdateForbiddenSweepZone", "onUpdateForbiddenMopZone", "onUpdateCleanZone", "onUpdateVirtualWall", "onUpdateThreshold", "onUpdateSpot", "onUpdateRoomAnchor", "onUpdateWayPoint", "onUpdateDivider", "onClickForbiddenSweepZone", "onClickForbiddenMopZone", "onClickCleanZone", "onClickVirtualWall", "onClickThreshold", "onClickSpot", "onClickRoomAnchor", "onClickWayPoint", "onClickDetectedObject", "onClickCustomElement", "onClickMap", "onClickCarpet", "onDeleteCarpet", "onUpdateCustomCarpet", "onDeleteCustomCarpet", "onGestureStart", "onGestureEnd", "onClickRobot", "onClickChargingStation", "onRemoveFurniture", "onUpdateFurniture", "onClickFurniture", "onRemoveCustomZone", "onUpdateCustomZone", "onClickCustomZone"];
1096
1099
 
1097
1100
  /**
1098
1101
  * 地图 API 接口定义
@@ -1231,6 +1234,12 @@ export declare interface MapApi {
1231
1234
  * @returns 虚拟墙数据数组
1232
1235
  */
1233
1236
  getVirtualWalls(): VirtualWallParam[];
1237
+ /**
1238
+ * 获取当前地图上所有门槛数据
1239
+ *
1240
+ * @returns 门槛数据数组(长度已修正,`height` 已补默认值并钳制)
1241
+ */
1242
+ getThresholds(): ThresholdParam[];
1234
1243
  /**
1235
1244
  * 获取当前地图上所有定点清扫数据
1236
1245
  *
@@ -1669,6 +1678,15 @@ export declare interface MapCallbacks {
1669
1678
  * @param.en id - ID of the deleted virtual wall
1670
1679
  */
1671
1680
  onRemoveVirtualWall?: (id: string) => void;
1681
+ /**
1682
+ * @description.zh 点击门槛删除按钮的回调
1683
+ * @description.en Callback when clicking the delete button of threshold
1684
+ * @description.zh 当用户点击编辑态门槛的删除按钮时触发。SDK 不会移除该门槛,宿主更新自己的门槛列表后重绘。
1685
+ * @description.en Triggered when the user clicks the delete button of an editing threshold. The SDK does not remove it; the host updates its own list and redraws.
1686
+ * @param.zh id - 被删除的门槛ID
1687
+ * @param.en id - ID of the deleted threshold
1688
+ */
1689
+ onRemoveThreshold?: (id: string) => void;
1672
1690
  /**
1673
1691
  * @description.zh 更新禁扫区域的回调
1674
1692
  * @description.en Callback when updating forbidden sweep zone
@@ -1705,6 +1723,15 @@ export declare interface MapCallbacks {
1705
1723
  * @param.en wall - Updated virtual wall data
1706
1724
  */
1707
1725
  onUpdateVirtualWall?: (wall: VirtualWallParam) => void;
1726
+ /**
1727
+ * @description.zh 更新门槛的回调
1728
+ * @description.en Callback when updating threshold
1729
+ * @description.zh 当用户完成一次门槛编辑操作(旋转 / 缩放 / 移动,或拖拽整体平移)后触发,携带最终几何与类型。
1730
+ * @description.en Triggered after the user finishes a threshold edit (rotate/scale/move, or body drag), carrying the final geometry and type.
1731
+ * @param.zh threshold - 更新后的门槛数据
1732
+ * @param.en threshold - Updated threshold data
1733
+ */
1734
+ onUpdateThreshold?: (threshold: ThresholdParam) => void;
1708
1735
  /**
1709
1736
  * @description.zh 更新定点清扫的回调
1710
1737
  * @description.en Callback when updating spot clean
@@ -1777,6 +1804,15 @@ export declare interface MapCallbacks {
1777
1804
  * @param.en wall - Clicked virtual wall data
1778
1805
  */
1779
1806
  onClickVirtualWall?: (wall: VirtualWallParam) => void;
1807
+ /**
1808
+ * @description.zh 点击门槛回调
1809
+ * @description.en Callback when clicking threshold
1810
+ * @description.zh 点击门槛时触发。常用于「点击进入编辑」(把该 id 加入 editingThresholdIds)或切换类型 / 打开详情 UI。
1811
+ * @description.en Triggered when the user taps a threshold. Commonly used to enter edit mode (add the id to editingThresholdIds) or to switch type / open a detail UI.
1812
+ * @param.zh threshold - 被点击的门槛数据
1813
+ * @param.en threshold - Clicked threshold data
1814
+ */
1815
+ onClickThreshold?: (threshold: ThresholdParam) => void;
1780
1816
  /**
1781
1817
  * @description.zh 点击定点清扫回调
1782
1818
  * @description.en Callback when clicking spot clean
@@ -2335,6 +2371,15 @@ export declare type RuntimeConfig = {
2335
2371
  editingCustomZoneIds?: Record<string, string[]>
2336
2372
  /** 正在编辑的虚拟墙ID列表 */
2337
2373
  editingVirtualWallIds: string[]
2374
+ /**
2375
+ * 正在编辑的门槛ID列表。
2376
+ *
2377
+ * 列入的门槛显示编辑控件(虚线轮廓、尺寸标签与删除 / 旋转 / 缩放 / 移动
2378
+ * 按钮);未列入的门槛不显示编辑控件,但点击仍会触发 `onClickThreshold`
2379
+ * (宿主可借此实现「点击进入编辑」)。只读展示设备识别的门槛时,不把其 id
2380
+ * 加入本列表即可。
2381
+ */
2382
+ editingThresholdIds: string[]
2338
2383
  /** 正在编辑的定点清扫ID列表 */
2339
2384
  editingSpotIds: string[]
2340
2385
  /** 正在编辑的房间锚点ID列表(独立于 editingSpotIds,互不影响) */
@@ -2497,6 +2542,100 @@ export declare type SpotParam = {
2497
2542
  roomId?: number
2498
2543
  }
2499
2544
 
2545
+ /** 门槛配置 */
2546
+ export declare type ThresholdConfig = {
2547
+ /** 条纹线宽(屏幕像素,不随地图缩放变化) */
2548
+ stripeWidth: number
2549
+ /** 相邻条纹间距(屏幕像素) */
2550
+ stripeGap: number
2551
+ /** 条带边框线宽(屏幕像素) */
2552
+ borderWidth: number
2553
+ /** 条带圆角半径(屏幕像素,自动不超过条带半厚 / 半长) */
2554
+ cornerRadius: number
2555
+ /** 可通行门槛样式(默认绿色斜纹) */
2556
+ passable: ThresholdStyle
2557
+ /** 不可通行门槛样式(默认红色斜纹) */
2558
+ impassable: ThresholdStyle
2559
+ /** 最小长度 (米),绘制与缩放时长度被钳制到不小于该值 */
2560
+ minLength: number
2561
+ /** 最大长度 (米),可选。缺省或 ≤ minLength 时不限制。 */
2562
+ maxLength?: number
2563
+ /** 最小高度 (米),绘制与缩放时条带高度被钳制到不小于该值 */
2564
+ minHeight: number
2565
+ /** 最大高度 (米),可选。缺省或 ≤ minHeight 时不限制。 */
2566
+ maxHeight?: number
2567
+ /** 数据未携带 height 时的默认条带高度 (米) */
2568
+ defaultHeight: number
2569
+ /** 四角控制按钮图标容器填充颜色(编辑态显示) */
2570
+ iconWrapperFillColor: ColorSource
2571
+ /**
2572
+ * 点击热区在条带每一侧向外扩展的可抓边距(屏幕像素,不随地图缩放)。
2573
+ * 热区厚度 = 条带高度 + 2 × 该值,因此条带无论多厚都保有固定的可抓边距,
2574
+ * 细条带也不会难以点中。
2575
+ */
2576
+ hitAreaPadding: number
2577
+ /** 编辑态轮廓相对条带边缘的偏移(屏幕像素) */
2578
+ outlineOffset: number
2579
+ /** 编辑态轮廓描边颜色 */
2580
+ outlineStrokeColor: ColorSource
2581
+ /** 编辑态轮廓描边宽度 */
2582
+ outlineStrokeWidth: number
2583
+ /** 编辑态轮廓是否虚线 */
2584
+ outlineDashed: boolean
2585
+ /** 编辑态轮廓虚线数组 */
2586
+ outlineDashArray: [number, number]
2587
+ /** 编辑态轮廓填充颜色 */
2588
+ outlineFillColor: ColorSource
2589
+ /** 尺寸标签(长×高)文本颜色(编辑态显示) */
2590
+ textColor: ColorSource
2591
+ /** 尺寸标签相对轮廓边缘向外的偏移(屏幕像素) */
2592
+ textOffset: number
2593
+ }
2594
+
2595
+ /**
2596
+ * 门槛参数。
2597
+ *
2598
+ * 门槛是「中心线 + 高度」的矩形条带元素,用可通行 / 不可通行两种类型标记
2599
+ * 机器人能否跨越的通道,渲染为斜纹条带(可通行绿色 / 不可通行红色)。条带
2600
+ * 为真实世界尺寸:长度由两端点决定,厚度由 `height` 决定,随地图缩放。
2601
+ *
2602
+ * 交互由运行时 `editingThresholdIds` 门控:列入的门槛显示编辑控件(虚线
2603
+ * 轮廓、尺寸标签与删除 / 旋转 / 缩放 / 移动按钮,与禁区等四边形元素同一套
2604
+ * 编辑面),长与高在缩放时各自钳制到 `minLength`/`maxLength` 与
2605
+ * `minHeight`/`maxHeight`(米)区间。编辑结束触发 `onUpdateThreshold`,
2606
+ * 点击触发 `onClickThreshold`,删除按钮触发 `onRemoveThreshold`。
2607
+ */
2608
+ export declare type ThresholdParam = {
2609
+ /** 门槛ID */
2610
+ id: string
2611
+ /** 中心线两端点坐标(起点、终点),与其他元素同为地图像素坐标系 */
2612
+ points: [Point, Point]
2613
+ /**
2614
+ * 条带高度(厚度),单位与 points 相同(地图像素)。缺省时取
2615
+ * `controls.threshold.defaultHeight`(米)换算;绘制与缩放时被钳制在
2616
+ * `minHeight` / `maxHeight`(米)区间内。
2617
+ */
2618
+ height?: number
2619
+ /** 门槛类型(可通行 / 不可通行)。缺省为 `passable`(可通行)。 */
2620
+ type?: ThresholdType
2621
+ }
2622
+
2623
+ /** 门槛单类型样式 */
2624
+ export declare type ThresholdStyle = {
2625
+ /** 条纹与描边颜色 */
2626
+ color: ColorSource
2627
+ /** 条带底色 */
2628
+ fillColor: ColorSource
2629
+ }
2630
+
2631
+ /**
2632
+ * 门槛类型。
2633
+ *
2634
+ * - `'passable'`:可通行门槛,机器人可尝试跨越,默认渲染为绿色斜纹条带
2635
+ * - `'impassable'`:不可通行门槛,机器人不得跨越,默认渲染为红色斜纹条带
2636
+ */
2637
+ export declare type ThresholdType = 'passable' | 'impassable'
2638
+
2500
2639
  /** 虚拟墙配置 */
2501
2640
  export declare type VirtualWallConfig = {
2502
2641
  /** 图标容器填充颜色 */