/** * @factory/editor — the block editor kernel. * * Public surface: * * - **Inline layer** (consumed by apps/web per-block Tiptap editors): * {@link factoryEditorExtensions} → `[MentionNode, EquationNode, * HighlightMark]` (the `factory*` inline vocabulary). * - **Canvas kernel** (pure, node-testable): the block tree ↔ document * {@link blocksToDoc}/{@link docToBlocks} codec + {@link diffBlocks} * op diff, the slash registry + {@link searchSlashCommands}, the * context-menu row model + {@link buildBlockMenu}, the 800 ms * {@link AutosaveController}, the {@link History} undo/redo buffer, and * the {@link copyBlocks}/{@link blocksToMarkdown}/{@link markdownToBlocks} * clipboard. * - **Positions** — re-exported from `@factory/shared/positions` * (the single source of truth for fractional positions). * * Subpaths: `@factory/editor/codec`, `/factory`, `/slash`, `/context-menu`, * `/autosave`, `/history`, `/clipboard`, `/positions`. */ // --- inline layer (tiptap) ---------------------------------------------------- export { factoryEditorExtensions } from "./factory.js"; export { MentionNode } from "./nodes/mention.js"; export { EquationNode } from "./nodes/equation.js"; export { HighlightMark } from "./marks/highlight.js"; // --- codec + positions -------------------------------------------------------- export { BLOCK_NODE_TYPE, blocksToDoc, docToBlocks, diffBlocks, toOperations, generateBlockId, jsonEqual, type FactoryDoc, type FactoryDocNode, type BlockDiff, } from "./codec.js"; export * from "./positions.js"; // --- canvas kernel (pure) ----------------------------------------------------- export { SLASH_COMMANDS, searchSlashCommands, fuzzyScore, type SlashCommandDef, type SlashCommandHit, } from "./slash.js"; export { buildBlockMenu, turnIntoRows, turnIntoId, convertToRows, moreRows, ASK_AI_ROWS, TEXT_COLOR_TOKENS, BACKGROUND_COLOR_TOKENS, TEXT_BLOCK_TYPES, type MenuRow, type MenuContext, type BuildBlockMenuOptions, } from "./context-menu.js"; export { AutosaveController, BlockConflictError, } from "./autosave.js"; export { History, HISTORY_LIMIT, type HistorySnapshot, } from "./history.js"; export { copyBlocks, blockToMarkdown, blocksToMarkdown, markdownToBlocks, parsePasted, type CopiedBlock, type PastedBlock, } from "./clipboard.js"; // --- TASK-0123: word-level diff (AI writing tools) ----------------------------- export { wordDiff, reconstructOld, reconstructNew, type DiffSegment } from "./diff.js"; // --- Confluence expansion T-146/147/148 (pure, node-testable) ------------------ export { TableOpError, tableColumns, tableRows, insertRow, removeRow, moveRow, insertColumn, removeColumn, moveColumn, setCell, type TableContent, } from "./table-ops.js"; export { generateToc, headingSlug, anchorHref, type TocEntry, type TocBlockInput, } from "./toc.js"; export { atomTextToHtml, atomHtmlToText } from "./atom-html.js"; export { parseInlineAtoms, atomsToText, STATUS_VALUES, STATUS_COLORS, formatDateAtom, type InlineAtom, type InlineSegment, type DateAtom, type StatusAtom, type LabelAtom, type StatusValue, } from "./inline-atoms.js"; // --- shared structural types -------------------------------------------------- export type { BlockDto, NewBlock, BlockDoc, EditorBlockOperation, SaveState, ConflictInfo, BlocksTransport, AutosaveConfig, HistoryStep, } from "./types.js";