@tarojs/react 4.0.1-alpha.1 → 4.0.1

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/LICENSE CHANGED
@@ -154,8 +154,15 @@ See `/LICENSE` for details of the license.
154
154
 
155
155
  ==================
156
156
 
157
+ MIT (stencil-vue2-output-target):
158
+ The following files embed [stencil-vue2-output-target](https://github.com/diondree/stencil-vue2-output-target) MIT:
159
+ `/packages/taro-components-library-vue2/src/vue-component-lib/utils.ts`
160
+ See `/LICENSE` for details of the license.
161
+
162
+ ==================
163
+
157
164
  MIT (weui):
158
- The following files embed [weui](https://github.com/Tencent/weui) MIT:
165
+ The following files embed [stencil-vue2-output-target](https://github.com/Tencent/weui) MIT:
159
166
  `/packages/taro-components/src/components/*.scss`
160
167
  See `/LICENSE.txt` for details of the license.
161
168
 
@@ -165,10 +172,3 @@ Apache-2.0 (intersection-observer):
165
172
  The following files embed [intersection-observer](https://github.com/GoogleChromeLabs/intersection-observer) Apache-2.0:
166
173
  `/packages/taro-api/src/polyfill/intersection-observer.ts`
167
174
  See `/LICENSE.txt` for details of the license.
168
-
169
- ==================
170
-
171
- MIT (babel-plugin-jsx-dom-expressions):
172
- The following files embed [babel-plugin-jsx-dom-expressions](https://github.com/ryansolid/dom-expressions/blob/main/packages/babel-plugin-jsx-dom-expressions) MIT:
173
- `/packages/babel-plugin-transform-solid-jsx/src/*`
174
- See `/LICENSE` for details of the license.
package/dist/index.d.ts CHANGED
@@ -1,10 +1,30 @@
1
- import { internalInstanceKey } from './constant';
2
- import { createRoot, render } from './render';
3
- import type { TaroElement } from '@tarojs/runtime';
4
- import type { ReactNode } from 'react';
1
+ import { TaroElement, TaroText } from '@tarojs/runtime';
2
+ import { ReactNode } from 'react';
3
+ import Reconciler from "react-reconciler";
4
+ import { OpaqueRoot } from "react-reconciler";
5
+ declare const TaroReconciler: Reconciler.Reconciler<TaroElement, TaroElement, TaroText, TaroElement, TaroElement>;
6
+ type Renderer = typeof TaroReconciler;
7
+ type CreateRootOptions = {
8
+ unstable_strictMode?: boolean;
9
+ unstable_concurrentUpdatesByDefault?: boolean;
10
+ unstable_transitionCallbacks?: any;
11
+ identifierPrefix?: string;
12
+ onRecoverableError?: (error: any) => void;
13
+ };
14
+ type Callback = () => void | null | undefined;
15
+ declare class Root {
16
+ private renderer;
17
+ internalRoot: OpaqueRoot;
18
+ constructor(renderer: Renderer, domContainer: TaroElement, options?: CreateRootOptions);
19
+ private initInternalRoot;
20
+ render(children: ReactNode, cb: Callback): TaroElement | import("react").Component<any, any, any> | null;
21
+ unmount(cb: Callback): void;
22
+ }
23
+ declare function render(element: ReactNode, domContainer: TaroElement, cb: Callback): TaroElement | import("react").Component<any, any, any> | null;
24
+ declare function createRoot(domContainer: TaroElement, options?: CreateRootOptions): Root;
5
25
  declare const unstable_batchedUpdates: (fn: any, a: any) => any;
6
26
  declare function unmountComponentAtNode(dom: TaroElement): boolean;
7
- declare function findDOMNode(comp?: TaroElement | ReactNode): string | number | boolean | TaroElement | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null;
27
+ declare function findDOMNode(comp?: TaroElement | ReactNode): string | number | boolean | TaroElement | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("react").ReactFragment | null;
8
28
  declare function createPortal(children: ReactNode, containerInfo: TaroElement, key?: string): {
9
29
  $$typeof: number | symbol;
10
30
  key: string | null;
@@ -12,22 +32,12 @@ declare function createPortal(children: ReactNode, containerInfo: TaroElement, k
12
32
  containerInfo: TaroElement;
13
33
  implementation: null;
14
34
  };
15
- declare const flushSync: {
16
- (): void;
17
- <R>(fn: () => R): R;
18
- };
19
- export { createPortal, createRoot, findDOMNode, flushSync, internalInstanceKey, render, unmountComponentAtNode, unstable_batchedUpdates, };
20
35
  declare const _default: {
21
36
  render: typeof render;
22
- flushSync: {
23
- (): void;
24
- <R>(fn: () => R): R;
25
- };
26
37
  createRoot: typeof createRoot;
27
38
  unstable_batchedUpdates: (fn: any, a: any) => any;
28
39
  unmountComponentAtNode: typeof unmountComponentAtNode;
29
40
  findDOMNode: typeof findDOMNode;
30
41
  createPortal: typeof createPortal;
31
- internalInstanceKey: string;
32
42
  };
33
- export default _default;
43
+ export { _default as default, createPortal, createRoot, findDOMNode, render, unmountComponentAtNode, unstable_batchedUpdates };