import { ReactNode } from "react"; //#region src/Slots/types.d.ts /** Function form of slot content. Receives optional slot props. */ type SlotFunction = (props?: Record) => ReactNode; /** A slot can be a React node, a function slot, or an array of either. */ type SlotContent = ReactNode | SlotFunction | Array; /** Cache shape reserved for slot collections keyed by component identity. */ type SlotsCache = WeakMap>; /** Props accepted by the `Slot` component returned from `useSlots`. */ interface SlotProps { /** Named slot to render. Defaults to the default slot. */ name?: string; /** Props injected into element or function slot content. */ props?: Record; /** Optional mapper used to transform each rendered slot child. */ map?: (content: ReactNode | SlotFunction, index: number) => ReactNode | ReactNode[]; /** Fallback content rendered when the requested slot is missing. */ children?: ReactNode | ReactNode[]; } /** Props accepted by the `Slots` boundary component. */ interface SlotsProps { /** Child subtree treated as an opaque slot boundary by parent collectors. */ children: ReactNode; } /** Props accepted by `Template`, the marker component for named slot content. */ interface TemplateProps { /** Slot name. Omit to contribute to the default slot. */ name?: string; /** Content to render for the slot, or a function slot. */ children: ReactNode | SlotFunction; } //#endregion export { SlotContent, SlotFunction, SlotProps, SlotsCache, SlotsProps, TemplateProps }; //# sourceMappingURL=types.d.ts.map