@docx-editor.dev/core 2.17.0 → 2.19.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 (107) hide show
  1. package/README.md +1 -1
  2. package/THIRD_PARTY_NOTICES.md +2 -2
  3. package/dist/automation.cjs +1 -1
  4. package/dist/automation.d.ts +35 -8
  5. package/dist/automation.js +1 -1
  6. package/dist/binding.cjs +1 -1
  7. package/dist/binding.d.ts +9 -11
  8. package/dist/binding.js +1 -1
  9. package/dist/chunk-2ZEU42EA.js +2 -0
  10. package/dist/chunk-4DB7ZFQN.js +1 -0
  11. package/dist/chunk-4KMSEFIG.js +3 -0
  12. package/dist/chunk-72BDQFHY.js +18 -0
  13. package/dist/chunk-77DD4EBC.cjs +11 -0
  14. package/dist/chunk-BEOPUDAB.js +5 -0
  15. package/dist/chunk-CG7CP632.cjs +1 -0
  16. package/dist/chunk-CJCFEXTA.js +11 -0
  17. package/dist/chunk-DQS4KZUX.js +4 -0
  18. package/dist/chunk-FZ2BIMCY.cjs +2 -0
  19. package/dist/chunk-GUPITGJQ.cjs +2 -0
  20. package/dist/chunk-KDYD5TAW.cjs +1 -0
  21. package/dist/chunk-LQ6XWTKQ.cjs +18 -0
  22. package/dist/chunk-MDP5SNK4.cjs +3 -0
  23. package/dist/chunk-MRPPCGCX.cjs +20 -0
  24. package/dist/chunk-MSIFK7TJ.js +1 -0
  25. package/dist/chunk-NJONXJJY.cjs +4 -0
  26. package/dist/chunk-OODFC5R2.js +1 -0
  27. package/dist/chunk-P6VGDI57.js +2 -0
  28. package/dist/{chunk-UIB2MDE3.cjs → chunk-PBM6WERF.cjs} +1 -1
  29. package/dist/chunk-QBMAXYN7.js +20 -0
  30. package/dist/chunk-SUEX3CL7.cjs +5 -0
  31. package/dist/{chunk-UXAWPVH6.js → chunk-THCGTV53.js} +1 -1
  32. package/dist/{chunk-NO7U62I2.cjs → chunk-YVYEJBLL.cjs} +1 -1
  33. package/dist/chunk-ZKQX2PNF.cjs +1 -0
  34. package/dist/{chunk-XXLS6O6B.js → chunk-ZMM5RNM6.js} +1 -1
  35. package/dist/collaboration/replication.cjs +1 -1
  36. package/dist/collaboration/replication.d.ts +2 -4
  37. package/dist/collaboration/replication.js +1 -1
  38. package/dist/collaboration.cjs +1 -1
  39. package/dist/collaboration.d.ts +4 -6
  40. package/dist/collaboration.js +1 -1
  41. package/dist/contracts/editor.d.ts +9 -8
  42. package/dist/contracts/modules.d.ts +7 -9
  43. package/dist/{custom-node-writes-ClTkWM7s.d.ts → custom-node-writes-BqIv94ei.d.ts} +14 -2
  44. package/dist/document-protection-BL5zp8cU.d.ts +19 -0
  45. package/dist/{editor-BlerWPyk.d.ts → editor-WXbTSXx1.d.ts} +14 -7
  46. package/dist/editor.cjs +1 -1
  47. package/dist/editor.css +1 -1
  48. package/dist/editor.d.ts +271 -30
  49. package/dist/editor.js +1 -1
  50. package/dist/export.cjs +2 -2
  51. package/dist/export.d.ts +15 -12
  52. package/dist/export.js +2 -2
  53. package/dist/{failure-BnGjoXf0.d.ts → failure-DNNmwsgD.d.ts} +1 -1
  54. package/dist/{font-resolver-DtADJcLL.d.ts → font-resolver-BSrKnTeR.d.ts} +5 -3
  55. package/dist/harfbuzz.wasm +0 -0
  56. package/dist/{headless-document-view-BDSeMGoK.d.ts → headless-document-view-C4ttQJ5H.d.ts} +11 -3
  57. package/dist/{index-D51bUVBE.d.ts → index-C3As-Xxp.d.ts} +133 -19
  58. package/dist/index.cjs +1 -1
  59. package/dist/index.d.ts +18 -19
  60. package/dist/index.js +1 -1
  61. package/dist/{layout-shaping-rTElghj2.d.ts → layout-shaping-Dqu3JW3p.d.ts} +1 -1
  62. package/dist/layout.cjs +1 -1
  63. package/dist/layout.d.ts +23 -20
  64. package/dist/layout.js +1 -1
  65. package/dist/{note-properties-D5_fXW9K.d.ts → note-properties-RjYgbmXe.d.ts} +2 -2
  66. package/dist/{omml-equation-C9AJfWy5.d.ts → omml-equation-hcP9AUFX.d.ts} +1 -1
  67. package/dist/output.cjs +1 -1
  68. package/dist/output.d.ts +16 -6
  69. package/dist/output.js +1 -1
  70. package/dist/{protocol-K-Djpjjw.d.ts → protocol-OdRd17KZ.d.ts} +172 -7
  71. package/dist/{review-items-CiliAz8H.d.ts → review-items-CJz-kAW8.d.ts} +2 -2
  72. package/dist/{review-paragraph-order-BlSnyg9a.d.ts → review-paragraph-order--jLHXIcd.d.ts} +3 -3
  73. package/dist/{revision-projection-JiDclAFU.d.ts → revision-projection-BIHO_qvw.d.ts} +1 -1
  74. package/dist/{semantic-cell-selection-C-VsxNee.d.ts → semantic-cell-selection-lCYAVCCF.d.ts} +6 -24
  75. package/dist/{semantic-interaction-2vPh96Ey.d.ts → semantic-interaction-0vQXcMZk.d.ts} +2 -19
  76. package/dist/{semantic-paint-BEjYcsPK.d.ts → semantic-paint-BSan4pBk.d.ts} +10 -2
  77. package/dist/{semantic-records-Bc-MGXbM.d.ts → semantic-records-ZcYuB4-H.d.ts} +59 -13
  78. package/dist/store.cjs +1 -1
  79. package/dist/store.d.ts +49 -42
  80. package/dist/store.js +1 -1
  81. package/dist/{tree-op-types-C71G7rIv.d.ts → tree-op-types-DbdM7fJV.d.ts} +84 -4
  82. package/dist/{tree-package-fragment-DRJkmfTW.d.ts → tree-package-fragment-1pdDnhZ_.d.ts} +491 -23
  83. package/dist/{tree-session-contract-Cp5W25RC.d.ts → tree-session-contract-Cgn6fQ-M.d.ts} +34 -9
  84. package/package.json +4 -4
  85. package/dist/chunk-27YEILW4.cjs +0 -20
  86. package/dist/chunk-4RDCLCLB.js +0 -2
  87. package/dist/chunk-7QG5FJ4X.js +0 -1
  88. package/dist/chunk-BML3CNUT.js +0 -2
  89. package/dist/chunk-CHRMIA3I.js +0 -20
  90. package/dist/chunk-FRRMJK2G.js +0 -5
  91. package/dist/chunk-G5GLQ4SX.cjs +0 -1
  92. package/dist/chunk-JP253KIZ.cjs +0 -2
  93. package/dist/chunk-JROG4U3Z.cjs +0 -21
  94. package/dist/chunk-MBXGQN6J.js +0 -1
  95. package/dist/chunk-MDMM3XVQ.js +0 -11
  96. package/dist/chunk-NPZX5O23.cjs +0 -2
  97. package/dist/chunk-OISZDVXT.cjs +0 -5
  98. package/dist/chunk-PRNYSOQL.cjs +0 -1
  99. package/dist/chunk-RXPOTTQQ.js +0 -21
  100. package/dist/chunk-T7JERNXT.cjs +0 -2
  101. package/dist/chunk-TDMGSCCL.cjs +0 -1
  102. package/dist/chunk-VYQTZIYH.js +0 -1
  103. package/dist/chunk-W7GY2IJC.js +0 -2
  104. package/dist/chunk-ZFBNCHRP.cjs +0 -11
  105. package/dist/hf-references-kSSFMq9X.d.ts +0 -70
  106. package/dist/tree-store-BRfhZceK.d.ts +0 -416
  107. /package/dist/{dist-OSUJGKTK.js → dist-PKZR6RSH.js} +0 -0
@@ -1,5 +1,18 @@
1
- import { H as HeaderFooterVariant } from './hf-references-kSSFMq9X.js';
2
- import { N as NoteKind } from './tree-store-BRfhZceK.js';
1
+ import { A as AutomationTableMutation } from './tree-op-types-DbdM7fJV.js';
2
+ import { H as HeaderFooterVariant, N as NoteKind } from './tree-package-fragment-1pdDnhZ_.js';
3
+
4
+ interface AutomationInlinePictureRead {
5
+ readonly width: number;
6
+ readonly height: number;
7
+ readonly lockAspectRatio: boolean;
8
+ readonly altTextDescription: string;
9
+ }
10
+ interface AutomationInlinePictureWrite {
11
+ readonly width?: number;
12
+ readonly height?: number;
13
+ readonly lockAspectRatio?: boolean;
14
+ readonly altTextDescription?: string;
15
+ }
3
16
 
4
17
  /** Alignment as this protocol publishes it. `Mixed`/`Unknown` are read-only answers. */
5
18
  type AutomationAlignment = 'Mixed' | 'Unknown' | 'Left' | 'Centered' | 'Right' | 'Justified';
@@ -13,6 +26,11 @@ type AutomationAlignment = 'Mixed' | 'Unknown' | 'Left' | 'Centered' | 'Right' |
13
26
  interface AutomationFontRead {
14
27
  readonly bold: boolean | null;
15
28
  readonly italic: boolean | null;
29
+ readonly underline: string | null;
30
+ readonly strikeThrough: boolean | null;
31
+ readonly highlightColor: string | null;
32
+ readonly subscript: boolean | null;
33
+ readonly superscript: boolean | null;
16
34
  /** `w:rFonts/@w:ascii`. */
17
35
  readonly name: string | null;
18
36
  /** Points. */
@@ -24,6 +42,11 @@ interface AutomationFontRead {
24
42
  interface AutomationFontWrite {
25
43
  readonly bold?: boolean;
26
44
  readonly italic?: boolean;
45
+ readonly underline?: string;
46
+ readonly strikeThrough?: boolean;
47
+ readonly highlightColor?: string | null;
48
+ readonly subscript?: boolean;
49
+ readonly superscript?: boolean;
27
50
  readonly name?: string;
28
51
  readonly size?: number;
29
52
  readonly color?: string;
@@ -73,6 +96,118 @@ interface AutomationParagraphFormatWrite {
73
96
  readonly widowControl?: boolean;
74
97
  }
75
98
 
99
+ type AutomationListBullet = 'Custom' | 'Solid' | 'Hollow' | 'Square' | 'Diamonds' | 'Arrow' | 'Checkmark';
100
+ type AutomationListNumbering = 'None' | 'Arabic' | 'UpperRoman' | 'LowerRoman' | 'UpperLetter' | 'LowerLetter';
101
+ interface AutomationListLevelFormat {
102
+ readonly bullet?: AutomationListBullet;
103
+ readonly charCode?: number;
104
+ readonly fontName?: string;
105
+ readonly numbering?: AutomationListNumbering;
106
+ readonly formatString?: readonly (string | number)[];
107
+ readonly startingNumber?: number;
108
+ readonly textIndent?: number;
109
+ readonly bulletNumberPictureIndent?: number;
110
+ }
111
+
112
+ /** Table, picture, field, break, and list authoring transport operations. */
113
+ type AutomationAuthoringOperation = {
114
+ readonly op: 'getFields';
115
+ readonly span: AutomationSpanRef;
116
+ } | {
117
+ readonly op: 'getField' | 'deleteField' | 'updateFieldResult';
118
+ readonly field: AutomationHandle;
119
+ } | {
120
+ readonly op: 'setFieldCode';
121
+ readonly field: AutomationHandle;
122
+ readonly code: string;
123
+ } | {
124
+ readonly op: 'insertField';
125
+ readonly span: AutomationSpanRef;
126
+ readonly location: 'Before' | 'After' | 'Start' | 'End' | 'Replace';
127
+ readonly fieldType?: string;
128
+ readonly text?: string;
129
+ readonly removeFormatting?: boolean;
130
+ } | {
131
+ readonly op: 'getTables';
132
+ readonly scope: AutomationSpanRef;
133
+ } | {
134
+ readonly op: 'getTable' | 'getTableRows';
135
+ readonly table: AutomationHandle;
136
+ } | {
137
+ readonly op: 'getTableCells';
138
+ readonly row: AutomationHandle;
139
+ } | {
140
+ readonly op: 'getTableCell';
141
+ readonly table: AutomationHandle;
142
+ readonly rowIndex: number;
143
+ readonly cellIndex: number;
144
+ } | {
145
+ readonly op: 'getTableCellProperties' | 'getTableCellBody';
146
+ readonly cell: AutomationHandle;
147
+ } | {
148
+ readonly op: 'updateTable';
149
+ readonly table: AutomationHandle;
150
+ readonly mutation: Exclude<AutomationTableMutation, {
151
+ kind: 'cell';
152
+ }>;
153
+ } | {
154
+ readonly op: 'updateTableCell';
155
+ readonly cell: AutomationHandle;
156
+ readonly properties: Omit<Extract<AutomationTableMutation, {
157
+ kind: 'cell';
158
+ }>, 'kind' | 'cellId'>;
159
+ } | {
160
+ readonly op: 'insertTable';
161
+ readonly span: AutomationSpanRef;
162
+ readonly location: 'Before' | 'After';
163
+ readonly rowCount: number;
164
+ readonly columnCount: number;
165
+ readonly values?: readonly (readonly string[])[];
166
+ } | {
167
+ readonly op: 'getInlinePictures';
168
+ readonly span: AutomationSpanRef;
169
+ } | {
170
+ readonly op: 'getInlinePicture';
171
+ readonly picture: AutomationHandle;
172
+ } | {
173
+ readonly op: 'setInlinePicture';
174
+ readonly picture: AutomationHandle;
175
+ readonly properties: AutomationInlinePictureWrite;
176
+ } | {
177
+ readonly op: 'deleteInlinePicture';
178
+ readonly picture: AutomationHandle;
179
+ } | {
180
+ readonly op: 'insertInlinePicture';
181
+ readonly span: AutomationSpanRef;
182
+ readonly base64: string;
183
+ readonly location: 'Before' | 'After' | 'Start' | 'End' | 'Replace';
184
+ } | {
185
+ readonly op: 'insertBreak';
186
+ readonly span: AutomationSpanRef;
187
+ readonly breakType: string;
188
+ readonly location: string;
189
+ } | {
190
+ readonly op: 'startNewList';
191
+ readonly paragraph: AutomationHandle;
192
+ } | {
193
+ readonly op: 'attachToList';
194
+ readonly paragraph: AutomationHandle;
195
+ readonly listId: number;
196
+ readonly level: number;
197
+ } | {
198
+ readonly op: 'detachFromList';
199
+ readonly paragraph: AutomationHandle;
200
+ } | {
201
+ readonly op: 'setListLevelFormat';
202
+ readonly list: AutomationHandle;
203
+ readonly level: number;
204
+ readonly format: AutomationListLevelFormat;
205
+ } | {
206
+ readonly op: 'getRange';
207
+ readonly span: AutomationSpanRef;
208
+ readonly location: 'Whole' | 'Content' | 'Start' | 'End' | 'Before' | 'After';
209
+ };
210
+
76
211
  /**
77
212
  * Which way round a page is, in OOXML's own lower-case spelling.
78
213
  *
@@ -232,7 +367,7 @@ type AutomationSelectionMode = 'select' | 'start' | 'end';
232
367
  * Reads never open a transaction; commands in one batch commit together. Handles are NAMES the
233
368
  * host minted, never pointers, so an operation is plain transport data.
234
369
  */
235
- type AutomationOperation = {
370
+ type AutomationOperation = AutomationAuthoringOperation | {
236
371
  readonly op: 'getChangeTrackingMode';
237
372
  } | {
238
373
  readonly op: 'setChangeTrackingMode';
@@ -971,6 +1106,8 @@ type AutomationOperation = {
971
1106
  /** Author tag, title or lock. An omitted member is left as it is; `null` removes it. */
972
1107
  | {
973
1108
  readonly op: 'setContentControlProperties';
1109
+ readonly cannotEdit?: boolean;
1110
+ readonly cannotDelete?: boolean;
974
1111
  readonly contentControl: AutomationHandle;
975
1112
  readonly tag?: string | null;
976
1113
  readonly title?: string | null;
@@ -998,6 +1135,7 @@ type AutomationOperation = {
998
1135
  /** Wrap a span in a new control of the named type. */
999
1136
  | {
1000
1137
  readonly op: 'insertContentControl';
1138
+ readonly returnHandle?: boolean;
1001
1139
  readonly span: AutomationSpanRef;
1002
1140
  readonly subtype: AutomationContentControlSubtype;
1003
1141
  readonly tag?: string;
@@ -1060,9 +1198,9 @@ interface AutomationCustomNodePayload {
1060
1198
  /** Just the `op` discriminants of {@link AutomationOperation}, for dispatch tables. */
1061
1199
  type AutomationOperationKind = AutomationOperation['op'];
1062
1200
  /** Operations that read. They never open a transaction. */
1063
- declare const AUTOMATION_QUERY_OPERATIONS: readonly ["getChangeTrackingMode", "getDocument", "getBody", "getParagraphs", "getSpanParagraphs", "getText", "getSpanText", "getParagraphId", "search", "getFont", "getParagraphFormat", "getStyle", "getSections", "getPageSetup", "getFurniture", "getNotes", "getNoteBody", "getNoteText", "getNoteKind", "getLists", "getListId", "getListById", "getListParagraphs", "getParagraphList", "getListLevel", "getHyperlink", "getBookmarks", "getBookmarkName", "getBookmarkRange", "getComments", "getCommentReplies", "getCommentId", "getCommentAuthor", "getCommentDate", "getCommentText", "getCommentRange", "getCommentResolved", "getRevisions", "getRevisionType", "getRevisionAuthor", "getRevisionDate", "getRevisionRange", "getContentControls", "getContentControlById", "getContentControlsByTag", "getContentControlsByTitle", "getContentControlTag", "getContentControlTitle", "getContentControlFileId", "getContentControlSubtype", "getContentControlLock", "getContentControlIsBound", "getContentControlPlaceholderShown", "getContentControlTemporary", "getContentControlText", "getContentControlParagraphs", "getContentControlRange"];
1201
+ declare const AUTOMATION_QUERY_OPERATIONS: readonly ["getTables", "getTable", "getTableRows", "getTableCells", "getTableCell", "getTableCellProperties", "getTableCellBody", "getFields", "getField", "getInlinePictures", "getInlinePicture", "getChangeTrackingMode", "getDocument", "getBody", "getParagraphs", "getRange", "getSpanParagraphs", "getText", "getSpanText", "getParagraphId", "search", "getFont", "getParagraphFormat", "getStyle", "getSections", "getPageSetup", "getFurniture", "getNotes", "getNoteBody", "getNoteText", "getNoteKind", "getLists", "getListId", "getListById", "getListParagraphs", "getParagraphList", "getListLevel", "getHyperlink", "getBookmarks", "getBookmarkName", "getBookmarkRange", "getComments", "getCommentReplies", "getCommentId", "getCommentAuthor", "getCommentDate", "getCommentText", "getCommentRange", "getCommentResolved", "getRevisions", "getRevisionType", "getRevisionAuthor", "getRevisionDate", "getRevisionRange", "getContentControls", "getContentControlById", "getContentControlsByTag", "getContentControlsByTitle", "getContentControlTag", "getContentControlTitle", "getContentControlFileId", "getContentControlSubtype", "getContentControlLock", "getContentControlIsBound", "getContentControlPlaceholderShown", "getContentControlTemporary", "getContentControlText", "getContentControlParagraphs", "getContentControlRange"];
1064
1202
  /** Operations that write. Every one of these goes through the single transaction path. */
1065
- declare const AUTOMATION_COMMAND_OPERATIONS: readonly ["setChangeTrackingMode", "proposeInsertion", "proposeDeletion", "proposeReplacement", "insertText", "replaceSpan", "replaceStoryBlocks", "insertParagraph", "splitParagraph", "deleteParagraph", "selectSpan", "selectBookmark", "setFont", "setParagraphFormat", "setStyle", "setPageSetup", "deleteNote", "setListLevel", "insertListParagraph", "setHyperlink", "insertComment", "setCommentResolved", "replyToComment", "deleteComment", "acceptRevision", "rejectRevision", "acceptAllRevisions", "rejectAllRevisions", "setContentControlValue", "setContentControlProperties", "deleteContentControl", "insertContentControlText", "insertContentControl", "insertCustomNode"];
1203
+ declare const AUTOMATION_COMMAND_OPERATIONS: readonly ["insertTable", "updateTable", "updateTableCell", "setInlinePicture", "deleteInlinePicture", "insertField", "setFieldCode", "deleteField", "updateFieldResult", "insertInlinePicture", "insertBreak", "setChangeTrackingMode", "proposeInsertion", "proposeDeletion", "proposeReplacement", "insertText", "replaceSpan", "replaceStoryBlocks", "insertParagraph", "splitParagraph", "deleteParagraph", "selectSpan", "selectBookmark", "setFont", "setParagraphFormat", "setStyle", "setPageSetup", "deleteNote", "setListLevel", "startNewList", "attachToList", "detachFromList", "setListLevelFormat", "insertListParagraph", "setHyperlink", "insertComment", "setCommentResolved", "replyToComment", "deleteComment", "acceptRevision", "rejectRevision", "acceptAllRevisions", "rejectAllRevisions", "setContentControlValue", "setContentControlProperties", "deleteContentControl", "insertContentControlText", "insertContentControl", "insertCustomNode"];
1066
1204
  /**
1067
1205
  * Commands that commit as a PACKAGE transaction and therefore share a batch with nothing.
1068
1206
  *
@@ -1072,7 +1210,7 @@ declare const AUTOMATION_COMMAND_OPERATIONS: readonly ["setChangeTrackingMode",
1072
1210
  * beside a story command, would be two commits: two revisions, and a moment where half the
1073
1211
  * caller's batch is published. Refused while planning instead.
1074
1212
  */
1075
- declare const AUTOMATION_SOLITARY_OPERATIONS: readonly ["deleteNote", "insertComment", "setCommentResolved", "replyToComment", "insertCustomNode"];
1213
+ declare const AUTOMATION_SOLITARY_OPERATIONS: readonly ["insertTable", "insertInlinePicture", "insertBreak", "startNewList", "deleteNote", "insertComment", "setCommentResolved", "replyToComment", "insertCustomNode"];
1076
1214
  /** Whether an operation must be the only one in its batch. */
1077
1215
  declare function isSolitaryAutomationCommand(operation: AutomationOperation): boolean;
1078
1216
  /** Whether an operation writes. Drives the query/command split inside one batch. */
@@ -1084,7 +1222,7 @@ declare function isAutomationCommand(operation: AutomationOperation): boolean;
1084
1222
  * `body` is one STORY — the main body, a header or footer variant of a section, or one note — so
1085
1223
  * every object reached through a body is reached in a named story rather than in "the document".
1086
1224
  */
1087
- type AutomationObjectKind = 'document' | 'body' | 'paragraph' | 'section' | 'note' | 'comment' | 'revision' | 'bookmark' | 'list' | 'contentControl';
1225
+ type AutomationObjectKind = 'document' | 'body' | 'paragraph' | 'section' | 'note' | 'comment' | 'revision' | 'bookmark' | 'list' | 'contentControl' | 'table' | 'tableRow' | 'tableCell' | 'field' | 'inlinePicture';
1088
1226
  declare const AUTOMATION_HANDLE_BRAND: unique symbol;
1089
1227
  /**
1090
1228
  * An opaque host-minted name for a document object.
@@ -1222,6 +1360,31 @@ interface AutomationSpan {
1222
1360
  }
1223
1361
  /** What an operation answered with. */
1224
1362
  type AutomationValue = {
1363
+ readonly kind: 'field';
1364
+ readonly field: {
1365
+ readonly code: string;
1366
+ };
1367
+ } | {
1368
+ readonly kind: 'table';
1369
+ readonly table: {
1370
+ readonly values: readonly (readonly string[])[];
1371
+ readonly style: string;
1372
+ readonly headerRowCount: number;
1373
+ readonly rowCount: number;
1374
+ readonly columnCount: number;
1375
+ };
1376
+ } | {
1377
+ readonly kind: 'tableCell';
1378
+ readonly cell: {
1379
+ readonly value: string;
1380
+ readonly columnWidth: number;
1381
+ readonly shadingColor: string;
1382
+ readonly verticalAlignment: 'Top' | 'Center' | 'Bottom';
1383
+ };
1384
+ } | {
1385
+ readonly kind: 'inlinePicture';
1386
+ readonly picture: AutomationInlinePictureRead;
1387
+ } | {
1225
1388
  readonly kind: 'handle';
1226
1389
  readonly handle: AutomationHandle;
1227
1390
  } | {
@@ -1375,6 +1538,8 @@ interface AutomationHost {
1375
1538
  * nothing is written at all.
1376
1539
  */
1377
1540
  execute(request: AutomationBatchRequest): AutomationBatchResponse;
1541
+ /** Settle optional pagination resources before a field-update batch. Does not write content. */
1542
+ prepare?(request: AutomationBatchRequest): Promise<void>;
1378
1543
  /** The current document as DOCX bytes, through the normalizing serializer. */
1379
1544
  save(): AutomationSaveResult;
1380
1545
  /** Change notification. Returns an unsubscribe that is safe to call more than once. */
@@ -1,4 +1,4 @@
1
- import { c as OoxmlElement, O as OoxmlPart, b as OoxmlPackage, R as RevisionAddress } from './tree-op-types-C71G7rIv.js';
1
+ import { e as OoxmlElement, O as OoxmlPart, b as OoxmlPackage, R as RevisionAddress } from './tree-op-types-DbdM7fJV.js';
2
2
 
3
3
  /** The `w15` namespace: `commentsExtended.xml` — thread parent and resolved state. */
4
4
  declare const W15_NAMESPACE_URI = "http://schemas.microsoft.com/office/word/2012/wordml";
@@ -367,4 +367,4 @@ declare function activeReviewItem(items: readonly ReviewItem[], position: Review
367
367
  */
368
368
  declare function reviewThreadRootOf(items: readonly ReviewItem[], comment: ReviewCommentItem): ReviewItem;
369
369
 
370
- export { type CommentRecord as C, type ReviewModelInput as R, W15_NAMESPACE_URI as W, type ReviewItem as a, type ReviewRevisionItem as b, type ReviewCommentItem as c, type ReviewCustomItem as d, type ReviewPosition as e, type ReviewRange as f, type ReviewRevisionKind as g, type CommentThreadState as h, type CommentAnchor as i, type CommentPosition as j, commentAnchorsOfStory as k, commentsOfPart as l, firstReviewRange as m, hasAnyComment as n, reviewItemRanges as o, activeReviewItem as p, reviewItemPositionRank as q, reviewItemKey as r, reviewItemsAt as s, threadStateOfPart as t, reviewThreadRootOf as u };
370
+ export { type CommentRecord as C, type ReviewModelInput as R, W15_NAMESPACE_URI as W, type ReviewItem as a, type ReviewRevisionItem as b, type ReviewCommentItem as c, type ReviewCustomItem as d, type ReviewPosition as e, type ReviewRange as f, type ReviewRevisionKind as g, type CommentAnchor as h, type CommentPosition as i, type CommentThreadState as j, activeReviewItem as k, firstReviewRange as l, reviewItemPositionRank as m, reviewItemRanges as n, reviewItemsAt as o, reviewThreadRootOf as p, commentAnchorsOfStory as q, reviewItemKey as r, commentsOfPart as s, hasAnyComment as t, threadStateOfPart as u };
@@ -1,5 +1,5 @@
1
- import { a as OoxmlNode, c as OoxmlElement, r as OoxmlContentControlNode, e as OoxmlGenericElementNode, s as OoxmlContentControlContentNode, O as OoxmlPart } from './tree-op-types-C71G7rIv.js';
2
- import { C as CommentRecord } from './review-items-CiliAz8H.js';
1
+ import { a as OoxmlNode, e as OoxmlElement, i as OoxmlContentControlNode, d as OoxmlGenericElementNode, j as OoxmlContentControlContentNode, O as OoxmlPart } from './tree-op-types-DbdM7fJV.js';
2
+ import { C as CommentRecord } from './review-items-CJz-kAW8.js';
3
3
 
4
4
  /** Nested content-control wrappers deeper than this stop flattening; content stays preserved. */
5
5
  declare const MAX_CONTENT_CONTROL_NESTING = 32;
@@ -76,4 +76,4 @@ declare function paragraphOrderOfPart(part: OoxmlPart): ReadonlyMap<string, numb
76
76
  */
77
77
  declare function deepParagraphOrderOfPart(part: OoxmlPart): ReadonlyMap<string, number>;
78
78
 
79
- export { MAX_CONTENT_CONTROL_NESTING as M, commentBodyText as a, commentInitials as b, collectFlowBlocks as c, contentControlContentOf as d, deepParagraphOrderOfPart as e, isContentControlContent as f, walkParagraphInline as g, walkStoryBlocks as h, isContentControl as i, contentControlContentChildren as j, paragraphOrderOfPart as p, walkAllStoryParagraphs as w };
79
+ export { MAX_CONTENT_CONTROL_NESTING as M, commentBodyText as a, commentInitials as b, collectFlowBlocks as c, contentControlContentChildren as d, isContentControlContent as e, contentControlContentOf as f, deepParagraphOrderOfPart as g, walkParagraphInline as h, isContentControl as i, walkStoryBlocks as j, paragraphOrderOfPart as p, walkAllStoryParagraphs as w };
@@ -1,4 +1,4 @@
1
- import { a as OoxmlNode } from './tree-op-types-C71G7rIv.js';
1
+ import { a as OoxmlNode } from './tree-op-types-DbdM7fJV.js';
2
2
 
3
3
  /**
4
4
  * What a revision wrapper asserts about the content inside it.
@@ -1,7 +1,7 @@
1
- import { O as OoxmlPart, c as OoxmlElement, a as OoxmlNode } from './tree-op-types-C71G7rIv.js';
2
- import { P as PageGeometry, I as InlineDrawingRecord, A as AnchoredDrawingRecord, T as TextMeasurer, L as LineRecord, a as StyleSpanRecord, S as SemanticLayout, C as ContentControlBoundaryRecord, b as TableRowFragmentRecord, c as TableCellFragmentRecord } from './semantic-records-Bc-MGXbM.js';
3
- import { R as RevisionDisplayMode, a as RevisionAuthorFilter } from './revision-projection-JiDclAFU.js';
4
- import { S as SemanticPosition, C as CaretGeometry, a as SemanticSelection } from './semantic-interaction-2vPh96Ey.js';
1
+ import { O as OoxmlPart, e as OoxmlElement, a as OoxmlNode } from './tree-op-types-DbdM7fJV.js';
2
+ import { P as PageGeometry, I as InlineDrawingRecord, A as AnchoredDrawingRecord, T as TextMeasurer, L as LineRecord, a as StyleSpanRecord, S as SemanticLayout, C as ContentControlBoundaryRecord, b as TableRowFragmentRecord, c as TableCellFragmentRecord } from './semantic-records-ZcYuB4-H.js';
3
+ import { R as RevisionDisplayMode, a as RevisionAuthorFilter } from './revision-projection-BIHO_qvw.js';
4
+ import { S as SemanticPosition, C as CaretGeometry, a as SemanticSelection } from './semantic-interaction-0vQXcMZk.js';
5
5
 
6
6
  /**
7
7
  * Hard ceiling on sections enumerated from a document (matches write-path
@@ -282,26 +282,8 @@ declare function hitTestSheet(layout: SemanticLayout, point: HitPoint, options?:
282
282
  */
283
283
  declare function contentControlAtPoint(layout: SemanticLayout, pageIndex: number, point: HitPoint): ContentControlBoundaryRecord | null;
284
284
  /**
285
- * The end position of a line, as Word places it.
286
- *
287
- * On a SOFT-WRAPPED line the space that caused the break is painted at the end of the line
288
- * but the caret belongs before it — otherwise clicking in the right margin puts the caret
289
- * visually at the start of the NEXT line, which reads as the click having missed. The last
290
- * line of a paragraph has no such space to discount.
291
- *
292
- * A HARD BREAK is the same story with a character that is always there: the position after
293
- * it belongs to the line the break opened (`caretAt` places it there), so a click in the
294
- * right margin of the line the break ENDED has to stop in front of it or the caret appears
295
- * a row below the click.
296
- *
297
- * A PAGE break is discounted even on the paragraph's LAST line, which is the one case the
298
- * last-line shortcut got wrong. The position after such a break is on the next page — and
299
- * when the remainder is empty it has no line anywhere, because Word Online starts the
300
- * following block flush at the top of that page. So the caret for it stays behind on the
301
- * line the break ended, and a click in the wide blank space beside the mark resolved to a
302
- * position a page away from where it landed: the caret appeared under the pointer and the
303
- * typing came out on the next page. `<w:p><w:r><w:br w:type="page"/></w:r></w:p>` is the
304
- * commonest way to end a page, so that blank space is most of a page wide.
285
+ * Logical line end, excluding the wrap space or hard break whose following position
286
+ * belongs to the next line. Page breaks are excluded even on the paragraph's last line.
305
287
  */
306
288
  declare function lineEndOffset(layout: SemanticLayout, line: LineRecord): number;
307
289
  /**
@@ -1,4 +1,4 @@
1
- import { T as TextMeasurer, S as SemanticLayout, B as BlockFragmentRecord, C as ContentControlBoundaryRecord, a as StyleSpanRecord } from './semantic-records-Bc-MGXbM.js';
1
+ import { T as TextMeasurer, S as SemanticLayout, B as BlockFragmentRecord, C as ContentControlBoundaryRecord, a as StyleSpanRecord } from './semantic-records-ZcYuB4-H.js';
2
2
 
3
3
  /** A caret position in the model. */
4
4
  interface SemanticPosition {
@@ -102,24 +102,7 @@ type NavigationCommand = 'left' | 'right' | 'up' | 'down' | 'wordLeft' | 'wordRi
102
102
  * motion in the interaction lane instead of making it a second consumer of the model.
103
103
  */
104
104
  declare function paragraphTextFromLayout(layout: SemanticLayout, paragraphId: string): string;
105
- /**
106
- * Paragraph offsets a WORD may not run through: the edges of every struck half on screen.
107
- *
108
- * Deleted text is the one thing a view paints that does not exist in the document the reader
109
- * is heading towards — it is the OTHER version, spliced in beside the proposal so the two can
110
- * be compared. Its characters are therefore not adjacent to their neighbours in any single
111
- * version, however adjacent they look.
112
- *
113
- * A replacement is where that stops being pedantic. Word writes one as a deletion immediately
114
- * followed by an insertion, with no separator between them, so `ALL CAPS` struck and `fsdfsd`
115
- * added read as the single word `CAPSfsdfsd`: a double-click on the old text selected the new
116
- * text with it, across a decision the reader had not taken. Feeding these to `wordBoundary`
117
- * makes each half its own word.
118
- *
119
- * Only the halves this view actually renders contribute. `proposed` paints no deletion, so it
120
- * has no seams and this answers empty — which is also why the walk reads the LAYOUT rather
121
- * than the tree.
122
- */
105
+ /** Visible deletion boundaries split words without changing canonical text offsets. */
123
106
  declare function deletedTextBoundaries(layout: SemanticLayout, paragraphId: string): ReadonlySet<number>;
124
107
  /** Story-scoped stops are required when navigating inside an open header or footer. */
125
108
  interface MoveCaretOptions {
@@ -1,5 +1,5 @@
1
- import { C as ContentControlBoundaryRecord, S as SemanticLayout } from './semantic-records-Bc-MGXbM.js';
2
- import { V as ValidatedImageBytesHandle, t as RenderableImageMime } from './tree-op-types-C71G7rIv.js';
1
+ import { C as ContentControlBoundaryRecord, S as SemanticLayout } from './semantic-records-ZcYuB4-H.js';
2
+ import { V as ValidatedImageBytesHandle, k as RenderableImageMime } from './tree-op-types-DbdM7fJV.js';
3
3
 
4
4
  /**
5
5
  * Everything a host can say about ONE author's presentation. Every field is optional and
@@ -21,6 +21,14 @@ interface RevisionAuthorStyle {
21
21
  color?: string;
22
22
  /** Background wash behind this author's changes in the document. */
23
23
  background?: string;
24
+ /**
25
+ * Background of the highlight band over this author's OPEN change — the one the caret
26
+ * is in. Applied inline, so it outranks the `--doc-revision-*-active-bg` kind tokens,
27
+ * and the kind-coloured rule under the band goes with it: a custom background with a
28
+ * green or red rule beneath it would contradict the decoration it sits behind, and a
29
+ * `transparent` that left a floating rule would not read as cleared at all.
30
+ */
31
+ activeBackground?: string;
24
32
  /**
25
33
  * Class names added to every painted span of this author's changes, for styling the
26
34
  * typed fields do not cover. Keep the rules metric-safe (outlines, shadows, accents):
@@ -1,6 +1,6 @@
1
- import { b as RevisionAttribution, R as RevisionDisplayMode, a as RevisionAuthorFilter } from './revision-projection-JiDclAFU.js';
2
- import { q as OoxmlProperty, c as OoxmlElement, a as OoxmlNode, O as OoxmlPart, U as TableBorderStyle, x as ImageResourceState, W as DrawingAccessibility, X as DrawingImageEffects, S as SourceCrop, Y as DrawingTransform, Z as VectorShapeProjection, z as DrawingHorizontalReferenceFrame, A as DrawingVerticalReferenceFrame, u as ImageWrapTarget, _ as DrawingProjection, $ as OoxmlDrawingNode } from './tree-op-types-C71G7rIv.js';
3
- import { O as OmmlEquationProjection } from './omml-equation-C9AJfWy5.js';
1
+ import { b as RevisionAttribution, R as RevisionDisplayMode, a as RevisionAuthorFilter } from './revision-projection-BIHO_qvw.js';
2
+ import { h as OoxmlProperty, e as OoxmlElement, a as OoxmlNode, O as OoxmlPart, X as TableBorderStyle, o as ImageResourceState, Y as DrawingAccessibility, Z as DrawingImageEffects, S as SourceCrop, _ as DrawingTransform, $ as VectorShapeProjection, q as DrawingHorizontalReferenceFrame, r as DrawingVerticalReferenceFrame, I as ImageWrapTarget, a0 as DrawingProjection, a1 as OoxmlDrawingNode } from './tree-op-types-DbdM7fJV.js';
3
+ import { O as OmmlEquationProjection } from './omml-equation-hcP9AUFX.js';
4
4
 
5
5
  /** Soft ceiling on abstractNum / num entries read from one part. */
6
6
  declare const MAX_NUMBERING_DEFINITIONS = 512;
@@ -17,6 +17,13 @@ type ListMarkerAlign = 'left' | 'center' | 'right';
17
17
  * must not overwrite an inherited `hanging` with a synthesized zero.
18
18
  */
19
19
  interface NumberingLevelIndent {
20
+ /** Authored physical/logical sides, in points, before paragraph direction resolves them. */
21
+ readonly authored?: {
22
+ readonly left?: number;
23
+ readonly right?: number;
24
+ readonly start?: number;
25
+ readonly end?: number;
26
+ };
20
27
  readonly left: number;
21
28
  readonly right: number;
22
29
  readonly hanging: number;
@@ -276,6 +283,16 @@ interface ResolvedRunStyle {
276
283
  * slot-homogeneous pieces happens downstream (`piecesOfParagraph`).
277
284
  */
278
285
  readonly fontFamilyEastAsia: string | null;
286
+ /** Script and paragraph-resolved direction for shaping and visual placement. */
287
+ readonly shaping?: {
288
+ readonly script: string;
289
+ readonly direction: 'ltr' | 'rtl';
290
+ readonly level: number;
291
+ readonly baseLevel: number;
292
+ /** Resolved w:rtl context; absent when authored Unicode controls govern the paragraph. */
293
+ readonly runDirection?: 'ltr' | 'rtl';
294
+ readonly wordSpacingPt?: number;
295
+ };
279
296
  /** Points. `w:sz` is half-points, so 22 becomes 11. */
280
297
  readonly fontSizePt: number;
281
298
  /** RRGGBB, or null for the inherited/automatic colour. */
@@ -340,6 +357,12 @@ interface ThemeFonts {
340
357
  readonly majorEastAsia?: string | null;
341
358
  /** `a:minorFont` east asian typeface (`a:ea`) — body text. Optional for back-compat. */
342
359
  readonly minorEastAsia?: string | null;
360
+ /** Complex-script heading and body theme faces. */
361
+ readonly majorBidi?: string | null;
362
+ readonly minorBidi?: string | null;
363
+ /** Language-specific theme faces, keyed by ISO 15924 script. */
364
+ readonly majorSupplemental?: Readonly<Record<string, string>>;
365
+ readonly minorSupplemental?: Readonly<Record<string, string>>;
343
366
  }
344
367
  /**
345
368
  * Resolve one run's direct formatting.
@@ -1087,6 +1110,9 @@ type HyperlinkProjector = (link: OoxmlNode) => SpanLinkRecord | null;
1087
1110
  */
1088
1111
  type FieldLinkProjector = (spec: HyperlinkFieldSpec) => SpanLinkRecord | null;
1089
1112
 
1113
+ /** Horizontal alignment of a paragraph (`w:jc`, ECMA-376 §17.3.1.13). */
1114
+ type Alignment = 'left' | 'center' | 'right' | 'both';
1115
+
1090
1116
  /** Document-wide East Asian line-break and whitespace policy. @public */
1091
1117
  interface CjkTypographySettings {
1092
1118
  /** Apply the strict Japanese small-kana and prolonged-sound-mark restrictions. */
@@ -1348,9 +1374,6 @@ interface DrawingGeometry {
1348
1374
  readonly effectInsets: DrawingInsets;
1349
1375
  }
1350
1376
 
1351
- /** Horizontal alignment of a paragraph (`w:jc`, ECMA-376 §17.3.1.13). */
1352
- type Alignment = 'left' | 'center' | 'right' | 'both';
1353
-
1354
1377
  /** Test-only mutable counters; omitted by production call sites. Not package-public. */
1355
1378
  interface TableBorderGridResolveWork {
1356
1379
  /** Sparse intervals emitted (not dense column slots). */
@@ -2110,13 +2133,10 @@ interface SemanticTableCell {
2110
2133
  readonly legacyContentAlignment?: true;
2111
2134
  /** Clamped to [1, MAX_TABLE_COLUMNS] at read time; layout never re-derives it. */
2112
2135
  readonly gridSpan: number;
2113
- /**
2114
- * Absolute grid column this cell starts on, after `w:gridBefore` and every preceding
2115
- * span. Structural conditional formats and cell geometry both key on this, never on the
2116
- * cell's position in the row: one `gridSpan` cell otherwise shifts firstCol/lastCol and
2117
- * the vertical bands for every cell after it.
2118
- */
2136
+ /** Physical grid column after width/style resolution and the bidiVisual projection. */
2119
2137
  readonly gridColumn: number;
2138
+ /** Stored grid index when bidiVisual maps this cell into a physical RTL grid. */
2139
+ readonly logicalGridColumn?: number;
2120
2140
  /** Canonical `w:gridCol` node id for this cell's start column, when the grid is authored. */
2121
2141
  readonly gridColumnId?: string;
2122
2142
  /** A vMerge cell that is not the restart continues the cell above: box, no content. */
@@ -2181,6 +2201,8 @@ interface SemanticTableRow {
2181
2201
  * spans — vertical merges and column spans are already accounted for.
2182
2202
  */
2183
2203
  interface SemanticTableStructure {
2204
+ /** Whether stored columns and horizontal table properties display right to left. */
2205
+ readonly bidiVisual?: true;
2184
2206
  readonly columnWidthsPt: readonly number[];
2185
2207
  readonly rows: readonly SemanticTableRow[];
2186
2208
  /** Verified pre-2013 content-aligned full-width inline table; derived, never serialized. */
@@ -2429,6 +2451,13 @@ interface SpanLinkRecord {
2429
2451
  }
2430
2452
  /** A run of text on one line sharing identical resolved formatting. */
2431
2453
  interface StyleSpanRecord {
2454
+ /**
2455
+ * Horizontal ink displacement in points from box.x, before drawing the glyphs.
2456
+ * CJK opening punctuation removes its left side bearing; its advance and caret
2457
+ * boundaries remain box-based. Zero marks trailing-bearing compression with no
2458
+ * ink displacement. Exporters must apply this offset to the ink origin.
2459
+ */
2460
+ readonly glyphOffsetPt?: number;
2432
2461
  readonly range: SourceRange;
2433
2462
  readonly text: string;
2434
2463
  /** The run's authored properties, retained as evidence. */
@@ -2561,7 +2590,7 @@ interface LineRecord {
2561
2590
  * the caret each fell back to `box.x` and drew a centred empty paragraph's caret hard
2562
2591
  * against the left margin, where it stayed until the first character was typed.
2563
2592
  *
2564
- * Equal to the first span's x whenever there is one, so it is the single origin every
2593
+ * Equal to the leftmost span's x whenever there is one, so it is the single origin every
2565
2594
  * consumer can read without a spans-or-box fallback of its own.
2566
2595
  */
2567
2596
  readonly contentX: number;
@@ -2895,6 +2924,8 @@ interface TableCellFragmentRecord {
2895
2924
  readonly id: string;
2896
2925
  /** First grid column this cell occupies. */
2897
2926
  readonly gridColumn: number;
2927
+ /** Stored grid index for an RTL cell; gridColumn indexes physical columnEdges. */
2928
+ readonly logicalGridColumn?: number;
2898
2929
  /** Canonical `w:gridCol` node id for this cell's start column, when authored. */
2899
2930
  readonly gridColumnId?: string;
2900
2931
  /** Grid columns spanned, already clamped at read time. */
@@ -3197,6 +3228,21 @@ declare const DEFAULT_PAGE_GEOMETRY: PageGeometry;
3197
3228
  interface TextMeasurer {
3198
3229
  /** Advance width of `text` in the resolved style. */
3199
3230
  measure(text: string, style: ResolvedRunStyle): number;
3231
+ /**
3232
+ * Optional whole-span logical caret advances, indexed by UTF-16 offset. Values
3233
+ * are nondecreasing, start at zero, and end at the measured advance. Ligature
3234
+ * interiors may share an edge. Undefined selects a bounded approximate fallback.
3235
+ */
3236
+ caretAdvances?(text: string, style: ResolvedRunStyle): readonly number[] | undefined;
3237
+ /**
3238
+ * Optional conservative ink bounds for one grapheme, in points from its origin.
3239
+ * Includes size and horizontal scale, but not trailing character spacing.
3240
+ * Undefined keeps layout on the advance-only path.
3241
+ */
3242
+ inkBounds?(text: string, style: ResolvedRunStyle): {
3243
+ left: number;
3244
+ right: number;
3245
+ } | undefined;
3200
3246
  /** Line height and baseline for the resolved style. */
3201
3247
  lineMetrics(style: ResolvedRunStyle): {
3202
3248
  height: number;