@opentiny/vue-renderless 3.11.1 → 3.11.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentiny/vue-renderless",
3
- "version": "3.11.1",
3
+ "version": "3.11.2",
4
4
  "description": "An enterprise-class UI component library, support both Vue.js 2 and Vue.js 3, as well as PC and mobile.",
5
5
  "homepage": "https://opentiny.design/tiny-vue",
6
6
  "keywords": [
@@ -32,10 +32,6 @@ const api = [
32
32
  ];
33
33
  const renderless = (props, { computed, onMounted, onBeforeUnmount, reactive, ref }, { vm, emit, parent }, {
34
34
  Editor,
35
- Collaboration,
36
- CodehighComp,
37
- Y,
38
- WebrtcProvider,
39
35
  StarterKit,
40
36
  Table,
41
37
  TableCell,
@@ -57,9 +53,10 @@ const renderless = (props, { computed, onMounted, onBeforeUnmount, reactive, ref
57
53
  CodeBlockLowlight,
58
54
  lowlight,
59
55
  VueNodeViewRenderer,
60
- NodeViewContent,
61
- nodeViewProps,
62
- NodeViewWrapper,
56
+ // CodehighComp,
57
+ // NodeViewContent,
58
+ // nodeViewProps,
59
+ // NodeViewWrapper,
63
60
  Placeholder,
64
61
  codeHighlight
65
62
  }) => {
@@ -98,8 +95,6 @@ const renderless = (props, { computed, onMounted, onBeforeUnmount, reactive, ref
98
95
  if (props.customToolBar) {
99
96
  toolBar = props.customToolBar;
100
97
  }
101
- let ydoc = null;
102
- let provider = null;
103
98
  const CustomImage = Image.extend({
104
99
  addAttributes() {
105
100
  var _a2;
@@ -197,7 +192,7 @@ const renderless = (props, { computed, onMounted, onBeforeUnmount, reactive, ref
197
192
  extensions: [
198
193
  StarterKit == null ? void 0 : StarterKit.configure({
199
194
  // 开启多人协作功能要关闭默认的history模式
200
- history: false
195
+ history: true
201
196
  }),
202
197
  Table.configure({
203
198
  resizable: true
@@ -267,19 +262,8 @@ const renderless = (props, { computed, onMounted, onBeforeUnmount, reactive, ref
267
262
  emit("destroy");
268
263
  }
269
264
  }, props.options);
270
- if (props.Collaboration) {
271
- if (!window._yDoc) {
272
- window._yDoc = new Y.Doc();
273
- }
274
- ydoc = window._yDoc;
275
- provider = new WebrtcProvider("tiny-examsple-document", ydoc);
276
- defaultOptions.extensions.push(
277
- Collaboration == null ? void 0 : Collaboration.configure({
278
- document: ydoc
279
- })
280
- );
281
- }
282
- const editor = new Editor(props.options ? props.options : defaultOptions);
265
+ let options = props.options ? Object.assign(defaultOptions, props.options) : defaultOptions;
266
+ const editor = new Editor(options);
283
267
  const box = ref(null);
284
268
  const fontSize = ref("16px");
285
269
  const state = reactive({