@textbus/adapter-vue 4.0.4 → 4.0.5
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/bundles/index.esm.js +3 -3
- package/bundles/index.js +3 -3
- package/bundles/vue-adapter.d.ts +2 -2
- package/package.json +2 -2
package/bundles/index.esm.js
CHANGED
@@ -23,7 +23,7 @@ class VueAdapter extends DomAdapter {
|
|
23
23
|
return Array.from(parentElement.childNodes);
|
24
24
|
},
|
25
25
|
isNativeElementNode(node) {
|
26
|
-
return node instanceof
|
26
|
+
return node instanceof Element;
|
27
27
|
},
|
28
28
|
getChildByIndex(parentElement, index) {
|
29
29
|
return parentElement.childNodes[index];
|
@@ -78,7 +78,7 @@ class VueAdapter extends DomAdapter {
|
|
78
78
|
return h(vNode.tagName, props, ...children);
|
79
79
|
}
|
80
80
|
}, mount);
|
81
|
-
// private compositionRef = ref<
|
81
|
+
// private compositionRef = ref<Element>()
|
82
82
|
this.componentRefs = new WeakMap();
|
83
83
|
this.components = {};
|
84
84
|
// watchEffect(() => {
|
@@ -108,7 +108,7 @@ class VueAdapter extends DomAdapter {
|
|
108
108
|
var _a;
|
109
109
|
component.changeMarker.rendered();
|
110
110
|
self.onViewUpdated.next();
|
111
|
-
if (!(((_a = self.componentRefs.get(component)) === null || _a === void 0 ? void 0 : _a.value) instanceof
|
111
|
+
if (!(((_a = self.componentRefs.get(component)) === null || _a === void 0 ? void 0 : _a.value) instanceof Element)) {
|
112
112
|
// eslint-disable-next-line max-len
|
113
113
|
throw adapterError(`Component \`${component.name}\` is not bound to rootRef, you must bind rootRef to the root element node of the component view.`);
|
114
114
|
}
|
package/bundles/index.js
CHANGED
@@ -25,7 +25,7 @@ class VueAdapter extends platformBrowser.DomAdapter {
|
|
25
25
|
return Array.from(parentElement.childNodes);
|
26
26
|
},
|
27
27
|
isNativeElementNode(node) {
|
28
|
-
return node instanceof
|
28
|
+
return node instanceof Element;
|
29
29
|
},
|
30
30
|
getChildByIndex(parentElement, index) {
|
31
31
|
return parentElement.childNodes[index];
|
@@ -80,7 +80,7 @@ class VueAdapter extends platformBrowser.DomAdapter {
|
|
80
80
|
return vue.h(vNode.tagName, props, ...children);
|
81
81
|
}
|
82
82
|
}, mount);
|
83
|
-
// private compositionRef = ref<
|
83
|
+
// private compositionRef = ref<Element>()
|
84
84
|
this.componentRefs = new WeakMap();
|
85
85
|
this.components = {};
|
86
86
|
// watchEffect(() => {
|
@@ -110,7 +110,7 @@ class VueAdapter extends platformBrowser.DomAdapter {
|
|
110
110
|
var _a;
|
111
111
|
component.changeMarker.rendered();
|
112
112
|
self.onViewUpdated.next();
|
113
|
-
if (!(((_a = self.componentRefs.get(component)) === null || _a === void 0 ? void 0 : _a.value) instanceof
|
113
|
+
if (!(((_a = self.componentRefs.get(component)) === null || _a === void 0 ? void 0 : _a.value) instanceof Element)) {
|
114
114
|
// eslint-disable-next-line max-len
|
115
115
|
throw adapterError(`Component \`${component.name}\` is not bound to rootRef, you must bind rootRef to the root element node of the component view.`);
|
116
116
|
}
|
package/bundles/vue-adapter.d.ts
CHANGED
@@ -3,7 +3,7 @@ import { DefineComponent, Ref, VNode } from 'vue';
|
|
3
3
|
import { DomAdapter } from '@textbus/platform-browser';
|
4
4
|
export interface ViewComponentProps<T extends Component> {
|
5
5
|
component: T;
|
6
|
-
rootRef: Ref<
|
6
|
+
rootRef: Ref<Element | undefined>;
|
7
7
|
}
|
8
8
|
export interface VueAdapterComponents {
|
9
9
|
[key: string]: DefineComponent<ViewComponentProps<any>>;
|
@@ -11,6 +11,6 @@ export interface VueAdapterComponents {
|
|
11
11
|
export declare class VueAdapter extends DomAdapter<VNode, VNode> {
|
12
12
|
private componentRefs;
|
13
13
|
private components;
|
14
|
-
constructor(components: VueAdapterComponents, mount: ViewMount<VNode,
|
14
|
+
constructor(components: VueAdapterComponents, mount: ViewMount<VNode, Element>);
|
15
15
|
copy(): void;
|
16
16
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@textbus/adapter-vue",
|
3
|
-
"version": "4.0.
|
3
|
+
"version": "4.0.5",
|
4
4
|
"description": "Textbus is a rich text editor and framework that is highly customizable and extensible to achieve rich wysiwyg effects.",
|
5
5
|
"main": "./bundles/index.js",
|
6
6
|
"module": "./bundles/index.esm.js",
|
@@ -27,7 +27,7 @@
|
|
27
27
|
"dependencies": {
|
28
28
|
"@tanbo/stream": "^1.2.5",
|
29
29
|
"@textbus/core": "^4.0.4",
|
30
|
-
"@textbus/platform-browser": "^4.0.
|
30
|
+
"@textbus/platform-browser": "^4.0.5",
|
31
31
|
"vue": "^3.4.28"
|
32
32
|
},
|
33
33
|
"devDependencies": {
|