/** * @factory/editor — the inline rich-text extension factory. * * `factoryEditorExtensions()` is the single import the apps/web per-block * Tiptap editors (e.g. `components/editor/inline-editor.tsx`) need for the * Factory-specific inline vocabulary: * * extensions: [ * StarterKit, …, * ...factoryEditorExtensions() // mention, equation, highlight * ] * * Ordering note: the web spreads this array LAST so these definitions win * over any StarterKit conflict. All extensions are registered by unique * names (`factory*`) so they never shadow StarterKit. The block-canvas * kernel (codec/autosave/slash/menus) lives at the package root — see * `@factory/editor`'s index — and is consumed by the canvas wiring, not by * the inline editors. */ import type { AnyExtension } from "@tiptap/core"; import { EquationNode } from "./nodes/equation.js"; import { InlineAtomNode } from "./nodes/inline-atom.js"; import { MentionNode } from "./nodes/mention.js"; import { HighlightMark } from "./marks/highlight.js"; /** The Factory inline extensions (mention chips, inline math, highlight, atoms). */ export function factoryEditorExtensions(): AnyExtension[] { return [MentionNode, EquationNode, HighlightMark, InlineAtomNode]; }