@pixerate/editor 0.25.0 → 0.26.1

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.
Files changed (113) hide show
  1. package/README.md +30 -0
  2. package/THIRD_PARTY_NOTICES.md +11 -0
  3. package/dist/agent/index.cjs +174 -11
  4. package/dist/agent/index.cjs.map +1 -1
  5. package/dist/agent/index.d.cts +18 -4
  6. package/dist/agent/index.d.ts +18 -4
  7. package/dist/agent/index.js +167 -4
  8. package/dist/agent/index.js.map +1 -1
  9. package/dist/{arrangeShortcuts-B8O3f8-P.d.cts → arrange-BICutYPk.d.cts} +243 -29
  10. package/dist/{arrangeShortcuts-sLlD2rSX.d.ts → arrange-BICutYPk.d.ts} +243 -29
  11. package/dist/builtins-CdPcLwwF.d.cts +176 -0
  12. package/dist/builtins-Chj6zv_O.d.ts +176 -0
  13. package/dist/canvas/index.cjs +3917 -19
  14. package/dist/canvas/index.cjs.map +1 -1
  15. package/dist/canvas/index.d.cts +1232 -7
  16. package/dist/canvas/index.d.ts +1232 -7
  17. package/dist/canvas/index.js +3916 -18
  18. package/dist/canvas/index.js.map +1 -1
  19. package/dist/chunk-3CC7OPUQ.cjs +831 -0
  20. package/dist/chunk-3CC7OPUQ.cjs.map +1 -0
  21. package/dist/{chunk-7WISYZFO.cjs → chunk-66IMF6OD.cjs} +174 -67
  22. package/dist/chunk-66IMF6OD.cjs.map +1 -0
  23. package/dist/{chunk-AL6JMGWW.cjs → chunk-CS6NZWWA.cjs} +24 -24
  24. package/dist/{chunk-AL6JMGWW.cjs.map → chunk-CS6NZWWA.cjs.map} +1 -1
  25. package/dist/{chunk-C7P22VIP.cjs → chunk-EWCOFSCQ.cjs} +17 -6
  26. package/dist/chunk-EWCOFSCQ.cjs.map +1 -0
  27. package/dist/chunk-HDYMLS3X.cjs +409 -0
  28. package/dist/chunk-HDYMLS3X.cjs.map +1 -0
  29. package/dist/{chunk-V3CHHWOE.cjs → chunk-HNDSPZ5T.cjs} +4 -4
  30. package/dist/{chunk-V3CHHWOE.cjs.map → chunk-HNDSPZ5T.cjs.map} +1 -1
  31. package/dist/{chunk-X4N4WUKB.cjs → chunk-IFHKKVXH.cjs} +150 -38
  32. package/dist/chunk-IFHKKVXH.cjs.map +1 -0
  33. package/dist/chunk-KRGXUQ2Y.js +1696 -0
  34. package/dist/chunk-KRGXUQ2Y.js.map +1 -0
  35. package/dist/{chunk-PO6A6QQH.cjs → chunk-LN2POBHT.cjs} +742 -970
  36. package/dist/chunk-LN2POBHT.cjs.map +1 -0
  37. package/dist/chunk-MR2764X2.js +831 -0
  38. package/dist/chunk-MR2764X2.js.map +1 -0
  39. package/dist/{chunk-WSQKHXW7.cjs → chunk-NQF32I6Z.cjs} +1209 -457
  40. package/dist/chunk-NQF32I6Z.cjs.map +1 -0
  41. package/dist/{chunk-NAXVVS5I.js → chunk-QJSOZFCZ.js} +2 -2
  42. package/dist/{chunk-UAKDG62Z.js → chunk-SWE3NPOU.js} +116 -4
  43. package/dist/chunk-SWE3NPOU.js.map +1 -0
  44. package/dist/chunk-TXXNBDQX.cjs +1696 -0
  45. package/dist/chunk-TXXNBDQX.cjs.map +1 -0
  46. package/dist/chunk-UBCFIABU.js +409 -0
  47. package/dist/chunk-UBCFIABU.js.map +1 -0
  48. package/dist/{chunk-ECCCYKGL.js → chunk-UKI64KUD.js} +147 -40
  49. package/dist/chunk-UKI64KUD.js.map +1 -0
  50. package/dist/{chunk-QGYDWPRM.js → chunk-WON34HKM.js} +2 -2
  51. package/dist/{chunk-RR7F5GUM.js → chunk-X7HXL2SB.js} +941 -189
  52. package/dist/chunk-X7HXL2SB.js.map +1 -0
  53. package/dist/{chunk-IXHSYOVY.js → chunk-XQFHLT53.js} +638 -866
  54. package/dist/chunk-XQFHLT53.js.map +1 -0
  55. package/dist/{chunk-FH6F67DN.js → chunk-ZRNHGAQT.js} +17 -6
  56. package/dist/{chunk-FH6F67DN.js.map → chunk-ZRNHGAQT.js.map} +1 -1
  57. package/dist/commands/index.cjs +352 -4
  58. package/dist/commands/index.cjs.map +1 -1
  59. package/dist/commands/index.d.cts +37 -108
  60. package/dist/commands/index.d.ts +37 -108
  61. package/dist/commands/index.js +351 -3
  62. package/dist/commands/index.js.map +1 -1
  63. package/dist/compare/index.cjs +3 -3
  64. package/dist/compare/index.js +2 -2
  65. package/dist/{controller-BIJiNoVs.d.cts → controller-CxXGOEmy.d.cts} +209 -13
  66. package/dist/{controller-BIJiNoVs.d.ts → controller-CxXGOEmy.d.ts} +209 -13
  67. package/dist/export/index.cjs +36 -0
  68. package/dist/export/index.cjs.map +1 -0
  69. package/dist/export/index.d.cts +243 -0
  70. package/dist/export/index.d.ts +243 -0
  71. package/dist/export/index.js +36 -0
  72. package/dist/export/index.js.map +1 -0
  73. package/dist/extensions/index.cjs +54 -6
  74. package/dist/extensions/index.cjs.map +1 -1
  75. package/dist/extensions/index.d.cts +7 -2
  76. package/dist/extensions/index.d.ts +7 -2
  77. package/dist/extensions/index.js +59 -11
  78. package/dist/{index-7a6bHTLy.d.ts → index-B273Zllk.d.ts} +211 -207
  79. package/dist/{index-Csd5qI8u.d.cts → index-jcJwmBYt.d.cts} +211 -207
  80. package/dist/index.cjs +146 -32
  81. package/dist/index.cjs.map +1 -1
  82. package/dist/index.d.cts +50 -14
  83. package/dist/index.d.ts +50 -14
  84. package/dist/index.js +138 -24
  85. package/dist/index.js.map +1 -1
  86. package/dist/registry-CED5C0lA.d.cts +204 -0
  87. package/dist/registry-CED5C0lA.d.ts +204 -0
  88. package/dist/{registry-D32LpIc4.d.cts → registry-D0GADKc7.d.cts} +1 -1
  89. package/dist/{registry-evKTP4ls.d.ts → registry-DhVUZioj.d.ts} +1 -1
  90. package/dist/serializers/index.cjs +6 -4
  91. package/dist/serializers/index.cjs.map +1 -1
  92. package/dist/serializers/index.d.cts +15 -4
  93. package/dist/serializers/index.d.ts +15 -4
  94. package/dist/serializers/index.js +5 -3
  95. package/dist/spreadsheet/index.cjs +33 -3
  96. package/dist/spreadsheet/index.cjs.map +1 -1
  97. package/dist/spreadsheet/index.d.cts +106 -3
  98. package/dist/spreadsheet/index.d.ts +106 -3
  99. package/dist/spreadsheet/index.js +32 -2
  100. package/package.json +10 -1
  101. package/dist/chunk-7WISYZFO.cjs.map +0 -1
  102. package/dist/chunk-C7P22VIP.cjs.map +0 -1
  103. package/dist/chunk-ECCCYKGL.js.map +0 -1
  104. package/dist/chunk-IXHSYOVY.js.map +0 -1
  105. package/dist/chunk-PO6A6QQH.cjs.map +0 -1
  106. package/dist/chunk-RR7F5GUM.js.map +0 -1
  107. package/dist/chunk-UAKDG62Z.js.map +0 -1
  108. package/dist/chunk-WSQKHXW7.cjs.map +0 -1
  109. package/dist/chunk-X4N4WUKB.cjs.map +0 -1
  110. package/dist/types-DX4Mh4SL.d.cts +0 -217
  111. package/dist/types-DX4Mh4SL.d.ts +0 -217
  112. /package/dist/{chunk-NAXVVS5I.js.map → chunk-QJSOZFCZ.js.map} +0 -0
  113. /package/dist/{chunk-QGYDWPRM.js.map → chunk-WON34HKM.js.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/editor/editor/packages/core/dist/chunk-3CC7OPUQ.cjs","../src/extensions/paragraph-styles/registry.ts","../src/import/zip.ts"],"names":[],"mappings":"AAAA;ACmHA,IAAM,UAAA,EAAY,EAAA;AAClB,IAAM,SAAA,EAAW,+BAAA;AAEjB,IAAM,WAAA,EAAa,8DAAA;AAEZ,IAAM,gBAAA,EAAkB,QAAA;AAE/B,IAAM,mBAAA,kBAAqB,IAAI,GAAA,CAAI;AAAA,EACjC,aAAA;AAAA,EACA,aAAA;AAAA,EACA,YAAA;AAAA,EACA,OAAA;AAAA,EACA,sBAAA;AAAA,EACA,gBAAA;AAAA,EACA,gBAAA;AAAA,EACA;AACF,CAAC,CAAA;AAGM,SAAS,cAAA,CAAe,EAAA,EAA2B;AACxD,EAAA,OAAO,OAAO,GAAA,IAAO,SAAA,GAAY,QAAA,CAAS,IAA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A;AACG,IAAA;AACE,MAAA;AACrB,IAAA;AACe,IAAA;AACG,IAAA;AACG,MAAA;AACrB,IAAA;AACqB,IAAA;AACJ,IAAA;AACD,IAAA;AACC,IAAA;AACE,IAAA;AACrB,EAAA;AACwB,EAAA;AACH,IAAA;AACrB,EAAA;AACwB,EAAA;AACH,IAAA;AACrB,EAAA;AACwB,EAAA;AACH,IAAA;AACrB,EAAA;AAE6B,EAAA;AACrB,EAAA;AACY,EAAA;AACC,IAAA;AACE,MAAA;AACrB,IAAA;AACsB,IAAA;AACP,IAAA;AACO,IAAA;AACD,IAAA;AACF,IAAA;AACA,IAAA;AACC,IAAA;AACE,IAAA;AAClB,IAAA;AACkB,IAAA;AACH,IAAA;AACN,IAAA;AACI,IAAA;AAGJ,IAAA;AACQ,MAAA;AACC,MAAA;AACD,MAAA;AACL,QAAA;AACI,QAAA;AACH,QAAA;AACI,UAAA;AACV,UAAA;AACP,QAAA;AACI,QAAA;AACF,UAAA;AACK,UAAA;AACP,QAAA;AACI,QAAA;AACN,MAAA;AACS,MAAA;AACX,IAAA;AAEgB,IAAA;AACK,IAAA;AACjB,IAAA;AACgB,IAAA;AACN,MAAA;AACO,MAAA;AACN,QAAA;AACZ,MAAA;AACH,IAAA;AACa,IAAA;AACX,MAAA;AACkB,MAAA;AACE,MAAA;AACpB,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACD,IAAA;AACH,EAAA;AACsB,EAAA;AACxB;AFoY0B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/editor/editor/packages/core/dist/chunk-3CC7OPUQ.cjs","sourcesContent":[null,"// Portions ported from wordcraft/crates/doc/src/styles.rs and wordcraft/crates/doc/src/resolve.rs (MIT OR Apache-2.0, © ArtCraft Team and contributors). See THIRD_PARTY_NOTICES.md.\n\n/** Paragraph styles format whole blocks; character styles format runs of text. */\nexport type StyleKind = \"paragraph\" | \"character\";\n\n/** Character formatting of a style (CSS values). */\nexport interface CharacterFormat {\n fontFamily?: string;\n /** CSS length, e.g. `\"1.5em\"` or `\"18px\"`. */\n fontSize?: string;\n bold?: boolean;\n italic?: boolean;\n underline?: boolean;\n strike?: boolean;\n color?: string;\n backgroundColor?: string;\n letterSpacing?: string;\n textTransform?: \"none\" | \"uppercase\" | \"lowercase\" | \"capitalize\";\n smallCaps?: boolean;\n}\n\n/** Paragraph formatting of a style (CSS values). */\nexport interface ParagraphFormat {\n textAlign?: \"left\" | \"center\" | \"right\" | \"justify\";\n lineHeight?: string;\n spaceBefore?: string;\n spaceAfter?: string;\n indentLeft?: string;\n indentRight?: string;\n indentFirstLine?: string;\n /** CSS border shorthand, e.g. `\"3px solid currentColor\"`. */\n borderLeft?: string;\n paddingLeft?: string;\n backgroundColor?: string;\n}\n\n/** The block node a paragraph style uses (`heading` with `level` for Heading N). */\nexport interface StyleBlock {\n type: string;\n attrs?: Record<string, any>;\n}\n\nexport interface StyleDefinition {\n /** Stable id (`Heading1`): letters, digits, `_` and `-`, starting with a letter. */\n id: string;\n /** Display name (`Heading 1`). */\n name: string;\n kind: StyleKind;\n /** Style this one inherits from; what it sets wins over its base. */\n basedOn?: string | null;\n /** Style of the paragraph after this one when Enter is pressed at its end (paragraph styles). */\n next?: string | null;\n /** Linked style: a paragraph style's character style, or a character style's paragraph style. */\n linked?: string | null;\n paragraph?: ParagraphFormat;\n character?: CharacterFormat;\n /** Block node of a paragraph style. Inherited along `basedOn`; `paragraph` by default. */\n block?: StyleBlock | null;\n /** Gallery order (lower first). */\n priority?: number;\n /** Shown in the styles gallery. */\n quick?: boolean;\n hidden?: boolean;\n /** Built in (cannot be removed). */\n builtin?: boolean;\n}\n\n/** A style with its `basedOn` chain and the defaults merged. */\nexport interface ResolvedStyle {\n id: string;\n paragraph: ParagraphFormat;\n character: CharacterFormat;\n block: StyleBlock;\n /** Id of the style after Enter at the end of a paragraph. */\n next: string;\n}\n\nexport interface StyleDefaults {\n paragraph?: ParagraphFormat;\n character?: CharacterFormat;\n}\n\nexport interface StyleRegistryOptions {\n /** Styles added to (or replacing) the built-in ones. */\n styles?: readonly StyleDefinition[];\n /** Include the built-in styles. Default `true`. */\n builtins?: boolean;\n /** Document defaults, applied below every style. */\n defaults?: StyleDefaults;\n}\n\nexport interface StyleRegistrySnapshot {\n styles: readonly StyleDefinition[];\n defaults: StyleDefaults;\n /** Increases on every change. */\n version: number;\n}\n\n/** Serializable registry content (`registry.toJSON()`). */\nexport interface StyleRegistryJSON {\n styles: StyleDefinition[];\n defaults: StyleDefaults;\n}\n\nexport interface StyleCSSOptions {\n /** Selector the rules are scoped to. Default `.ProseMirror`. */\n scope?: string;\n /**\n * Element selector of blocks that use a style without naming it\n * (`data-style` absent), e.g. `h2` for Heading 2. Return `null` for none.\n */\n tagFor?: (block: StyleBlock) => string | null;\n}\n\n/** Longest `basedOn` chain followed (cycle and depth guard). */\nconst MAX_CHAIN = 32;\nconst STYLE_ID = /^[A-Za-z][A-Za-z0-9_-]{0,63}$/;\n/** CSS values that could escape a declaration or load resources are dropped. */\nconst UNSAFE_CSS = /[;{}<>\\\\]|\\/\\*|url\\s*\\(|expression\\s*\\(|@import|javascript:/i;\n\nexport const NORMAL_STYLE_ID = \"Normal\";\n\nconst PREVIEW_PROPERTIES = new Set([\n \"font-family\",\n \"font-weight\",\n \"font-style\",\n \"color\",\n \"text-decoration-line\",\n \"text-transform\",\n \"letter-spacing\",\n \"font-variant-caps\",\n]);\n\n/** Whether `id` is a valid style id. */\nexport function isValidStyleId(id: unknown): id is string {\n return typeof id === \"string\" && STYLE_ID.test(id);\n}\n\nconst MUTED = \"var(--pixerate-style-muted, #6b7280)\";\nconst HEADING_SIZES = [\"2em\", \"1.5em\", \"1.25em\", \"1.1em\", \"1em\", \"0.9em\"];\n\nfunction builtinStyles(): StyleDefinition[] {\n const styles: StyleDefinition[] = [\n {\n id: NORMAL_STYLE_ID,\n name: \"Normal\",\n kind: \"paragraph\",\n block: { type: \"paragraph\" },\n priority: 0,\n quick: true,\n builtin: true,\n },\n {\n id: \"Title\",\n name: \"Title\",\n kind: \"paragraph\",\n basedOn: NORMAL_STYLE_ID,\n next: NORMAL_STYLE_ID,\n linked: \"TitleChar\",\n paragraph: { spaceAfter: \"0.25em\", lineHeight: \"1.15\" },\n character: { fontSize: \"2.5em\", bold: true, letterSpacing: \"-0.01em\" },\n priority: 10,\n quick: true,\n builtin: true,\n },\n {\n id: \"Subtitle\",\n name: \"Subtitle\",\n kind: \"paragraph\",\n basedOn: NORMAL_STYLE_ID,\n next: NORMAL_STYLE_ID,\n linked: \"SubtitleChar\",\n paragraph: { spaceAfter: \"0.75em\" },\n character: { fontSize: \"1.25em\", color: MUTED },\n priority: 11,\n quick: true,\n builtin: true,\n },\n ];\n HEADING_SIZES.forEach((fontSize, i) => {\n const level = i + 1;\n styles.push({\n id: `Heading${level}`,\n name: `Heading ${level}`,\n kind: \"paragraph\",\n basedOn: NORMAL_STYLE_ID,\n next: NORMAL_STYLE_ID,\n linked: `Heading${level}Char`,\n block: { type: \"heading\", attrs: { level } },\n paragraph: { spaceBefore: level <= 2 ? \"1em\" : \"0.75em\", spaceAfter: \"0.25em\" },\n character: { fontSize, bold: true },\n priority: 11 + level,\n quick: level <= 3,\n builtin: true,\n });\n });\n styles.push(\n {\n id: \"Quote\",\n name: \"Quote\",\n kind: \"paragraph\",\n basedOn: NORMAL_STYLE_ID,\n next: NORMAL_STYLE_ID,\n linked: \"QuoteChar\",\n paragraph: { indentLeft: \"1em\", paddingLeft: \"0.75em\", borderLeft: \"3px solid currentColor\" },\n character: { italic: true, color: MUTED },\n priority: 29,\n quick: true,\n builtin: true,\n },\n {\n id: \"Code\",\n name: \"Code\",\n kind: \"paragraph\",\n basedOn: NORMAL_STYLE_ID,\n next: NORMAL_STYLE_ID,\n block: { type: \"codeBlock\" },\n character: {\n fontFamily: \"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace\",\n fontSize: \"0.9em\",\n },\n priority: 30,\n quick: true,\n builtin: true,\n },\n {\n id: \"ListParagraph\",\n name: \"List Paragraph\",\n kind: \"paragraph\",\n basedOn: NORMAL_STYLE_ID,\n paragraph: { indentLeft: \"2em\" },\n priority: 34,\n quick: true,\n builtin: true,\n },\n );\n // Linked character styles: their formatting is the paragraph style's.\n const linked = [\"Title\", \"Subtitle\", \"Quote\", ...HEADING_SIZES.map((_, i) => `Heading${i + 1}`)];\n linked.forEach((paragraphId) => {\n const name = styles.find((s) => s.id === paragraphId)!.name;\n styles.push({\n id: `${paragraphId}Char`,\n name: `${name} Char`,\n kind: \"character\",\n linked: paragraphId,\n priority: 99,\n hidden: true,\n builtin: true,\n });\n });\n styles.push(\n {\n id: \"Emphasis\",\n name: \"Emphasis\",\n kind: \"character\",\n character: { italic: true },\n priority: 20,\n quick: true,\n builtin: true,\n },\n {\n id: \"Strong\",\n name: \"Strong\",\n kind: \"character\",\n character: { bold: true },\n priority: 22,\n quick: true,\n builtin: true,\n },\n );\n return styles;\n}\n\n/** The built-in styles: Normal, Title, Subtitle, Heading 1–6, Quote, Code, List Paragraph and character styles. */\nexport const DEFAULT_STYLES: readonly StyleDefinition[] = Object.freeze(builtinStyles());\n\nconst clone = <T>(value: T): T => (value === undefined ? value : JSON.parse(JSON.stringify(value)));\n\n/** Copies only defined values of `patch` over `base`. */\nfunction overlay<T extends object>(base: T, patch: T | undefined | null): T {\n if (!patch) return base;\n const out: Record<string, unknown> = { ...(base as Record<string, unknown>) };\n Object.entries(patch).forEach(([key, value]) => {\n if (value !== undefined && value !== null) out[key] = value;\n });\n return out as T;\n}\n\nfunction sameBlock(a: StyleBlock, type: string, attrs: Record<string, any>): boolean {\n if (a.type !== type) return false;\n return Object.entries(a.attrs ?? {}).every(([key, value]) => attrs[key] === value);\n}\n\n/**\n * Style definitions with `basedOn` inheritance, next-style and linked\n * character/paragraph styles, resolved in cascade order: document defaults →\n * style chain (base first) → direct formatting. Chains are cycle-safe.\n *\n * `subscribe` calls the listener immediately and on every change (Svelte\n * store contract); `getSnapshot` is stable between changes.\n */\nexport class StyleRegistry {\n private styles = new Map<string, StyleDefinition>();\n private defaults: StyleDefaults;\n private version = 0;\n private snapshot: StyleRegistrySnapshot | null = null;\n private listeners = new Set<(snapshot: StyleRegistrySnapshot) => void>();\n\n constructor(options: StyleRegistryOptions = {}) {\n this.defaults = clone(options.defaults ?? {});\n if (options.builtins !== false) DEFAULT_STYLES.forEach((style) => this.styles.set(style.id, clone(style)));\n (options.styles ?? []).forEach((style) => this.put(style));\n }\n\n // -- Reading --------------------------------------------------------------\n\n get(id: string | null | undefined): StyleDefinition | undefined {\n return id ? this.styles.get(id) : undefined;\n }\n\n /** Finds a style by id or display name (case-insensitive). */\n find(nameOrId: string): StyleDefinition | undefined {\n const direct = this.styles.get(nameOrId);\n if (direct) return direct;\n const lower = nameOrId.toLowerCase();\n return this.list().find((style) => style.name.toLowerCase() === lower);\n }\n\n /** All styles (optionally of one kind) in gallery order. */\n list(kind?: StyleKind): StyleDefinition[] {\n return Array.from(this.styles.values())\n .filter((style) => !kind || style.kind === kind)\n .sort((a, b) => (a.priority ?? 99) - (b.priority ?? 99) || a.name.localeCompare(b.name));\n }\n\n /** Styles shown in the gallery (`quick`, not hidden), paragraph styles by default. */\n gallery(kind: StyleKind = \"paragraph\"): StyleDefinition[] {\n return this.list(kind).filter((style) => style.quick && !style.hidden);\n }\n\n /** The `basedOn` chain from the root style down to `id` (cycle-safe, bounded). */\n chain(id: string): StyleDefinition[] {\n const out: StyleDefinition[] = [];\n let current = this.styles.get(id);\n while (current && out.length < MAX_CHAIN && !out.includes(current)) {\n out.push(current);\n current = current.basedOn ? this.styles.get(current.basedOn) : undefined;\n }\n return out.reverse();\n }\n\n /**\n * Resolves a paragraph style: defaults, then each style of the chain (base\n * first). Unknown ids resolve to the defaults in a `paragraph` block.\n */\n resolve(id: string): ResolvedStyle {\n let paragraph = overlay<ParagraphFormat>({}, this.defaults.paragraph);\n let character = overlay<CharacterFormat>({}, this.defaults.character);\n let block: StyleBlock = { type: \"paragraph\" };\n this.chain(id).forEach((style) => {\n if (style.kind !== \"paragraph\") return;\n paragraph = overlay(paragraph, style.paragraph);\n character = overlay(character, style.character);\n if (style.block) block = clone(style.block);\n });\n return { id, paragraph, character, block, next: this.nextStyleId(id) };\n }\n\n /** Character formatting a paragraph style's chain sets (without defaults). */\n private paragraphCharacter(id: string): CharacterFormat {\n let character: CharacterFormat = {};\n this.chain(id).forEach((style) => {\n if (style.kind === \"paragraph\") character = overlay(character, style.character);\n });\n return character;\n }\n\n /**\n * Character formatting of a character style's chain. A style linked to a\n * paragraph style takes that style's character formatting first.\n */\n resolveCharacterStyle(id: string): CharacterFormat {\n let character: CharacterFormat = {};\n this.chain(id).forEach((style) => {\n if (style.kind === \"character\" && style.linked && this.get(style.linked)?.kind === \"paragraph\") {\n character = overlay(character, this.paragraphCharacter(style.linked));\n }\n character = overlay(character, style.character);\n });\n return character;\n }\n\n /**\n * Character formatting of text: defaults → paragraph style chain →\n * character style chain → direct formatting.\n */\n resolveText(input: {\n paragraphStyle?: string | null;\n characterStyle?: string | null;\n direct?: CharacterFormat;\n }): CharacterFormat {\n let character = this.resolve(input.paragraphStyle || NORMAL_STYLE_ID).character;\n if (input.characterStyle) character = overlay(character, this.resolveCharacterStyle(input.characterStyle));\n return overlay(character, input.direct);\n }\n\n /** The style after Enter at the end of a paragraph of `id` (itself when unset or unknown). */\n nextStyleId(id: string): string {\n const next = this.styles.get(id)?.next;\n return next && this.styles.get(next)?.kind === \"paragraph\" ? next : id;\n }\n\n /** The linked character style of a paragraph style, if any. */\n linkedCharacterStyle(id: string): StyleDefinition | undefined {\n const style = this.styles.get(id);\n const linked = style?.linked ? this.styles.get(style.linked) : undefined;\n return style?.kind === \"paragraph\" && linked?.kind === \"character\" ? linked : undefined;\n }\n\n /**\n * The style a block uses when it names none: Normal for paragraphs,\n * Heading N for headings of level N, Code for code blocks (the built-in\n * style whose own `block` matches).\n */\n defaultStyleFor(type: string, attrs: Record<string, any> = {}): string | null {\n if (type === \"paragraph\" && this.styles.get(NORMAL_STYLE_ID)) return NORMAL_STYLE_ID;\n const candidates = this.list(\"paragraph\").filter(\n (style) => style.block && sameBlock(style.block, type, attrs),\n );\n return (candidates.find((s) => s.builtin) ?? candidates[0])?.id ?? null;\n }\n\n /** The style of a block: its `styleId` when known, otherwise the block's default style. */\n styleOfBlock(type: string, attrs: Record<string, any> = {}): string | null {\n const id = attrs.styleId;\n if (id && this.styles.get(id)?.kind === \"paragraph\") return id;\n return this.defaultStyleFor(type, attrs);\n }\n\n getSnapshot = (): StyleRegistrySnapshot => {\n if (!this.snapshot) {\n this.snapshot = Object.freeze({\n styles: Object.freeze(this.list()),\n defaults: this.defaults,\n version: this.version,\n });\n }\n return this.snapshot;\n };\n\n subscribe = (listener: (snapshot: StyleRegistrySnapshot) => void): (() => void) => {\n this.listeners.add(listener);\n listener(this.getSnapshot());\n return () => {\n this.listeners.delete(listener);\n };\n };\n\n toJSON(): StyleRegistryJSON {\n return { styles: clone(Array.from(this.styles.values())), defaults: clone(this.defaults) };\n }\n\n // -- Writing --------------------------------------------------------------\n\n /** Adds or replaces a style. Throws on an invalid id. */\n upsert(style: StyleDefinition): StyleDefinition {\n const stored = this.put(style);\n this.changed();\n return stored;\n }\n\n /** Merges `patch` into a style (formats are merged key by key). Returns `undefined` for unknown ids. */\n update(id: string, patch: Partial<Omit<StyleDefinition, \"id\">>): StyleDefinition | undefined {\n const current = this.styles.get(id);\n if (!current) return undefined;\n const next: StyleDefinition = {\n ...current,\n ...patch,\n id,\n paragraph: patch.paragraph ? { ...current.paragraph, ...patch.paragraph } : current.paragraph,\n character: patch.character ? { ...current.character, ...patch.character } : current.character,\n };\n return this.upsert(next);\n }\n\n /**\n * Removes a style and returns it. Built-in styles cannot be removed. Styles\n * based on it are rebased onto its own base, and `next`/`linked`\n * references to it are dropped.\n */\n remove(id: string): StyleDefinition | undefined {\n const gone = this.styles.get(id);\n if (!gone || gone.builtin) return undefined;\n this.styles.delete(id);\n this.styles.forEach((style, key) => {\n let changed = style;\n if (style.basedOn === id) {\n changed = { ...changed, basedOn: gone.basedOn && gone.basedOn !== key ? gone.basedOn : null };\n }\n if (style.next === id) changed = { ...changed, next: null };\n if (style.linked === id) changed = { ...changed, linked: null };\n if (changed !== style) this.styles.set(key, changed);\n });\n this.changed();\n return gone;\n }\n\n /** Replaces the document defaults. */\n setDefaults(defaults: StyleDefaults): void {\n this.defaults = clone(defaults);\n this.changed();\n }\n\n /** An unused id derived from a display name (`My Style` → `MyStyle`, then `MyStyle1`, …). */\n newId(name: string): string {\n let base = name.replace(/[^A-Za-z0-9_-]+/g, \"\").replace(/^[^A-Za-z]+/, \"\").slice(0, 56);\n if (!base) base = \"Style\";\n if (!this.styles.has(base)) return base;\n for (let i = 1; i < 100000; i++) {\n const id = `${base}${i}`;\n if (!this.styles.has(id)) return id;\n }\n return `${base}${Date.now()}`;\n }\n\n // -- CSS --------------------------------------------------------------------\n\n /** CSS declarations (`property: value`) of a resolved paragraph or character style. */\n cssDeclarations(id: string): Record<string, string> {\n const style = this.styles.get(id);\n if (style?.kind === \"character\") return characterCSS(this.resolveCharacterStyle(id));\n const resolved = this.resolve(id);\n return { ...paragraphCSS(resolved.paragraph), ...characterCSS(resolved.character) };\n }\n\n /**\n * Declarations for previewing a style in a menu or gallery: font family,\n * weight, style, color, decoration, case and letter spacing (no sizes,\n * margins or borders).\n */\n previewDeclarations(id: string): Record<string, string> {\n return Object.fromEntries(\n Object.entries(this.cssDeclarations(id)).filter(([property]) => PREVIEW_PROPERTIES.has(property)),\n );\n }\n\n /**\n * A stylesheet for the styles: `[data-style=\"Id\"]` rules for paragraph\n * styles (plus the plain element of blocks that use their default style,\n * e.g. `h2:not([data-style])`), `[data-char-style=\"Id\"]` for character\n * styles and the defaults on the scope element.\n */\n toCSS(options: StyleCSSOptions = {}): string {\n const scope = options.scope ?? \".ProseMirror\";\n const tagFor = options.tagFor ?? defaultTagFor;\n const rules: string[] = [];\n const rule = (selectors: string[], declarations: Record<string, string>) => {\n const body = Object.entries(declarations)\n .map(([property, value]) => `${property}: ${value};`)\n .join(\" \");\n if (body) rules.push(`${selectors.join(\", \")} { ${body} }`);\n };\n rule([scope], {\n ...paragraphCSS(this.defaults.paragraph ?? {}),\n ...characterCSS(this.defaults.character ?? {}),\n });\n this.list().forEach((style) => {\n if (style.kind === \"character\") {\n rule([`${scope} [data-char-style=\"${style.id}\"]`], this.cssDeclarations(style.id));\n return;\n }\n const selectors = [`${scope} [data-style=\"${style.id}\"]`];\n const block = this.resolve(style.id).block;\n if (this.defaultStyleFor(block.type, block.attrs ?? {}) === style.id) {\n const tag = tagFor(block);\n if (tag) selectors.push(`${scope} ${tag}:not([data-style])`);\n }\n // Defaults already apply to the scope; repeat only what the chain sets.\n const resolved = this.resolve(style.id);\n const own = {\n ...paragraphCSS(withoutDefaults(resolved.paragraph, this.defaults.paragraph)),\n ...characterCSS(withoutDefaults(resolved.character, this.defaults.character)),\n };\n rule(selectors, own);\n });\n return rules.join(\"\\n\");\n }\n\n // -- Internals --------------------------------------------------------------\n\n private put(style: StyleDefinition): StyleDefinition {\n if (!isValidStyleId(style.id)) throw new Error(`Invalid style id: ${String(style.id)}`);\n if (style.kind !== \"paragraph\" && style.kind !== \"character\") {\n throw new Error(`Invalid style kind: ${String(style.kind)}`);\n }\n const stored = clone({ ...style, name: style.name || style.id });\n this.styles.set(style.id, stored);\n return stored;\n }\n\n private changed(): void {\n this.version++;\n this.snapshot = null;\n const snapshot = this.getSnapshot();\n this.listeners.forEach((listener) => {\n try {\n listener(snapshot);\n } catch (err) {\n console.error(\"[StyleRegistry] Error in listener:\", err);\n }\n });\n }\n}\n\nfunction withoutDefaults<T extends object>(format: T, defaults: T | undefined): T {\n if (!defaults) return format;\n const out: Record<string, unknown> = {};\n Object.entries(format).forEach(([key, value]) => {\n if ((defaults as Record<string, unknown>)[key] !== value) out[key] = value;\n });\n return out as T;\n}\n\nfunction defaultTagFor(block: StyleBlock): string | null {\n if (block.type === \"paragraph\") return \"p\";\n if (block.type === \"heading\") {\n const level = Number(block.attrs?.level);\n return level >= 1 && level <= 6 ? `h${level}` : null;\n }\n if (block.type === \"codeBlock\") return \"pre\";\n return null;\n}\n\n/** A CSS value, or `undefined` when it is unsafe or empty. */\nexport function safeCSSValue(value: unknown): string | undefined {\n if (typeof value !== \"string\") return undefined;\n const trimmed = value.trim();\n if (!trimmed || trimmed.length > 200 || UNSAFE_CSS.test(trimmed)) return undefined;\n return trimmed;\n}\n\nfunction paragraphCSS(format: ParagraphFormat): Record<string, string> {\n const out: Record<string, string> = {};\n const set = (property: string, value: unknown) => {\n const safe = safeCSSValue(value);\n if (safe) out[property] = safe;\n };\n set(\"text-align\", format.textAlign);\n set(\"line-height\", format.lineHeight);\n set(\"margin-top\", format.spaceBefore);\n set(\"margin-bottom\", format.spaceAfter);\n set(\"margin-left\", format.indentLeft);\n set(\"margin-right\", format.indentRight);\n set(\"text-indent\", format.indentFirstLine);\n set(\"border-left\", format.borderLeft);\n set(\"padding-left\", format.paddingLeft);\n set(\"background-color\", format.backgroundColor);\n return out;\n}\n\nfunction characterCSS(format: CharacterFormat): Record<string, string> {\n const out: Record<string, string> = {};\n const set = (property: string, value: unknown) => {\n const safe = safeCSSValue(value);\n if (safe) out[property] = safe;\n };\n set(\"font-family\", format.fontFamily);\n set(\"font-size\", format.fontSize);\n if (format.bold !== undefined) out[\"font-weight\"] = format.bold ? \"700\" : \"400\";\n if (format.italic !== undefined) out[\"font-style\"] = format.italic ? \"italic\" : \"normal\";\n const lines = [format.underline && \"underline\", format.strike && \"line-through\"].filter(Boolean);\n if (format.underline !== undefined || format.strike !== undefined) {\n out[\"text-decoration-line\"] = lines.length ? lines.join(\" \") : \"none\";\n }\n set(\"color\", format.color);\n set(\"background-color\", format.backgroundColor);\n set(\"letter-spacing\", format.letterSpacing);\n set(\"text-transform\", format.textTransform);\n if (format.smallCaps !== undefined) out[\"font-variant-caps\"] = format.smallCaps ? \"small-caps\" : \"normal\";\n return out;\n}\n\n/** Creates a style registry with the built-in styles (unless `builtins: false`) and `styles`. */\nexport function createStyleRegistry(options: StyleRegistryOptions | StyleRegistryJSON = {}): StyleRegistry {\n return new StyleRegistry(options as StyleRegistryOptions);\n}\n","/**\n * Minimal, dependency-free ZIP reader used by the DOCX and zipped-export\n * import adapters.\n *\n * - Reads the central directory (including ZIP64 end records and extra\n * fields), so sizes come from the authoritative directory rather than local\n * headers or data descriptors.\n * - Supports stored (method 0) and deflate (method 8) entries; deflate is\n * inflated with the platform `DecompressionStream(\"deflate-raw\")` (modern\n * browsers, Node ≥ 18).\n * - Guards against zip bombs (entry-count and total-uncompressed-size caps,\n * enforced on the bytes actually inflated, not only the declared sizes),\n * path traversal in entry names and encrypted entries.\n * - Verifies CRC-32 checksums of extracted entries.\n */\n\nexport type ZipErrorCode =\n /** Not a ZIP archive, or its directory is truncated / inconsistent. */\n | \"invalid_archive\"\n /** Compression method other than stored/deflate, multi-disk archives, … */\n | \"unsupported_feature\"\n /** The entry is encrypted (general-purpose flag bit 0). */\n | \"encrypted\"\n /** An entry name is absolute or contains `..` segments. */\n | \"unsafe_path\"\n /** More entries than `maxEntries`. */\n | \"too_many_entries\"\n /** Extracting would exceed `maxTotalSize` uncompressed bytes. */\n | \"too_large\"\n /** The entry data is corrupt (bad header, size or CRC mismatch, bad deflate stream). */\n | \"corrupt_entry\"\n /** No entry with the requested name. */\n | \"entry_not_found\"\n /** `DecompressionStream` is unavailable in this environment. */\n | \"unsupported_environment\";\n\nexport class ZipError extends Error {\n readonly code: ZipErrorCode;\n readonly entryName?: string;\n\n constructor(code: ZipErrorCode, message: string, details: { entryName?: string; cause?: unknown } = {}) {\n super(message, details.cause !== undefined ? { cause: details.cause } : undefined);\n this.name = \"ZipError\";\n this.code = code;\n this.entryName = details.entryName;\n }\n}\n\nexport interface ZipEntry {\n /** Entry path with `/` separators (backslashes are normalized). */\n name: string;\n /** Whether the entry is a directory (name ends with `/`). */\n isDirectory: boolean;\n /** Whether the entry is encrypted; reading it throws `ZipError(\"encrypted\")`. */\n encrypted: boolean;\n /** Compression method (0 = stored, 8 = deflate). */\n method: number;\n /** Declared compressed size in bytes. */\n compressedSize: number;\n /** Declared uncompressed size in bytes. */\n size: number;\n /** CRC-32 of the uncompressed data. */\n crc32: number;\n /** Offset of the entry's local file header. */\n localHeaderOffset: number;\n}\n\nexport interface ZipReadOptions {\n /** Maximum number of entries in the central directory (default 10 000). */\n maxEntries?: number;\n /**\n * Maximum number of uncompressed bytes extracted from the archive, summed\n * over every `read` call (default 256 MiB). Enforced while inflating.\n */\n maxTotalSize?: number;\n /**\n * What to do with entries whose names are absolute or contain `..`\n * segments: `\"error\"` (default) rejects the archive, `\"skip\"` leaves them\n * out of `entries`.\n */\n unsafePaths?: \"error\" | \"skip\";\n}\n\nexport const DEFAULT_ZIP_MAX_ENTRIES = 10_000;\nexport const DEFAULT_ZIP_MAX_TOTAL_SIZE = 256 * 1024 * 1024;\n\nconst SIG_EOCD = 0x06054b50;\nconst SIG_ZIP64_EOCD = 0x06064b50;\nconst SIG_ZIP64_LOCATOR = 0x07064b50;\nconst SIG_CENTRAL = 0x02014b50;\nconst SIG_LOCAL = 0x04034b50;\nconst EOCD_SIZE = 22;\nconst MAX_COMMENT = 0xffff;\n\nlet crcTable: Uint32Array | null = null;\n\n/** CRC-32 (IEEE 802.3), as used by ZIP. */\nexport function zipCrc32(data: Uint8Array): number {\n if (!crcTable) {\n crcTable = new Uint32Array(256);\n for (let n = 0; n < 256; n++) {\n let c = n;\n for (let k = 0; k < 8; k++) c = c & 1 ? 0xedb88320 ^ (c >>> 1) : c >>> 1;\n crcTable[n] = c >>> 0;\n }\n }\n let crc = 0xffffffff;\n for (let i = 0; i < data.length; i++) crc = crcTable[(crc ^ data[i]) & 0xff] ^ (crc >>> 8);\n return (crc ^ 0xffffffff) >>> 0;\n}\n\nfunction toBytes(data: ArrayBuffer | ArrayBufferView): Uint8Array {\n // Duck-typed so ArrayBuffers from other realms (iframes, jsdom) work too.\n if (ArrayBuffer.isView(data)) return new Uint8Array(data.buffer, data.byteOffset, data.byteLength);\n return new Uint8Array(data as ArrayBuffer);\n}\n\n/** Whether `name` is absolute, has a drive letter, or contains `..` / NUL. */\nexport function isUnsafeZipPath(name: string): boolean {\n if (!name || name.includes(\"\\0\")) return true;\n const normalized = name.replace(/\\\\/g, \"/\");\n if (normalized.startsWith(\"/\") || /^[a-zA-Z]:/.test(normalized)) return true;\n return normalized.split(\"/\").some((segment) => segment === \"..\");\n}\n\nconst utf8 = new TextDecoder(\"utf-8\");\n\n/** CP437 high half, used for names without the UTF-8 flag. */\nconst CP437_HIGH =\n \"ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \";\n\nfunction decodeName(bytes: Uint8Array, isUtf8: boolean): string {\n if (isUtf8 || bytes.every((b) => b < 0x80)) return utf8.decode(bytes);\n let out = \"\";\n for (const b of bytes) out += b < 0x80 ? String.fromCharCode(b) : CP437_HIGH[b - 0x80];\n return out;\n}\n\n/**\n * A parsed ZIP archive. Entry data is extracted lazily with {@link read}.\n * Create it with {@link readZip}.\n */\nexport class ZipArchive {\n /** Entries in central-directory order. */\n readonly entries: readonly ZipEntry[];\n private readonly byName = new Map<string, ZipEntry>();\n private extracted = 0;\n\n constructor(\n private readonly bytes: Uint8Array,\n entries: ZipEntry[],\n private readonly maxTotalSize: number,\n ) {\n this.entries = entries;\n entries.forEach((entry) => {\n if (!this.byName.has(entry.name)) this.byName.set(entry.name, entry);\n });\n }\n\n /** Looks up an entry by exact name (a leading `/` is ignored). */\n get(name: string): ZipEntry | undefined {\n return this.byName.get(name.replace(/^\\/+/, \"\"));\n }\n\n has(name: string): boolean {\n return !!this.get(name);\n }\n\n /** Uncompressed bytes extracted so far (counted against `maxTotalSize`). */\n get extractedSize(): number {\n return this.extracted;\n }\n\n /** Extracts an entry's data, verifying its size and CRC-32. */\n async read(entryOrName: ZipEntry | string): Promise<Uint8Array> {\n const entry = typeof entryOrName === \"string\" ? this.get(entryOrName) : entryOrName;\n if (!entry) {\n throw new ZipError(\"entry_not_found\", `ZIP entry \"${String(entryOrName)}\" not found.`, {\n entryName: String(entryOrName),\n });\n }\n const name = entry.name;\n if (entry.encrypted) {\n throw new ZipError(\"encrypted\", `ZIP entry \"${name}\" is encrypted; encrypted archives are not supported.`, {\n entryName: name,\n });\n }\n if (entry.isDirectory) return new Uint8Array(0);\n const remaining = this.maxTotalSize - this.extracted;\n if (entry.size > remaining) {\n throw new ZipError(\n \"too_large\",\n `Extracting \"${name}\" (${entry.size} bytes) would exceed the ${this.maxTotalSize}-byte limit.`,\n { entryName: name },\n );\n }\n\n const { bytes } = this;\n const offset = entry.localHeaderOffset;\n if (offset + 30 > bytes.length || readU32(bytes, offset) !== SIG_LOCAL) {\n throw new ZipError(\"corrupt_entry\", `ZIP entry \"${name}\" has no valid local header.`, { entryName: name });\n }\n const dataStart = offset + 30 + readU16(bytes, offset + 26) + readU16(bytes, offset + 28);\n const dataEnd = dataStart + entry.compressedSize;\n if (dataEnd > bytes.length) {\n throw new ZipError(\"corrupt_entry\", `ZIP entry \"${name}\" is truncated.`, { entryName: name });\n }\n const raw = bytes.subarray(dataStart, dataEnd);\n\n let data: Uint8Array;\n if (entry.method === 0) {\n if (entry.compressedSize !== entry.size) {\n throw new ZipError(\"corrupt_entry\", `Stored ZIP entry \"${name}\" has inconsistent sizes.`, { entryName: name });\n }\n data = raw.slice();\n } else if (entry.method === 8) {\n // Cap at the declared size: more output means a lying header (or a bomb).\n data = await inflateRaw(raw, entry.size, name);\n } else {\n throw new ZipError(\n \"unsupported_feature\",\n `ZIP entry \"${name}\" uses unsupported compression method ${entry.method}; only stored and deflate are supported.`,\n { entryName: name },\n );\n }\n if (data.length !== entry.size) {\n throw new ZipError(\"corrupt_entry\", `ZIP entry \"${name}\" size does not match the directory.`, { entryName: name });\n }\n this.extracted += data.length;\n if (zipCrc32(data) !== entry.crc32) {\n throw new ZipError(\"corrupt_entry\", `ZIP entry \"${name}\" failed its CRC-32 check.`, { entryName: name });\n }\n return data;\n }\n\n /** Extracts an entry and decodes it as UTF-8 (a leading BOM is removed). */\n async readText(entryOrName: ZipEntry | string): Promise<string> {\n const text = utf8.decode(await this.read(entryOrName));\n return text.charCodeAt(0) === 0xfeff ? text.slice(1) : text;\n }\n}\n\nfunction readU16(bytes: Uint8Array, offset: number): number {\n return bytes[offset] | (bytes[offset + 1] << 8);\n}\n\nfunction readU32(bytes: Uint8Array, offset: number): number {\n return (bytes[offset] | (bytes[offset + 1] << 8) | (bytes[offset + 2] << 16) | (bytes[offset + 3] << 24)) >>> 0;\n}\n\nfunction readU64(bytes: Uint8Array, offset: number): number {\n const value = readU32(bytes, offset) + readU32(bytes, offset + 4) * 0x100000000;\n if (!Number.isSafeInteger(value)) {\n throw new ZipError(\"unsupported_feature\", \"ZIP64 value exceeds the supported range.\");\n }\n return value;\n}\n\n/** Inflates a raw deflate stream, failing as soon as output exceeds `limit` bytes. */\nasync function inflateRaw(raw: Uint8Array, limit: number, entryName: string): Promise<Uint8Array> {\n const Stream: typeof DecompressionStream | undefined = (globalThis as any).DecompressionStream;\n if (typeof Stream !== \"function\") {\n throw new ZipError(\n \"unsupported_environment\",\n \"Inflating ZIP entries needs DecompressionStream (modern browsers, Node 18+).\",\n { entryName },\n );\n }\n const stream = new Stream(\"deflate-raw\");\n const writer = stream.writable.getWriter();\n const reader = stream.readable.getReader();\n // Feed the input in slices so output is pulled (and checked) incrementally.\n const CHUNK = 64 * 1024;\n const feeding = (async () => {\n for (let i = 0; i < raw.length; i += CHUNK) await writer.write(raw.subarray(i, i + CHUNK) as unknown as BufferSource);\n await writer.close();\n })();\n feeding.catch(() => {});\n\n const chunks: Uint8Array[] = [];\n let total = 0;\n try {\n for (;;) {\n const { done, value } = await reader.read();\n if (done) break;\n total += value.length;\n if (total > limit) {\n throw new ZipError(\n \"corrupt_entry\",\n `ZIP entry \"${entryName}\" inflates beyond its declared size of ${limit} bytes.`,\n { entryName },\n );\n }\n chunks.push(value);\n }\n } catch (error) {\n reader.cancel().catch(() => {});\n writer.abort().catch(() => {});\n if (error instanceof ZipError) throw error;\n throw new ZipError(\"corrupt_entry\", `ZIP entry \"${entryName}\" has an invalid deflate stream.`, {\n entryName,\n cause: error,\n });\n }\n await feeding.catch(() => {});\n const out = new Uint8Array(total);\n let pos = 0;\n for (const chunk of chunks) {\n out.set(chunk, pos);\n pos += chunk.length;\n }\n return out;\n}\n\nfunction findEndOfCentralDirectory(bytes: Uint8Array): number {\n const min = Math.max(0, bytes.length - EOCD_SIZE - MAX_COMMENT);\n for (let i = bytes.length - EOCD_SIZE; i >= min; i--) {\n if (readU32(bytes, i) === SIG_EOCD && i + EOCD_SIZE + readU16(bytes, i + 20) <= bytes.length) return i;\n }\n return -1;\n}\n\n/**\n * Parses a ZIP archive's central directory. Entry data is not extracted until\n * {@link ZipArchive.read} is called. Throws {@link ZipError}.\n */\nexport async function readZip(data: ArrayBuffer | ArrayBufferView, options: ZipReadOptions = {}): Promise<ZipArchive> {\n const bytes = toBytes(data);\n const maxEntries = options.maxEntries ?? DEFAULT_ZIP_MAX_ENTRIES;\n const maxTotalSize = options.maxTotalSize ?? DEFAULT_ZIP_MAX_TOTAL_SIZE;\n\n const eocd = findEndOfCentralDirectory(bytes);\n if (eocd < 0) throw new ZipError(\"invalid_archive\", \"Not a ZIP archive (no end of central directory record).\");\n\n let diskNumber = readU16(bytes, eocd + 4);\n let cdDisk = readU16(bytes, eocd + 6);\n let count = readU16(bytes, eocd + 10);\n let cdSize = readU32(bytes, eocd + 12);\n let cdOffset = readU32(bytes, eocd + 16);\n\n if (count === 0xffff || cdSize === 0xffffffff || cdOffset === 0xffffffff) {\n const locator = eocd - 20;\n if (locator < 0 || readU32(bytes, locator) !== SIG_ZIP64_LOCATOR) {\n throw new ZipError(\"invalid_archive\", \"ZIP64 archive is missing its end of central directory locator.\");\n }\n const record = readU64(bytes, locator + 8);\n if (record + 56 > bytes.length || readU32(bytes, record) !== SIG_ZIP64_EOCD) {\n throw new ZipError(\"invalid_archive\", \"ZIP64 end of central directory record not found.\");\n }\n diskNumber = readU32(bytes, record + 16);\n cdDisk = readU32(bytes, record + 20);\n count = readU64(bytes, record + 32);\n cdSize = readU64(bytes, record + 40);\n cdOffset = readU64(bytes, record + 48);\n }\n if (diskNumber !== 0 || cdDisk !== 0) {\n throw new ZipError(\"unsupported_feature\", \"Multi-disk (spanned) ZIP archives are not supported.\");\n }\n if (count > maxEntries) {\n throw new ZipError(\"too_many_entries\", `ZIP archive has ${count} entries; the limit is ${maxEntries}.`);\n }\n if (cdOffset + cdSize > bytes.length) {\n throw new ZipError(\"invalid_archive\", \"ZIP central directory lies outside the file.\");\n }\n\n const entries: ZipEntry[] = [];\n let p = cdOffset;\n for (let i = 0; i < count; i++) {\n if (p + 46 > bytes.length || readU32(bytes, p) !== SIG_CENTRAL) {\n throw new ZipError(\"invalid_archive\", \"ZIP central directory is corrupt.\");\n }\n const flags = readU16(bytes, p + 8);\n const method = readU16(bytes, p + 10);\n const crc32 = readU32(bytes, p + 16);\n let compressedSize = readU32(bytes, p + 20);\n let size = readU32(bytes, p + 24);\n const nameLength = readU16(bytes, p + 28);\n const extraLength = readU16(bytes, p + 30);\n const commentLength = readU16(bytes, p + 32);\n let localHeaderOffset = readU32(bytes, p + 42);\n const nameStart = p + 46;\n const extraStart = nameStart + nameLength;\n const next = extraStart + extraLength + commentLength;\n if (next > bytes.length) throw new ZipError(\"invalid_archive\", \"ZIP central directory is truncated.\");\n\n // ZIP64 extended information: only the fields that overflowed are present, in order.\n for (let e = extraStart; e + 4 <= extraStart + extraLength; ) {\n const id = readU16(bytes, e);\n const len = readU16(bytes, e + 2);\n if (id === 0x0001) {\n let f = e + 4;\n const end = f + len;\n if (size === 0xffffffff && f + 8 <= end) {\n size = readU64(bytes, f);\n f += 8;\n }\n if (compressedSize === 0xffffffff && f + 8 <= end) {\n compressedSize = readU64(bytes, f);\n f += 8;\n }\n if (localHeaderOffset === 0xffffffff && f + 8 <= end) localHeaderOffset = readU64(bytes, f);\n }\n e += 4 + len;\n }\n\n const rawName = decodeName(bytes.subarray(nameStart, extraStart), (flags & 0x0800) !== 0);\n const name = rawName.replace(/\\\\/g, \"/\");\n p = next;\n if (isUnsafeZipPath(rawName)) {\n if (options.unsafePaths === \"skip\") continue;\n throw new ZipError(\"unsafe_path\", `ZIP entry name \"${rawName}\" is absolute or escapes the archive root.`, {\n entryName: rawName,\n });\n }\n entries.push({\n name,\n isDirectory: name.endsWith(\"/\"),\n encrypted: (flags & 0x0001) !== 0,\n method,\n compressedSize,\n size,\n crc32,\n localHeaderOffset,\n });\n }\n return new ZipArchive(bytes, entries, maxTotalSize);\n}\n"]}
@@ -8,7 +8,7 @@ var _chunkBVP3TSLHcjs = require('./chunk-BVP3TSLH.cjs');
8
8
 
9
9
 
10
10
 
11
- var _chunkX4N4WUKBcjs = require('./chunk-X4N4WUKB.cjs');
11
+ var _chunkIFHKKVXHcjs = require('./chunk-IFHKKVXH.cjs');
12
12
 
13
13
  // src/serializers/plain-text.ts
14
14
  var _model = require('@tiptap/pm/model');
@@ -176,6 +176,61 @@ function parseHtmlFragment(html) {
176
176
  function decodeHtmlEntities(text) {
177
177
  return text.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"').replace(/&#0*39;/g, "'").replace(/&nbsp;/g, "\xA0").replace(/&amp;/g, "&");
178
178
  }
179
+ var CELL_TAGS = /* @__PURE__ */ new Set(["TD", "TH"]);
180
+ function blockLines(nodes) {
181
+ const lines = [];
182
+ let current = null;
183
+ const flush = () => {
184
+ if (current !== null) {
185
+ lines.push(current);
186
+ current = null;
187
+ }
188
+ };
189
+ const visit = (node) => {
190
+ if (node.nodeType === 3) {
191
+ const value = _nullishCoalesce(node.nodeValue, () => ( ""));
192
+ if (current === null && value.trim() === "") return;
193
+ current = (_nullishCoalesce(current, () => ( ""))) + value;
194
+ return;
195
+ }
196
+ if (node.nodeType !== 1) return;
197
+ const element = node;
198
+ const tag = element.tagName.toUpperCase();
199
+ if (tag === "BR") {
200
+ current = (_nullishCoalesce(current, () => ( ""))) + "\n";
201
+ return;
202
+ }
203
+ if (tag === "TR") {
204
+ flush();
205
+ const cells = [];
206
+ element.childNodes.forEach((child) => {
207
+ if (child.nodeType !== 1 || !CELL_TAGS.has(child.tagName.toUpperCase())) return;
208
+ const cell = child;
209
+ cells.push(
210
+ blockLines(Array.from(cell.childNodes)).filter((line) => line !== "").join(" ").replace(/[\t\n]+/g, " ")
211
+ );
212
+ const span = parseInt(_nullishCoalesce(cell.getAttribute("colspan"), () => ( "1")), 10);
213
+ for (let i = 1; i < Math.min(Number.isFinite(span) ? span : 1, 1e3); i++) cells.push("");
214
+ });
215
+ lines.push(cells.join(" "));
216
+ return;
217
+ }
218
+ if (!BLOCK_TAGS.has(tag)) {
219
+ node.childNodes.forEach(visit);
220
+ return;
221
+ }
222
+ flush();
223
+ const linesBefore = lines.length;
224
+ node.childNodes.forEach(visit);
225
+ flush();
226
+ if (lines.length === linesBefore && tag !== "HR" && tag !== "TABLE") {
227
+ lines.push("");
228
+ }
229
+ };
230
+ nodes.forEach(visit);
231
+ flush();
232
+ return lines;
233
+ }
179
234
  function htmlToPlainText(html, options = {}) {
180
235
  if (!html) return "";
181
236
  const trackedResolved = stripTrackedChanges(
@@ -191,44 +246,9 @@ function htmlToPlainText(html, options = {}) {
191
246
  if (typeof document !== "undefined") {
192
247
  const fragment = parseHtmlFragment(mentionNormalized);
193
248
  fragment.querySelectorAll("br.ProseMirror-trailingBreak").forEach((br) => br.remove());
194
- const lines = [];
195
- let current = null;
196
- const flush = () => {
197
- if (current !== null) {
198
- lines.push(current);
199
- current = null;
200
- }
201
- };
202
- const visit = (node) => {
203
- if (node.nodeType === 3) {
204
- const value = _nullishCoalesce(node.nodeValue, () => ( ""));
205
- if (current === null && value.trim() === "") return;
206
- current = (_nullishCoalesce(current, () => ( ""))) + value;
207
- return;
208
- }
209
- if (node.nodeType !== 1) return;
210
- const tag = node.tagName.toUpperCase();
211
- if (tag === "BR") {
212
- current = (_nullishCoalesce(current, () => ( ""))) + "\n";
213
- return;
214
- }
215
- if (!BLOCK_TAGS.has(tag)) {
216
- node.childNodes.forEach(visit);
217
- return;
218
- }
219
- flush();
220
- const linesBefore = lines.length;
221
- node.childNodes.forEach(visit);
222
- flush();
223
- if (lines.length === linesBefore && tag !== "HR") {
224
- lines.push("");
225
- }
226
- };
227
- fragment.childNodes.forEach(visit);
228
- flush();
229
- return lines.join("\n");
249
+ return blockLines(Array.from(fragment.childNodes)).join("\n");
230
250
  }
231
- const text = mentionNormalized.replace(/<br\s*\/?>/gi, "\n").replace(
251
+ const text = mentionNormalized.replace(/<\/p>\s*<\/t([dh])>/gi, "</t$1>").replace(/<\/t[dh]>\s*(?=<t[dh][\s>])/gi, " ").replace(/<\/tr>/gi, "\n").replace(/<br\s*\/?>/gi, "\n").replace(
232
252
  /<\/(?:p|div|li|pre|blockquote|h[1-6])>(?:\s*<\/(?:li|ul|ol|blockquote|div)>)*/gi,
233
253
  "\n"
234
254
  );
@@ -241,16 +261,16 @@ function resolvedBlockOperationsHtml(editor, view) {
241
261
  doc.descendants((node) => {
242
262
  if (found) return false;
243
263
  if (node.isTextblock) {
244
- if (_optionalChain([node, 'access', _3 => _3.attrs, 'optionalAccess', _4 => _4[_chunkX4N4WUKBcjs.BLOCK_CHANGE_ATTRIBUTE], 'optionalAccess', _5 => _5.operation])) found = true;
264
+ if (_optionalChain([node, 'access', _3 => _3.attrs, 'optionalAccess', _4 => _4[_chunkIFHKKVXHcjs.BLOCK_CHANGE_ATTRIBUTE], 'optionalAccess', _5 => _5.operation])) found = true;
245
265
  else node.forEach((child) => {
246
- if (child.marks.some((mark) => _optionalChain([mark, 'access', _6 => _6.attrs, 'optionalAccess', _7 => _7[_chunkX4N4WUKBcjs.MOVE_ID_ATTRIBUTE]]))) found = true;
266
+ if (child.marks.some((mark) => _optionalChain([mark, 'access', _6 => _6.attrs, 'optionalAccess', _7 => _7[_chunkIFHKKVXHcjs.MOVE_ID_ATTRIBUTE]]))) found = true;
247
267
  });
248
268
  return false;
249
269
  }
250
270
  return true;
251
271
  });
252
272
  if (!found) return null;
253
- const resolved = _chunkX4N4WUKBcjs.resolveTrackedChanges.call(void 0, doc, view);
273
+ const resolved = _chunkIFHKKVXHcjs.resolveTrackedChanges.call(void 0, doc, view);
254
274
  const container = document.createElement("div");
255
275
  container.appendChild(_model.DOMSerializer.fromSchema(doc.type.schema).serializeFragment(resolved.content));
256
276
  return container.innerHTML;
@@ -357,6 +377,88 @@ function extractMentionsFromDoc(docOrEditor) {
357
377
 
358
378
  // src/serializers/mentions.ts
359
379
  var MARKDOWN_MENTION_SPLIT_REGEX = /(```[\s\S]*?```|~~~[\s\S]*?~~~|<pre[\s\S]*?<\/pre>|<code[\s\S]*?<\/code>|`[^`\n]+`|<span\b[^>]*\b(?:data-type=["']mention["']|class=["'][^"']*pixerate-mention-node[^"']*["']|data-mention=["'][^"']*["'])[^>]*>[\s\S]*?<\/span>|<[^>]+>|\]\([^)]+\)|(?:https?|file|vscode|cursor|mailto):\/\/[^\s<)]+)/gi;
380
+ var MENTION_SPAN_ATTRIBUTE = /\b(?:data-type=["']mention["']|class=["'][^"'>]*pixerate-mention-node[^"'>]*["']|data-mention=["'][^"'>]*["'])/gi;
381
+ var URL_SCHEMES = ["https://", "http://", "file://", "vscode://", "cursor://", "mailto://"];
382
+ var URL_STOP = /[\s<)]/;
383
+ function splitMarkdownMentionParts(text) {
384
+ const lower = asciiLower(text);
385
+ const n = text.length;
386
+ const cache = /* @__PURE__ */ new Map();
387
+ const next = (needle, from) => {
388
+ const cached = cache.get(needle);
389
+ if (cached && cached.from <= from && (cached.at === -1 || cached.at >= from)) return cached.at;
390
+ const at = lower.indexOf(needle, from);
391
+ cache.set(needle, { from, at });
392
+ return at;
393
+ };
394
+ let attrFrom = -1;
395
+ let attrAt = -1;
396
+ const nextAttribute = (from) => {
397
+ if (attrFrom !== -1 && (attrAt === -1 || attrAt >= from) && attrFrom <= from) return attrAt;
398
+ MENTION_SPAN_ATTRIBUTE.lastIndex = from;
399
+ attrAt = _nullishCoalesce(_optionalChain([MENTION_SPAN_ATTRIBUTE, 'access', _13 => _13.exec, 'call', _14 => _14(text), 'optionalAccess', _15 => _15.index]), () => ( -1));
400
+ attrFrom = from;
401
+ return attrAt;
402
+ };
403
+ const matchAt = (i) => {
404
+ const c = text[i];
405
+ if (c === "`" || c === "~") {
406
+ const fence = c.repeat(3);
407
+ if (text.startsWith(fence, i)) {
408
+ const close = next(fence, i + 3);
409
+ if (close !== -1) return close + 3;
410
+ }
411
+ if (c === "`") {
412
+ const tick = next("`", i + 1);
413
+ const newline = next("\n", i + 1);
414
+ if (tick > i + 1 && (newline === -1 || tick < newline)) return tick + 1;
415
+ }
416
+ return -1;
417
+ }
418
+ if (c === "<") {
419
+ for (const tag of ["pre", "code"]) {
420
+ if (lower.startsWith(`<${tag}`, i)) {
421
+ const close = next(`</${tag}>`, i + tag.length + 1);
422
+ if (close !== -1) return close + tag.length + 3;
423
+ }
424
+ }
425
+ const gt = next(">", i + 1);
426
+ if (lower.startsWith("<span", i) && !/\w/.test(_nullishCoalesce(text[i + 5], () => ( ""))) && gt !== -1) {
427
+ const attr = nextAttribute(i + 5);
428
+ if (attr !== -1 && attr < gt) {
429
+ const close = next("</span>", gt + 1);
430
+ if (close !== -1) return close + 7;
431
+ }
432
+ }
433
+ return gt > i + 1 ? gt + 1 : -1;
434
+ }
435
+ if (c === "]") {
436
+ if (text[i + 1] !== "(") return -1;
437
+ const close = next(")", i + 2);
438
+ return close > i + 2 ? close + 1 : -1;
439
+ }
440
+ for (const scheme of URL_SCHEMES) {
441
+ if (!lower.startsWith(scheme, i)) continue;
442
+ let end = i + scheme.length;
443
+ while (end < n && !URL_STOP.test(text[end])) end++;
444
+ return end > i + scheme.length ? end : -1;
445
+ }
446
+ return -1;
447
+ };
448
+ const parts = [];
449
+ let last = 0;
450
+ for (let i = 0; i < n; ) {
451
+ const end = matchAt(i);
452
+ if (end === -1) {
453
+ i++;
454
+ continue;
455
+ }
456
+ parts.push(text.slice(last, i), text.slice(i, end));
457
+ last = i = end;
458
+ }
459
+ parts.push(text.slice(last));
460
+ return parts;
461
+ }
360
462
  function stripMarkdownCode(content) {
361
463
  if (!content || typeof content !== "string") return "";
362
464
  let text = replaceDelimited(content, /```/g, "```");
@@ -407,7 +509,7 @@ function extractMentions(content, options = {}) {
407
509
  if (details) {
408
510
  const suffix = _chunkBVP3TSLHcjs.readRoleSuffix.call(void 0, textOnly, regex.lastIndex, options.roles);
409
511
  if (suffix) regex.lastIndex = suffix.end;
410
- const key = `${handle}\0${_nullishCoalesce(_optionalChain([suffix, 'optionalAccess', _13 => _13.role]), () => ( ""))}`;
512
+ const key = `${handle}\0${_nullishCoalesce(_optionalChain([suffix, 'optionalAccess', _16 => _16.role]), () => ( ""))}`;
411
513
  if (handle && !seen.has(key)) {
412
514
  seen.add(key);
413
515
  detailed.push(suffix ? { handle, role: suffix.role } : { handle });
@@ -467,7 +569,7 @@ function preprocessMarkdownMentions(content, optionsOrMentionables = []) {
467
569
  const allMentionables = options.mentionables || [];
468
570
  const defaultType = options.defaultType || "user";
469
571
  const resolveMention = options.resolveMention;
470
- const parts = content.split(MARKDOWN_MENTION_SPLIT_REGEX);
572
+ const parts = splitMarkdownMentionParts(content);
471
573
  return parts.map((part) => {
472
574
  if (!part) return "";
473
575
  if (part.startsWith("```") || part.startsWith("~~~") || part.startsWith("`") || part.startsWith("](") || /^(?:https?|file|vscode|cursor|mailto):\/\//i.test(part) || /^<pre[\s>]/i.test(part) || /^<code[\s>]/i.test(part) || /^<[^>]+>$/i.test(part) || /^<span\b[^>]*\b(?:data-type=["']mention["']|class=["'][^"']*pixerate-mention-node[^"']*["']|data-mention=["'][^"']*["'])/i.test(
@@ -483,25 +585,25 @@ function preprocessMarkdownMentions(content, optionsOrMentionables = []) {
483
585
  if (!rawHandle) return match2;
484
586
  const lowerHandle = rawHandle.toLowerCase();
485
587
  const entity = allMentionables.find((e) => {
486
- if (_optionalChain([e, 'access', _14 => _14.label, 'optionalAccess', _15 => _15.toLowerCase, 'call', _16 => _16()]) === lowerHandle) return true;
487
- if (_optionalChain([e, 'access', _17 => _17.handle, 'optionalAccess', _18 => _18.toLowerCase, 'call', _19 => _19()]) === lowerHandle) return true;
488
- if (_optionalChain([e, 'access', _20 => _20.name, 'optionalAccess', _21 => _21.toLowerCase, 'call', _22 => _22()]) === lowerHandle) return true;
489
- if (_optionalChain([e, 'access', _23 => _23.id, 'optionalAccess', _24 => _24.toLowerCase, 'call', _25 => _25()]) === lowerHandle) return true;
588
+ if (_optionalChain([e, 'access', _17 => _17.label, 'optionalAccess', _18 => _18.toLowerCase, 'call', _19 => _19()]) === lowerHandle) return true;
589
+ if (_optionalChain([e, 'access', _20 => _20.handle, 'optionalAccess', _21 => _21.toLowerCase, 'call', _22 => _22()]) === lowerHandle) return true;
590
+ if (_optionalChain([e, 'access', _23 => _23.name, 'optionalAccess', _24 => _24.toLowerCase, 'call', _25 => _25()]) === lowerHandle) return true;
591
+ if (_optionalChain([e, 'access', _26 => _26.id, 'optionalAccess', _27 => _27.toLowerCase, 'call', _28 => _28()]) === lowerHandle) return true;
490
592
  if (e.type === "agent" && `agent${(e.handle || e.label || "").toLowerCase()}` === lowerHandle) return true;
491
- if (_optionalChain([e, 'access', _26 => _26.aliases, 'optionalAccess', _27 => _27.some, 'call', _28 => _28(
593
+ if (_optionalChain([e, 'access', _29 => _29.aliases, 'optionalAccess', _30 => _30.some, 'call', _31 => _31(
492
594
  (a) => a.toLowerCase() === lowerHandle || e.type === "agent" && `agent${a.toLowerCase()}` === lowerHandle
493
595
  )])) {
494
596
  return true;
495
597
  }
496
598
  return false;
497
599
  });
498
- let id = _optionalChain([entity, 'optionalAccess', _29 => _29.id]);
499
- let label = _optionalChain([entity, 'optionalAccess', _30 => _30.label]) || _optionalChain([entity, 'optionalAccess', _31 => _31.handle]) || rawHandle;
500
- let type = _optionalChain([entity, 'optionalAccess', _32 => _32.type]);
501
- let avatarUrl = _optionalChain([entity, 'optionalAccess', _33 => _33.avatarUrl]);
502
- let color = _optionalChain([entity, 'optionalAccess', _34 => _34.color]) || _optionalChain([entity, 'optionalAccess', _35 => _35.hexColor]);
600
+ let id = _optionalChain([entity, 'optionalAccess', _32 => _32.id]);
601
+ let label = _optionalChain([entity, 'optionalAccess', _33 => _33.label]) || _optionalChain([entity, 'optionalAccess', _34 => _34.handle]) || rawHandle;
602
+ let type = _optionalChain([entity, 'optionalAccess', _35 => _35.type]);
603
+ let avatarUrl = _optionalChain([entity, 'optionalAccess', _36 => _36.avatarUrl]);
604
+ let color = _optionalChain([entity, 'optionalAccess', _37 => _37.color]) || _optionalChain([entity, 'optionalAccess', _38 => _38.hexColor]);
503
605
  if (!entity) {
504
- const customResolved = _optionalChain([resolveMention, 'optionalCall', _36 => _36(rawHandle)]);
606
+ const customResolved = _optionalChain([resolveMention, 'optionalCall', _39 => _39(rawHandle)]);
505
607
  if (customResolved) {
506
608
  id = _nullishCoalesce(customResolved.id, () => ( id));
507
609
  label = _nullishCoalesce(_nullishCoalesce(customResolved.label, () => ( customResolved.handle)), () => ( label));
@@ -544,7 +646,7 @@ function preprocessMarkdownMentions(content, optionsOrMentionables = []) {
544
646
  let match;
545
647
  while ((match = regex.exec(part)) !== null) {
546
648
  const suffix = _chunkBVP3TSLHcjs.readRoleSuffix.call(void 0, part, regex.lastIndex, options.roles);
547
- const rendered = render(match[0], match[1], match[2], match[3], _optionalChain([suffix, 'optionalAccess', _37 => _37.role]));
649
+ const rendered = render(match[0], match[1], match[2], match[3], _optionalChain([suffix, 'optionalAccess', _40 => _40.role]));
548
650
  if (suffix && rendered !== match[0]) regex.lastIndex = suffix.end;
549
651
  out += part.slice(last, match.index) + rendered;
550
652
  last = regex.lastIndex;
@@ -575,6 +677,8 @@ var ALLOWED_HTML_TAGS = /* @__PURE__ */ new Set([
575
677
  "blockquote",
576
678
  "br",
577
679
  "code",
680
+ "col",
681
+ "colgroup",
578
682
  "del",
579
683
  "details",
580
684
  "div",
@@ -589,6 +693,7 @@ var ALLOWED_HTML_TAGS = /* @__PURE__ */ new Set([
589
693
  "i",
590
694
  "img",
591
695
  "input",
696
+ "ins",
592
697
  "kbd",
593
698
  "li",
594
699
  "mark",
@@ -617,6 +722,7 @@ var ALLOWED_HTML_ATTRS = /* @__PURE__ */ new Set([
617
722
  "checked",
618
723
  "class",
619
724
  "colspan",
725
+ "colwidth",
620
726
  "disabled",
621
727
  "height",
622
728
  "href",
@@ -678,8 +784,8 @@ function sanitizeEmbeddedHtml(html, stripDisallowed = false) {
678
784
  }
679
785
  var defaultHtmlInline = md.renderer.rules.html_inline;
680
786
  var defaultHtmlBlock = md.renderer.rules.html_block;
681
- md.renderer.rules.html_inline = (tokens, idx, options, env, self) => _optionalChain([env, 'optionalAccess', _38 => _38.allowUnsafeHtml]) ? defaultHtmlInline(tokens, idx, options, env, self) : sanitizeEmbeddedHtml(tokens[idx].content);
682
- md.renderer.rules.html_block = (tokens, idx, options, env, self) => _optionalChain([env, 'optionalAccess', _39 => _39.allowUnsafeHtml]) ? defaultHtmlBlock(tokens, idx, options, env, self) : sanitizeEmbeddedHtml(tokens[idx].content);
787
+ md.renderer.rules.html_inline = (tokens, idx, options, env, self) => _optionalChain([env, 'optionalAccess', _41 => _41.allowUnsafeHtml]) ? defaultHtmlInline(tokens, idx, options, env, self) : sanitizeEmbeddedHtml(tokens[idx].content);
788
+ md.renderer.rules.html_block = (tokens, idx, options, env, self) => _optionalChain([env, 'optionalAccess', _42 => _42.allowUnsafeHtml]) ? defaultHtmlBlock(tokens, idx, options, env, self) : sanitizeEmbeddedHtml(tokens[idx].content);
683
789
  function preprocessMarkdownFileLinks(content) {
684
790
  if (!content) return "";
685
791
  return content.replace(
@@ -695,24 +801,24 @@ function preprocessMarkdownFileLinks(content) {
695
801
  function markdownToTipTapHtml(markdown, options) {
696
802
  if (!markdown) return "<p></p>";
697
803
  let content = markdown;
698
- if (_optionalChain([options, 'optionalAccess', _40 => _40.preprocessFileLinks])) {
804
+ if (_optionalChain([options, 'optionalAccess', _43 => _43.preprocessFileLinks])) {
699
805
  content = preprocessMarkdownFileLinks(content);
700
806
  }
701
- if (_optionalChain([options, 'optionalAccess', _41 => _41.preprocessMentions]) || _optionalChain([options, 'optionalAccess', _42 => _42.mentionables]) || _optionalChain([options, 'optionalAccess', _43 => _43.preprocessOptions])) {
807
+ if (_optionalChain([options, 'optionalAccess', _44 => _44.preprocessMentions]) || _optionalChain([options, 'optionalAccess', _45 => _45.mentionables]) || _optionalChain([options, 'optionalAccess', _46 => _46.preprocessOptions])) {
702
808
  const mentionOpts = options.preprocessOptions || {
703
809
  mentionables: options.mentionables
704
810
  };
705
811
  content = preprocessMarkdownMentions(content, mentionOpts);
706
812
  }
707
- return md.render(content, { allowUnsafeHtml: _optionalChain([options, 'optionalAccess', _44 => _44.allowUnsafeHtml]) });
813
+ return md.render(content, { allowUnsafeHtml: _optionalChain([options, 'optionalAccess', _47 => _47.allowUnsafeHtml]) });
708
814
  }
709
815
  function getEditorMarkdown(editor, options = {}) {
710
816
  if (!editor) return "";
711
- const markdown = _optionalChain([editor, 'access', _45 => _45.storage, 'optionalAccess', _46 => _46.markdown]);
712
- if (typeof _optionalChain([markdown, 'optionalAccess', _47 => _47.getMarkdown]) === "function") {
713
- const doc = _optionalChain([editor, 'access', _48 => _48.state, 'optionalAccess', _49 => _49.doc]);
714
- if (doc && typeof _optionalChain([markdown, 'access', _50 => _50.serializer, 'optionalAccess', _51 => _51.serialize]) === "function") {
715
- const resolved = _chunkX4N4WUKBcjs.resolveTrackedChanges.call(void 0, doc, _nullishCoalesce(options.trackedChanges, () => ( "accepted")));
817
+ const markdown = _optionalChain([editor, 'access', _48 => _48.storage, 'optionalAccess', _49 => _49.markdown]);
818
+ if (typeof _optionalChain([markdown, 'optionalAccess', _50 => _50.getMarkdown]) === "function") {
819
+ const doc = _optionalChain([editor, 'access', _51 => _51.state, 'optionalAccess', _52 => _52.doc]);
820
+ if (doc && typeof _optionalChain([markdown, 'access', _53 => _53.serializer, 'optionalAccess', _54 => _54.serialize]) === "function") {
821
+ const resolved = _chunkIFHKKVXHcjs.resolveTrackedChanges.call(void 0, doc, _nullishCoalesce(options.trackedChanges, () => ( "accepted")));
716
822
  if (resolved !== doc) return markdown.serializer.serialize(resolved);
717
823
  }
718
824
  return markdown.getMarkdown();
@@ -736,5 +842,6 @@ function getEditorMarkdown(editor, options = {}) {
736
842
 
737
843
 
738
844
 
739
- exports.MARKDOWN_MENTION_SPLIT_REGEX = MARKDOWN_MENTION_SPLIT_REGEX; exports.stripMarkdownCode = stripMarkdownCode; exports.extractMentions = extractMentions; exports.parseMentionSegments = parseMentionSegments; exports.preprocessMarkdownMentions = preprocessMarkdownMentions; exports.escapeHtml = escapeHtml; exports.plainTextToTipTapHtml = plainTextToTipTapHtml; exports.plainTextToSlice = plainTextToSlice; exports.htmlToPlainText = htmlToPlainText; exports.getEditorText = getEditorText; exports.extractMentionsFromDoc = extractMentionsFromDoc; exports.sanitizeHtml = sanitizeHtml; exports.preprocessMarkdownFileLinks = preprocessMarkdownFileLinks; exports.markdownToTipTapHtml = markdownToTipTapHtml; exports.getEditorMarkdown = getEditorMarkdown;
740
- //# sourceMappingURL=chunk-7WISYZFO.cjs.map
845
+
846
+ exports.MARKDOWN_MENTION_SPLIT_REGEX = MARKDOWN_MENTION_SPLIT_REGEX; exports.splitMarkdownMentionParts = splitMarkdownMentionParts; exports.stripMarkdownCode = stripMarkdownCode; exports.extractMentions = extractMentions; exports.parseMentionSegments = parseMentionSegments; exports.preprocessMarkdownMentions = preprocessMarkdownMentions; exports.escapeHtml = escapeHtml; exports.plainTextToTipTapHtml = plainTextToTipTapHtml; exports.plainTextToSlice = plainTextToSlice; exports.htmlToPlainText = htmlToPlainText; exports.getEditorText = getEditorText; exports.extractMentionsFromDoc = extractMentionsFromDoc; exports.sanitizeHtml = sanitizeHtml; exports.preprocessMarkdownFileLinks = preprocessMarkdownFileLinks; exports.markdownToTipTapHtml = markdownToTipTapHtml; exports.getEditorMarkdown = getEditorMarkdown;
847
+ //# sourceMappingURL=chunk-66IMF6OD.cjs.map