/** * Optional sugar: one ctx.liveQuery subscription per wiring entry, each diff * projected and pushed into the seam. Deliberately thin — apps with bespoke * needs skip this and call seam.update/feedView from their own callbacks. * Lifecycle pairing (convention S4) is the caller's job: call the returned * disposer in unmount(). */ /** * @param {{ update(s: unknown): unknown, feedView(id: string, d: unknown): unknown }} seam * @param {{ liveQuery(name: string, params: object, onRows: (rows: any) => void): any }} ctx * @param {{ snapshot?: { query: string, params?: object, project?: (rows: any) => any }, * views?: Record any }> }} wiring * @returns {() => void} */ export function wireStage(seam: { update(s: unknown): unknown; feedView(id: string, d: unknown): unknown; }, ctx: { liveQuery(name: string, params: object, onRows: (rows: any) => void): any; }, wiring?: { snapshot?: { query: string; params?: object; project?: (rows: any) => any; }; views?: Record any; }>; }): () => void;