/** * Toggles `hidden` on descendants of `host` with `data-swish-when` based on * the current state. The attribute value may be a single state or a * comma-separated list (e.g. `"saved,saving"`) - the child is shown when * the current state matches any entry. Re-applies whenever the bound * signal changes. */ export declare function bindWhen(host: HTMLElement, getState: () => string): () => void; /** * Sets `textContent` on descendants of `host` matching * `[data-swish-bind=""]` to the resolved value. */ export declare function bindValue(host: HTMLElement, key: string, getValue: () => string | number): () => void; /** * Calls `onReset` after something outside the SDK rewrites `host`'s subtree. * * Horizon-family themes re-hydrate the header section about a second after * load, and morph cart and product markup on every cart change * (`@theme/section-hydration` / `morphSection` → `morph`). The morph keeps the * live nodes but copies the server HTML over them: attributes the server * didn't render are stripped (`state`, `ready`), text nodes are reset (a * badge's "3" back to its "0" placeholder), `hidden` placeholders come back, * and children the server didn't render — the badge `ensureBadge` injects — * are removed. The bound signal hasn't changed, so no effect re-runs on its * own and the reset sticks until the next save or unsave (SWI-3044). The * theme's own opt-out (`data-skip-node-update`) only counts when the server * markup carries it too, so it can't be added from here. * * `onReset` must be idempotent and only write what differs. The records its * own writes queue are drained before the callback returns, so an external * reset costs exactly one pass and never loops. */ export declare function observeExternalResets(host: HTMLElement, onReset: () => void): () => void;