@betteroffice/docx 0.0.4 → 0.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 (61) hide show
  1. package/README.md +2 -1
  2. package/dist/chunk-24DL53QL.mjs +1 -0
  3. package/dist/chunk-5F6DLQZP.mjs +1 -0
  4. package/dist/{chunk-YTILOUAA.mjs → chunk-BUZ2X5CT.mjs} +1 -1
  5. package/dist/{chunk-B4IR6YP4.mjs → chunk-GHEHBYQK.mjs} +1 -1
  6. package/dist/{chunk-NJHOPXZW.mjs → chunk-HLDJMU3R.mjs} +1 -1
  7. package/dist/{chunk-4V6MDZIK.mjs → chunk-HTDNSQ44.mjs} +1 -1
  8. package/dist/{chunk-NTSSE5QK.mjs → chunk-PI2I3TO5.mjs} +1 -1
  9. package/dist/{chunk-6KDV6AIL.mjs → chunk-TMHG7OAZ.mjs} +1 -1
  10. package/dist/{chunk-NBSLB77E.mjs → chunk-VRGUAKOC.mjs} +1 -1
  11. package/dist/collaboration/index.d.mts +6 -6
  12. package/dist/{content-C3sTRz-u.d.mts → content-DrqzbIr7.d.mts} +67 -18
  13. package/dist/core.d.mts +7 -7
  14. package/dist/core.mjs +1 -1
  15. package/dist/{displayListQueries-DLzpvJV6.d.mts → displayListQueries-DGDR-OWc.d.mts} +87 -50
  16. package/dist/docx/index.d.mts +5 -5
  17. package/dist/docx/index.mjs +1 -1
  18. package/dist/editor/index.d.mts +8 -8
  19. package/dist/{fontLoader-CMH3bZ2Z.d.mts → fontLoader-DnixuYST.d.mts} +1 -1
  20. package/dist/{formatting-BEkIBePP.d.mts → formatting-BqrFPeev.d.mts} +8 -0
  21. package/dist/{frameDelta-B2kC6XiP.d.mts → frameDelta-DMgR8n13.d.mts} +15 -10
  22. package/dist/generated/edit/docx_edit_bg.wasm +0 -0
  23. package/dist/generated/layout/docx_layout_bg.wasm +0 -0
  24. package/dist/generated/opc/ooxml_opc_bg.wasm +0 -0
  25. package/dist/generated/parse/docx_parse_bg.wasm +0 -0
  26. package/dist/{index-2piKi4gO.d.mts → index-ImoMd0Ju.d.mts} +32 -65
  27. package/dist/layout/index.d.mts +40 -13
  28. package/dist/layout/index.mjs +1 -1
  29. package/dist/layout/pagination/index.d.mts +4 -4
  30. package/dist/layout/render/index.d.mts +33 -77
  31. package/dist/layout/render/index.mjs +1 -1
  32. package/dist/plugin-api/RenderedDomContext.d.mts +7 -7
  33. package/dist/plugin-api/index.d.mts +3 -3
  34. package/dist/plugin-api/resolveItemPositions.d.mts +3 -3
  35. package/dist/{rustDisplayList-B0M2eBkU.d.mts → rustDisplayList-B9dQoLHI.d.mts} +74 -50
  36. package/dist/{rustMeasureSource-D1KsQvVC.d.mts → rustMeasureSource-C0EZB055.d.mts} +5 -2
  37. package/dist/{selectiveSave-CVoajSKE.d.mts → selectiveSave-CRh-_Y_C.d.mts} +3 -3
  38. package/dist/styles/index.d.mts +3 -3
  39. package/dist/{styles-BK3Jecxs.d.mts → styles-CMybYYHS.d.mts} +1 -1
  40. package/dist/types/content.d.mts +2 -2
  41. package/dist/types/document.d.mts +7 -7
  42. package/dist/{types-C1rv3KM-.d.mts → types-CXLxVF1t.d.mts} +27 -23
  43. package/dist/utils/comments.d.mts +2 -2
  44. package/dist/utils/index.d.mts +11 -13
  45. package/dist/utils/index.mjs +1 -1
  46. package/dist/utils/stylePreview.d.mts +2 -2
  47. package/dist/wasm-CJHQHBDE.mjs +1 -0
  48. package/dist/{wasm-JE7B3ROD.mjs → wasm-T2CRCO7S.mjs} +1 -1
  49. package/dist/wasm-edit.d.mts +505 -173
  50. package/dist/wasm-edit.mjs +1 -1
  51. package/dist/wasm-layout.d.mts +31 -28
  52. package/dist/wasm-layout.mjs +1 -1
  53. package/dist/wasm-opc.mjs +1 -1
  54. package/dist/wasm-parse.mjs +1 -1
  55. package/dist/yrs/index.d.mts +5 -5
  56. package/dist/yrs/index.mjs +1 -1
  57. package/dist/yrs/residentEngineWorker.mjs +1 -1
  58. package/package.json +19 -2
  59. package/dist/chunk-GGEGIQRK.mjs +0 -1
  60. package/dist/chunk-T4EZMUXM.mjs +0 -1
  61. package/dist/wasm-F2ETFAYL.mjs +0 -1
@@ -1,13 +1,13 @@
1
1
  import { RenderedDomContext, PositionCoordinates } from './index.mjs';
2
- import { D as DisplayListRect, a as DisplayListQueries } from '../displayListQueries-DLzpvJV6.mjs';
2
+ import { D as DisplayListRect, a as DisplayListQueries } from '../displayListQueries-DGDR-OWc.mjs';
3
3
  import '../types/document.mjs';
4
- import '../content-C3sTRz-u.mjs';
5
- import '../formatting-BEkIBePP.mjs';
4
+ import '../content-DrqzbIr7.mjs';
5
+ import '../formatting-BqrFPeev.mjs';
6
6
  import '../docx/wrapTypes.mjs';
7
- import '../styles-BK3Jecxs.mjs';
8
- import '../frameDelta-B2kC6XiP.mjs';
9
- import '../rustDisplayList-B0M2eBkU.mjs';
10
- import '../types-C1rv3KM-.mjs';
7
+ import '../styles-CMybYYHS.mjs';
8
+ import '../frameDelta-DMgR8n13.mjs';
9
+ import '../rustDisplayList-B9dQoLHI.mjs';
10
+ import '../types-CXLxVF1t.mjs';
11
11
  import '../layout/pagination/index.mjs';
12
12
 
13
13
  /**
@@ -1,8 +1,8 @@
1
1
  import { Document } from '../types/document.mjs';
2
- import '../content-C3sTRz-u.mjs';
3
- import '../formatting-BEkIBePP.mjs';
2
+ import '../content-DrqzbIr7.mjs';
3
+ import '../formatting-BqrFPeev.mjs';
4
4
  import '../docx/wrapTypes.mjs';
5
- import '../styles-BK3Jecxs.mjs';
5
+ import '../styles-CMybYYHS.mjs';
6
6
 
7
7
  /**
8
8
  * Framework-Agnostic Plugin Interface for the DOCX Editor
@@ -1,9 +1,9 @@
1
1
  import { SidebarItem, RenderedDomContext } from './index.mjs';
2
2
  import '../types/document.mjs';
3
- import '../content-C3sTRz-u.mjs';
4
- import '../formatting-BEkIBePP.mjs';
3
+ import '../content-DrqzbIr7.mjs';
4
+ import '../formatting-BqrFPeev.mjs';
5
5
  import '../docx/wrapTypes.mjs';
6
- import '../styles-BK3Jecxs.mjs';
6
+ import '../styles-CMybYYHS.mjs';
7
7
 
8
8
  /**
9
9
  * Pure layout algorithm: given a list of sidebar items + their
@@ -1,27 +1,34 @@
1
- import { a as Layout } from './types-C1rv3KM-.mjs';
1
+ import { a as Layout } from './types-CXLxVF1t.mjs';
2
2
  import { MeasuredBlock } from './layout/pagination/index.mjs';
3
- import { D as DisplayList, R as RetainedFrame } from './frameDelta-B2kC6XiP.mjs';
3
+ import { D as DisplayList, R as RetainedFrame } from './frameDelta-DMgR8n13.mjs';
4
4
 
5
5
  /**
6
- * JS seam to the Rust display-list builder (crates/docx-layout).
6
+ * JS seam to the Rust display-list builder.
7
7
  *
8
- * Marshals the same `{ measured, options, layout }` triple the golden
9
- * fixtures pin (see scripts/export-displaylist-fixtures.ts) across the wasm
10
- * boundary and parses the resulting DisplayList. All paint/geometry decisions
11
- * happen in Rust — this module is serialization glue only.
8
+ * Marshals the `{ measured, options, layout }` envelope across the wasm
9
+ * boundary and hands back a DisplayList. Every paint and geometry decision
10
+ * happens in Rust; this module is serialization glue and nothing else, so a
11
+ * failure here is terminal — the types below carry no second engine to fall
12
+ * back to, only a typed {@link RustDisplayListSourceError} naming the stage
13
+ * that failed.
12
14
  *
13
- * The wasm module is loaded lazily via dynamic import on first build, so the
14
- * ~800KB inlined binary costs nothing until the experimental canvas renderer
15
- * is actually enabled.
15
+ * Two transports exist. {@link buildRustDisplayList} sends the whole envelope
16
+ * and parses a DisplayList back. {@link buildRustDisplayFrame} prefers an
17
+ * engine that already retains pagination: it sends only the display-level
18
+ * extras and receives a binary FrameDelta, which is applied to the previous
19
+ * frame so unchanged pages keep object identity — the invariant the query
20
+ * facade's page-delta adoption depends on. An engine without
21
+ * `buildDisplayListFrame` takes the full-JSON path instead.
16
22
  *
17
- * @experimental part of the rust-canvas-engine change; shape may evolve.
23
+ * The wasm module is loaded lazily on first build, so the inlined binary costs
24
+ * nothing until a display list is actually requested.
18
25
  */
19
26
 
20
27
  /**
21
28
  * One header/footer part in the `headersFooters` envelope field: the measured
22
- * blocks of the HF ProseMirror doc identified by `rId`, plus the band metrics
23
- * `convertHeaderFooterPmDocToContent` computed (passed through verbatim — the
24
- * Rust builder re-derives nothing).
29
+ * blocks of the header/footer document identified by `rId`, plus the band
30
+ * metrics the caller already computed. The builder passes the metrics through
31
+ * verbatim and re-derives none of them.
25
32
  */
26
33
  interface DisplayListHfVariant {
27
34
  rId: string;
@@ -41,14 +48,14 @@ interface DisplayListHfVariant {
41
48
  * line width is measured ONCE at the field's fallback text ("1"), so without
42
49
  * this the builder holds the same centered position on every page even though
43
50
  * "Page 2 of 3"/"Page 10 of 12" have different widths. Omitted ⇒ the fields
44
- * ride the char-distributed fallback width (byte-identical to before).
51
+ * ride the char-distributed fallback width on every page.
45
52
  */
46
53
  fieldWidths?: DisplayListFieldWidths[];
47
54
  }
48
55
  /**
49
56
  * Per-page widths of one PAGE/NUMPAGES field run in an HF part. `pmStart` is the
50
- * field run's position in the HF ProseMirror doc (the key the Rust builder
51
- * matches). `fallbackWidth` is the width the measure baked into `line.width`
57
+ * field run's position in the header/footer document, and is the key the Rust
58
+ * builder matches on. `fallbackWidth` is the width the measure baked into `line.width`
52
59
  * (the field's fallback text); `perPage[i]` is the width of the field's resolved
53
60
  * text on layout page index `i` (PAGE → that page's number, NUMPAGES → total).
54
61
  */
@@ -71,7 +78,7 @@ interface DisplayListHeadersFooters {
71
78
  /** Page-level Word watermark, painted behind body/header/footer content. */
72
79
  watermark?: DisplayListWatermark;
73
80
  variants: DisplayListHfVariant[];
74
- /** Stable section identity. Undefined = document-global legacy envelope. */
81
+ /** Stable section identity. Undefined ⇒ the envelope covers the whole document. */
75
82
  sectionId?: string;
76
83
  /** Zero-based section index. */
77
84
  sectionIndex?: number;
@@ -158,7 +165,7 @@ interface DisplayListCommentThread {
158
165
  }
159
166
  /** The `{ measured, options, layout }` envelope the Rust builder consumes. */
160
167
  interface DisplayListBuildInputs {
161
- /** Serialization contract version. Undefined reads as legacy version 0. */
168
+ /** Serialization contract version. Undefined reads as version 0. */
162
169
  contractVersion?: number;
163
170
  measured: MeasuredBlock[];
164
171
  options: unknown;
@@ -170,35 +177,42 @@ interface DisplayListBuildInputs {
170
177
  * → measurement `FontStore` ids — the SAME map the measurement input carries.
171
178
  * Present only under Rust measurement (the ids must belong to a populated
172
179
  * store); its presence against that store is what gates GlyphRun emission.
173
- * Omitted ⇒ every text run takes the browser-measured `TextRunPrimitive` path
174
- * (byte-identical to the pre-glyph build).
180
+ * Omitted ⇒ every text run is emitted as a browser-measured
181
+ * `TextRunPrimitive` rather than a shaped `GlyphRun`.
175
182
  */
176
183
  fontChains?: Record<string, number[]>;
177
184
  /** Page/section note regions. Undefined = no note emission. */
178
185
  noteAreas?: DisplayListNoteArea[];
179
186
  /** Resolved comments suppressed from active tint. Undefined = none known. */
180
187
  resolvedCommentIds?: number[];
181
- /** Stable reviewer palette. Undefined = legacy hard-coded colors. */
188
+ /** Stable reviewer palette. Undefined ⇒ the builder's built-in colors. */
182
189
  commentAuthors?: DisplayListCommentAuthor[];
183
190
  /** Per-comment thread metadata for a11y announcements. Undefined = none. */
184
191
  commentThreads?: DisplayListCommentThread[];
185
192
  }
186
- /** Minimal engine surface, injectable so tests can fake the wasm module. */
193
+ /**
194
+ * Minimal build surface, injectable so tests can fake the wasm module. Only
195
+ * `buildDisplayListJson` is required; the optional members are what an engine
196
+ * that retains its own pagination and display state additionally offers.
197
+ */
187
198
  interface RustDisplayListEngine {
188
199
  buildDisplayListJson(input: string): string;
189
- /** Resident editing engines expose binary deltas; the stateless layout wasm does not. */
200
+ /** Binary FrameDelta build; the stateless layout wasm does not offer it. */
190
201
  buildDisplayListFrame?(input: string, expectedFrameEpoch: number): Uint8Array;
191
- /** One-owner ordinary input path; available on the resident editing engine. */
202
+ /** Applies one keystroke and returns its frame, without a layout round trip. */
192
203
  applyInput?(text: string, expectedFrameEpoch: number): Uint8Array;
193
204
  displayHitTestRegionsJson?(pageIndex: number, x: number, y: number): string;
194
205
  displayVerticalMoveJson?(position: number, direction: 'up' | 'down', goalX: number): string;
195
206
  displayRangeRectsJson?(from: number, to: number): string;
196
- displayRangeRectsRegionJson?(region: 'body' | 'header' | 'footer', rId: string, from: number, to: number): string;
207
+ displayRangeRectsRegionJson?(region: string, partId: string, from: number, to: number): string;
197
208
  }
198
209
  type RustDisplayListSourceErrorStage = 'load' | 'build' | 'parse' | 'decode' | 'apply';
199
210
  interface RustDisplayFrameResult {
200
211
  displayList: DisplayList;
201
- /** Null only on the compatibility JSON engine path. */
212
+ /**
213
+ * The retained frame to pass as `previous` on the next build. Null when the
214
+ * engine answered over full JSON, which retains nothing.
215
+ */
202
216
  frame: RetainedFrame | null;
203
217
  transport: 'frame-delta-v1' | 'json';
204
218
  }
@@ -215,30 +229,32 @@ declare class RustDisplayListSourceError extends Error {
215
229
  * Query surface over an already-built display list, injectable so tests can
216
230
  * fake the wasm module.
217
231
  *
218
- * The `*Json` calls take the display-list JSON string as an argument (the Rust
219
- * side re-parses it per query — callers should cache the string). The
220
- * session-handle members parse the list ONCE (`openDisplayList` → handle) and
221
- * answer many queries by handle with no re-serialization, reusing the same
222
- * hit/range logic so results are byte-identical. The handle members are
223
- * OPTIONAL: the embedded wasm carries them only after the integrator re-embeds,
224
- * so `createDisplayListQueries` feature-detects `hasDisplayListSession` and
225
- * falls back to the `*Json` path when they are absent.
232
+ * The required `*Json` members take the display-list JSON as an argument and
233
+ * the Rust side re-parses it per query, so callers should cache the string.
234
+ * The OPTIONAL session-handle members parse the list once (`openDisplayList` →
235
+ * a handle) and answer many queries by handle with no re-serialization,
236
+ * reusing the same hit and range logic so results are byte-identical. They are
237
+ * optional because the embedded wasm may not carry them; `hasDisplayListSession`
238
+ * and `hasRangeRectsRegion` report what is present, and
239
+ * `createDisplayListQueries` falls back to the `*Json` path when it is not.
226
240
  */
227
241
  interface RustDisplayListQueryEngine {
228
- /** region-aware hit test → `{"region","rId"?,"pos"}` or `"null"` JSON */
242
+ /**
243
+ * region-aware hit test → `{"region","rId"?,"noteId"?,"pos","target"}` or
244
+ * `"null"` JSON
245
+ */
229
246
  hitTestRegionsJson(displayList: string, pageIndex: number, x: number, y: number): string;
230
247
  /** closest caret position on the adjacent visual line */
231
248
  verticalMoveJson?(displayList: string, position: number, direction: 'up' | 'down', goalX: number): string;
232
- /** body PM range → JSON array of `{pageIndex,x,y,width,height}` rects */
249
+ /** body document range → JSON array of `{pageIndex,x,y,width,height}` rects */
233
250
  rangeRectsJson(displayList: string, from: number, to: number): string;
234
251
  /**
235
- * Region-aware PM range → JSON array of rects. `region` is
236
- * `'body' | 'header' | 'footer'`; `rId` scopes header/footer to one HF part
237
- * (empty for body / match-any). OPTIONAL: the embedded wasm carries it only
238
- * after the integrator re-embeds, so `createDisplayListQueries` falls back to
239
- * `[]` when absent (HF selection geometry stays a documented gap until then).
252
+ * Region-aware document range → JSON array of rects. `region` is a
253
+ * `DisplayListHitRegion` discriminant; `partId` names the instance — a
254
+ * header/footer part (empty for body, or to match any band of the kind) or a
255
+ * note id. Optional — the facade returns `[]` when it is absent.
240
256
  */
241
- rangeRectsRegionJson?(displayList: string, region: string, rId: string, from: number, to: number): string;
257
+ rangeRectsRegionJson?(displayList: string, region: string, partId: string, from: number, to: number): string;
242
258
  /** true when the embedded wasm carries the region-aware range-rect exports */
243
259
  hasRangeRectsRegion?(): boolean;
244
260
  /** true when the embedded wasm carries the session-handle exports below */
@@ -255,10 +271,10 @@ interface RustDisplayListQueryEngine {
255
271
  hitTestRegionsByHandle?(handle: number, pageIndex: number, x: number, y: number): string;
256
272
  /** adjacent visual-line move against a stored display list */
257
273
  verticalMoveByHandle?(handle: number, position: number, direction: 'up' | 'down', goalX: number): string;
258
- /** body PM range against a stored display list (by handle) */
274
+ /** body document range against a stored display list (by handle) */
259
275
  rangeRectsByHandle?(handle: number, from: number, to: number): string;
260
- /** region-aware PM range against a stored display list (by handle) */
261
- rangeRectsRegionByHandle?(handle: number, region: string, rId: string, from: number, to: number): string;
276
+ /** region-aware document range against a stored display list (by handle) */
277
+ rangeRectsRegionByHandle?(handle: number, region: string, partId: string, from: number, to: number): string;
262
278
  }
263
279
  /**
264
280
  * Lazily load the wasm query surface (hit-test + range-rects). Shares the
@@ -270,13 +286,21 @@ declare function loadRustDisplayListQueryEngine(): Promise<RustDisplayListQueryE
270
286
  declare function encodeDisplayListFrameExtras(inputs: DisplayListBuildInputs): string;
271
287
  /**
272
288
  * Build a DisplayList for a computed layout through the Rust engine. Throws
273
- * when the wasm module fails to load or the builder rejects the input — the
274
- * caller is expected to fall back to the DOM painter.
289
+ * {@link RustDisplayListSourceError} tagged with the failing stage — `load`,
290
+ * `build` or `parse` — when the wasm module cannot be loaded, the builder
291
+ * rejects the input, or its output does not parse.
275
292
  */
276
293
  declare function buildRustDisplayList(inputs: DisplayListBuildInputs, engine?: RustDisplayListEngine): Promise<DisplayList>;
277
294
  /**
278
- * Production display build. Resident editing engines return FrameDelta v1;
279
- * older/stateless engines retain the full-JSON parity path.
295
+ * Build one display frame. An engine that retains pagination returns a binary
296
+ * FrameDelta, decoded and applied on top of `previous` so unchanged pages keep
297
+ * object identity; `previous` also supplies the frame epoch the engine checks
298
+ * before sending a delta rather than a full frame. An engine without
299
+ * `buildDisplayListFrame` takes the full-JSON path, and its result carries
300
+ * `frame: null` and `transport: 'json'`.
301
+ *
302
+ * Throws {@link RustDisplayListSourceError} tagged with the failing stage:
303
+ * `load`, `build`, `decode` or `apply`.
280
304
  */
281
305
  declare function buildRustDisplayFrame(inputs: DisplayListBuildInputs, engine?: RustDisplayListEngine, previous?: RetainedFrame | null): Promise<RustDisplayFrameResult>;
282
306
 
@@ -32,7 +32,7 @@ interface BundledFontProvider {
32
32
  * The always-available last-resort base face (broad-coverage Latin —
33
33
  * Liberation Sans/Serif per serif-ness). Unlike {@link
34
34
  * BundledFontProvider.resolve}, a conforming provider (e.g.
35
- * `@betteroffice/docx-fonts`'s `resolveLastResortFace`) returns a loader for
35
+ * `@betteroffice/fonts`'s `resolveLastResortFace`) returns a loader for
36
36
  * EVERY family, so the chain this registry builds is guaranteed non-empty
37
37
  * and a run never routes to the browser measurer for want of font bytes. The
38
38
  * face's metrics are the base font's, not the requested family's — the
@@ -66,6 +66,8 @@ interface EmbeddedFaceInput {
66
66
  /** Whether the source face was subsetted (`w:subsetted`). */
67
67
  subsetted: boolean;
68
68
  }
69
+ /** A provider or async factory; `undefined` means no bundled bytes. @public */
70
+ type BundledFontProviderSource = BundledFontProvider | (() => Promise<BundledFontProvider | undefined>);
69
71
 
70
72
  interface RustTextEngine {
71
73
  registerFont(bytes: Uint8Array): number;
@@ -98,9 +100,10 @@ interface RustMeasureSource {
98
100
  clear(): void;
99
101
  }
100
102
  declare function getRustTextEngine(): Promise<RustTextEngine>;
103
+ /** Builds a source with an explicit provider or the optional default package. */
101
104
  declare function createRustMeasureSource(options: {
102
105
  engine: RustTextEngine;
103
106
  bundled?: BundledFontProvider;
104
107
  }): RustMeasureSource;
105
108
 
106
- export { type BundledFontProvider as B, type EmbeddedFaceInput as E, type FontScript as F, type ResidentMeasurementConfig as R, type ResidentFontRequirement as a, type RustMeasureSource as b, type RustTextEngine as c, createRustMeasureSource as d, getRustTextEngine as g };
109
+ export { type BundledFontProvider as B, type EmbeddedFaceInput as E, type FontScript as F, type ResidentMeasurementConfig as R, type BundledFontProviderSource as a, type ResidentFontRequirement as b, type RustMeasureSource as c, type RustTextEngine as d, createRustMeasureSource as e, getRustTextEngine as g };
@@ -4,7 +4,7 @@ import { D as DocxInput } from './docxInput-DTbCa48g.mjs';
4
4
  /**
5
5
  * Public DOCX parser facade.
6
6
  *
7
- * Rust S9 owns ZIP/XML parsing. TypeScript only normalizes host inputs,
7
+ * Rust owns ZIP/XML parsing. TypeScript only normalizes host inputs,
8
8
  * rehydrates the public `Document`, reports progress, and registers fonts.
9
9
  * @packageDocumentation
10
10
  * @public
@@ -35,7 +35,7 @@ interface RepackOptions {
35
35
  updateModifiedDate?: boolean;
36
36
  modifiedBy?: string;
37
37
  }
38
- /** Repack a public Document through the live Rust S13 writer. */
38
+ /** Repack a public Document through the Rust package writer. */
39
39
  declare function repackDocx(doc: Document, options?: RepackOptions): Promise<ArrayBuffer>;
40
40
  declare function updateMultipleFiles(originalBuffer: ArrayBuffer, updates: Map<string, string | ArrayBuffer>, options?: RepackOptions): Promise<ArrayBuffer>;
41
41
  declare function createDocx(doc: Document): Promise<ArrayBuffer>;
@@ -48,7 +48,7 @@ interface SelectiveSaveOptions {
48
48
  hasUntrackedChanges: boolean;
49
49
  }
50
50
  /**
51
- * Patch changed paragraphs through the Rust S13 writer. Returns `null` when
51
+ * Patch changed paragraphs through the Rust package writer. Returns `null` when
52
52
  * selective save is unsafe so callers can fall back to a full repack.
53
53
  */
54
54
  declare function attemptSelectiveSave(doc: Document, originalBuffer: ArrayBuffer, options: SelectiveSaveOptions): Promise<ArrayBuffer | null>;
@@ -1,8 +1,8 @@
1
- import { a as ParagraphFormatting, b as TextFormatting } from '../formatting-BEkIBePP.mjs';
2
- import { S as StyleDefinitions, a as Style, D as DocDefaults } from '../styles-BK3Jecxs.mjs';
1
+ import { a as ParagraphFormatting, b as TextFormatting } from '../formatting-BqrFPeev.mjs';
2
+ import { S as StyleDefinitions, a as Style, D as DocDefaults } from '../styles-CMybYYHS.mjs';
3
3
 
4
4
  /**
5
- * Style Resolver for ProseMirror Editor
5
+ * Style Resolver
6
6
  *
7
7
  * Resolves OOXML style definitions to final paragraph and run properties.
8
8
  * Handles the cascade:
@@ -1,4 +1,4 @@
1
- import { b as TextFormatting, a as ParagraphFormatting, c as TableFormatting, d as TableRowFormatting, e as TableCellFormatting } from './formatting-BEkIBePP.mjs';
1
+ import { b as TextFormatting, a as ParagraphFormatting, c as TableFormatting, d as TableRowFormatting, e as TableCellFormatting } from './formatting-BqrFPeev.mjs';
2
2
 
3
3
  /**
4
4
  * Styles, Theme, Font Table, Relationships & Media Types
@@ -1,3 +1,3 @@
1
- export { B as BlockContent, l as BlockSdt, m as BookmarkEnd, n as BookmarkStart, o as BreakContent, e as Chart, p as ChartAxis, q as ChartContent, s as ChartLegend, v as ChartSeries, w as ChartType, x as Column, f as Comment, G as CommentRangeEnd, I as CommentRangeStart, K as ComplexField, M as DEFAULT_WATERMARK_PRESETS, O as Deletion, g as DocumentBody, Q as DrawingContent, j as Endnote, U as EndnotePosition, E as EndnoteProperties, V as Field, X as FieldCharContent, _ as FieldType, $ as FooterReference, i as Footnote, a0 as FootnotePosition, F as FootnoteProperties, H as HeaderFooter, a1 as HeaderFooterType, a2 as HeaderReference, a3 as Hyperlink, a5 as Image, a6 as ImageCrop, a9 as ImagePadding, aa as ImagePosition, ac as ImageSize, ad as ImageTransform, ae as ImageWrap, ag as InlineSdt, ah as Insertion, ai as InstrTextContent, ak as LineNumberRestart, an as MathEquation, ao as MoveFrom, ap as MoveFromRangeEnd, aq as MoveFromRangeStart, ar as MoveTo, as as MoveToRangeEnd, at as MoveToRangeStart, au as NoBreakHyphenContent, av as NoteNumberRestart, aw as NoteRefMarkContent, ax as NoteReferenceContent, aC as PageOrientation, P as Paragraph, aD as ParagraphContent, aE as ParagraphPropertyChange, aF as PictureWatermark, aG as PropertyChangeInfo, aH as Run, aI as RunContent, aJ as RunPropertyChange, aL as SdtDataBinding, b as SdtProperties, aO as SdtType, aP as Section, S as SectionProperties, aQ as SectionStart, aR as SeparatorContent, aS as Shape, aT as ShapeContent, aW as ShapeTextBody, aX as SimpleField, aY as SoftHyphenContent, a$ as SymbolContent, b0 as TabContent, b1 as Table, b2 as TableCell, b3 as TableCellPropertyChange, b4 as TablePropertyChange, b5 as TableRow, b6 as TableRowPropertyChange, b7 as TableStructuralChangeInfo, b8 as TextBox, b9 as TextContent, ba as TextWatermark, bb as TrackedChangeInfo, bc as TrackedRunChange, bd as VerticalAlign, W as Watermark, be as pictureWatermarkDisplayEmu } from '../content-C3sTRz-u.mjs';
2
- export { k as ShapeFill, l as ShapeOutline, m as ShapeType } from '../formatting-BEkIBePP.mjs';
1
+ export { B as BlockContent, l as BlockSdt, m as BookmarkEnd, n as BookmarkStart, o as BreakContent, e as Chart, p as ChartAxis, q as ChartContent, t as ChartLegend, x as ChartSeries, y as ChartType, z as Column, f as Comment, J as CommentRangeEnd, K as CommentRangeStart, M as ComplexField, Q as DEFAULT_WATERMARK_PRESETS, T as Deletion, g as DocumentBody, U as DrawingContent, j as Endnote, X as EndnotePosition, E as EndnoteProperties, Y as Field, Z as FieldCharContent, a0 as FieldType, a1 as FooterReference, i as Footnote, a2 as FootnotePosition, F as FootnoteProperties, H as HeaderFooter, a3 as HeaderFooterType, a4 as HeaderReference, a5 as Hyperlink, a7 as Image, a8 as ImageCrop, ab as ImagePadding, ac as ImagePosition, ae as ImageSize, af as ImageTransform, ag as ImageWrap, ai as InlineSdt, aj as Insertion, ak as InstrTextContent, am as LineNumberRestart, ap as MathEquation, aq as MoveFrom, ar as MoveFromRangeEnd, as as MoveFromRangeStart, at as MoveTo, au as MoveToRangeEnd, av as MoveToRangeStart, aw as NoBreakHyphenContent, ax as NoteNumberRestart, ay as NoteRefMarkContent, az as NoteReferenceContent, aE as PageOrientation, P as Paragraph, aF as ParagraphContent, aG as ParagraphPropertyChange, aH as PictureWatermark, aI as PropertyChangeInfo, aJ as Run, aK as RunContent, aL as RunPropertyChange, aN as SdtDataBinding, b as SdtProperties, aQ as SdtType, aR as Section, S as SectionProperties, aS as SectionStart, aT as SeparatorContent, aU as Shape, aV as ShapeContent, aY as ShapeTextBody, aZ as SimpleField, a_ as SoftHyphenContent, b1 as SymbolContent, b2 as TabContent, b3 as Table, b4 as TableCell, b5 as TableCellPropertyChange, b6 as TablePropertyChange, b7 as TableRow, b8 as TableRowPropertyChange, b9 as TableStructuralChangeInfo, ba as TextBox, bb as TextContent, bc as TextWatermark, bd as TrackedChangeInfo, be as TrackedRunChange, bf as VerticalAlign, W as Watermark, bg as pictureWatermarkDisplayEmu } from '../content-DrqzbIr7.mjs';
2
+ export { k as ShapeFill, l as ShapeOutline, m as ShapeType } from '../formatting-BqrFPeev.mjs';
3
3
  import '../docx/wrapTypes.mjs';
@@ -1,9 +1,9 @@
1
- import { F as FootnoteProperties, E as EndnoteProperties, g as DocumentBody, h as NumberingDefinitions, i as Footnote, j as Endnote, H as HeaderFooter, e as Chart, k as BookmarkRange } from '../content-C3sTRz-u.mjs';
2
- export { A as AbstractNumbering, B as BlockContent, l as BlockSdt, m as BookmarkEnd, n as BookmarkStart, o as BreakContent, p as ChartAxis, q as ChartContent, r as ChartGrouping, s as ChartLegend, t as ChartPlotGroup, u as ChartPoint, v as ChartSeries, w as ChartType, x as Column, f as Comment, y as CommentAnchorRange, z as CommentAuthor, G as CommentRangeEnd, I as CommentRangeStart, J as CommentReferenceContent, K as ComplexField, L as ContentPosition, M as DEFAULT_WATERMARK_PRESETS, O as Deletion, Q as DrawingContent, D as DrawingScene, T as DrawingSceneNode, U as EndnotePosition, V as Field, X as FieldCharContent, Y as FieldFormData, Z as FieldInlineContent, _ as FieldType, $ as FooterReference, a0 as FootnotePosition, a1 as HeaderFooterType, a2 as HeaderReference, a3 as Hyperlink, a4 as HyperlinkContent, a5 as Image, a6 as ImageCrop, a7 as ImageEffect, a8 as ImageHyperlink, a9 as ImagePadding, aa as ImagePosition, ab as ImageRotationBounds, ac as ImageSize, ad as ImageTransform, ae as ImageWrap, af as ImageWrapPoint, ag as InlineSdt, ah as Insertion, ai as InstrTextContent, aj as LevelSuffix, ak as LineNumberRestart, al as ListLevel, am as ListRendering, an as MathEquation, ao as MoveFrom, ap as MoveFromRangeEnd, aq as MoveFromRangeStart, ar as MoveTo, as as MoveToRangeEnd, at as MoveToRangeStart, au as NoBreakHyphenContent, N as NoteKind, av as NoteNumberRestart, aw as NoteRefMarkContent, ax as NoteReferenceContent, ay as NoteSeparatorReference, az as NumberFormat, aA as NumberingInstance, aB as PageNumberingProperties, aC as PageOrientation, P as Paragraph, aD as ParagraphContent, aE as ParagraphPropertyChange, aF as PictureWatermark, aG as PropertyChangeInfo, aH as Run, aI as RunContent, aJ as RunPropertyChange, aK as SdtCheckboxGlyph, a as SdtControlState, aL as SdtDataBinding, aM as SdtDateState, aN as SdtGalleryState, b as SdtProperties, aO as SdtType, aP as Section, S as SectionProperties, aQ as SectionStart, aR as SeparatorContent, aS as Shape, aT as ShapeContent, c as ShapeEffect, aU as ShapeFillPaint, aV as ShapeStrokePaint, aW as ShapeTextBody, d as ShapeTextBodyProperties, aX as SimpleField, aY as SoftHyphenContent, aZ as StructuredFieldContent, a_ as StructuredFieldTree, a$ as SymbolContent, b0 as TabContent, b1 as Table, b2 as TableCell, b3 as TableCellPropertyChange, b4 as TablePropertyChange, b5 as TableRow, b6 as TableRowPropertyChange, b7 as TableStructuralChangeInfo, b8 as TextBox, b9 as TextContent, ba as TextWatermark, bb as TrackedChangeInfo, bc as TrackedRunChange, bd as VerticalAlign, W as Watermark, be as pictureWatermarkDisplayEmu } from '../content-C3sTRz-u.mjs';
3
- import { f as Theme, C as ColorValue } from '../formatting-BEkIBePP.mjs';
4
- export { B as BorderSpec, g as CellMargins, h as ConditionalFormatStyle, E as EmphasisMark, F as FloatingTableProperties, L as LineSpacingRule, i as ParagraphAlignment, a as ParagraphFormatting, R as RunFontHint, j as RunLanguage, S as ShadingProperties, k as ShapeFill, l as ShapeOutline, m as ShapeType, n as TabLeader, o as TabStop, p as TabStopAlignment, q as TableBorders, e as TableCellFormatting, c as TableFormatting, r as TableLook, s as TableMeasurement, d as TableRowFormatting, t as TableStyleCascade, u as TableStyleRegion, v as TableWidthType, w as TextEffect, b as TextFormatting, T as TextModernEffects, x as ThemeColorScheme, y as ThemeColorSlot, z as ThemeFont, A as ThemeFontScheme, U as UnderlineStyle } from '../formatting-BEkIBePP.mjs';
5
- import { S as StyleDefinitions, F as FontTable, R as RelationshipMap, M as MediaFile } from '../styles-BK3Jecxs.mjs';
6
- export { D as DocDefaults, b as FontEmbed, c as FontInfo, d as Relationship, e as RelationshipType, a as Style, f as StyleType } from '../styles-BK3Jecxs.mjs';
1
+ import { F as FootnoteProperties, E as EndnoteProperties, g as DocumentBody, h as NumberingDefinitions, i as Footnote, j as Endnote, H as HeaderFooter, e as Chart, k as BookmarkRange } from '../content-DrqzbIr7.mjs';
2
+ export { A as AbstractNumbering, B as BlockContent, l as BlockSdt, m as BookmarkEnd, n as BookmarkStart, o as BreakContent, p as ChartAxis, q as ChartContent, r as ChartDataLabels, s as ChartGrouping, t as ChartLegend, u as ChartPlotGroup, v as ChartPoint, w as ChartPointLabel, x as ChartSeries, y as ChartType, z as Column, f as Comment, G as CommentAnchorRange, I as CommentAuthor, J as CommentRangeEnd, K as CommentRangeStart, L as CommentReferenceContent, M as ComplexField, O as ContentPosition, Q as DEFAULT_WATERMARK_PRESETS, T as Deletion, U as DrawingContent, D as DrawingScene, V as DrawingSceneNode, X as EndnotePosition, Y as Field, Z as FieldCharContent, _ as FieldFormData, $ as FieldInlineContent, a0 as FieldType, a1 as FooterReference, a2 as FootnotePosition, a3 as HeaderFooterType, a4 as HeaderReference, a5 as Hyperlink, a6 as HyperlinkContent, a7 as Image, a8 as ImageCrop, a9 as ImageEffect, aa as ImageHyperlink, ab as ImagePadding, ac as ImagePosition, ad as ImageRotationBounds, ae as ImageSize, af as ImageTransform, ag as ImageWrap, ah as ImageWrapPoint, ai as InlineSdt, aj as Insertion, ak as InstrTextContent, al as LevelSuffix, am as LineNumberRestart, an as ListLevel, ao as ListRendering, ap as MathEquation, aq as MoveFrom, ar as MoveFromRangeEnd, as as MoveFromRangeStart, at as MoveTo, au as MoveToRangeEnd, av as MoveToRangeStart, aw as NoBreakHyphenContent, N as NoteKind, ax as NoteNumberRestart, ay as NoteRefMarkContent, az as NoteReferenceContent, aA as NoteSeparatorReference, aB as NumberFormat, aC as NumberingInstance, aD as PageNumberingProperties, aE as PageOrientation, P as Paragraph, aF as ParagraphContent, aG as ParagraphPropertyChange, aH as PictureWatermark, aI as PropertyChangeInfo, aJ as Run, aK as RunContent, aL as RunPropertyChange, aM as SdtCheckboxGlyph, a as SdtControlState, aN as SdtDataBinding, aO as SdtDateState, aP as SdtGalleryState, b as SdtProperties, aQ as SdtType, aR as Section, S as SectionProperties, aS as SectionStart, aT as SeparatorContent, aU as Shape, aV as ShapeContent, c as ShapeEffect, aW as ShapeFillPaint, aX as ShapeStrokePaint, aY as ShapeTextBody, d as ShapeTextBodyProperties, aZ as SimpleField, a_ as SoftHyphenContent, a$ as StructuredFieldContent, b0 as StructuredFieldTree, b1 as SymbolContent, b2 as TabContent, b3 as Table, b4 as TableCell, b5 as TableCellPropertyChange, b6 as TablePropertyChange, b7 as TableRow, b8 as TableRowPropertyChange, b9 as TableStructuralChangeInfo, ba as TextBox, bb as TextContent, bc as TextWatermark, bd as TrackedChangeInfo, be as TrackedRunChange, bf as VerticalAlign, W as Watermark, bg as pictureWatermarkDisplayEmu } from '../content-DrqzbIr7.mjs';
3
+ import { f as Theme, C as ColorValue } from '../formatting-BqrFPeev.mjs';
4
+ export { B as BorderSpec, g as CellMargins, h as ConditionalFormatStyle, E as EmphasisMark, F as FloatingTableProperties, L as LineSpacingRule, i as ParagraphAlignment, a as ParagraphFormatting, R as RunFontHint, j as RunLanguage, S as ShadingProperties, k as ShapeFill, l as ShapeOutline, m as ShapeType, n as TabLeader, o as TabStop, p as TabStopAlignment, q as TableBorders, e as TableCellFormatting, c as TableFormatting, r as TableLook, s as TableMeasurement, d as TableRowFormatting, t as TableStyleCascade, u as TableStyleRegion, v as TableWidthType, w as TextEffect, b as TextFormatting, T as TextModernEffects, x as ThemeColorScheme, y as ThemeColorSlot, z as ThemeFont, A as ThemeFontScheme, U as UnderlineStyle } from '../formatting-BqrFPeev.mjs';
5
+ import { S as StyleDefinitions, F as FontTable, R as RelationshipMap, M as MediaFile } from '../styles-CMybYYHS.mjs';
6
+ export { D as DocDefaults, b as FontEmbed, c as FontInfo, d as Relationship, e as RelationshipType, a as Style, f as StyleType } from '../styles-CMybYYHS.mjs';
7
7
  import '../docx/wrapTypes.mjs';
8
8
 
9
9
  interface CompatibilityFlags {
@@ -13,7 +13,7 @@ interface CompatibilityFlags {
13
13
  useWord97LineBreakRules: boolean;
14
14
  balanceSingleByteDoubleByteWidth: boolean;
15
15
  }
16
- /** Public model contract rehydrated by the Rust S9 facade. */
16
+ /** Public model contract rehydrated by the Rust parser. */
17
17
  interface DocumentSettings {
18
18
  defaultTabStop: number;
19
19
  defaultTableStyle?: string;
@@ -1,14 +1,14 @@
1
- import { a as SdtControlState, b as SdtProperties, R as RevisionInfo, C as CellMarker, D as DrawingScene, c as ShapeEffect, d as ShapeTextBodyProperties, e as Chart, W as Watermark, F as FootnoteProperties, E as EndnoteProperties } from './content-C3sTRz-u.mjs';
2
- import { T as TextModernEffects, P as PresetGeometryPathCommand, B as BorderSpec } from './formatting-BEkIBePP.mjs';
1
+ import { a as SdtControlState, b as SdtProperties, R as RevisionInfo, C as CellMarker, D as DrawingScene, c as ShapeEffect, d as ShapeTextBodyProperties, e as Chart, W as Watermark, F as FootnoteProperties, E as EndnoteProperties } from './content-DrqzbIr7.mjs';
2
+ import { T as TextModernEffects, P as PresetGeometryPathCommand, B as BorderSpec } from './formatting-BqrFPeev.mjs';
3
3
 
4
4
  /**
5
5
  * Inline SDT widget metadata carried by a painted text run.
6
6
  */
7
7
  interface InlineSdtWidget {
8
8
  kind: 'checkbox';
9
- /** Stable per-document id derived from the ProseMirror node position. */
9
+ /** Stable per-document id derived from the node position. */
10
10
  groupId: string;
11
- /** ProseMirror position of the inline SDT node. */
11
+ /** Document position of the inline SDT node. */
12
12
  pos: number;
13
13
  /** Word tag value (`w:tag`). */
14
14
  tag?: string;
@@ -20,7 +20,7 @@ interface InlineSdtWidget {
20
20
  /**
21
21
  * One run's visible slice on a laid-out line: the run to render/measure plus
22
22
  * its on-line text. For a boundary text run this is a shallow copy sliced to
23
- * the line's head/tail char (PM positions shifted to match); tabs, images,
23
+ * the line's head/tail char (document positions shifted to match); tabs, images,
24
24
  * line breaks, and fields pass through whole with an empty `text`. `text` is
25
25
  * the run's textual contribution to the line (empty for non-text runs), so
26
26
  * joining a line's segment texts reconstructs the line's visible characters.
@@ -195,9 +195,9 @@ type TextRun = RunFormatting & {
195
195
  text: string;
196
196
  /** Hyperlink information if this run is a link. */
197
197
  hyperlink?: HyperlinkInfo;
198
- /** PM doc offset where the run's text begins. */
198
+ /** Document offset where the run's text begins. */
199
199
  pmStart?: number;
200
- /** PM doc offset one past the run's final character. */
200
+ /** Document offset one past the run's final character. */
201
201
  pmEnd?: number;
202
202
  /** Inline content-control widget metadata when this run is the visible glyph. */
203
203
  inlineSdtWidget?: InlineSdtWidget;
@@ -432,6 +432,8 @@ type ParagraphAttrs = {
432
432
  indent?: ParagraphIndent;
433
433
  keepNext?: boolean;
434
434
  keepLines?: boolean;
435
+ /** w:widowControl, a toggle defaulting on: only an authored off is carried. */
436
+ widowControl?: boolean;
435
437
  pageBreakBefore?: boolean;
436
438
  styleId?: string;
437
439
  contextualSpacing?: boolean;
@@ -484,13 +486,13 @@ type ParagraphBlock = {
484
486
  sdtGroups?: SdtGroup[];
485
487
  kind: 'paragraph';
486
488
  id: BlockId;
487
- /** Stable Word `w14:paraId` / PM `paraId`, when available. */
489
+ /** Stable Word `w14:paraId`, when available. */
488
490
  paraId?: string;
489
491
  runs: Run[];
490
492
  attrs?: ParagraphAttrs;
491
- /** ProseMirror start position for this block. */
493
+ /** Document start position for this block. */
492
494
  pmStart?: number;
493
- /** ProseMirror end position for this block. */
495
+ /** Document end position for this block. */
494
496
  pmEnd?: number;
495
497
  };
496
498
  /**
@@ -827,7 +829,7 @@ type ShapeBlock = {
827
829
  decorative?: boolean;
828
830
  title?: string;
829
831
  description?: string;
830
- /** PM/doc positions for selection mapping. */
832
+ /** Document positions for selection mapping. */
831
833
  docStart?: number;
832
834
  docEnd?: number;
833
835
  pmStart?: number;
@@ -952,9 +954,9 @@ type TextBoxBlock = {
952
954
  };
953
955
  /** Paragraph blocks inside the text box */
954
956
  content: ParagraphBlock[];
955
- /** Display mode copied from the ProseMirror text box node */
957
+ /** Display mode copied from the text box node */
956
958
  displayMode?: 'inline' | 'float' | 'block';
957
- /** CSS float direction copied from the ProseMirror text box node */
959
+ /** CSS float direction copied from the text box node */
958
960
  cssFloat?: 'left' | 'right' | 'none';
959
961
  /** OOXML wrap type for anchored text boxes */
960
962
  wrapType?: string;
@@ -986,9 +988,9 @@ interface SdtGroup {
986
988
  checked?: boolean;
987
989
  bound?: boolean;
988
990
  repeatingItem?: boolean;
989
- /** Authored numeric `w:id`; undefined = address by `id`/PM position. */
991
+ /** Authored numeric `w:id`; undefined = address by `id`/position. */
990
992
  controlId?: number;
991
- /** Stable PM position for untagged controls. */
993
+ /** Stable document position for untagged controls. */
992
994
  pos?: number;
993
995
  /** Typed overlay state. Undefined = derive from content. */
994
996
  controlState?: SdtControlState;
@@ -1035,6 +1037,8 @@ type TypesetRow = {
1035
1037
  descent: number;
1036
1038
  /** Total line height in pixels. */
1037
1039
  lineHeight: number;
1040
+ /** Deterministic line geometry produced without a measurement face. */
1041
+ syntheticFallback?: boolean;
1038
1042
  /** Left offset from floating images (pixels from content left edge). */
1039
1043
  leftOffset?: number;
1040
1044
  /** Right offset from floating images (pixels from content right edge). */
@@ -1177,7 +1181,7 @@ type TextBoxExtent = {
1177
1181
  type BlockExtent = ParagraphExtent | ImageExtent | ShapeExtent | ChartExtent | TableExtent | TextBoxExtent | SectionBreakExtent | PageBreakExtent | ColumnBreakExtent;
1178
1182
  /**
1179
1183
  * Fields every fragment carries: which block it came from, where it sits on
1180
- * its page, and the PM span it maps to.
1184
+ * its page, and the document span it maps to.
1181
1185
  */
1182
1186
  type FragmentBase = {
1183
1187
  /** Block ID this fragment belongs to. */
@@ -1188,9 +1192,9 @@ type FragmentBase = {
1188
1192
  y: number;
1189
1193
  /** Width of the fragment. */
1190
1194
  width: number;
1191
- /** ProseMirror start position (for click mapping). */
1195
+ /** Document start position (for click mapping). */
1192
1196
  pmStart?: number;
1193
- /** ProseMirror end position (for click mapping). */
1197
+ /** Document end position (for click mapping). */
1194
1198
  pmEnd?: number;
1195
1199
  };
1196
1200
  /**
@@ -1274,7 +1278,7 @@ type ShapeFragment = FragmentBase & {
1274
1278
  kind: 'shape';
1275
1279
  /** Height of the shape bbox. */
1276
1280
  height: number;
1277
- /** PM/doc positions for display-list consumers that use docStart/docEnd names. */
1281
+ /** Document positions for display-list consumers that use docStart/docEnd names. */
1278
1282
  docStart?: number;
1279
1283
  docEnd?: number;
1280
1284
  /** True when positioned outside normal flow. */
@@ -1547,7 +1551,7 @@ type LayoutOptions = {
1547
1551
  /** Per-page footnote reserved heights (pageNumber → height in pixels). */
1548
1552
  footnoteReservedHeights?: Map<number, number>;
1549
1553
  /** Section break type for the body-level (final) section (for section transition logic). */
1550
- bodyBreakType?: 'continuous' | 'nextPage' | 'evenPage' | 'oddPage';
1554
+ bodyBreakType?: 'continuous' | 'nextPage' | 'evenPage' | 'oddPage' | 'nextColumn';
1551
1555
  /** Effective section states, indexed by section. Undefined = legacy globals. */
1552
1556
  sections?: Array<{
1553
1557
  sectionId?: string;
@@ -1579,8 +1583,8 @@ type HitTestResult = {
1579
1583
  localY?: number;
1580
1584
  };
1581
1585
  /**
1582
- * A location expressed in block/run/character terms, with the matching PM
1583
- * position when known.
1586
+ * A location expressed in block/run/character terms, with the matching
1587
+ * document position when known.
1584
1588
  */
1585
1589
  type DocumentPosition = {
1586
1590
  /** Block index. */
@@ -1589,7 +1593,7 @@ type DocumentPosition = {
1589
1593
  runIndex?: number;
1590
1594
  /** Character offset within the run. */
1591
1595
  charOffset?: number;
1592
- /** ProseMirror position. */
1596
+ /** Document position. */
1593
1597
  pmPos?: number;
1594
1598
  };
1595
1599
  /**
@@ -1,5 +1,5 @@
1
- import { P as Paragraph, B as BlockContent, f as Comment } from '../content-C3sTRz-u.mjs';
2
- import '../formatting-BEkIBePP.mjs';
1
+ import { P as Paragraph, B as BlockContent, f as Comment } from '../content-DrqzbIr7.mjs';
2
+ import '../formatting-BqrFPeev.mjs';
3
3
  import '../docx/wrapTypes.mjs';
4
4
 
5
5
  /**