@quickbuilder.io/rich-text 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +122 -2
- package/adapters.d.ts +1 -0
- package/adapters.js +1 -0
- package/collaboration.d.ts +1 -0
- package/collaboration.js +1 -0
- package/commands.d.ts +1 -0
- package/commands.js +1 -0
- package/content.d.ts +1 -0
- package/content.js +1 -0
- package/contracts.d.ts +1 -0
- package/contracts.js +1 -0
- package/dist/adapters.d.mts +11 -0
- package/dist/adapters.d.ts +11 -0
- package/dist/adapters.js +564 -0
- package/dist/adapters.js.map +1 -0
- package/dist/adapters.mjs +557 -0
- package/dist/adapters.mjs.map +1 -0
- package/dist/collaboration.d.mts +29 -0
- package/dist/collaboration.d.ts +29 -0
- package/dist/collaboration.js +758 -0
- package/dist/collaboration.js.map +1 -0
- package/dist/collaboration.mjs +733 -0
- package/dist/collaboration.mjs.map +1 -0
- package/dist/commands.d.mts +8 -0
- package/dist/commands.d.ts +8 -0
- package/dist/commands.js +42 -0
- package/dist/commands.js.map +1 -0
- package/dist/commands.mjs +38 -0
- package/dist/commands.mjs.map +1 -0
- package/dist/content-types-CYHsrMrs.d.mts +27 -0
- package/dist/content-types-CYHsrMrs.d.ts +27 -0
- package/dist/content.d.mts +19 -0
- package/dist/content.d.ts +19 -0
- package/dist/content.js +785 -0
- package/dist/content.js.map +1 -0
- package/dist/content.mjs +775 -0
- package/dist/content.mjs.map +1 -0
- package/dist/contracts.d.mts +199 -0
- package/dist/contracts.d.ts +199 -0
- package/dist/contracts.js +4 -0
- package/dist/contracts.js.map +1 -0
- package/dist/contracts.mjs +3 -0
- package/dist/contracts.mjs.map +1 -0
- package/dist/extensions.d.mts +363 -0
- package/dist/extensions.d.ts +363 -0
- package/dist/extensions.js +153 -0
- package/dist/extensions.js.map +1 -0
- package/dist/extensions.mjs +142 -0
- package/dist/extensions.mjs.map +1 -0
- package/dist/history.d.mts +12 -0
- package/dist/history.d.ts +12 -0
- package/dist/history.js +464 -0
- package/dist/history.js.map +1 -0
- package/dist/history.mjs +459 -0
- package/dist/history.mjs.map +1 -0
- package/dist/index.d.mts +12 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +1438 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1372 -0
- package/dist/index.mjs.map +1 -0
- package/dist/markdown.d.mts +32 -0
- package/dist/markdown.d.ts +32 -0
- package/dist/markdown.js +739 -0
- package/dist/markdown.js.map +1 -0
- package/dist/markdown.mjs +735 -0
- package/dist/markdown.mjs.map +1 -0
- package/dist/runtime/dom.d.mts +148 -0
- package/dist/runtime/dom.d.ts +148 -0
- package/dist/runtime/dom.js +2145 -0
- package/dist/runtime/dom.js.map +1 -0
- package/dist/runtime/dom.mjs +2084 -0
- package/dist/runtime/dom.mjs.map +1 -0
- package/dist/schema.d.mts +23 -0
- package/dist/schema.d.ts +23 -0
- package/dist/schema.js +157 -0
- package/dist/schema.js.map +1 -0
- package/dist/schema.mjs +137 -0
- package/dist/schema.mjs.map +1 -0
- package/dist/serializer.d.mts +38 -0
- package/dist/serializer.d.ts +38 -0
- package/dist/serializer.js +504 -0
- package/dist/serializer.js.map +1 -0
- package/dist/serializer.mjs +491 -0
- package/dist/serializer.mjs.map +1 -0
- package/dist/svg-export-BtI8x_mG.d.mts +15 -0
- package/dist/svg-export-BtI8x_mG.d.ts +15 -0
- package/dist/transactions.d.mts +16 -0
- package/dist/transactions.d.ts +16 -0
- package/dist/transactions.js +637 -0
- package/dist/transactions.js.map +1 -0
- package/dist/transactions.mjs +631 -0
- package/dist/transactions.mjs.map +1 -0
- package/extensions.d.ts +1 -0
- package/extensions.js +1 -0
- package/history.d.ts +1 -0
- package/history.js +1 -0
- package/package.json +352 -4
- package/schema.d.ts +1 -0
- package/schema.js +1 -0
- package/serializer.d.ts +1 -0
- package/serializer.js +1 -0
- package/transactions.d.ts +1 -0
- package/transactions.js +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/schema.ts","../src/entities.ts","../src/serializer.ts","../src/markdown.ts"],"names":["attributes","source"],"mappings":";AAWO,IAAM,sCAAA,GAAyC,CAAA;AAE/C,IAAM,mBAAA,GAAsB;AAAA,EACjC,GAAA;AAAA,EACA,GAAA;AAAA,EACA,YAAA;AAAA,EACA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA,GAAA;AAAA,EACA,KAAA;AAAA,EACA,OAAA;AAAA,EACA,OAAA;AAAA,EACA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,IAAA;AAAA,EACA,GAAA;AAAA,EACA,KAAA;AAAA,EACA,UAAA;AAAA,EACA,GAAA;AAAA,EACA,MAAA;AAAA,EACA,KAAA;AAAA,EACA,KAAA;AAAA,EACA,QAAA;AAAA,EACA,OAAA;AAAA,EACA,OAAA;AAAA,EACA,IAAA;AAAA,EACA,OAAA;AAAA,EACA,IAAA;AAAA,EACA,OAAA;AAAA,EACA,IAAA;AAAA,EACA,GAAA;AAAA,EACA;AACF,CAAA;AAEO,IAAM,gBAAA,GAAmB,CAAC,IAAA,EAAM,IAAA,EAAM,OAAO,OAAO,CAAA;AAEpD,IAAM,sBAAA,GAAyB,CAAC,QAAA,EAAU,OAAA,EAAS,WAAW,MAAM,CAAA;AAEpE,IAAM,qBAAA,GAAwB;AAAA,EACnC,YAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA,GAAA;AAAA,EACA,KAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA;AACF,CAAA;AAEO,IAAM,y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AAA,EAAG,gBAAgB,CAAA,CAAA,GAAK;AAAA,KACjE;AAAA,EACF;AACA,EAAA,KAAA,EAAM;AACN,EAAA,OAAO,MAAA;AACT;AASO,SAAS,wBAAA,CACd,QAAA,EACA,OAAA,GAAqC,EAAC,EACb;AACzB,EAAA,OAAO,YAAY,iBAAA,CAAkB,QAAA,EAAU,OAAO,CAAA,CAAE,KAAA,CAAM,IAAI,CAAC,CAAA;AACrE;AAEO,SAAS,sBAAA,CACd,QAAA,EACA,OAAA,GAAqC,EAAC,EAC9B;AACR,EAAA,OAAO,eAAA,CAAgB,wBAAA,CAAyB,QAAA,EAAU,OAAO,CAAC,CAAA;AACpE;AAEO,SAAS,kCAAA,CACd,QAAA,EACA,OAAA,GAAqC,EAAC,EACZ;AAC1B,EAAA,MAAM,IAAA,GAAO,sBAAA,CAAuB,QAAA,EAAU,OAAO,CAAA;AACrD,EAAA,OAAO;AAAA,IACL,IAAA;AAAA,IACA,SAAA,EAAW,wBAAwB,IAAI,CAAA;AAAA,IACvC,aAAA,EAAe;AAAA,GACjB;AACF","file":"markdown.mjs","sourcesContent":["import type {\n RichTextAlignment,\n RichTextBlockFormat,\n RichTextBlockFormatDefinition,\n RichTextBlockTag,\n RichTextColor,\n RichTextFontFamily,\n RichTextFontSize,\n RichTextLineHeight,\n} from './content-types';\n\nexport const QUICK_BUILDER_RICH_TEXT_SCHEMA_VERSION = 2;\n\nexport const richTextAllowedTags = [\n 'a',\n 'b',\n 'blockquote',\n 'br',\n 'code',\n 'em',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'hr',\n 'i',\n 'img',\n 'input',\n 'label',\n 'li',\n 'mark',\n 'ol',\n 'p',\n 'pre',\n 'qb-video',\n 's',\n 'span',\n 'sub',\n 'sup',\n 'strong',\n 'table',\n 'tbody',\n 'td',\n 'tfoot',\n 'th',\n 'thead',\n 'tr',\n 'u',\n 'ul',\n] as const;\n\nexport const richTextVoidTags = ['br', 'hr', 'img', 'input'] as const;\n\nexport const richTextAllowedTargets = ['_blank', '_self', '_parent', '_top'] as const;\n\nexport const richTextAlignmentTags = [\n 'blockquote',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'li',\n 'ol',\n 'p',\n 'pre',\n 'td',\n 'th',\n 'ul',\n] as const;\n\nexport const richTextAllowedAlignments = ['left', 'center', 'right', 'justify'] as const;\n\nexport const richTextAllowedFontFamilies = [\n 'default',\n 'carlito',\n 'source-sans-3',\n 'noto-sans',\n 'arimo',\n 'tinos',\n 'cousine',\n] as const satisfies readonly RichTextFontFamily[];\n\nexport const richTextAllowedFontSizes = [\n 'default',\n '8',\n '9',\n '10',\n '11',\n '12',\n '14',\n '16',\n '18',\n '24',\n '30',\n '36',\n '48',\n '60',\n '72',\n '96',\n] as const satisfies readonly RichTextFontSize[];\n\nexport const richTextAllowedLineHeights = ['1', '1.15', '1.5', '2'] as const satisfies readonly RichTextLineHeight[];\n\nexport const richTextAllowedColors = [\n 'default',\n 'gray',\n 'brown',\n 'orange',\n 'yellow',\n 'green',\n 'blue',\n 'purple',\n 'pink',\n 'red',\n] as const satisfies readonly RichTextColor[];\n\nexport const richTextBlockSelector = 'p,h1,h2,h3,pre,blockquote,li,ul,ol,td,th';\n\nexport const richTextBlockFormatByTagName: Partial<Record<string, RichTextBlockFormat>> = {\n p: 'paragraph',\n h1: 'heading1',\n h2: 'heading2',\n h3: 'heading3',\n pre: 'codeBlock',\n};\n\nexport const richTextBlockFormats: RichTextBlockFormatDefinition[] = [\n { value: 'paragraph', tagName: 'p' },\n { value: 'heading1', tagName: 'h1' },\n { value: 'heading2', tagName: 'h2' },\n { value: 'heading3', tagName: 'h3' },\n { value: 'codeBlock', tagName: 'pre' },\n];\n\nexport function isRichTextAlignment(value: unknown): value is RichTextAlignment {\n return richTextAllowedAlignments.includes(value as RichTextAlignment);\n}\n\nexport function isRichTextFontFamily(value: unknown): value is RichTextFontFamily {\n return richTextAllowedFontFamilies.includes(value as RichTextFontFamily);\n}\n\nexport function isRichTextFontSize(value: unknown): value is RichTextFontSize {\n return richTextAllowedFontSizes.includes(value as RichTextFontSize);\n}\n\nexport function isRichTextLineHeight(value: unknown): value is RichTextLineHeight {\n return richTextAllowedLineHeights.includes(value as RichTextLineHeight);\n}\n\nexport function isRichTextColor(value: unknown): value is RichTextColor {\n return richTextAllowedColors.includes(value as RichTextColor);\n}\n\nexport function isRichTextBlockTag(value: unknown): value is RichTextBlockTag {\n return value === 'p' || value === 'h1' || value === 'h2' || value === 'h3' || value === 'pre' || value === 'blockquote';\n}\n","/** Shared, single-pass entity decoding for portable rich-text serializers. */\nconst entities: Readonly<Record<string, string>> = {\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n quot: '\"',\n apos: \"'\",\n nbsp: \"\\u00a0\",\n copy: \"©\",\n reg: \"®\",\n trade: \"™\",\n mdash: \"—\",\n ndash: \"–\",\n hellip: \"…\",\n lsquo: \"‘\",\n rsquo: \"’\",\n ldquo: \"“\",\n rdquo: \"”\",\n bull: \"•\",\n middot: \"·\",\n};\nexport function decodeRichTextEntities(value: string): string {\n return value.replace(\n /&(#x[\\da-f]+|#\\d+|[a-z][a-z\\d]+);/gi,\n (original, entity: string) => {\n if (!entity.startsWith(\"#\")) {\n const decoded = entities[entity];\n if (decoded === undefined)\n throw new Error(\n `Unsupported named rich-text entity ${original}; use Unicode or a numeric entity`,\n );\n return decoded;\n }\n const point =\n entity[1]?.toLowerCase() === \"x\"\n ? Number.parseInt(entity.slice(2), 16)\n : Number(entity.slice(1));\n if (point < 1 || point > 0x10ffff || (point >= 0xd800 && point <= 0xdfff))\n throw new Error(\"Invalid rich-text character entity\");\n return String.fromCodePoint(point);\n },\n );\n}\n\n","import {\n isRichTextAlignment,\n isRichTextColor,\n isRichTextFontFamily,\n isRichTextFontSize,\n isRichTextLineHeight,\n richTextAlignmentTags,\n richTextAllowedTags,\n richTextAllowedTargets,\n richTextVoidTags,\n} from './schema';\nimport { decodeRichTextEntities } from './entities';\n\nconst ACTIVE_CONTENT_TAG_PATTERN = /<\\s*(script|style|iframe|object|embed|form)\\b[^>]*>[\\s\\S]*?<\\s*\\/\\s*\\1\\s*>/gi;\nconst ACTIVE_VOID_TAG_PATTERN = /<\\s*(?:script|style|iframe|object|embed|link|meta|base)\\b[^>]*\\/?\\s*>/gi;\nconst EVENT_HANDLER_ATTRIBUTE_PATTERN = /\\son[a-z]+\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s>]*)/gi;\nconst UNSAFE_URL_ATTRIBUTE_PATTERN = /\\s(?:href|src|xlink:href)\\s*=\\s*([\"']?)\\s*(?:javascript|vbscript|data\\s*:\\s*text\\/html)\\s*:[\\s\\S]*?\\1/gi;\nconst UNSAFE_STYLE_URL_PATTERN = /url\\s*\\(\\s*([\"']?)\\s*(?:javascript|vbscript|data\\s*:\\s*text\\/html)\\s*:/gi;\nconst RICH_TEXT_VIDEO_PATTERN = /<qb-video\\b((?:\"[^\"]*\"|'[^']*'|[^'\">])*)>[\\s\\S]*?<\\/qb-video>/gi;\nconst RICH_TEXT_TAG_PATTERN = /<qb-video\\b((?:\"[^\"]*\"|'[^']*'|[^'\">])*)>[\\s\\S]*?<\\/qb-video>|<\\/?([a-z][a-z0-9-]*)\\b((?:\"[^\"]*\"|'[^']*'|[^'\">])*)>/gi;\nconst ATTRIBUTE_VALUE_PATTERN = /([a-zA-Z_:][-a-zA-Z0-9_:.]*)\\s*=\\s*(?:\"([^\"]*)\"|'([^']*)'|([^\\s>]+))/g;\n\nconst allowedTagSet = new Set<string>(richTextAllowedTags);\nconst voidTagSet = new Set<string>(richTextVoidTags);\nconst allowedTargetSet = new Set<string>(richTextAllowedTargets);\nconst alignmentTagSet = new Set<string>(richTextAlignmentTags);\n\nexport const richTextMaximumUrlLength = 4_096;\nexport const richTextMaximumImageTextLength = 512;\n\nexport interface RichTextVideo { src: string; title: string }\n\nexport function validateRichTextVideo(src: string, title: string): RichTextVideo | undefined {\n src = src.trim();\n title = title.trim();\n if (!src || src.length > 2048 || !title || title.length > 200 || /[\\u0000-\\u0020\\u007f\\\\]/u.test(src)) return;\n const relative = /^\\/(?!\\/)/u.test(src);\n if (!relative && !src.startsWith('https://')) return;\n try {\n const url = new URL(src, 'https://rich-text.invalid');\n if (url.protocol !== 'https:' || url.username || url.password) return;\n return { src, title };\n } catch { return; }\n}\n\nfunction readVideoAttributes(raw: string) {\n const attributes = readHtmlAttributes(raw);\n return validateRichTextVideo(attributes.get('data-src') ?? '', attributes.get('data-title') ?? '');\n}\n\nexport function splitRichTextVideoBlocks(html: string): (string | RichTextVideo)[] {\n const content = normalizeRichTextHtml(html);\n const parts: (string | RichTextVideo)[] = [];\n let offset = 0;\n for (const match of content.matchAll(RICH_TEXT_VIDEO_PATTERN)) {\n const video = readVideoAttributes(match[1] ?? '');\n if (!video) continue;\n if (match.index > offset) parts.push(content.slice(offset, match.index));\n parts.push(video);\n offset = match.index + match[0].length;\n }\n if (offset < content.length) parts.push(content.slice(offset));\n return parts;\n}\n\nexport function stripActiveMarkup(value: string): string {\n return value\n .replace(ACTIVE_CONTENT_TAG_PATTERN, '')\n .replace(ACTIVE_VOID_TAG_PATTERN, '')\n .replace(EVENT_HANDLER_ATTRIBUTE_PATTERN, '')\n .replace(UNSAFE_URL_ATTRIBUTE_PATTERN, '')\n .replace(UNSAFE_STYLE_URL_PATTERN, 'url(');\n}\n\nexport interface RichTextSanitizationOptions {\n /** Resolve an untrusted image source to an approved URL, or remove it with null. */\n resolveImageSource?: (source: string) => string | null;\n /** Disable video blocks for content whose host does not authorize embedded media. */\n allowVideos?: boolean;\n /** Render governed videos as links when the destination cannot embed a player. */\n videoPresentation?: 'embed' | 'link';\n /** Retain bounded cid: image references for an explicitly selected email transport. */\n allowContentIdImages?: boolean;\n /** Select anonymous cross-origin requests globally or by the final approved source. */\n imageCrossOrigin?: 'anonymous' | ((source: string) => 'anonymous' | undefined);\n}\n\nexport function sanitizeRichTextMarkup(value: string, options: RichTextSanitizationOptions = {}): string {\n if (options.resolveImageSource !== undefined && typeof options.resolveImageSource !== 'function')\n throw new TypeError('Invalid rich text image resolver.');\n if (options.allowVideos !== undefined && typeof options.allowVideos !== 'boolean')\n throw new TypeError('Invalid rich text video policy.');\n if (options.videoPresentation !== undefined && !['embed', 'link'].includes(options.videoPresentation))\n throw new TypeError('Invalid rich text video presentation.');\n if (options.allowContentIdImages !== undefined && typeof options.allowContentIdImages !== 'boolean')\n throw new TypeError('Invalid rich text Content-ID image policy.');\n if (options.imageCrossOrigin !== undefined && options.imageCrossOrigin !== 'anonymous' && typeof options.imageCrossOrigin !== 'function')\n throw new TypeError('Invalid rich text image credentials policy.');\n return sanitizeMarkup(value, options);\n}\n\n/** Rebind persisted image URLs without modifying text, block identity or other links. */\nexport function rewriteRichTextImageSources(value: string, rewrite: (source: string) => string): string {\n if (value.length > 1_000_000) throw new RangeError('Rich text exceeds the serialization limit');\n return sanitizeMarkup(value, { resolveImageSource: source => isSafeRichTextImageSrc(source) ? rewrite(source) : null });\n}\n\nfunction sanitizeMarkup(value: string, options: RichTextSanitizationOptions = {}): string {\n // Attribute policy is applied to actual tags below. Scanning escaped text\n // for attributes would corrupt code examples such as `onerror=...`.\n return value\n .replace(ACTIVE_CONTENT_TAG_PATTERN, '')\n .replace(ACTIVE_VOID_TAG_PATTERN, '')\n .replace(RICH_TEXT_TAG_PATTERN, (match, rawVideo: string | undefined, rawTagName: string, rawAttributes: string) => {\n if (rawVideo !== undefined) {\n if (options.allowVideos === false) return '';\n const video = readVideoAttributes(rawVideo);\n if (!video) return '';\n if (options.videoPresentation === 'link') {\n return withBlockIdentity('<p>', rawVideo) + `<br><a href=\"${escapeHtmlAttribute(video.src)}\">${escapeHtmlAttribute(video.title)}</a></p>`;\n }\n return withBlockIdentity(`<qb-video data-src=\"${escapeHtmlAttribute(video.src)}\" data-title=\"${escapeHtmlAttribute(video.title)}\" contenteditable=\"false\">`, rawVideo) + '</qb-video>';\n }\n const tagName = rawTagName.toLowerCase();\n if (tagName === 'qb-video') return '';\n\n if (!allowedTagSet.has(tagName)) {\n return '';\n }\n\n if (match.startsWith('</')) {\n return voidTagSet.has(tagName) ? '' : `</${tagName}>`;\n }\n\n if (voidTagSet.has(tagName)) {\n if (tagName === 'img') {\n return withBlockIdentity(renderSafeImageTag(rawAttributes, options),rawAttributes);\n }\n if (tagName === 'input') {\n return withBlockIdentity(renderSafeTaskCheckbox(rawAttributes),rawAttributes);\n }\n return withBlockIdentity(`<${tagName}>`,rawAttributes);\n }\n\n if (tagName !== 'a') {\n return withBlockIdentity(renderSafeRichTextTag(tagName, rawAttributes),rawAttributes);\n }\n\n return renderSafeAnchorTag(rawAttributes);\n });\n}\n\n/** Converts explicitly plain text to the canonical HTML document without interpreting markup. */\nexport function plainTextToRichTextHtml(value: string): string {\n return `<p>${value.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/\\r\\n?/g, '\\n').replace(/\\n/g, '<br>')}</p>`;\n}\n\nexport function normalizeRichTextHtml(value: string): string {\n const sanitized = sanitizeRichTextMarkup(value);\n return sanitized.trim() ? sanitized : '<p></p>';\n}\n\nexport function richTextHtmlToPlainText(html: string): string {\n if (html.length > 1_000_000) throw new RangeError('Rich text exceeds the serialization limit');\n const text = sanitizeRichTextMarkup(html)\n .replace(RICH_TEXT_VIDEO_PATTERN, (_element, raw: string) => `\\n${escapeHtmlAttribute(readVideoAttributes(raw)?.title ?? '')}\\n`)\n .replace(/<!--[\\s\\S]*?-->/g, '')\n .replace(/<(?:br|hr)\\b[^>]*>/gi, '\\n')\n .replace(/<\\/(?:p|h[1-6]|li|blockquote|pre|tr|table)>/gi, '\\n')\n .replace(/<\\/(?:td|th)>/gi, '\\t')\n .replace(/<[^>]*>/g, '');\n return decodeRichTextEntities(text).replace(/\\t+\\n/g, '\\n').trim();\n}\n\n/** Stable, inert block identity for the owned collaborative DOM projection. */\nfunction withBlockIdentity(tag:string,rawAttributes:string):string {\n const id=readHtmlAttributes(rawAttributes).get('data-qb-block-id');\n if(!tag || tag.startsWith('<span') || !id || !/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/.test(id))return tag;\n return tag.replace(/>$/,` data-qb-block-id=\"${id}\">`);\n}\n\nfunction renderSafeRichTextTag(tagName: string, rawAttributes: string): string {\n if (tagName === 'span') {\n return renderSafeSpanTag(rawAttributes);\n }\n\n if (tagName === 'td' || tagName === 'th') {\n return renderSafeTableCellTag(tagName, rawAttributes);\n }\n\n if (tagName === 'ul') {\n const attributes = readHtmlAttributes(rawAttributes);\n return attributes.get('data-task-list') === 'true' ? '<ul data-task-list=\"true\">' : '<ul>';\n }\n\n if (tagName === 'li') {\n const attributes = readHtmlAttributes(rawAttributes);\n const checked = attributes.get('data-checked');\n return checked === 'true' || checked === 'false' ? `<li data-checked=\"${checked}\">` : '<li>';\n }\n\n if (!alignmentTagSet.has(tagName)) {\n return `<${tagName}>`;\n }\n\n const attributes = readHtmlAttributes(rawAttributes);\n const renderedAttributes: string[] = [];\n const alignment = attributes.get('data-align');\n const lineHeight = attributes.get('data-line-height');\n if (isRichTextAlignment(alignment)) renderedAttributes.push(`data-align=\"${alignment}\"`);\n if (isRichTextLineHeight(lineHeight)) renderedAttributes.push(`data-line-height=\"${lineHeight}\"`);\n return renderedAttributes.length > 0 ? `<${tagName} ${renderedAttributes.join(' ')}>` : `<${tagName}>`;\n}\n\nfunction renderSafeSpanTag(rawAttributes: string): string {\n const attributes = readHtmlAttributes(rawAttributes);\n const renderedAttributes: string[] = [];\n const id = normalizeMentionAttribute(attributes.get('data-mention-id'), 128);\n const label = normalizeMentionAttribute(attributes.get('data-mention-label'), 160);\n const fontFamily = attributes.get('data-font-family');\n const fontSize = attributes.get('data-font-size');\n const textColor = attributes.get('data-text-color');\n const highlightColor = attributes.get('data-highlight-color');\n\n if (id && label) {\n renderedAttributes.push(\n `data-mention-id=\"${escapeHtmlAttribute(id)}\"`,\n `data-mention-label=\"${escapeHtmlAttribute(label)}\"`,\n );\n }\n if (isRichTextFontFamily(fontFamily) && fontFamily !== 'default') renderedAttributes.push(`data-font-family=\"${fontFamily}\"`);\n if (isRichTextFontSize(fontSize) && fontSize !== 'default') renderedAttributes.push(`data-font-size=\"${fontSize}\"`);\n if (isRichTextColor(textColor) && textColor !== 'default') renderedAttributes.push(`data-text-color=\"${textColor}\"`);\n if (isRichTextColor(highlightColor) && highlightColor !== 'default') renderedAttributes.push(`data-highlight-color=\"${highlightColor}\"`);\n\n return renderedAttributes.length > 0 ? `<span ${renderedAttributes.join(' ')}>` : '<span>';\n}\n\nfunction renderSafeTableCellTag(tagName: string, rawAttributes: string): string {\n const attributes = readHtmlAttributes(rawAttributes);\n const renderedAttributes: string[] = [];\n const alignment = attributes.get('data-align');\n const colSpan = normalizeTableSpan(attributes.get('colspan'));\n const rowSpan = normalizeTableSpan(attributes.get('rowspan'));\n const scope = attributes.get('scope');\n\n if (isRichTextAlignment(alignment)) {\n renderedAttributes.push(`data-align=\"${alignment}\"`);\n }\n\n if (colSpan) {\n renderedAttributes.push(`colspan=\"${colSpan}\"`);\n }\n\n if (rowSpan) {\n renderedAttributes.push(`rowspan=\"${rowSpan}\"`);\n }\n\n if (tagName === 'th' && scope && ['col', 'row', 'colgroup', 'rowgroup'].includes(scope)) {\n renderedAttributes.push(`scope=\"${scope}\"`);\n }\n\n return renderedAttributes.length > 0 ? `<${tagName} ${renderedAttributes.join(' ')}>` : `<${tagName}>`;\n}\n\nfunction renderSafeAnchorTag(rawAttributes: string): string {\n const attributes = readHtmlAttributes(rawAttributes);\n const renderedAttributes: string[] = [];\n const href = attributes.get('href');\n const target = attributes.get('target');\n\n if (href && isSafeRichTextHref(href)) {\n renderedAttributes.push(`href=\"${escapeHtmlAttribute(href)}\"`);\n }\n\n if (target && allowedTargetSet.has(target)) {\n renderedAttributes.push(`target=\"${target}\"`);\n if (target === '_blank') {\n renderedAttributes.push('rel=\"noopener noreferrer\"');\n }\n }\n\n return renderedAttributes.length > 0 ? `<a ${renderedAttributes.join(' ')}>` : '<a>';\n}\n\nfunction renderSafeImageTag(rawAttributes: string, options: RichTextSanitizationOptions): string {\n const attributes = readHtmlAttributes(rawAttributes);\n const source = attributes.get('src');\n const resolveSource = options.resolveImageSource;\n if (!source || !resolveSource && !isAllowedImageSource(source, options)) return '';\n const src = resolveSource ? resolveSource(source) : source;\n if (src === null) return '';\n if (!isAllowedImageSource(src, options)) throw new TypeError('Invalid replacement image URL.');\n const renderedAttributes = [\n `src=\"${escapeHtmlAttribute(src)}\"`,\n `alt=\"${escapeHtmlAttribute(normalizeTextAttribute(attributes.get('alt'), 512) ?? '')}\"`,\n ];\n const title = normalizeTextAttribute(attributes.get('title'), 512);\n const width = normalizeImageDimension(attributes.get('width'));\n const height = normalizeImageDimension(attributes.get('height'));\n if (title) renderedAttributes.push(`title=\"${escapeHtmlAttribute(title)}\"`);\n if (width) renderedAttributes.push(`width=\"${width}\"`);\n if (height) renderedAttributes.push(`height=\"${height}\"`);\n const credentials = typeof options.imageCrossOrigin === 'function' ? options.imageCrossOrigin(src) : options.imageCrossOrigin;\n if (credentials !== undefined && credentials !== 'anonymous') throw new TypeError('Invalid resolved image credentials policy.');\n if ((credentials ?? attributes.get('crossorigin')) === 'anonymous') renderedAttributes.push('crossorigin=\"anonymous\"');\n renderedAttributes.push('loading=\"lazy\"', 'decoding=\"async\"');\n return `<img ${renderedAttributes.join(' ')}>`;\n}\n\nfunction isAllowedImageSource(value: string, options: RichTextSanitizationOptions): boolean {\n if (isSafeRichTextImageSrc(value)) return true;\n if (!options.allowContentIdImages || value.length > richTextMaximumUrlLength || !/^cid:/iu.test(value)) return false;\n try {\n const identity = decodeURIComponent(value.slice(4));\n return identity.length > 0 && identity.length <= 200 && !/[^\\u0021-\\u007e]|[<>\"]/u.test(identity);\n } catch { return false; }\n}\n\nfunction renderSafeTaskCheckbox(rawAttributes: string): string {\n const attributes = readHtmlAttributes(rawAttributes);\n if (attributes.get('type')?.toLowerCase() !== 'checkbox') return '';\n const checked = attributes.get('checked') !== undefined || /(?:^|\\s)checked(?:\\s|=|$)/i.test(rawAttributes);\n return `<input type=\"checkbox\"${checked ? ' checked=\"\"' : ''} contenteditable=\"false\">`;\n}\n\nfunction readHtmlAttributes(rawAttributes: string): Map<string, string> {\n const attributes = new Map<string, string>();\n\n for (const match of rawAttributes.matchAll(ATTRIBUTE_VALUE_PATTERN)) {\n const name = match[1]?.toLowerCase();\n const value = match[2] ?? match[3] ?? match[4] ?? '';\n\n if (name) {\n attributes.set(name, decodeHtmlAttribute(value.trim()));\n }\n }\n\n return attributes;\n}\n\n/**\n * Returns whether a link target is accepted by the governed rich-text schema.\n * Relative URLs and document fragments are supported. Absolute URLs must use\n * an explicitly approved protocol so custom application schemes cannot leak\n * through authored content.\n */\nexport function isSafeRichTextHref(value: string): boolean {\n const trimmed = value.trim();\n if (!trimmed || trimmed.length > richTextMaximumUrlLength || /[\\u0000-\\u001f\\u007f]/.test(trimmed)) {\n return false;\n }\n\n if (trimmed.startsWith('//')) {\n return false;\n }\n\n if (/^(?:#|\\/|\\.\\/|\\.\\.\\/|\\?)/.test(trimmed)) {\n return true;\n }\n\n try {\n const url = new URL(trimmed);\n return ['http:', 'https:', 'mailto:', 'tel:'].includes(url.protocol.toLowerCase());\n } catch {\n return false;\n }\n}\n\nexport function isSafeRichTextImageSrc(value: string): boolean {\n const trimmed = value.trim();\n if (!trimmed\n || trimmed.length > richTextMaximumUrlLength\n || /[\\u0000-\\u001f\\u007f]/.test(trimmed)\n || trimmed.startsWith('//')) return false;\n if (/^(?:\\/|\\.\\/|\\.\\.\\/)/.test(trimmed)) return true;\n\n try {\n const url = new URL(trimmed);\n return url.protocol === 'http:' || url.protocol === 'https:';\n } catch {\n return false;\n }\n}\n\nfunction normalizeTableSpan(value: string | undefined): string | null {\n if (!value || !/^\\d{1,3}$/.test(value)) {\n return null;\n }\n\n const numericValue = Number(value);\n return numericValue >= 1 && numericValue <= 100 ? String(numericValue) : null;\n}\n\nfunction normalizeMentionAttribute(value: string | undefined, maxLength: number): string | null {\n const normalized = value?.trim();\n if (!normalized || normalized.length > maxLength || /[<>\"'`]/.test(normalized)) {\n return null;\n }\n\n return normalized;\n}\n\nfunction normalizeTextAttribute(value: string | undefined, maxLength: number): string | null {\n const normalized = value?.trim();\n if (!normalized || normalized.length > maxLength) return null;\n return normalized;\n}\n\nfunction normalizeImageDimension(value: string | undefined): string | null {\n if (!value || !/^\\d{1,5}$/.test(value)) return null;\n const numericValue = Number(value);\n return numericValue >= 1 && numericValue <= 10_000 ? String(numericValue) : null;\n}\n\nfunction escapeHtmlAttribute(value: string): string {\n return value\n .replace(/&/g, '&')\n .replace(/\"/g, '"')\n .replace(/</g, '<')\n .replace(/>/g, '>');\n}\n\nfunction decodeHtmlAttribute(value: string): string {\n return value.replace(/&(?:#(\\d+)|#x([0-9a-f]+)|(amp|quot|apos|lt|gt));/gi, (entity, decimal, hexadecimal, named) => {\n if (decimal || hexadecimal) {\n const codePoint = decimal ? Number(decimal) : Number.parseInt(hexadecimal, 16);\n if (!Number.isSafeInteger(codePoint) || codePoint <= 0 || codePoint > 0x10ffff || (codePoint >= 0xd800 && codePoint <= 0xdfff)) {\n return '\\ufffd';\n }\n return String.fromCodePoint(codePoint);\n }\n const namedEntity: Record<string, string> = {\n amp: '&',\n apos: \"'\",\n gt: '>',\n lt: '<',\n quot: '\"',\n };\n return namedEntity[String(named).toLowerCase()] ?? entity;\n });\n}\n","import type { RichTextDocumentSnapshot } from \"./content-types\";\nimport { QUICK_BUILDER_RICH_TEXT_SCHEMA_VERSION } from \"./schema\";\nimport {\n isSafeRichTextHref,\n isSafeRichTextImageSrc,\n richTextHtmlToPlainText,\n sanitizeRichTextMarkup,\n} from \"./serializer\";\n\nconst DEFAULT_MAX_MARKDOWN_LENGTH = 1_000_000;\nconst MAX_MARKDOWN_LENGTH = 5_000_000;\nconst INLINE_TOKEN_PREFIX = \"\\u0000qb-markdown-inline-\";\nconst HARD_BREAK_TOKEN = \"\\u0000qb-markdown-hard-break\\u0000\";\n\nexport type MarkdownLimitBehavior = \"throw\" | \"truncate\";\n\nexport interface MarkdownToRichTextOptions {\n /**\n * Bounds parser work for untrusted input. Defaults to one million UTF-16\n * code units and may not exceed five million.\n */\n maxLength?: number;\n /** Controls whether over-limit input is rejected or deterministically truncated. */\n limitBehavior?: MarkdownLimitBehavior;\n}\n\nexport type RichTextMarkdownBlock =\n | { type: \"html\"; html: string }\n | { type: \"code\"; value: string; language?: string };\n\nfunction assertMarkdownOptions(options: MarkdownToRichTextOptions): {\n limitBehavior: MarkdownLimitBehavior;\n maxLength: number;\n} {\n const maxLength = options.maxLength ?? DEFAULT_MAX_MARKDOWN_LENGTH;\n const limitBehavior = options.limitBehavior ?? \"throw\";\n\n if (\n !Number.isInteger(maxLength) ||\n maxLength < 1 ||\n maxLength > MAX_MARKDOWN_LENGTH\n ) {\n throw new Error(\n `Unsupported markdown maxLength \"${String(maxLength)}\". ` +\n `Use an integer from 1 to ${MAX_MARKDOWN_LENGTH}.`,\n );\n }\n if (limitBehavior !== \"throw\" && limitBehavior !== \"truncate\") {\n throw new Error(\n `Unsupported markdown limitBehavior \"${String(limitBehavior)}\". ` +\n 'Use \"throw\" or \"truncate\".',\n );\n }\n\n return { limitBehavior, maxLength };\n}\n\nfunction normalizeMarkdown(\n markdown: string,\n options: MarkdownToRichTextOptions,\n): string {\n if (typeof markdown !== \"string\") {\n throw new Error(\"Markdown content must be a string.\");\n }\n\n const { limitBehavior, maxLength } = assertMarkdownOptions(options);\n const normalized = markdown.replace(/\\u0000/g, \"\").replace(/\\r\\n?/g, \"\\n\");\n\n if (normalized.length <= maxLength) return normalized;\n if (limitBehavior === \"truncate\") return normalized.slice(0, maxLength);\n\n throw new Error(\n `Markdown content exceeds the configured ${maxLength} character limit.`,\n );\n}\n\nfunction escapeHtml(value: string): string {\n return value\n .replace(/&/g, \"&\")\n .replace(/</g, \"<\")\n .replace(/>/g, \">\")\n .replace(/\"/g, \""\");\n}\n\nfunction renderInlineMarkdown(value: string): string {\n const tokens: { html: string; text: string }[] = [];\n const protect = (html: string, text = html) => {\n const token = `${INLINE_TOKEN_PREFIX}${tokens.length}\\u0000`;\n tokens.push({ html, text });\n return token;\n };\n const restore = (source: string, format: \"html\" | \"text\") =>\n source.replace(\n /\\u0000qb-markdown-inline-(\\d+)\\u0000/g,\n (_match, index: string) => tokens[Number(index)]?.[format] ?? \"\",\n );\n // Protect complete inline constructs before interpreting emphasis. Only our\n // generated markup is restored, so source HTML never becomes executable.\n let source = value\n .replace(\n /\\\\([\\\\`*_[\\]{}()#+\\-.!|>~])|(`+)([\\s\\S]*?[^`])\\2(?!`)/g,\n (_match, character: string | undefined, _ticks: string | undefined, code: string | undefined) => {\n if (character !== undefined) return protect(escapeHtml(character), character);\n const text = code!.trim();\n return protect(`<code>${escapeHtml(text)}</code>`, text);\n },\n )\n .replace(\n /(!?)\\[([^\\]\\n]*)\\]\\(\\s*(<[^>\\n]+>|(?:[^\\s()]|\\([^()]*\\))+)(?:\\s+[\"']([^\"']*)[\"'])?\\s*\\)/g,\n (\n _match,\n image: string,\n label: string,\n destination: string,\n title: string | undefined,\n ) => {\n const url = restore(destination.replace(/^<|>$/g, \"\"), \"text\");\n if (image) {\n const alt = escapeHtml(restore(label, \"text\"));\n const description = title && escapeHtml(restore(title, \"text\"));\n return protect(\n isSafeRichTextImageSrc(url)\n ? `<img src=\"${escapeHtml(url)}\" alt=\"${alt}\"${description ? ` title=\"${description}\"` : \"\"}>`\n : alt,\n );\n }\n const labelHtml = restore(escapeHtml(label), \"html\");\n return protect(\n isSafeRichTextHref(url)\n ? `<a href=\"${escapeHtml(url)}\" target=\"_blank\">${labelHtml}</a>`\n : labelHtml,\n );\n },\n )\n .replace(\n /<(https?:\\/\\/[^<>\\s]+|mailto:[^<>\\s]+)>/gi,\n (_match, url: string) =>\n protect(\n isSafeRichTextHref(url)\n ? `<a href=\"${escapeHtml(url)}\" target=\"_blank\">${escapeHtml(url)}</a>`\n : escapeHtml(url),\n ),\n )\n .replace(/https?:\\/\\/[^\\s<>\\u0000]+/gi, (candidate: string) => {\n const url = candidate.replace(/[.,!?;:)]+$/, \"\");\n return isSafeRichTextHref(url)\n ? protect(\n `<a href=\"${escapeHtml(url)}\" target=\"_blank\">${escapeHtml(url)}</a>`,\n ) + candidate.slice(url.length)\n : candidate;\n });\n source = escapeHtml(source)\n .replace(/\\*\\*([^*\\n]+)\\*\\*/g, \"<strong>$1</strong>\")\n .replace(/__([^_\\n]+)__/g, \"<strong>$1</strong>\")\n .replace(/~~([^~\\n]+)~~/g, \"<s>$1</s>\")\n .replace(/(^|[^\\w])\\*([^*\\n]+)\\*(?!\\*)/g, \"$1<em>$2</em>\")\n .replace(/(^|[^\\w])_([^_\\n]+)_(?!_)/g, \"$1<em>$2</em>\");\n // A single pass prevents protected content from being parsed a second time.\n return restore(source, \"html\");\n}\n\nfunction splitTableRow(line: string): string[] {\n const trimmed = line.trim().replace(/^\\|/, \"\");\n const cells: string[] = [];\n let current = \"\";\n\n for (let index = 0; index < trimmed.length; index += 1) {\n const character = trimmed[index]!;\n const next = trimmed[index + 1];\n if (character === \"\\\\\" && (next === \"\\\\\" || next === \"|\")) {\n // Consume table separator escapes while leaving backslashes for inline parsing.\n current += next === \"|\" ? next : \"\\\\\\\\\";\n index += 1;\n } else if (character === \"|\") {\n cells.push(current.trim());\n if (index === trimmed.length - 1) return cells;\n current = \"\";\n } else {\n current += character;\n }\n }\n cells.push(current.trim());\n return cells;\n}\n\nfunction isTableSeparator(line: string): boolean {\n const cells = splitTableRow(line);\n return (\n cells.length > 0 &&\n cells.every((cell) => /^:?-{3,}:?$/.test(cell.replace(/\\s+/g, \"\")))\n );\n}\n\nfunction renderTable(\n lines: readonly string[],\n startIndex: number,\n): {\n html: string;\n nextIndex: number;\n} | null {\n const header = lines[startIndex];\n const separator = lines[startIndex + 1];\n if (\n header === undefined ||\n separator === undefined ||\n !header.includes(\"|\") ||\n !isTableSeparator(separator)\n ) {\n return null;\n }\n\n const headerCells = splitTableRow(header);\n const bodyRows: string[][] = [];\n let width = headerCells.length;\n let nextIndex = startIndex + 2;\n while (\n nextIndex < lines.length &&\n lines[nextIndex]?.trim() &&\n lines[nextIndex]?.includes(\"|\")\n ) {\n const row = splitTableRow(lines[nextIndex]!);\n bodyRows.push(row);\n width = Math.max(width, row.length);\n nextIndex += 1;\n }\n\n const normalizeRow = (row: readonly string[]) =>\n Array.from({ length: width }, (_unused, index) => row[index] ?? \"\");\n const head = normalizeRow(headerCells)\n .map((cell) => `<th scope=\"col\">${renderInlineMarkdown(cell)}</th>`)\n .join(\"\");\n const body = bodyRows\n .map(\n (row) =>\n `<tr>${normalizeRow(row)\n .map((cell) => `<td>${renderInlineMarkdown(cell)}</td>`)\n .join(\"\")}</tr>`,\n )\n .join(\"\");\n\n return {\n html:\n `<table><thead><tr>${head}</tr></thead>` +\n `${body ? `<tbody>${body}</tbody>` : \"\"}</table>`,\n nextIndex,\n };\n}\n\nconst listPattern = /^( *)(?:(\\d+)[.)]|[-+*]) +(.*)$/;\n\nfunction serializeBlocks(blocks: readonly RichTextMarkdownBlock[]): string {\n return blocks\n .map((block) =>\n block.type === \"html\"\n ? block.html\n : `<pre><code>${escapeHtml(block.value)}</code></pre>`,\n )\n .join(\"\");\n}\n\nfunction parseBlocks(\n lines: readonly string[],\n depth = 0,\n): RichTextMarkdownBlock[] {\n if (depth > 48)\n throw new Error(\"Markdown nesting exceeds the supported 48 levels.\");\n const blocks: RichTextMarkdownBlock[] = [];\n const paragraph: string[] = [];\n const pushHtml = (html: string) =>\n blocks.push({ type: \"html\", html: sanitizeRichTextMarkup(html) });\n const flush = () => {\n if (!paragraph.length) return;\n pushHtml(\n `<p>${paragraph\n .map((line) => renderInlineMarkdown(line.trim()))\n .join(\" \")\n .split(HARD_BREAK_TOKEN)\n .join(\"<br>\")}</p>`,\n );\n paragraph.length = 0;\n };\n for (let index = 0; index < lines.length; index += 1) {\n const line = lines[index] ?? \"\";\n const trimmed = line.trim();\n if (!trimmed) {\n flush();\n continue;\n }\n const fence = /^ {0,3}(`{3,}|~{3,})([^\\n]*)$/.exec(line);\n if (fence && !(fence[1]!.startsWith(\"`\") && fence[2]!.includes(\"`\"))) {\n flush();\n const marker = fence[1]!;\n const language = fence[2]!.trim().split(/\\s+/)[0];\n const code: string[] = [];\n const closing = new RegExp(`^ {0,3}${marker[0]}{${marker.length},} *$`);\n index += 1;\n for (; index < lines.length && !closing.test(lines[index]!); index += 1)\n code.push(lines[index]!);\n // An unclosed fence owns the remaining content, including during a stream.\n blocks.push({\n type: \"code\",\n value: code.join(\"\\n\"),\n language: language || undefined,\n });\n continue;\n }\n const table = renderTable(lines, index);\n if (table) {\n flush();\n pushHtml(table.html);\n index = table.nextIndex - 1;\n continue;\n }\n const heading = /^(#{1,6})\\s+(.+?)\\s*#*$/.exec(trimmed);\n if (heading) {\n flush();\n const level = heading[1]!.length;\n pushHtml(`<h${level}>${renderInlineMarkdown(heading[2]!)}</h${level}>`);\n continue;\n }\n if (/^(?:-{3,}|\\*{3,}|_{3,})$/.test(trimmed.replace(/\\s+/g, \"\"))) {\n flush();\n pushHtml(\"<hr>\");\n continue;\n }\n if (/^>/.test(trimmed)) {\n flush();\n const quote: string[] = [];\n while (index < lines.length && /^\\s*>/.test(lines[index]!)) {\n quote.push(lines[index]!.replace(/^\\s*> ?/, \"\"));\n index += 1;\n }\n index -= 1;\n pushHtml(\n `<blockquote>${serializeBlocks(parseBlocks(quote, depth + 1))}</blockquote>`,\n );\n continue;\n }\n const firstItem = listPattern.exec(line);\n if (firstItem) {\n flush();\n const indent = firstItem[1]!.length;\n const ordered = firstItem[2] !== undefined;\n const items: string[] = [];\n let hasTasks = false;\n while (index < lines.length) {\n const item = listPattern.exec(lines[index]!);\n if (\n !item ||\n item[1]!.length !== indent ||\n (item[2] !== undefined) !== ordered\n )\n break;\n const contentIndent = lines[index]!.length - item[3]!.length;\n const task = /^\\[([ xX])\\] +(.*)$/.exec(item[3]!);\n const content = task ? task[2]! : item[3]!;\n if (task) hasTasks = true;\n const continuation: string[] = [];\n index += 1;\n for (; index < lines.length; index += 1) {\n const next = lines[index]!;\n if (!next.trim()) {\n if (\n (/^ */.exec(lines[index + 1] ?? \"\")?.[0].length ?? 0) >=\n contentIndent\n ) {\n continuation.push(\"\");\n continue;\n }\n break;\n }\n const spaces = /^ */.exec(next)![0].length;\n if (spaces < contentIndent) break;\n continuation.push(next.slice(contentIndent));\n }\n const nested = continuation.length\n ? serializeBlocks(parseBlocks(continuation, depth + 1))\n : \"\";\n const checked = task?.[1]?.toLowerCase() === \"x\";\n const label = task\n ? `<label><input type=\"checkbox\"${checked ? ' checked=\"\"' : \"\"}>${renderInlineMarkdown(content)}</label>`\n : renderInlineMarkdown(content);\n items.push(\n `<li${task ? ` data-checked=\"${checked}\"` : \"\"}>${label}${nested}</li>`,\n );\n }\n index -= 1;\n const tag = ordered ? \"ol\" : \"ul\";\n pushHtml(\n `<${tag}${hasTasks && !ordered ? ' data-task-list=\"true\"' : \"\"}>${items.join(\"\")}</${tag}>`,\n );\n continue;\n }\n paragraph.push(\n / {2,}$/.test(line) ? `${line.trimEnd()}${HARD_BREAK_TOKEN}` : line,\n );\n }\n flush();\n return blocks;\n}\n\n/**\n * Parses governed Markdown into sanitized blocks, preserving top-level fenced\n * code as data for viewer code-block components. No DOM or React is required.\n * Supports headings, paragraphs, quotes, nested lists, tasks, fenced code,\n * tables, links, images, autolinks, emphasis, strike and inline code. Raw HTML\n * is displayed as text. Work and nesting limits also apply to streaming input.\n */\nexport function markdownToRichTextBlocks(\n markdown: string,\n options: MarkdownToRichTextOptions = {},\n): RichTextMarkdownBlock[] {\n return parseBlocks(normalizeMarkdown(markdown, options).split(\"\\n\"));\n}\n\nexport function markdownToRichTextHtml(\n markdown: string,\n options: MarkdownToRichTextOptions = {},\n): string {\n return serializeBlocks(markdownToRichTextBlocks(markdown, options));\n}\n\nexport function createRichTextDocumentFromMarkdown(\n markdown: string,\n options: MarkdownToRichTextOptions = {},\n): RichTextDocumentSnapshot {\n const html = markdownToRichTextHtml(markdown, options);\n return {\n html,\n plainText: richTextHtmlToPlainText(html),\n schemaVersion: QUICK_BUILDER_RICH_TEXT_SCHEMA_VERSION,\n };\n}\n"]}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { RichTextAiAssistantSuggestion, RichTextAiAssistantApplyMode, RichTextTableCommand, RichTextAiAssistantAction, RichTextAiAssistantRequest, RichTextCollaborationPresence, RichTextCollaborationSnapshot, RichTextCommand, RichTextSlashCommand, RichTextMentionQuery, RichTextSlashCommandQuery, RichTextTableKeyboardNavigationEvent, RichTextTableKeyboardNavigationResult, RichTextImage, RichTextMentionItem, RichTextTableNavigationDirection, RichTextEditorState, RichTextSearchOptions, RichTextReplaceResult, RichTextSlashCommandDefinition, RichTextSearchResult } from '../contracts.mjs';
|
|
2
|
+
import { RichTextVideo } from '../serializer.mjs';
|
|
3
|
+
import { R as RichTextExportImage } from '../svg-export-BtI8x_mG.mjs';
|
|
4
|
+
import { R as RichTextAlignment, a as RichTextBlockFormat, c as RichTextBlockTag, i as RichTextLineHeight, k as RichTextTypographyState } from '../content-types-CYHsrMrs.mjs';
|
|
5
|
+
|
|
6
|
+
/** Resolve document media once for all pages, without leaking credentials to other origins. */
|
|
7
|
+
declare function resolveRichTextExportImages(documents: readonly string[], signal?: AbortSignal): Promise<ReadonlyMap<string, RichTextExportImage>>;
|
|
8
|
+
|
|
9
|
+
declare const richTextSlashCommandDefinitions: readonly [{
|
|
10
|
+
readonly command: "heading1";
|
|
11
|
+
readonly group: "format";
|
|
12
|
+
readonly keywords: readonly ["h1", "heading", "heading 1", "title"];
|
|
13
|
+
readonly label: "Heading 1";
|
|
14
|
+
}, {
|
|
15
|
+
readonly command: "heading2";
|
|
16
|
+
readonly group: "format";
|
|
17
|
+
readonly keywords: readonly ["h2", "heading", "heading 2", "section"];
|
|
18
|
+
readonly label: "Heading 2";
|
|
19
|
+
}, {
|
|
20
|
+
readonly command: "heading3";
|
|
21
|
+
readonly group: "format";
|
|
22
|
+
readonly keywords: readonly ["h3", "heading", "heading 3", "subheading"];
|
|
23
|
+
readonly label: "Heading 3";
|
|
24
|
+
}, {
|
|
25
|
+
readonly command: "paragraph";
|
|
26
|
+
readonly group: "format";
|
|
27
|
+
readonly keywords: readonly ["p", "paragraph", "text"];
|
|
28
|
+
readonly label: "Paragraph";
|
|
29
|
+
}, {
|
|
30
|
+
readonly command: "blockquote";
|
|
31
|
+
readonly group: "format";
|
|
32
|
+
readonly keywords: readonly ["quote", "blockquote", "callout"];
|
|
33
|
+
readonly label: "Quote";
|
|
34
|
+
}, {
|
|
35
|
+
readonly command: "bulletedList";
|
|
36
|
+
readonly group: "format";
|
|
37
|
+
readonly keywords: readonly ["bullet", "bulleted", "list", "unordered"];
|
|
38
|
+
readonly label: "Bulleted list";
|
|
39
|
+
}, {
|
|
40
|
+
readonly command: "numberedList";
|
|
41
|
+
readonly group: "format";
|
|
42
|
+
readonly keywords: readonly ["number", "numbered", "ordered", "list"];
|
|
43
|
+
readonly label: "Numbered list";
|
|
44
|
+
}, {
|
|
45
|
+
readonly command: "taskList";
|
|
46
|
+
readonly group: "format";
|
|
47
|
+
readonly keywords: readonly ["check", "checklist", "task", "todo"];
|
|
48
|
+
readonly label: "Task list";
|
|
49
|
+
}, {
|
|
50
|
+
readonly command: "codeBlock";
|
|
51
|
+
readonly group: "format";
|
|
52
|
+
readonly keywords: readonly ["code", "pre", "snippet"];
|
|
53
|
+
readonly label: "Code block";
|
|
54
|
+
}, {
|
|
55
|
+
readonly command: "horizontalRule";
|
|
56
|
+
readonly group: "insert";
|
|
57
|
+
readonly keywords: readonly ["divider", "horizontal rule", "separator"];
|
|
58
|
+
readonly label: "Separator";
|
|
59
|
+
}, {
|
|
60
|
+
readonly command: "table";
|
|
61
|
+
readonly group: "insert";
|
|
62
|
+
readonly keywords: readonly ["table", "grid", "rows", "columns"];
|
|
63
|
+
readonly label: "Table";
|
|
64
|
+
}];
|
|
65
|
+
declare function containsRichTextSelection(editor: HTMLElement): boolean;
|
|
66
|
+
declare function getRichTextEditorRange(editor: HTMLElement): Range | null;
|
|
67
|
+
declare function cloneRichTextEditorRange(editor: HTMLElement): Range | null;
|
|
68
|
+
declare function restoreRichTextEditorRange(editor: HTMLElement, range: Range | null): boolean;
|
|
69
|
+
declare function restoreRichTextCaretAfter(node: Node): void;
|
|
70
|
+
declare function focusRichTextEditorEnd(editor: HTMLElement): void;
|
|
71
|
+
declare function insertRichTextParagraphAfter(editor: HTMLElement, block: HTMLElement): HTMLElement | null;
|
|
72
|
+
declare function duplicateRichTextBlock(editor: HTMLElement, block: HTMLElement): HTMLElement | null;
|
|
73
|
+
declare function moveRichTextBlock(editor: HTMLElement, block: HTMLElement, direction: 'up' | 'down'): boolean;
|
|
74
|
+
declare function reorderRichTextBlock(editor: HTMLElement, block: HTMLElement, target: HTMLElement, placement: 'before' | 'after'): boolean;
|
|
75
|
+
declare function deleteRichTextBlock(editor: HTMLElement, block: HTMLElement): boolean;
|
|
76
|
+
declare function getSelectedRichText(editor: HTMLElement): string;
|
|
77
|
+
declare function insertRichTextElementAtSelection(editor: HTMLElement, element: HTMLElement): void;
|
|
78
|
+
declare function applyRichTextInlineTag(editor: HTMLElement, tagName: string): void;
|
|
79
|
+
declare function applyRichTextInlineAttribute(editor: HTMLElement, attribute: 'data-font-family' | 'data-font-size' | 'data-text-color' | 'data-highlight-color', value: string | null): void;
|
|
80
|
+
declare function applyRichTextLineHeight(editor: HTMLElement, value: RichTextLineHeight): void;
|
|
81
|
+
declare function readRichTextTypographyState(editor: HTMLElement): RichTextTypographyState;
|
|
82
|
+
declare function applyRichTextList(editor: HTMLElement, listTagName: 'ul' | 'ol'): void;
|
|
83
|
+
declare function applyRichTextTaskList(editor: HTMLElement): void;
|
|
84
|
+
declare function applyRichTextBlockTag(editor: HTMLElement, tagName: RichTextBlockTag): void;
|
|
85
|
+
declare function applyRichTextBlockFormat(editor: HTMLElement, format: RichTextBlockFormat): void;
|
|
86
|
+
declare function clearRichTextFormatting(editor: HTMLElement): void;
|
|
87
|
+
declare function applyRichTextAlignment(editor: HTMLElement, alignment: RichTextAlignment): void;
|
|
88
|
+
declare function applyRichTextLink(editor: HTMLElement, text: string, url: string): void;
|
|
89
|
+
declare function insertRichTextHorizontalRule(editor: HTMLElement): void;
|
|
90
|
+
/** Project the canonical document into an editing surface with immediately available images. */
|
|
91
|
+
declare function createRichTextEditingHtml(html: string): string;
|
|
92
|
+
declare function insertRichTextImage(editor: HTMLElement, image: RichTextImage): boolean;
|
|
93
|
+
declare function insertRichTextVideo(editor: HTMLElement, input: RichTextVideo): boolean;
|
|
94
|
+
declare function selectRichTextSearchMatch(editor: HTMLElement, query: string, requestedIndex?: number, options?: RichTextSearchOptions): RichTextSearchResult;
|
|
95
|
+
declare function replaceRichTextSearchMatch(editor: HTMLElement, query: string, replacement: string, requestedIndex?: number, options?: RichTextSearchOptions): RichTextReplaceResult;
|
|
96
|
+
declare function replaceAllRichTextSearchMatches(editor: HTMLElement, query: string, replacement: string, options?: RichTextSearchOptions): RichTextReplaceResult;
|
|
97
|
+
declare function insertRichTextClipboardContent(editor: HTMLElement, content: {
|
|
98
|
+
html?: string;
|
|
99
|
+
plainText?: string;
|
|
100
|
+
}): boolean;
|
|
101
|
+
declare function createRichTextAiAssistantRequest({ action, html, providerId, selectedText, }: {
|
|
102
|
+
action: RichTextAiAssistantAction;
|
|
103
|
+
html: string;
|
|
104
|
+
providerId?: string;
|
|
105
|
+
selectedText?: string;
|
|
106
|
+
}): RichTextAiAssistantRequest;
|
|
107
|
+
declare function createRichTextAiAssistantSuggestion({ action, html, id, }: {
|
|
108
|
+
action: RichTextAiAssistantAction;
|
|
109
|
+
html: string;
|
|
110
|
+
id: string;
|
|
111
|
+
}): RichTextAiAssistantSuggestion;
|
|
112
|
+
declare function applyRichTextAiAssistantSuggestion(editor: HTMLElement, suggestion: RichTextAiAssistantSuggestion, mode: RichTextAiAssistantApplyMode): boolean;
|
|
113
|
+
declare function createRichTextCollaborationPresence(presence: RichTextCollaborationPresence): RichTextCollaborationPresence;
|
|
114
|
+
declare function createRichTextCollaborationSnapshot({ documentId, localUserId, presences, }: {
|
|
115
|
+
documentId: string;
|
|
116
|
+
localUserId: string;
|
|
117
|
+
presences: readonly RichTextCollaborationPresence[];
|
|
118
|
+
}): RichTextCollaborationSnapshot;
|
|
119
|
+
declare function resolveRichTextCollaborationPresences(snapshot: RichTextCollaborationSnapshot): RichTextCollaborationPresence[];
|
|
120
|
+
declare function readRichTextLocalCollaborationPresence({ color, documentId, editor, userId, userName, }: {
|
|
121
|
+
color: string;
|
|
122
|
+
documentId: string;
|
|
123
|
+
editor: HTMLElement;
|
|
124
|
+
userId: string;
|
|
125
|
+
userName: string;
|
|
126
|
+
}): RichTextCollaborationPresence;
|
|
127
|
+
declare function getRichTextMentionQuery(editor: HTMLElement): RichTextMentionQuery;
|
|
128
|
+
declare function resolveRichTextMentions(query: string, mentions: readonly RichTextMentionItem[]): RichTextMentionItem[];
|
|
129
|
+
declare function insertRichTextMention(editor: HTMLElement, mention: RichTextMentionItem, queryRange?: Range | null): boolean;
|
|
130
|
+
declare function getRichTextSlashCommandQuery(editor: HTMLElement): RichTextSlashCommandQuery;
|
|
131
|
+
declare function resolveRichTextSlashCommands(query: string): RichTextSlashCommandDefinition[];
|
|
132
|
+
declare function executeRichTextSlashCommand(editor: HTMLElement, command: RichTextSlashCommand, queryRange?: Range | null): boolean;
|
|
133
|
+
declare function insertRichTextTable(editor: HTMLElement, rows?: number, columns?: number): void;
|
|
134
|
+
declare function deleteRichTextTable(editor: HTMLElement): boolean;
|
|
135
|
+
declare function addRichTextTableRow(editor: HTMLElement): boolean;
|
|
136
|
+
declare function deleteRichTextTableRow(editor: HTMLElement): boolean;
|
|
137
|
+
declare function addRichTextTableColumn(editor: HTMLElement): boolean;
|
|
138
|
+
declare function deleteRichTextTableColumn(editor: HTMLElement): boolean;
|
|
139
|
+
declare function executeRichTextTableCommand(editor: HTMLElement, command: RichTextTableCommand): boolean;
|
|
140
|
+
declare function canExecuteRichTextTableCommand(editor: HTMLElement, command: RichTextTableCommand): boolean;
|
|
141
|
+
declare function moveRichTextTableSelection(editor: HTMLElement, direction: RichTextTableNavigationDirection): RichTextTableKeyboardNavigationResult;
|
|
142
|
+
declare function handleRichTextTableKeyboardNavigation(editor: HTMLElement, event: RichTextTableKeyboardNavigationEvent): RichTextTableKeyboardNavigationResult;
|
|
143
|
+
declare function executeRichTextDomCommand(editor: HTMLElement, command: RichTextCommand): boolean;
|
|
144
|
+
declare function readRichTextEditorState(editor: HTMLElement): RichTextEditorState;
|
|
145
|
+
/** Replace a sanitized document while retaining a focused text selection across remote edits. */
|
|
146
|
+
declare function replaceRichTextEditorHtml(editor: HTMLElement, html: string): Range | null;
|
|
147
|
+
|
|
148
|
+
export { addRichTextTableColumn, addRichTextTableRow, applyRichTextAiAssistantSuggestion, applyRichTextAlignment, applyRichTextBlockFormat, applyRichTextBlockTag, applyRichTextInlineAttribute, applyRichTextInlineTag, applyRichTextLineHeight, applyRichTextLink, applyRichTextList, applyRichTextTaskList, canExecuteRichTextTableCommand, clearRichTextFormatting, cloneRichTextEditorRange, containsRichTextSelection, createRichTextAiAssistantRequest, createRichTextAiAssistantSuggestion, createRichTextCollaborationPresence, createRichTextCollaborationSnapshot, createRichTextEditingHtml, deleteRichTextBlock, deleteRichTextTable, deleteRichTextTableColumn, deleteRichTextTableRow, duplicateRichTextBlock, executeRichTextDomCommand, executeRichTextSlashCommand, executeRichTextTableCommand, focusRichTextEditorEnd, getRichTextEditorRange, getRichTextMentionQuery, getRichTextSlashCommandQuery, getSelectedRichText, handleRichTextTableKeyboardNavigation, insertRichTextClipboardContent, insertRichTextElementAtSelection, insertRichTextHorizontalRule, insertRichTextImage, insertRichTextMention, insertRichTextParagraphAfter, insertRichTextTable, insertRichTextVideo, moveRichTextBlock, moveRichTextTableSelection, readRichTextEditorState, readRichTextLocalCollaborationPresence, readRichTextTypographyState, reorderRichTextBlock, replaceAllRichTextSearchMatches, replaceRichTextEditorHtml, replaceRichTextSearchMatch, resolveRichTextCollaborationPresences, resolveRichTextExportImages, resolveRichTextMentions, resolveRichTextSlashCommands, restoreRichTextCaretAfter, restoreRichTextEditorRange, richTextSlashCommandDefinitions, selectRichTextSearchMatch };
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { RichTextAiAssistantSuggestion, RichTextAiAssistantApplyMode, RichTextTableCommand, RichTextAiAssistantAction, RichTextAiAssistantRequest, RichTextCollaborationPresence, RichTextCollaborationSnapshot, RichTextCommand, RichTextSlashCommand, RichTextMentionQuery, RichTextSlashCommandQuery, RichTextTableKeyboardNavigationEvent, RichTextTableKeyboardNavigationResult, RichTextImage, RichTextMentionItem, RichTextTableNavigationDirection, RichTextEditorState, RichTextSearchOptions, RichTextReplaceResult, RichTextSlashCommandDefinition, RichTextSearchResult } from '../contracts.js';
|
|
2
|
+
import { RichTextVideo } from '../serializer.js';
|
|
3
|
+
import { R as RichTextExportImage } from '../svg-export-BtI8x_mG.js';
|
|
4
|
+
import { R as RichTextAlignment, a as RichTextBlockFormat, c as RichTextBlockTag, i as RichTextLineHeight, k as RichTextTypographyState } from '../content-types-CYHsrMrs.js';
|
|
5
|
+
|
|
6
|
+
/** Resolve document media once for all pages, without leaking credentials to other origins. */
|
|
7
|
+
declare function resolveRichTextExportImages(documents: readonly string[], signal?: AbortSignal): Promise<ReadonlyMap<string, RichTextExportImage>>;
|
|
8
|
+
|
|
9
|
+
declare const richTextSlashCommandDefinitions: readonly [{
|
|
10
|
+
readonly command: "heading1";
|
|
11
|
+
readonly group: "format";
|
|
12
|
+
readonly keywords: readonly ["h1", "heading", "heading 1", "title"];
|
|
13
|
+
readonly label: "Heading 1";
|
|
14
|
+
}, {
|
|
15
|
+
readonly command: "heading2";
|
|
16
|
+
readonly group: "format";
|
|
17
|
+
readonly keywords: readonly ["h2", "heading", "heading 2", "section"];
|
|
18
|
+
readonly label: "Heading 2";
|
|
19
|
+
}, {
|
|
20
|
+
readonly command: "heading3";
|
|
21
|
+
readonly group: "format";
|
|
22
|
+
readonly keywords: readonly ["h3", "heading", "heading 3", "subheading"];
|
|
23
|
+
readonly label: "Heading 3";
|
|
24
|
+
}, {
|
|
25
|
+
readonly command: "paragraph";
|
|
26
|
+
readonly group: "format";
|
|
27
|
+
readonly keywords: readonly ["p", "paragraph", "text"];
|
|
28
|
+
readonly label: "Paragraph";
|
|
29
|
+
}, {
|
|
30
|
+
readonly command: "blockquote";
|
|
31
|
+
readonly group: "format";
|
|
32
|
+
readonly keywords: readonly ["quote", "blockquote", "callout"];
|
|
33
|
+
readonly label: "Quote";
|
|
34
|
+
}, {
|
|
35
|
+
readonly command: "bulletedList";
|
|
36
|
+
readonly group: "format";
|
|
37
|
+
readonly keywords: readonly ["bullet", "bulleted", "list", "unordered"];
|
|
38
|
+
readonly label: "Bulleted list";
|
|
39
|
+
}, {
|
|
40
|
+
readonly command: "numberedList";
|
|
41
|
+
readonly group: "format";
|
|
42
|
+
readonly keywords: readonly ["number", "numbered", "ordered", "list"];
|
|
43
|
+
readonly label: "Numbered list";
|
|
44
|
+
}, {
|
|
45
|
+
readonly command: "taskList";
|
|
46
|
+
readonly group: "format";
|
|
47
|
+
readonly keywords: readonly ["check", "checklist", "task", "todo"];
|
|
48
|
+
readonly label: "Task list";
|
|
49
|
+
}, {
|
|
50
|
+
readonly command: "codeBlock";
|
|
51
|
+
readonly group: "format";
|
|
52
|
+
readonly keywords: readonly ["code", "pre", "snippet"];
|
|
53
|
+
readonly label: "Code block";
|
|
54
|
+
}, {
|
|
55
|
+
readonly command: "horizontalRule";
|
|
56
|
+
readonly group: "insert";
|
|
57
|
+
readonly keywords: readonly ["divider", "horizontal rule", "separator"];
|
|
58
|
+
readonly label: "Separator";
|
|
59
|
+
}, {
|
|
60
|
+
readonly command: "table";
|
|
61
|
+
readonly group: "insert";
|
|
62
|
+
readonly keywords: readonly ["table", "grid", "rows", "columns"];
|
|
63
|
+
readonly label: "Table";
|
|
64
|
+
}];
|
|
65
|
+
declare function containsRichTextSelection(editor: HTMLElement): boolean;
|
|
66
|
+
declare function getRichTextEditorRange(editor: HTMLElement): Range | null;
|
|
67
|
+
declare function cloneRichTextEditorRange(editor: HTMLElement): Range | null;
|
|
68
|
+
declare function restoreRichTextEditorRange(editor: HTMLElement, range: Range | null): boolean;
|
|
69
|
+
declare function restoreRichTextCaretAfter(node: Node): void;
|
|
70
|
+
declare function focusRichTextEditorEnd(editor: HTMLElement): void;
|
|
71
|
+
declare function insertRichTextParagraphAfter(editor: HTMLElement, block: HTMLElement): HTMLElement | null;
|
|
72
|
+
declare function duplicateRichTextBlock(editor: HTMLElement, block: HTMLElement): HTMLElement | null;
|
|
73
|
+
declare function moveRichTextBlock(editor: HTMLElement, block: HTMLElement, direction: 'up' | 'down'): boolean;
|
|
74
|
+
declare function reorderRichTextBlock(editor: HTMLElement, block: HTMLElement, target: HTMLElement, placement: 'before' | 'after'): boolean;
|
|
75
|
+
declare function deleteRichTextBlock(editor: HTMLElement, block: HTMLElement): boolean;
|
|
76
|
+
declare function getSelectedRichText(editor: HTMLElement): string;
|
|
77
|
+
declare function insertRichTextElementAtSelection(editor: HTMLElement, element: HTMLElement): void;
|
|
78
|
+
declare function applyRichTextInlineTag(editor: HTMLElement, tagName: string): void;
|
|
79
|
+
declare function applyRichTextInlineAttribute(editor: HTMLElement, attribute: 'data-font-family' | 'data-font-size' | 'data-text-color' | 'data-highlight-color', value: string | null): void;
|
|
80
|
+
declare function applyRichTextLineHeight(editor: HTMLElement, value: RichTextLineHeight): void;
|
|
81
|
+
declare function readRichTextTypographyState(editor: HTMLElement): RichTextTypographyState;
|
|
82
|
+
declare function applyRichTextList(editor: HTMLElement, listTagName: 'ul' | 'ol'): void;
|
|
83
|
+
declare function applyRichTextTaskList(editor: HTMLElement): void;
|
|
84
|
+
declare function applyRichTextBlockTag(editor: HTMLElement, tagName: RichTextBlockTag): void;
|
|
85
|
+
declare function applyRichTextBlockFormat(editor: HTMLElement, format: RichTextBlockFormat): void;
|
|
86
|
+
declare function clearRichTextFormatting(editor: HTMLElement): void;
|
|
87
|
+
declare function applyRichTextAlignment(editor: HTMLElement, alignment: RichTextAlignment): void;
|
|
88
|
+
declare function applyRichTextLink(editor: HTMLElement, text: string, url: string): void;
|
|
89
|
+
declare function insertRichTextHorizontalRule(editor: HTMLElement): void;
|
|
90
|
+
/** Project the canonical document into an editing surface with immediately available images. */
|
|
91
|
+
declare function createRichTextEditingHtml(html: string): string;
|
|
92
|
+
declare function insertRichTextImage(editor: HTMLElement, image: RichTextImage): boolean;
|
|
93
|
+
declare function insertRichTextVideo(editor: HTMLElement, input: RichTextVideo): boolean;
|
|
94
|
+
declare function selectRichTextSearchMatch(editor: HTMLElement, query: string, requestedIndex?: number, options?: RichTextSearchOptions): RichTextSearchResult;
|
|
95
|
+
declare function replaceRichTextSearchMatch(editor: HTMLElement, query: string, replacement: string, requestedIndex?: number, options?: RichTextSearchOptions): RichTextReplaceResult;
|
|
96
|
+
declare function replaceAllRichTextSearchMatches(editor: HTMLElement, query: string, replacement: string, options?: RichTextSearchOptions): RichTextReplaceResult;
|
|
97
|
+
declare function insertRichTextClipboardContent(editor: HTMLElement, content: {
|
|
98
|
+
html?: string;
|
|
99
|
+
plainText?: string;
|
|
100
|
+
}): boolean;
|
|
101
|
+
declare function createRichTextAiAssistantRequest({ action, html, providerId, selectedText, }: {
|
|
102
|
+
action: RichTextAiAssistantAction;
|
|
103
|
+
html: string;
|
|
104
|
+
providerId?: string;
|
|
105
|
+
selectedText?: string;
|
|
106
|
+
}): RichTextAiAssistantRequest;
|
|
107
|
+
declare function createRichTextAiAssistantSuggestion({ action, html, id, }: {
|
|
108
|
+
action: RichTextAiAssistantAction;
|
|
109
|
+
html: string;
|
|
110
|
+
id: string;
|
|
111
|
+
}): RichTextAiAssistantSuggestion;
|
|
112
|
+
declare function applyRichTextAiAssistantSuggestion(editor: HTMLElement, suggestion: RichTextAiAssistantSuggestion, mode: RichTextAiAssistantApplyMode): boolean;
|
|
113
|
+
declare function createRichTextCollaborationPresence(presence: RichTextCollaborationPresence): RichTextCollaborationPresence;
|
|
114
|
+
declare function createRichTextCollaborationSnapshot({ documentId, localUserId, presences, }: {
|
|
115
|
+
documentId: string;
|
|
116
|
+
localUserId: string;
|
|
117
|
+
presences: readonly RichTextCollaborationPresence[];
|
|
118
|
+
}): RichTextCollaborationSnapshot;
|
|
119
|
+
declare function resolveRichTextCollaborationPresences(snapshot: RichTextCollaborationSnapshot): RichTextCollaborationPresence[];
|
|
120
|
+
declare function readRichTextLocalCollaborationPresence({ color, documentId, editor, userId, userName, }: {
|
|
121
|
+
color: string;
|
|
122
|
+
documentId: string;
|
|
123
|
+
editor: HTMLElement;
|
|
124
|
+
userId: string;
|
|
125
|
+
userName: string;
|
|
126
|
+
}): RichTextCollaborationPresence;
|
|
127
|
+
declare function getRichTextMentionQuery(editor: HTMLElement): RichTextMentionQuery;
|
|
128
|
+
declare function resolveRichTextMentions(query: string, mentions: readonly RichTextMentionItem[]): RichTextMentionItem[];
|
|
129
|
+
declare function insertRichTextMention(editor: HTMLElement, mention: RichTextMentionItem, queryRange?: Range | null): boolean;
|
|
130
|
+
declare function getRichTextSlashCommandQuery(editor: HTMLElement): RichTextSlashCommandQuery;
|
|
131
|
+
declare function resolveRichTextSlashCommands(query: string): RichTextSlashCommandDefinition[];
|
|
132
|
+
declare function executeRichTextSlashCommand(editor: HTMLElement, command: RichTextSlashCommand, queryRange?: Range | null): boolean;
|
|
133
|
+
declare function insertRichTextTable(editor: HTMLElement, rows?: number, columns?: number): void;
|
|
134
|
+
declare function deleteRichTextTable(editor: HTMLElement): boolean;
|
|
135
|
+
declare function addRichTextTableRow(editor: HTMLElement): boolean;
|
|
136
|
+
declare function deleteRichTextTableRow(editor: HTMLElement): boolean;
|
|
137
|
+
declare function addRichTextTableColumn(editor: HTMLElement): boolean;
|
|
138
|
+
declare function deleteRichTextTableColumn(editor: HTMLElement): boolean;
|
|
139
|
+
declare function executeRichTextTableCommand(editor: HTMLElement, command: RichTextTableCommand): boolean;
|
|
140
|
+
declare function canExecuteRichTextTableCommand(editor: HTMLElement, command: RichTextTableCommand): boolean;
|
|
141
|
+
declare function moveRichTextTableSelection(editor: HTMLElement, direction: RichTextTableNavigationDirection): RichTextTableKeyboardNavigationResult;
|
|
142
|
+
declare function handleRichTextTableKeyboardNavigation(editor: HTMLElement, event: RichTextTableKeyboardNavigationEvent): RichTextTableKeyboardNavigationResult;
|
|
143
|
+
declare function executeRichTextDomCommand(editor: HTMLElement, command: RichTextCommand): boolean;
|
|
144
|
+
declare function readRichTextEditorState(editor: HTMLElement): RichTextEditorState;
|
|
145
|
+
/** Replace a sanitized document while retaining a focused text selection across remote edits. */
|
|
146
|
+
declare function replaceRichTextEditorHtml(editor: HTMLElement, html: string): Range | null;
|
|
147
|
+
|
|
148
|
+
export { addRichTextTableColumn, addRichTextTableRow, applyRichTextAiAssistantSuggestion, applyRichTextAlignment, applyRichTextBlockFormat, applyRichTextBlockTag, applyRichTextInlineAttribute, applyRichTextInlineTag, applyRichTextLineHeight, applyRichTextLink, applyRichTextList, applyRichTextTaskList, canExecuteRichTextTableCommand, clearRichTextFormatting, cloneRichTextEditorRange, containsRichTextSelection, createRichTextAiAssistantRequest, createRichTextAiAssistantSuggestion, createRichTextCollaborationPresence, createRichTextCollaborationSnapshot, createRichTextEditingHtml, deleteRichTextBlock, deleteRichTextTable, deleteRichTextTableColumn, deleteRichTextTableRow, duplicateRichTextBlock, executeRichTextDomCommand, executeRichTextSlashCommand, executeRichTextTableCommand, focusRichTextEditorEnd, getRichTextEditorRange, getRichTextMentionQuery, getRichTextSlashCommandQuery, getSelectedRichText, handleRichTextTableKeyboardNavigation, insertRichTextClipboardContent, insertRichTextElementAtSelection, insertRichTextHorizontalRule, insertRichTextImage, insertRichTextMention, insertRichTextParagraphAfter, insertRichTextTable, insertRichTextVideo, moveRichTextBlock, moveRichTextTableSelection, readRichTextEditorState, readRichTextLocalCollaborationPresence, readRichTextTypographyState, reorderRichTextBlock, replaceAllRichTextSearchMatches, replaceRichTextEditorHtml, replaceRichTextSearchMatch, resolveRichTextCollaborationPresences, resolveRichTextExportImages, resolveRichTextMentions, resolveRichTextSlashCommands, restoreRichTextCaretAfter, restoreRichTextEditorRange, richTextSlashCommandDefinitions, selectRichTextSearchMatch };
|