@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,6 +1,4 @@
1
- import { b as OoxmlPackage, y as SupportedImageMime, O as OoxmlPart, C as RevisionAttributionInput, E as ImageDecodePort, F as DrawingTreeDocOp, p as TreeOpRejection, T as TreeDocOp } from './tree-op-types-C71G7rIv.js';
2
- import { c as HeaderFooterKind, H as HeaderFooterVariant } from './hf-references-kSSFMq9X.js';
3
- import { N as NoteKind, T as TreeModelChange, a as TreeDocumentStore, b as TreeStoryRef, c as TransactionContext, d as TransactOptions, S as SelectionMark, e as TreeDocumentCheckpoint } from './tree-store-BRfhZceK.js';
1
+ import { b as OoxmlPackage, p as SupportedImageMime, O as OoxmlPart, a as OoxmlNode, e as OoxmlElement, w as OoxmlParagraphNode, x as OoxmlNoteNode, y as OoxmlContinuationSeparatorNode, z as OoxmlEndnotesNode, B as OoxmlFootnotesNode, C as OoxmlNoteRefNode, E as OoxmlNoteReferenceNode, F as OoxmlSeparatorNode, u as RevisionAttributionInput, t as ImageDecodePort, G as DrawingTreeDocOp, H as ImpactClass, T as TreeDocOp, l as TreeOpRejection } from './tree-op-types-DbdM7fJV.js';
4
2
 
5
3
  /** A freshly allocated drawing property id, or the reason one could not be minted. */
6
4
  type DrawingPropertyIdResult = {
@@ -64,6 +62,73 @@ interface ExternalImageFetchPort {
64
62
  }>>;
65
63
  }
66
64
 
65
+ /** `w:headerReference w:type` vocabulary (ECMA-376 §17.10.5): default, first page, even pages. */
66
+ type HeaderFooterVariant = 'default' | 'first' | 'even';
67
+ /** Header vs footer region kind for chrome and lifecycle ops. */
68
+ type HeaderFooterKind = 'header' | 'footer';
69
+ /**
70
+ * A section's resolved header and footer parts, by variant.
71
+ *
72
+ * The `even` variant is only honoured when `w:evenAndOddHeaders` is set in settings.xml —
73
+ * without it Word ignores an authored even header, and so does this.
74
+ */
75
+ interface HeaderFooterParts {
76
+ readonly headers: ReadonlyMap<HeaderFooterVariant, OoxmlPart>;
77
+ readonly footers: ReadonlyMap<HeaderFooterVariant, OoxmlPart>;
78
+ /** `w:evenAndOddHeaders` in settings.xml — without it the `even` variant is ignored. */
79
+ readonly evenAndOddHeaders: boolean;
80
+ /** Whether this section enables first-page header/footer furniture (`w:titlePg`). */
81
+ readonly titlePage: boolean;
82
+ }
83
+ /**
84
+ * One resolved furniture slot with enough metadata for "Same as previous" chrome.
85
+ *
86
+ * `inherited: true` means this section has no declared reference for the slot and the
87
+ * part comes from a predecessor. The first section never reports inherited — omitting a
88
+ * ref there is blank furniture, not inheritance from a later section.
89
+ */
90
+ interface HeaderFooterSlotMeta {
91
+ readonly part: OoxmlPart;
92
+ readonly partName: string;
93
+ readonly rId: string;
94
+ readonly inherited: boolean;
95
+ }
96
+ /** Per-section resolution including declared-vs-inherited metadata. */
97
+ interface HeaderFooterSectionResolution {
98
+ readonly headers: ReadonlyMap<HeaderFooterVariant, HeaderFooterSlotMeta>;
99
+ readonly footers: ReadonlyMap<HeaderFooterVariant, HeaderFooterSlotMeta>;
100
+ readonly evenAndOddHeaders: boolean;
101
+ readonly titlePage: boolean;
102
+ }
103
+ /**
104
+ * `w:sectPr` nodes in section order, aligned with layout's `enumerateDocumentSections`.
105
+ *
106
+ * `null` means a section with no `w:sectPr` node (Word defaults, inherits HF from previous).
107
+ * Paragraph-level breaks first; the final entry covers remaining blocks (body-level or null).
108
+ */
109
+ declare function collectSectionPropertyNodes(root: OoxmlNode): Array<OoxmlElement | null>;
110
+ /**
111
+ * Resolve header/footer parts for every section with declared-vs-inherited metadata.
112
+ *
113
+ * Index aligns with `enumerateDocumentSections` in the layout package. Existing merged
114
+ * maps stay available via {@link resolveHeaderFooterPartsBySection}.
115
+ */
116
+ declare function resolveHeaderFooterResolutionBySection(pkg: OoxmlPackage): readonly HeaderFooterSectionResolution[];
117
+ /**
118
+ * Resolve header/footer parts for every section, applying OOXML inheritance.
119
+ *
120
+ * Index aligns with `enumerateDocumentSections` in the layout package.
121
+ */
122
+ declare function resolveHeaderFooterPartsBySection(pkg: OoxmlPackage): readonly HeaderFooterParts[];
123
+ /**
124
+ * Resolve the main-document header/footer references to their parts, gated by the
125
+ * settings the section actually declares.
126
+ *
127
+ * Returns the FINAL section's effective parts (after inheritance). Multi-section hosts
128
+ * should prefer `resolveHeaderFooterPartsBySection`.
129
+ */
130
+ declare function resolveHeaderFooterParts(pkg: OoxmlPackage): HeaderFooterParts;
131
+
67
132
  /** Lifecycle impact — furniture always reaches multiple pages; never narrower than flow-structural. */
68
133
  type HeaderFooterLifecycleImpact = 'flow-structural' | 'global';
69
134
  /**
@@ -103,6 +168,13 @@ type HeaderFooterLifecycleOp = {
103
168
  readonly evenAndOddHeaders?: boolean;
104
169
  readonly headerDistanceTwips?: number;
105
170
  readonly footerDistanceTwips?: number;
171
+ } | {
172
+ /**
173
+ * A `settings.xml` write like `evenAndOddHeaders`, so it rides the same package-level
174
+ * undo unit and the same routing rather than growing a second lifecycle lane.
175
+ */
176
+ readonly op: 'setDocumentProtection';
177
+ readonly enforce: boolean;
106
178
  };
107
179
  /** Why a header/footer lifecycle op was refused. */
108
180
  type HeaderFooterLifecycleRejection = 'invalidArgs' | 'tree-invariant';
@@ -128,6 +200,123 @@ declare function isHeaderFooterLifecycleOp(op: {
128
200
  */
129
201
  declare function applyHeaderFooterLifecycleOp(pkg: OoxmlPackage, op: HeaderFooterLifecycleOp): HeaderFooterLifecycleResult;
130
202
 
203
+ /** UTF-16 placeholder for one atomic note unit in `paragraphTextOf` / segments. */
204
+ declare const NOTE_ATOM_CHAR = "\uFFFC";
205
+ /** Signed 32-bit Word-compatible note id range (positive allocation only). */
206
+ declare const NOTE_ID_MIN = 1;
207
+ /** Largest note id Word accepts — signed 32-bit. */
208
+ declare const NOTE_ID_MAX = 2147483647;
209
+ /** Reserved separator / continuation ids — never allocated for normal notes. */
210
+ declare const NOTE_SEPARATOR_ID = -1;
211
+ /** Reserved id of the continuation-separator entry. Never allocated to a real note. */
212
+ declare const NOTE_CONTINUATION_SEPARATOR_ID = 0;
213
+ /** Which notes part a note lives in. Decides both placement and numbering rules. */
214
+ type NoteKind = 'footnote' | 'endnote';
215
+ /** Authored `ST_FtnEdn` including explicit `normal`. Absent means Word default (normal). */
216
+ /**
217
+ * What a note entry IS.
218
+ *
219
+ * Only `normal` is a note a reader sees. The others are the furniture Word stores in the same
220
+ * part — the rules and notices drawn around the note area — reached by reserved ids.
221
+ */
222
+ type NoteType = 'normal' | 'separator' | 'continuationSeparator' | 'continuationNotice';
223
+ /** Parse a signed decimal note id; reject non-integers and out-of-int32 values. */
224
+ declare function parseNoteId(raw: string | undefined): number | null;
225
+ /**
226
+ * Canonical `EditorScope { kind: 'note'; id }` encoding.
227
+ *
228
+ * Footnote id `1` and endnote id `1` coexist, so the kind is part of the string:
229
+ * `footnote:2` / `endnote:-1`. Do not invent a parallel scope union arm.
230
+ */
231
+ declare function formatNoteScopeId(noteKind: NoteKind, noteId: number): string;
232
+ /**
233
+ * Parse {@link formatNoteScopeId}. Returns `null` for malformed / out-of-range ids.
234
+ */
235
+ declare function parseNoteScopeId(id: string): {
236
+ readonly noteKind: NoteKind;
237
+ readonly noteId: number;
238
+ } | null;
239
+ /** Whether a node is a `w:footnotes` part root. */
240
+ declare function isFootnotesNode(node: OoxmlNode): node is OoxmlFootnotesNode;
241
+ /** Whether a node is a `w:endnotes` part root. */
242
+ declare function isEndnotesNode(node: OoxmlNode): node is OoxmlEndnotesNode;
243
+ /** Whether a node is a `w:footnote` or `w:endnote` body. */
244
+ declare function isNoteNode(node: OoxmlNode): node is OoxmlNoteNode;
245
+ /** Whether a node is a body-side `w:footnoteReference` / `w:endnoteReference`. */
246
+ declare function isNoteReferenceNode(node: OoxmlNode): node is OoxmlNoteReferenceNode;
247
+ /** Whether a node is the `w:footnoteRef` / `w:endnoteRef` mark inside a note's own body. */
248
+ declare function isNoteRefNode(node: OoxmlNode): node is OoxmlNoteRefNode;
249
+ /** Whether a node is the `w:separator` rule drawn above the note area. */
250
+ declare function isSeparatorNode(node: OoxmlNode): node is OoxmlSeparatorNode;
251
+ /** Whether a node is the `w:continuationSeparator` rule used on continuation pages. */
252
+ declare function isContinuationSeparatorNode(node: OoxmlNode): node is OoxmlContinuationSeparatorNode;
253
+ /** Typed or generic `w:footnote` / `w:endnote`. */
254
+ declare function noteKindOf(node: OoxmlNode): NoteKind | null;
255
+ /** Authored `@w:id` on a note or noteReference when parseable. */
256
+ declare function noteIdOf(node: OoxmlNode): number | null;
257
+ /** Authored `@w:type` (`ST_FtnEdn`) when present and schema-legal; else `undefined`. */
258
+ declare function noteTypeOf(node: OoxmlNode): NoteType | undefined;
259
+ /** Whether a note is a normal (body) note — absent type and explicit `normal` both count. */
260
+ declare function isNormalNote(node: OoxmlNode): boolean;
261
+ /** Typed or generic footnote/endnote reference kind. */
262
+ declare function noteReferenceKindOf(node: OoxmlNode): NoteKind | null;
263
+ /** Typed or generic `w:footnoteRef` / `w:endnoteRef`. */
264
+ declare function noteRefKindOf(node: OoxmlNode): NoteKind | null;
265
+ /**
266
+ * Read `@w:customMarkFollows` on a note reference.
267
+ * Returns `undefined` when absent; otherwise the OOXML on/off interpretation.
268
+ */
269
+ declare function customMarkFollows(node: OoxmlNode): boolean | undefined;
270
+ /** Model text contributed by one atomic note unit. */
271
+ declare function noteAtomText(): typeof NOTE_ATOM_CHAR;
272
+ /**
273
+ * True when a run-inner node is a typed note atom that contributes one UTF-16 unit.
274
+ * Demoted/malformed known locals stay generic and contribute nothing.
275
+ */
276
+ declare function isNoteAtomNode(node: OoxmlNode): boolean;
277
+ /**
278
+ * One atomic note span inside a paragraph for caret / delete / selection.
279
+ *
280
+ * Each typed note atom is a single-node span (`removeNodeIds` = that node).
281
+ */
282
+ interface AtomicNoteSpan {
283
+ readonly kind: 'noteReference' | 'noteRef' | 'separator' | 'continuationSeparator';
284
+ readonly node: OoxmlNode;
285
+ readonly runId: string;
286
+ readonly removeNodeIds: readonly string[];
287
+ }
288
+ /**
289
+ * Collect typed note atoms in document order (one segment each).
290
+ *
291
+ * Walks the same paragraph-inline surface as `segmentsOf` / `walkParagraphInline`:
292
+ * hyperlinks and content controls flatten; only direct run children contribute atoms.
293
+ * A demoted run-inner SDT husk stays opaque — no phantom addressable hit.
294
+ */
295
+ declare function atomicNoteSpansOf(paragraph: OoxmlParagraphNode): readonly AtomicNoteSpan[];
296
+ /** Cap on notes scanned when allocating / indexing a notes part. */
297
+ declare const MAX_NOTES_PER_PART = 10000;
298
+ /**
299
+ * Allocate the next positive signed 32-bit note id for a notes-part root.
300
+ *
301
+ * Solo: `max(existing)+1`, the dense sequence Word writes. `null` on exhaustion, so the
302
+ * caller refuses rather than wrapping onto an id a note already holds.
303
+ *
304
+ * With a collaboration actor bound — explicit argument, or the open store transaction — the
305
+ * id is the next unused value in that actor's stripe. Two peers each adding their first
306
+ * footnote from one snapshot otherwise both mint `w:id="1"`: the merge keeps both bodies
307
+ * under one id, both `w:footnoteReference` marks resolve to the first, and one author's note
308
+ * becomes unreachable.
309
+ *
310
+ * The reserved ids stay reserved either way. `0` (continuation separator) is seeded as used,
311
+ * so a residue of 0 advances one class instead of taking Word's furniture, and a stripe walk
312
+ * only ever climbs from a non-negative residue, so `-1` (separator) is unreachable.
313
+ */
314
+ declare function allocateNoteId(notesRoot: OoxmlNode, actorId?: string): number | null;
315
+ /** Collect note bodies from a footnotes/endnotes root, bounded. */
316
+ declare function notesOf(root: OoxmlNode): readonly OoxmlNoteNode[];
317
+ /** Find a typed note by id inside a notes-part root. */
318
+ declare function findNoteById(root: OoxmlNode, noteId: number): OoxmlNoteNode | undefined;
319
+
131
320
  /** Cap on nodes visited while scanning for note references across stories. */
132
321
  declare const MAX_NOTE_REFERENCE_SCAN = 20000;
133
322
  /**
@@ -371,6 +560,302 @@ interface ApplyImagePropertiesInput {
371
560
  readonly hyperlink: string | null;
372
561
  }
373
562
 
563
+ /** A selection the caller wants restored when an entry is undone or redone. */
564
+ /** A selection captured with a transaction, so undo restores where the caret was. */
565
+ interface SelectionMark {
566
+ readonly paragraphId: string;
567
+ readonly start: number;
568
+ readonly end: number;
569
+ }
570
+ /**
571
+ * Which editable story a ModelChange came from.
572
+ *
573
+ * Mirrors `EditorScope` for body and header/footer — `{ kind: 'headerFooter'; rId }` —
574
+ * so package-aware mutation and the public scope contract stay one vocabulary. Body
575
+ * commits omit `rId`; header/footer commits carry the relationship id that addressed
576
+ * the part. Notes parts use `{ kind: 'notesPart'; noteKind }` (one store per part).
577
+ */
578
+ /** Which story a transaction targets: the body, a header/footer part, or a notes part. */
579
+ type TreeStoryRef = {
580
+ readonly kind: 'body';
581
+ readonly partName: string;
582
+ } | {
583
+ readonly kind: 'headerFooter';
584
+ readonly partName: string;
585
+ readonly rId: string;
586
+ } | {
587
+ readonly kind: 'notesPart';
588
+ readonly partName: string;
589
+ readonly noteKind: 'footnote' | 'endnote';
590
+ };
591
+ /**
592
+ * What one committed transaction changed: the revision, the ids touched, and the impact class.
593
+ *
594
+ * The ids are what let layout and paint re-do only the affected blocks instead of the document.
595
+ */
596
+ interface TreeModelChange {
597
+ readonly change: 'model-change';
598
+ readonly fromRevision: number;
599
+ readonly toRevision: number;
600
+ readonly commitId: string;
601
+ readonly origin: string;
602
+ /** Stable collaboration actor attribution, when the caller supplied it. */
603
+ readonly actorId?: string;
604
+ /** Stable collaboration operation identity, when the caller supplied it. */
605
+ readonly operationId?: string;
606
+ readonly dirty: readonly string[];
607
+ readonly created: readonly string[];
608
+ readonly deleted: readonly string[];
609
+ readonly splitJoin: readonly ({
610
+ readonly split: {
611
+ readonly from: string;
612
+ readonly tail: string;
613
+ };
614
+ } | {
615
+ readonly join: {
616
+ readonly kept: string;
617
+ readonly removed: string;
618
+ };
619
+ })[];
620
+ readonly dependencyKeys: readonly string[];
621
+ /** The widest impact among the transaction's ops — what layout must scope to. */
622
+ readonly impact: ImpactClass;
623
+ /**
624
+ * Story that published this change. Absent on body-only store publishes that predate
625
+ * package-aware targeting; `TreePackageStore` always sets it.
626
+ */
627
+ readonly story?: TreeStoryRef;
628
+ /**
629
+ * Committed collapsed caret for this transaction, when one exists.
630
+ * Matches history `selectionAfter` when that mark is collapsed; absent for explicit
631
+ * null, non-collapsed explicit selection, or when no caret was committed.
632
+ */
633
+ readonly caret?: SelectionMark;
634
+ }
635
+ /** Whether a transaction committed, or the typed reason it was refused. */
636
+ type TransactResult = {
637
+ readonly ok: true;
638
+ readonly change: TreeModelChange | null;
639
+ } | {
640
+ readonly ok: false;
641
+ readonly reason: TreeOpRejection;
642
+ readonly detail?: string;
643
+ };
644
+ /** What a transaction body is handed: the working tree, and the means to stage ops against it. */
645
+ interface TransactionContext {
646
+ /** Stage one op against the STORY part. Returns false once the transaction has failed. */
647
+ apply(op: TreeDocOp): boolean;
648
+ /**
649
+ * Stage one op against a named part.
650
+ *
651
+ * A comment body lives in `comments.xml` and is edited by the same ops that edit the story,
652
+ * so this is `apply` with the target named rather than a second vocabulary.
653
+ */
654
+ applyTo(partName: string, op: TreeDocOp): boolean;
655
+ /**
656
+ * Stage a whole-package edit: a new part, a relationship, a content-type override.
657
+ *
658
+ * The edit is a pure function of the working package, so a rejected transaction discards it
659
+ * with everything else. Returning the SAME package is a no-op, not a failure — a primitive
660
+ * that finds nothing to do says so that way.
661
+ */
662
+ applyPackage(edit: (pkg: OoxmlPackage) => OoxmlPackage): boolean;
663
+ /** The selection to restore when this entry is undone. */
664
+ selectionBefore(selection: SelectionMark | null): void;
665
+ /** The selection to restore when this entry is redone. */
666
+ selectionAfter(selection: SelectionMark | null): void;
667
+ }
668
+ /** How one transaction behaves: its story scope, its attribution, and its selection marks. */
669
+ interface TransactOptions {
670
+ readonly origin?: string;
671
+ /** Stable actor attribution for collaboration and audit correlation. */
672
+ readonly actorId?: string;
673
+ /** Stable constituent identity for collaboration duplicate correlation. */
674
+ readonly operationId?: string;
675
+ /**
676
+ * Whether this transaction enters the legacy snapshot undo stack.
677
+ *
678
+ * Collaboration commits set this to false because their actor-local undo authority is the
679
+ * CRDT undo manager. Omitted preserves the ordinary non-collaborative history behavior.
680
+ */
681
+ readonly recordsHistory?: boolean;
682
+ /**
683
+ * A COMMAND is one user intent that may need several ops (a toolbar click applying a
684
+ * property across a multi-run selection). It is still exactly one history entry, which is
685
+ * the same rule a plain transaction follows — the option exists to say so explicitly at
686
+ * the call site rather than leaving it implied.
687
+ */
688
+ readonly scope?: 'transaction' | 'command';
689
+ /**
690
+ * Floor on the published impact. Header/footer story edits use `global` so every page
691
+ * sharing the part invalidates rather than keeping stale furniture.
692
+ */
693
+ readonly minimumImpact?: ImpactClass;
694
+ /** Story identity stamped onto the published ModelChange (package-aware targeting). */
695
+ readonly story?: TreeStoryRef;
696
+ }
697
+ interface HistoryEntry {
698
+ /**
699
+ * The whole package as it was, not just the story part.
700
+ *
701
+ * Affordable for the same reason a part snapshot was: parts are immutable and deep-frozen, so
702
+ * a package snapshot is a Map of references and every part the transaction did not touch is
703
+ * object-identical to the one before it. Undo stays a pointer swap, and it now reverses every
704
+ * part one intent wrote rather than only the story.
705
+ */
706
+ readonly pkg: OoxmlPackage;
707
+ readonly revision: number;
708
+ readonly selectionBefore: SelectionMark | null;
709
+ readonly selectionAfter: SelectionMark | null;
710
+ }
711
+ /** How a store is constructed: its limits, its history depth, and its identity source. */
712
+ interface TreeDocumentStoreOptions {
713
+ /** Bound on retained history entries. Oldest entries drop first. */
714
+ readonly historyLimit?: number;
715
+ /**
716
+ * The document's `settings.xml`, for a store built from a PART rather than a package.
717
+ *
718
+ * Forms protection lives one part up from the op, and a store built from a part gets a
719
+ * synthetic one-part package that cannot see it — so `w:documentProtection w:edit="forms"`
720
+ * was enforced in the body and nowhere else, and a header, a footer or a note accepted every
721
+ * write a protected document is supposed to refuse. Read through a getter, not captured: a
722
+ * document can gain or lose protection while its stories stay open.
723
+ */
724
+ readonly settingsPart?: () => OoxmlPart | null | undefined;
725
+ }
726
+ /**
727
+ * Opaque document+history checkpoint for package-coordinator rollback.
728
+ * Used when a story mutation may promote to a package undo unit (note-ref cascade).
729
+ */
730
+ /** A restorable point in history — one entry of the intent-scoped undo stack. */
731
+ interface TreeDocumentCheckpoint {
732
+ /**
733
+ * The whole package, not one part. The store owns the package so a transaction spanning
734
+ * several parts is one publication — a checkpoint of only the story part could not roll
735
+ * back the comment or numbering part the same transaction wrote.
736
+ */
737
+ readonly pkg: OoxmlPackage;
738
+ readonly revision: number;
739
+ readonly undoStack: readonly HistoryEntry[];
740
+ readonly redoStack: readonly HistoryEntry[];
741
+ readonly composition: {
742
+ readonly entry: HistoryEntry;
743
+ readonly committed: boolean;
744
+ } | null;
745
+ }
746
+ /**
747
+ * The document store: one transaction is one atomic publication and one history entry.
748
+ *
749
+ * `apply` STAGES ops against a working part and nothing is visible until `transact` returns, so a
750
+ * batch rejected halfway leaves the revision, the tree, the indexes and every subscriber exactly
751
+ * as they were. That all-or-nothing property is what lets a caller compose ops without having to
752
+ * reason about partial application.
753
+ */
754
+ declare class TreeDocumentStore {
755
+ private current;
756
+ /** The part `apply` targets and `part` returns: the story this store is editing. */
757
+ private readonly storyPartName;
758
+ private rev;
759
+ private commitCounter;
760
+ private readonly undoStack;
761
+ private readonly redoStack;
762
+ private readonly subscribers;
763
+ private readonly historyLimit;
764
+ /** See {@link TreeDocumentStoreOptions.settingsPart}. */
765
+ private readonly settingsPartOverride;
766
+ /** Package-aware story tag applied to publishes (including undo/redo). */
767
+ private storyRef;
768
+ /** Open composition, if any. While set, transactions extend one entry (task 5.5). */
769
+ private composition;
770
+ /**
771
+ * Open a store over a package, editing the named story part.
772
+ *
773
+ * A bare part is accepted and wrapped in a single-part package, so callers that never open a
774
+ * real package — tests, headless tooling — are unaffected by the widening.
775
+ */
776
+ constructor(source: OoxmlPart | OoxmlPackage, storyPartNameOrOptions?: string | TreeDocumentStoreOptions, maybeOptions?: TreeDocumentStoreOptions);
777
+ /**
778
+ * Stamp story identity onto subsequent publishes for this store (including undo/redo).
779
+ * Used by the package coordinator so history navigation keeps the same scope tag.
780
+ */
781
+ setStoryRef(story: TreeStoryRef | null): void;
782
+ /** The story part being edited. Unchanged for every caller that predates the widening. */
783
+ get part(): OoxmlPart;
784
+ /** Every part, including the ones a multi-part transaction wrote. */
785
+ get package(): OoxmlPackage;
786
+ get revision(): number;
787
+ get canUndo(): boolean;
788
+ get canRedo(): boolean;
789
+ /** Retained entries — the unit `undo()` reverses, so tests can assert grouping. */
790
+ get historyDepth(): number;
791
+ get compositionActive(): boolean;
792
+ /**
793
+ * Replace the package OUTSIDE the transaction and history lanes.
794
+ *
795
+ * For package writes that are not a user intent and publish no revision: grafting
796
+ * `numbering.xml` into a document that never had one, which the caller performs as a
797
+ * precondition of the list op that follows. Those edits were previously kept in a package
798
+ * variable beside the store, which meant two owners of one value and, predictably, two
799
+ * values — a graft written to one and a save read from the other.
800
+ *
801
+ * Deliberately narrow and deliberately awkward to reach for: anything a user did belongs in
802
+ * `transact`, where it gets a revision, an undo entry and the invariant checks.
803
+ */
804
+ graftPackage(edit: (pkg: OoxmlPackage) => OoxmlPackage): void;
805
+ /**
806
+ * Replace the current part without recording history, but advance the revision so
807
+ * revision-keyed projections cannot survive a package snapshot install.
808
+ */
809
+ replacePart(part: OoxmlPart): void;
810
+ /**
811
+ * Snapshot part, revision, and undo/redo stacks so the package coordinator can roll
812
+ * back a story transaction that fails after commit (e.g. note-reference cascade) or
813
+ * discard a local history entry when promoting to a package undo unit.
814
+ */
815
+ checkpoint(): TreeDocumentCheckpoint;
816
+ /** Full restore — part, revision, history stacks, and composition. */
817
+ restoreCheckpoint(checkpoint: TreeDocumentCheckpoint): void;
818
+ /**
819
+ * Restore undo/redo stacks only, keeping the current part and revision.
820
+ * Used when a story mutation is promoted to a package history pointer so the local
821
+ * orphan entry does not steal a later undo.
822
+ */
823
+ restoreHistoryStacks(checkpoint: TreeDocumentCheckpoint): void;
824
+ subscribe(listener: (change: TreeModelChange) => void): () => void;
825
+ /**
826
+ * Run one atomic transaction.
827
+ *
828
+ * Ops are staged against a working copy. On the first rejection the whole transaction is
829
+ * abandoned: no revision, no history entry, no notification. On success exactly one
830
+ * revision is published and exactly one history entry is recorded — unless a composition
831
+ * is open, in which case the entry already exists and this transaction joins it.
832
+ */
833
+ transact(build: (ctx: TransactionContext) => void, options?: TransactOptions): TransactResult;
834
+ private commitTransaction;
835
+ /**
836
+ * Open one history entry for an IME composition.
837
+ *
838
+ * Everything committed until `endComposition` collapses into this single entry, which is
839
+ * what makes a composed word one undo step rather than one per intermediate transaction.
840
+ */
841
+ beginComposition(selectionBefore?: SelectionMark | null): void;
842
+ /** Close the composition, recording its entry only if anything actually committed. */
843
+ endComposition(): void;
844
+ /**
845
+ * Cancel an open composition without recording an entry, leaving whatever it committed
846
+ * in place. An IME cancel is not an undo request; the caller decides what to revert.
847
+ */
848
+ cancelComposition(): void;
849
+ undo(): TreeModelChange | null;
850
+ redo(): TreeModelChange | null;
851
+ /** The selection to restore for the entry `undo()` would reverse next. */
852
+ selectionForUndo(): SelectionMark | null;
853
+ /** The selection to restore for the entry `redo()` would reapply next. */
854
+ selectionForRedo(): SelectionMark | null;
855
+ private pushUndo;
856
+ private publish;
857
+ }
858
+
374
859
  /** Attribution stamped on one remote canonical publication. */
375
860
  interface RemotePackageAttribution {
376
861
  readonly origin: string;
@@ -599,31 +1084,14 @@ declare class TreePackageStore {
599
1084
  * content-types mutate the package outside story trees.
600
1085
  */
601
1086
  replacePackageShell(pkg: OoxmlPackage): void;
602
- /**
603
- * Install a full package snapshot: body + opened story stores track the snapshot's parts.
604
- * Stores whose parts disappeared stay parked (history identity preserved) so a later
605
- * package undo can reconnect them; rId cache rebuilds from remaining relationships.
606
- *
607
- * Numbering / shell-minted hyperlink resources (via {@link replacePackageShell}) are merged
608
- * onto the snapshot so lifecycle undo cannot orphan story `numId` / `r:id` references.
609
- * Furniture and notes parts remain snapshot-owned; shell hyperlink `.rels` for those owners
610
- * park when the part is temporarily absent and are pruned once history can no longer restore
611
- * the owner. Lifecycle-cloned owned relationships are not shell-minted and GC with the part.
612
- */
1087
+ /** Restore snapshot stories while retaining history-reachable shell resources. */
613
1088
  private installPackageSnapshotInternal;
614
1089
  private openNotesPartStore;
615
1090
  private openHeaderFooterStore;
616
1091
  private storyRefForPart;
617
1092
  private syncPackageFromStore;
618
1093
  private pushUndoPointer;
619
- /**
620
- * Drop parked story stores that no current package part and no undo/redo pointer can
621
- * restore. History-reachable identities stay so edit→delete→undo reconnects the same
622
- * store; unreachable parked entries must not hold `maxEditableStoryParts` forever.
623
- *
624
- * Also prunes scoped hyperlink shell resources parked for owners that are no longer
625
- * live and not history-reachable (see `pruneUnreachableHyperlinkShell`).
626
- */
1094
+ /** Keep history-reachable stories and prune unreachable shell hyperlink owners. */
627
1095
  private evictUnreachableStories;
628
1096
  private publish;
629
1097
  private publishSynthetic;
@@ -663,4 +1131,4 @@ type FragmentPasteResult = (Extract<PackageTransactResult, {
663
1131
  */
664
1132
  declare function applyFragmentPaste(store: TreePackageStore, scope: StoryScope, input: FragmentPasteInput): FragmentPasteResult;
665
1133
 
666
- export { type ApplyImagePropertiesInput as A, collectPackageNoteReferences as B, type CascadeDeletedNoteReferencesOptions as C, DEFAULT_MAX_EDITABLE_STORY_PARTS as D, createNoteReferenceScanBudget as E, type FragmentPasteInput as F, diagnoseNoteReferences as G, type HeaderFooterLifecycleImpact as H, type InsertImageInput as I, isHeaderFooterLifecycleOp as J, isNoteLifecycleOp as K, normalNoteIds as L, MAX_FRAGMENT_DECODED_BYTES as M, type NoteDiagnostic as N, notesPartHasId as O, type PackageTransactResult as P, resolveNotesPart as Q, type ReplaceImageOptions as R, type StoryScope as S, TreePackageStore as T, withBinaryPart as U, withEmbeddedImage as V, withoutUnreferencedImagePart as W, type StoryTargetRejection as a, type ImageIntentResult as b, type FragmentPasteResult as c, type DrawingPropertyIdResult as d, type HeaderFooterLifecycleOp as e, type HeaderFooterLifecycleRejection as f, type HeaderFooterLifecycleResult as g, MAX_NOTE_REFERENCE_PARTS as h, MAX_NOTE_REFERENCE_SCAN as i, type NoteDiagnosticCode as j, type NoteLifecycleImpact as k, type NoteLifecycleOp as l, type NoteLifecycleOptions as m, type NoteLifecycleRejection as n, type NoteLifecycleResult as o, type NoteReferenceHit as p, type NoteReferenceScanBudget as q, type RemotePackageAttribution as r, type StoryResolveResult as s, type TreePackageStoreOptions as t, allocateDrawingPropertyId as u, applyFragmentPaste as v, applyHeaderFooterLifecycleOp as w, applyNoteLifecycleOp as x, cascadeDeletedNoteReferences as y, collectNoteReferences as z };
1134
+ export { type TransactResult as $, type ApplyImagePropertiesInput as A, type NoteDiagnostic as B, type CascadeDeletedNoteReferencesOptions as C, DEFAULT_MAX_EDITABLE_STORY_PARTS as D, type NoteDiagnosticCode as E, type FragmentPasteInput as F, type NoteLifecycleImpact as G, type HeaderFooterVariant as H, type InsertImageInput as I, type NoteLifecycleOp as J, type NoteLifecycleOptions as K, type NoteLifecycleRejection as L, MAX_FRAGMENT_DECODED_BYTES as M, type NoteKind as N, type NoteLifecycleResult as O, type NoteReferenceHit as P, type NoteReferenceScanBudget as Q, type ReplaceImageOptions as R, type StoryScope as S, TreePackageStore as T, type NoteType as U, type PackageTransactResult as V, type RemotePackageAttribution as W, type StoryResolveResult as X, type TreeDocumentStoreOptions as Y, type TreePackageStoreOptions as Z, type TreeStoryRef as _, type StoryTargetRejection as a, type TransactionContext as a0, allocateDrawingPropertyId as a1, allocateNoteId as a2, applyFragmentPaste as a3, applyHeaderFooterLifecycleOp as a4, applyNoteLifecycleOp as a5, atomicNoteSpansOf as a6, cascadeDeletedNoteReferences as a7, collectNoteReferences as a8, collectPackageNoteReferences as a9, parseNoteScopeId as aA, resolveHeaderFooterParts as aB, resolveHeaderFooterPartsBySection as aC, resolveHeaderFooterResolutionBySection as aD, resolveNotesPart as aE, withBinaryPart as aF, withEmbeddedImage as aG, withoutUnreferencedImagePart as aH, collectSectionPropertyNodes as aa, createNoteReferenceScanBudget as ab, customMarkFollows as ac, diagnoseNoteReferences as ad, findNoteById as ae, formatNoteScopeId as af, isContinuationSeparatorNode as ag, isEndnotesNode as ah, isFootnotesNode as ai, isHeaderFooterLifecycleOp as aj, isNormalNote as ak, isNoteAtomNode as al, isNoteLifecycleOp as am, isNoteNode as an, isNoteRefNode as ao, isNoteReferenceNode as ap, isSeparatorNode as aq, normalNoteIds as ar, noteAtomText as as, noteIdOf as at, noteKindOf as au, noteRefKindOf as av, noteReferenceKindOf as aw, notesOf as ax, notesPartHasId as ay, parseNoteId as az, type TreeModelChange as b, type HeaderFooterParts as c, type HeaderFooterSectionResolution as d, TreeDocumentStore as e, type SelectionMark as f, type TransactOptions as g, type ImageIntentResult as h, type FragmentPasteResult as i, type AtomicNoteSpan as j, type DrawingPropertyIdResult as k, type HeaderFooterKind as l, type HeaderFooterLifecycleImpact as m, noteTypeOf as n, type HeaderFooterLifecycleOp as o, type HeaderFooterLifecycleRejection as p, type HeaderFooterLifecycleResult as q, type HeaderFooterSlotMeta as r, MAX_NOTES_PER_PART as s, MAX_NOTE_REFERENCE_PARTS as t, MAX_NOTE_REFERENCE_SCAN as u, NOTE_ATOM_CHAR as v, NOTE_CONTINUATION_SEPARATOR_ID as w, NOTE_ID_MAX as x, NOTE_ID_MIN as y, NOTE_SEPARATOR_ID as z };
@@ -1,10 +1,8 @@
1
- import { S as StoryScope, a as StoryTargetRejection, I as InsertImageInput, b as ImageIntentResult, R as ReplaceImageOptions, A as ApplyImagePropertiesInput, F as FragmentPasteInput, c as FragmentPasteResult } from './tree-package-fragment-DRJkmfTW.js';
2
- import { T as TreeDocOp, O as OoxmlPart, a as OoxmlNode, b as OoxmlPackage, c as OoxmlElement, y as SupportedImageMime, E as ImageDecodePort, C as RevisionAttributionInput } from './tree-op-types-C71G7rIv.js';
3
- import { a as HeaderFooterParts, b as HeaderFooterSectionResolution } from './hf-references-kSSFMq9X.js';
4
- import { D as DocumentTrackingSettings, I as InsertCustomNodeWrite, C as CustomNodeWriteResult, a as CustomNodeSweepOutcome, E as EmbeddedFont, B as BookmarkIndex, L as ListKind } from './custom-node-writes-ClTkWM7s.js';
5
- import { H as HeadlessDocumentView, D as DocumentProperties } from './headless-document-view-BDSeMGoK.js';
6
- import { S as SelectionMark, d as TransactOptions, T as TreeModelChange } from './tree-store-BRfhZceK.js';
7
- import { a as ReviewItem } from './review-items-CiliAz8H.js';
1
+ import { S as StoryScope, f as SelectionMark, g as TransactOptions, a as StoryTargetRejection, b as TreeModelChange, c as HeaderFooterParts, d as HeaderFooterSectionResolution, I as InsertImageInput, h as ImageIntentResult, R as ReplaceImageOptions, A as ApplyImagePropertiesInput, F as FragmentPasteInput, i as FragmentPasteResult } from './tree-package-fragment-1pdDnhZ_.js';
2
+ import { T as TreeDocOp, O as OoxmlPart, a as OoxmlNode, b as OoxmlPackage, e as OoxmlElement, p as SupportedImageMime, t as ImageDecodePort, u as RevisionAttributionInput } from './tree-op-types-DbdM7fJV.js';
3
+ import { D as DocumentTrackingSettings, I as InsertCustomNodeWrite, C as CustomNodeWriteResult, a as CustomNodeSweepOutcome, E as EmbeddedFont, B as BookmarkIndex, L as ListKind } from './custom-node-writes-BqIv94ei.js';
4
+ import { H as HeadlessDocumentView, D as DocumentProperties } from './headless-document-view-C4ttQJ5H.js';
5
+ import { a as ReviewItem } from './review-items-CJz-kAW8.js';
8
6
  import { Node } from 'prosemirror-model';
9
7
  import { CollaborationDocumentPort } from './collaboration/replication.js';
10
8
  import { V as ViewScope } from './editor-scope-DZJT4ukT.js';
@@ -67,8 +65,32 @@ declare function reconcileDoc(previousDoc: Node, part: OoxmlPart, change: {
67
65
  readonly splitJoin: readonly unknown[];
68
66
  } | null): Node;
69
67
 
68
+ /**
69
+ * The faces a theme's font scheme offers, per script slot.
70
+ *
71
+ * Structurally satisfied by both lanes' theme-font shapes (`DocumentThemeFonts`,
72
+ * layout's `ThemeFonts`). The East Asian faces are optional so callers that have not
73
+ * harvested them yet still type-check; an absent face resolves to null, which every
74
+ * caller already treats as "fall back to the explicit attribute".
75
+ */
76
+ interface ThemeSchemeFaces {
77
+ /** `a:majorFont` latin typeface — headings. */
78
+ readonly major: string | null;
79
+ /** `a:minorFont` latin typeface — body text. */
80
+ readonly minor: string | null;
81
+ /** `a:majorFont` east asian typeface (`a:ea`). */
82
+ readonly majorEastAsia?: string | null;
83
+ /** `a:minorFont` east asian typeface (`a:ea`). */
84
+ readonly minorEastAsia?: string | null;
85
+ /** Complex-script heading and body faces (`a:cs`). */
86
+ readonly majorBidi?: string | null;
87
+ readonly minorBidi?: string | null;
88
+ /** Language-specific theme faces, keyed by ISO 15924 script. */
89
+ readonly majorSupplemental?: Readonly<Record<string, string>>;
90
+ readonly minorSupplemental?: Readonly<Record<string, string>>;
91
+ }
70
92
  /** The theme's font slots, fully resolved, for resolving `w:rFonts` theme attributes. */
71
- interface DocumentThemeFonts {
93
+ interface DocumentThemeFonts extends ThemeSchemeFaces {
72
94
  /** `a:majorFont` latin typeface — headings. */
73
95
  readonly major: string | null;
74
96
  /** `a:minorFont` latin typeface — body text. */
@@ -233,7 +255,10 @@ interface TreeApplyResult {
233
255
  readonly reason?: TreeBindingRejection | StoryTargetRejection | string;
234
256
  }
235
257
  /** Optional collaboration attribution for a direct tree-op transaction. */
236
- type TreeApplyOptions = Pick<TransactOptions, 'origin' | 'actorId' | 'operationId' | 'recordsHistory'>;
258
+ type TreeApplyOptions = Pick<TransactOptions, 'origin' | 'actorId' | 'operationId' | 'recordsHistory'> & {
259
+ /** Package resources committed in the same transaction as the tree operations. */
260
+ readonly packageEdits?: readonly ((pkg: OoxmlPackage) => OoxmlPackage)[];
261
+ };
237
262
  /**
238
263
  * One open document: the canonical tree, and the only write path into it.
239
264
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docx-editor.dev/core",
3
- "version": "2.17.0",
3
+ "version": "2.19.0",
4
4
  "description": "Framework-agnostic core for docx-editor.dev: OOXML parse/serialize, the canonical document tree, layout and paint, and the Editor contract the adapters render.",
5
5
  "type": "module",
6
6
  "engines": {
@@ -105,12 +105,12 @@
105
105
  "directory": "packages/core"
106
106
  },
107
107
  "dependencies": {
108
- "@docx-editor.dev/i18n": "^2.17.0",
109
- "bidi-js": "1.0.3",
108
+ "@docx-editor.dev/i18n": "^2.19.0",
109
+ "bidi-js": "1.1.0",
110
110
  "emf-converter": "2.0.2",
111
111
  "fast-xml-parser": "^5.10.1",
112
112
  "fflate": "^0.8.2",
113
- "harfbuzzjs": "1.6.0",
113
+ "harfbuzzjs": "1.6.1",
114
114
  "prosemirror-commands": "^1.7.1",
115
115
  "prosemirror-keymap": "^1.2.3",
116
116
  "prosemirror-model": "^1.25.4",