@ray-js/robot-map 0.0.2-beta-4 → 0.0.2-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/lib/RjsComponent/index.js +230 -0
- package/lib/RjsComponent/index.json +4 -0
- package/lib/RjsComponent/index.rjs +142 -0
- package/lib/RjsComponent/index.tyml +1 -0
- package/lib/RjsComponent/index.tyss +5 -0
- package/lib/RjsRobotMap.d.ts +5 -0
- package/lib/RjsRobotMap.js +98 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import "core-js/modules/esnext.iterator.constructor.js";
|
|
2
|
+
import "core-js/modules/esnext.iterator.for-each.js";
|
|
3
|
+
import "core-js/modules/esnext.iterator.map.js";
|
|
4
|
+
import "core-js/modules/web.dom-collections.iterator.js";
|
|
5
|
+
/* eslint-disable func-names */
|
|
6
|
+
import Render from './index.rjs';
|
|
7
|
+
import { MAP_API_METHODS, MAP_CALLBACK_METHODS } from '@ray-js/robot-map-sdk';
|
|
8
|
+
const componentOptions = {
|
|
9
|
+
options: {
|
|
10
|
+
pureDataPattern: /^init$/
|
|
11
|
+
},
|
|
12
|
+
data: {
|
|
13
|
+
initialized: false,
|
|
14
|
+
mapApi: null
|
|
15
|
+
},
|
|
16
|
+
properties: {
|
|
17
|
+
path: {
|
|
18
|
+
type: String,
|
|
19
|
+
observer: function (newValue, oldValue) {
|
|
20
|
+
if (newValue !== oldValue && this.data.initialized && this.render) {
|
|
21
|
+
this.render.onReceivePath(newValue);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
map: {
|
|
26
|
+
type: String,
|
|
27
|
+
observer: function (newValue, oldValue) {
|
|
28
|
+
if (newValue !== oldValue && this.data.initialized && this.render) {
|
|
29
|
+
this.render.onReceiveMap(newValue);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
roomProperties: {
|
|
34
|
+
type: Array,
|
|
35
|
+
observer: function (newValue, oldValue) {
|
|
36
|
+
if (newValue !== oldValue && this.data.initialized && this.render) {
|
|
37
|
+
this.render.onReceiveRoomProperties(newValue);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
forbiddenSweepZones: {
|
|
42
|
+
type: Array,
|
|
43
|
+
observer: function (newValue, oldValue) {
|
|
44
|
+
if (newValue !== oldValue && this.data.initialized && this.render) {
|
|
45
|
+
this.render.onReceiveForbiddenSweepZones(newValue);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
forbiddenMopZones: {
|
|
50
|
+
type: Array,
|
|
51
|
+
observer: function (newValue, oldValue) {
|
|
52
|
+
if (newValue !== oldValue && this.data.initialized && this.render) {
|
|
53
|
+
this.render.onReceiveForbiddenMopZones(newValue);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
cleanZones: {
|
|
58
|
+
type: Array,
|
|
59
|
+
observer: function (newValue, oldValue) {
|
|
60
|
+
if (newValue !== oldValue && this.data.initialized && this.render) {
|
|
61
|
+
this.render.onReceiveCleanZones(newValue);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
spots: {
|
|
66
|
+
type: Array,
|
|
67
|
+
observer: function (newValue, oldValue) {
|
|
68
|
+
if (newValue !== oldValue && this.data.initialized && this.render) {
|
|
69
|
+
this.render.onReceiveSpots(newValue);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
virtualWalls: {
|
|
74
|
+
type: Array,
|
|
75
|
+
observer: function (newValue, oldValue) {
|
|
76
|
+
if (newValue !== oldValue && this.data.initialized && this.render) {
|
|
77
|
+
this.render.onReceiveVirtualWalls(newValue);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
detectedObjects: {
|
|
82
|
+
type: Array,
|
|
83
|
+
observer: function (newValue, oldValue) {
|
|
84
|
+
if (newValue !== oldValue && this.data.initialized && this.render) {
|
|
85
|
+
this.render.onReceiveDetectedObjects(newValue);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
customElements: {
|
|
90
|
+
type: Array,
|
|
91
|
+
observer: function (newValue, oldValue) {
|
|
92
|
+
if (newValue !== oldValue && this.data.initialized && this.render) {
|
|
93
|
+
this.render.onReceiveCustomElements(newValue);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
config: {
|
|
98
|
+
type: Object,
|
|
99
|
+
observer: function () {
|
|
100
|
+
// config在初始化时设置,不需要动态更新
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
runtime: {
|
|
104
|
+
type: Object,
|
|
105
|
+
observer: function (newValue, oldValue) {
|
|
106
|
+
if (newValue !== oldValue && this.data.initialized && this.render) {
|
|
107
|
+
this.render.onUpdateRuntime(newValue);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
lifetimes: {
|
|
113
|
+
created() {
|
|
114
|
+
this.render = new Render(this);
|
|
115
|
+
this.mapApi = null;
|
|
116
|
+
},
|
|
117
|
+
async ready() {
|
|
118
|
+
const config = this.properties.config || {};
|
|
119
|
+
await this.render.initialize(config);
|
|
120
|
+
this.setData({
|
|
121
|
+
initialized: true
|
|
122
|
+
});
|
|
123
|
+
if (this.data.map) {
|
|
124
|
+
this.render.onReceiveMap(this.data.map);
|
|
125
|
+
}
|
|
126
|
+
if (this.data.path) {
|
|
127
|
+
this.render.onReceivePath(this.data.path);
|
|
128
|
+
}
|
|
129
|
+
if (this.data.roomProperties) {
|
|
130
|
+
this.render.onReceiveRoomProperties(this.data.roomProperties);
|
|
131
|
+
}
|
|
132
|
+
if (this.data.forbiddenSweepZones) {
|
|
133
|
+
this.render.onReceiveForbiddenSweepZones(this.data.forbiddenSweepZones);
|
|
134
|
+
}
|
|
135
|
+
if (this.data.forbiddenMopZones) {
|
|
136
|
+
this.render.onReceiveForbiddenMopZones(this.data.forbiddenMopZones);
|
|
137
|
+
}
|
|
138
|
+
if (this.data.cleanZones) {
|
|
139
|
+
this.render.onReceiveCleanZones(this.data.cleanZones);
|
|
140
|
+
}
|
|
141
|
+
if (this.data.virtualWalls) {
|
|
142
|
+
this.render.onReceiveVirtualWalls(this.data.virtualWalls);
|
|
143
|
+
}
|
|
144
|
+
if (this.data.spots) {
|
|
145
|
+
this.render.onReceiveSpots(this.data.spots);
|
|
146
|
+
}
|
|
147
|
+
if (this.data.detectedObjects) {
|
|
148
|
+
this.render.onReceiveDetectedObjects(this.data.detectedObjects);
|
|
149
|
+
}
|
|
150
|
+
if (this.data.customElements) {
|
|
151
|
+
this.render.onReceiveCustomElements(this.data.customElements);
|
|
152
|
+
}
|
|
153
|
+
if (this.data.runtime) {
|
|
154
|
+
this.render.onUpdateRuntime(this.data.runtime);
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
detached() {
|
|
158
|
+
if (this.render) {
|
|
159
|
+
this.render.destroy();
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
pageLifetimes: {},
|
|
164
|
+
methods: {
|
|
165
|
+
// 为 render 对象动态添加 API 代理方法
|
|
166
|
+
setupApiProxyMethods() {
|
|
167
|
+
const {
|
|
168
|
+
render
|
|
169
|
+
} = this;
|
|
170
|
+
if (!render) {
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// 如果已经设置过,不重复设置(使用标记避免重复执行)
|
|
175
|
+
if (render.__apiProxyMethodsSetup) {
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
MAP_API_METHODS.forEach(methodName => {
|
|
179
|
+
// 为 this.render 添加代理方法,通过 callMapInstanceMethod 来间接调用
|
|
180
|
+
// 因为 render.mapInstance 在外部无法访问(封装的私有属性)
|
|
181
|
+
render[methodName] = function () {
|
|
182
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
183
|
+
args[_key] = arguments[_key];
|
|
184
|
+
}
|
|
185
|
+
return render.callMapInstanceMethod(methodName, ...args);
|
|
186
|
+
};
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
// 标记已设置,避免重复执行
|
|
190
|
+
render.__apiProxyMethodsSetup = true;
|
|
191
|
+
},
|
|
192
|
+
// 创建MapApi对象,将rjs方法映射为API
|
|
193
|
+
createMapApi() {
|
|
194
|
+
if (!this.render) {
|
|
195
|
+
return null;
|
|
196
|
+
}
|
|
197
|
+
const mapApi = {};
|
|
198
|
+
MAP_API_METHODS.forEach(methodName => {
|
|
199
|
+
// 将方法绑定到 this.render,这样调用时会通过 render 代理到 mapInstance
|
|
200
|
+
if (typeof this.render[methodName] === 'function') {
|
|
201
|
+
mapApi[methodName] = this.render[methodName].bind(this.render);
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
return mapApi;
|
|
205
|
+
},
|
|
206
|
+
// 处理rjs回调事件
|
|
207
|
+
onInitialized() {
|
|
208
|
+
// 确保代理方法已设置(防止时序问题)
|
|
209
|
+
this.setupApiProxyMethods();
|
|
210
|
+
this.mapApi = this.createMapApi();
|
|
211
|
+
this.setData({
|
|
212
|
+
mapApi: this.mapApi
|
|
213
|
+
});
|
|
214
|
+
this.triggerEvent('onInitialized', this.mapApi);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
// 动态添加所有 MAP_CALLBACK_METHODS 中定义的回调方法
|
|
220
|
+
MAP_CALLBACK_METHODS.forEach(methodName => {
|
|
221
|
+
componentOptions.methods[methodName] = function () {
|
|
222
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
223
|
+
args[_key2] = arguments[_key2];
|
|
224
|
+
}
|
|
225
|
+
this.triggerEvent(methodName, ...args);
|
|
226
|
+
};
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
// eslint-disable-next-line no-undef
|
|
230
|
+
Component(componentOptions);
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { MapApplication, MAP_API_METHODS, MAP_CALLBACK_METHODS } from "@ray-js/robot-map-sdk/rjs";
|
|
2
|
+
import { decodeMap, decodeMapStructured, decodePath } from '@ray-js/robot-protocol'
|
|
3
|
+
|
|
4
|
+
export default Render({
|
|
5
|
+
mapInstance: null,
|
|
6
|
+
initialized: false,
|
|
7
|
+
|
|
8
|
+
async initialize(config = {}) {
|
|
9
|
+
const { mapInstance } = this;
|
|
10
|
+
|
|
11
|
+
if (mapInstance) {
|
|
12
|
+
console.warn('Map instance already initialized')
|
|
13
|
+
return
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
this.mapInstance = new MapApplication()
|
|
17
|
+
const containerElement = document.getElementById('container')
|
|
18
|
+
|
|
19
|
+
// 定义事件处理器
|
|
20
|
+
const events = {}
|
|
21
|
+
|
|
22
|
+
// 使用从SDK导入的回调方法
|
|
23
|
+
MAP_CALLBACK_METHODS.forEach(methodName => {
|
|
24
|
+
events[methodName] = (...args) => {
|
|
25
|
+
// 通过callMethod与ts通信
|
|
26
|
+
this.callMethod(methodName, ...args)
|
|
27
|
+
}
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
await this.mapInstance.initialize({
|
|
31
|
+
resizeTo: containerElement ?? window,
|
|
32
|
+
events,
|
|
33
|
+
config,
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
if (containerElement) {
|
|
37
|
+
containerElement.appendChild(this.mapInstance.canvas)
|
|
38
|
+
} else {
|
|
39
|
+
document.body.appendChild(this.mapInstance.canvas)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
this.initialized = true
|
|
43
|
+
this.callMethod('onInitialized')
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
// 接收地图数据
|
|
47
|
+
onReceiveMap(map) {
|
|
48
|
+
if (!this.mapInstance || !map) return
|
|
49
|
+
|
|
50
|
+
if (map.startsWith('7b22')) {
|
|
51
|
+
// 结构化协议地图数据
|
|
52
|
+
this.mapInstance.drawMap(decodeMapStructured(map))
|
|
53
|
+
} else {
|
|
54
|
+
// 点云结构地图数据
|
|
55
|
+
const rasterMapData = decodeMap(map)
|
|
56
|
+
if (rasterMapData) {
|
|
57
|
+
this.mapInstance.drawRasterMap(rasterMapData)
|
|
58
|
+
} else {
|
|
59
|
+
console.error('Failed to decode raster map data')
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
|
|
64
|
+
// 接收路径数据
|
|
65
|
+
onReceivePath(path) {
|
|
66
|
+
if (!this.mapInstance || !path) return
|
|
67
|
+
this.mapInstance.drawPath(decodePath(path))
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
// 接收房间属性
|
|
71
|
+
onReceiveRoomProperties(roomProperties) {
|
|
72
|
+
if (!this.mapInstance || !roomProperties) return
|
|
73
|
+
this.mapInstance.drawRoomProperty(roomProperties)
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
// 接收禁扫区域
|
|
77
|
+
onReceiveForbiddenSweepZones(zones) {
|
|
78
|
+
if (!this.mapInstance || !zones) return
|
|
79
|
+
this.mapInstance.drawForbiddenSweepZones(zones)
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
// 接收禁拖区域
|
|
83
|
+
onReceiveForbiddenMopZones(zones) {
|
|
84
|
+
if (!this.mapInstance || !zones) return
|
|
85
|
+
this.mapInstance.drawForbiddenMopZones(zones)
|
|
86
|
+
},
|
|
87
|
+
|
|
88
|
+
// 接收清洁区域
|
|
89
|
+
onReceiveCleanZones(zones) {
|
|
90
|
+
if (!this.mapInstance || !zones) return
|
|
91
|
+
this.mapInstance.drawCleanZones(zones)
|
|
92
|
+
},
|
|
93
|
+
|
|
94
|
+
// 接收虚拟墙
|
|
95
|
+
onReceiveVirtualWalls(walls) {
|
|
96
|
+
if (!this.mapInstance || !walls) return
|
|
97
|
+
this.mapInstance.drawVirtualWalls(walls)
|
|
98
|
+
},
|
|
99
|
+
|
|
100
|
+
// 接收定点清扫
|
|
101
|
+
onReceiveSpots(spots) {
|
|
102
|
+
if (!this.mapInstance || !spots) return
|
|
103
|
+
this.mapInstance.drawSpots(spots)
|
|
104
|
+
},
|
|
105
|
+
|
|
106
|
+
// 接收检测对象
|
|
107
|
+
onReceiveDetectedObjects(objects) {
|
|
108
|
+
if (!this.mapInstance || !objects) return
|
|
109
|
+
this.mapInstance.drawDetectedObjects(objects)
|
|
110
|
+
},
|
|
111
|
+
|
|
112
|
+
// 接收自定义元素
|
|
113
|
+
onReceiveCustomElements(elements) {
|
|
114
|
+
if (!this.mapInstance || !elements) return
|
|
115
|
+
this.mapInstance.drawCustomElements(elements)
|
|
116
|
+
},
|
|
117
|
+
|
|
118
|
+
// 更新运行时配置
|
|
119
|
+
onUpdateRuntime(runtime) {
|
|
120
|
+
if (!this.mapInstance || !runtime) return
|
|
121
|
+
this.mapInstance.updateRuntime(runtime)
|
|
122
|
+
},
|
|
123
|
+
|
|
124
|
+
// 销毁地图实例
|
|
125
|
+
destroy() {
|
|
126
|
+
if (this.mapInstance) {
|
|
127
|
+
this.mapInstance.destroy()
|
|
128
|
+
this.mapInstance = null
|
|
129
|
+
this.initialized = false
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
|
|
133
|
+
// 通用的 API 调用方法,用于代理所有 mapInstance 上的方法
|
|
134
|
+
// 因为外部无法直接访问 this.mapInstance,所以提供这个方法来间接调用
|
|
135
|
+
callMapInstanceMethod(methodName, ...args) {
|
|
136
|
+
if (this.mapInstance && typeof this.mapInstance[methodName] === 'function') {
|
|
137
|
+
return this.mapInstance[methodName](...args)
|
|
138
|
+
}
|
|
139
|
+
console.warn(`Method ${methodName} not available on mapInstance`)
|
|
140
|
+
return null
|
|
141
|
+
}
|
|
142
|
+
})
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<view id="container" />
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
|
+
const _excluded = ["map", "path", "roomProperties", "forbiddenSweepZones", "forbiddenMopZones", "cleanZones", "virtualWalls", "spots", "detectedObjects", "customElements", "config", "runtime", "onMapReady"];
|
|
5
|
+
import "core-js/modules/esnext.iterator.constructor.js";
|
|
6
|
+
import "core-js/modules/esnext.iterator.for-each.js";
|
|
7
|
+
import "core-js/modules/esnext.iterator.map.js";
|
|
8
|
+
import "core-js/modules/esnext.iterator.reduce.js";
|
|
9
|
+
import "core-js/modules/web.dom-collections.iterator.js";
|
|
10
|
+
import React, { useCallback, useEffect, useRef, useMemo } from 'react';
|
|
11
|
+
import { MAP_CALLBACK_METHODS } from '@ray-js/robot-map-sdk';
|
|
12
|
+
import RjsComponent from './RjsComponent';
|
|
13
|
+
import { robotMapDefaultProps } from './props';
|
|
14
|
+
|
|
15
|
+
// 回调名到事件名的映射
|
|
16
|
+
const CALLBACK_TO_EVENT_MAP = _objectSpread({
|
|
17
|
+
onInitialized: 'onInitialized'
|
|
18
|
+
}, MAP_CALLBACK_METHODS.reduce((acc, methodName) => {
|
|
19
|
+
acc[methodName] = methodName;
|
|
20
|
+
return acc;
|
|
21
|
+
}, {}));
|
|
22
|
+
const RjsRobotMap = _ref => {
|
|
23
|
+
let {
|
|
24
|
+
map,
|
|
25
|
+
path,
|
|
26
|
+
roomProperties,
|
|
27
|
+
forbiddenSweepZones,
|
|
28
|
+
forbiddenMopZones,
|
|
29
|
+
cleanZones,
|
|
30
|
+
virtualWalls,
|
|
31
|
+
spots,
|
|
32
|
+
detectedObjects,
|
|
33
|
+
customElements,
|
|
34
|
+
config,
|
|
35
|
+
runtime,
|
|
36
|
+
onMapReady
|
|
37
|
+
} = _ref,
|
|
38
|
+
callbacks = _objectWithoutProperties(_ref, _excluded);
|
|
39
|
+
const componentRef = useRef(null);
|
|
40
|
+
const callbacksRef = useRef(callbacks);
|
|
41
|
+
|
|
42
|
+
// 更新回调引用
|
|
43
|
+
useEffect(() => {
|
|
44
|
+
callbacksRef.current = callbacks;
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
// 事件分发函数 - 这个函数是稳定的,不会随渲染变化
|
|
48
|
+
const eventDispatcher = useCallback(function (eventName) {
|
|
49
|
+
const propName = CALLBACK_TO_EVENT_MAP[eventName];
|
|
50
|
+
if (propName && callbacksRef.current[propName]) {
|
|
51
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
52
|
+
args[_key - 1] = arguments[_key];
|
|
53
|
+
}
|
|
54
|
+
// 调用最新的prop回调
|
|
55
|
+
callbacksRef.current[propName](...args);
|
|
56
|
+
}
|
|
57
|
+
}, []);
|
|
58
|
+
|
|
59
|
+
// 处理初始化完成事件
|
|
60
|
+
const handleInitialized = useCallback(event => {
|
|
61
|
+
const api = event.detail;
|
|
62
|
+
onMapReady === null || onMapReady === void 0 || onMapReady(api);
|
|
63
|
+
eventDispatcher('onInitialized', api);
|
|
64
|
+
}, [onMapReady, eventDispatcher]);
|
|
65
|
+
|
|
66
|
+
// 动态生成所有回调处理函数的绑定属性
|
|
67
|
+
const eventBindings = useMemo(() => {
|
|
68
|
+
const bindings = {
|
|
69
|
+
bindonInitialized: handleInitialized
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
// 为 MAP_CALLBACK_METHODS 中的每个方法创建绑定
|
|
73
|
+
MAP_CALLBACK_METHODS.forEach(methodName => {
|
|
74
|
+
bindings["bind".concat(methodName)] = event => {
|
|
75
|
+
eventDispatcher(methodName, event.detail);
|
|
76
|
+
};
|
|
77
|
+
});
|
|
78
|
+
return bindings;
|
|
79
|
+
}, [handleInitialized, eventDispatcher]);
|
|
80
|
+
return /*#__PURE__*/React.createElement(RjsComponent, _extends({
|
|
81
|
+
ref: componentRef,
|
|
82
|
+
map: map,
|
|
83
|
+
path: path,
|
|
84
|
+
roomProperties: roomProperties,
|
|
85
|
+
forbiddenSweepZones: forbiddenSweepZones,
|
|
86
|
+
forbiddenMopZones: forbiddenMopZones,
|
|
87
|
+
cleanZones: cleanZones,
|
|
88
|
+
virtualWalls: virtualWalls,
|
|
89
|
+
spots: spots,
|
|
90
|
+
detectedObjects: detectedObjects,
|
|
91
|
+
customElements: customElements,
|
|
92
|
+
config: config,
|
|
93
|
+
runtime: runtime
|
|
94
|
+
}, eventBindings));
|
|
95
|
+
};
|
|
96
|
+
RjsRobotMap.defaultProps = robotMapDefaultProps;
|
|
97
|
+
RjsRobotMap.displayName = 'RjsRobotMap';
|
|
98
|
+
export default RjsRobotMap;
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ray-js/robot-map",
|
|
3
|
-
"version": "0.0.2-beta-
|
|
3
|
+
"version": "0.0.2-beta-6",
|
|
4
4
|
"description": "机器人地图组件",
|
|
5
5
|
"main": "lib/index",
|
|
6
6
|
"files": [
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@ray-js/ray": "^1.7.39"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@ray-js/robot-map-sdk": "0.0.
|
|
35
|
+
"@ray-js/robot-map-sdk": "0.0.3-beta-5",
|
|
36
36
|
"clsx": "^1.2.1",
|
|
37
37
|
"nanoid": "^5.1.6"
|
|
38
38
|
},
|