import { CommentsSlice, ContentControlsSlice, DocumentSlice, TrackChangesSlice, SelectionSlice, ToolbarSnapshotSlice, UIToolbarCommandState } from '../types.js'; /** * Subscribe to the current selection slice. * * Returns the full {@link SelectionSlice} — empty/target/selectionTarget * (SD-2812)/activeMarks/activeCommentIds/activeChangeIds/quotedText. * Use the returned `target` for `editor.doc.comments.create({ target })` * and the `selectionTarget` for `editor.doc.insert({ target })`. */ export declare function useSuperDocSelection(): SelectionSlice; /** Subscribe to the comments slice (items, activeIds, total). */ export declare function useSuperDocComments(): CommentsSlice; /** Subscribe to the tracked-changes slice (items, total, activeId). */ export declare function useSuperDocTrackChanges(): TrackChangesSlice; /** * Subscribe to the content-controls (SDT) slice (items, activeIds, * activeId, total). Pair with `ui.contentControls.getRect({ id })` to * anchor custom field chips, citation popovers, or property panels to * the painted wrapper of the active control. * * ```tsx * const { activeId } = useSuperDocContentControls(); * const ui = useSuperDocUI(); * if (!activeId || !ui) return null; * const r = ui.contentControls.getRect({ id: activeId }); * if (!r.success) return null; * return ; * ``` */ export declare function useSuperDocContentControls(): ContentControlsSlice; /** Subscribe to the full toolbar snapshot (context + per-command states). */ export declare function useSuperDocToolbar(): ToolbarSnapshotSlice; /** * Subscribe to the document slice (`{ ready, mode }`). Pair with * `useSuperDocUI()?.document.setMode(...)` and `.export(...)` / * `.replaceFile(...)` to drive a document bar / Export button / mode * toggle from one subscription. */ export declare function useSuperDocDocument(): DocumentSlice; /** * Subscribe to a single command's state by id. * * Works for both built-in command ids (`'bold'`, `'italic'`, …) and * custom command ids registered via `ui.commands.register(...)`. The * returned object includes `active`, `disabled`, `value`, and the * `source` discriminator (`'built-in' | 'custom'`). * * Returns the fallback disabled state until the editor is ready or * while the id isn't registered. * * ```tsx * const bold = useSuperDocCommand('bold'); * * ``` * * Implementation note: this hook bypasses {@link useSuperDocSlice} * because the selector closes over `id`. `useSuperDocSlice`'s * subscription effect re-runs only when the controller swaps, so a * toolbar component reused with a different command id under the * same provider would otherwise keep emitting state for the prior * id. Subscribing here with `[ui, id]` deps fixes the resubscription * the substrate alone can't see. */ export declare function useSuperDocCommand(id: string): UIToolbarCommandState; //# sourceMappingURL=hooks.d.ts.map