@tarojs/react 3.6.27 → 3.6.28
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/dist/index.d.ts +43 -0
- package/dist/react.esm.d.ts +43 -0
- package/package.json +6 -5
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
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;
|
|
25
|
+
declare const unstable_batchedUpdates: (fn: any, a: any) => any;
|
|
26
|
+
declare function unmountComponentAtNode(dom: TaroElement): boolean;
|
|
27
|
+
declare function findDOMNode(comp?: TaroElement | ReactNode): string | number | boolean | TaroElement | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("react").ReactFragment | null;
|
|
28
|
+
declare function createPortal(children: ReactNode, containerInfo: TaroElement, key?: string): {
|
|
29
|
+
$$typeof: number | symbol;
|
|
30
|
+
key: string | null;
|
|
31
|
+
children: ReactNode;
|
|
32
|
+
containerInfo: TaroElement;
|
|
33
|
+
implementation: null;
|
|
34
|
+
};
|
|
35
|
+
declare const _default: {
|
|
36
|
+
render: typeof render;
|
|
37
|
+
createRoot: typeof createRoot;
|
|
38
|
+
unstable_batchedUpdates: (fn: any, a: any) => any;
|
|
39
|
+
unmountComponentAtNode: typeof unmountComponentAtNode;
|
|
40
|
+
findDOMNode: typeof findDOMNode;
|
|
41
|
+
createPortal: typeof createPortal;
|
|
42
|
+
};
|
|
43
|
+
export { _default as default, createPortal, createRoot, findDOMNode, render, unmountComponentAtNode, unstable_batchedUpdates };
|
|
@@ -0,0 +1,43 @@
|
|
|
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;
|
|
25
|
+
declare const unstable_batchedUpdates: (fn: any, a: any) => any;
|
|
26
|
+
declare function unmountComponentAtNode(dom: TaroElement): boolean;
|
|
27
|
+
declare function findDOMNode(comp?: TaroElement | ReactNode): string | number | boolean | TaroElement | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("react").ReactFragment | null;
|
|
28
|
+
declare function createPortal(children: ReactNode, containerInfo: TaroElement, key?: string): {
|
|
29
|
+
$$typeof: number | symbol;
|
|
30
|
+
key: string | null;
|
|
31
|
+
children: ReactNode;
|
|
32
|
+
containerInfo: TaroElement;
|
|
33
|
+
implementation: null;
|
|
34
|
+
};
|
|
35
|
+
declare const _default: {
|
|
36
|
+
render: typeof render;
|
|
37
|
+
createRoot: typeof createRoot;
|
|
38
|
+
unstable_batchedUpdates: (fn: any, a: any) => any;
|
|
39
|
+
unmountComponentAtNode: typeof unmountComponentAtNode;
|
|
40
|
+
findDOMNode: typeof findDOMNode;
|
|
41
|
+
createPortal: typeof createPortal;
|
|
42
|
+
};
|
|
43
|
+
export { _default as default, createPortal, createRoot, findDOMNode, render, unmountComponentAtNode, unstable_batchedUpdates };
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarojs/react",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.28",
|
|
4
4
|
"description": "like react-dom, but for mini apps.",
|
|
5
5
|
"author": "yuche <i@yuche.me>",
|
|
6
6
|
"homepage": "https://github.com/nervjs/taro/tree/master/packages/taro-react#readme",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"module": "dist/react.esm.js",
|
|
10
|
+
"types": "dist/index.d.ts",
|
|
10
11
|
"files": [
|
|
11
12
|
"dist"
|
|
12
13
|
],
|
|
@@ -30,12 +31,12 @@
|
|
|
30
31
|
"rollup-plugin-ts": "^3.0.2",
|
|
31
32
|
"ts-jest": "^29.0.5",
|
|
32
33
|
"typescript": "^4.7.4",
|
|
33
|
-
"@tarojs/runtime": "3.6.
|
|
34
|
-
"@tarojs/shared": "3.6.
|
|
34
|
+
"@tarojs/runtime": "3.6.28",
|
|
35
|
+
"@tarojs/shared": "3.6.28"
|
|
35
36
|
},
|
|
36
37
|
"peerDependencies": {
|
|
37
|
-
"@tarojs/runtime": "~3.6.
|
|
38
|
-
"@tarojs/shared": "~3.6.
|
|
38
|
+
"@tarojs/runtime": "~3.6.28",
|
|
39
|
+
"@tarojs/shared": "~3.6.28"
|
|
39
40
|
},
|
|
40
41
|
"scripts": {
|
|
41
42
|
"test": "jest --collectCoverage",
|