export { computed, effect, signal } from 'alien-signals'; /** List of valid HTML DOM swap methods. */ declare const SWAP_METHODS: readonly ["innerHTML", "outerHTML", "beforebegin", "afterbegin", "beforeend", "afterend", "delete"]; /** Represents a valid DOM swap method string. */ type SwapMethod = (typeof SWAP_METHODS)[number]; /** Modifiers naming a host for the listener other than the element itself. */ declare const LISTEN_TARGETS: readonly ["window", "document", "root"]; type ListenTarget = (typeof LISTEN_TARGETS)[number]; /** Receives the store roots that changed in one batch of user edits. */ type EditListener = (roots: ReadonlySet) => void; interface StoreStatus { loading: false | 'push' | 'pull'; error: string | null; lastSync: number; dirty: Record; } /** * A store's standing sync policy. Seeded at init, applied to every push and pull. * * `indicator` is deliberately absent: it belongs to the trigger, not the store. A * store has many triggers, and `resolveIndicators` takes a single value, so a * policy-level indicator would silently override every trigger's `rz-indicator`. */ interface SyncPolicy extends Omit { /** Endpoint for push and pull. */ url: string; } interface StoreRequestOptions { url?: string; /** `triggerEl` is omitted: the top-level field is its only home. */ overrides?: Omit; nestedPath?: string; triggerEl?: Element; } /** * The central manager for all reactive stores and their network logic. * Instantiated once per RouseApp to ensure isolation. */ declare class StoreManager { private app; private _stores; private _pendingFlush; private _isPatching; constructor(app: RouseApp); private _setConfig; private _register; private _getStore; /** * Advances the `lastGood` baseline to `source`, whole or at a single root, * and reconciles the dirty flags that move with it. */ private _updateLastGood; /** * Recomputes dirty flags against `lastGood`. The only writer of `status.dirty`. * Without `roots`, walks every root in the data or the baseline, so a root * deleted locally still reads dirty. */ private _reconcileDirty; private _dispatchPatchEvent; /** * Internal unified request handler for push and pull operations. */ private _request; /** * Sends the request and applies the outcome to the store: rolls back a failed push, * otherwise reconciles the response. Tracks the request so a superseded one leaves * `loading` alone when it settles. */ private _sendAndApply; private _applyServerResponse; /** * Applies the payload to the store as a JSON Merge Patch, whole or at * `nestedPath`. A path absent from the payload writes nothing; a `null` at the * path removes the slice. */ private _patchPayload; /** * Runs a framework write with dirty tracking suppressed, then reconciles the * dirty flags against the baseline. Every framework mutation of store data * goes through here, so the reconcile cannot be forgotten. */ private _withPatchGuard; /** * Patches the store's data, then makes it the new baseline: both restore targets * (`reset()` and rollback) and the dirty flags are refreshed to match. */ private _adoptState; /** Writes `value` into the store's data, whole or at `path`, as a framework write. */ private _writeSlice; private _maybeRollback; /** * Queues a store for end-of-microtask reconciliation, coalescing a batch of * synchronous writes into one dirty recompute and one round of notifications. */ private _scheduleFlush; /** * Listens for user-driven mutations to the store. Returns a cleanup function. * * The store must already exist. Stores declared in markup using `