Files
SnowLuma/.pnpm-store/v11/files/ff/232031a0b0ad4d24ed126ec4ece948b5fb742e14d24fd5a2891a5946ff11effd3c120d73e7b635cad7bcb3af877527d4183c9a74303496a25cca32f4f08ba1
T
TanTan 2a69b23b47
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

56 lines
2.3 KiB
Plaintext

import { DOM_RENDERER, DOM_STASH } from "../constants.js";
import { Context as Context$1 } from "../context.js";
import { Child, FC, JSXNode, Props } from "../base.js";
//#region src/jsx/dom/render.d.ts
export type HasRenderToDom = FC<any> & {
[DOM_RENDERER]: FC<any>;
};
export type ErrorHandler = (error: any, retry: () => void) => Child | undefined;
type Container = HTMLElement | DocumentFragment;
type LocalJSXContexts = [Context$1<unknown>, unknown][] | undefined;
type SupportedElement = HTMLElement | SVGElement | MathMLElement;
export type PreserveNodeType = 1 | 2;
export type NodeObject = {
pP: Props | undefined;
nN: Node | undefined;
vC: Node[];
pC?: Node[];
vR: Node[];
n?: string;
f?: boolean;
s?: boolean;
c: Container | undefined;
e: SupportedElement | Text | undefined;
p?: PreserveNodeType;
a?: boolean;
o?: NodeObject;
[DOM_STASH]: [number, any[][], LocalJSXContexts, [Context, Function, NodeObject]] | [number, any[][]];
} & JSXNode;
type NodeString = {
t: string;
d: boolean;
s?: boolean;
} & {
e?: Text;
vC: undefined;
nN: undefined;
p?: true;
key: undefined;
tag: undefined;
};
export type Node = NodeString | NodeObject;
export type PendingType = 0 | 1 | 2;
export type UpdateHook = (context: Context, node: Node, cb: (context: Context) => void) => Promise<void>;
export type Context = [PendingType, boolean, UpdateHook, boolean, boolean, [Context, Function, NodeObject][]] | [PendingType, boolean, UpdateHook, boolean] | [PendingType, boolean, UpdateHook] | [PendingType, boolean] | [PendingType] | [];
export declare const buildDataStack: [Context, Node][];
export declare const getNameSpaceContext: () => Context$1<string> | undefined;
export declare const build: (context: Context, node: NodeObject, children?: Child[]) => void;
export declare const buildNode: (node: Child) => Node | undefined;
export declare const update: (context: Context, node: NodeObject) => Promise<NodeObject | undefined>;
export declare const renderNode: (node: NodeObject, container: Container) => void;
export declare const render: (jsxNode: Child, container: Container) => void;
export declare const flushSync: (callback: () => void) => void;
export declare const createPortal: (children: Child, container: HTMLElement, key?: string) => Child;
//#endregion
export {};