@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 +8 -8
- package/dist/index.d.ts +26 -16
- package/dist/index.js +816 -0
- package/dist/index.js.map +1 -0
- package/dist/react.esm.d.ts +43 -0
- package/dist/react.esm.js +18 -177
- package/dist/react.esm.js.map +1 -1
- package/package.json +18 -14
- package/dist/componentTree.d.ts +0 -19
- package/dist/constant.d.ts +0 -7
- package/dist/domInput.d.ts +0 -12
- package/dist/event.d.ts +0 -13
- package/dist/inputValueTracking.d.ts +0 -3
- package/dist/props.d.ts +0 -5
- package/dist/reconciler.d.ts +0 -4
- package/dist/render.d.ts +0 -25
- package/dist/workTags.d.ts +0 -26
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 [
|
|
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 {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
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>> |
|
|
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
|
|
43
|
+
export { _default as default, createPortal, createRoot, findDOMNode, render, unmountComponentAtNode, unstable_batchedUpdates };
|