import type { Accessor, RevealOrder } from "./signals.js"; import type { Element as SolidElement } from "../types.js"; export type { RevealOrder }; type NonZeroParams any> = Parameters["length"] extends 0 ? never : T; type ConditionalRenderCallback = (item: Accessor>) => SolidElement; type KeyedConditionalRenderCallback = (item: NonNullable) => SolidElement; type ConditionalRenderChildren = ConditionalRenderCallback> = SolidElement | NonZeroParams; type KeyedConditionalRenderChildren = KeyedConditionalRenderCallback> = SolidElement | NonZeroParams; /** * Creates a list of elements from a list * @description https://docs.solidjs.com/reference/solid-js/components-jsx/for */ export declare function For(props: { each: T | undefined | null | false; fallback?: SolidElement; keyed?: true; children: (item: T[number], index: Accessor) => U; }): SolidElement; export declare function For(props: { each: T | undefined | null | false; fallback?: SolidElement; keyed: false; children: (item: Accessor, index: number) => U; }): SolidElement; export declare function For(props: { each: T | undefined | null | false; fallback?: SolidElement; keyed: (item: T[number]) => any; children: (item: Accessor, index: Accessor) => U; }): SolidElement; /** * Creates a list elements from a count * * @description https://docs.solidjs.com/reference/solid-js/components-jsx/repeat */ export declare function Repeat(props: { count: number; from?: number | undefined; fallback?: SolidElement; children: ((index: number) => T) | T; }): SolidElement; /** * Conditionally render its children or an optional fallback component * @description https://docs.solidjs.com/reference/solid-js/components-jsx/show */ export declare function Show(props: { when: T | undefined | null | false; keyed: true; fallback?: SolidElement; children: SolidElement; }): SolidElement; export declare function Show>(props: { when: T | undefined | null | false; keyed: true; fallback?: SolidElement; children: NonZeroParams; }): SolidElement; export declare function Show(props: { when: T | undefined | null | false; keyed?: false; fallback?: SolidElement; children: SolidElement; }): SolidElement; export declare function Show>(props: { when: T | undefined | null | false; keyed?: false; fallback?: SolidElement; children: NonZeroParams; }): SolidElement; /** * Switches between content based on mutually exclusive conditions * @description https://docs.solidjs.com/reference/solid-js/components-jsx/switch-and-match */ export declare function Switch(props: { fallback?: SolidElement; children: SolidElement; }): SolidElement; export type MatchProps = ConditionalRenderCallback> = { when: T | undefined | null | false; keyed?: false; children: ConditionalRenderChildren; }; export type KeyedMatchProps = KeyedConditionalRenderCallback> = { when: T | undefined | null | false; keyed: true; children: KeyedConditionalRenderChildren; }; export type AnyMatchProps = MatchProps | KeyedMatchProps | { when: T | undefined | null | false; keyed?: boolean; children: SolidElement; }; /** * Selects a content based on condition when inside a `` control flow * @description https://docs.solidjs.com/reference/solid-js/components-jsx/switch-and-match */ export declare function Match(props: { when: T | undefined | null | false; keyed: true; children: SolidElement; }): SolidElement; export declare function Match>(props: KeyedMatchProps): SolidElement; export declare function Match(props: { when: T | undefined | null | false; keyed?: false; children: SolidElement; }): SolidElement; export declare function Match>(props: MatchProps): SolidElement; export declare function Match(props: AnyMatchProps): SolidElement; /** * Catches uncaught errors inside components and renders a fallback content * @description https://docs.solidjs.com/reference/solid-js/components-jsx/errored */ export declare function Errored(props: { fallback: SolidElement | ((err: () => any, reset: () => void) => SolidElement); children: SolidElement; }): SolidElement; /** * Tracks all resources inside a component and renders a fallback until they are all resolved * @description https://docs.solidjs.com/reference/solid-js/components-jsx/loading */ export declare function Loading(props: { fallback?: SolidElement; on?: any; children: SolidElement; }): SolidElement; export type RevealProps = { order?: RevealOrder; collapsed?: boolean; children: SolidElement; }; /** * Coordinates the reveal timing of sibling `` boundaries during SSR. * * The `order` prop picks the reveal policy: * - `"sequential"` (default) — boundaries reveal in streamed order; out-of-order * resolutions have their fragment HTML streamed into templates as data arrives, * but the swap from fallback to content waits until the frontier reaches them. * - `"together"` — every direct slot holds its fallback until the whole group is * "minimally ready" (every direct slot has its own first visible content * available), then the whole group releases in a single activation. * - `"natural"` — each boundary's swap is triggered as its own data resolves. At * the top level this is equivalent to omitting ``; the mode exists for * nesting, where the group registers as a single composite slot in an enclosing * ``. * * The `collapsed` prop is only consulted when `order="sequential"` (the default); * it is ignored under `"together"` and `"natural"`. * * Nesting: a nested `` is held on its fallbacks until its parent releases * the slot it occupies. HTML for resolved fragments still streams through normally; * only the `revealFragments` swap calls are deferred. Once released, the inner * group runs its own `order` locally over whatever is still pending. There is no * escape hatch. * * Engine support: * - `renderToString` fully supports `order="sequential"` (without `collapsed`) and * `order="natural"` because neither requires streamed activation. * - `order="together"` and `collapsed` rely on streamed activation and require * `renderToStream`. Using them inside a nested `` under * `renderToString` logs a warning. * * See `documentation/solid-2.0/03-control-flow.md` for the full outer/inner * nesting matrix and the "minimally ready" definition per order. * * @description https://docs.solidjs.com/reference/solid-js/components-jsx/reveal */ export declare function Reveal(props: RevealProps): SolidElement;