@tarojs/react 4.0.0-canary.12 → 4.0.0-canary.13
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 +27 -7
- package/dist/index.js +969 -0
- package/dist/index.js.map +1 -0
- package/dist/react.esm.d.ts +45 -0
- 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/dist/componentTree.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { TaroElement, TaroText } from '@tarojs/runtime';
|
|
2
|
-
import type { Fiber } from 'react-reconciler';
|
|
3
|
-
import type { Props } from './props';
|
|
4
|
-
export declare function precacheFiberNode(hostInst: Fiber, node: TaroElement | TaroText): void;
|
|
5
|
-
export declare function markContainerAsRoot(hostRoot: Fiber, node: TaroElement | TaroText): void;
|
|
6
|
-
export declare function unmarkContainerAsRoot(node: TaroElement | TaroText): void;
|
|
7
|
-
export declare function isContainerMarkedAsRoot(node: TaroElement | TaroText): boolean;
|
|
8
|
-
/**
|
|
9
|
-
* Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent
|
|
10
|
-
* instance, or null if the node was not rendered by this React.
|
|
11
|
-
*/
|
|
12
|
-
export declare function getInstanceFromNode(node: TaroElement | TaroText): Fiber | null;
|
|
13
|
-
/**
|
|
14
|
-
* Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
|
|
15
|
-
* DOM node.
|
|
16
|
-
*/
|
|
17
|
-
export declare function getNodeFromInstance(inst: Fiber): any;
|
|
18
|
-
export declare function getFiberCurrentPropsFromNode(node: TaroElement | TaroText): Props;
|
|
19
|
-
export declare function updateFiberProps(node: TaroElement | TaroText, props: Props): void;
|
package/dist/constant.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const supportedInputTypes: {
|
|
2
|
-
[key: string]: boolean;
|
|
3
|
-
};
|
|
4
|
-
export declare function getEventPriority(domEventName: any): 1 | 4 | 16;
|
|
5
|
-
export declare const internalPropsKey: string;
|
|
6
|
-
export declare const internalInstanceKey: string;
|
|
7
|
-
export declare const internalContainerInstanceKey: string;
|
package/dist/domInput.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Props } from './props';
|
|
2
|
-
import type { FormElement, TaroElement } from '@tarojs/runtime';
|
|
3
|
-
import type { RestoreType } from './event';
|
|
4
|
-
declare function updateInputWrapper(element: TaroElement, oldValue: RestoreType, props: Props): void;
|
|
5
|
-
export declare function getToStringValue(value: any): any;
|
|
6
|
-
export declare function toString(value: any): string;
|
|
7
|
-
export declare function updateWrapper(element: TaroElement, oldValue: RestoreType, props: Props): void;
|
|
8
|
-
export declare function setNodeValue(node: FormElement, oldValue: RestoreType, value: any, type?: string): void;
|
|
9
|
-
export declare function isTextInputElement(elem: TaroElement): boolean;
|
|
10
|
-
export declare const ReactDOMTextareaRestoreControlledState: typeof updateWrapper;
|
|
11
|
-
export declare const ReactDOMInputRestoreControlledState: typeof updateInputWrapper;
|
|
12
|
-
export {};
|
package/dist/event.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { TaroElement, TaroEvent } from '@tarojs/runtime';
|
|
2
|
-
import type { Fiber } from 'react-reconciler';
|
|
3
|
-
export type RestoreType = string | number | boolean | any[];
|
|
4
|
-
interface RestoreItem {
|
|
5
|
-
target: TaroElement;
|
|
6
|
-
value: RestoreType;
|
|
7
|
-
}
|
|
8
|
-
export declare function getTargetInstForInputOrChangeEvent(e: TaroEvent, node: TaroElement): false | Fiber | undefined;
|
|
9
|
-
export declare function enqueueStateRestore(target: RestoreItem): void;
|
|
10
|
-
export declare function needsStateRestore(): boolean;
|
|
11
|
-
export declare function finishEventHandler(): void;
|
|
12
|
-
export declare function restoreStateIfNeeded(): void;
|
|
13
|
-
export {};
|
package/dist/props.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type TaroElement } from '@tarojs/runtime';
|
|
2
|
-
export type Props = Record<string, unknown>;
|
|
3
|
-
export declare function updateProps(dom: TaroElement, oldProps: Props, newProps: Props): void;
|
|
4
|
-
export declare function updatePropsByPayload(dom: TaroElement, oldProps: Props, updatePayload: any[]): void;
|
|
5
|
-
export declare function getUpdatePayload(dom: TaroElement, oldProps: Props, newProps: Props): any[] | null;
|
package/dist/reconciler.d.ts
DELETED
package/dist/render.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
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 {};
|
package/dist/workTags.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
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;
|