@ray-js/robot-map-sdk 0.0.6-beta.9 → 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 +189 -6
- 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.g2Gsm1cw.js → app.XWdqe1Jg.js} +1 -1
- package/dist-docs/assets/chunks/@localSearchIndexroot.jsScsXKs.js +1 -0
- package/dist-docs/assets/chunks/{VPLocalSearchBox.D6yY27Bi.js → VPLocalSearchBox.BiAazhoT.js} +1 -1
- package/dist-docs/assets/chunks/{theme.cOQ0MIdz.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.D-9Gpo4C.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-BvVICa9W.js +0 -1
- package/dist-docs/assets/chunks/@localSearchIndexroot.ChOal0gd.js +0 -1
- package/dist-docs/assets/reference_config.md.JxMWs65h.js +0 -67
- package/dist-docs/assets/reference_config.md.JxMWs65h.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.D-9Gpo4C.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
|
/** 选择指示器图标颜色 */
|
|
@@ -140,7 +160,7 @@ export declare type AppConfig = {
|
|
|
140
160
|
/** 未知房间特殊颜色 */
|
|
141
161
|
[SPECIAL_ROOM_IDS.UNKNOWN_ROOM]: string
|
|
142
162
|
/** 不稳定房间特殊颜色(建图中) */
|
|
143
|
-
[SPECIAL_ROOM_IDS.
|
|
163
|
+
[SPECIAL_ROOM_IDS.VERSION0_ROOM]: string
|
|
144
164
|
}
|
|
145
165
|
/** 房间名称配置 */
|
|
146
166
|
nameLabel: {
|
|
@@ -151,6 +171,26 @@ export declare type AppConfig = {
|
|
|
151
171
|
/** 字体粗细 */
|
|
152
172
|
fontWeight: TextStyleFontWeight
|
|
153
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
|
+
}
|
|
154
194
|
/** 房间属性配置 */
|
|
155
195
|
property: {
|
|
156
196
|
/** 显示顺序(支持内置字段和自定义字段名) */
|
|
@@ -332,6 +372,23 @@ export declare type AppConfig = {
|
|
|
332
372
|
/** 宽度 */
|
|
333
373
|
width: number
|
|
334
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
|
+
}
|
|
335
392
|
}
|
|
336
393
|
|
|
337
394
|
/** 地毯配置 */
|
|
@@ -642,7 +699,9 @@ declare class AppService {
|
|
|
642
699
|
containerLeft: string;
|
|
643
700
|
containerWidth: string;
|
|
644
701
|
containerHeight: string;
|
|
645
|
-
backgroundColor
|
|
702
|
+
backgroundColor?: ColorSource;
|
|
703
|
+
backgroundGradient?: BackgroundGradient_2;
|
|
704
|
+
backgroundImage?: BackgroundImage_2;
|
|
646
705
|
backgroundAlpha: number;
|
|
647
706
|
performanceMode: boolean;
|
|
648
707
|
resolution: number;
|
|
@@ -667,21 +726,37 @@ declare class AppService {
|
|
|
667
726
|
strategy: "priority" | "balanced";
|
|
668
727
|
active: string[];
|
|
669
728
|
inactive: string[];
|
|
729
|
+
normal?: string[];
|
|
670
730
|
name: string[];
|
|
731
|
+
nameInactive?: string[];
|
|
732
|
+
nameNormal?: string[];
|
|
671
733
|
propertyTheme: string[];
|
|
734
|
+
propertyThemeInactive?: string[];
|
|
735
|
+
propertyThemeNormal?: string[];
|
|
672
736
|
selectionIndicatorBackground: string[];
|
|
673
737
|
selectionIndicatorIcon: string[];
|
|
674
738
|
NO_ROOM_DATA: string;
|
|
675
739
|
ROOM_GAP: string;
|
|
676
740
|
OBSTACLE_ROOM: string;
|
|
677
741
|
UNKNOWN_ROOM: string;
|
|
678
|
-
|
|
742
|
+
VERSION0_ROOM: string;
|
|
679
743
|
};
|
|
680
744
|
nameLabel: {
|
|
681
745
|
fontSize: number;
|
|
682
746
|
fontFamily: string;
|
|
683
747
|
fontWeight: TextStyleFontWeight;
|
|
684
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
|
+
};
|
|
685
760
|
property: {
|
|
686
761
|
displayOrders: ("cleanMode" | "suction" | "cistern" | "cleanTimes" | string)[];
|
|
687
762
|
iconWidth: number;
|
|
@@ -768,6 +843,15 @@ declare class AppService {
|
|
|
768
843
|
color: ColorSource;
|
|
769
844
|
width: number;
|
|
770
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
|
+
};
|
|
771
855
|
};
|
|
772
856
|
get carpetConfig(): {
|
|
773
857
|
src: string;
|
|
@@ -879,6 +963,7 @@ declare class AppService {
|
|
|
879
963
|
readonly roomPropertyFoldIds: readonly number[];
|
|
880
964
|
readonly roomSelectionMode: "checkmark" | "order";
|
|
881
965
|
readonly showRoomName: boolean;
|
|
966
|
+
readonly showRoomType: boolean;
|
|
882
967
|
readonly unit: MeasurementUnit_2;
|
|
883
968
|
readonly unitLabel: string;
|
|
884
969
|
readonly showRoomProperty: boolean;
|
|
@@ -951,6 +1036,85 @@ declare class AppService {
|
|
|
951
1036
|
} | null;
|
|
952
1037
|
}
|
|
953
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
|
+
|
|
954
1118
|
declare abstract class BaseControlButton<T extends BaseControlButtonOptions = BaseControlButtonOptions> extends FixedSizeContainer {
|
|
955
1119
|
protected appService: AppService;
|
|
956
1120
|
protected background: Graphics;
|
|
@@ -1164,6 +1328,7 @@ export declare type ComponentPropsApp = {
|
|
|
1164
1328
|
/** 组件类型定义 */
|
|
1165
1329
|
declare type Components = {
|
|
1166
1330
|
viewportContainer: ViewportContainer;
|
|
1331
|
+
background: Background;
|
|
1167
1332
|
appContainer: AppContainer;
|
|
1168
1333
|
interaction: Interaction_2;
|
|
1169
1334
|
};
|
|
@@ -4290,6 +4455,8 @@ declare class Path extends Container {
|
|
|
4290
4455
|
private chargePath;
|
|
4291
4456
|
private transitionsPath;
|
|
4292
4457
|
private mopPath;
|
|
4458
|
+
private mopPathTrack;
|
|
4459
|
+
private mopPathTrackContainer;
|
|
4293
4460
|
private debugPoints;
|
|
4294
4461
|
private pathData;
|
|
4295
4462
|
private lastPointCount;
|
|
@@ -4844,6 +5011,10 @@ declare class RoomManager_2 {
|
|
|
4844
5011
|
* 更新特定房间的名称
|
|
4845
5012
|
*/
|
|
4846
5013
|
updateRoomName(roomId: number, name: string): void;
|
|
5014
|
+
/**
|
|
5015
|
+
* 更新特定房间的类型
|
|
5016
|
+
*/
|
|
5017
|
+
updateRoomType(roomId: number, type: number | null): Promise<void>;
|
|
4847
5018
|
/**
|
|
4848
5019
|
* 更新特定房间的位置
|
|
4849
5020
|
*/
|
|
@@ -4869,10 +5040,18 @@ declare class RoomManager_2 {
|
|
|
4869
5040
|
* 更新所有房间名称的可见性
|
|
4870
5041
|
*/
|
|
4871
5042
|
private updateAllRoomNameVisibility;
|
|
5043
|
+
/**
|
|
5044
|
+
* 更新所有房间类型图标的可见性
|
|
5045
|
+
*/
|
|
5046
|
+
private updateAllRoomTypeVisibility;
|
|
4872
5047
|
/**
|
|
4873
5048
|
* 更新所有房间选择指示器的可见性
|
|
4874
5049
|
*/
|
|
4875
5050
|
private updateAllRoomSelectionIndicatorVisibility;
|
|
5051
|
+
/**
|
|
5052
|
+
* 刷新所有房间颜色
|
|
5053
|
+
*/
|
|
5054
|
+
private refreshAllRoomColors;
|
|
4876
5055
|
/**
|
|
4877
5056
|
* 更新地板材质
|
|
4878
5057
|
* 在房间几何数据或属性数据更新后调用
|
|
@@ -4918,6 +5097,8 @@ export declare type RoomProperty = {
|
|
|
4918
5097
|
floorType: number
|
|
4919
5098
|
/** 拖地模式 */
|
|
4920
5099
|
yMop: number
|
|
5100
|
+
/** 房间类型 */
|
|
5101
|
+
type?: number | null
|
|
4921
5102
|
/** 自定义数据 */
|
|
4922
5103
|
|
|
4923
5104
|
customData?: Record<string, any>
|
|
@@ -4963,6 +5144,8 @@ export declare type RuntimeConfig = {
|
|
|
4963
5144
|
roomSelectionMode: 'checkmark' | 'order'
|
|
4964
5145
|
/** 是否显示房间名称 */
|
|
4965
5146
|
showRoomName: boolean
|
|
5147
|
+
/** 是否显示房间类型图标 */
|
|
5148
|
+
showRoomType: boolean
|
|
4966
5149
|
/** 测量单位 */
|
|
4967
5150
|
unit: MeasurementUnit
|
|
4968
5151
|
/** 单位标签 */
|