@ray-js/robot-map-sdk 0.0.6-beta.8 → 0.0.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/bin/mcp-server.js +124 -0
- package/dist/index.d.ts +191 -4
- package/dist/index.rjs.js +1 -1
- package/dist-app/assets/index-Cb0Ul36y.js +1 -0
- package/dist-app/index.html +1 -1
- package/dist-docs/404.html +2 -2
- package/dist-docs/assets/{app.CQVg0TIo.js → app.XWdqe1Jg.js} +1 -1
- package/dist-docs/assets/chunks/@localSearchIndexroot.jsScsXKs.js +1 -0
- package/dist-docs/assets/chunks/{VPLocalSearchBox.bA13bjBq.js → VPLocalSearchBox.BiAazhoT.js} +1 -1
- package/dist-docs/assets/chunks/{theme.CJUk_n1k.js → theme.D2rRQxPQ.js} +2 -2
- package/dist-docs/assets/{guide_advanced-usage.md.N6C1_tsi.js → guide_advanced-usage.md.B4LS-34s.js} +52 -8
- package/dist-docs/assets/{guide_advanced-usage.md.N6C1_tsi.lean.js → guide_advanced-usage.md.B4LS-34s.lean.js} +1 -1
- package/dist-docs/assets/{guide_getting-started.md.C0I2Hrft.js → guide_getting-started.md.DMnUXWCy.js} +1 -1
- package/dist-docs/assets/reference_config.md.DLC4kvTR.js +107 -0
- package/dist-docs/assets/reference_config.md.DLC4kvTR.lean.js +1 -0
- package/dist-docs/assets/reference_runtime.md.BnT09w_m.js +19 -0
- package/dist-docs/assets/reference_runtime.md.BnT09w_m.lean.js +1 -0
- package/dist-docs/assets/{reference_types.md.BezgeVDp.js → reference_types.md.CL_VFfB8.js} +33 -3
- package/dist-docs/assets/reference_types.md.CL_VFfB8.lean.js +1 -0
- package/dist-docs/guide/advanced-usage.html +55 -11
- 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 +3 -3
- package/dist-docs/reference/config.html +47 -7
- package/dist-docs/reference/data.html +3 -3
- package/dist-docs/reference/methods.html +3 -3
- package/dist-docs/reference/runtime.html +5 -5
- package/dist-docs/reference/types.html +36 -6
- package/dist-docs/reference/utils.html +3 -3
- package/package.json +14 -4
- package/dist-app/assets/index-DVPHRsnu.js +0 -1
- package/dist-docs/assets/chunks/@localSearchIndexroot.fwP4JnhB.js +0 -1
- package/dist-docs/assets/reference_config.md.HZKo49HT.js +0 -67
- package/dist-docs/assets/reference_config.md.HZKo49HT.lean.js +0 -1
- package/dist-docs/assets/reference_runtime.md.DnKqKiB4.js +0 -19
- package/dist-docs/assets/reference_runtime.md.DnKqKiB4.lean.js +0 -1
- package/dist-docs/assets/reference_types.md.BezgeVDp.lean.js +0 -1
- /package/dist-docs/assets/{guide_getting-started.md.C0I2Hrft.lean.js → guide_getting-started.md.DMnUXWCy.lean.js} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ import { AnimatedSprite } from 'pixi.js';
|
|
|
2
2
|
import { AppContainer as AppContainer_2 } from './AppContainer';
|
|
3
3
|
import { Application } from 'pixi.js';
|
|
4
4
|
import { ApplicationOptions } from 'pixi.js';
|
|
5
|
+
import { BackgroundGradient as BackgroundGradient_2 } from '..';
|
|
6
|
+
import { BackgroundImage as BackgroundImage_2 } from '..';
|
|
5
7
|
import { ColorSource } from 'pixi.js';
|
|
6
8
|
import { Container } from 'pixi.js';
|
|
7
9
|
import { ControlsConfig as ControlsConfig_2 } from '..';
|
|
@@ -55,9 +57,17 @@ export declare type AppConfig = {
|
|
|
55
57
|
containerWidth: string
|
|
56
58
|
/** 容器高度 */
|
|
57
59
|
containerHeight: string
|
|
58
|
-
/**
|
|
59
|
-
backgroundColor
|
|
60
|
-
/**
|
|
60
|
+
/** 背景颜色(优先级最低) */
|
|
61
|
+
backgroundColor?: ColorSource
|
|
62
|
+
/** 渐变背景配置(优先级中等,优先于backgroundColor) */
|
|
63
|
+
backgroundGradient?: BackgroundGradient
|
|
64
|
+
/** 图片背景配置(优先级最高) */
|
|
65
|
+
backgroundImage?: BackgroundImage
|
|
66
|
+
/**
|
|
67
|
+
* 背景透明度
|
|
68
|
+
* 注意:仅对纯色背景 (backgroundColor) 和图片背景 (backgroundImage) 有效。
|
|
69
|
+
* 对于渐变背景,请在 colorStops 中使用 rgba 颜色。
|
|
70
|
+
*/
|
|
61
71
|
backgroundAlpha: number
|
|
62
72
|
/** 是否启用高性能模式(强制关闭抗锯齿等) */
|
|
63
73
|
performanceMode: boolean
|
|
@@ -123,10 +133,20 @@ export declare type AppConfig = {
|
|
|
123
133
|
active: string[]
|
|
124
134
|
/** 非激活状态颜色 */
|
|
125
135
|
inactive: string[]
|
|
136
|
+
/** 普通状态颜色(非选择模式下使用) */
|
|
137
|
+
normal?: string[]
|
|
126
138
|
/** 房间名称颜色 */
|
|
127
139
|
name: string[]
|
|
140
|
+
/** 房间名称非激活状态颜色 */
|
|
141
|
+
nameInactive?: string[]
|
|
142
|
+
/** 房间名称普通状态颜色(非选择模式下使用) */
|
|
143
|
+
nameNormal?: string[]
|
|
128
144
|
/** 属性主题颜色 */
|
|
129
145
|
propertyTheme: string[]
|
|
146
|
+
/** 属性主题非激活状态颜色 */
|
|
147
|
+
propertyThemeInactive?: string[]
|
|
148
|
+
/** 属性主题普通状态颜色(非选择模式下使用) */
|
|
149
|
+
propertyThemeNormal?: string[]
|
|
130
150
|
/** 选择指示器背景颜色 */
|
|
131
151
|
selectionIndicatorBackground: string[]
|
|
132
152
|
/** 选择指示器图标颜色 */
|
|
@@ -139,6 +159,8 @@ export declare type AppConfig = {
|
|
|
139
159
|
[SPECIAL_ROOM_IDS.OBSTACLE_ROOM]: string
|
|
140
160
|
/** 未知房间特殊颜色 */
|
|
141
161
|
[SPECIAL_ROOM_IDS.UNKNOWN_ROOM]: string
|
|
162
|
+
/** 不稳定房间特殊颜色(建图中) */
|
|
163
|
+
[SPECIAL_ROOM_IDS.VERSION0_ROOM]: string
|
|
142
164
|
}
|
|
143
165
|
/** 房间名称配置 */
|
|
144
166
|
nameLabel: {
|
|
@@ -149,6 +171,26 @@ export declare type AppConfig = {
|
|
|
149
171
|
/** 字体粗细 */
|
|
150
172
|
fontWeight: TextStyleFontWeight
|
|
151
173
|
}
|
|
174
|
+
/** 房间类型配置 */
|
|
175
|
+
type: {
|
|
176
|
+
/** 房间图标资源数组 */
|
|
177
|
+
assets: string[]
|
|
178
|
+
/** 图标大小 */
|
|
179
|
+
iconSize: number
|
|
180
|
+
/** 图标与文字间距 */
|
|
181
|
+
gap: number
|
|
182
|
+
/** 图标显示位置 */
|
|
183
|
+
position: 'left' | 'right'
|
|
184
|
+
/** 容器样式 */
|
|
185
|
+
container: {
|
|
186
|
+
/** 是否显示背景容器 */
|
|
187
|
+
visible: boolean
|
|
188
|
+
/** 容器大小 */
|
|
189
|
+
size: number
|
|
190
|
+
/** 边框圆角 */
|
|
191
|
+
borderRadius: number
|
|
192
|
+
}
|
|
193
|
+
}
|
|
152
194
|
/** 房间属性配置 */
|
|
153
195
|
property: {
|
|
154
196
|
/** 显示顺序(支持内置字段和自定义字段名) */
|
|
@@ -330,6 +372,23 @@ export declare type AppConfig = {
|
|
|
330
372
|
/** 宽度 */
|
|
331
373
|
width: number
|
|
332
374
|
}
|
|
375
|
+
/** 拖地路径配置 */
|
|
376
|
+
mopPath: {
|
|
377
|
+
/** 核心线是否可见 */
|
|
378
|
+
lineVisible: boolean
|
|
379
|
+
/** 核心线颜色 */
|
|
380
|
+
lineColor: ColorSource
|
|
381
|
+
/** 核心线宽度 */
|
|
382
|
+
lineWidth: number
|
|
383
|
+
/** 轨迹是否可见 */
|
|
384
|
+
trackVisible: boolean
|
|
385
|
+
/** 轨迹颜色 */
|
|
386
|
+
trackColor: ColorSource
|
|
387
|
+
/** 轨迹透明度 */
|
|
388
|
+
trackAlpha: number
|
|
389
|
+
/** 轨迹宽度 */
|
|
390
|
+
trackWidth: number
|
|
391
|
+
}
|
|
333
392
|
}
|
|
334
393
|
|
|
335
394
|
/** 地毯配置 */
|
|
@@ -640,7 +699,9 @@ declare class AppService {
|
|
|
640
699
|
containerLeft: string;
|
|
641
700
|
containerWidth: string;
|
|
642
701
|
containerHeight: string;
|
|
643
|
-
backgroundColor
|
|
702
|
+
backgroundColor?: ColorSource;
|
|
703
|
+
backgroundGradient?: BackgroundGradient_2;
|
|
704
|
+
backgroundImage?: BackgroundImage_2;
|
|
644
705
|
backgroundAlpha: number;
|
|
645
706
|
performanceMode: boolean;
|
|
646
707
|
resolution: number;
|
|
@@ -665,20 +726,37 @@ declare class AppService {
|
|
|
665
726
|
strategy: "priority" | "balanced";
|
|
666
727
|
active: string[];
|
|
667
728
|
inactive: string[];
|
|
729
|
+
normal?: string[];
|
|
668
730
|
name: string[];
|
|
731
|
+
nameInactive?: string[];
|
|
732
|
+
nameNormal?: string[];
|
|
669
733
|
propertyTheme: string[];
|
|
734
|
+
propertyThemeInactive?: string[];
|
|
735
|
+
propertyThemeNormal?: string[];
|
|
670
736
|
selectionIndicatorBackground: string[];
|
|
671
737
|
selectionIndicatorIcon: string[];
|
|
672
738
|
NO_ROOM_DATA: string;
|
|
673
739
|
ROOM_GAP: string;
|
|
674
740
|
OBSTACLE_ROOM: string;
|
|
675
741
|
UNKNOWN_ROOM: string;
|
|
742
|
+
VERSION0_ROOM: string;
|
|
676
743
|
};
|
|
677
744
|
nameLabel: {
|
|
678
745
|
fontSize: number;
|
|
679
746
|
fontFamily: string;
|
|
680
747
|
fontWeight: TextStyleFontWeight;
|
|
681
748
|
};
|
|
749
|
+
type: {
|
|
750
|
+
assets: string[];
|
|
751
|
+
iconSize: number;
|
|
752
|
+
gap: number;
|
|
753
|
+
position: "left" | "right";
|
|
754
|
+
container: {
|
|
755
|
+
visible: boolean;
|
|
756
|
+
size: number;
|
|
757
|
+
borderRadius: number;
|
|
758
|
+
};
|
|
759
|
+
};
|
|
682
760
|
property: {
|
|
683
761
|
displayOrders: ("cleanMode" | "suction" | "cistern" | "cleanTimes" | string)[];
|
|
684
762
|
iconWidth: number;
|
|
@@ -765,6 +843,15 @@ declare class AppService {
|
|
|
765
843
|
color: ColorSource;
|
|
766
844
|
width: number;
|
|
767
845
|
};
|
|
846
|
+
mopPath: {
|
|
847
|
+
lineVisible: boolean;
|
|
848
|
+
lineColor: ColorSource;
|
|
849
|
+
lineWidth: number;
|
|
850
|
+
trackVisible: boolean;
|
|
851
|
+
trackColor: ColorSource;
|
|
852
|
+
trackAlpha: number;
|
|
853
|
+
trackWidth: number;
|
|
854
|
+
};
|
|
768
855
|
};
|
|
769
856
|
get carpetConfig(): {
|
|
770
857
|
src: string;
|
|
@@ -876,6 +963,7 @@ declare class AppService {
|
|
|
876
963
|
readonly roomPropertyFoldIds: readonly number[];
|
|
877
964
|
readonly roomSelectionMode: "checkmark" | "order";
|
|
878
965
|
readonly showRoomName: boolean;
|
|
966
|
+
readonly showRoomType: boolean;
|
|
879
967
|
readonly unit: MeasurementUnit_2;
|
|
880
968
|
readonly unitLabel: string;
|
|
881
969
|
readonly showRoomProperty: boolean;
|
|
@@ -928,6 +1016,7 @@ declare class AppService {
|
|
|
928
1016
|
toY: number;
|
|
929
1017
|
pathType?: string;
|
|
930
1018
|
};
|
|
1019
|
+
mapRotationUpdate: number;
|
|
931
1020
|
}>;
|
|
932
1021
|
/**
|
|
933
1022
|
* 获取充电桩位置(机器坐标系)
|
|
@@ -947,6 +1036,85 @@ declare class AppService {
|
|
|
947
1036
|
} | null;
|
|
948
1037
|
}
|
|
949
1038
|
|
|
1039
|
+
/**
|
|
1040
|
+
* 背景组件
|
|
1041
|
+
* 支持纯色背景、渐变背景和图片背景
|
|
1042
|
+
* 优先级:图片背景 > 渐变背景 > 纯色背景
|
|
1043
|
+
*/
|
|
1044
|
+
declare class Background extends Container {
|
|
1045
|
+
private graphics;
|
|
1046
|
+
private sprite;
|
|
1047
|
+
private viewportBounds;
|
|
1048
|
+
private lastConfig;
|
|
1049
|
+
private onImageLoaded?;
|
|
1050
|
+
constructor(config: AppConfig['global'], viewportBounds: {
|
|
1051
|
+
width: number;
|
|
1052
|
+
height: number;
|
|
1053
|
+
}, onImageLoaded?: () => void);
|
|
1054
|
+
/**
|
|
1055
|
+
* 渲染背景(根据优先级)
|
|
1056
|
+
*/
|
|
1057
|
+
private render;
|
|
1058
|
+
/**
|
|
1059
|
+
* 清空背景内容
|
|
1060
|
+
*/
|
|
1061
|
+
private clear;
|
|
1062
|
+
/**
|
|
1063
|
+
* 渲染纯色背景
|
|
1064
|
+
*/
|
|
1065
|
+
private renderSolidColor;
|
|
1066
|
+
/**
|
|
1067
|
+
* 渲染渐变背景
|
|
1068
|
+
*/
|
|
1069
|
+
private renderGradient;
|
|
1070
|
+
/**
|
|
1071
|
+
* 渲染图片背景
|
|
1072
|
+
*/
|
|
1073
|
+
private renderImage;
|
|
1074
|
+
/**
|
|
1075
|
+
* 销毁组件
|
|
1076
|
+
*/
|
|
1077
|
+
destroy(): void;
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
/**
|
|
1081
|
+
* 渐变背景配置
|
|
1082
|
+
*/
|
|
1083
|
+
export declare type BackgroundGradient = {
|
|
1084
|
+
/** 渐变类型 */
|
|
1085
|
+
type: 'linear' | 'radial'
|
|
1086
|
+
/** 线性渐变起点x (相对于视口宽度,0-1) */
|
|
1087
|
+
x0?: number
|
|
1088
|
+
/** 线性渐变起点y (相对于视口高度,0-1) */
|
|
1089
|
+
y0?: number
|
|
1090
|
+
/** 线性渐变终点x (相对于视口宽度,0-1) */
|
|
1091
|
+
x1?: number
|
|
1092
|
+
/** 线性渐变终点y (相对于视口高度,0-1) */
|
|
1093
|
+
y1?: number
|
|
1094
|
+
/** 径向渐变中心x (相对于视口宽度,0-1) */
|
|
1095
|
+
cx?: number
|
|
1096
|
+
/** 径向渐变中心y (相对于视口高度,0-1) */
|
|
1097
|
+
cy?: number
|
|
1098
|
+
/** 径向渐变半径 (相对于视口对角线长度,0-1) */
|
|
1099
|
+
r?: number
|
|
1100
|
+
/** 渐变色停靠点 */
|
|
1101
|
+
colorStops: Array<{ offset: number; color: ColorSource }>
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
/**
|
|
1105
|
+
* 图片背景配置
|
|
1106
|
+
*/
|
|
1107
|
+
export declare type BackgroundImage = {
|
|
1108
|
+
/** 图片URL */
|
|
1109
|
+
src: string
|
|
1110
|
+
/** 图片适应模式,默认'cover' */
|
|
1111
|
+
fit?: 'fill' | 'contain' | 'cover' | 'none'
|
|
1112
|
+
/** 图片位置(x, y为相对于视口的比例,0-1),默认居中(0.5, 0.5) */
|
|
1113
|
+
position?: { x: number; y: number }
|
|
1114
|
+
/** 是否重复平铺,默认false */
|
|
1115
|
+
repeat?: boolean
|
|
1116
|
+
}
|
|
1117
|
+
|
|
950
1118
|
declare abstract class BaseControlButton<T extends BaseControlButtonOptions = BaseControlButtonOptions> extends FixedSizeContainer {
|
|
951
1119
|
protected appService: AppService;
|
|
952
1120
|
protected background: Graphics;
|
|
@@ -1160,6 +1328,7 @@ export declare type ComponentPropsApp = {
|
|
|
1160
1328
|
/** 组件类型定义 */
|
|
1161
1329
|
declare type Components = {
|
|
1162
1330
|
viewportContainer: ViewportContainer;
|
|
1331
|
+
background: Background;
|
|
1163
1332
|
appContainer: AppContainer;
|
|
1164
1333
|
interaction: Interaction_2;
|
|
1165
1334
|
};
|
|
@@ -4286,6 +4455,8 @@ declare class Path extends Container {
|
|
|
4286
4455
|
private chargePath;
|
|
4287
4456
|
private transitionsPath;
|
|
4288
4457
|
private mopPath;
|
|
4458
|
+
private mopPathTrack;
|
|
4459
|
+
private mopPathTrackContainer;
|
|
4289
4460
|
private debugPoints;
|
|
4290
4461
|
private pathData;
|
|
4291
4462
|
private lastPointCount;
|
|
@@ -4840,6 +5011,10 @@ declare class RoomManager_2 {
|
|
|
4840
5011
|
* 更新特定房间的名称
|
|
4841
5012
|
*/
|
|
4842
5013
|
updateRoomName(roomId: number, name: string): void;
|
|
5014
|
+
/**
|
|
5015
|
+
* 更新特定房间的类型
|
|
5016
|
+
*/
|
|
5017
|
+
updateRoomType(roomId: number, type: number | null): Promise<void>;
|
|
4843
5018
|
/**
|
|
4844
5019
|
* 更新特定房间的位置
|
|
4845
5020
|
*/
|
|
@@ -4865,10 +5040,18 @@ declare class RoomManager_2 {
|
|
|
4865
5040
|
* 更新所有房间名称的可见性
|
|
4866
5041
|
*/
|
|
4867
5042
|
private updateAllRoomNameVisibility;
|
|
5043
|
+
/**
|
|
5044
|
+
* 更新所有房间类型图标的可见性
|
|
5045
|
+
*/
|
|
5046
|
+
private updateAllRoomTypeVisibility;
|
|
4868
5047
|
/**
|
|
4869
5048
|
* 更新所有房间选择指示器的可见性
|
|
4870
5049
|
*/
|
|
4871
5050
|
private updateAllRoomSelectionIndicatorVisibility;
|
|
5051
|
+
/**
|
|
5052
|
+
* 刷新所有房间颜色
|
|
5053
|
+
*/
|
|
5054
|
+
private refreshAllRoomColors;
|
|
4872
5055
|
/**
|
|
4873
5056
|
* 更新地板材质
|
|
4874
5057
|
* 在房间几何数据或属性数据更新后调用
|
|
@@ -4914,6 +5097,8 @@ export declare type RoomProperty = {
|
|
|
4914
5097
|
floorType: number
|
|
4915
5098
|
/** 拖地模式 */
|
|
4916
5099
|
yMop: number
|
|
5100
|
+
/** 房间类型 */
|
|
5101
|
+
type?: number | null
|
|
4917
5102
|
/** 自定义数据 */
|
|
4918
5103
|
|
|
4919
5104
|
customData?: Record<string, any>
|
|
@@ -4959,6 +5144,8 @@ export declare type RuntimeConfig = {
|
|
|
4959
5144
|
roomSelectionMode: 'checkmark' | 'order'
|
|
4960
5145
|
/** 是否显示房间名称 */
|
|
4961
5146
|
showRoomName: boolean
|
|
5147
|
+
/** 是否显示房间类型图标 */
|
|
5148
|
+
showRoomType: boolean
|
|
4962
5149
|
/** 测量单位 */
|
|
4963
5150
|
unit: MeasurementUnit
|
|
4964
5151
|
/** 单位标签 */
|