/** * Here live the types to extend RichTextField. * * Table: The table extension is only used internally by TableBlock. It's not * supported by RichText itself, meaning that a user cannot create a table when * interacting with RichTextField. It's also not part of the types-internal * RichText's types, meaning that we only use these in the frontend, so there is * no need to care about RichText table anywhere else. */ import type { EmbedBlock, ImageBlock, RichTextContent, TableContent, TextBlock } from "@prismicio/types-internal/lib/content"; export type ExtendedBlock = EmbedBlock | ImageBlock | TextBlock | TableBlock; /** Superset of RichTextContent that adds support for TableBlock. */ export interface ExtendedRichTextContent extends Omit { value: ExtendedBlock[]; } export interface TableBlock { type: "table"; content: TableContent["content"]; } export declare function isTableBlock(block: ExtendedBlock): block is TableBlock; export declare const ExtendedRichTextNodeType: { readonly table: "table"; readonly heading1: "heading1"; readonly heading2: "heading2"; readonly heading3: "heading3"; readonly heading4: "heading4"; readonly heading5: "heading5"; readonly heading6: "heading6"; readonly paragraph: "paragraph"; readonly strong: "strong"; readonly em: "em"; readonly preformatted: "preformatted"; readonly hyperlink: "hyperlink"; readonly image: "image"; readonly embed: "embed"; readonly list: "list-item"; readonly orderedList: "o-list-item"; readonly rtl: "rtl"; }; export type ExtendedRichTextNodeType = (typeof ExtendedRichTextNodeType)[keyof typeof ExtendedRichTextNodeType]; export declare function isExtendedRichTextNodeTypeSet(set: Set | undefined): set is Set;