@eigenpal/docx-editor-core 1.0.3 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (237) hide show
  1. package/LICENSE +13 -16
  2. package/dist/agent/index.d.mts +1 -2
  3. package/dist/agent/index.d.ts +1 -2
  4. package/dist/agent/index.js +1 -1
  5. package/dist/agent/index.mjs +1 -1
  6. package/dist/{chunk-Z4SJCSTS.js → chunk-25KY5HLN.js} +1 -1
  7. package/dist/chunk-44FHVKSI.js +1 -0
  8. package/dist/{chunk-XWQB6APW.mjs → chunk-5CDBSK2R.mjs} +1 -1
  9. package/dist/{chunk-EQVNAHL7.mjs → chunk-6Y6LON6Y.mjs} +1 -1
  10. package/dist/{chunk-QVEAQOMR.mjs → chunk-6ZXL3EIP.mjs} +1 -1
  11. package/dist/chunk-73AZQWIE.js +1 -0
  12. package/dist/chunk-7HANRHHL.js +1 -0
  13. package/dist/chunk-7LRR7RKE.mjs +15 -0
  14. package/dist/{chunk-GHQS3I2W.mjs → chunk-7Z2AGPNQ.mjs} +1 -1
  15. package/dist/chunk-BGE57OES.js +1 -0
  16. package/dist/{chunk-3JXR6YU4.mjs → chunk-BOOHU5EW.mjs} +1 -1
  17. package/dist/chunk-CA2EYL6T.mjs +1 -0
  18. package/dist/{chunk-2IE6UDHJ.mjs → chunk-CTHHUJAB.mjs} +1 -1
  19. package/dist/chunk-DLCDDB66.mjs +3 -0
  20. package/dist/chunk-DV6GWBUJ.js +2 -0
  21. package/dist/{chunk-EPX7BBJD.js → chunk-E4JMCA5X.js} +2 -2
  22. package/dist/chunk-F44ZLDZS.js +4 -0
  23. package/dist/chunk-FDEDN2RC.mjs +0 -0
  24. package/dist/chunk-FEWCI2E5.mjs +1 -0
  25. package/dist/chunk-GFDIPDJ6.mjs +1 -0
  26. package/dist/chunk-GM4USWKO.js +2 -0
  27. package/dist/chunk-GWBVJZVT.js +3 -0
  28. package/dist/chunk-GY5BWVM7.js +1 -0
  29. package/dist/{chunk-XBHF5Q2F.js → chunk-H42RXHT4.js} +1 -1
  30. package/dist/chunk-HMBVSDCH.mjs +1 -0
  31. package/dist/{chunk-D536HC5M.js → chunk-HQPWFUP5.js} +1 -1
  32. package/dist/chunk-HV6HE6YR.js +59 -0
  33. package/dist/chunk-IF4C25FN.mjs +1 -0
  34. package/dist/chunk-IQG3KLWY.mjs +2 -0
  35. package/dist/{chunk-ABBG4WD2.js → chunk-J4J2Y6EU.js} +2 -2
  36. package/dist/chunk-KGDXHUYC.js +1 -0
  37. package/dist/chunk-KHF4JU7D.mjs +1 -0
  38. package/dist/chunk-LCICADWM.js +2 -0
  39. package/dist/{chunk-D5E5TA74.js → chunk-LOCW6MR2.js} +1 -1
  40. package/dist/{chunk-XBIKSAH6.js → chunk-LTHT4A4S.js} +1 -1
  41. package/dist/chunk-MJ6XZFVD.mjs +1 -0
  42. package/dist/chunk-MNOHUTKE.js +15 -0
  43. package/dist/chunk-MP4QSEO2.mjs +1 -0
  44. package/dist/chunk-MZ2XCZAN.mjs +1 -0
  45. package/dist/chunk-OAWTQ3IY.js +1 -0
  46. package/dist/{chunk-HL5PQT3A.mjs → chunk-OEXVWIHW.mjs} +1 -1
  47. package/dist/chunk-ONRBRDIC.mjs +59 -0
  48. package/dist/{chunk-7PX32GLB.mjs → chunk-ONWOHAFW.mjs} +1 -1
  49. package/dist/{chunk-EV6W6KXG.mjs → chunk-OUEKNYX5.mjs} +1 -1
  50. package/dist/chunk-OX75Q5ZG.mjs +1 -0
  51. package/dist/chunk-QEACB5VG.js +1 -0
  52. package/dist/chunk-RFC2SXZ6.mjs +4 -0
  53. package/dist/chunk-RFVFX5WK.mjs +1 -0
  54. package/dist/chunk-SORYYVJ7.js +1 -0
  55. package/dist/chunk-TUIEV7Q7.js +1 -0
  56. package/dist/chunk-U74VPTIU.js +1 -0
  57. package/dist/chunk-UOQT6A7P.js +1 -0
  58. package/dist/chunk-V5VDCQDN.mjs +1 -0
  59. package/dist/chunk-VHUVPHPI.mjs +1 -0
  60. package/dist/{chunk-SAFW7UQZ.js → chunk-W7GLQ6DV.js} +1 -1
  61. package/dist/chunk-WLHNIXWC.mjs +2 -0
  62. package/dist/chunk-X6HFDXKB.js +1 -0
  63. package/dist/chunk-XPV6VILW.mjs +1 -0
  64. package/dist/chunk-Y3ZQQI4D.js +1 -0
  65. package/dist/chunk-YTDWMXNS.js +1 -0
  66. package/dist/chunk-ZUGNF5KU.js +1 -0
  67. package/dist/chunk-ZX26QZJ5.mjs +1 -0
  68. package/dist/content-5Mrz6w_b.d.mts +1360 -0
  69. package/dist/content-CmqAwdFL.d.ts +1360 -0
  70. package/dist/core-plugins.d.mts +1 -2
  71. package/dist/core-plugins.d.ts +1 -2
  72. package/dist/core-plugins.js +1 -1
  73. package/dist/core-plugins.mjs +1 -1
  74. package/dist/core.d.mts +6 -7
  75. package/dist/core.d.ts +6 -7
  76. package/dist/core.js +1 -1
  77. package/dist/core.mjs +1 -1
  78. package/dist/{documentSerializer-Chn7J1WG.d.ts → documentSerializer-BRaaXIHm.d.ts} +1 -1
  79. package/dist/{documentSerializer-C1ueey5d.d.mts → documentSerializer-DgO3A9av.d.mts} +1 -1
  80. package/dist/docx/index.d.mts +1 -2
  81. package/dist/docx/index.d.ts +1 -2
  82. package/dist/docx/index.js +1 -1
  83. package/dist/docx/index.mjs +1 -1
  84. package/dist/docx/parser.d.mts +1 -2
  85. package/dist/docx/parser.d.ts +1 -2
  86. package/dist/docx/parser.js +1 -1
  87. package/dist/docx/parser.mjs +1 -1
  88. package/dist/docx/rezip.d.mts +1 -2
  89. package/dist/docx/rezip.d.ts +1 -2
  90. package/dist/docx/rezip.js +1 -1
  91. package/dist/docx/rezip.mjs +1 -1
  92. package/dist/docx/serializer/index.d.mts +2 -3
  93. package/dist/docx/serializer/index.d.ts +2 -3
  94. package/dist/docx/serializer/index.js +1 -1
  95. package/dist/docx/serializer/index.mjs +1 -1
  96. package/dist/{fontLoader-BOt95Jtf.d.mts → fontLoader-8b4X-AIh.d.mts} +63 -3
  97. package/dist/{fontLoader-QPwbcX5j.d.ts → fontLoader-CK2QLq68.d.ts} +63 -3
  98. package/dist/{headerFooterLayout-DVFcJ832.d.mts → headerFooterLayout-72Vz7yp3.d.mts} +74 -2
  99. package/dist/{headerFooterLayout-B5LyDpSM.d.ts → headerFooterLayout-Ca4ESDHF.d.ts} +74 -2
  100. package/dist/headless.d.mts +5 -5
  101. package/dist/headless.d.ts +5 -5
  102. package/dist/headless.js +1 -1
  103. package/dist/headless.mjs +1 -1
  104. package/dist/layout-bridge/index.d.mts +4 -4
  105. package/dist/layout-bridge/index.d.ts +4 -4
  106. package/dist/layout-bridge/index.js +1 -1
  107. package/dist/layout-bridge/index.mjs +1 -1
  108. package/dist/layout-bridge/measuring/index.d.mts +4 -0
  109. package/dist/layout-bridge/measuring/index.d.ts +4 -0
  110. package/dist/layout-bridge/measuring/index.js +1 -1
  111. package/dist/layout-bridge/measuring/index.mjs +1 -1
  112. package/dist/layout-bridge/tableInsertHover.js +1 -1
  113. package/dist/layout-bridge/tableInsertHover.mjs +1 -1
  114. package/dist/layout-bridge/toFlowBlocks.d.mts +2 -1
  115. package/dist/layout-bridge/toFlowBlocks.d.ts +2 -1
  116. package/dist/layout-bridge/toFlowBlocks.js +1 -1
  117. package/dist/layout-bridge/toFlowBlocks.mjs +1 -1
  118. package/dist/layout-engine/index.d.mts +3 -0
  119. package/dist/layout-engine/index.d.ts +3 -0
  120. package/dist/layout-engine/index.js +1 -1
  121. package/dist/layout-engine/index.mjs +1 -1
  122. package/dist/layout-engine/types.d.mts +44 -0
  123. package/dist/layout-engine/types.d.ts +44 -0
  124. package/dist/layout-painter/index.d.mts +2 -3
  125. package/dist/layout-painter/index.d.ts +2 -3
  126. package/dist/layout-painter/index.js +1 -1
  127. package/dist/layout-painter/index.mjs +1 -1
  128. package/dist/layout-painter/renderPage.d.mts +2 -3
  129. package/dist/layout-painter/renderPage.d.ts +2 -3
  130. package/dist/layout-painter/renderPage.js +1 -1
  131. package/dist/layout-painter/renderPage.mjs +1 -1
  132. package/dist/managers/AutoSaveManager.d.mts +1 -2
  133. package/dist/managers/AutoSaveManager.d.ts +1 -2
  134. package/dist/managers/TableSelectionManager.d.mts +1 -2
  135. package/dist/managers/TableSelectionManager.d.ts +1 -2
  136. package/dist/managers/types.d.mts +1 -2
  137. package/dist/managers/types.d.ts +1 -2
  138. package/dist/mcp-cli.mjs +23 -22
  139. package/dist/mcp.d.mts +1 -2
  140. package/dist/mcp.d.ts +1 -2
  141. package/dist/mcp.js +3 -3
  142. package/dist/mcp.mjs +1 -1
  143. package/dist/{nodes-CL8M0L-a.d.mts → nodes-7753Bgi_.d.mts} +64 -3
  144. package/dist/{nodes-D7PTUJ2N.d.ts → nodes-CC_nwkT_.d.ts} +64 -3
  145. package/dist/prosemirror/commands/formatting.js +1 -1
  146. package/dist/prosemirror/commands/formatting.mjs +1 -1
  147. package/dist/prosemirror/commands/index.d.mts +80 -6
  148. package/dist/prosemirror/commands/index.d.ts +80 -6
  149. package/dist/prosemirror/commands/index.js +1 -1
  150. package/dist/prosemirror/commands/index.mjs +1 -1
  151. package/dist/prosemirror/commands/paragraph.js +1 -1
  152. package/dist/prosemirror/commands/paragraph.mjs +1 -1
  153. package/dist/prosemirror/conversion/fromProseDoc.d.mts +1 -2
  154. package/dist/prosemirror/conversion/fromProseDoc.d.ts +1 -2
  155. package/dist/prosemirror/conversion/fromProseDoc.js +1 -1
  156. package/dist/prosemirror/conversion/fromProseDoc.mjs +1 -1
  157. package/dist/prosemirror/conversion/index.d.mts +1 -2
  158. package/dist/prosemirror/conversion/index.d.ts +1 -2
  159. package/dist/prosemirror/conversion/index.js +1 -1
  160. package/dist/prosemirror/conversion/index.mjs +1 -1
  161. package/dist/prosemirror/editor.css +155 -95
  162. package/dist/prosemirror/extensions/index.js +1 -1
  163. package/dist/prosemirror/extensions/index.mjs +1 -1
  164. package/dist/prosemirror/extensions/nodes/TableExtension.js +1 -1
  165. package/dist/prosemirror/extensions/nodes/TableExtension.mjs +1 -1
  166. package/dist/prosemirror/index.d.mts +2 -3
  167. package/dist/prosemirror/index.d.ts +2 -3
  168. package/dist/prosemirror/index.js +1 -1
  169. package/dist/prosemirror/index.mjs +1 -1
  170. package/dist/prosemirror/plugins/index.d.mts +121 -17
  171. package/dist/prosemirror/plugins/index.d.ts +121 -17
  172. package/dist/prosemirror/plugins/index.js +1 -1
  173. package/dist/prosemirror/plugins/index.mjs +1 -1
  174. package/dist/prosemirror/schema/index.d.mts +3 -4
  175. package/dist/prosemirror/schema/index.d.ts +3 -4
  176. package/dist/prosemirror/schema/index.js +1 -1
  177. package/dist/prosemirror/schema/index.mjs +1 -1
  178. package/dist/prosemirror/utils/extractTrackedChanges.d.mts +44 -22
  179. package/dist/prosemirror/utils/extractTrackedChanges.d.ts +44 -22
  180. package/dist/prosemirror/utils/extractTrackedChanges.js +1 -1
  181. package/dist/prosemirror/utils/extractTrackedChanges.mjs +1 -1
  182. package/dist/types/content.d.mts +4 -1167
  183. package/dist/types/content.d.ts +4 -1167
  184. package/dist/types/document.d.mts +2 -4
  185. package/dist/types/document.d.ts +2 -4
  186. package/dist/utils/comments.d.mts +78 -5
  187. package/dist/utils/comments.d.ts +78 -5
  188. package/dist/utils/comments.js +1 -1
  189. package/dist/utils/comments.mjs +1 -1
  190. package/dist/utils/highlightColors.js +1 -1
  191. package/dist/utils/highlightColors.mjs +1 -1
  192. package/dist/utils/index.d.mts +2 -3
  193. package/dist/utils/index.d.ts +2 -3
  194. package/dist/utils/index.js +3 -3
  195. package/dist/utils/index.mjs +3 -3
  196. package/dist/{variableDetector-CAdt8yOr.d.mts → variableDetector-DF3-nxUC.d.mts} +1 -1
  197. package/dist/{variableDetector-W4XEN9YC.d.ts → variableDetector-sBkgVh3f.d.ts} +1 -1
  198. package/package.json +3 -3
  199. package/dist/chunk-3AZWLVLC.js +0 -1
  200. package/dist/chunk-3NLVHZMT.js +0 -59
  201. package/dist/chunk-5SU4HPQS.mjs +0 -1
  202. package/dist/chunk-AHXPHBMT.js +0 -1
  203. package/dist/chunk-B6LYBJ4H.mjs +0 -1
  204. package/dist/chunk-BFB4PRS4.mjs +0 -1
  205. package/dist/chunk-BRHHK4MG.mjs +0 -2
  206. package/dist/chunk-CP5OSG5Z.mjs +0 -1
  207. package/dist/chunk-CUXXRGPQ.mjs +0 -1
  208. package/dist/chunk-G7AKYAKU.mjs +0 -1
  209. package/dist/chunk-HAAMO2Z2.mjs +0 -1
  210. package/dist/chunk-IN6IYQ2X.js +0 -1
  211. package/dist/chunk-IO6HZ7KR.js +0 -2
  212. package/dist/chunk-KBU6QQFU.js +0 -9
  213. package/dist/chunk-LDKESXXK.mjs +0 -3
  214. package/dist/chunk-N3EIZN65.js +0 -1
  215. package/dist/chunk-NERY274X.js +0 -1
  216. package/dist/chunk-NNQWQOC5.mjs +0 -1
  217. package/dist/chunk-NO5LW2DQ.mjs +0 -1
  218. package/dist/chunk-OTDF6PZK.js +0 -1
  219. package/dist/chunk-P3AXSRLG.mjs +0 -1
  220. package/dist/chunk-QMLIXLZJ.mjs +0 -4
  221. package/dist/chunk-QXHL67FG.mjs +0 -1
  222. package/dist/chunk-TGPS3SRR.mjs +0 -1
  223. package/dist/chunk-TMISJEGL.js +0 -1
  224. package/dist/chunk-TRJWRZZD.js +0 -1
  225. package/dist/chunk-TRQN2SFW.mjs +0 -59
  226. package/dist/chunk-UGXSKZVM.js +0 -1
  227. package/dist/chunk-V435QKZB.js +0 -3
  228. package/dist/chunk-V6SWUCTS.js +0 -2
  229. package/dist/chunk-X3NB7STJ.js +0 -1
  230. package/dist/chunk-XOH7YAYL.js +0 -1
  231. package/dist/chunk-Y5HZAMND.mjs +0 -9
  232. package/dist/chunk-Y7I5QDCN.mjs +0 -1
  233. package/dist/chunk-YCDB5TA6.js +0 -4
  234. package/dist/chunk-YE357WVA.js +0 -1
  235. package/dist/chunk-YVYB4YCI.js +0 -1
  236. package/dist/lists-CvG_iVK3.d.mts +0 -148
  237. package/dist/lists-UTp_tk7B.d.ts +0 -148
@@ -1,148 +0,0 @@
1
- import { P as ParagraphFormatting, T as TextFormatting } from './formatting-BH4hcZiq.mjs';
2
-
3
- /**
4
- * Lists & Numbering Types
5
- *
6
- * Types for bullet lists, numbered lists, and numbering definitions.
7
- */
8
-
9
- /**
10
- * Number format type
11
- */
12
- type NumberFormat = 'decimal' | 'upperRoman' | 'lowerRoman' | 'upperLetter' | 'lowerLetter' | 'ordinal' | 'cardinalText' | 'ordinalText' | 'hex' | 'chicago' | 'ideographDigital' | 'japaneseCounting' | 'aiueo' | 'iroha' | 'decimalFullWidth' | 'decimalHalfWidth' | 'japaneseLegal' | 'japaneseDigitalTenThousand' | 'decimalEnclosedCircle' | 'decimalFullWidth2' | 'aiueoFullWidth' | 'irohaFullWidth' | 'decimalZero' | 'bullet' | 'ganada' | 'chosung' | 'decimalEnclosedFullstop' | 'decimalEnclosedParen' | 'decimalEnclosedCircleChinese' | 'ideographEnclosedCircle' | 'ideographTraditional' | 'ideographZodiac' | 'ideographZodiacTraditional' | 'taiwaneseCounting' | 'ideographLegalTraditional' | 'taiwaneseCountingThousand' | 'taiwaneseDigital' | 'chineseCounting' | 'chineseLegalSimplified' | 'chineseCountingThousand' | 'koreanDigital' | 'koreanCounting' | 'koreanLegal' | 'koreanDigital2' | 'vietnameseCounting' | 'russianLower' | 'russianUpper' | 'none' | 'numberInDash' | 'hebrew1' | 'hebrew2' | 'arabicAlpha' | 'arabicAbjad' | 'hindiVowels' | 'hindiConsonants' | 'hindiNumbers' | 'hindiCounting' | 'thaiLetters' | 'thaiNumbers' | 'thaiCounting';
13
- /**
14
- * Multi-level suffix (what follows the number)
15
- */
16
- type LevelSuffix = 'tab' | 'space' | 'nothing';
17
- /**
18
- * One indentation level of an abstract numbering definition (`w:lvl`).
19
- * Carries the number format, the marker template (`lvlText` — e.g.
20
- * `"%1.%2."`), the level's paragraph properties (indent, hanging) and
21
- * character properties (font, size, color for the marker itself).
22
- *
23
- * `ilvl` ranges 0-8 in standard Word documents.
24
- */
25
- interface ListLevel {
26
- /** Level index (0-8) */
27
- ilvl: number;
28
- /** Starting number */
29
- start?: number;
30
- /** Number format */
31
- numFmt: NumberFormat;
32
- /** Level text (e.g., "%1." or "•") */
33
- lvlText: string;
34
- /** Justification */
35
- lvlJc?: 'left' | 'center' | 'right';
36
- /** Suffix after number */
37
- suffix?: LevelSuffix;
38
- /** Paragraph properties for this level */
39
- pPr?: ParagraphFormatting;
40
- /** Run properties for the number/bullet */
41
- rPr?: TextFormatting;
42
- /** Restart numbering from higher level */
43
- lvlRestart?: number;
44
- /** Is legal numbering style */
45
- isLgl?: boolean;
46
- /** Legacy settings */
47
- legacy?: {
48
- legacy?: boolean;
49
- legacySpace?: number;
50
- legacyIndent?: number;
51
- };
52
- }
53
- /**
54
- * Abstract numbering definition (`w:abstractNum`) — the reusable template
55
- * for a list: which `NumberFormat` at each indentation level, what
56
- * marker text, what paragraph/character formatting. Multiple
57
- * `NumberingInstance`s (`w:num`) can reference one abstract numbering
58
- * to share the template while keeping independent counters.
59
- *
60
- * See ECMA-376 §17.9.
61
- */
62
- interface AbstractNumbering {
63
- /** Abstract numbering ID */
64
- abstractNumId: number;
65
- /** Multi-level type */
66
- multiLevelType?: 'hybridMultilevel' | 'multilevel' | 'singleLevel';
67
- /** Numbering style link */
68
- numStyleLink?: string;
69
- /** Style link */
70
- styleLink?: string;
71
- /** Level definitions */
72
- levels: ListLevel[];
73
- /** Name */
74
- name?: string;
75
- }
76
- /**
77
- * Numbering instance (w:num)
78
- */
79
- interface NumberingInstance {
80
- /** Numbering ID (referenced by paragraphs) */
81
- numId: number;
82
- /** Reference to abstract numbering */
83
- abstractNumId: number;
84
- /** Level overrides */
85
- levelOverrides?: Array<{
86
- ilvl: number;
87
- startOverride?: number;
88
- lvl?: ListLevel;
89
- }>;
90
- }
91
- /**
92
- * Computed list marker for one paragraph — what the layout engine and
93
- * painter need to render the "1.", "a)", "•" prefix. Not part of the
94
- * wire format; the parser fills this from the `numbering.xml` chain plus
95
- * the paragraph's `numPr`. Paragraphs without list rendering omit it.
96
- */
97
- interface ListRendering {
98
- /** Computed marker text (e.g., "1.", "a)", "•") */
99
- marker: string;
100
- /** List level (0-8) */
101
- level: number;
102
- /** Numbering ID */
103
- numId: number;
104
- /** Whether this is a bullet or numbered list */
105
- isBullet: boolean;
106
- /** Number format type (decimal, lowerRoman, upperRoman, etc.) */
107
- numFmt?: NumberFormat;
108
- /** Whether the list marker is hidden (w:vanish on level rPr) */
109
- markerHidden?: boolean;
110
- /** Marker font family from numbering level rPr (ascii name) */
111
- markerFontFamily?: string;
112
- /** Marker font size from numbering level rPr, in points */
113
- markerFontSize?: number;
114
- /**
115
- * Suffix character placed after the marker before body text (§17.9.25).
116
- * Default is `tab`; `space` inserts a single space; `nothing` no gap.
117
- * Drives marker-slot sizing in `getListMarkerInlineWidth`.
118
- */
119
- markerSuffix?: LevelSuffix;
120
- /**
121
- * NumberFormat for each level from 0..ilvl (inclusive).
122
- * Used to resolve multi-level templates like "%1.%2." where each %N
123
- * may need a different format (e.g., upperRoman parent + decimal child).
124
- */
125
- levelNumFmts?: NumberFormat[];
126
- /** abstractNumId the paragraph's numId points to (counters key on this). */
127
- abstractNumId?: number;
128
- /**
129
- * Start value from the numId's lvlOverride for the paragraph's ilvl, if any.
130
- * Per ECMA-376 §17.9.18, this resets the shared abstractNum counter the
131
- * first time the numId appears.
132
- */
133
- startOverride?: number;
134
- }
135
- /**
136
- * Top-level numbering data from `numbering.xml` — the set of abstract
137
- * templates and the per-document `NumberingInstance`s that reference
138
- * them. Paragraphs reference a `numId` (instance), not an
139
- * `abstractNumId` directly.
140
- */
141
- interface NumberingDefinitions {
142
- /** Abstract numbering definitions */
143
- abstractNums: AbstractNumbering[];
144
- /** Numbering instances */
145
- nums: NumberingInstance[];
146
- }
147
-
148
- export type { AbstractNumbering as A, ListLevel as L, NumberingDefinitions as N, NumberFormat as a, LevelSuffix as b, ListRendering as c, NumberingInstance as d };
@@ -1,148 +0,0 @@
1
- import { P as ParagraphFormatting, T as TextFormatting } from './formatting-_OXU8gLB.js';
2
-
3
- /**
4
- * Lists & Numbering Types
5
- *
6
- * Types for bullet lists, numbered lists, and numbering definitions.
7
- */
8
-
9
- /**
10
- * Number format type
11
- */
12
- type NumberFormat = 'decimal' | 'upperRoman' | 'lowerRoman' | 'upperLetter' | 'lowerLetter' | 'ordinal' | 'cardinalText' | 'ordinalText' | 'hex' | 'chicago' | 'ideographDigital' | 'japaneseCounting' | 'aiueo' | 'iroha' | 'decimalFullWidth' | 'decimalHalfWidth' | 'japaneseLegal' | 'japaneseDigitalTenThousand' | 'decimalEnclosedCircle' | 'decimalFullWidth2' | 'aiueoFullWidth' | 'irohaFullWidth' | 'decimalZero' | 'bullet' | 'ganada' | 'chosung' | 'decimalEnclosedFullstop' | 'decimalEnclosedParen' | 'decimalEnclosedCircleChinese' | 'ideographEnclosedCircle' | 'ideographTraditional' | 'ideographZodiac' | 'ideographZodiacTraditional' | 'taiwaneseCounting' | 'ideographLegalTraditional' | 'taiwaneseCountingThousand' | 'taiwaneseDigital' | 'chineseCounting' | 'chineseLegalSimplified' | 'chineseCountingThousand' | 'koreanDigital' | 'koreanCounting' | 'koreanLegal' | 'koreanDigital2' | 'vietnameseCounting' | 'russianLower' | 'russianUpper' | 'none' | 'numberInDash' | 'hebrew1' | 'hebrew2' | 'arabicAlpha' | 'arabicAbjad' | 'hindiVowels' | 'hindiConsonants' | 'hindiNumbers' | 'hindiCounting' | 'thaiLetters' | 'thaiNumbers' | 'thaiCounting';
13
- /**
14
- * Multi-level suffix (what follows the number)
15
- */
16
- type LevelSuffix = 'tab' | 'space' | 'nothing';
17
- /**
18
- * One indentation level of an abstract numbering definition (`w:lvl`).
19
- * Carries the number format, the marker template (`lvlText` — e.g.
20
- * `"%1.%2."`), the level's paragraph properties (indent, hanging) and
21
- * character properties (font, size, color for the marker itself).
22
- *
23
- * `ilvl` ranges 0-8 in standard Word documents.
24
- */
25
- interface ListLevel {
26
- /** Level index (0-8) */
27
- ilvl: number;
28
- /** Starting number */
29
- start?: number;
30
- /** Number format */
31
- numFmt: NumberFormat;
32
- /** Level text (e.g., "%1." or "•") */
33
- lvlText: string;
34
- /** Justification */
35
- lvlJc?: 'left' | 'center' | 'right';
36
- /** Suffix after number */
37
- suffix?: LevelSuffix;
38
- /** Paragraph properties for this level */
39
- pPr?: ParagraphFormatting;
40
- /** Run properties for the number/bullet */
41
- rPr?: TextFormatting;
42
- /** Restart numbering from higher level */
43
- lvlRestart?: number;
44
- /** Is legal numbering style */
45
- isLgl?: boolean;
46
- /** Legacy settings */
47
- legacy?: {
48
- legacy?: boolean;
49
- legacySpace?: number;
50
- legacyIndent?: number;
51
- };
52
- }
53
- /**
54
- * Abstract numbering definition (`w:abstractNum`) — the reusable template
55
- * for a list: which `NumberFormat` at each indentation level, what
56
- * marker text, what paragraph/character formatting. Multiple
57
- * `NumberingInstance`s (`w:num`) can reference one abstract numbering
58
- * to share the template while keeping independent counters.
59
- *
60
- * See ECMA-376 §17.9.
61
- */
62
- interface AbstractNumbering {
63
- /** Abstract numbering ID */
64
- abstractNumId: number;
65
- /** Multi-level type */
66
- multiLevelType?: 'hybridMultilevel' | 'multilevel' | 'singleLevel';
67
- /** Numbering style link */
68
- numStyleLink?: string;
69
- /** Style link */
70
- styleLink?: string;
71
- /** Level definitions */
72
- levels: ListLevel[];
73
- /** Name */
74
- name?: string;
75
- }
76
- /**
77
- * Numbering instance (w:num)
78
- */
79
- interface NumberingInstance {
80
- /** Numbering ID (referenced by paragraphs) */
81
- numId: number;
82
- /** Reference to abstract numbering */
83
- abstractNumId: number;
84
- /** Level overrides */
85
- levelOverrides?: Array<{
86
- ilvl: number;
87
- startOverride?: number;
88
- lvl?: ListLevel;
89
- }>;
90
- }
91
- /**
92
- * Computed list marker for one paragraph — what the layout engine and
93
- * painter need to render the "1.", "a)", "•" prefix. Not part of the
94
- * wire format; the parser fills this from the `numbering.xml` chain plus
95
- * the paragraph's `numPr`. Paragraphs without list rendering omit it.
96
- */
97
- interface ListRendering {
98
- /** Computed marker text (e.g., "1.", "a)", "•") */
99
- marker: string;
100
- /** List level (0-8) */
101
- level: number;
102
- /** Numbering ID */
103
- numId: number;
104
- /** Whether this is a bullet or numbered list */
105
- isBullet: boolean;
106
- /** Number format type (decimal, lowerRoman, upperRoman, etc.) */
107
- numFmt?: NumberFormat;
108
- /** Whether the list marker is hidden (w:vanish on level rPr) */
109
- markerHidden?: boolean;
110
- /** Marker font family from numbering level rPr (ascii name) */
111
- markerFontFamily?: string;
112
- /** Marker font size from numbering level rPr, in points */
113
- markerFontSize?: number;
114
- /**
115
- * Suffix character placed after the marker before body text (§17.9.25).
116
- * Default is `tab`; `space` inserts a single space; `nothing` no gap.
117
- * Drives marker-slot sizing in `getListMarkerInlineWidth`.
118
- */
119
- markerSuffix?: LevelSuffix;
120
- /**
121
- * NumberFormat for each level from 0..ilvl (inclusive).
122
- * Used to resolve multi-level templates like "%1.%2." where each %N
123
- * may need a different format (e.g., upperRoman parent + decimal child).
124
- */
125
- levelNumFmts?: NumberFormat[];
126
- /** abstractNumId the paragraph's numId points to (counters key on this). */
127
- abstractNumId?: number;
128
- /**
129
- * Start value from the numId's lvlOverride for the paragraph's ilvl, if any.
130
- * Per ECMA-376 §17.9.18, this resets the shared abstractNum counter the
131
- * first time the numId appears.
132
- */
133
- startOverride?: number;
134
- }
135
- /**
136
- * Top-level numbering data from `numbering.xml` — the set of abstract
137
- * templates and the per-document `NumberingInstance`s that reference
138
- * them. Paragraphs reference a `numId` (instance), not an
139
- * `abstractNumId` directly.
140
- */
141
- interface NumberingDefinitions {
142
- /** Abstract numbering definitions */
143
- abstractNums: AbstractNumbering[];
144
- /** Numbering instances */
145
- nums: NumberingInstance[];
146
- }
147
-
148
- export type { AbstractNumbering as A, ListLevel as L, NumberingDefinitions as N, NumberFormat as a, LevelSuffix as b, ListRendering as c, NumberingInstance as d };