@ray-js/robot-map-sdk 0.0.6-beta.4 → 0.0.6-beta.6
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/constant/methods.js +1 -1
- package/dist/index.d.ts +54 -3
- package/dist/index.rjs.js +1 -1
- package/dist/utils/index.js +1 -1
- package/dist-app/assets/{index-BuEXmcFI.js → index-D-o2o4iK.js} +1 -1
- package/dist-app/index.html +1 -1
- package/dist-docs/404.html +2 -2
- package/dist-docs/assets/{app.CFI6dEbK.js → app.1uX3tnZa.js} +1 -1
- package/dist-docs/assets/chunks/@localSearchIndexroot.LirAaLEk.js +1 -0
- package/dist-docs/assets/chunks/{VPLocalSearchBox.DWw7_0D6.js → VPLocalSearchBox.DsmGm_hn.js} +1 -1
- package/dist-docs/assets/chunks/{theme.Dl4f095y.js → theme.CEcCdyor.js} +2 -2
- package/dist-docs/assets/{guide_getting-started.md.CkXshCV2.js → guide_getting-started.md.07KRedRG.js} +1 -1
- package/dist-docs/assets/{reference_callbacks.md.B9JgcUCR.js → reference_callbacks.md.CZ8IiuH-.js} +2 -2
- package/dist-docs/assets/{reference_callbacks.md.B9JgcUCR.lean.js → reference_callbacks.md.CZ8IiuH-.lean.js} +1 -1
- package/dist-docs/assets/{reference_config.md.DsKyNjfM.js → reference_config.md.SZ6NThzj.js} +3 -3
- package/dist-docs/assets/reference_config.md.SZ6NThzj.lean.js +1 -0
- package/dist-docs/guide/advanced-usage.html +3 -3
- package/dist-docs/guide/concepts.html +3 -3
- package/dist-docs/guide/getting-started.html +5 -5
- package/dist-docs/hashmap.json +1 -1
- package/dist-docs/index.html +3 -3
- package/dist-docs/reference/callbacks.html +5 -5
- package/dist-docs/reference/config.html +6 -6
- package/dist-docs/reference/data.html +3 -3
- package/dist-docs/reference/methods.html +3 -3
- package/dist-docs/reference/runtime.html +3 -3
- package/dist-docs/reference/types.html +3 -3
- package/dist-docs/reference/utils.html +3 -3
- package/package.json +1 -1
- package/dist-docs/assets/chunks/@localSearchIndexroot.6-81LlFk.js +0 -1
- package/dist-docs/assets/reference_config.md.DsKyNjfM.lean.js +0 -1
- /package/dist-docs/assets/{guide_getting-started.md.CkXshCV2.lean.js → guide_getting-started.md.07KRedRG.lean.js} +0 -0
package/dist/constant/methods.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=["areRoomsAdjacent","getForbiddenSweepZones","getForbiddenMopZones","getCleanZones","getVirtualWalls","getSpots","getWayPoints","getViewportCenterPoint","getMapCenterPoint","getWallPointsByViewportCenter","getForbiddenSweepZonePointsByViewportCenter","getForbiddenMopZonePointsByViewportCenter","getCleanZonePointsByViewportCenter","getSpotPointByViewportCenter","getEffectiveDividerPoints","getDividerEndPoints","isNearChargerOrRobot","isPointInAnyRoom","isWallIntersectsAnyRoom","isZoneIntersectsAnyRoom","resetPanZoom","snapshot","snapshotByData","getCustomCarpets","forceEndGesture"],o=["onMapFirstDrawed","onMapDrawed","onPathDrawed","onRoomPropertiesDrawed","onClickRoom","onClickRoomProperties","onRemoveForbiddenSweepZone","onRemoveForbiddenMopZone","onRemoveCleanZone","onRemoveVirtualWall","onUpdateForbiddenSweepZone","onUpdateForbiddenMopZone","onUpdateCleanZone","onUpdateVirtualWall","onUpdateSpot","onUpdateWayPoint","onUpdateDivider","onClickForbiddenSweepZone","onClickForbiddenMopZone","onClickCleanZone","onClickVirtualWall","onClickSpot","onClickWayPoint","onClickDetectedObject","onClickCustomElement","onClickMap","onClickCarpet","onDeleteCarpet","onUpdateCustomCarpet","onDeleteCustomCarpet","onGestureStart","onGestureEnd"];export{e as MAP_API_METHODS,o as MAP_CALLBACK_METHODS};
|
|
1
|
+
const e=["areRoomsAdjacent","getForbiddenSweepZones","getForbiddenMopZones","getCleanZones","getVirtualWalls","getSpots","getWayPoints","getViewportCenterPoint","getMapCenterPoint","getWallPointsByViewportCenter","getForbiddenSweepZonePointsByViewportCenter","getForbiddenMopZonePointsByViewportCenter","getCleanZonePointsByViewportCenter","getSpotPointByViewportCenter","getEffectiveDividerPoints","getDividerEndPoints","isNearChargerOrRobot","isPointInAnyRoom","isWallIntersectsAnyRoom","isZoneIntersectsAnyRoom","resetPanZoom","snapshot","snapshotByData","getCustomCarpets","forceEndGesture"],o=["onMapFirstDrawed","onMapDrawed","onPathDrawed","onRoomPropertiesDrawed","onClickRoom","onClickRoomProperties","onRemoveForbiddenSweepZone","onRemoveForbiddenMopZone","onRemoveCleanZone","onRemoveVirtualWall","onUpdateForbiddenSweepZone","onUpdateForbiddenMopZone","onUpdateCleanZone","onUpdateVirtualWall","onUpdateSpot","onUpdateWayPoint","onUpdateDivider","onClickForbiddenSweepZone","onClickForbiddenMopZone","onClickCleanZone","onClickVirtualWall","onClickSpot","onClickWayPoint","onClickDetectedObject","onClickCustomElement","onClickMap","onClickCarpet","onDeleteCarpet","onUpdateCustomCarpet","onDeleteCustomCarpet","onGestureStart","onGestureEnd","onClickRobot","onClickChargingStation"];export{e as MAP_API_METHODS,o as MAP_CALLBACK_METHODS};
|
package/dist/index.d.ts
CHANGED
|
@@ -81,6 +81,8 @@ export declare type AppConfig = {
|
|
|
81
81
|
obstacleColor: ColorSource
|
|
82
82
|
/** 自由区域颜色 */
|
|
83
83
|
freeColor: ColorSource
|
|
84
|
+
/** 地图自适应时的偏移量(像素) */
|
|
85
|
+
autoFitOffset?: { x: number; y: number }
|
|
84
86
|
}
|
|
85
87
|
|
|
86
88
|
/** 热力图配置 */
|
|
@@ -465,6 +467,10 @@ export declare type AppConfig = {
|
|
|
465
467
|
enable: boolean
|
|
466
468
|
/** 是否启用双击缩放功能 */
|
|
467
469
|
enableDoubleTapZoom: boolean
|
|
470
|
+
/** 是否启用机器人点击功能 */
|
|
471
|
+
enableRobotClick?: boolean
|
|
472
|
+
/** 是否启用充电桩点击功能 */
|
|
473
|
+
enableChargingStationClick?: boolean
|
|
468
474
|
}
|
|
469
475
|
|
|
470
476
|
/** 控制元素配置 */
|
|
@@ -639,6 +645,10 @@ declare class AppService {
|
|
|
639
645
|
sizeChangeAutoFitThreshold: number;
|
|
640
646
|
obstacleColor: ColorSource;
|
|
641
647
|
freeColor: ColorSource;
|
|
648
|
+
autoFitOffset?: {
|
|
649
|
+
x: number;
|
|
650
|
+
y: number;
|
|
651
|
+
};
|
|
642
652
|
};
|
|
643
653
|
get roomConfig(): {
|
|
644
654
|
colors: {
|
|
@@ -812,6 +822,8 @@ declare class AppService {
|
|
|
812
822
|
fitMaxScale: number;
|
|
813
823
|
enable: boolean;
|
|
814
824
|
enableDoubleTapZoom: boolean;
|
|
825
|
+
enableRobotClick?: boolean;
|
|
826
|
+
enableChargingStationClick?: boolean;
|
|
815
827
|
};
|
|
816
828
|
get controlsConfig(): ControlsConfig_2;
|
|
817
829
|
get dividerConfig(): DividerConfig_2;
|
|
@@ -876,6 +888,12 @@ declare class AppService {
|
|
|
876
888
|
* @returns 是否启用交互
|
|
877
889
|
*/
|
|
878
890
|
isInteractionEnabled(): boolean;
|
|
891
|
+
/**
|
|
892
|
+
* 修复浮点数精度误差
|
|
893
|
+
* @param value 数字、点或点数组
|
|
894
|
+
* @param precision 保留小数位数,默认 2
|
|
895
|
+
*/
|
|
896
|
+
fixPrecision<T>(value: T, precision?: number): T;
|
|
879
897
|
get events(): MapCallbacks_2 | undefined;
|
|
880
898
|
get baseScale(): number;
|
|
881
899
|
get currentScale(): number;
|
|
@@ -1105,8 +1123,14 @@ declare class ChargingStation extends Container {
|
|
|
1105
1123
|
chargingStation: ChargingStationIcon;
|
|
1106
1124
|
ring: Ring;
|
|
1107
1125
|
private unsubscribeFns;
|
|
1126
|
+
private clickHandler?;
|
|
1108
1127
|
constructor(appService: AppService);
|
|
1109
1128
|
draw({ x, y, rotation }: IconPoint): Promise<void>;
|
|
1129
|
+
/**
|
|
1130
|
+
* 初始化点击处理器状态
|
|
1131
|
+
* 根据静态配置启用充电桩点击交互
|
|
1132
|
+
*/
|
|
1133
|
+
private initClickInteraction;
|
|
1110
1134
|
destroy(): void;
|
|
1111
1135
|
}
|
|
1112
1136
|
|
|
@@ -1985,8 +2009,10 @@ declare class EditControlLayer extends Container {
|
|
|
1985
2009
|
private calculateVerticalScaleButtonRotation;
|
|
1986
2010
|
/**
|
|
1987
2011
|
* 更新点集(公共方法)
|
|
2012
|
+
* @param points 点集
|
|
2013
|
+
* @param updateText 是否更新文本
|
|
1988
2014
|
*/
|
|
1989
|
-
updatePoints(points: Point[]): void;
|
|
2015
|
+
updatePoints(points: Point[], updateText?: boolean): void;
|
|
1990
2016
|
/**
|
|
1991
2017
|
* 更新轮廓边框
|
|
1992
2018
|
*/
|
|
@@ -1997,8 +2023,9 @@ declare class EditControlLayer extends Container {
|
|
|
1997
2023
|
updateMoveLine(): void;
|
|
1998
2024
|
/**
|
|
1999
2025
|
* 更新尺寸文本
|
|
2026
|
+
* @param updateText 是否更新文本内容
|
|
2000
2027
|
*/
|
|
2001
|
-
updateSizeText(): void;
|
|
2028
|
+
updateSizeText(updateText?: boolean): void;
|
|
2002
2029
|
/**
|
|
2003
2030
|
* 更新尺寸文本位置
|
|
2004
2031
|
*/
|
|
@@ -2784,7 +2811,7 @@ declare type Managers = {
|
|
|
2784
2811
|
|
|
2785
2812
|
export declare const MAP_API_METHODS: readonly ["areRoomsAdjacent", "getForbiddenSweepZones", "getForbiddenMopZones", "getCleanZones", "getVirtualWalls", "getSpots", "getWayPoints", "getViewportCenterPoint", "getMapCenterPoint", "getWallPointsByViewportCenter", "getForbiddenSweepZonePointsByViewportCenter", "getForbiddenMopZonePointsByViewportCenter", "getCleanZonePointsByViewportCenter", "getSpotPointByViewportCenter", "getEffectiveDividerPoints", "getDividerEndPoints", "isNearChargerOrRobot", "isPointInAnyRoom", "isWallIntersectsAnyRoom", "isZoneIntersectsAnyRoom", "resetPanZoom", "snapshot", "snapshotByData", "getCustomCarpets", "forceEndGesture"];
|
|
2786
2813
|
|
|
2787
|
-
export declare const MAP_CALLBACK_METHODS: readonly ["onMapFirstDrawed", "onMapDrawed", "onPathDrawed", "onRoomPropertiesDrawed", "onClickRoom", "onClickRoomProperties", "onRemoveForbiddenSweepZone", "onRemoveForbiddenMopZone", "onRemoveCleanZone", "onRemoveVirtualWall", "onUpdateForbiddenSweepZone", "onUpdateForbiddenMopZone", "onUpdateCleanZone", "onUpdateVirtualWall", "onUpdateSpot", "onUpdateWayPoint", "onUpdateDivider", "onClickForbiddenSweepZone", "onClickForbiddenMopZone", "onClickCleanZone", "onClickVirtualWall", "onClickSpot", "onClickWayPoint", "onClickDetectedObject", "onClickCustomElement", "onClickMap", "onClickCarpet", "onDeleteCarpet", "onUpdateCustomCarpet", "onDeleteCustomCarpet", "onGestureStart", "onGestureEnd"];
|
|
2814
|
+
export declare const MAP_CALLBACK_METHODS: readonly ["onMapFirstDrawed", "onMapDrawed", "onPathDrawed", "onRoomPropertiesDrawed", "onClickRoom", "onClickRoomProperties", "onRemoveForbiddenSweepZone", "onRemoveForbiddenMopZone", "onRemoveCleanZone", "onRemoveVirtualWall", "onUpdateForbiddenSweepZone", "onUpdateForbiddenMopZone", "onUpdateCleanZone", "onUpdateVirtualWall", "onUpdateSpot", "onUpdateWayPoint", "onUpdateDivider", "onClickForbiddenSweepZone", "onClickForbiddenMopZone", "onClickCleanZone", "onClickVirtualWall", "onClickSpot", "onClickWayPoint", "onClickDetectedObject", "onClickCustomElement", "onClickMap", "onClickCarpet", "onDeleteCarpet", "onUpdateCustomCarpet", "onDeleteCustomCarpet", "onGestureStart", "onGestureEnd", "onClickRobot", "onClickChargingStation"];
|
|
2788
2815
|
|
|
2789
2816
|
/**
|
|
2790
2817
|
* 地图 API 接口定义
|
|
@@ -3862,6 +3889,18 @@ export declare interface MapCallbacks {
|
|
|
3862
3889
|
* 当用户结束手势交互时触发。
|
|
3863
3890
|
*/
|
|
3864
3891
|
onGestureEnd?: () => void;
|
|
3892
|
+
/**
|
|
3893
|
+
* 点击机器人回调
|
|
3894
|
+
*
|
|
3895
|
+
* @param point - 机器人当前位置和朝向
|
|
3896
|
+
*/
|
|
3897
|
+
onClickRobot?: (point: IconPoint) => void;
|
|
3898
|
+
/**
|
|
3899
|
+
* 点击充电桩回调
|
|
3900
|
+
*
|
|
3901
|
+
* @param point - 充电桩当前位置和朝向
|
|
3902
|
+
*/
|
|
3903
|
+
onClickChargingStation?: (point: IconPoint) => void;
|
|
3865
3904
|
}
|
|
3866
3905
|
|
|
3867
3906
|
/**
|
|
@@ -4508,6 +4547,7 @@ declare class Robot extends Container {
|
|
|
4508
4547
|
pulseCircle: PulseCircle;
|
|
4509
4548
|
sleepAnimation: SleepAnimation | null;
|
|
4510
4549
|
private unsubscribeFns;
|
|
4550
|
+
private clickHandler?;
|
|
4511
4551
|
private targetPosition;
|
|
4512
4552
|
private targetRotation;
|
|
4513
4553
|
private isMoving;
|
|
@@ -4526,6 +4566,11 @@ declare class Robot extends Container {
|
|
|
4526
4566
|
* 立即绘制到指定位置(无动画)
|
|
4527
4567
|
*/
|
|
4528
4568
|
draw({ x, y, rotation }: IconPoint): Promise<void>;
|
|
4569
|
+
/**
|
|
4570
|
+
* 初始化点击处理器状态
|
|
4571
|
+
* 根据配置启用机器人点击交互
|
|
4572
|
+
*/
|
|
4573
|
+
private initClickInteraction;
|
|
4529
4574
|
/**
|
|
4530
4575
|
* 获取机器人当前位置(相对坐标系)
|
|
4531
4576
|
* @returns 机器人当前位置,如果尚未绘制则返回 null
|
|
@@ -4987,6 +5032,8 @@ export declare type SpotConfig = {
|
|
|
4987
5032
|
iconSrc: string
|
|
4988
5033
|
/** 图标大小 */
|
|
4989
5034
|
iconSize: number
|
|
5035
|
+
/** 图标尺寸是否固定(不跟随地图缩放) */
|
|
5036
|
+
iconSizeFixed: boolean
|
|
4990
5037
|
/** 尺寸 (米) */
|
|
4991
5038
|
size: number
|
|
4992
5039
|
/** 描边颜色 */
|
|
@@ -5012,6 +5059,8 @@ export declare type SpotConfig = {
|
|
|
5012
5059
|
dashArray: [number, number]
|
|
5013
5060
|
/** 是否显示图标 */
|
|
5014
5061
|
showIcon: boolean
|
|
5062
|
+
/** 是否显示框体(填充和边框) */
|
|
5063
|
+
showFrame: boolean
|
|
5015
5064
|
}
|
|
5016
5065
|
/** 普通模式样式 */
|
|
5017
5066
|
normal: {
|
|
@@ -5021,6 +5070,8 @@ export declare type SpotConfig = {
|
|
|
5021
5070
|
dashArray: [number, number]
|
|
5022
5071
|
/** 是否显示图标 */
|
|
5023
5072
|
showIcon: boolean
|
|
5073
|
+
/** 是否显示框体(填充和边框) */
|
|
5074
|
+
showFrame: boolean
|
|
5024
5075
|
}
|
|
5025
5076
|
}
|
|
5026
5077
|
|