@textbus/adapter-react 4.0.4 → 4.1.0-alpha.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.
@@ -25,7 +25,7 @@ class ReactAdapter extends DomAdapter {
25
25
  return Array.from(parentElement.childNodes);
26
26
  },
27
27
  isNativeElementNode(node) {
28
- return node instanceof HTMLElement;
28
+ return node instanceof Element;
29
29
  },
30
30
  getChildByIndex(parentElement, index) {
31
31
  return parentElement.childNodes[index];
package/bundles/index.js CHANGED
@@ -27,7 +27,7 @@ class ReactAdapter extends platformBrowser.DomAdapter {
27
27
  return Array.from(parentElement.childNodes);
28
28
  },
29
29
  isNativeElementNode(node) {
30
- return node instanceof HTMLElement;
30
+ return node instanceof Element;
31
31
  },
32
32
  getChildByIndex(parentElement, index) {
33
33
  return parentElement.childNodes[index];
@@ -3,13 +3,13 @@ import { DomAdapter } from '@textbus/platform-browser';
3
3
  import { JSX } from 'react';
4
4
  export interface ViewComponentProps<T extends Component> {
5
5
  component: T;
6
- rootRef: ((rootNode: HTMLElement) => void);
6
+ rootRef: ((rootNode: Element) => void);
7
7
  }
8
8
  export interface ReactAdapterComponents {
9
9
  [key: string]: (props: ViewComponentProps<any>) => JSX.Element;
10
10
  }
11
11
  export declare class ReactAdapter extends DomAdapter<JSX.Element, JSX.Element> {
12
12
  private components;
13
- constructor(components: ReactAdapterComponents, mount: ViewMount<JSX.Element, HTMLElement>);
13
+ constructor(components: ReactAdapterComponents, mount: ViewMount<JSX.Element, Element>);
14
14
  copy(): void;
15
15
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@textbus/adapter-react",
3
- "version": "4.0.4",
3
+ "version": "4.1.0-alpha.0",
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",
@@ -26,8 +26,8 @@
26
26
  ],
27
27
  "dependencies": {
28
28
  "@tanbo/stream": "^1.2.5",
29
- "@textbus/core": "^4.0.4",
30
- "@textbus/platform-browser": "^4.0.4",
29
+ "@textbus/core": "^4.1.0-alpha.0",
30
+ "@textbus/platform-browser": "^4.1.0-alpha.0",
31
31
  "react": "^17.0.0 || ^18.0.0"
32
32
  },
33
33
  "devDependencies": {