@ray-js/robot-map 0.0.2-beta-26 → 0.0.2-beta-28

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.
@@ -1,3 +1,4 @@
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
1
2
  import "core-js/modules/esnext.iterator.constructor.js";
2
3
  import "core-js/modules/esnext.iterator.for-each.js";
3
4
  import "core-js/modules/esnext.iterator.map.js";
@@ -105,7 +106,11 @@ const componentOptions = {
105
106
  type: Object,
106
107
  observer: function (newValue, oldValue) {
107
108
  if (!isEqual(newValue, oldValue) && this.data.initialized && this.render) {
108
- this.render.onUpdateRuntime(newValue);
109
+ var _newValue$dividingRoo;
110
+ this.render.onUpdateRuntime(_objectSpread(_objectSpread({}, newValue), {}, {
111
+ // 最初版本定义null为不显示分割线,但安卓在message序列化的过程中,null会被序列化为undefined导致丢失,在组件兼容处理成-1
112
+ dividingRoomId: (_newValue$dividingRoo = newValue.dividingRoomId) !== null && _newValue$dividingRoo !== void 0 ? _newValue$dividingRoo : -1
113
+ }));
109
114
  }
110
115
  }
111
116
  }
@@ -152,7 +157,11 @@ const componentOptions = {
152
157
  this.render.onReceiveCustomElements(this.data.customElements);
153
158
  }
154
159
  if (this.data.runtime) {
155
- this.render.onUpdateRuntime(this.data.runtime);
160
+ var _this$data$runtime$di;
161
+ this.render.onUpdateRuntime(_objectSpread(_objectSpread({}, this.data.runtime), {}, {
162
+ // 最初版本定义null为不显示分割线,但安卓在message序列化的过程中,null会被序列化为undefined导致丢失,在组件兼容处理成-1
163
+ dividingRoomId: (_this$data$runtime$di = this.data.runtime.dividingRoomId) !== null && _this$data$runtime$di !== void 0 ? _this$data$runtime$di : -1
164
+ }));
156
165
  }
157
166
  },
158
167
  detached() {
package/lib/RobotMap.js CHANGED
@@ -172,7 +172,11 @@ const RobotMap = _ref => {
172
172
  }, [customElements, mapApi]);
173
173
  useEffect(() => {
174
174
  if (mapApi && runtime) {
175
- triggersRef.current.onUpdateRuntime(runtime);
175
+ var _runtime$dividingRoom;
176
+ triggersRef.current.onUpdateRuntime(_objectSpread(_objectSpread({}, runtime), {}, {
177
+ // 最初版本定义null为不显示分割线,但安卓在message序列化的过程中,null会被序列化为undefined导致丢失,在组件兼容处理成-1
178
+ dividingRoomId: (_runtime$dividingRoom = runtime.dividingRoomId) !== null && _runtime$dividingRoom !== void 0 ? _runtime$dividingRoom : -1
179
+ }));
176
180
  }
177
181
  }, [runtime, mapApi]);
178
182
  useEffect(() => {
@@ -182,10 +186,10 @@ const RobotMap = _ref => {
182
186
  }, 2000);
183
187
  }
184
188
  }, [mapApi]);
185
- return /*#__PURE__*/React.createElement(WebView, {
186
- src: "webview://node_modules/@ray-js/robot-map-sdk/dist-app/index.html"
187
- // src="http://127.0.0.1:3000"
188
- ,
189
+ return /*#__PURE__*/React.createElement(WebView
190
+ // src="webview://node_modules/@ray-js/robot-map-sdk/dist-app/index.html"
191
+ , {
192
+ src: "http://127.0.0.1:3000",
189
193
  id: webviewId,
190
194
  onMessage: handleMessage
191
195
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/robot-map",
3
- "version": "0.0.2-beta-26",
3
+ "version": "0.0.2-beta-28",
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.3-beta-33",
35
+ "@ray-js/robot-map-sdk": "0.0.3-beta-36",
36
36
  "clsx": "^1.2.1",
37
37
  "nanoid": "^5.1.6"
38
38
  },