@textbus/collaborate 5.3.3 → 5.4.0

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/index.esm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Injectable, Inject, Optional } from '@viewfly/core';
2
- import { makeError, Slot, ChangeOrigin, observe, AsyncSlot, AsyncComponent, Component, toRaw, getObserver, attachModel, valueToJSON, Scheduler, Registry, Selection, HISTORY_STACK_SIZE, RootComponentRef, History } from '@textbus/core';
2
+ import { makeError, Slot, ChangeOrigin, toRaw, observe, AsyncSlot, AsyncComponent, Component, getObserver, attachModel, valueToJSON, Scheduler, Registry, Selection, HISTORY_STACK_SIZE, RootComponentRef, History } from '@textbus/core';
3
3
  import { Subject, map, filter, Subscription } from '@tanbo/stream';
4
4
  import { Doc, createAbsolutePositionFromRelativePosition, createRelativePositionFromTypeIndex, Map, Array as Array$1, Text, XmlElement, UndoManager } from 'yjs';
5
5
  import { HocuspocusProvider } from '@hocuspocus/provider';
@@ -679,7 +679,7 @@ var Collaborate = /*#__PURE__*/ function() {
679
679
  value: function syncSharedMapToLocalMap(sharedMap, localMap) {
680
680
  var _this = this;
681
681
  sharedMap.forEach(function(value, key) {
682
- localMap[key] = _this.createLocalModelBySharedByModel(value);
682
+ localMap[key] = toRaw(_this.createLocalModelBySharedByModel(value));
683
683
  });
684
684
  this.syncObject(sharedMap, localMap);
685
685
  }
@@ -699,7 +699,7 @@ var Collaborate = /*#__PURE__*/ function() {
699
699
  for(var i = 0; i < sharedArray.length; i++){
700
700
  var item = sharedArray.get(i);
701
701
  if (!this.isArrayHoleElement(item)) {
702
- raw[i] = this.createLocalModelBySharedByModel(item);
702
+ raw[i] = toRaw(this.createLocalModelBySharedByModel(item));
703
703
  }
704
704
  }
705
705
  raw.length = sharedArray.length;