@tarojs/react 4.0.0-canary.10 → 4.0.0-canary.12

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.
@@ -0,0 +1,25 @@
1
+ import { TaroReconciler } from './reconciler';
2
+ import type { TaroElement } from '@tarojs/runtime';
3
+ import type { ReactNode } from 'react';
4
+ import type { OpaqueRoot } from 'react-reconciler';
5
+ export declare const ContainerMap: WeakMap<TaroElement, Root>;
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
+ export 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
+ export declare function render(element: ReactNode, domContainer: TaroElement, cb: Callback): TaroElement | import("react").Component<any, any, any> | null;
24
+ export declare function createRoot(domContainer: TaroElement, options?: CreateRootOptions): Root;
25
+ export {};
@@ -0,0 +1,26 @@
1
+ export type WorkTag = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25;
2
+ export declare const FunctionComponent = 0;
3
+ export declare const ClassComponent = 1;
4
+ export declare const IndeterminateComponent = 2;
5
+ export declare const HostRoot = 3;
6
+ export declare const HostPortal = 4;
7
+ export declare const HostComponent = 5;
8
+ export declare const HostText = 6;
9
+ export declare const Fragment = 7;
10
+ export declare const Mode = 8;
11
+ export declare const ContextConsumer = 9;
12
+ export declare const ContextProvider = 10;
13
+ export declare const ForwardRef = 11;
14
+ export declare const Profiler = 12;
15
+ export declare const SuspenseComponent = 13;
16
+ export declare const MemoComponent = 14;
17
+ export declare const SimpleMemoComponent = 15;
18
+ export declare const LazyComponent = 16;
19
+ export declare const IncompleteClassComponent = 17;
20
+ export declare const DehydratedFragment = 18;
21
+ export declare const SuspenseListComponent = 19;
22
+ export declare const ScopeComponent = 21;
23
+ export declare const OffscreenComponent = 22;
24
+ export declare const LegacyHiddenComponent = 23;
25
+ export declare const CacheComponent = 24;
26
+ export declare const TracingMarkerComponent = 25;
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@tarojs/react",
3
- "version": "4.0.0-canary.10",
3
+ "version": "4.0.0-canary.12",
4
4
  "description": "like react-dom, but for mini apps.",
5
- "author": "yuche <i@yuche.me>",
6
- "homepage": "https://github.com/nervjs/taro/tree/master/packages/taro-react#readme",
5
+ "author": "O2Team",
7
6
  "license": "MIT",
8
- "main": "dist/index.js",
7
+ "main": "dist/react.esm.js",
9
8
  "module": "dist/react.esm.js",
9
+ "types": "dist/index.d.ts",
10
10
  "files": [
11
11
  "dist"
12
12
  ],
@@ -17,27 +17,24 @@
17
17
  "bugs": {
18
18
  "url": "https://github.com/NervJS/taro/issues"
19
19
  },
20
+ "engines": {
21
+ "node": ">= 18"
22
+ },
20
23
  "dependencies": {
21
- "react-reconciler": "0.27.0"
24
+ "react-reconciler": "0.29.0",
25
+ "@tarojs/shared": "4.0.0-canary.12",
26
+ "@tarojs/runtime": "4.0.0-canary.12"
22
27
  },
23
28
  "devDependencies": {
24
- "@rollup/plugin-buble": "^1.0.3",
25
- "jest": "^29.3.1",
26
- "jest-cli": "^29.3.1",
27
- "jest-environment-node": "^29.5.0",
28
- "react": "^18.2.0",
29
- "rollup": "^2.79.0",
30
- "rollup-plugin-ts": "^3.0.2",
31
- "ts-jest": "^29.0.5",
32
- "typescript": "^4.7.4",
33
- "@tarojs/runtime": "4.0.0-canary.10",
34
- "@tarojs/shared": "4.0.0-canary.10"
29
+ "@types/react": "^18.2.79",
30
+ "@types/react-reconciler": "^0.28.8",
31
+ "react": "^18.2.0"
35
32
  },
36
33
  "peerDependencies": {
37
- "@tarojs/runtime": "~4.0.0-canary.10",
38
- "@tarojs/shared": "~4.0.0-canary.10"
34
+ "react": "^18"
39
35
  },
40
36
  "scripts": {
37
+ "prod": "pnpm run build",
41
38
  "test": "jest --collectCoverage",
42
39
  "test:ci": "jest --ci -i --coverage --silent",
43
40
  "build": "rollup -c",