/** * Mochott (`site.mochott.article`) — the TipTap document format behind the * [mochott](https://mochott.site) blog platform. * * Mochott writes every post twice: a `site.standard.document` carrying the card * metadata (title, description, cover image, a plaintext `textContent`) and a * `site.mochott.article` **at the same rkey** holding the body. Only the * article record has the renderable content, so that is what this module * parses — a TipTap (ProseMirror) `doc` tree under the record's `content`. * * The vocabulary is ProseMirror's with mochott's own nodes layered on: * * · `linkCard` — an OGP link preview (url + title + description + image). * · `embed` — an oEmbed-style player (`service` + `embedUrl`). * · `footnote` — an *inline* node carrying its body in `attrs.content`, * with no separate definition to pair it against. * · `customBlock` — a user-defined HTML template stored as a * `site.mochott.block` record and snapshotted into the * article alongside the values to interpolate into it. * * Everything lands in the shared {@link StructuredRenderableBlock} vocabulary — * no mochott-specific node types and no per-renderer code. Inline marks become * byte-indexed AT-Proto facets exactly like the other block formats, and the * inline footnotes are lifted into the document-level footnote channel that * `buildRenderTree` numbers. * * Images reference a PDS blob through mochott's own image proxy * (`/api/image/{did}/{cid}`), so the CID is recovered from the URL and handed * to the normal blob resolver rather than pointing a renderer at mochott. * * Knowingly dropped: `textAlign` on paragraphs and headings (the block * vocabulary has no alignment), `colwidth` on table cells, and a custom * block's `css` (page-global stylesheet text, not block content). */ import type { MarkdownDocument } from "./markdown.js"; import type { StructuredRenderableBlock } from "./types.js"; /** The article record; its `content` is the TipTap document. */ export declare const MOCHOTT_ARTICLE = "site.mochott.article"; /** The TipTap document on its own, when stored without the record around it. */ export declare const MOCHOTT_TIPTAP = "site.mochott.article#tiptapDocument"; /** Content `$type`s handled by this module. */ export declare const MOCHOTT_FORMATS: string[]; export declare function isMochottFormat(format: string | null | undefined): boolean; /** * The TipTap `doc` node inside a payload — either a whole `site.mochott.article` * record (body under `content`) or the bare document node. */ export declare function mochottDocNode(content: unknown): Record | null; /** * Blocks *and* footnotes for a `site.mochott.article` payload, or null when the * format doesn't match or the body is empty. Mochott's footnotes are inline * nodes, so they are lifted here into the document-level channel * `buildRenderTree` numbers. */ export declare function mochottDocument(content: unknown, contentFormat?: string | null): MarkdownDocument | null; /** * Renderable blocks for a `site.mochott.article` payload. Registered for every * {@link MOCHOTT_FORMATS} entry so `buildRenderTree` handles mochott like any * other structured format; use {@link mochottDocument} when you also want the * footnotes. */ export declare function mochottBlocks(content: unknown, contentFormat?: string | null): Array | null; //# sourceMappingURL=mochott.d.ts.map