The element type (e.g., HTMLElement | SVGElement for DOM)
Package split:
packages/core: Interface definition, reconcile function, thin wrapperspackages/dom: Live implementations (Client, Hydration, SSR)ReadonlyaddAdd a new slot to the container. Creates item/index signals internally and passes them to render callback. Handles enter animations in client mode.
ReadonlybeginBracket the start of a reconcile batch. Called by reconcile
before any removeSlot / addSlot / moveSlot in the batch fires.
The Client implementation uses this to snapshot each existing slot's bounding rect for FLIP reorder animation. Hydration and SSR treat it as a no-op.
ReadonlydefaultDefault container element.
Each environment provides its own implementation.
e.g., DOM uses $.div({ style: "display: contents" })
ReadonlyendBracket the end of a reconcile batch. Called by reconcile
after every removeSlot / addSlot / moveSlot in the batch has
completed and the DOM is in its post-batch shape.
The Client implementation re-measures each still-present slot's bounding rect, computes the delta against the beginSync snapshot, and forks the FLIP invert-then-release animation for any slot that moved. Hydration and SSR treat it as a no-op.
Requires Scope.Scope — Client mode forks the FLIP release into
the ambient scope so container unmount interrupts an in-flight
animation.
ReadonlyfinalizeSignal that the container's initial children have been processed. In hydration mode, this pops the container from the traversal stack so sibling elements are found correctly. No-op in client/SSR mode.
ReadonlyforkCreate a child context with isolated state. Each control function (when, match, each) calls this to get its own container and slots, preventing conflicts when nested or used with collect.
ReadonlygetGet or create the container element.
Uses defaultContainer if create is not provided.
ReadonlygetGet a slot by its key.
ReadonlygetGet all current slot keys. Reads from DOM in hydration mode.
ReadonlymoveMove a slot to a new index position. Noop in SSR mode.
ReadonlyremoveRemove a slot from the container. Noop in SSR, handles exit animations in client mode.
Requires Scope.Scope — Client mode forks the exit animation into
the ambient scope so removeSlot can return before it finishes,
and so container unmount interrupts an in-flight exit.
ReadonlysubscribeSubscribe to a Readable and run handler on each change. Noop in SSR, forks stream subscription in client/hydration.
Requires Scope.Scope — Client/Hydration modes fork the stream
into the ambient scope so container unmount cancels it.
Context interface for control flow operations. Abstracts SSR/Hydration/Client differences behind a unified API.