@docen/docx 0.3.1 → 0.3.2

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 (109) hide show
  1. package/dist/converters/docx.d.mts +199 -1
  2. package/dist/converters/docx.mjs +1273 -1
  3. package/dist/converters/html.d.mts +28 -1
  4. package/dist/converters/html.mjs +103 -1
  5. package/dist/converters/markdown.d.mts +12 -1
  6. package/dist/converters/markdown.mjs +17 -1
  7. package/dist/converters/patch.d.mts +52 -1
  8. package/dist/converters/patch.mjs +35 -1
  9. package/dist/converters/prepare.d.mts +62 -1
  10. package/dist/converters/prepare.mjs +121 -1
  11. package/dist/converters/styles.d.mts +84 -1
  12. package/dist/converters/styles.mjs +284 -1
  13. package/dist/core-C9VunJ8o.d.mts +174 -0
  14. package/dist/core-DT9IrTzN.mjs +670 -0
  15. package/dist/core.d.mts +1 -1
  16. package/dist/core.mjs +1 -1
  17. package/dist/editor.d.mts +20 -1
  18. package/dist/editor.mjs +20 -1
  19. package/dist/extensions/blockquote.d.mts +1 -1
  20. package/dist/extensions/blockquote.mjs +30 -2
  21. package/dist/extensions/code-block.d.mts +1 -1
  22. package/dist/extensions/code-block.mjs +22 -1
  23. package/dist/extensions/column-break.d.mts +1 -1
  24. package/dist/extensions/column-break.mjs +1 -1
  25. package/dist/extensions/details.d.mts +1 -1
  26. package/dist/extensions/details.mjs +17 -2
  27. package/dist/extensions/document.mjs +49 -1
  28. package/dist/extensions/extensions.d.mts +3 -4
  29. package/dist/extensions/extensions.mjs +13 -14
  30. package/dist/extensions/formatting-marks.d.mts +7 -1
  31. package/dist/extensions/formatting-marks.mjs +1 -1
  32. package/dist/extensions/heading.mjs +165 -1
  33. package/dist/extensions/image.d.mts +1 -1
  34. package/dist/extensions/image.mjs +395 -1
  35. package/dist/extensions/index.d.mts +3 -2
  36. package/dist/extensions/index.mjs +4 -3
  37. package/dist/extensions/mention.d.mts +1 -1
  38. package/dist/extensions/mention.mjs +43 -2
  39. package/dist/extensions/ordered-list.d.mts +1 -1
  40. package/dist/extensions/ordered-list.mjs +40 -2
  41. package/dist/extensions/page-break.d.mts +1 -33
  42. package/dist/extensions/page-break.mjs +1 -1
  43. package/dist/extensions/paragraph.mjs +150 -1
  44. package/dist/extensions/passthrough.d.mts +1 -1
  45. package/dist/extensions/passthrough.mjs +1 -1
  46. package/dist/extensions/section-break.d.mts +19 -2
  47. package/dist/extensions/section-break.mjs +1 -1
  48. package/dist/extensions/strike.mjs +49 -1
  49. package/dist/extensions/table-cell.mjs +111 -1
  50. package/dist/extensions/table-header.mjs +111 -1
  51. package/dist/extensions/table-row.mjs +83 -1
  52. package/dist/extensions/table.mjs +159 -1
  53. package/dist/extensions/task-item.d.mts +1 -1
  54. package/dist/extensions/task-item.mjs +36 -2
  55. package/dist/extensions/text-style.mjs +150 -1
  56. package/dist/extensions/tiptap.d.mts +2 -2
  57. package/dist/extensions/tiptap.mjs +31 -2
  58. package/dist/extensions/utils.d.mts +2 -62
  59. package/dist/extensions/utils.mjs +499 -2
  60. package/dist/extensions/wpg-group.d.mts +2 -0
  61. package/dist/extensions/wpg-group.mjs +2 -0
  62. package/dist/extensions/wps-shape.d.mts +2 -0
  63. package/dist/extensions/wps-shape.mjs +2 -0
  64. package/dist/index.d.mts +86 -27
  65. package/dist/index.mjs +13 -10
  66. package/dist/{tiptap-TErPjuNJ.d.mts → tiptap-pZsNPsvV.d.mts} +1 -3
  67. package/dist/utils-D87vukzp.d.mts +128 -0
  68. package/package.json +39 -40
  69. package/dist/blockquote-Ky9xD_Q-.mjs +0 -31
  70. package/dist/code-block-BgNjhADy.mjs +0 -23
  71. package/dist/core-DEqBHRzE.mjs +0 -406
  72. package/dist/core-fBMCCj4D.d.mts +0 -97
  73. package/dist/details-Dh8luWb2.mjs +0 -18
  74. package/dist/dist-B6B3HnVZ.mjs +0 -1838
  75. package/dist/document-CvTym-FM.mjs +0 -50
  76. package/dist/docx-C5wyjI-0.d.mts +0 -200
  77. package/dist/docx-CONyAedl.mjs +0 -1231
  78. package/dist/editor-Bf3CxQnY.mjs +0 -21
  79. package/dist/editor-DReY3Rb9.d.mts +0 -21
  80. package/dist/emoji-BZ1dJD7d.d.mts +0 -17
  81. package/dist/emoji-C2OsTWR7.mjs +0 -27
  82. package/dist/extensions/emoji.d.mts +0 -2
  83. package/dist/extensions/emoji.mjs +0 -2
  84. package/dist/extensions/image-group.d.mts +0 -6
  85. package/dist/extensions/image-group.mjs +0 -2
  86. package/dist/heading-DAubgJJN.mjs +0 -166
  87. package/dist/html-DCC_DSHv.d.mts +0 -18
  88. package/dist/html-DedDWPoO.mjs +0 -66
  89. package/dist/image-CuEIXoZl.mjs +0 -334
  90. package/dist/markdown-BzJmRsBs.mjs +0 -18
  91. package/dist/markdown-D0k0sRYS.d.mts +0 -13
  92. package/dist/mention-C-dTR6MK.mjs +0 -44
  93. package/dist/ordered-list-V-3xFQmV.mjs +0 -41
  94. package/dist/paragraph-BrWH-BOV.mjs +0 -147
  95. package/dist/patch-Cdp5WKJz.d.mts +0 -53
  96. package/dist/patch-IZ13tXTu.mjs +0 -36
  97. package/dist/prepare-Bdk8Cjkf.mjs +0 -122
  98. package/dist/prepare-CPAvcv6q.d.mts +0 -63
  99. package/dist/strike-hWxShOgb.mjs +0 -50
  100. package/dist/styles-QSX3RhxK.mjs +0 -285
  101. package/dist/styles-ugspkrxz.d.mts +0 -85
  102. package/dist/table-DrA12lxX.mjs +0 -159
  103. package/dist/table-cell-DmkfYwDc.mjs +0 -112
  104. package/dist/table-header-Bwr5GKWg.mjs +0 -112
  105. package/dist/table-row-vew1y7WH.mjs +0 -84
  106. package/dist/task-item-BnlXGrIG.mjs +0 -37
  107. package/dist/text-style-tMeBq5XQ.mjs +0 -151
  108. package/dist/tiptap-D7pl4I5U.mjs +0 -33
  109. package/dist/utils-BPT4tjcn.mjs +0 -333
package/dist/index.d.mts CHANGED
@@ -1,14 +1,16 @@
1
1
  import { n as createDocument, t as Document } from "./document-BH1y4qHM.mjs";
2
- import { a as JSONContent, c as DocxKit, d as docxExtensions, f as tiptapMarkExtensions, l as DocxKitOptions, p as tiptapNodeExtensions, t as AnyExtension } from "./core-fBMCCj4D.mjs";
3
- import { i as prepareDocument, n as PrepareStep, o as prepareImages, r as fetchImageHandler, t as ImageFetchHandler } from "./prepare-CPAvcv6q.mjs";
4
- import { a as generateDOCX, c as parseDOCX, i as compileDocument, l as resolveDocument, n as DocxGenerateOptions, o as generateDOCXStream, r as DocxManager, s as generateDOCXSync } from "./docx-C5wyjI-0.mjs";
5
- import { n as parseHTML, t as generateHTML } from "./html-DCC_DSHv.mjs";
6
- import { n as parseMarkdown, t as generateMarkdown } from "./markdown-D0k0sRYS.mjs";
7
- import { n as DocxPatchOptions, r as patchDOCX, t as DocxPatchContent } from "./patch-Cdp5WKJz.mjs";
8
- import { a as inlineStyles, i as effectiveRunProps, n as StylesOptions, o as quickStyles, s as stylesToCss, t as QuickStyleEntry } from "./styles-ugspkrxz.mjs";
9
- import { n as createDocxEditor, t as DocxEditorOptions } from "./editor-DReY3Rb9.mjs";
2
+ import { a as JSONContent, c as PageBreak, f as docxExtensions, l as DocxKit, m as tiptapNodeExtensions, p as tiptapMarkExtensions, t as AnyExtension, u as DocxKitOptions } from "./core-C9VunJ8o.mjs";
3
+ import { b as sectionLinePitchCss, k as twipsToMm, v as resolveFontName, x as sectionMarginCss, y as resolvePageSize } from "./utils-D87vukzp.mjs";
4
+ import { ImageFetchHandler, PrepareStep, fetchImageHandler, prepareDocument, prepareImages } from "./converters/prepare.mjs";
5
+ import { DocxGenerateOptions, DocxManager, compileDocument, generateDOCX, generateDOCXStream, generateDOCXSync, parseDOCX, resolveDocument } from "./converters/docx.mjs";
6
+ import { generateHTML, parseHTML } from "./converters/html.mjs";
7
+ import { generateMarkdown, parseMarkdown } from "./converters/markdown.mjs";
8
+ import { DocxPatchContent, DocxPatchOptions, patchDOCX } from "./converters/patch.mjs";
9
+ import { QuickStyleEntry, StylesOptions, effectiveRunProps, inlineStyles, quickStyles, stylesToCss } from "./converters/styles.mjs";
10
+ import { DocxEditorOptions, createDocxEditor } from "./editor.mjs";
10
11
  import { JSONContent as TiptapJSONContent } from "@tiptap/core";
11
- import { AlignmentType, BookmarkOptions, BorderOptions, BordersOptions, DocumentOptions, EmphasisMarkType, ExternalHyperlinkOptions, Floating, Floating as Floating$1, FontAttributesProperties, FrameOptions, HeadingLevel, HeightRule, HighlightColor, ImageChild, ImageOptions, ImageOptions as ImageOptions$1, IndentAttributesProperties, InternalHyperlinkOptions, LeaderType, LevelParagraphStylePropertiesOptions, LineRuleType, Margins, MathChild, MathInput, MediaTransformation, ParagraphChild, ParagraphOptions, ParagraphPropertiesOptions, ParagraphPropertiesOptionsBase, ParagraphRunPropertiesOptions, ParagraphStylePropertiesOptions, RubyOptions, RunOptions, RunPropertiesOptions, RunStylePropertiesOptions, SectionChild, SectionOptions, SectionPropertiesOptions, ShadingAttributesProperties, SpacingProperties, TabStopDefinition, TabStopPosition, TabStopType, TableBordersOptions, TableCellBordersOptions, TableCellOptions, TableFloatOptions, TableLayoutType, TableLookOptions, TableOptions, TableRowOptions, TableRowPropertiesOptionsBase, TableVerticalAlign, TableWidthProperties, TextAlignmentType, UnderlineType, WidthType } from "@office-open/docx";
12
+ import { AlignmentType, BookmarkOptions, BorderOptions, BordersOptions, DocumentOptions, EmphasisMarkType, ExternalHyperlinkOptions, Floating, Floating as Floating$1, FontAttributesProperties, FrameOptions, HeadingLevel, HeightRule, HighlightColor, ImageOptions, ImageOptions as ImageOptions$1, IndentAttributesProperties, InternalHyperlinkOptions, LeaderType, LevelParagraphStylePropertiesOptions, LineRuleType, Margins, MathInput, MediaTransformation, ParagraphChild, ParagraphOptions, ParagraphPropertiesOptions, ParagraphPropertiesOptionsBase, ParagraphRunPropertiesOptions, ParagraphStylePropertiesOptions, RubyOptions, RunOptions, RunPropertiesOptions, RunStylePropertiesOptions, SectionChild, SectionOptions, SectionPropertiesOptions, SectionPropertiesOptions as SectionPropertiesOptions$1, ShadingAttributesProperties, SpacingProperties, TabStopDefinition, TabStopPosition, TabStopType, TableBordersOptions, TableCellBordersOptions, TableCellOptions, TableFloatOptions, TableLayoutType, TableLookOptions, TableOptions, TableRowOptions, TableRowPropertiesOptionsBase, TableVerticalAlign, TableWidthProperties, TextAlignmentType, UnderlineType, WidthType, sectionMarginDefaults, sectionPageSizeDefaults } from "@office-open/docx";
13
+ import { convertMillimetersToTwip } from "@office-open/core";
12
14
 
13
15
  //#region src/types.d.ts
14
16
  /**
@@ -17,19 +19,44 @@ import { AlignmentType, BookmarkOptions, BorderOptions, BordersOptions, Document
17
19
  */
18
20
  type AttrNullable<T> = { [K in keyof T]-?: T[K] | null };
19
21
  /**
20
- * Paragraph and heading attrs — mirrors ParagraphPropertiesOptionsBase.
22
+ * Paragraph and heading attrs — mirrors ParagraphPropertiesOptionsBase, plus
23
+ * engine-only extras the office-open paragraph interface does not carry:
24
+ * styleId (OOXML pStyle, drives styles.xml CSS) and the section* attrs (OOXML
25
+ * sectPr lives on a section's last paragraph, so the engine hauls the section
26
+ * boundary + its header/footer slots on that paragraph).
21
27
  *
22
28
  * indent/spacing/border/run/frame are nested objects (matching office-open),
23
29
  * so one `indent` attr replaces 13 flattened indent attrs.
24
30
  */
25
- type ParagraphAttrs = AttrNullable<ParagraphPropertiesOptionsBase>;
31
+ type ParagraphAttrs = AttrNullable<ParagraphPropertiesOptionsBase> & {
32
+ styleId: string | null;
33
+ sectionProperties: SectionPropertiesOptions$1 | null;
34
+ sectionHeaders: HeaderFooterSlots | null;
35
+ sectionFooters: HeaderFooterSlots | null;
36
+ };
26
37
  /**
27
38
  * Text style mark attrs — mirrors RunStylePropertiesOptions.
28
39
  *
29
40
  * Omits properties handled by dedicated marks (bold, italic, strike,
30
41
  * doubleStrike, subScript, superScript). `size` is in POINTS.
31
42
  */
32
- type TextStyleAttrs = AttrNullable<Omit<RunStylePropertiesOptions, "bold" | "boldComplexScript" | "italic" | "italicComplexScript" | "strike" | "doubleStrike" | "subScript" | "superScript">>;
43
+ type TextStyleAttrs = AttrNullable<Omit<RunStylePropertiesOptions, "bold" | "boldComplexScript" | "italic" | "italicComplexScript" | "strike" | "doubleStrike" | "subScript" | "superScript">> & {
44
+ /** Named character style id (OOXML rStyle). Engine-only extra. */styleId: string | null;
45
+ };
46
+ /**
47
+ * Mention node attrs (official @tiptap/extension-mention).
48
+ */
49
+ interface MentionAttrs {
50
+ id: string | null;
51
+ label: string | null;
52
+ }
53
+ /**
54
+ * Mathematics node attrs (official @tiptap/extension-mathematics).
55
+ * Applies to both blockMath (block) and inlineMath (inline).
56
+ */
57
+ interface MathAttrs {
58
+ latex: string;
59
+ }
33
60
  /**
34
61
  * Link mark attrs.
35
62
  */
@@ -92,13 +119,11 @@ interface ImageAttrs {
92
119
  runPropertiesRawXml: string | null;
93
120
  }
94
121
  /**
95
- * Emoji node attrs.
96
- * `name` is the shortcode (base @tiptap/extension-emoji); `emoji` is the
97
- * resolved glyph cached for DOCX export (null when only the shortcode is known).
122
+ * Emoji node attrs. `name` is the shortcode (base @tiptap/extension-emoji); the
123
+ * glyph is resolved from the emoji dataset at DOCX-compile time.
98
124
  */
99
125
  interface EmojiAttrs {
100
126
  name: string | null;
101
- emoji: string | null;
102
127
  }
103
128
  /**
104
129
  * Strike mark attrs.
@@ -145,7 +170,7 @@ type Mark = {
145
170
  interface ParagraphNode extends TiptapJSONContent {
146
171
  type: "paragraph";
147
172
  attrs?: ParagraphAttrs;
148
- content?: Array<TextNode | HardBreakNode | ImageNode | EmojiNode>;
173
+ content?: InlineContent[];
149
174
  }
150
175
  interface HeadingNode extends TiptapJSONContent {
151
176
  type: "heading";
@@ -185,9 +210,7 @@ interface BulletListNode extends TiptapJSONContent {
185
210
  interface OrderedListNode extends TiptapJSONContent {
186
211
  type: "orderedList";
187
212
  attrs?: {
188
- start?: number;
189
- order?: number;
190
- type?: string | null;
213
+ start?: number | null;
191
214
  };
192
215
  content?: Array<ListItemNode>;
193
216
  }
@@ -232,19 +255,55 @@ interface ImageNode extends TiptapJSONContent {
232
255
  }
233
256
  /**
234
257
  * Drawing group (wpg) carried as an opaque blob — the full WpgGroupRunOptions
235
- * (pictures/shapes/nested groups + transform) round-trips verbatim. The editor
236
- * doesn't model the group interior; renderHTML paints the first picture only.
258
+ * (pictures/shapes/nested groups + transform) round-trips verbatim. renderHTML
259
+ * lays out every child at its transformed position (Word-style group rendering).
237
260
  */
238
- interface ImageGroupNode extends TiptapJSONContent {
239
- type: "imageGroup";
261
+ interface WpgGroupNode extends TiptapJSONContent {
262
+ type: "wpgGroup";
240
263
  attrs?: {
241
264
  wpgGroup: Record<string, unknown> | null;
242
265
  };
243
266
  }
267
+ /**
268
+ * Standalone floating text-box shape (wp:anchor > wps:wsp) carried as an opaque
269
+ * blob — the full WpsShapeRunOptions round-trips verbatim. Unlike the group's
270
+ * interior wps children, this shape floats on its own anchor and renders via the
271
+ * shared wps interior renderer.
272
+ */
273
+ interface WpsShapeNode extends TiptapJSONContent {
274
+ type: "wpsShape";
275
+ attrs?: {
276
+ wpsShape: Record<string, unknown> | null;
277
+ };
278
+ }
244
279
  interface EmojiNode extends TiptapJSONContent {
245
280
  type: "emoji";
246
281
  attrs?: EmojiAttrs;
247
282
  }
283
+ interface PageBreakNode extends TiptapJSONContent {
284
+ type: "pageBreak";
285
+ }
286
+ interface ColumnBreakNode extends TiptapJSONContent {
287
+ type: "columnBreak";
288
+ }
289
+ interface MentionNode extends TiptapJSONContent {
290
+ type: "mention";
291
+ attrs?: MentionAttrs;
292
+ }
293
+ interface InlineMathNode extends TiptapJSONContent {
294
+ type: "inlineMath";
295
+ attrs?: MathAttrs;
296
+ }
297
+ interface BlockMathNode extends TiptapJSONContent {
298
+ type: "blockMath";
299
+ attrs?: MathAttrs;
300
+ }
301
+ interface PassthroughNode extends TiptapJSONContent {
302
+ type: "passthrough";
303
+ attrs?: {
304
+ data: string;
305
+ };
306
+ }
248
307
  interface DetailsNode extends TiptapJSONContent {
249
308
  type: "details";
250
309
  content?: Array<DetailsSummaryNode | DetailsContentNode>;
@@ -257,7 +316,7 @@ interface DetailsContentNode extends TiptapJSONContent {
257
316
  type: "detailsContent";
258
317
  content?: Array<BlockNode>;
259
318
  }
260
- type InlineContent = TextNode | HardBreakNode;
261
- type BlockNode = ParagraphNode | HeadingNode | BlockquoteNode | CodeBlockNode | HorizontalRuleNode | BulletListNode | OrderedListNode | TaskListNode | TableNode | ImageNode | DetailsNode;
319
+ type InlineContent = TextNode | HardBreakNode | ImageNode | EmojiNode | PageBreakNode | ColumnBreakNode | MentionNode | InlineMathNode;
320
+ type BlockNode = ParagraphNode | HeadingNode | BlockquoteNode | CodeBlockNode | HorizontalRuleNode | BulletListNode | OrderedListNode | TaskListNode | TableNode | WpsShapeNode | WpgGroupNode | DetailsNode | PassthroughNode | BlockMathNode;
262
321
  //#endregion
263
- export { type AlignmentType, type AnyExtension, type AttrNullable, type BlockNode, type BlockquoteNode, type BookmarkOptions, type BorderOptions, type BordersOptions, type BulletListNode, type CodeBlockNode, type DetailsContentNode, type DetailsNode, type DetailsSummaryNode, Document, type DocumentOptions, type DocxEditorOptions, type DocxGenerateOptions, DocxKit, type DocxKitOptions, DocxManager, type DocxPatchContent, type DocxPatchOptions, type EmojiAttrs, type EmojiNode, type EmphasisMarkType, type ExternalHyperlinkOptions, type Floating, type FontAttributesProperties, type FrameOptions, type HardBreakNode, type HeaderFooterSlots, type HeadingLevel, type HeadingNode, type HeightRule, type HighlightColor, type HorizontalRuleNode, type ImageAttrs, type ImageChild, type ImageFetchHandler, type ImageGroupNode, type ImageNode, type ImageOptions, type IndentAttributesProperties, type InlineContent, type InternalHyperlinkOptions, type JSONContent, type LeaderType, type LevelParagraphStylePropertiesOptions, type LineRuleType, type LinkAttrs, type ListItemNode, type Margins, type Mark, type MathChild, type MathInput, type MediaTransformation, type OrderedListNode, type ParagraphAttrs, type ParagraphChild, type ParagraphNode, type ParagraphOptions, type ParagraphPropertiesOptions, type ParagraphPropertiesOptionsBase, type ParagraphRunPropertiesOptions, type ParagraphStylePropertiesOptions, type PrepareStep, type QuickStyleEntry, type RubyOptions, type RunOptions, type RunPropertiesOptions, type RunStylePropertiesOptions, type SectionChild, type SectionOptions, type SectionPropertiesOptions, type ShadingAttributesProperties, type SpacingProperties, type StrikeAttrs, type StylesOptions, type TabStopDefinition, type TabStopPosition, type TabStopType, type TableAttrs, type TableBordersOptions, type TableCellAttrs, type TableCellBordersOptions, type TableCellNode, type TableCellOptions, type TableFloatOptions, type TableHeaderNode, type TableLayoutType, type TableLookOptions, type TableNode, type TableOptions, type TableRowAttrs, type TableRowNode, type TableRowOptions, type TableRowPropertiesOptionsBase, type TableVerticalAlign, type TableWidthProperties, type TaskItemNode, type TaskListNode, type TextAlignmentType, type TextNode, type TextStyleAttrs, type UnderlineType, type WidthType, compileDocument, createDocument, createDocxEditor, docxExtensions, effectiveRunProps, fetchImageHandler, generateDOCX, generateDOCXStream, generateDOCXSync, generateHTML, generateMarkdown, inlineStyles, parseDOCX, parseHTML, parseMarkdown, patchDOCX, prepareDocument, prepareImages, quickStyles, resolveDocument, stylesToCss, tiptapMarkExtensions, tiptapNodeExtensions };
322
+ export { type AlignmentType, type AnyExtension, type AttrNullable, type BlockMathNode, type BlockNode, type BlockquoteNode, type BookmarkOptions, type BorderOptions, type BordersOptions, type BulletListNode, type CodeBlockNode, type ColumnBreakNode, type DetailsContentNode, type DetailsNode, type DetailsSummaryNode, Document, type DocumentOptions, type DocxEditorOptions, type DocxGenerateOptions, DocxKit, type DocxKitOptions, DocxManager, type DocxPatchContent, type DocxPatchOptions, type EmojiAttrs, type EmojiNode, type EmphasisMarkType, type ExternalHyperlinkOptions, type Floating, type FontAttributesProperties, type FrameOptions, type HardBreakNode, type HeaderFooterSlots, type HeadingLevel, type HeadingNode, type HeightRule, type HighlightColor, type HorizontalRuleNode, type ImageAttrs, type ImageFetchHandler, type ImageNode, type ImageOptions, type IndentAttributesProperties, type InlineContent, type InlineMathNode, type InternalHyperlinkOptions, type JSONContent, type LeaderType, type LevelParagraphStylePropertiesOptions, type LineRuleType, type LinkAttrs, type ListItemNode, type Margins, type Mark, type MathAttrs, type MathInput, type MediaTransformation, type MentionAttrs, type MentionNode, type OrderedListNode, PageBreak, type PageBreakNode, type ParagraphAttrs, type ParagraphChild, type ParagraphNode, type ParagraphOptions, type ParagraphPropertiesOptions, type ParagraphPropertiesOptionsBase, type ParagraphRunPropertiesOptions, type ParagraphStylePropertiesOptions, type PassthroughNode, type PrepareStep, type QuickStyleEntry, type RubyOptions, type RunOptions, type RunPropertiesOptions, type RunStylePropertiesOptions, type SectionChild, type SectionOptions, type SectionPropertiesOptions, type ShadingAttributesProperties, type SpacingProperties, type StrikeAttrs, type StylesOptions, type TabStopDefinition, type TabStopPosition, type TabStopType, type TableAttrs, type TableBordersOptions, type TableCellAttrs, type TableCellBordersOptions, type TableCellNode, type TableCellOptions, type TableFloatOptions, type TableHeaderNode, type TableLayoutType, type TableLookOptions, type TableNode, type TableOptions, type TableRowAttrs, type TableRowNode, type TableRowOptions, type TableRowPropertiesOptionsBase, type TableVerticalAlign, type TableWidthProperties, type TaskItemNode, type TaskListNode, type TextAlignmentType, type TextNode, type TextStyleAttrs, type UnderlineType, type WidthType, type WpgGroupNode, type WpsShapeNode, compileDocument, convertMillimetersToTwip, createDocument, createDocxEditor, docxExtensions, effectiveRunProps, fetchImageHandler, generateDOCX, generateDOCXStream, generateDOCXSync, generateHTML, generateMarkdown, inlineStyles, parseDOCX, parseHTML, parseMarkdown, patchDOCX, prepareDocument, prepareImages, quickStyles, resolveDocument, resolveFontName, resolvePageSize, sectionLinePitchCss, sectionMarginCss, sectionMarginDefaults, sectionPageSizeDefaults, stylesToCss, tiptapMarkExtensions, tiptapNodeExtensions, twipsToMm };
package/dist/index.mjs CHANGED
@@ -1,10 +1,13 @@
1
- import { a as DocxKit, c as tiptapMarkExtensions, l as tiptapNodeExtensions, s as docxExtensions } from "./core-DEqBHRzE.mjs";
2
- import { n as createDocument, t as Document } from "./document-CvTym-FM.mjs";
3
- import { t as createDocxEditor } from "./editor-Bf3CxQnY.mjs";
4
- import { i as prepareImages, n as prepareDocument, t as fetchImageHandler } from "./prepare-Bdk8Cjkf.mjs";
5
- import { a as generateDOCXSync, i as generateDOCXStream, n as compileDocument, o as parseDOCX, r as generateDOCX, s as resolveDocument, t as DocxManager } from "./docx-CONyAedl.mjs";
6
- import { t as patchDOCX } from "./patch-IZ13tXTu.mjs";
7
- import { n as parseHTML, t as generateHTML } from "./html-DedDWPoO.mjs";
8
- import { n as parseMarkdown, t as generateMarkdown } from "./markdown-BzJmRsBs.mjs";
9
- import { a as stylesToCss, i as quickStyles, n as effectiveRunProps, r as inlineStyles } from "./styles-QSX3RhxK.mjs";
10
- export { Document, DocxKit, DocxManager, compileDocument, createDocument, createDocxEditor, docxExtensions, effectiveRunProps, fetchImageHandler, generateDOCX, generateDOCXStream, generateDOCXSync, generateHTML, generateMarkdown, inlineStyles, parseDOCX, parseHTML, parseMarkdown, patchDOCX, prepareDocument, prepareImages, quickStyles, resolveDocument, stylesToCss, tiptapMarkExtensions, tiptapNodeExtensions };
1
+ import { a as DocxKit, c as tiptapMarkExtensions, g as PageBreak, l as tiptapNodeExtensions, s as docxExtensions } from "./core-DT9IrTzN.mjs";
2
+ import { Document, createDocument } from "./extensions/document.mjs";
3
+ import { resolveFontName, resolvePageSize, sectionLinePitchCss, sectionMarginCss, twipsToMm } from "./extensions/utils.mjs";
4
+ import { createDocxEditor } from "./editor.mjs";
5
+ import { fetchImageHandler, prepareDocument, prepareImages } from "./converters/prepare.mjs";
6
+ import { DocxManager, compileDocument, generateDOCX, generateDOCXStream, generateDOCXSync, parseDOCX, resolveDocument } from "./converters/docx.mjs";
7
+ import { patchDOCX } from "./converters/patch.mjs";
8
+ import { generateHTML, parseHTML } from "./converters/html.mjs";
9
+ import { generateMarkdown, parseMarkdown } from "./converters/markdown.mjs";
10
+ import { effectiveRunProps, inlineStyles, quickStyles, stylesToCss } from "./converters/styles.mjs";
11
+ import { sectionMarginDefaults, sectionPageSizeDefaults } from "@office-open/docx";
12
+ import { convertMillimetersToTwip } from "@office-open/core";
13
+ export { Document, DocxKit, DocxManager, PageBreak, compileDocument, convertMillimetersToTwip, createDocument, createDocxEditor, docxExtensions, effectiveRunProps, fetchImageHandler, generateDOCX, generateDOCXStream, generateDOCXSync, generateHTML, generateMarkdown, inlineStyles, parseDOCX, parseHTML, parseMarkdown, patchDOCX, prepareDocument, prepareImages, quickStyles, resolveDocument, resolveFontName, resolvePageSize, sectionLinePitchCss, sectionMarginCss, sectionMarginDefaults, sectionPageSizeDefaults, stylesToCss, tiptapMarkExtensions, tiptapNodeExtensions, twipsToMm };
@@ -28,6 +28,4 @@ import { Subscript } from "@tiptap/extension-subscript";
28
28
  import { Superscript } from "@tiptap/extension-superscript";
29
29
  import { TextStyle } from "@tiptap/extension-text-style";
30
30
  import { TextAlign } from "@tiptap/extension-text-align";
31
- import { Dropcursor, Gapcursor, TrailingNode, UndoRedo } from "@tiptap/extensions";
32
- import { ListKeymap } from "@tiptap/extension-list";
33
- export { TableCell as A, UndoRedo as B, Mention as C, Subscript as D, Strike as E, Text as F, TextAlign as I, TextStyle as L, TableRow as M, TaskItem as N, Superscript as O, TaskList as P, TrailingNode as R, Mathematics as S, Paragraph as T, Image as _, CodeBlockLowlight as a, ListItem as b, DetailsSummary as c, Emoji as d, Gapcursor as f, HorizontalRule as g, Highlight as h, Code as i, TableHeader as j, Table as k, Document as l, Heading as m, Bold as n, Details as o, HardBreak as p, BulletList as r, DetailsContent as s, Blockquote as t, Dropcursor as u, Italic as v, OrderedList as w, ListKeymap as x, Link as y, Underline as z };
31
+ export { TaskItem as A, Strike as C, TableCell as D, Table as E, Underline as F, Text as M, TextAlign as N, TableHeader as O, TextStyle as P, Paragraph as S, Superscript as T, Link as _, CodeBlockLowlight as a, Mention as b, DetailsSummary as c, HardBreak as d, Heading as f, Italic as g, Image as h, Code as i, TaskList as j, TableRow as k, Document as l, HorizontalRule as m, Bold as n, Details as o, Highlight as p, BulletList as r, DetailsContent as s, Blockquote as t, Emoji as u, ListItem as v, Subscript as w, OrderedList as x, Mathematics as y };
@@ -0,0 +1,128 @@
1
+ import { BorderOptions, BordersOptions, IndentAttributesProperties, ShadingAttributesProperties, SpacingProperties } from "@office-open/docx";
2
+
3
+ //#region src/extensions/utils.d.ts
4
+ /** Normalize a CSS color value to hex (e.g., "red" → "#FF0000", "#ff0000" → "#FF0000").
5
+ * Accepts a string (CSS name/hex or bare OOXML hex), or an OOXML ColorOptions
6
+ * object ({ val, themeColor, themeTint, themeShade }) — the object form
7
+ * resolves to its val (the RGB fallback Word stores alongside themeColor) for
8
+ * CSS rendering. The themeColor/tint/shade are preserved verbatim in the attrs
9
+ * and round-trip back to the DOCX (see text-style/paragraph parseDocx), so
10
+ * theme semantics survive even though only val is rendered here. A pure theme
11
+ * reference with no val (rare — Word usually stores both) would need theme.xml
12
+ * to resolve and is left unset. */
13
+ declare function normalizeColorToHex(color: unknown): string | undefined;
14
+ /** Resolve a font value (string or OOXML rFonts { ascii, eastAsia, hAnsi, cs }) to a CSS family name. */
15
+ declare function resolveFontName(font: unknown): string | null;
16
+ /** Resolve a font value to a CSS font-family list with an eastAsia fallback.
17
+ * Mirrors Word's per-Unicode-range font selection (MS-OE376): Basic Latin uses
18
+ * the ascii font, CJK Ideographs use eastAsia. CSS can't split a run by range,
19
+ * so list ascii first (it carries Basic Latin glyphs) then eastAsia — the
20
+ * browser falls back to eastAsia for CJK chars the ascii font lacks. Without
21
+ * this, CJK text renders in the ascii font (e.g. Times) instead of the
22
+ * document's CJK font (e.g. SimSun). Use this for font-family rendering;
23
+ * resolveFontName (single name) stays for UI/parse. */
24
+ declare function resolveFontFamilyCss(font: unknown): string | null;
25
+ /** CSS value (e.g., "18pt") → twip number. 1 pt = 20 twips, 1 px = 15 twips (96 DPI). */
26
+ declare function cssToTwip(value: string | undefined): number | undefined;
27
+ /** Twip value → CSS string (e.g., 360 → "18pt"). */
28
+ declare function twipToCss(value: number | string | undefined): string | null;
29
+ /** OOXML alignment → CSS text-align. */
30
+ declare function alignmentToCss(alignment: string | null | undefined): string | null;
31
+ /** CSS text-align → OOXML alignment. */
32
+ declare function alignmentFromCss(css: string | null | undefined): string | null;
33
+ /** Shading.fill → CSS background-color hex. */
34
+ declare function shadingToCss(shading: ShadingAttributesProperties | null | undefined): string | null;
35
+ /** CSS background-color → ShadingAttributesProperties (fill normalized to hex). */
36
+ declare function shadingFromCss(css: string | null | undefined): ShadingAttributesProperties | null;
37
+ declare function lineSpacingToCss(spacing: SpacingProperties | null | undefined, snapToGrid?: boolean | null): string | null;
38
+ /** twips → mm (1 in = 1440 tw = 25.4 mm), 2dp string. */
39
+ declare function twipsToMm(twips: number): string;
40
+ /** Resolve a section's printable page dimensions (twips), honoring orientation.
41
+ * A landscape section commonly stores portrait dims (w<h) with
42
+ * `orientation: "landscape"` — swap width/height so width is the larger edge.
43
+ * Falls back to the engine's default page size (@office-open/docx
44
+ * `sectionPageSizeDefaults` = A4) when the size is absent or non-numeric — the
45
+ * engine's `stringifySectionPropertiesXml` fills an empty sectPr the same way,
46
+ * so edit-time geometry matches render/measure/generate/export. */
47
+ declare function resolvePageSize(size: unknown): {
48
+ width: number;
49
+ height: number;
50
+ };
51
+ /** Page margin (twips) → CSS padding. Sides absent or non-numeric fall back to
52
+ * the engine's default margins (@office-open/docx `sectionMarginDefaults`:
53
+ * top/bottom 1440tw, left/right 1800tw — MS Office zh-CN "Normal"), matching
54
+ * the page-size fallback above and the engine's empty-sectPr behavior. Margins
55
+ * are left as-is: office-open returns them already rotated for a landscape
56
+ * section. */
57
+ declare function sectionMarginCss(margin: unknown): string;
58
+ /** Document grid linePitch (twips) → container CSS line-height.
59
+ * Per ECMA-376 snapToGrid, the grid linePitch is ADDED to each line (single-
60
+ * line paragraphs inherit it). So the container line-height (inherited by
61
+ * paragraphs without their own spacing) is the font's `normal` metric + the
62
+ * grid pitch, set only when the grid type enables line-snapping (not
63
+ * "default"). The --docen-line-pitch var carries the pitch so per-paragraph
64
+ * lineSpacingToCss can add the same pitch; --docen-font-metric is injected per
65
+ * paragraph by the editor; 1.2 is the fallback for static HTML export. */
66
+ declare function sectionLinePitchCss(grid: unknown): string[];
67
+ declare function sizeToCss(size: number | null | undefined): string | null;
68
+ declare function sizeFromCss(css: string | null | undefined): number | null;
69
+ declare function characterSpacingToCss(spacing: number | null | undefined): string | null;
70
+ declare function characterSpacingFromCss(css: string | null | undefined): number | null;
71
+ /** Render a BorderOptions to CSS string. OOXML border.size is in eighths of a point. */
72
+ declare function renderBorderCSS(border: BorderOptions): string | null;
73
+ /**
74
+ * Render a drawing's Floating anchor (wp:anchor) to CSS — shared by Image and
75
+ * WpgGroup so anchored drawings render consistently:
76
+ * - wrapNone (type 0): position:absolute at the EMU offset (text does not flow
77
+ * around it — "in front of text" / "behind text"); z-index lifts it above or
78
+ * below the text layer per behindDocument.
79
+ * - topAndBottom (3): float + clear:both.
80
+ * - square/tight/through (1/2/4): with an hPos.offset, float:right pulled to
81
+ * the offset via margin-right so text wraps beside it with no overlap;
82
+ * otherwise float on the wrap side (tight/through add shape-outside, src).
83
+ * Wrap margins (wp:distT/B/L/R) are EMU, rendered as pt.
84
+ */
85
+ declare function floatingToStyles(floating: unknown, src?: string, width?: number): string[];
86
+ /**
87
+ * Where a wrapNone floating drawing's absolute top/left should resolve from.
88
+ *
89
+ * verticalPosition.relative (OOXML vRelativeFrom) defaults to "paragraph"
90
+ * (also "line"); "page"/"margin"/"column" scope to the page box. The drawing is
91
+ * position:absolute, so its offsetParent decides the origin: a
92
+ * paragraph-anchored drawing must sit inside a position:relative <p> (the editor
93
+ * CSS adds that via p:has([data-float-anchor])), otherwise top/left measure
94
+ * from the page top and the drawing floats over the heading/body instead of
95
+ * its own blank paragraph (verified on sample anchored drawing groups). Only
96
+ * relevant for wrapNone (type 0); the float-based wraps stay inline.
97
+ */
98
+ declare function floatAnchorScope(floating: unknown): "paragraph" | "page";
99
+ /**
100
+ * Compute all paragraph-level CSS styles from nested attrs.
101
+ * Shared by Paragraph and Heading extensions for node-level renderHTML.
102
+ * Attrs store office-open native values; mappers here convert to CSS.
103
+ */
104
+ declare function renderParagraphStyles(attrs: Record<string, unknown>, opts?: {
105
+ empty?: boolean;
106
+ }): string[];
107
+ /**
108
+ * Compute run-level CSS (font/size/color/weight/…) from office-open run attrs.
109
+ * Shared by text-style marks and the styles→CSS generator (stylesToCss).
110
+ */
111
+ declare function renderRunStyles(attrs: Record<string, unknown>): string[];
112
+ /**
113
+ * Compute table cell CSS styles from nested attrs.
114
+ * Shared by TableCell and TableHeader extensions.
115
+ */
116
+ declare function renderTableCellStyles(attrs: Record<string, unknown>): string[];
117
+ /** Parse text-align → OOXML alignment. */
118
+ declare function alignmentFromElement(el: HTMLElement): string | null;
119
+ /** Parse margin-left/right + text-indent → OOXML indent (twips). */
120
+ declare function indentFromElement(el: HTMLElement): IndentAttributesProperties | null;
121
+ /** Parse margin-top/bottom + line-height → OOXML spacing (twips). */
122
+ declare function spacingFromElement(el: HTMLElement): SpacingProperties | null;
123
+ /** Parse border-* → OOXML BordersOptions. */
124
+ declare function bordersFromElement(el: HTMLElement): BordersOptions | null;
125
+ /** Parse background-color → OOXML shading. */
126
+ declare function shadingFromElement(el: HTMLElement): ShadingAttributesProperties | null;
127
+ //#endregion
128
+ export { shadingFromElement as C, spacingFromElement as D, sizeToCss as E, twipToCss as O, shadingFromCss as S, sizeFromCss as T, resolveFontFamilyCss as _, characterSpacingFromCss as a, sectionLinePitchCss as b, floatAnchorScope as c, lineSpacingToCss as d, normalizeColorToHex as f, renderTableCellStyles as g, renderRunStyles as h, bordersFromElement as i, twipsToMm as k, floatingToStyles as l, renderParagraphStyles as m, alignmentFromElement as n, characterSpacingToCss as o, renderBorderCSS as p, alignmentToCss as r, cssToTwip as s, alignmentFromCss as t, indentFromElement as u, resolveFontName as v, shadingToCss as w, sectionMarginCss as x, resolvePageSize as y };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docen/docx",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "DOCX editor and converter powered by @office-open/docx with Tiptap editing layer, supporting bidirectional conversion between DOCX, HTML, and Markdown",
5
5
  "keywords": [
6
6
  "converter",
@@ -59,46 +59,45 @@
59
59
  }
60
60
  },
61
61
  "dependencies": {
62
- "@office-open/docx": "0.10.0",
63
- "@tiptap/core": "3.22.5",
64
- "@tiptap/extension-blockquote": "3.22.5",
65
- "@tiptap/extension-bold": "3.22.5",
66
- "@tiptap/extension-bullet-list": "3.22.5",
67
- "@tiptap/extension-code": "3.22.5",
68
- "@tiptap/extension-code-block": "3.22.5",
69
- "@tiptap/extension-code-block-lowlight": "3.22.5",
70
- "@tiptap/extension-details": "3.22.5",
71
- "@tiptap/extension-document": "3.22.5",
72
- "@tiptap/extension-emoji": "3.22.5",
73
- "@tiptap/extension-hard-break": "3.22.5",
74
- "@tiptap/extension-heading": "3.22.5",
75
- "@tiptap/extension-highlight": "3.22.5",
76
- "@tiptap/extension-horizontal-rule": "3.22.5",
77
- "@tiptap/extension-image": "3.22.5",
78
- "@tiptap/extension-italic": "3.22.5",
79
- "@tiptap/extension-link": "3.22.5",
80
- "@tiptap/extension-list": "3.22.5",
81
- "@tiptap/extension-list-item": "3.22.5",
82
- "@tiptap/extension-mathematics": "3.22.5",
83
- "@tiptap/extension-mention": "3.22.5",
84
- "@tiptap/extension-ordered-list": "3.22.5",
85
- "@tiptap/extension-paragraph": "3.22.5",
86
- "@tiptap/extension-strike": "3.22.5",
87
- "@tiptap/extension-subscript": "3.22.5",
88
- "@tiptap/extension-superscript": "3.22.5",
89
- "@tiptap/extension-table": "3.22.5",
90
- "@tiptap/extension-task-item": "3.22.5",
91
- "@tiptap/extension-task-list": "3.22.5",
92
- "@tiptap/extension-text": "3.22.5",
93
- "@tiptap/extension-text-align": "3.22.5",
94
- "@tiptap/extension-text-style": "3.22.5",
95
- "@tiptap/extension-underline": "3.22.5",
96
- "@tiptap/extensions": "3.22.5",
97
- "@tiptap/html": "3.22.5",
98
- "@tiptap/markdown": "3.22.5",
99
- "@tiptap/pm": "3.22.5",
100
- "@tiptap/suggestion": "3.22.5",
62
+ "@office-open/core": "0.10.7",
63
+ "@office-open/docx": "0.10.7",
64
+ "@tiptap/core": "3.27.1",
65
+ "@tiptap/extension-blockquote": "3.27.1",
66
+ "@tiptap/extension-bold": "3.27.1",
67
+ "@tiptap/extension-bullet-list": "3.27.1",
68
+ "@tiptap/extension-code": "3.27.1",
69
+ "@tiptap/extension-code-block": "3.27.1",
70
+ "@tiptap/extension-code-block-lowlight": "3.27.1",
71
+ "@tiptap/extension-details": "3.27.1",
72
+ "@tiptap/extension-document": "3.27.1",
73
+ "@tiptap/extension-emoji": "3.27.1",
74
+ "@tiptap/extension-hard-break": "3.27.1",
75
+ "@tiptap/extension-heading": "3.27.1",
76
+ "@tiptap/extension-highlight": "3.27.1",
77
+ "@tiptap/extension-horizontal-rule": "3.27.1",
78
+ "@tiptap/extension-image": "3.27.1",
79
+ "@tiptap/extension-italic": "3.27.1",
80
+ "@tiptap/extension-link": "3.27.1",
81
+ "@tiptap/extension-list-item": "3.27.1",
82
+ "@tiptap/extension-mathematics": "3.27.1",
83
+ "@tiptap/extension-mention": "3.27.1",
84
+ "@tiptap/extension-ordered-list": "3.27.1",
85
+ "@tiptap/extension-paragraph": "3.27.1",
86
+ "@tiptap/extension-strike": "3.27.1",
87
+ "@tiptap/extension-subscript": "3.27.1",
88
+ "@tiptap/extension-superscript": "3.27.1",
89
+ "@tiptap/extension-table": "3.27.1",
90
+ "@tiptap/extension-task-item": "3.27.1",
91
+ "@tiptap/extension-task-list": "3.27.1",
92
+ "@tiptap/extension-text": "3.27.1",
93
+ "@tiptap/extension-text-align": "3.27.1",
94
+ "@tiptap/extension-text-style": "3.27.1",
95
+ "@tiptap/extension-underline": "3.27.1",
96
+ "@tiptap/markdown": "3.27.1",
97
+ "@tiptap/pm": "3.27.1",
98
+ "@tiptap/suggestion": "3.27.1",
101
99
  "image-meta": "0.2.2",
100
+ "linkedom": "0.18.12",
102
101
  "lowlight": "3.3.0"
103
102
  },
104
103
  "scripts": {
@@ -1,31 +0,0 @@
1
- import "./tiptap-D7pl4I5U.mjs";
2
- //#region src/extensions/blockquote.ts
3
- /**
4
- * Blockquote extension — owns the DOCX expression of a blockquote.
5
- *
6
- * DOCX has no blockquote element; the convention is a left indent plus a left
7
- * border on each contained paragraph. This module owns that signature; the
8
- * DocxManager walks the blockquote's child paragraphs and applies it to each.
9
- */
10
- /** Left indent (twips, ~0.5 inch) marking a blockquote. */
11
- const BLOCKQUOTE_INDENT_LEFT = 720;
12
- /** Left border marking a blockquote. */
13
- const BLOCKQUOTE_BORDER = {
14
- style: "single",
15
- size: 18,
16
- space: 12,
17
- color: "CCCCCC"
18
- };
19
- /** Apply the blockquote signature (left indent + left border) to paragraph opts. */
20
- function applyBlockquoteStyle(paraObj) {
21
- paraObj.indent = {
22
- ...paraObj.indent ?? {},
23
- left: 720
24
- };
25
- paraObj.border = {
26
- ...paraObj.border ?? {},
27
- left: BLOCKQUOTE_BORDER
28
- };
29
- }
30
- //#endregion
31
- export { BLOCKQUOTE_INDENT_LEFT as n, applyBlockquoteStyle as r, BLOCKQUOTE_BORDER as t };
@@ -1,23 +0,0 @@
1
- import { a as CodeBlockLowlight } from "./tiptap-D7pl4I5U.mjs";
2
- //#region src/extensions/code-block.ts
3
- /**
4
- * CodeBlock extension — CodeBlockLowlight with a DOCX renderDocx.
5
- *
6
- * DOCX has no dedicated code-block element. A code block maps to a single
7
- * paragraph styled "Code" with a monospace run font. Inline marks (syntax-
8
- * highlight tokens) and line breaks (`\n` → `<w:br/>`) are handled by
9
- * DocxManager's shared inline-content compilation; resolveCodeBlock reassembles
10
- * the text. This module owns only the paragraph-level style.
11
- *
12
- * `language` has no OOXML carrier and is intentionally dropped (known lossy).
13
- */
14
- /** codeBlock node → paragraph properties (style "Code" + monospace font). */
15
- function renderDocx(_node) {
16
- return {
17
- style: "Code",
18
- run: { font: "Consolas" }
19
- };
20
- }
21
- const CodeBlock = CodeBlockLowlight.extend({ renderDocx });
22
- //#endregion
23
- export { renderDocx as n, CodeBlock as t };