nabu.internals
Unstable: may change in any minor version
Nothing reached through nabu.internals is a promise. A key, its type or its behaviour can change, move
or disappear in any minor version. The door itself (the getter) is part of the stable contract; what is behind it is not.
Prefer the stable members of Nabu, Block and the other classes of the contract. If you must use this, pin the version of the package.
Related guide: Extensions: Stability →
Access
get internals(): NabuInternalsThe door itself is part of the stable contract; @unstable is everything behind it: nothing reached through internals is a
promise, it may change, move or disappear in ANY minor version.
Prefer the stable members; use this when you must, and pin the version of the package. The set of keys is frozen by a
test, so a change shows up in the changelog.
Keys 48
The set of keys is pinned by a test, so a change always shows in the changelog. Types: see NabuInternals.
| Key | Type | Description |
|---|---|---|
beforeinput | (e: InputEvent) => any | n/a |
captureUndoSelection | (source?: 'user' | 'settle') => void | Remember the selection for the undo step now being recorded. |
clearStoredMarks | () => void | n/a |
commandConfirm | CommandConfirmation | The confirmation controller of commands (hold / invite / choose): |
content | LoroMap<Record<string, unknown>> | The free-form |
deleteNode | (nodeId: string) => void | Delete a block by node id (no commit). |
dispatchEventToSelection | (handlerName: string, e: Event, hookName?: string) => void | Route a native event to the block that holds the selection. |
dropAt | (dt: DataTransfer, position: DropPosition, opts?: { source?: { range: DeletionRange } | null }) => void | Drop a |
dropTarget | DropTarget | null | The drop indicator being shown (reactive). |
fileConfig | FilesConfig | The resolved |
handleBeforeinput | (e: InputEvent) => void | n/a |
handleCompositionEnd | (e: CompositionEvent) => void | n/a |
handleCompositionStart | (e: CompositionEvent) => void | n/a |
handleCompositionUpdate | (e: CompositionEvent) => void | n/a |
handleCopy | (e: ClipboardEvent) => void | Write the selection to a clipboard (every format). |
handleCut | (e: ClipboardEvent) => void | n/a |
handleDragEnd | (e?: DragEvent) => void | n/a |
handleDragLeave | (e: DragEvent) => void | n/a |
handleDragOver | (e: DragEvent) => void | n/a |
handleDragStart | (e: DragEvent) => void | n/a |
handleDrop | (e: DragEvent) => void | n/a |
handleKeydown | (e: KeyboardEvent) => void | The keydown pipeline (commands first, then hooks, then the block). |
handleMousedown | (e: MouseEvent) => void | n/a |
handlePaste | (e: ClipboardEvent) => void | The paste pipeline (interpreters, files, |
hookOwners | WeakMap<Function, string> | Hook function to the name of the extension that registered it. |
hooks | Map<string, ((nabu: Nabu, ...args: any[]) => any)[]> | Extension hooks by name, in registration order (the normalizers of |
inputRules | InputRule[] | The input rules collected from the extensions. |
insertFragment | (fragment: PasteFragment, opts?: { at?: DropPosition }) => void | Insert a |
noteTextChange | (block: Block) => void | n/a |
pasteFileHandlers | PasteFileHandler[] | The paste file handlers, by priority. |
pasteInterpreters | PasteInterpreter[] | The paste interpreters collected from the extensions. |
pulse | Pulse<typeof PulseEvent> | The action bus behind |
rearmTab | () => void | n/a |
sealUndoEnd | () => void | Close the "where did the last action end" mark of the undo history. |
selection | {
attachRoot: (el: HTMLElement) => () => void;
normalize: () => boolean;
owns: (node: Node | null | undefined) => boolean;
placements: number;
repairAfterRemoval: () => boolean;
root: HTMLElement | null;
scheduleRepair: () => void;
scope: (live?: Selection | null) => 'mine' | 'foreign' | 'outside';
} | The selection's own repair machinery, and the engine's root element: |
selection.attachRoot | (el: HTMLElement) => () => void | n/a |
selection.normalize | () => boolean | n/a |
selection.owns | (node: Node | null | undefined) => boolean | n/a |
selection.placements | number | n/a |
selection.repairAfterRemoval | () => boolean | n/a |
selection.root | HTMLElement | null | n/a |
selection.scheduleRepair | () => void | n/a |
selection.scope | (live?: Selection | null) => 'mine' | 'foreign' | 'outside' | n/a |
storedMarks | Record<string, boolean> | null | Pending inline marks for the next typed character (reactive; assignable). |
tabDescription | string | undefined | The |
toggleStoredMark | (name: string) => void | n/a |
undoManager | UndoManager | The Loro undo manager (undo steps, merge window). |
updateRoots | (retyped?: Set<string>) => void | Re-read the root blocks from the tree. |