@ray-js/robot-map-sdk 0.0.17-beta.2 → 0.0.17-beta.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/bin/mcp-server.js +31 -15
- package/dist/constant/methods.js +1 -1
- package/dist/index.d.ts +278 -29
- package/dist/index.rjs.js +1 -1
- package/dist-app/assets/index-Bju2ykDd.js +1 -0
- package/dist-app/index.html +1 -1
- package/dist-docs/404.html +2 -2
- package/dist-docs/assets/{app.BKcB-q3l.js → app.C5xCc25N.js} +1 -1
- package/dist-docs/assets/chunks/@localSearchIndexroot.JKj3B6eW.js +1 -0
- package/dist-docs/assets/chunks/{BitmapFont.BVQlrRID.js → BitmapFont.CfNZJWQu.js} +1 -1
- package/dist-docs/assets/chunks/{BufferResource.ccuOZM7p.js → BufferResource.U7KmcJEb.js} +1 -1
- package/dist-docs/assets/chunks/{CanvasRenderer.BjafRf72.js → CanvasRenderer.V8PvjkXK.js} +1 -1
- package/dist-docs/assets/chunks/{RenderTargetSystem.CNtSJQIT.js → RenderTargetSystem.CIN4IDnj.js} +1 -1
- package/dist-docs/assets/chunks/{VPLocalSearchBox.BraJ5EBN.js → VPLocalSearchBox.BXtgZMz6.js} +1 -1
- package/dist-docs/assets/chunks/{WebGLRenderer.IUUQ0Lkd.js → WebGLRenderer.9sqpUvol.js} +1 -1
- package/dist-docs/assets/chunks/{WebGPURenderer.CLtb2XY4.js → WebGPURenderer.B8iy8W66.js} +1 -1
- package/dist-docs/assets/chunks/{browserAll.BeYySQdg.js → browserAll.Curl4kc3.js} +1 -1
- package/dist-docs/assets/chunks/index.BPYuggut.js +744 -0
- package/dist-docs/assets/chunks/theme.DdcAePki.js +4 -0
- package/dist-docs/assets/chunks/{webworkerAll.Dyo1xVCt.js → webworkerAll.9SOLh1Dq.js} +1 -1
- package/dist-docs/assets/{guide_advanced-usage.md.dxD8u9v3.js → guide_advanced-usage.md.BsGRhEuG.js} +12 -9
- package/dist-docs/assets/{guide_advanced-usage.md.dxD8u9v3.lean.js → guide_advanced-usage.md.BsGRhEuG.lean.js} +1 -1
- package/dist-docs/assets/{guide_getting-started.md.ItwGZAsG.js → guide_getting-started.md.Ca_k5NRJ.js} +1 -1
- package/dist-docs/assets/guide_mcp.md.BYlNOxMG.js +1 -0
- package/dist-docs/assets/{guide_mcp.md.CabCiX8Z.lean.js → guide_mcp.md.BYlNOxMG.lean.js} +1 -1
- package/dist-docs/assets/reference_callbacks.md.BP78Z1wN.js +33 -0
- package/dist-docs/assets/{reference_callbacks.md.Cm_LNx97.lean.js → reference_callbacks.md.BP78Z1wN.lean.js} +1 -1
- package/dist-docs/assets/{reference_config.md.CXZBV81d.js → reference_config.md.DHyraAQF.js} +5 -5
- package/dist-docs/assets/reference_config.md.DHyraAQF.lean.js +1 -0
- package/dist-docs/assets/{reference_data.md.DL6rfzez.js → reference_data.md.f7vBtzcn.js} +20 -7
- package/dist-docs/assets/{reference_data.md.DL6rfzez.lean.js → reference_data.md.f7vBtzcn.lean.js} +1 -1
- package/dist-docs/assets/{reference_methods.md.yWEfqPKf.js → reference_methods.md.D2L6f98h.js} +14 -4
- package/dist-docs/assets/{reference_methods.md.yWEfqPKf.lean.js → reference_methods.md.D2L6f98h.lean.js} +1 -1
- package/dist-docs/assets/reference_runtime.md.g-NWJXS6.js +20 -0
- package/dist-docs/assets/reference_runtime.md.g-NWJXS6.lean.js +1 -0
- package/dist-docs/assets/{reference_types.md.ZQU03iAA.js → reference_types.md.B2PPyukT.js} +25 -9
- package/dist-docs/assets/{reference_types.md.ZQU03iAA.lean.js → reference_types.md.B2PPyukT.lean.js} +1 -1
- package/dist-docs/guide/advanced-usage.html +15 -12
- package/dist-docs/guide/concepts.html +3 -3
- package/dist-docs/guide/getting-started.html +5 -5
- package/dist-docs/guide/mcp.html +5 -5
- package/dist-docs/guide/spot-room-binding.html +3 -3
- package/dist-docs/hashmap.json +1 -1
- package/dist-docs/index.html +3 -3
- package/dist-docs/plans/2026-03-04-detected-objects-visibility-design.html +3 -3
- package/dist-docs/plans/2026-03-04-show-detected-objects-implementation-plan.html +3 -3
- package/dist-docs/plans/2026-03-10-simulator-debug-design.html +3 -3
- package/dist-docs/plans/2026-03-10-simulator-events-console-design.html +3 -3
- package/dist-docs/plans/2026-03-10-simulator-events-console-implementation-plan.html +3 -3
- package/dist-docs/plans/2026-03-10-simulator-runtime-controls-design.html +3 -3
- package/dist-docs/plans/2026-03-10-simulator-runtime-controls-implementation-plan.html +3 -3
- package/dist-docs/plans/2026-03-10-testing-rollout-next-steps-plan.html +3 -3
- package/dist-docs/plans/2026-03-11-simulator-logger-dump-implementation-plan.html +3 -3
- package/dist-docs/reference/callbacks.html +5 -5
- package/dist-docs/reference/config.html +8 -8
- package/dist-docs/reference/data.html +23 -10
- package/dist-docs/reference/methods.html +17 -7
- package/dist-docs/reference/runtime.html +5 -5
- package/dist-docs/reference/types.html +28 -12
- package/dist-docs/reference/utils.html +3 -3
- package/dist-docs/simulator/index.html +3 -3
- package/package.json +1 -1
- package/dist-app/assets/index-BK1e_Ra7.js +0 -1
- package/dist-docs/adr/0001-threshold-mirrors-virtual-wall.html +0 -25
- package/dist-docs/adr/0002-threshold-edit-surface-quad-family.html +0 -25
- package/dist-docs/adr/0003-beautify-derived-presentation-geometry.html +0 -25
- package/dist-docs/adr/0004-beautify-shells-enclose-never-subtract.html +0 -25
- package/dist-docs/agents/domain.html +0 -39
- package/dist-docs/agents/issue-tracker.html +0 -25
- package/dist-docs/agents/triage-labels.html +0 -25
- package/dist-docs/assets/adr_0001-threshold-mirrors-virtual-wall.md.BGtyf9GS.js +0 -1
- package/dist-docs/assets/adr_0001-threshold-mirrors-virtual-wall.md.BGtyf9GS.lean.js +0 -1
- package/dist-docs/assets/adr_0002-threshold-edit-surface-quad-family.md.BlvHYJT5.js +0 -1
- package/dist-docs/assets/adr_0002-threshold-edit-surface-quad-family.md.BlvHYJT5.lean.js +0 -1
- package/dist-docs/assets/adr_0003-beautify-derived-presentation-geometry.md.BIaPCTDJ.js +0 -1
- package/dist-docs/assets/adr_0003-beautify-derived-presentation-geometry.md.BIaPCTDJ.lean.js +0 -1
- package/dist-docs/assets/adr_0004-beautify-shells-enclose-never-subtract.md.PRaaUF5r.js +0 -1
- package/dist-docs/assets/adr_0004-beautify-shells-enclose-never-subtract.md.PRaaUF5r.lean.js +0 -1
- package/dist-docs/assets/agents_domain.md.CYB9yWEy.js +0 -15
- package/dist-docs/assets/agents_domain.md.CYB9yWEy.lean.js +0 -1
- package/dist-docs/assets/agents_issue-tracker.md.CrjzmXmc.js +0 -1
- package/dist-docs/assets/agents_issue-tracker.md.CrjzmXmc.lean.js +0 -1
- package/dist-docs/assets/agents_triage-labels.md.Cmw0b5xB.js +0 -1
- package/dist-docs/assets/agents_triage-labels.md.Cmw0b5xB.lean.js +0 -1
- package/dist-docs/assets/chunks/@localSearchIndexroot.BiQ_oQbs.js +0 -1
- package/dist-docs/assets/chunks/index.vn3lfis1.js +0 -744
- package/dist-docs/assets/chunks/theme.CAU4HwNY.js +0 -4
- package/dist-docs/assets/guide_mcp.md.CabCiX8Z.js +0 -1
- package/dist-docs/assets/reference_callbacks.md.Cm_LNx97.js +0 -33
- package/dist-docs/assets/reference_config.md.CXZBV81d.lean.js +0 -1
- package/dist-docs/assets/reference_runtime.md.BfmrB9c5.js +0 -20
- package/dist-docs/assets/reference_runtime.md.BfmrB9c5.lean.js +0 -1
- /package/dist-docs/assets/{guide_getting-started.md.ItwGZAsG.lean.js → guide_getting-started.md.Ca_k5NRJ.lean.js} +0 -0
package/dist/constant/methods.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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};
|
|
1
|
+
const e=["areRoomsAdjacent","getForbiddenSweepZones","getForbiddenMopZones","getCleanZones","getVirtualWalls","getThresholds","getRamps","getSpots","getRoomAnchors","getWayPoints","getViewportCenterPoint","getMapCenterPoint","getWallPointsByViewportCenter","getForbiddenSweepZonePointsByViewportCenter","getForbiddenMopZonePointsByViewportCenter","getCleanZonePointsByViewportCenter","getThresholdPointsByViewportCenter","getRampPointsByViewportCenter","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","onRemoveRamp","onUpdateForbiddenSweepZone","onUpdateForbiddenMopZone","onUpdateCleanZone","onUpdateVirtualWall","onUpdateThreshold","onUpdateRamp","onUpdateSpot","onUpdateRoomAnchor","onUpdateWayPoint","onUpdateDivider","onClickForbiddenSweepZone","onClickForbiddenMopZone","onClickCleanZone","onClickVirtualWall","onClickThreshold","onClickRamp","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
|
@@ -74,8 +74,9 @@ export declare type AppConfig = {
|
|
|
74
74
|
/**
|
|
75
75
|
* 外壳规整档:`'faithful'`(缺省)外壳紧贴原始轮廓,未测绘到的空洞原样
|
|
76
76
|
* 保留;`'boxy'` 花掉一份面积预算换更少的边,房间趋向规整的矩形 / L 形
|
|
77
|
-
*
|
|
78
|
-
*
|
|
77
|
+
* (空洞被浅色外壳盖住)。两档都只加不减,绝不削掉设备测绘到的区域;
|
|
78
|
+
* 别的房间已测绘的区域也不会被外壳盖住(渲染分层保证,几何上贴身档的
|
|
79
|
+
* 外壳仍可能与邻居交叠)。档位映射到的化简预算是内部标定常量。
|
|
79
80
|
*/
|
|
80
81
|
level: 'faithful' | 'boxy'
|
|
81
82
|
/** 外壳边框宽度(像素),边框颜色复用 `map.obstacleColor` */
|
|
@@ -775,19 +776,24 @@ export declare type ComponentPropsApp = {
|
|
|
775
776
|
app: MapApplicationInstance
|
|
776
777
|
}
|
|
777
778
|
|
|
778
|
-
/**
|
|
779
|
+
/**
|
|
780
|
+
* 控制层内可排序元素。
|
|
781
|
+
*
|
|
782
|
+
* 门槛(threshold)不在其中:它是不透明地面元素,画在地面标记层
|
|
783
|
+
* (路径 / 机器人 / 房间名之下),层内顺序固定,不参与控制层排序
|
|
784
|
+
* (见 ADR 0006)。
|
|
785
|
+
*/
|
|
779
786
|
export declare type ControlRenderItem =
|
|
780
787
|
| 'forbiddenSweepZone'
|
|
781
788
|
| 'forbiddenMopZone'
|
|
782
789
|
| 'cleanZone'
|
|
783
790
|
| 'virtualWall'
|
|
784
|
-
| 'threshold'
|
|
785
791
|
| 'spot'
|
|
786
792
|
| 'roomAnchor'
|
|
787
793
|
| 'wayPoint'
|
|
788
794
|
| 'divider'
|
|
789
795
|
// Allow any string for custom zone types while keeping IDE autocomplete
|
|
790
|
-
// for the
|
|
796
|
+
// for the eight built-in items via the `(string & {})` trick.
|
|
791
797
|
| (string & {})
|
|
792
798
|
|
|
793
799
|
/**
|
|
@@ -838,6 +844,8 @@ export declare type ControlsConfig = {
|
|
|
838
844
|
virtualWall: VirtualWallConfig
|
|
839
845
|
/** 门槛配置 */
|
|
840
846
|
threshold: ThresholdConfig
|
|
847
|
+
/** 坡道配置 */
|
|
848
|
+
ramp: RampConfig
|
|
841
849
|
/** 定点清扫配置 */
|
|
842
850
|
spot: SpotConfig
|
|
843
851
|
/**
|
|
@@ -1129,9 +1137,9 @@ export declare type LoggerPayload = {
|
|
|
1129
1137
|
ts: number
|
|
1130
1138
|
}
|
|
1131
1139
|
|
|
1132
|
-
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"];
|
|
1140
|
+
export declare const MAP_API_METHODS: readonly ["areRoomsAdjacent", "getForbiddenSweepZones", "getForbiddenMopZones", "getCleanZones", "getVirtualWalls", "getThresholds", "getRamps", "getSpots", "getRoomAnchors", "getWayPoints", "getViewportCenterPoint", "getMapCenterPoint", "getWallPointsByViewportCenter", "getForbiddenSweepZonePointsByViewportCenter", "getForbiddenMopZonePointsByViewportCenter", "getCleanZonePointsByViewportCenter", "getThresholdPointsByViewportCenter", "getRampPointsByViewportCenter", "getSpotPointByViewportCenter", "getEffectiveDividerPoints", "getDividerEndPoints", "isNearChargerOrRobot", "isPointInAnyRoom", "isWallIntersectsAnyRoom", "isZoneIntersectsAnyRoom", "resetPanZoom", "snapshot", "snapshotByData", "getCustomCarpets", "forceEndGesture", "getFurniturePointsByViewportCenter", "getCustomCarpetPointsByViewportCenter", "getRectPointsByCenter", "getFurnitures", "drawCustomZones", "getCustomZones", "clearCustomZones", "setEditingCustomZones"];
|
|
1133
1141
|
|
|
1134
|
-
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"];
|
|
1142
|
+
export declare const MAP_CALLBACK_METHODS: readonly ["onMapFirstDrawed", "onMapDrawed", "onPathDrawed", "onRoomPropertiesDrawed", "onRoomsDrawed", "onClickRoom", "onClickRoomProperties", "onRemoveForbiddenSweepZone", "onRemoveForbiddenMopZone", "onRemoveCleanZone", "onRemoveVirtualWall", "onRemoveThreshold", "onRemoveRamp", "onUpdateForbiddenSweepZone", "onUpdateForbiddenMopZone", "onUpdateCleanZone", "onUpdateVirtualWall", "onUpdateThreshold", "onUpdateRamp", "onUpdateSpot", "onUpdateRoomAnchor", "onUpdateWayPoint", "onUpdateDivider", "onClickForbiddenSweepZone", "onClickForbiddenMopZone", "onClickCleanZone", "onClickVirtualWall", "onClickThreshold", "onClickRamp", "onClickSpot", "onClickRoomAnchor", "onClickWayPoint", "onClickDetectedObject", "onClickCustomElement", "onClickMap", "onClickCarpet", "onDeleteCarpet", "onUpdateCustomCarpet", "onDeleteCustomCarpet", "onGestureStart", "onGestureEnd", "onClickRobot", "onClickChargingStation", "onRemoveFurniture", "onUpdateFurniture", "onClickFurniture", "onRemoveCustomZone", "onUpdateCustomZone", "onClickCustomZone"];
|
|
1135
1143
|
|
|
1136
1144
|
/**
|
|
1137
1145
|
* 地图 API 接口定义
|
|
@@ -1276,6 +1284,12 @@ export declare interface MapApi {
|
|
|
1276
1284
|
* @returns 门槛数据数组(长度已修正,`height` 已补默认值并钳制)
|
|
1277
1285
|
*/
|
|
1278
1286
|
getThresholds(): ThresholdParam[];
|
|
1287
|
+
/**
|
|
1288
|
+
* 获取当前地图上所有坡道数据
|
|
1289
|
+
*
|
|
1290
|
+
* @returns 坡道数据数组(角点为归一化后的结果)
|
|
1291
|
+
*/
|
|
1292
|
+
getRamps(): RampParam[];
|
|
1279
1293
|
/**
|
|
1280
1294
|
* 获取当前地图上所有定点清扫数据
|
|
1281
1295
|
*
|
|
@@ -1440,6 +1454,50 @@ export declare interface MapApi {
|
|
|
1440
1454
|
offsetX?: number;
|
|
1441
1455
|
offsetY?: number;
|
|
1442
1456
|
}): Point[];
|
|
1457
|
+
/**
|
|
1458
|
+
* 基于视口中心生成门槛的四个角点坐标
|
|
1459
|
+
*
|
|
1460
|
+
* 缺省尺寸 1m × 0.15m(长 × 厚)—— 「新建门槛」的初始尺寸,不是配置项;
|
|
1461
|
+
* 需要别的初始尺寸就传 `width` / `height`。传入值会被钳制到
|
|
1462
|
+
* `controls.threshold` 的 `minLength`/`maxLength` 与 `minHeight`/`maxHeight`
|
|
1463
|
+
* (米)区间内。
|
|
1464
|
+
*
|
|
1465
|
+
* @param options - 配置选项
|
|
1466
|
+
* @param options.width - 门槛长度,单位米,默认 1
|
|
1467
|
+
* @param options.height - 门槛厚度,单位米,默认 0.15
|
|
1468
|
+
* @param options.offsetX - X方向像素偏移,支持负数,默认为 0
|
|
1469
|
+
* @param options.offsetY - Y方向像素偏移,支持负数,默认为 0
|
|
1470
|
+
* @returns 四个角点坐标,顺时针顺序:[左上, 右上, 右下, 左下](0→1 为长度
|
|
1471
|
+
* 方向,0→3 为厚度方向),可直接作为 `ThresholdParam.points`
|
|
1472
|
+
*/
|
|
1473
|
+
getThresholdPointsByViewportCenter(options?: {
|
|
1474
|
+
width?: number;
|
|
1475
|
+
height?: number;
|
|
1476
|
+
offsetX?: number;
|
|
1477
|
+
offsetY?: number;
|
|
1478
|
+
}): Point[];
|
|
1479
|
+
/**
|
|
1480
|
+
* 基于视口中心生成坡道的四个角点坐标
|
|
1481
|
+
*
|
|
1482
|
+
* 缺省尺寸 0.8m × 0.4m(宽 × 高,高方向即坡向)—— 「新建坡道」的初始尺寸,不是配置项;
|
|
1483
|
+
* 需要别的初始尺寸就传 `width` / `height`。传入值会被钳制到
|
|
1484
|
+
* `controls.ramp` 的 `minWidth`/`maxWidth` 与 `minHeight`/`maxHeight`
|
|
1485
|
+
* (米)区间内。
|
|
1486
|
+
*
|
|
1487
|
+
* @param options - 配置选项
|
|
1488
|
+
* @param options.width - 坡道宽度,单位米,默认 0.8
|
|
1489
|
+
* @param options.height - 坡道高度,单位米,默认 0.4(正好等于 minHeight)
|
|
1490
|
+
* @param options.offsetX - X方向像素偏移,支持负数,默认为 0
|
|
1491
|
+
* @param options.offsetY - Y方向像素偏移,支持负数,默认为 0
|
|
1492
|
+
* @returns 四个角点坐标,顺时针顺序:[左上, 右上, 右下, 左下](0→1 为宽
|
|
1493
|
+
* 方向,0→3 为高方向),可直接作为 `RampParam.points`;坡向为屏幕上方
|
|
1494
|
+
*/
|
|
1495
|
+
getRampPointsByViewportCenter(options?: {
|
|
1496
|
+
width?: number;
|
|
1497
|
+
height?: number;
|
|
1498
|
+
offsetX?: number;
|
|
1499
|
+
offsetY?: number;
|
|
1500
|
+
}): Point[];
|
|
1443
1501
|
/**
|
|
1444
1502
|
* 基于任意中心点生成矩形的四个顶点坐标
|
|
1445
1503
|
*
|
|
@@ -1723,6 +1781,15 @@ export declare interface MapCallbacks {
|
|
|
1723
1781
|
* @param.en id - ID of the deleted threshold
|
|
1724
1782
|
*/
|
|
1725
1783
|
onRemoveThreshold?: (id: string) => void;
|
|
1784
|
+
/**
|
|
1785
|
+
* @description.zh 点击坡道删除按钮的回调
|
|
1786
|
+
* @description.en Callback when clicking the delete button of ramp
|
|
1787
|
+
* @description.zh 当用户点击编辑态坡道的删除按钮时触发。SDK 不会移除该坡道,宿主更新自己的坡道列表后重绘。
|
|
1788
|
+
* @description.en Triggered when the user clicks the delete button of an editing ramp. The SDK does not remove it; the host updates its own list and redraws.
|
|
1789
|
+
* @param.zh id - 被删除的坡道ID
|
|
1790
|
+
* @param.en id - ID of the deleted ramp
|
|
1791
|
+
*/
|
|
1792
|
+
onRemoveRamp?: (id: string) => void;
|
|
1726
1793
|
/**
|
|
1727
1794
|
* @description.zh 更新禁扫区域的回调
|
|
1728
1795
|
* @description.en Callback when updating forbidden sweep zone
|
|
@@ -1768,6 +1835,15 @@ export declare interface MapCallbacks {
|
|
|
1768
1835
|
* @param.en threshold - Updated threshold data
|
|
1769
1836
|
*/
|
|
1770
1837
|
onUpdateThreshold?: (threshold: ThresholdParam) => void;
|
|
1838
|
+
/**
|
|
1839
|
+
* @description.zh 更新坡道的回调
|
|
1840
|
+
* @description.en Callback when updating ramp
|
|
1841
|
+
* @description.zh 当用户完成一次坡道编辑操作(旋转 / 缩放 / 移动,或拖拽整体平移)后触发,携带最终几何。
|
|
1842
|
+
* @description.en Triggered after the user finishes a ramp edit (rotate/scale/move, or body drag), carrying the final geometry.
|
|
1843
|
+
* @param.zh ramp - 更新后的坡道数据
|
|
1844
|
+
* @param.en ramp - Updated ramp data
|
|
1845
|
+
*/
|
|
1846
|
+
onUpdateRamp?: (ramp: RampParam) => void;
|
|
1771
1847
|
/**
|
|
1772
1848
|
* @description.zh 更新定点清扫的回调
|
|
1773
1849
|
* @description.en Callback when updating spot clean
|
|
@@ -1849,6 +1925,15 @@ export declare interface MapCallbacks {
|
|
|
1849
1925
|
* @param.en threshold - Clicked threshold data
|
|
1850
1926
|
*/
|
|
1851
1927
|
onClickThreshold?: (threshold: ThresholdParam) => void;
|
|
1928
|
+
/**
|
|
1929
|
+
* @description.zh 点击坡道回调
|
|
1930
|
+
* @description.en Callback when clicking ramp
|
|
1931
|
+
* @description.zh 点击坡道时触发。常用于「点击进入编辑」(把该 id 加入 editingRampIds)。
|
|
1932
|
+
* @description.en Triggered when the user taps a ramp. Commonly used to enter edit mode (add the id to editingRampIds).
|
|
1933
|
+
* @param.zh ramp - 被点击的坡道数据
|
|
1934
|
+
* @param.en ramp - Clicked ramp data
|
|
1935
|
+
*/
|
|
1936
|
+
onClickRamp?: (ramp: RampParam) => void;
|
|
1852
1937
|
/**
|
|
1853
1938
|
* @description.zh 点击定点清扫回调
|
|
1854
1939
|
* @description.en Callback when clicking spot clean
|
|
@@ -2202,6 +2287,114 @@ export declare type ProcessedRasterData = {
|
|
|
2202
2287
|
totalPixels: number
|
|
2203
2288
|
}
|
|
2204
2289
|
|
|
2290
|
+
/** 坡道配置 */
|
|
2291
|
+
export declare type RampConfig = {
|
|
2292
|
+
/** 底色(不透明 —— 坡道是地面元素,画在路径 / 机器人之下,见 ADR 0006) */
|
|
2293
|
+
fillColor: ColorSource
|
|
2294
|
+
/** 描边颜色 */
|
|
2295
|
+
strokeColor: ColorSource
|
|
2296
|
+
/** 描边线宽(屏幕像素,不随地图缩放) */
|
|
2297
|
+
strokeWidth: number
|
|
2298
|
+
/**
|
|
2299
|
+
* 箭头颜色。默认白色 40% 透明叠在底色上(与 UED 稿一致)——
|
|
2300
|
+
* 这样改 `fillColor` 时箭头会自动跟随,不用两处对着调。
|
|
2301
|
+
*/
|
|
2302
|
+
arrowColor: ColorSource
|
|
2303
|
+
/**
|
|
2304
|
+
* 箭头**最小**线宽(屏幕像素,不随地图缩放)。
|
|
2305
|
+
*
|
|
2306
|
+
* 实际线宽取 `实际行距 × arrowThicknessRatio` 与本值中的较大者:正常缩放
|
|
2307
|
+
* 下由比例决定(线与缝的粗细比恒定,观感等于 UED 稿),坡道小到 / 地图
|
|
2308
|
+
* 缩到线要细过本值时由本值兜底,保证箭头不会细成看不见。
|
|
2309
|
+
*/
|
|
2310
|
+
arrowThickness: number
|
|
2311
|
+
/**
|
|
2312
|
+
* 箭头线宽相对**实际行距**的比例,UED 稿量得 `3 / 7 ≈ 0.43`。
|
|
2313
|
+
*
|
|
2314
|
+
* 线宽跟着行距走而不是锁在固定像素:行距随坡道尺寸变化,若线宽不跟着长,
|
|
2315
|
+
* 放大地图就会看到又粗又疏的缝里夹着细发丝一样的箭头。按比例算才能任何
|
|
2316
|
+
* 缩放下都是同一张贴纸。
|
|
2317
|
+
*/
|
|
2318
|
+
arrowThicknessRatio: number
|
|
2319
|
+
/**
|
|
2320
|
+
* 相邻箭头的**最小**间隙(屏幕像素),沿坡向度量。
|
|
2321
|
+
*
|
|
2322
|
+
* 最小步距 = `arrowThickness + arrowGap`,它是密度上限:箭头永远不会比这
|
|
2323
|
+
* 更挤。地图缩得很小时它会顶掉 {@link RampConfig.arrowDensity} 算出的砖
|
|
2324
|
+
* 尺寸,让砖变大、行数变少,保证箭头不会糊成一片。
|
|
2325
|
+
*/
|
|
2326
|
+
arrowGap: number
|
|
2327
|
+
/**
|
|
2328
|
+
* 纹样密度:**短边**上铺几个箭头。UED 稿是方形坡道上 6 个,故默认 6。
|
|
2329
|
+
*
|
|
2330
|
+
* 箭头是一块比例固定的「砖」,而不是拉满坡道宽度的单根折线:砖的尺寸
|
|
2331
|
+
* 取 `短边 / arrowDensity`,再沿坡向铺若干**行**、沿宽方向铺若干**列**。
|
|
2332
|
+
* 因此任何宽高比的坡道看到的都是同一块砖,只是数量不同。
|
|
2333
|
+
*
|
|
2334
|
+
* 若改成「整宽一个箭头 + 固定行数」,折角深浅由宽决定、线宽由高决定,
|
|
2335
|
+
* 两个特征分别挂在两条边上:窄高坡道会退化成胖带子(折角只有线宽的
|
|
2336
|
+
* 1/7),宽矮坡道会退化成细丝配大折角。见 plan record
|
|
2337
|
+
* `docs/records/plans/2026-08-06-ramp-map-element-plan.md`。
|
|
2338
|
+
*
|
|
2339
|
+
* 调小更稀、调大更密;密度还受最小步距 `arrowThickness + arrowGap` 约束。
|
|
2340
|
+
*/
|
|
2341
|
+
arrowDensity: number
|
|
2342
|
+
/**
|
|
2343
|
+
* 箭头两臂相对横轴的抬升角度(度),钳制在 `[1, 60]`。
|
|
2344
|
+
*
|
|
2345
|
+
* **不是固定的外凸像素**:外凸量由 `半个砖宽 × tan(角度)` 反推,所以任何
|
|
2346
|
+
* 坡道尺寸、任何地图缩放下箭头形状恒定。若改成固定像素,宽砖上的箭头会
|
|
2347
|
+
* 被摊平成直线。UED 稿量得约 8.7°,默认取 9。
|
|
2348
|
+
*/
|
|
2349
|
+
arrowAngle: number
|
|
2350
|
+
/** 箭头区域相对坡道边缘的内缩(屏幕像素),箭头不贴边 */
|
|
2351
|
+
arrowInset: number
|
|
2352
|
+
/** 最小宽度 (米),绘制与缩放时宽边(顶点 0→1)被钳制到不小于该值 */
|
|
2353
|
+
minWidth: number
|
|
2354
|
+
/** 最大宽度 (米),可选。缺省或 ≤ minWidth 时不限制。 */
|
|
2355
|
+
maxWidth?: number
|
|
2356
|
+
/** 最小高度 (米),绘制与缩放时高边(顶点 0→3)被钳制到不小于该值 */
|
|
2357
|
+
minHeight: number
|
|
2358
|
+
/** 最大高度 (米),可选。缺省或 ≤ minHeight 时不限制。 */
|
|
2359
|
+
maxHeight?: number
|
|
2360
|
+
/** 四角控制按钮图标容器填充颜色(编辑态显示) */
|
|
2361
|
+
iconWrapperFillColor: ColorSource
|
|
2362
|
+
/** 编辑态轮廓相对坡道边缘的偏移(屏幕像素) */
|
|
2363
|
+
outlineOffset: number
|
|
2364
|
+
/** 编辑态轮廓描边颜色 */
|
|
2365
|
+
outlineStrokeColor: ColorSource
|
|
2366
|
+
/** 编辑态轮廓描边宽度 */
|
|
2367
|
+
outlineStrokeWidth: number
|
|
2368
|
+
/** 编辑态轮廓是否虚线 */
|
|
2369
|
+
outlineDashed: boolean
|
|
2370
|
+
/** 编辑态轮廓虚线数组 */
|
|
2371
|
+
outlineDashArray: [number, number]
|
|
2372
|
+
/** 编辑态轮廓填充颜色 */
|
|
2373
|
+
outlineFillColor: ColorSource
|
|
2374
|
+
/** 尺寸标签(宽×高)文本颜色(编辑态显示) */
|
|
2375
|
+
textColor: ColorSource
|
|
2376
|
+
/** 尺寸标签相对轮廓边缘向外的偏移(屏幕像素) */
|
|
2377
|
+
textOffset: number
|
|
2378
|
+
}
|
|
2379
|
+
|
|
2380
|
+
/** 坡道参数 */
|
|
2381
|
+
export declare type RampParam = {
|
|
2382
|
+
/** 坡道ID */
|
|
2383
|
+
id: string
|
|
2384
|
+
/**
|
|
2385
|
+
* 四角坐标(地图像素坐标系),顺时针 左上→右上→右下→左下,与家具 /
|
|
2386
|
+
* 禁区等四边形元素同序:顶点 0→1 为宽(w)方向,0→3 为高(h)方向。
|
|
2387
|
+
*
|
|
2388
|
+
* 坡道的上坡方向由点序自带:垂直于 0→1 边、从 3→2 边指向 0→1 边
|
|
2389
|
+
* (未旋转时即"朝上")。旋转时点集整体旋转,坡向随之旋转 —— 没有独立的
|
|
2390
|
+
* direction 字段。因此点序**不做**长边规范(那会翻转坡向),入口只纠正
|
|
2391
|
+
* 绕向为顺时针、把宽与高分别钳制到 `minWidth`/`maxWidth` 与
|
|
2392
|
+
* `minHeight`/`maxHeight`(米)区间并拉直成标准矩形。`getRamps()` 回吐的
|
|
2393
|
+
* 点集是归一化后的结果,不一定与传入的原始点逐字相同。
|
|
2394
|
+
*/
|
|
2395
|
+
points: Point[]
|
|
2396
|
+
}
|
|
2397
|
+
|
|
2205
2398
|
/**
|
|
2206
2399
|
* 栅格房间的美化几何(仅 `runtime.enableBeautify` 开启时由 MapManager 计算,
|
|
2207
2400
|
* 随 `ProcessedRasterData` 一并交给渲染层)。
|
|
@@ -2455,6 +2648,14 @@ export declare type RuntimeConfig = {
|
|
|
2455
2648
|
* 加入本列表即可。
|
|
2456
2649
|
*/
|
|
2457
2650
|
editingThresholdIds: string[]
|
|
2651
|
+
/**
|
|
2652
|
+
* 正在编辑的坡道ID列表。
|
|
2653
|
+
*
|
|
2654
|
+
* 列入的坡道显示编辑控件(虚线轮廓、尺寸标签与删除 / 旋转 / 缩放 / 移动
|
|
2655
|
+
* 按钮)并可整体拖拽;未列入的坡道不显示编辑控件,但坡道本身仍可点击
|
|
2656
|
+
* (上抛 `onClickRamp`,宿主可借此实现「点击进入编辑」)。
|
|
2657
|
+
*/
|
|
2658
|
+
editingRampIds: string[]
|
|
2458
2659
|
/** 正在编辑的定点清扫ID列表 */
|
|
2459
2660
|
editingSpotIds: string[]
|
|
2460
2661
|
/** 正在编辑的房间锚点ID列表(独立于 editingSpotIds,互不影响) */
|
|
@@ -2630,28 +2831,57 @@ export declare type SpotParam = {
|
|
|
2630
2831
|
|
|
2631
2832
|
/** 门槛配置 */
|
|
2632
2833
|
export declare type ThresholdConfig = {
|
|
2633
|
-
/**
|
|
2834
|
+
/**
|
|
2835
|
+
* 条纹线宽,垂直于斜纹方向度量(斜纹角度见 {@link ThresholdConfig.stripeAngle})。
|
|
2836
|
+
*
|
|
2837
|
+
* **单位是条带厚度的比例,不是像素**(0.3 表示线宽为条带厚度的 30%)。
|
|
2838
|
+
* 于是整套纹路跟着条带一起缩放:跨条带的条纹根数、疏密、着色比例在任何
|
|
2839
|
+
* 地图缩放下都不变,薄门槛与厚门槛看起来也是同一张贴纸。
|
|
2840
|
+
*/
|
|
2634
2841
|
stripeWidth: number
|
|
2635
|
-
/**
|
|
2842
|
+
/**
|
|
2843
|
+
* 相邻条纹间距,沿条带长度方向度量。**单位同样是条带厚度的比例。**
|
|
2844
|
+
*
|
|
2845
|
+
* 步距 `stripeWidth + stripeGap` 决定疏密:取 0.7 时,一根斜纹横穿条带的
|
|
2846
|
+
* 水平距离约为步距的 `1 / (0.7 × tan(stripeAngle))` 倍。
|
|
2847
|
+
*
|
|
2848
|
+
* 两者不同轴:`stripeWidth` 是垂直于斜纹的线宽,同一根斜纹沿长度方向占
|
|
2849
|
+
* `stripeWidth / sin(stripeAngle)`(45° 时为 `× √2`),所以着色比例约为
|
|
2850
|
+
* `stripeWidth / sin(stripeAngle) / (stripeWidth + stripeGap)`——默认值下
|
|
2851
|
+
* 约 55%。调陡 `stripeAngle` 会让条带变淡,需同步放大 `stripeWidth`。
|
|
2852
|
+
*/
|
|
2636
2853
|
stripeGap: number
|
|
2854
|
+
/**
|
|
2855
|
+
* 斜纹倾斜方向:`'forward'` 为 `/`(沿长度方向向右上),`'backward'` 为
|
|
2856
|
+
* `\`(向右下)。缺省 `'forward'`。厂商之间惯例不一,两种都保留。
|
|
2857
|
+
*/
|
|
2858
|
+
stripeDirection: 'forward' | 'backward'
|
|
2859
|
+
/**
|
|
2860
|
+
* 斜纹与条带长度方向的夹角(度)。`45` 是常见的危险胶带角度,`90` 为垂直
|
|
2861
|
+
* 于条带的竖条纹;取值钳制在 `[10, 90]`。
|
|
2862
|
+
*
|
|
2863
|
+
* 注意角度会连带改变疏密与着色:斜纹越陡,横穿条带需要的水平距离越短
|
|
2864
|
+
* (`厚度 / tan(角度)`),同样的步距下穿过条带的条纹越少;同时一根斜纹沿
|
|
2865
|
+
* 长度方向只占 `stripeWidth / sin(角度)`,所以着色比例也会下降。改陡以后
|
|
2866
|
+
* 想维持观感,需要同步调小 `stripeGap`。
|
|
2867
|
+
*/
|
|
2868
|
+
stripeAngle: number
|
|
2637
2869
|
/** 条带边框线宽(屏幕像素) */
|
|
2638
2870
|
borderWidth: number
|
|
2639
2871
|
/** 条带圆角半径(屏幕像素,自动不超过条带半厚 / 半长) */
|
|
2640
2872
|
cornerRadius: number
|
|
2641
|
-
/**
|
|
2873
|
+
/** 可通行门槛样式(默认蓝白斜纹) */
|
|
2642
2874
|
passable: ThresholdStyle
|
|
2643
|
-
/**
|
|
2875
|
+
/** 不可通行门槛样式(默认红白斜纹) */
|
|
2644
2876
|
impassable: ThresholdStyle
|
|
2645
|
-
/** 最小长度 (米)
|
|
2877
|
+
/** 最小长度 (米),绘制与缩放时长边(顶点 0→1)被钳制到不小于该值 */
|
|
2646
2878
|
minLength: number
|
|
2647
2879
|
/** 最大长度 (米),可选。缺省或 ≤ minLength 时不限制。 */
|
|
2648
2880
|
maxLength?: number
|
|
2649
|
-
/**
|
|
2881
|
+
/** 最小厚度 (米),绘制与缩放时厚度边(顶点 0→3)被钳制到不小于该值 */
|
|
2650
2882
|
minHeight: number
|
|
2651
|
-
/**
|
|
2883
|
+
/** 最大厚度 (米),可选。缺省或 ≤ minHeight 时不限制。 */
|
|
2652
2884
|
maxHeight?: number
|
|
2653
|
-
/** 数据未携带 height 时的默认条带高度 (米) */
|
|
2654
|
-
defaultHeight: number
|
|
2655
2885
|
/** 四角控制按钮图标容器填充颜色(编辑态显示) */
|
|
2656
2886
|
iconWrapperFillColor: ColorSource
|
|
2657
2887
|
/**
|
|
@@ -2672,7 +2902,7 @@ export declare type ThresholdConfig = {
|
|
|
2672
2902
|
outlineDashArray: [number, number]
|
|
2673
2903
|
/** 编辑态轮廓填充颜色 */
|
|
2674
2904
|
outlineFillColor: ColorSource
|
|
2675
|
-
/**
|
|
2905
|
+
/** 尺寸标签(长×厚)文本颜色(编辑态显示) */
|
|
2676
2906
|
textColor: ColorSource
|
|
2677
2907
|
/** 尺寸标签相对轮廓边缘向外的偏移(屏幕像素) */
|
|
2678
2908
|
textOffset: number
|
|
@@ -2681,27 +2911,30 @@ export declare type ThresholdConfig = {
|
|
|
2681
2911
|
/**
|
|
2682
2912
|
* 门槛参数。
|
|
2683
2913
|
*
|
|
2684
|
-
*
|
|
2685
|
-
*
|
|
2686
|
-
*
|
|
2914
|
+
* 门槛是四角坐标描述的矩形条带元素,用可通行 / 不可通行两种类型标记机器人
|
|
2915
|
+
* 能否跨越的通道,渲染为白底斜纹条带(可通行蓝白 / 不可通行红白)。条带为真实
|
|
2916
|
+
* 世界尺寸(长度与厚度都由四角坐标决定,随地图缩放)。数据形态与禁区 /
|
|
2917
|
+
* 家具等四边形元素一致 —— 与主流厂商的门槛协议对齐(见 ADR 0005)。
|
|
2687
2918
|
*
|
|
2688
2919
|
* 交互由运行时 `editingThresholdIds` 门控:列入的门槛显示编辑控件(虚线
|
|
2689
2920
|
* 轮廓、尺寸标签与删除 / 旋转 / 缩放 / 移动按钮,与禁区等四边形元素同一套
|
|
2690
|
-
*
|
|
2921
|
+
* 编辑面),长与厚在缩放时各自钳制到 `minLength`/`maxLength` 与
|
|
2691
2922
|
* `minHeight`/`maxHeight`(米)区间。编辑结束触发 `onUpdateThreshold`,
|
|
2692
2923
|
* 点击触发 `onClickThreshold`,删除按钮触发 `onRemoveThreshold`。
|
|
2693
2924
|
*/
|
|
2694
2925
|
export declare type ThresholdParam = {
|
|
2695
2926
|
/** 门槛ID */
|
|
2696
2927
|
id: string
|
|
2697
|
-
/** 中心线两端点坐标(起点、终点),与其他元素同为地图像素坐标系 */
|
|
2698
|
-
points: [Point, Point]
|
|
2699
2928
|
/**
|
|
2700
|
-
*
|
|
2701
|
-
*
|
|
2702
|
-
*
|
|
2929
|
+
* 四角坐标(地图像素坐标系),顺时针 左上→右上→右下→左下,与家具 /
|
|
2930
|
+
* 禁区等四边形元素同序:顶点 0→1 为长度方向,0→3 为厚度方向。
|
|
2931
|
+
*
|
|
2932
|
+
* 入口处会归一化:绕向纠正为顺时针、较长的一条边规范到 0→1、长与厚
|
|
2933
|
+
* 分别钳制到 `minLength`/`maxLength` 与 `minHeight`/`maxHeight`(米)区间,
|
|
2934
|
+
* 再拉直成标准矩形(保留旋转角与中心)。因此 `getThresholds()` 回吐的
|
|
2935
|
+
* 点集是归一化后的结果,不一定与传入的原始点逐字相同。
|
|
2703
2936
|
*/
|
|
2704
|
-
|
|
2937
|
+
points: Point[]
|
|
2705
2938
|
/** 门槛类型(可通行 / 不可通行)。缺省为 `passable`(可通行)。 */
|
|
2706
2939
|
type?: ThresholdType
|
|
2707
2940
|
}
|
|
@@ -2717,8 +2950,8 @@ export declare type ThresholdStyle = {
|
|
|
2717
2950
|
/**
|
|
2718
2951
|
* 门槛类型。
|
|
2719
2952
|
*
|
|
2720
|
-
* - `'passable'
|
|
2721
|
-
* - `'impassable'
|
|
2953
|
+
* - `'passable'`:可通行门槛,机器人可尝试跨越,默认渲染为蓝白斜纹条带
|
|
2954
|
+
* - `'impassable'`:不可通行门槛,机器人不得跨越,默认渲染为红白斜纹条带
|
|
2722
2955
|
*/
|
|
2723
2956
|
export declare type ThresholdType = 'passable' | 'impassable'
|
|
2724
2957
|
|
|
@@ -2873,3 +3106,19 @@ export declare type ZoneParam = {
|
|
|
2873
3106
|
export declare type ZoneTypeDefinition = ZoneConfig
|
|
2874
3107
|
|
|
2875
3108
|
export { }
|
|
3109
|
+
|
|
3110
|
+
/**
|
|
3111
|
+
* Minimal `node:fs` surface for the few tests that read source files off disk
|
|
3112
|
+
* (structural invariants like `throttle-cancel-invariant.test.ts`).
|
|
3113
|
+
*
|
|
3114
|
+
* `@types/node` is installed but unreachable: `tsconfig.json` pins `typeRoots`
|
|
3115
|
+
* to `./src/core/@types`, deliberately keeping Node globals out of a browser
|
|
3116
|
+
* SDK's type surface. Shimming the three functions actually used is contained;
|
|
3117
|
+
* widening `typeRoots` would put `process`, `Buffer` and friends in scope for
|
|
3118
|
+
* every `src/` file, where they must never be used.
|
|
3119
|
+
*/
|
|
3120
|
+
declare module 'node:fs' {
|
|
3121
|
+
export function readFileSync(path: string, encoding: 'utf8'): string
|
|
3122
|
+
export function readdirSync(path: string): string[]
|
|
3123
|
+
export function statSync(path: string): { isDirectory(): boolean }
|
|
3124
|
+
}
|