@docen/docx 0.3.2 → 0.3.4

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 (83) hide show
  1. package/dist/blockquote-DY80QC06.d.mts +21 -0
  2. package/dist/bullet-list-DF60pnSL.d.mts +12 -0
  3. package/dist/converters/docx.d.mts +25 -4
  4. package/dist/converters/docx.mjs +217 -41
  5. package/dist/converters/html.d.mts +1 -1
  6. package/dist/converters/html.mjs +1 -1
  7. package/dist/converters/markdown.d.mts +1 -1
  8. package/dist/converters/markdown.mjs +1 -1
  9. package/dist/converters/patch.d.mts +1 -1
  10. package/dist/converters/prepare.d.mts +1 -1
  11. package/dist/converters/prepare.mjs +6 -9
  12. package/dist/converters/styles.d.mts +7 -1
  13. package/dist/converters/styles.mjs +31 -8
  14. package/dist/{core-DT9IrTzN.mjs → core-BnF8XhVE.mjs} +229 -33
  15. package/dist/core-DC0_-WcE.d.mts +387 -0
  16. package/dist/core.d.mts +1 -1
  17. package/dist/core.mjs +1 -1
  18. package/dist/details-Dd5MqqmR.d.mts +17 -0
  19. package/dist/document-Cws7XTYL.d.mts +28 -0
  20. package/dist/editor.d.mts +1 -1
  21. package/dist/editor.mjs +1 -1
  22. package/dist/extensions/blockquote.d.mts +2 -22
  23. package/dist/extensions/bullet-list.d.mts +2 -0
  24. package/dist/extensions/bullet-list.mjs +21 -0
  25. package/dist/extensions/code-block.d.mts +1 -18
  26. package/dist/extensions/column-break.d.mts +1 -30
  27. package/dist/extensions/column-break.mjs +1 -1
  28. package/dist/extensions/details.d.mts +2 -18
  29. package/dist/extensions/document.d.mts +1 -1
  30. package/dist/extensions/document.mjs +3 -6
  31. package/dist/extensions/extensions.d.mts +10 -6
  32. package/dist/extensions/extensions.mjs +9 -4
  33. package/dist/extensions/formatting-marks.d.mts +1 -37
  34. package/dist/extensions/formatting-marks.mjs +1 -1
  35. package/dist/extensions/heading.mjs +31 -9
  36. package/dist/extensions/image.d.mts +1 -1
  37. package/dist/extensions/image.mjs +20 -4
  38. package/dist/extensions/index.d.mts +17 -4
  39. package/dist/extensions/index.mjs +18 -3
  40. package/dist/extensions/link.d.mts +2 -0
  41. package/dist/extensions/link.mjs +56 -0
  42. package/dist/extensions/mention.d.mts +2 -24
  43. package/dist/extensions/ordered-list.d.mts +1 -24
  44. package/dist/extensions/ordered-list.mjs +10 -1
  45. package/dist/extensions/page-break.d.mts +1 -1
  46. package/dist/extensions/page-break.mjs +1 -1
  47. package/dist/extensions/paragraph.mjs +14 -6
  48. package/dist/extensions/passthrough.d.mts +2 -2
  49. package/dist/extensions/passthrough.mjs +2 -2
  50. package/dist/extensions/scroll.d.mts +2 -0
  51. package/dist/extensions/scroll.mjs +33 -0
  52. package/dist/extensions/section-break.d.mts +1 -43
  53. package/dist/extensions/section-break.mjs +1 -1
  54. package/dist/extensions/strike.mjs +1 -5
  55. package/dist/extensions/tab.d.mts +2 -0
  56. package/dist/extensions/tab.mjs +2 -0
  57. package/dist/extensions/table-cell.mjs +3 -8
  58. package/dist/extensions/table-header.mjs +1 -6
  59. package/dist/extensions/table-row.mjs +1 -6
  60. package/dist/extensions/table.mjs +1 -6
  61. package/dist/extensions/task-item.d.mts +2 -26
  62. package/dist/extensions/text-style.mjs +1 -6
  63. package/dist/extensions/tiptap.d.mts +1 -1
  64. package/dist/extensions/toc-field.d.mts +2 -0
  65. package/dist/extensions/toc-field.mjs +2 -0
  66. package/dist/extensions/utils.d.mts +2 -2
  67. package/dist/extensions/utils.mjs +10 -1
  68. package/dist/extensions/wpg-group.d.mts +2 -2
  69. package/dist/extensions/wpg-group.mjs +2 -2
  70. package/dist/extensions/wps-shape.d.mts +1 -1
  71. package/dist/extensions/wps-shape.mjs +1 -1
  72. package/dist/index.d.mts +48 -11
  73. package/dist/index.mjs +19 -4
  74. package/dist/link-BawPjQZR.d.mts +6 -0
  75. package/dist/mention-BGLzLVYw.d.mts +23 -0
  76. package/dist/ordered-list-DFAe-YEV.d.mts +25 -0
  77. package/dist/scroll-ZNeThJsJ.d.mts +18 -0
  78. package/dist/task-item-B0ntvQ1Y.d.mts +25 -0
  79. package/dist/{tiptap-pZsNPsvV.d.mts → tiptap-BKqn41uT.d.mts} +2 -2
  80. package/dist/{utils-D87vukzp.d.mts → utils-BJwDQts7.d.mts} +10 -1
  81. package/package.json +3 -3
  82. package/dist/core-C9VunJ8o.d.mts +0 -174
  83. package/dist/document-BH1y4qHM.d.mts +0 -6
@@ -1,5 +1,5 @@
1
1
  import { TableRow as TableRow$1 } from "./tiptap.mjs";
2
- import { cssToTwip } from "./utils.mjs";
2
+ import { attrNative, cssToTwip } from "./utils.mjs";
3
3
  //#region src/extensions/table-row.ts
4
4
  /**
5
5
  * Table row extension with nested office-open attrs.
@@ -30,11 +30,6 @@ function parseDocx(opts) {
30
30
  }
31
31
  return attrs;
32
32
  }
33
- const attrNative = () => ({
34
- default: null,
35
- parseHTML: () => null,
36
- rendered: false
37
- });
38
33
  const TableRow = TableRow$1.extend({
39
34
  addAttributes() {
40
35
  return {
@@ -1,5 +1,5 @@
1
1
  import { Table as Table$1 } from "./tiptap.mjs";
2
- import { alignmentFromElement, alignmentToCss, bordersFromElement, renderBorderCSS, shadingFromElement, shadingToCss, twipToCss } from "./utils.mjs";
2
+ import { alignmentFromElement, alignmentToCss, attrNative, bordersFromElement, renderBorderCSS, shadingFromElement, shadingToCss, twipToCss } from "./utils.mjs";
3
3
  //#region src/extensions/table.ts
4
4
  /**
5
5
  * Table extension with nested office-open attrs.
@@ -28,11 +28,6 @@ function parseDocx(opts) {
28
28
  }
29
29
  return attrs;
30
30
  }
31
- const attrNative = () => ({
32
- default: null,
33
- parseHTML: () => null,
34
- rendered: false
35
- });
36
31
  const Table = Table$1.extend({
37
32
  addAttributes() {
38
33
  return {
@@ -1,27 +1,3 @@
1
- import { A as TaskItem } from "../tiptap-pZsNPsvV.mjs";
2
-
3
- //#region src/extensions/task-item.d.ts
4
- /**
5
- * TaskItem extension — owns the DOCX expression of a task-list checkbox.
6
- *
7
- * DOCX has no native task list, but a clickable checkbox is reversible via an
8
- * inline content-control SDT (w14:checkbox). Each task paragraph carries a
9
- * leading checkbox SDT tagged "docen-task" so resolve can tell task items apart
10
- * from ordinary paragraphs that happen to contain an SDT. The checked state
11
- * round-trips through the SDT; DocxManager injects/strips the SDT at the
12
- * paragraph boundary and rebuilds the taskList/taskItem tree.
13
- */
14
- /** SDT tag marking our task-item checkbox content control. */
15
- declare const TASK_CHECKBOX_TAG = "docen-task";
16
- /**
17
- * Inline checkbox SDT (w14:checkbox) for a task item, as a ParagraphChild.
18
- * Tagged so resolve can distinguish task items from ordinary SDT-bearing
19
- * paragraphs.
20
- */
21
- declare function createTaskCheckbox(checked: boolean): Record<string, unknown>;
22
- /** True if an inline ParagraphChild is our task checkbox SDT. */
23
- declare function isTaskCheckbox(child: unknown): boolean;
24
- /** Read the checked state of a task checkbox SDT child (false if not one). */
25
- declare function readCheckboxState(child: unknown): boolean;
26
- //#endregion
1
+ import { A as TaskItem } from "../tiptap-BKqn41uT.mjs";
2
+ import { i as readCheckboxState, n as createTaskCheckbox, r as isTaskCheckbox, t as TASK_CHECKBOX_TAG } from "../task-item-B0ntvQ1Y.mjs";
27
3
  export { TASK_CHECKBOX_TAG, TaskItem, createTaskCheckbox, isTaskCheckbox, readCheckboxState };
@@ -1,5 +1,5 @@
1
1
  import { TextStyle as TextStyle$1 } from "./tiptap.mjs";
2
- import { characterSpacingFromCss, characterSpacingToCss, normalizeColorToHex, resolveFontFamilyCss, shadingFromCss, shadingToCss, sizeFromCss, sizeToCss } from "./utils.mjs";
2
+ import { attrNative, characterSpacingFromCss, characterSpacingToCss, normalizeColorToHex, resolveFontFamilyCss, shadingFromCss, shadingToCss, sizeFromCss, sizeToCss } from "./utils.mjs";
3
3
  //#region src/extensions/text-style.ts
4
4
  /**
5
5
  * TextStyle mark with office-open attrs.
@@ -45,11 +45,6 @@ function parseDocx(opts) {
45
45
  }
46
46
  return attrs;
47
47
  }
48
- const attrNative = () => ({
49
- default: null,
50
- parseHTML: () => null,
51
- rendered: false
52
- });
53
48
  const TextStyle = TextStyle$1.extend({
54
49
  addAttributes() {
55
50
  return {
@@ -1,2 +1,2 @@
1
- import { A as TaskItem, C as Strike, D as TableCell, E as Table, F as Underline, M as Text, N as TextAlign, O as TableHeader, P as TextStyle, S as Paragraph, T as Superscript, _ as Link, a as CodeBlockLowlight, b as Mention, c as DetailsSummary, d as HardBreak, f as Heading, g as Italic, h as Image, i as Code, j as TaskList, k as TableRow, l as Document, m as HorizontalRule, n as Bold, o as Details, p as Highlight, r as BulletList, s as DetailsContent, t as Blockquote, u as Emoji, v as ListItem, w as Subscript, x as OrderedList, y as Mathematics } from "../tiptap-pZsNPsvV.mjs";
1
+ import { A as TaskItem, C as Strike, D as TableCell, E as Table, F as Underline, M as Text, N as TextAlign, O as TableHeader, P as TextStyle, S as Paragraph, T as Superscript, _ as Link, a as CodeBlockLowlight, b as Mention, c as DetailsSummary, d as HardBreak, f as Heading, g as Italic, h as Image, i as Code, j as TaskList, k as TableRow, l as Document, m as HorizontalRule, n as Bold, o as Details, p as Highlight, r as BulletList, s as DetailsContent, t as Blockquote, u as Emoji, v as ListItem, w as Subscript, x as OrderedList, y as Mathematics } from "../tiptap-BKqn41uT.mjs";
2
2
  export { Blockquote, Bold, BulletList, Code, CodeBlockLowlight, Details, DetailsContent, DetailsSummary, Document, Emoji, HardBreak, Heading, Highlight, HorizontalRule, Image, Italic, Link, ListItem, Mathematics, Mention, OrderedList, Paragraph, Strike, Subscript, Superscript, Table, TableCell, TableHeader, TableRow, TaskItem, TaskList, Text, TextAlign, TextStyle, Underline };
@@ -0,0 +1,2 @@
1
+ import { m as TocField } from "../core-DC0_-WcE.mjs";
2
+ export { TocField };
@@ -0,0 +1,2 @@
1
+ import { g as TocField } from "../core-BnF8XhVE.mjs";
2
+ export { TocField };
@@ -1,2 +1,2 @@
1
- import { C as shadingFromElement, D as spacingFromElement, E as sizeToCss, O as twipToCss, S as shadingFromCss, T as sizeFromCss, _ as resolveFontFamilyCss, a as characterSpacingFromCss, b as sectionLinePitchCss, c as floatAnchorScope, d as lineSpacingToCss, f as normalizeColorToHex, g as renderTableCellStyles, h as renderRunStyles, i as bordersFromElement, k as twipsToMm, l as floatingToStyles, m as renderParagraphStyles, n as alignmentFromElement, o as characterSpacingToCss, p as renderBorderCSS, r as alignmentToCss, s as cssToTwip, t as alignmentFromCss, u as indentFromElement, v as resolveFontName, w as shadingToCss, x as sectionMarginCss, y as resolvePageSize } from "../utils-D87vukzp.mjs";
2
- export { alignmentFromCss, alignmentFromElement, alignmentToCss, bordersFromElement, characterSpacingFromCss, characterSpacingToCss, cssToTwip, floatAnchorScope, floatingToStyles, indentFromElement, lineSpacingToCss, normalizeColorToHex, renderBorderCSS, renderParagraphStyles, renderRunStyles, renderTableCellStyles, resolveFontFamilyCss, resolveFontName, resolvePageSize, sectionLinePitchCss, sectionMarginCss, shadingFromCss, shadingFromElement, shadingToCss, sizeFromCss, sizeToCss, spacingFromElement, twipToCss, twipsToMm };
1
+ import { A as twipsToMm, C as shadingFromCss, D as sizeToCss, E as sizeFromCss, O as spacingFromElement, S as sectionMarginCss, T as shadingToCss, _ as renderTableCellStyles, a as bordersFromElement, b as resolvePageSize, c as cssToTwip, d as indentFromElement, f as lineSpacingToCss, g as renderRunStyles, h as renderParagraphStyles, i as attrNative, k as twipToCss, l as floatAnchorScope, m as renderBorderCSS, n as alignmentFromElement, o as characterSpacingFromCss, p as normalizeColorToHex, r as alignmentToCss, s as characterSpacingToCss, t as alignmentFromCss, u as floatingToStyles, v as resolveFontFamilyCss, w as shadingFromElement, x as sectionLinePitchCss, y as resolveFontName } from "../utils-BJwDQts7.mjs";
2
+ export { alignmentFromCss, alignmentFromElement, alignmentToCss, attrNative, bordersFromElement, characterSpacingFromCss, characterSpacingToCss, cssToTwip, floatAnchorScope, floatingToStyles, indentFromElement, lineSpacingToCss, normalizeColorToHex, renderBorderCSS, renderParagraphStyles, renderRunStyles, renderTableCellStyles, resolveFontFamilyCss, resolveFontName, resolvePageSize, sectionLinePitchCss, sectionMarginCss, shadingFromCss, shadingFromElement, shadingToCss, sizeFromCss, sizeToCss, spacingFromElement, twipToCss, twipsToMm };
@@ -1,5 +1,14 @@
1
1
  import { sectionMarginDefaults, sectionPageSizeDefaults } from "@office-open/docx";
2
2
  //#region src/extensions/utils.ts
3
+ /** Factory for a Tiptap attr that carries an office-open native value: never
4
+ * parsed from HTML nor rendered to it, defaulting to null (ProseMirror stores
5
+ * every declared attr). Shared by every extension carrying OOXML attrs
6
+ * (paragraph/heading/table/table-cell/…). */
7
+ const attrNative = () => ({
8
+ default: null,
9
+ parseHTML: () => null,
10
+ rendered: false
11
+ });
3
12
  /** Common CSS named colors → hex */
4
13
  const CSS_COLORS = {
5
14
  black: "#000000",
@@ -496,4 +505,4 @@ function shadingFromElement(el) {
496
505
  return shadingFromCss(el.style.backgroundColor || null);
497
506
  }
498
507
  //#endregion
499
- export { alignmentFromCss, alignmentFromElement, alignmentToCss, bordersFromElement, characterSpacingFromCss, characterSpacingToCss, cssToTwip, floatAnchorScope, floatingToStyles, indentFromElement, lineSpacingToCss, normalizeColorToHex, renderBorderCSS, renderParagraphStyles, renderRunStyles, renderTableCellStyles, resolveFontFamilyCss, resolveFontName, resolvePageSize, sectionLinePitchCss, sectionMarginCss, shadingFromCss, shadingFromElement, shadingToCss, sizeFromCss, sizeToCss, spacingFromElement, twipToCss, twipsToMm };
508
+ export { alignmentFromCss, alignmentFromElement, alignmentToCss, attrNative, bordersFromElement, characterSpacingFromCss, characterSpacingToCss, cssToTwip, floatAnchorScope, floatingToStyles, indentFromElement, lineSpacingToCss, normalizeColorToHex, renderBorderCSS, renderParagraphStyles, renderRunStyles, renderTableCellStyles, resolveFontFamilyCss, resolveFontName, resolvePageSize, sectionLinePitchCss, sectionMarginCss, shadingFromCss, shadingFromElement, shadingToCss, sizeFromCss, sizeToCss, spacingFromElement, twipToCss, twipsToMm };
@@ -1,2 +1,2 @@
1
- import { _ as WpgGroup, b as renderWpsText, v as WpsData, y as renderWpsInterior } from "../core-C9VunJ8o.mjs";
2
- export { WpgGroup, WpsData, renderWpsInterior, renderWpsText };
1
+ import { C as renderWpsText, E as wpsShapeStyles, S as renderWpsInterior, T as wpsRotationVert, b as WpsShapeStandalone, v as WpgGroup, w as wpsInnerStyle, x as WpsShapeStyles, y as WpsData } from "../core-DC0_-WcE.mjs";
2
+ export { WpgGroup, WpsData, WpsShapeStandalone, WpsShapeStyles, renderWpsInterior, renderWpsText, wpsInnerStyle, wpsRotationVert, wpsShapeStyles };
@@ -1,2 +1,2 @@
1
- import { d as WpgGroup, f as renderWpsInterior, p as renderWpsText } from "../core-DT9IrTzN.mjs";
2
- export { WpgGroup, renderWpsInterior, renderWpsText };
1
+ import { d as renderWpsInterior, f as renderWpsText, h as wpsShapeStyles, m as wpsRotationVert, p as wpsInnerStyle, u as WpgGroup } from "../core-BnF8XhVE.mjs";
2
+ export { WpgGroup, renderWpsInterior, renderWpsText, wpsInnerStyle, wpsRotationVert, wpsShapeStyles };
@@ -1,2 +1,2 @@
1
- import { g as WpsShape } from "../core-C9VunJ8o.mjs";
1
+ import { _ as WpsShape } from "../core-DC0_-WcE.mjs";
2
2
  export { WpsShape };
@@ -1,2 +1,2 @@
1
- import { u as WpsShape } from "../core-DT9IrTzN.mjs";
1
+ import { l as WpsShape } from "../core-BnF8XhVE.mjs";
2
2
  export { WpsShape };
package/dist/index.d.mts CHANGED
@@ -1,6 +1,19 @@
1
- import { n as createDocument, t as Document } from "./document-BH1y4qHM.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";
1
+ import { A as TaskItem, F as Underline, M as Text, N as TextAlign, T as Superscript, a as CodeBlockLowlight, b as Mention, c as DetailsSummary, d as HardBreak, g as Italic, i as Code, j as TaskList, m as HorizontalRule, n as Bold, o as Details, p as Highlight, s as DetailsContent, t as Blockquote, u as Emoji, v as ListItem, w as Subscript, y as Mathematics } from "./tiptap-BKqn41uT.mjs";
2
+ import { n as createDocument, t as Document } from "./document-Cws7XTYL.mjs";
3
+ import { t as Paragraph } from "./paragraph-D8mpHo_o.mjs";
4
+ import { t as Heading } from "./heading-BvqBD2zX.mjs";
5
+ import { t as BulletList } from "./bullet-list-DF60pnSL.mjs";
6
+ import { r as OrderedList } from "./ordered-list-DFAe-YEV.mjs";
7
+ import { A as Image, D as PageBreak, E as wpsShapeStyles, F as ColumnBreak, I as CodeBlock, O as FormattingMarks, P as SectionBreak, _ as WpsShape, a as JSONContent, b as WpsShapeStandalone, c as DocxKit, d as tiptapMarkExtensions, f as tiptapNodeExtensions, g as Passthrough, h as InlinePassthrough, l as DocxKitOptions, m as TocField, p as Tab, t as AnyExtension, u as docxExtensions, v as WpgGroup, x as WpsShapeStyles } from "./core-DC0_-WcE.mjs";
8
+ import { t as Table } from "./table-BFkfeRp9.mjs";
9
+ import { t as TableRow } from "./table-row-kgzYkZlW.mjs";
10
+ import { t as TableCell } from "./table-cell-D_FV4D2h.mjs";
11
+ import { t as TableHeader } from "./table-header-KGQ2aEkP.mjs";
12
+ import { t as Link } from "./link-BawPjQZR.mjs";
13
+ import { t as Strike } from "./strike-BgWGvjKr.mjs";
14
+ import { t as TextStyle } from "./text-style-BHdtXkMb.mjs";
15
+ import { n as scrollContainerOf, t as scrollCaretToTop } from "./scroll-ZNeThJsJ.mjs";
16
+ import { A as twipsToMm, S as sectionMarginCss, b as resolvePageSize, x as sectionLinePitchCss, y as resolveFontName } from "./utils-BJwDQts7.mjs";
4
17
  import { ImageFetchHandler, PrepareStep, fetchImageHandler, prepareDocument, prepareImages } from "./converters/prepare.mjs";
5
18
  import { DocxGenerateOptions, DocxManager, compileDocument, generateDOCX, generateDOCXStream, generateDOCXSync, parseDOCX, resolveDocument } from "./converters/docx.mjs";
6
19
  import { generateHTML, parseHTML } from "./converters/html.mjs";
@@ -175,7 +188,7 @@ interface ParagraphNode extends TiptapJSONContent {
175
188
  interface HeadingNode extends TiptapJSONContent {
176
189
  type: "heading";
177
190
  attrs: {
178
- level: 1 | 2 | 3 | 4 | 5 | 6;
191
+ level: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
179
192
  } & ParagraphAttrs;
180
193
  content?: Array<TextNode | HardBreakNode>;
181
194
  }
@@ -265,16 +278,18 @@ interface WpgGroupNode extends TiptapJSONContent {
265
278
  };
266
279
  }
267
280
  /**
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.
281
+ * Standalone floating text-box shape (wp:anchor > wps:wsp). The shape geometry
282
+ * + styling (transformation/floating/fill/outline/bodyProperties) ride on
283
+ * attrs.wpsShape; the editable text body is PM content (one ParagraphNode per
284
+ * office-open ParagraphOptions). Unlike a group's interior wps children, this
285
+ * shape floats on its own anchor and is editable via its NodeView contentDOM.
272
286
  */
273
287
  interface WpsShapeNode extends TiptapJSONContent {
274
288
  type: "wpsShape";
275
289
  attrs?: {
276
290
  wpsShape: Record<string, unknown> | null;
277
291
  };
292
+ content?: Array<ParagraphNode>;
278
293
  }
279
294
  interface EmojiNode extends TiptapJSONContent {
280
295
  type: "emoji";
@@ -286,6 +301,9 @@ interface PageBreakNode extends TiptapJSONContent {
286
301
  interface ColumnBreakNode extends TiptapJSONContent {
287
302
  type: "columnBreak";
288
303
  }
304
+ interface TabNode extends TiptapJSONContent {
305
+ type: "tab";
306
+ }
289
307
  interface MentionNode extends TiptapJSONContent {
290
308
  type: "mention";
291
309
  attrs?: MentionAttrs;
@@ -304,10 +322,29 @@ interface PassthroughNode extends TiptapJSONContent {
304
322
  data: string;
305
323
  };
306
324
  }
325
+ interface InlinePassthroughNode extends TiptapJSONContent {
326
+ type: "inlinePassthrough";
327
+ attrs?: {
328
+ data: string;
329
+ };
330
+ }
307
331
  interface DetailsNode extends TiptapJSONContent {
308
332
  type: "details";
309
333
  content?: Array<DetailsSummaryNode | DetailsContentNode>;
310
334
  }
335
+ /**
336
+ * TOC field node (`tocField`) — a block container whose `content` is the
337
+ * editable TOC entry paragraphs. `attrs.options` carries the TOC field switches
338
+ * (hyperlink, headingStyleRange, …). Named `tocField` (not `tableOfContents`)
339
+ * to avoid the @tiptap/extension-table-of-contents name. See TocField extension.
340
+ */
341
+ interface TocFieldNode extends TiptapJSONContent {
342
+ type: "tocField";
343
+ attrs?: {
344
+ options: Record<string, unknown> | null;
345
+ };
346
+ content?: Array<BlockNode>;
347
+ }
311
348
  interface DetailsSummaryNode extends TiptapJSONContent {
312
349
  type: "detailsSummary";
313
350
  content?: Array<TextNode | HardBreakNode>;
@@ -316,7 +353,7 @@ interface DetailsContentNode extends TiptapJSONContent {
316
353
  type: "detailsContent";
317
354
  content?: Array<BlockNode>;
318
355
  }
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;
356
+ type InlineContent = TextNode | HardBreakNode | ImageNode | EmojiNode | PageBreakNode | ColumnBreakNode | TabNode | MentionNode | InlineMathNode | InlinePassthroughNode;
357
+ type BlockNode = ParagraphNode | HeadingNode | BlockquoteNode | CodeBlockNode | HorizontalRuleNode | BulletListNode | OrderedListNode | TaskListNode | TableNode | WpsShapeNode | WpgGroupNode | DetailsNode | TocFieldNode | PassthroughNode | BlockMathNode;
321
358
  //#endregion
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 };
359
+ export { type AlignmentType, type AnyExtension, type AttrNullable, type BlockMathNode, type BlockNode, Blockquote, type BlockquoteNode, Bold, type BookmarkOptions, type BorderOptions, type BordersOptions, BulletList, type BulletListNode, Code, CodeBlock, CodeBlockLowlight, type CodeBlockNode, ColumnBreak, type ColumnBreakNode, Details, DetailsContent, type DetailsContentNode, type DetailsNode, DetailsSummary, type DetailsSummaryNode, Document, type DocumentOptions, type DocxEditorOptions, type DocxGenerateOptions, DocxKit, DocxKitOptions, DocxManager, type DocxPatchContent, type DocxPatchOptions, Emoji, type EmojiAttrs, type EmojiNode, type EmphasisMarkType, type ExternalHyperlinkOptions, type Floating, type FontAttributesProperties, FormattingMarks, type FrameOptions, HardBreak, type HardBreakNode, type HeaderFooterSlots, Heading, type HeadingLevel, type HeadingNode, type HeightRule, Highlight, type HighlightColor, HorizontalRule, type HorizontalRuleNode, Image, type ImageAttrs, type ImageFetchHandler, type ImageNode, type ImageOptions, type IndentAttributesProperties, type InlineContent, type InlineMathNode, InlinePassthrough, type InlinePassthroughNode, type InternalHyperlinkOptions, Italic, type JSONContent, type LeaderType, type LevelParagraphStylePropertiesOptions, type LineRuleType, Link, type LinkAttrs, ListItem, type ListItemNode, type Margins, type Mark, type MathAttrs, type MathInput, Mathematics, type MediaTransformation, Mention, type MentionAttrs, type MentionNode, OrderedList, type OrderedListNode, PageBreak, type PageBreakNode, Paragraph, type ParagraphAttrs, type ParagraphChild, type ParagraphNode, type ParagraphOptions, type ParagraphPropertiesOptions, type ParagraphPropertiesOptionsBase, type ParagraphRunPropertiesOptions, type ParagraphStylePropertiesOptions, Passthrough, type PassthroughNode, type PrepareStep, type QuickStyleEntry, type RubyOptions, type RunOptions, type RunPropertiesOptions, type RunStylePropertiesOptions, SectionBreak, type SectionChild, type SectionOptions, type SectionPropertiesOptions, type ShadingAttributesProperties, type SpacingProperties, Strike, type StrikeAttrs, type StylesOptions, Subscript, Superscript, Tab, type TabNode, type TabStopDefinition, type TabStopPosition, type TabStopType, Table, type TableAttrs, type TableBordersOptions, TableCell, type TableCellAttrs, type TableCellBordersOptions, type TableCellNode, type TableCellOptions, type TableFloatOptions, TableHeader, type TableHeaderNode, type TableLayoutType, type TableLookOptions, type TableNode, type TableOptions, TableRow, type TableRowAttrs, type TableRowNode, type TableRowOptions, type TableRowPropertiesOptionsBase, type TableVerticalAlign, type TableWidthProperties, TaskItem, type TaskItemNode, TaskList, type TaskListNode, Text, TextAlign, type TextAlignmentType, type TextNode, TextStyle, type TextStyleAttrs, TocField, type TocFieldNode, Underline, type UnderlineType, type WidthType, WpgGroup, type WpgGroupNode, WpsShape, type WpsShapeNode, type WpsShapeStandalone, type WpsShapeStyles, compileDocument, convertMillimetersToTwip, createDocument, createDocxEditor, docxExtensions, effectiveRunProps, fetchImageHandler, generateDOCX, generateDOCXStream, generateDOCXSync, generateHTML, generateMarkdown, inlineStyles, parseDOCX, parseHTML, parseMarkdown, patchDOCX, prepareDocument, prepareImages, quickStyles, resolveDocument, resolveFontName, resolvePageSize, scrollCaretToTop, scrollContainerOf, sectionLinePitchCss, sectionMarginCss, sectionMarginDefaults, sectionPageSizeDefaults, stylesToCss, tiptapMarkExtensions, tiptapNodeExtensions, twipsToMm, wpsShapeStyles };
package/dist/index.mjs CHANGED
@@ -1,13 +1,28 @@
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";
1
+ import { Blockquote, Bold, Code, CodeBlockLowlight, Details, DetailsContent, DetailsSummary, Emoji, HardBreak, Highlight, HorizontalRule, Italic, ListItem, Mathematics, Mention, Subscript, Superscript, TaskItem, TaskList, Text, TextAlign, Underline } from "./extensions/tiptap.mjs";
2
+ import { BulletList } from "./extensions/bullet-list.mjs";
3
+ import { CodeBlock } from "./extensions/code-block.mjs";
4
+ import { C as ColumnBreak, S as FormattingMarks, _ as Tab, a as DocxKit, b as Passthrough, c as tiptapNodeExtensions, g as TocField, h as wpsShapeStyles, l as WpsShape, o as docxExtensions, s as tiptapMarkExtensions, u as WpgGroup, v as SectionBreak, x as PageBreak, y as InlinePassthrough } from "./core-BnF8XhVE.mjs";
3
5
  import { resolveFontName, resolvePageSize, sectionLinePitchCss, sectionMarginCss, twipsToMm } from "./extensions/utils.mjs";
6
+ import { Document, createDocument } from "./extensions/document.mjs";
7
+ import { Heading } from "./extensions/heading.mjs";
8
+ import { Image } from "./extensions/image.mjs";
9
+ import { scrollCaretToTop, scrollContainerOf } from "./extensions/scroll.mjs";
10
+ import { Link } from "./extensions/link.mjs";
11
+ import { OrderedList } from "./extensions/ordered-list.mjs";
12
+ import { Paragraph } from "./extensions/paragraph.mjs";
13
+ import { Strike } from "./extensions/strike.mjs";
14
+ import { Table } from "./extensions/table.mjs";
15
+ import { TableCell } from "./extensions/table-cell.mjs";
16
+ import { TableHeader } from "./extensions/table-header.mjs";
17
+ import { TableRow } from "./extensions/table-row.mjs";
18
+ import { TextStyle } from "./extensions/text-style.mjs";
4
19
  import { createDocxEditor } from "./editor.mjs";
5
20
  import { fetchImageHandler, prepareDocument, prepareImages } from "./converters/prepare.mjs";
21
+ import { effectiveRunProps, inlineStyles, quickStyles, stylesToCss } from "./converters/styles.mjs";
6
22
  import { DocxManager, compileDocument, generateDOCX, generateDOCXStream, generateDOCXSync, parseDOCX, resolveDocument } from "./converters/docx.mjs";
7
23
  import { patchDOCX } from "./converters/patch.mjs";
8
24
  import { generateHTML, parseHTML } from "./converters/html.mjs";
9
25
  import { generateMarkdown, parseMarkdown } from "./converters/markdown.mjs";
10
- import { effectiveRunProps, inlineStyles, quickStyles, stylesToCss } from "./converters/styles.mjs";
11
26
  import { sectionMarginDefaults, sectionPageSizeDefaults } from "@office-open/docx";
12
27
  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
+ export { Blockquote, Bold, BulletList, Code, CodeBlock, CodeBlockLowlight, ColumnBreak, Details, DetailsContent, DetailsSummary, Document, DocxKit, DocxManager, Emoji, FormattingMarks, HardBreak, Heading, Highlight, HorizontalRule, Image, InlinePassthrough, Italic, Link, ListItem, Mathematics, Mention, OrderedList, PageBreak, Paragraph, Passthrough, SectionBreak, Strike, Subscript, Superscript, Tab, Table, TableCell, TableHeader, TableRow, TaskItem, TaskList, Text, TextAlign, TextStyle, TocField, Underline, WpgGroup, WpsShape, compileDocument, convertMillimetersToTwip, createDocument, createDocxEditor, docxExtensions, effectiveRunProps, fetchImageHandler, generateDOCX, generateDOCXStream, generateDOCXSync, generateHTML, generateMarkdown, inlineStyles, parseDOCX, parseHTML, parseMarkdown, patchDOCX, prepareDocument, prepareImages, quickStyles, resolveDocument, resolveFontName, resolvePageSize, scrollCaretToTop, scrollContainerOf, sectionLinePitchCss, sectionMarginCss, sectionMarginDefaults, sectionPageSizeDefaults, stylesToCss, tiptapMarkExtensions, tiptapNodeExtensions, twipsToMm, wpsShapeStyles };
@@ -0,0 +1,6 @@
1
+ import { LinkOptions } from "@tiptap/extension-link";
2
+
3
+ //#region src/extensions/link.d.ts
4
+ declare const Link$1: import("@tiptap/core").Mark<LinkOptions, any>;
5
+ //#endregion
6
+ export { Link$1 as t };
@@ -0,0 +1,23 @@
1
+ //#region src/extensions/mention.d.ts
2
+ /**
3
+ * Mention extension — owns the DOCX expression of an inline mention.
4
+ *
5
+ * A mention is an atom node carrying `{ id, label }`. DOCX has no mention
6
+ * element, but an inline text-SDT (CT_SdtRun) is a reversible carrier: the
7
+ * `id` rides in the SDT alias, the `label` as the SDT's run text, and a fixed
8
+ * tag marks the type so resolve can recover the mention. (customXml would also
9
+ * carry the id but triggers Word's i4i patent warning; SDT does not.)
10
+ */
11
+ /** SDT tag marking a mention content control. */
12
+ declare const MENTION_TAG = "docen-mention";
13
+ /** Inline text-SDT carrying a mention (id in alias, label as run text). */
14
+ declare function createMention(id: string, label: string): Record<string, unknown>;
15
+ /** True if an inline SDT child carries a mention. */
16
+ declare function isMention(child: unknown): boolean;
17
+ /** Read a mention SDT → `{ id, label }`. */
18
+ declare function readMention(child: unknown): {
19
+ id: string;
20
+ label: string;
21
+ };
22
+ //#endregion
23
+ export { readMention as i, createMention as n, isMention as r, MENTION_TAG as t };
@@ -0,0 +1,25 @@
1
+ import { LevelsOptions } from "@office-open/docx";
2
+
3
+ //#region src/extensions/ordered-list.d.ts
4
+ /**
5
+ * OrderedList extension — owns the DOCX expression of an ordered list.
6
+ *
7
+ * A Tiptap orderedList maps to a sequence of paragraphs referencing one
8
+ * abstractNum (decimal). The reference is keyed by `start` so lists with the
9
+ * same start share a definition; DocxManager gives each list its own instance
10
+ * for independent counting. This module owns that abstractNum shape; DocxManager
11
+ * owns the cross-paragraph tree walk, start recovery, and numbering-instance
12
+ * bookkeeping.
13
+ */
14
+ /** Reference prefix for generated ordered-list abstractNum definitions. */
15
+ declare const ORDERED_REFERENCE_PREFIX = "docen-ordered";
16
+ /** lvlText per nesting depth (level 0 → "%1.", … level 8 → "%9."). */
17
+ declare const ORDERED_LEVEL_TEXT: string[];
18
+ /**
19
+ * Build nine decimal numbering levels for an ordered list. Level 0 carries
20
+ * `start`; deeper levels restart at 1 (Word convention).
21
+ */
22
+ declare function buildOrderedLevels(start: number): LevelsOptions[];
23
+ declare const OrderedList: import("@tiptap/core").Node<import("@tiptap/extension-ordered-list").OrderedListOptions, any>;
24
+ //#endregion
25
+ export { buildOrderedLevels as i, ORDERED_REFERENCE_PREFIX as n, OrderedList as r, ORDERED_LEVEL_TEXT as t };
@@ -0,0 +1,18 @@
1
+ import { EditorView } from "@tiptap/pm/view";
2
+
3
+ //#region src/extensions/scroll.d.ts
4
+ /**
5
+ * Scroll helpers shared by the editor and the docx engine's link-click handler,
6
+ * so every "jump then scroll" path (outline heading, search result, find, TOC
7
+ * Ctrl+Click, post-reflow caret follow) scrolls the SAME way — to the top of the
8
+ * viewport, Word-style. ProseMirror's default `tr.scrollIntoView()` parks the
9
+ * caret at the bottom edge, which reads wrong for a page/heading/TOC jump.
10
+ */
11
+ /** Nearest scrollable ancestor of the editor surface (e.g. the docen-canvas). */
12
+ declare function scrollContainerOf(view: EditorView): HTMLElement | null;
13
+ /** Scroll the caret to the TOP of the viewport when it has left the visible area
14
+ * (Word-style page follow). No-op while the caret stays in view, so normal
15
+ * typing doesn't fight the user's scroll. Replaces PM's default scrollIntoView. */
16
+ declare function scrollCaretToTop(view: EditorView): void;
17
+ //#endregion
18
+ export { scrollContainerOf as n, scrollCaretToTop as t };
@@ -0,0 +1,25 @@
1
+ //#region src/extensions/task-item.d.ts
2
+ /**
3
+ * TaskItem extension — owns the DOCX expression of a task-list checkbox.
4
+ *
5
+ * DOCX has no native task list, but a clickable checkbox is reversible via an
6
+ * inline content-control SDT (w14:checkbox). Each task paragraph carries a
7
+ * leading checkbox SDT tagged "docen-task" so resolve can tell task items apart
8
+ * from ordinary paragraphs that happen to contain an SDT. The checked state
9
+ * round-trips through the SDT; DocxManager injects/strips the SDT at the
10
+ * paragraph boundary and rebuilds the taskList/taskItem tree.
11
+ */
12
+ /** SDT tag marking our task-item checkbox content control. */
13
+ declare const TASK_CHECKBOX_TAG = "docen-task";
14
+ /**
15
+ * Inline checkbox SDT (w14:checkbox) for a task item, as a ParagraphChild.
16
+ * Tagged so resolve can distinguish task items from ordinary SDT-bearing
17
+ * paragraphs.
18
+ */
19
+ declare function createTaskCheckbox(checked: boolean): Record<string, unknown>;
20
+ /** True if an inline ParagraphChild is our task checkbox SDT. */
21
+ declare function isTaskCheckbox(child: unknown): boolean;
22
+ /** Read the checked state of a task checkbox SDT child (false if not one). */
23
+ declare function readCheckboxState(child: unknown): boolean;
24
+ //#endregion
25
+ export { readCheckboxState as i, createTaskCheckbox as n, isTaskCheckbox as r, TASK_CHECKBOX_TAG as t };
@@ -22,10 +22,10 @@ import { Italic } from "@tiptap/extension-italic";
22
22
  import { Underline } from "@tiptap/extension-underline";
23
23
  import { Strike } from "@tiptap/extension-strike";
24
24
  import { Code } from "@tiptap/extension-code";
25
- import { Link } from "@tiptap/extension-link";
25
+ import { Link as Link$1 } from "@tiptap/extension-link";
26
26
  import { Highlight } from "@tiptap/extension-highlight";
27
27
  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
- 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 };
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$1 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 };
@@ -1,6 +1,15 @@
1
1
  import { BorderOptions, BordersOptions, IndentAttributesProperties, ShadingAttributesProperties, SpacingProperties } from "@office-open/docx";
2
2
 
3
3
  //#region src/extensions/utils.d.ts
4
+ /** Factory for a Tiptap attr that carries an office-open native value: never
5
+ * parsed from HTML nor rendered to it, defaulting to null (ProseMirror stores
6
+ * every declared attr). Shared by every extension carrying OOXML attrs
7
+ * (paragraph/heading/table/table-cell/…). */
8
+ declare const attrNative: () => {
9
+ default: null;
10
+ parseHTML: () => null;
11
+ rendered: boolean;
12
+ };
4
13
  /** Normalize a CSS color value to hex (e.g., "red" → "#FF0000", "#ff0000" → "#FF0000").
5
14
  * Accepts a string (CSS name/hex or bare OOXML hex), or an OOXML ColorOptions
6
15
  * object ({ val, themeColor, themeTint, themeShade }) — the object form
@@ -125,4 +134,4 @@ declare function bordersFromElement(el: HTMLElement): BordersOptions | null;
125
134
  /** Parse background-color → OOXML shading. */
126
135
  declare function shadingFromElement(el: HTMLElement): ShadingAttributesProperties | null;
127
136
  //#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 };
137
+ export { twipsToMm as A, shadingFromCss as C, sizeToCss as D, sizeFromCss as E, spacingFromElement as O, sectionMarginCss as S, shadingToCss as T, renderTableCellStyles as _, bordersFromElement as a, resolvePageSize as b, cssToTwip as c, indentFromElement as d, lineSpacingToCss as f, renderRunStyles as g, renderParagraphStyles as h, attrNative as i, twipToCss as k, floatAnchorScope as l, renderBorderCSS as m, alignmentFromElement as n, characterSpacingFromCss as o, normalizeColorToHex as p, alignmentToCss as r, characterSpacingToCss as s, alignmentFromCss as t, floatingToStyles as u, resolveFontFamilyCss as v, shadingFromElement as w, sectionLinePitchCss as x, resolveFontName as y };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docen/docx",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
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,8 +59,8 @@
59
59
  }
60
60
  },
61
61
  "dependencies": {
62
- "@office-open/core": "0.10.7",
63
- "@office-open/docx": "0.10.7",
62
+ "@office-open/core": "0.10.11",
63
+ "@office-open/docx": "0.10.11",
64
64
  "@tiptap/core": "3.27.1",
65
65
  "@tiptap/extension-blockquote": "3.27.1",
66
66
  "@tiptap/extension-bold": "3.27.1",