@betteroffice/docx 0.0.1 → 0.0.3

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 (165) hide show
  1. package/README.md +19 -0
  2. package/dist/chunk-AEQOEQJ7.mjs +57 -0
  3. package/dist/chunk-AZ52IWB6.mjs +16 -0
  4. package/dist/{chunk-SINEY6ZF.mjs → chunk-B4IR6YP4.mjs} +1 -1
  5. package/dist/chunk-GGEGIQRK.mjs +1 -0
  6. package/dist/chunk-IFT6DUJX.mjs +1 -0
  7. package/dist/chunk-J7LNO6SM.mjs +1 -0
  8. package/dist/{chunk-H3JCIGWK.mjs → chunk-NJHOPXZW.mjs} +1 -1
  9. package/dist/{chunk-KXNZFTTK.mjs → chunk-WBH3SXI6.mjs} +1 -1
  10. package/dist/chunk-WON6K4FY.mjs +1 -0
  11. package/dist/chunk-Y7RUNRU2.mjs +1 -0
  12. package/dist/collaboration/index.d.mts +65 -0
  13. package/dist/collaboration/index.mjs +1 -0
  14. package/dist/{content-sSHuWw49.d.mts → content-MOZ6hKP4.d.mts} +357 -357
  15. package/dist/core.d.mts +148 -341
  16. package/dist/core.mjs +1 -1
  17. package/dist/{displayListQueries-p-ijSzdh.d.mts → displayListQueries-BJlo7Jkz.d.mts} +24 -6
  18. package/dist/docx/index.d.mts +40 -520
  19. package/dist/docx/index.mjs +2 -2
  20. package/dist/editor/index.d.mts +36 -151
  21. package/dist/editor/index.mjs +1 -1
  22. package/dist/{fontLoader-Bx6DK6-2.d.mts → fontLoader-aSewHMKF.d.mts} +65 -63
  23. package/dist/{formatting-DoL7KBSL.d.mts → formatting-D1EPSaJP.d.mts} +1 -1
  24. package/dist/{rustDisplayList-dqunvwxH.d.mts → frameDelta-D965X8yK.d.mts} +3 -274
  25. package/dist/generated/edit/docx_edit_bg.wasm +0 -0
  26. package/dist/generated/layout/docx_layout_bg.wasm +0 -0
  27. package/dist/generated/opc/ooxml_opc_bg.wasm +0 -0
  28. package/dist/generated/parse/docx_parse_bg.wasm +0 -0
  29. package/dist/index-Dx4Z3lkz.d.mts +1010 -0
  30. package/dist/layout/index.d.mts +19 -240
  31. package/dist/layout/index.mjs +1 -1
  32. package/dist/layout/pagination/index.d.mts +10 -58
  33. package/dist/layout/pagination/index.mjs +1 -1
  34. package/dist/layout/render/index.d.mts +11 -11
  35. package/dist/layout/render/index.mjs +1 -1
  36. package/dist/plugin-api/RenderedDomContext.d.mts +9 -9
  37. package/dist/plugin-api/index.d.mts +191 -6
  38. package/dist/plugin-api/resolveItemPositions.d.mts +4 -5
  39. package/dist/rustDisplayList-BRuZBqdL.d.mts +278 -0
  40. package/dist/rustMeasureSource-D1KsQvVC.d.mts +106 -0
  41. package/dist/selectiveSave-CVoajSKE.d.mts +56 -0
  42. package/dist/styles/index.d.mts +4 -39
  43. package/dist/styles/index.mjs +1 -1
  44. package/dist/{styles-VxNcXLdi.d.mts → styles-Dn_o3Vo5.d.mts} +2 -2
  45. package/dist/types/content.d.mts +2 -2
  46. package/dist/types/document.d.mts +40 -14
  47. package/dist/{types-DNrYr6yQ.d.mts → types-BfqUl2h_.d.mts} +3 -71
  48. package/dist/utils/comments.d.mts +2 -2
  49. package/dist/utils/index.d.mts +110 -576
  50. package/dist/utils/index.mjs +1 -84
  51. package/dist/utils/stylePreview.d.mts +2 -2
  52. package/dist/utils/units.d.mts +33 -2
  53. package/dist/wasm-DO3BUV7C.mjs +1 -0
  54. package/dist/wasm-NWXX4H5G.mjs +1 -0
  55. package/dist/wasm-edit.d.mts +14 -5
  56. package/dist/wasm-edit.mjs +1 -1
  57. package/dist/wasm-layout.d.mts +10 -1
  58. package/dist/wasm-layout.mjs +1 -1
  59. package/dist/wasm-opc.mjs +1 -1
  60. package/dist/wasm-parse.mjs +1 -1
  61. package/dist/yrs/index.d.mts +6 -881
  62. package/dist/yrs/index.mjs +1 -1
  63. package/dist/yrs/residentEngineWorker.mjs +1 -1
  64. package/package.json +16 -139
  65. package/dist/Subscribable-DOz6Ohoo.d.mts +0 -33
  66. package/dist/agent/index.d.mts +0 -531
  67. package/dist/agent/index.mjs +0 -1
  68. package/dist/chunk-34K66SY4.mjs +0 -1
  69. package/dist/chunk-4RCISPPE.mjs +0 -1
  70. package/dist/chunk-52GB3Y42.mjs +0 -1
  71. package/dist/chunk-6NEKRDXF.mjs +0 -1
  72. package/dist/chunk-6PW4CWUG.mjs +0 -1
  73. package/dist/chunk-7DEIW7FL.mjs +0 -1
  74. package/dist/chunk-7PCO5I2O.mjs +0 -1
  75. package/dist/chunk-BI3B33LI.mjs +0 -1
  76. package/dist/chunk-BIQWVK5P.mjs +0 -2
  77. package/dist/chunk-CIRN3LZA.mjs +0 -1
  78. package/dist/chunk-DXKG3HQ5.mjs +0 -16
  79. package/dist/chunk-FPZBTOD6.mjs +0 -1
  80. package/dist/chunk-FZIA7OFY.mjs +0 -1
  81. package/dist/chunk-GWKJ2Y4Y.mjs +0 -1
  82. package/dist/chunk-HJGAQIU7.mjs +0 -2
  83. package/dist/chunk-I6KKMUUC.mjs +0 -1
  84. package/dist/chunk-IL5JZJT7.mjs +0 -1
  85. package/dist/chunk-JY6ILTNS.mjs +0 -1
  86. package/dist/chunk-KEE52TT5.mjs +0 -1
  87. package/dist/chunk-KVKLLTDP.mjs +0 -58
  88. package/dist/chunk-L5ISVQ3W.mjs +0 -1
  89. package/dist/chunk-LDUWIM7M.mjs +0 -1
  90. package/dist/chunk-N5Q3YN64.mjs +0 -1
  91. package/dist/chunk-NEWOMDTX.mjs +0 -1
  92. package/dist/chunk-O2QSE2I7.mjs +0 -1
  93. package/dist/chunk-OJOHXQNQ.mjs +0 -1
  94. package/dist/chunk-OMR3TWCD.mjs +0 -2
  95. package/dist/chunk-P3KDV4M2.mjs +0 -1
  96. package/dist/chunk-Q7PO7V73.mjs +0 -1
  97. package/dist/chunk-QOUFE3VX.mjs +0 -1
  98. package/dist/chunk-TYHI7RAD.mjs +0 -1
  99. package/dist/chunk-UIEJWORW.mjs +0 -1
  100. package/dist/chunk-VAOUFAUH.mjs +0 -1
  101. package/dist/chunk-VBOTMRXV.mjs +0 -1
  102. package/dist/chunk-VCER63GQ.mjs +0 -1
  103. package/dist/chunk-WAUF2UC7.mjs +0 -2
  104. package/dist/chunk-X4XDO3LZ.mjs +0 -1
  105. package/dist/chunk-XQBCCJBO.mjs +0 -9
  106. package/dist/chunk-XWUOLYRQ.mjs +0 -2
  107. package/dist/chunk-XYH6XWP3.mjs +0 -10
  108. package/dist/chunk-YBIM6UJV.mjs +0 -8
  109. package/dist/chunk-YCIH2Q3E.mjs +0 -1
  110. package/dist/chunk-ZOV5KL7C.mjs +0 -1
  111. package/dist/colorResolver-n0o7H7ep.d.mts +0 -290
  112. package/dist/core-plugins.d.mts +0 -37
  113. package/dist/core-plugins.mjs +0 -1
  114. package/dist/docx/parser.d.mts +0 -41
  115. package/dist/docx/parser.mjs +0 -1
  116. package/dist/docx/rezip.d.mts +0 -148
  117. package/dist/docx/rezip.mjs +0 -1
  118. package/dist/docx/serializer/index.d.mts +0 -42
  119. package/dist/docx/serializer/index.mjs +0 -1
  120. package/dist/editorTree-DO5PyDK8.d.mts +0 -37
  121. package/dist/executor-7O2RBJ2B.mjs +0 -1
  122. package/dist/headerFooterLayout-0zPT64Qc.d.mts +0 -316
  123. package/dist/headless.d.mts +0 -69
  124. package/dist/headless.mjs +0 -1
  125. package/dist/layout/flow/index.d.mts +0 -149
  126. package/dist/layout/flow/index.mjs +0 -1
  127. package/dist/layout/measure/index.d.mts +0 -324
  128. package/dist/layout/measure/index.mjs +0 -1
  129. package/dist/layout/pagination/types.d.mts +0 -4
  130. package/dist/layout/pagination/types.mjs +0 -1
  131. package/dist/managers/AutoSaveManager.d.mts +0 -81
  132. package/dist/managers/AutoSaveManager.mjs +0 -1
  133. package/dist/managers/TableSelectionManager.d.mts +0 -74
  134. package/dist/managers/TableSelectionManager.mjs +0 -1
  135. package/dist/managers/types.d.mts +0 -113
  136. package/dist/managers/types.mjs +0 -0
  137. package/dist/mcp-cli.mjs +0 -142
  138. package/dist/mcp.d.mts +0 -162
  139. package/dist/mcp.mjs +0 -16
  140. package/dist/measureBlocksPipeline-Df0Bbrwy.d.mts +0 -109
  141. package/dist/measuredBlock-DZwz8zhD.d.mts +0 -26
  142. package/dist/plugin-api/types.d.mts +0 -193
  143. package/dist/plugin-api/types.mjs +0 -0
  144. package/dist/processTemplate-HDUIZFJ5.mjs +0 -1
  145. package/dist/registry-DMM5VTdT.d.mts +0 -165
  146. package/dist/rustPagination-Bj2hq013.d.mts +0 -106
  147. package/dist/sectionConfigs-DW3J8q0X.d.mts +0 -55
  148. package/dist/selectionContext-Buc9BCU1.d.mts +0 -570
  149. package/dist/selectiveSave-oFBJ1n71.d.mts +0 -16
  150. package/dist/selectiveXmlPatch-ypkxlTD_.d.mts +0 -23
  151. package/dist/settingsParser-CcGvtmCK.d.mts +0 -33
  152. package/dist/types/agentApi.d.mts +0 -456
  153. package/dist/types/agentApi.mjs +0 -1
  154. package/dist/types-dYdjUZMo.d.mts +0 -311
  155. package/dist/units-O5Y02RKQ.d.mts +0 -34
  156. package/dist/utils/headingCollector.d.mts +0 -28
  157. package/dist/utils/headingCollector.mjs +0 -1
  158. package/dist/utils/highlightColors.d.mts +0 -14
  159. package/dist/utils/highlightColors.mjs +0 -1
  160. package/dist/utils/textSelection.d.mts +0 -92
  161. package/dist/utils/textSelection.mjs +0 -1
  162. package/dist/variableDetector-Borj29SF.d.mts +0 -115
  163. package/dist/wasm-FZQ5XB2Y.mjs +0 -1
  164. package/dist/wasm-SA237OSP.mjs +0 -1
  165. package/dist/watermarkApi-DCxjutkg.d.mts +0 -38
@@ -1,68 +1,5 @@
1
- import { aL as SdtControlState, aP as SdtProperties, bg as RevisionInfo, bh as CellMarker, bi as PresetGeometryPathCommand, Z as DrawingScene, aW as ShapeEffect, b0 as ShapeTextBodyProperties, n as Chart, W as Watermark, a8 as FootnoteProperties, a0 as EndnoteProperties } from './content-sSHuWw49.mjs';
2
- import { x as TextModernEffects, B as BorderSpec } from './formatting-DoL7KBSL.mjs';
3
-
4
- /**
5
- * Layout checkpoints — page-start bookmarks carried on `Layout.checkpoints`.
6
- *
7
- * A checkpoint captures everything a paginator holds when a block starts on a
8
- * pristine page: the block about to be placed, the section cursor, and the
9
- * live page-flow geometry (including any continuous-section geometry still
10
- * queued per ECMA-376 §17.6.22). The field is derived data — fully determined
11
- * by the same inputs as the layout itself — and remains an optional part of
12
- * the `Layout` contract (omitted from the golden serialization; see
13
- * `__golden__/serializeLayout.ts`). The Rust engine performs full passes and
14
- * does not resume from checkpoints.
15
- */
16
-
17
- /** Stable section/page state copied onto every page created in a section. */
18
- type PageSectionState = {
19
- emitPageMetadata?: boolean;
20
- sectionIndex?: number;
21
- sectionId?: string;
22
- orientation?: 'portrait' | 'landscape';
23
- headerFooterRefs?: PageHeaderFooterRefs;
24
- pageNumbering?: PageNumberingContract;
25
- pageBorders?: PageBorderContract;
26
- watermark?: SectionBreakBlock['watermark'];
27
- verticalAlign?: SectionBreakBlock['verticalAlign'];
28
- noteSettings?: NoteSettingsContract;
29
- };
30
- /**
31
- * The page-flow geometry a layout checkpoint captures: everything a
32
- * paginator's closure holds that survives across pages, including geometry
33
- * queued by a continuous section break (ECMA-376 §17.6.22) that has not been
34
- * applied yet. Plain data — checkpoints ride on `Layout`.
35
- */
36
- type PageFlowGeometry = {
37
- pageSize: {
38
- w: number;
39
- h: number;
40
- };
41
- margins: PageMargins;
42
- columns: ColumnLayout;
43
- pendingPageSize?: {
44
- w: number;
45
- h: number;
46
- };
47
- pendingMargins?: PageMargins;
48
- section?: PageSectionState;
49
- pendingSection?: PageSectionState;
50
- sectionPageIndex?: number;
51
- lastLogicalPageNumber?: number;
52
- lastCreatedSectionKey?: string;
53
- };
54
- interface LayoutCheckpoint {
55
- /** Index of the measured block about to be placed on the pristine page. */
56
- blockIndex: number;
57
- /** The place walk's section cursor at that point. */
58
- sectionIdx: number;
59
- /** Index into `Layout.pages` of the page being started. */
60
- pageIndex: number;
61
- /** 1-based page number of that page. */
62
- pageNumber: number;
63
- /** Live paginator geometry at the moment the page was created. */
64
- flow: PageFlowGeometry;
65
- }
1
+ import { a as SdtControlState, b as SdtProperties, R as RevisionInfo, C as CellMarker, P as PresetGeometryPathCommand, D as DrawingScene, c as ShapeEffect, d as ShapeTextBodyProperties, e as Chart, W as Watermark, F as FootnoteProperties, E as EndnoteProperties } from './content-MOZ6hKP4.mjs';
2
+ import { T as TextModernEffects, B as BorderSpec } from './formatting-D1EPSaJP.mjs';
66
3
 
67
4
  /**
68
5
  * Inline SDT widget metadata carried by a painted text run.
@@ -1541,11 +1478,6 @@ type Layout = {
1541
1478
  footers?: Record<string, HeaderFooterLayout>;
1542
1479
  /** Gap between pages in pixels (for rendering). */
1543
1480
  pageGap?: number;
1544
- /**
1545
- * Resume bookmarks for incremental pagination (derived data — omitted from
1546
- * golden serialization). See `checkpoints.ts`.
1547
- */
1548
- checkpoints?: LayoutCheckpoint[];
1549
1481
  };
1550
1482
  /**
1551
1483
  * Measured header/footer heights keyed by variant.
@@ -1751,4 +1683,4 @@ interface FootnoteRenderItem {
1751
1683
  content?: FootnoteContent;
1752
1684
  }
1753
1685
 
1754
- export { type PageSectionState as $, type AnchoredObjectPositionInput as A, type BlockExtent as B, type ColumnLayout as C, DEFAULT_TEXTBOX_MARGINS as D, type HyperlinkInfo as E, type FootnoteContent as F, type ImageBlock as G, type HeaderFooterContent as H, type ImageRun as I, type ImageExtent as J, type ImageFragment as K, type LayoutOptions as L, type ImageRunPosition as M, type NoteSettingsContract as N, type InlineSdtWidget as O, type PageMargins as P, type LayoutCheckpoint as Q, type LineBreakRun as R, type SectionBreakBlock as S, type TextBoxBlock as T, type ListNumPr as U, type NoteAreaContract as V, type WrapTextDirection as W, type NoteLayoutItem as X, type PageBreakBlock as Y, type PageBreakExtent as Z, type PageFlowGeometry as _, type Layout as a, type ParagraphAttrs as a0, type ParagraphBlock as a1, type ParagraphBorders as a2, type ParagraphExtent as a3, type ParagraphFragment as a4, type ParagraphIndent as a5, type ParagraphSpacing as a6, type ResolvedLine as a7, type ResolvedSegment as a8, type Run as a9, type TypesetRow as aA, type TypesetRowSegment as aB, type TypesetRunAdvance as aC, assertExhaustiveLayoutBlock as aD, isTextWrappingFloatingImageRun as aE, pageGeometryFromPage as aF, resolveAnchoredObjectVerticalTop as aG, type RunFontSlots as aa, type RunFormatting as ab, type RunLanguageSlots as ac, type SdtGroup as ad, type SectionBreakExtent as ae, type ShapeBlock as af, type ShapeBlockFill as ag, type ShapeBlockStroke as ah, type ShapeBlockTransform as ai, type ShapeExtent as aj, type ShapeFragment as ak, type TabAlignment as al, type TabRun as am, type TabStop as an, type TableBlock as ao, type TableCell as ap, type TableCellExtent as aq, type TableExtent as ar, type TableFragment as as, type TableRow as at, type TableRowExtent as au, type TextBoxExtent as av, type TextBoxFragment as aw, type TextRun as ax, type TypesetBidiSlice as ay, type TypesetClusterAdvance as az, type PageHeaderFooterRefs as b, type PageNumberingContract as c, type PageBorderContract as d, type LayoutBlock as e, type BlockId as f, type Page as g, type FootnoteRenderItem as h, type PageGeometry as i, type BorderStyle as j, type CellBorderSpec as k, type CellBorders as l, type ChartBlock as m, type ChartExtent as n, type ChartFragment as o, type ColumnBreakBlock as p, type ColumnBreakExtent as q, DEFAULT_TEXTBOX_WIDTH as r, type DocumentPosition as s, type FieldRun as t, type FloatingTablePosition as u, type Fragment as v, type FragmentBase as w, type HeaderFooterContentHeights as x, type HeaderFooterLayout as y, type HitTestResult as z };
1686
+ export { type ParagraphExtent as $, type AnchoredObjectPositionInput as A, type BlockExtent as B, type CellBorderSpec as C, DEFAULT_TEXTBOX_MARGINS as D, type ImageRunPosition as E, type FootnoteContent as F, type InlineSdtWidget as G, type HeaderFooterContent as H, type ImageBlock as I, type LineBreakRun as J, type ListNumPr as K, type LayoutBlock as L, type NoteLayoutItem as M, type NoteAreaContract as N, type NoteSettingsContract as O, type Page as P, type PageBorderContract as Q, type ResolvedLine as R, type PageBreakBlock as S, type PageBreakExtent as T, type PageGeometry as U, type PageHeaderFooterRefs as V, type PageMargins as W, type PageNumberingContract as X, type ParagraphAttrs as Y, type ParagraphBlock as Z, type ParagraphBorders as _, type Layout as a, type ParagraphFragment as a0, type ParagraphIndent as a1, type ParagraphSpacing as a2, type Run as a3, type RunFontSlots as a4, type RunFormatting as a5, type RunLanguageSlots as a6, type SdtGroup as a7, type SectionBreakBlock as a8, type SectionBreakExtent as a9, assertExhaustiveLayoutBlock as aA, isTextWrappingFloatingImageRun as aB, pageGeometryFromPage as aC, resolveAnchoredObjectVerticalTop as aD, type ShapeBlock as aa, type ShapeBlockFill as ab, type ShapeBlockStroke as ac, type ShapeBlockTransform as ad, type ShapeExtent as ae, type ShapeFragment as af, type TabAlignment as ag, type TabRun as ah, type TabStop as ai, type TableBlock as aj, type TableCell as ak, type TableCellExtent as al, type TableExtent as am, type TableFragment as an, type TableRow as ao, type TableRowExtent as ap, type TextBoxBlock as aq, type TextBoxExtent as ar, type TextBoxFragment as as, type TextRun as at, type TypesetBidiSlice as au, type TypesetClusterAdvance as av, type TypesetRow as aw, type TypesetRowSegment as ax, type TypesetRunAdvance as ay, type WrapTextDirection as az, type LayoutOptions as b, type ResolvedSegment as c, type BlockId as d, type BorderStyle as e, type CellBorders as f, type ChartBlock as g, type ChartExtent as h, type ChartFragment as i, type ColumnBreakBlock as j, type ColumnBreakExtent as k, type ColumnLayout as l, DEFAULT_TEXTBOX_WIDTH as m, type DocumentPosition as n, type FieldRun as o, type FloatingTablePosition as p, type FootnoteRenderItem as q, type Fragment as r, type FragmentBase as s, type HeaderFooterContentHeights as t, type HeaderFooterLayout as u, type HitTestResult as v, type HyperlinkInfo as w, type ImageExtent as x, type ImageFragment as y, type ImageRun as z };
@@ -1,5 +1,5 @@
1
- import { P as Paragraph, B as BlockContent, C as Comment } from '../content-sSHuWw49.mjs';
2
- import '../formatting-DoL7KBSL.mjs';
1
+ import { f as Paragraph, B as BlockContent, g as Comment } from '../content-MOZ6hKP4.mjs';
2
+ import '../formatting-D1EPSaJP.mjs';
3
3
  import '../docx/wrapTypes.mjs';
4
4
 
5
5
  /**