@betteroffice/docx 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/chunk-GGEGIQRK.mjs +1 -0
  2. package/dist/chunk-J7LNO6SM.mjs +1 -0
  3. package/dist/chunk-WON6K4FY.mjs +1 -0
  4. package/dist/chunk-Y7RUNRU2.mjs +1 -0
  5. package/dist/collaboration/index.d.mts +5 -4
  6. package/dist/core.d.mts +3 -3
  7. package/dist/{displayListQueries-UGc_XBUv.d.mts → displayListQueries-BJlo7Jkz.d.mts} +24 -6
  8. package/dist/docx/index.d.mts +1 -1
  9. package/dist/editor/index.d.mts +5 -4
  10. package/dist/{rustDisplayList-CX78djsZ.d.mts → frameDelta-D965X8yK.d.mts} +2 -273
  11. package/dist/generated/edit/docx_edit_bg.wasm +0 -0
  12. package/dist/generated/layout/docx_layout_bg.wasm +0 -0
  13. package/dist/generated/parse/docx_parse_bg.wasm +0 -0
  14. package/dist/{index-Bwxm3oiC.d.mts → index-Dx4Z3lkz.d.mts} +83 -7
  15. package/dist/layout/index.d.mts +5 -4
  16. package/dist/layout/index.mjs +1 -1
  17. package/dist/layout/pagination/index.d.mts +3 -3
  18. package/dist/layout/render/index.d.mts +8 -7
  19. package/dist/layout/render/index.mjs +1 -1
  20. package/dist/plugin-api/RenderedDomContext.d.mts +5 -4
  21. package/dist/plugin-api/index.d.mts +1 -1
  22. package/dist/plugin-api/resolveItemPositions.d.mts +1 -1
  23. package/dist/rustDisplayList-BRuZBqdL.d.mts +278 -0
  24. package/dist/types/content.d.mts +1 -1
  25. package/dist/types/document.d.mts +2 -2
  26. package/dist/{types-DMkDbvEu.d.mts → types-BfqUl2h_.d.mts} +1 -1
  27. package/dist/utils/comments.d.mts +1 -1
  28. package/dist/utils/index.d.mts +1 -1
  29. package/dist/wasm-DO3BUV7C.mjs +1 -0
  30. package/dist/wasm-NWXX4H5G.mjs +1 -0
  31. package/dist/wasm-edit.d.mts +1 -0
  32. package/dist/wasm-edit.mjs +1 -1
  33. package/dist/wasm-layout.d.mts +10 -1
  34. package/dist/wasm-layout.mjs +1 -1
  35. package/dist/yrs/index.d.mts +4 -3
  36. package/dist/yrs/index.mjs +1 -1
  37. package/dist/yrs/residentEngineWorker.mjs +1 -1
  38. package/package.json +1 -1
  39. package/dist/chunk-6NEKRDXF.mjs +0 -1
  40. package/dist/chunk-CIRN3LZA.mjs +0 -1
  41. package/dist/chunk-NTQM4EYN.mjs +0 -1
  42. package/dist/wasm-BGQBTR2J.mjs +0 -1
  43. package/dist/wasm-SA237OSP.mjs +0 -1
  44. package/dist/{content-DLFHRQav.d.mts → content-MOZ6hKP4.d.mts} +349 -349
@@ -1,5 +1,5 @@
1
1
  import { Document } from '../types/document.mjs';
2
- import '../content-DLFHRQav.mjs';
2
+ import '../content-MOZ6hKP4.mjs';
3
3
  import '../formatting-D1EPSaJP.mjs';
4
4
  import '../docx/wrapTypes.mjs';
5
5
  import '../styles-Dn_o3Vo5.mjs';
@@ -1,6 +1,6 @@
1
1
  import { SidebarItem, RenderedDomContext } from './index.mjs';
2
2
  import '../types/document.mjs';
3
- import '../content-DLFHRQav.mjs';
3
+ import '../content-MOZ6hKP4.mjs';
4
4
  import '../formatting-D1EPSaJP.mjs';
5
5
  import '../docx/wrapTypes.mjs';
6
6
  import '../styles-Dn_o3Vo5.mjs';
@@ -0,0 +1,278 @@
1
+ import { a as Layout } from './types-BfqUl2h_.mjs';
2
+ import { MeasuredBlock } from './layout/pagination/index.mjs';
3
+ import { D as DisplayList, R as RetainedFrame } from './frameDelta-D965X8yK.mjs';
4
+
5
+ /**
6
+ * JS seam to the Rust display-list builder (crates/docx-layout).
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.
12
+ *
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.
16
+ *
17
+ * @experimental part of the rust-canvas-engine change; shape may evolve.
18
+ */
19
+
20
+ /**
21
+ * 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).
25
+ */
26
+ interface DisplayListHfVariant {
27
+ rId: string;
28
+ kind: 'header' | 'footer';
29
+ type: 'default' | 'first' | 'even';
30
+ /** `toMeasuredBlocks(content.blocks, content.measures)` — same schema as body `measured` */
31
+ measured: MeasuredBlock[];
32
+ /** HeaderFooterContent.height (in-flow stack incl. floating blocks) */
33
+ height: number;
34
+ /** HeaderFooterContent.flowHeight (in-flow band height; fallback: height) */
35
+ flowHeight?: number;
36
+ visualTop?: number;
37
+ visualBottom?: number;
38
+ /**
39
+ * Per-page resolved widths of PAGE/NUMPAGES field runs in this HF part, so a
40
+ * centered/right-aligned line carrying such a field re-centers per page. The
41
+ * line width is measured ONCE at the field's fallback text ("1"), so without
42
+ * this the builder holds the same centered position on every page even though
43
+ * "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).
45
+ */
46
+ fieldWidths?: DisplayListFieldWidths[];
47
+ }
48
+ /**
49
+ * 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`
52
+ * (the field's fallback text); `perPage[i]` is the width of the field's resolved
53
+ * text on layout page index `i` (PAGE → that page's number, NUMPAGES → total).
54
+ */
55
+ interface DisplayListFieldWidths {
56
+ pmStart: number;
57
+ fallbackWidth: number;
58
+ perPage: number[];
59
+ }
60
+ /**
61
+ * Optional header/footer payload of the builder envelope. Absent ⇒ the Rust
62
+ * output is byte-identical to the body-only build. Flags come off the section
63
+ * properties / settings the DOM painter uses; distances are the same px the
64
+ * painter resolves (`headerDistance ?? page.margins.header ?? 48`).
65
+ */
66
+ interface DisplayListHeadersFooters {
67
+ titlePg?: boolean;
68
+ evenAndOddHeaders?: boolean;
69
+ headerDistance?: number;
70
+ footerDistance?: number;
71
+ /** Page-level Word watermark, painted behind body/header/footer content. */
72
+ watermark?: DisplayListWatermark;
73
+ variants: DisplayListHfVariant[];
74
+ /** Stable section identity. Undefined = document-global legacy envelope. */
75
+ sectionId?: string;
76
+ /** Zero-based section index. */
77
+ sectionIndex?: number;
78
+ }
79
+ type DisplayListWatermark = DisplayListTextWatermark | DisplayListPictureWatermark;
80
+ interface DisplayListTextWatermark {
81
+ kind: 'text';
82
+ text: string;
83
+ font: string;
84
+ color: string;
85
+ semitransparent: boolean;
86
+ layout: 'diagonal' | 'horizontal';
87
+ fontSize?: number;
88
+ /** Undefined defaults to true for watermarks. */
89
+ decorative?: boolean;
90
+ }
91
+ interface DisplayListPictureWatermark {
92
+ kind: 'picture';
93
+ relId?: string;
94
+ dataUrl?: string;
95
+ scale: number;
96
+ washout: boolean;
97
+ widthEmu?: number;
98
+ heightEmu?: number;
99
+ /** Undefined defaults to true for watermarks. */
100
+ decorative?: boolean;
101
+ }
102
+ /** One measured note in a page/section note area. */
103
+ interface DisplayListNoteItem {
104
+ kind?: 'footnote' | 'endnote';
105
+ id?: number;
106
+ displayLabel?: string;
107
+ measured?: MeasuredBlock[];
108
+ height?: number;
109
+ anchorDocStart?: number;
110
+ anchorDocEnd?: number;
111
+ customMarkFollows?: boolean;
112
+ }
113
+ /** Typed non-fragmented note-region input for the Rust display builder. */
114
+ interface DisplayListNoteArea {
115
+ pageIndex?: number;
116
+ sectionId?: string;
117
+ kind?: 'footnote' | 'endnote';
118
+ placement?: 'pageBottom' | 'beneathText' | 'sectEnd' | 'docEnd';
119
+ y?: number;
120
+ height?: number;
121
+ columns?: number;
122
+ separator?: DisplayListNoteItem;
123
+ notes?: DisplayListNoteItem[];
124
+ }
125
+ /** Stable reviewer palette entry for comments/revisions. */
126
+ interface DisplayListCommentAuthor {
127
+ id?: string;
128
+ name?: string;
129
+ paletteIndex?: number;
130
+ color?: string;
131
+ }
132
+ /** One reply of a comment thread (a11y announcement input). */
133
+ interface DisplayListCommentReply {
134
+ id?: number;
135
+ authorId?: string;
136
+ authorName?: string;
137
+ date?: string;
138
+ /** Plain-text body (the builder caps it before it reaches primitives). */
139
+ text?: string;
140
+ }
141
+ /**
142
+ * Per-comment thread metadata keyed by comment id, joined by the builder onto
143
+ * every primitive carrying that id in `commentIds` so the a11y mirror can
144
+ * announce the complete thread (author name, date, body, replies). All string
145
+ * values are file-derived/attacker-controlled; consumers must only ever
146
+ * assign them via textContent/setAttribute.
147
+ */
148
+ interface DisplayListCommentThread {
149
+ /** Comment id — matches the numeric ids in `resolvedCommentIds`/`commentIds`. */
150
+ id?: number;
151
+ authorId?: string;
152
+ authorName?: string;
153
+ date?: string;
154
+ /** Plain-text body (builder-capped before emission). */
155
+ text?: string;
156
+ /** Replies in thread order (builder-capped count and text). */
157
+ replies?: DisplayListCommentReply[];
158
+ }
159
+ /** The `{ measured, options, layout }` envelope the Rust builder consumes. */
160
+ interface DisplayListBuildInputs {
161
+ /** Serialization contract version. Undefined reads as legacy version 0. */
162
+ contractVersion?: number;
163
+ measured: MeasuredBlock[];
164
+ options: unknown;
165
+ layout: Layout;
166
+ /** header/footer parts + section flags; omitted ⇒ body-only display list */
167
+ headersFooters?: DisplayListHeadersFooters;
168
+ /**
169
+ * Doc-wide font-id chains keyed `"<family lowercase>|<bold 0|1>|<italic 0|1>"`
170
+ * → measurement `FontStore` ids — the SAME map the measurement input carries.
171
+ * Present only under Rust measurement (the ids must belong to a populated
172
+ * 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).
175
+ */
176
+ fontChains?: Record<string, number[]>;
177
+ /** Page/section note regions. Undefined = no note emission. */
178
+ noteAreas?: DisplayListNoteArea[];
179
+ /** Resolved comments suppressed from active tint. Undefined = none known. */
180
+ resolvedCommentIds?: number[];
181
+ /** Stable reviewer palette. Undefined = legacy hard-coded colors. */
182
+ commentAuthors?: DisplayListCommentAuthor[];
183
+ /** Per-comment thread metadata for a11y announcements. Undefined = none. */
184
+ commentThreads?: DisplayListCommentThread[];
185
+ }
186
+ /** Minimal engine surface, injectable so tests can fake the wasm module. */
187
+ interface RustDisplayListEngine {
188
+ buildDisplayListJson(input: string): string;
189
+ /** Resident editing engines expose binary deltas; the stateless layout wasm does not. */
190
+ buildDisplayListFrame?(input: string, expectedFrameEpoch: number): Uint8Array;
191
+ /** One-owner ordinary input path; available on the resident editing engine. */
192
+ applyInput?(text: string, expectedFrameEpoch: number): Uint8Array;
193
+ displayHitTestRegionsJson?(pageIndex: number, x: number, y: number): string;
194
+ displayRangeRectsJson?(from: number, to: number): string;
195
+ displayRangeRectsRegionJson?(region: 'body' | 'header' | 'footer', rId: string, from: number, to: number): string;
196
+ }
197
+ type RustDisplayListSourceErrorStage = 'load' | 'build' | 'parse' | 'decode' | 'apply';
198
+ interface RustDisplayFrameResult {
199
+ displayList: DisplayList;
200
+ /** Null only on the compatibility JSON engine path. */
201
+ frame: RetainedFrame | null;
202
+ transport: 'frame-delta-v1' | 'json';
203
+ }
204
+ /**
205
+ * Typed terminal error from the mandatory Rust display-list source. Hosts may
206
+ * surface this through their editor error boundary; it is never permission to
207
+ * silently substitute painter geometry.
208
+ */
209
+ declare class RustDisplayListSourceError extends Error {
210
+ readonly stage: RustDisplayListSourceErrorStage;
211
+ constructor(stage: RustDisplayListSourceErrorStage, cause: unknown);
212
+ }
213
+ /**
214
+ * Query surface over an already-built display list, injectable so tests can
215
+ * fake the wasm module.
216
+ *
217
+ * The `*Json` calls take the display-list JSON string as an argument (the Rust
218
+ * side re-parses it per query — callers should cache the string). The
219
+ * session-handle members parse the list ONCE (`openDisplayList` → handle) and
220
+ * answer many queries by handle with no re-serialization, reusing the same
221
+ * hit/range logic so results are byte-identical. The handle members are
222
+ * OPTIONAL: the embedded wasm carries them only after the integrator re-embeds,
223
+ * so `createDisplayListQueries` feature-detects `hasDisplayListSession` and
224
+ * falls back to the `*Json` path when they are absent.
225
+ */
226
+ interface RustDisplayListQueryEngine {
227
+ /** region-aware hit test → `{"region","rId"?,"pos"}` or `"null"` JSON */
228
+ hitTestRegionsJson(displayList: string, pageIndex: number, x: number, y: number): string;
229
+ /** body PM range → JSON array of `{pageIndex,x,y,width,height}` rects */
230
+ rangeRectsJson(displayList: string, from: number, to: number): string;
231
+ /**
232
+ * Region-aware PM range → JSON array of rects. `region` is
233
+ * `'body' | 'header' | 'footer'`; `rId` scopes header/footer to one HF part
234
+ * (empty for body / match-any). OPTIONAL: the embedded wasm carries it only
235
+ * after the integrator re-embeds, so `createDisplayListQueries` falls back to
236
+ * `[]` when absent (HF selection geometry stays a documented gap until then).
237
+ */
238
+ rangeRectsRegionJson?(displayList: string, region: string, rId: string, from: number, to: number): string;
239
+ /** true when the embedded wasm carries the region-aware range-rect exports */
240
+ hasRangeRectsRegion?(): boolean;
241
+ /** true when the embedded wasm carries the session-handle exports below */
242
+ hasDisplayListSession?(): boolean;
243
+ /** parse a display list once, return a handle for the by-handle queries */
244
+ openDisplayList?(displayList: string): number;
245
+ /** free a handle's parsed display list */
246
+ closeDisplayList?(handle: number): void;
247
+ /** patch a stored display list's changed pages in place (see layout wasm) */
248
+ updateDisplayList?(handle: number, update: string): void;
249
+ /** true when the embedded wasm carries the page-delta update export */
250
+ hasDisplayListUpdate?(): boolean;
251
+ /** region-aware hit test against a stored display list (by handle) */
252
+ hitTestRegionsByHandle?(handle: number, pageIndex: number, x: number, y: number): string;
253
+ /** body PM range against a stored display list (by handle) */
254
+ rangeRectsByHandle?(handle: number, from: number, to: number): string;
255
+ /** region-aware PM range against a stored display list (by handle) */
256
+ rangeRectsRegionByHandle?(handle: number, region: string, rId: string, from: number, to: number): string;
257
+ }
258
+ /**
259
+ * Lazily load the wasm query surface (hit-test + range-rects). Shares the
260
+ * module promise with `buildRustDisplayList`, so on the canvas-renderer path
261
+ * the engine is already resolved by the time the first display list lands.
262
+ */
263
+ declare function loadRustDisplayListQueryEngine(): Promise<RustDisplayListQueryEngine>;
264
+ /** Display-only fields sent to an engine that already retains pagination. */
265
+ declare function encodeDisplayListFrameExtras(inputs: DisplayListBuildInputs): string;
266
+ /**
267
+ * Build a DisplayList for a computed layout through the Rust engine. Throws
268
+ * when the wasm module fails to load or the builder rejects the input — the
269
+ * caller is expected to fall back to the DOM painter.
270
+ */
271
+ declare function buildRustDisplayList(inputs: DisplayListBuildInputs, engine?: RustDisplayListEngine): Promise<DisplayList>;
272
+ /**
273
+ * Production display build. Resident editing engines return FrameDelta v1;
274
+ * older/stateless engines retain the full-JSON parity path.
275
+ */
276
+ declare function buildRustDisplayFrame(inputs: DisplayListBuildInputs, engine?: RustDisplayListEngine, previous?: RetainedFrame | null): Promise<RustDisplayFrameResult>;
277
+
278
+ export { type DisplayListHeadersFooters as D, type RustDisplayListQueryEngine as R, type DisplayListBuildInputs as a, type DisplayListHfVariant as b, type DisplayListPictureWatermark as c, type DisplayListTextWatermark as d, type DisplayListWatermark as e, type RustDisplayFrameResult as f, type RustDisplayListEngine as g, RustDisplayListSourceError as h, type RustDisplayListSourceErrorStage as i, buildRustDisplayFrame as j, buildRustDisplayList as k, encodeDisplayListFrameExtras as l, loadRustDisplayListQueryEngine as m };
@@ -1,3 +1,3 @@
1
- export { B as BlockContent, m as BlockSdt, n as BookmarkEnd, o as BookmarkStart, p as BreakContent, e as Chart, q as ChartAxis, r as ChartContent, t as ChartLegend, w as ChartSeries, x as ChartType, y as Column, g as Comment, I as CommentRangeEnd, J as CommentRangeStart, L as ComplexField, O as DEFAULT_WATERMARK_PRESETS, Q as Deletion, h as DocumentBody, T as DrawingContent, k as Endnote, V as EndnotePosition, E as EndnoteProperties, X as Field, Y as FieldCharContent, $ as FieldType, a0 as FooterReference, j as Footnote, a1 as FootnotePosition, F as FootnoteProperties, H as HeaderFooter, a2 as HeaderFooterType, a3 as HeaderReference, a4 as Hyperlink, a6 as Image, a7 as ImageCrop, aa as ImagePadding, ab as ImagePosition, ad as ImageSize, ae as ImageTransform, af as ImageWrap, ah as InlineSdt, ai as Insertion, aj as InstrTextContent, al as LineNumberRestart, ao as MathEquation, ap as MoveFrom, aq as MoveFromRangeEnd, ar as MoveFromRangeStart, as as MoveTo, at as MoveToRangeEnd, au as MoveToRangeStart, av as NoBreakHyphenContent, aw as NoteNumberRestart, ax as NoteRefMarkContent, ay as NoteReferenceContent, aD as PageOrientation, f as Paragraph, aE as ParagraphContent, aF as ParagraphPropertyChange, aG as PictureWatermark, aH as PropertyChangeInfo, aI as Run, aJ as RunContent, aK as RunPropertyChange, aM as SdtDataBinding, b as SdtProperties, aP as SdtType, aQ as Section, S as SectionProperties, aR as SectionStart, aS as SeparatorContent, aT as Shape, aU as ShapeContent, aV as ShapeFill, aX as ShapeOutline, aZ as ShapeTextBody, a_ as ShapeType, a$ as SimpleField, b0 as SoftHyphenContent, b3 as SymbolContent, b4 as TabContent, b5 as Table, b6 as TableCell, b7 as TableCellPropertyChange, b8 as TablePropertyChange, b9 as TableRow, ba as TableRowPropertyChange, bb as TableStructuralChangeInfo, bc as TextBox, bd as TextContent, be as TextWatermark, bf as TrackedChangeInfo, bg as TrackedRunChange, bh as VerticalAlign, W as Watermark, bi as pictureWatermarkDisplayEmu } from '../content-DLFHRQav.mjs';
1
+ export { B as BlockContent, m as BlockSdt, n as BookmarkEnd, o as BookmarkStart, p as BreakContent, e as Chart, q as ChartAxis, r as ChartContent, t as ChartLegend, w as ChartSeries, x as ChartType, y as Column, g as Comment, I as CommentRangeEnd, J as CommentRangeStart, L as ComplexField, O as DEFAULT_WATERMARK_PRESETS, Q as Deletion, h as DocumentBody, T as DrawingContent, k as Endnote, V as EndnotePosition, E as EndnoteProperties, X as Field, Y as FieldCharContent, $ as FieldType, a0 as FooterReference, j as Footnote, a1 as FootnotePosition, F as FootnoteProperties, H as HeaderFooter, a2 as HeaderFooterType, a3 as HeaderReference, a4 as Hyperlink, a6 as Image, a7 as ImageCrop, aa as ImagePadding, ab as ImagePosition, ad as ImageSize, ae as ImageTransform, af as ImageWrap, ah as InlineSdt, ai as Insertion, aj as InstrTextContent, al as LineNumberRestart, ao as MathEquation, ap as MoveFrom, aq as MoveFromRangeEnd, ar as MoveFromRangeStart, as as MoveTo, at as MoveToRangeEnd, au as MoveToRangeStart, av as NoBreakHyphenContent, aw as NoteNumberRestart, ax as NoteRefMarkContent, ay as NoteReferenceContent, aD as PageOrientation, f as Paragraph, aE as ParagraphContent, aF as ParagraphPropertyChange, aG as PictureWatermark, aH as PropertyChangeInfo, aI as Run, aJ as RunContent, aK as RunPropertyChange, aM as SdtDataBinding, b as SdtProperties, aP as SdtType, aQ as Section, S as SectionProperties, aR as SectionStart, aS as SeparatorContent, aT as Shape, aU as ShapeContent, aV as ShapeFill, aX as ShapeOutline, aZ as ShapeTextBody, a_ as ShapeType, a$ as SimpleField, b0 as SoftHyphenContent, b3 as SymbolContent, b4 as TabContent, b5 as Table, b6 as TableCell, b7 as TableCellPropertyChange, b8 as TablePropertyChange, b9 as TableRow, ba as TableRowPropertyChange, bb as TableStructuralChangeInfo, bc as TextBox, bd as TextContent, be as TextWatermark, bf as TrackedChangeInfo, bg as TrackedRunChange, bh as VerticalAlign, W as Watermark, bi as pictureWatermarkDisplayEmu } from '../content-MOZ6hKP4.mjs';
2
2
  import '../formatting-D1EPSaJP.mjs';
3
3
  import '../docx/wrapTypes.mjs';
@@ -1,5 +1,5 @@
1
- import { F as FootnoteProperties, E as EndnoteProperties, h as DocumentBody, i as NumberingDefinitions, j as Footnote, k as Endnote, H as HeaderFooter, e as Chart, l as BookmarkRange } from '../content-DLFHRQav.mjs';
2
- export { A as AbstractNumbering, B as BlockContent, m as BlockSdt, n as BookmarkEnd, o as BookmarkStart, p as BreakContent, q as ChartAxis, r as ChartContent, s as ChartGrouping, t as ChartLegend, u as ChartPlotGroup, v as ChartPoint, w as ChartSeries, x as ChartType, y as Column, g as Comment, z as CommentAnchorRange, G as CommentAuthor, I as CommentRangeEnd, J as CommentRangeStart, K as CommentReferenceContent, L as ComplexField, M as ContentPosition, O as DEFAULT_WATERMARK_PRESETS, Q as Deletion, T as DrawingContent, D as DrawingScene, U as DrawingSceneNode, V as EndnotePosition, X as Field, Y as FieldCharContent, Z as FieldFormData, _ as FieldInlineContent, $ as FieldType, a0 as FooterReference, a1 as FootnotePosition, a2 as HeaderFooterType, a3 as HeaderReference, a4 as Hyperlink, a5 as HyperlinkContent, a6 as Image, a7 as ImageCrop, a8 as ImageEffect, a9 as ImageHyperlink, aa as ImagePadding, ab as ImagePosition, ac as ImageRotationBounds, ad as ImageSize, ae as ImageTransform, af as ImageWrap, ag as ImageWrapPoint, ah as InlineSdt, ai as Insertion, aj as InstrTextContent, ak as LevelSuffix, al as LineNumberRestart, am as ListLevel, an as ListRendering, ao as MathEquation, ap as MoveFrom, aq as MoveFromRangeEnd, ar as MoveFromRangeStart, as as MoveTo, at as MoveToRangeEnd, au as MoveToRangeStart, av as NoBreakHyphenContent, N as NoteKind, aw as NoteNumberRestart, ax as NoteRefMarkContent, ay as NoteReferenceContent, az as NoteSeparatorReference, aA as NumberFormat, aB as NumberingInstance, aC as PageNumberingProperties, aD as PageOrientation, f as Paragraph, aE as ParagraphContent, aF as ParagraphPropertyChange, aG as PictureWatermark, aH as PropertyChangeInfo, aI as Run, aJ as RunContent, aK as RunPropertyChange, aL as SdtCheckboxGlyph, a as SdtControlState, aM as SdtDataBinding, aN as SdtDateState, aO as SdtGalleryState, b as SdtProperties, aP as SdtType, aQ as Section, S as SectionProperties, aR as SectionStart, aS as SeparatorContent, aT as Shape, aU as ShapeContent, c as ShapeEffect, aV as ShapeFill, aW as ShapeFillPaint, aX as ShapeOutline, aY as ShapeStrokePaint, aZ as ShapeTextBody, d as ShapeTextBodyProperties, a_ as ShapeType, a$ as SimpleField, b0 as SoftHyphenContent, b1 as StructuredFieldContent, b2 as StructuredFieldTree, b3 as SymbolContent, b4 as TabContent, b5 as Table, b6 as TableCell, b7 as TableCellPropertyChange, b8 as TablePropertyChange, b9 as TableRow, ba as TableRowPropertyChange, bb as TableStructuralChangeInfo, bc as TextBox, bd as TextContent, be as TextWatermark, bf as TrackedChangeInfo, bg as TrackedRunChange, bh as VerticalAlign, W as Watermark, bi as pictureWatermarkDisplayEmu } from '../content-DLFHRQav.mjs';
1
+ import { F as FootnoteProperties, E as EndnoteProperties, h as DocumentBody, i as NumberingDefinitions, j as Footnote, k as Endnote, H as HeaderFooter, e as Chart, l as BookmarkRange } from '../content-MOZ6hKP4.mjs';
2
+ export { A as AbstractNumbering, B as BlockContent, m as BlockSdt, n as BookmarkEnd, o as BookmarkStart, p as BreakContent, q as ChartAxis, r as ChartContent, s as ChartGrouping, t as ChartLegend, u as ChartPlotGroup, v as ChartPoint, w as ChartSeries, x as ChartType, y as Column, g as Comment, z as CommentAnchorRange, G as CommentAuthor, I as CommentRangeEnd, J as CommentRangeStart, K as CommentReferenceContent, L as ComplexField, M as ContentPosition, O as DEFAULT_WATERMARK_PRESETS, Q as Deletion, T as DrawingContent, D as DrawingScene, U as DrawingSceneNode, V as EndnotePosition, X as Field, Y as FieldCharContent, Z as FieldFormData, _ as FieldInlineContent, $ as FieldType, a0 as FooterReference, a1 as FootnotePosition, a2 as HeaderFooterType, a3 as HeaderReference, a4 as Hyperlink, a5 as HyperlinkContent, a6 as Image, a7 as ImageCrop, a8 as ImageEffect, a9 as ImageHyperlink, aa as ImagePadding, ab as ImagePosition, ac as ImageRotationBounds, ad as ImageSize, ae as ImageTransform, af as ImageWrap, ag as ImageWrapPoint, ah as InlineSdt, ai as Insertion, aj as InstrTextContent, ak as LevelSuffix, al as LineNumberRestart, am as ListLevel, an as ListRendering, ao as MathEquation, ap as MoveFrom, aq as MoveFromRangeEnd, ar as MoveFromRangeStart, as as MoveTo, at as MoveToRangeEnd, au as MoveToRangeStart, av as NoBreakHyphenContent, N as NoteKind, aw as NoteNumberRestart, ax as NoteRefMarkContent, ay as NoteReferenceContent, az as NoteSeparatorReference, aA as NumberFormat, aB as NumberingInstance, aC as PageNumberingProperties, aD as PageOrientation, f as Paragraph, aE as ParagraphContent, aF as ParagraphPropertyChange, aG as PictureWatermark, aH as PropertyChangeInfo, aI as Run, aJ as RunContent, aK as RunPropertyChange, aL as SdtCheckboxGlyph, a as SdtControlState, aM as SdtDataBinding, aN as SdtDateState, aO as SdtGalleryState, b as SdtProperties, aP as SdtType, aQ as Section, S as SectionProperties, aR as SectionStart, aS as SeparatorContent, aT as Shape, aU as ShapeContent, c as ShapeEffect, aV as ShapeFill, aW as ShapeFillPaint, aX as ShapeOutline, aY as ShapeStrokePaint, aZ as ShapeTextBody, d as ShapeTextBodyProperties, a_ as ShapeType, a$ as SimpleField, b0 as SoftHyphenContent, b1 as StructuredFieldContent, b2 as StructuredFieldTree, b3 as SymbolContent, b4 as TabContent, b5 as Table, b6 as TableCell, b7 as TableCellPropertyChange, b8 as TablePropertyChange, b9 as TableRow, ba as TableRowPropertyChange, bb as TableStructuralChangeInfo, bc as TextBox, bd as TextContent, be as TextWatermark, bf as TrackedChangeInfo, bg as TrackedRunChange, bh as VerticalAlign, W as Watermark, bi as pictureWatermarkDisplayEmu } from '../content-MOZ6hKP4.mjs';
3
3
  import { e as Theme, C as ColorValue } from '../formatting-D1EPSaJP.mjs';
4
4
  export { B as BorderSpec, g as CellMargins, h as ConditionalFormatStyle, E as EmphasisMark, F as FloatingTableProperties, L as LineSpacingRule, i as ParagraphAlignment, P as ParagraphFormatting, R as RunFontHint, j as RunLanguage, S as ShadingProperties, k as TabLeader, l as TabStop, m as TabStopAlignment, n as TableBorders, d as TableCellFormatting, b as TableFormatting, o as TableLook, p as TableMeasurement, c as TableRowFormatting, q as TableStyleCascade, r as TableStyleRegion, s as TableWidthType, t as TextEffect, a as TextFormatting, T as TextModernEffects, u as ThemeColorScheme, f as ThemeColorSlot, v as ThemeFont, w as ThemeFontScheme, U as UnderlineStyle } from '../formatting-D1EPSaJP.mjs';
5
5
  import { S as StyleDefinitions, F as FontTable, R as RelationshipMap, M as MediaFile } from '../styles-Dn_o3Vo5.mjs';
@@ -1,4 +1,4 @@
1
- import { a as SdtControlState, b as SdtProperties, R as RevisionInfo, C as CellMarker, P as PresetGeometryPathCommand, D as DrawingScene, c as ShapeEffect, d as ShapeTextBodyProperties, e as Chart, W as Watermark, F as FootnoteProperties, E as EndnoteProperties } from './content-DLFHRQav.mjs';
1
+ import { a as SdtControlState, b as SdtProperties, R as RevisionInfo, C as CellMarker, P as PresetGeometryPathCommand, D as DrawingScene, c as ShapeEffect, d as ShapeTextBodyProperties, e as Chart, W as Watermark, F as FootnoteProperties, E as EndnoteProperties } from './content-MOZ6hKP4.mjs';
2
2
  import { T as TextModernEffects, B as BorderSpec } from './formatting-D1EPSaJP.mjs';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { f as Paragraph, B as BlockContent, g as Comment } from '../content-DLFHRQav.mjs';
1
+ import { f as Paragraph, B as BlockContent, g as Comment } from '../content-MOZ6hKP4.mjs';
2
2
  import '../formatting-D1EPSaJP.mjs';
3
3
  import '../docx/wrapTypes.mjs';
4
4
 
@@ -5,7 +5,7 @@ import { F as FontTable } from '../styles-Dn_o3Vo5.mjs';
5
5
  import { Document } from '../types/document.mjs';
6
6
  import { FontOption } from './fontOptions.mjs';
7
7
  export { MIN_CARD_GAP, SIDEBAR_DOCUMENT_SHIFT, SIDEBAR_PAGE_GAP, SIDEBAR_WIDTH } from './sidebarConstants.mjs';
8
- import { g as Comment } from '../content-DLFHRQav.mjs';
8
+ import { g as Comment } from '../content-MOZ6hKP4.mjs';
9
9
  export { x as ThemeMatrixCell, y as blendColors, z as darkenColor, A as generateThemeTintShadeMatrix, D as getContrastingColor, G as getThemeTintShadeHex, H as lightenColor, I as resolveColor, J as resolveColorToHex } from '../formatting-D1EPSaJP.mjs';
10
10
  import '../docx/wrapTypes.mjs';
11
11
 
@@ -0,0 +1 @@
1
+ export{n as buildDisplayListJson,q as clearMeasureFonts,g as closeDisplayList,d as hasDisplayListSession,i as hasDisplayListUpdate,e as hasRangeRectsRegion,j as hitTestRegionsByHandle,b as hitTestRegionsJson,o as layoutDocumentJson,r as measureParagraphJson,f as openDisplayList,s as outlineGlyphJson,a as preloadLayoutWasm,k as rangeRectsByHandle,c as rangeRectsJson,m as rangeRectsRegionByHandle,l as rangeRectsRegionJson,p as registerMeasureFont,h as updateDisplayList}from'./chunk-WON6K4FY.mjs';import'./chunk-T4EZMUXM.mjs';import'./chunk-TTRUPDAB.mjs';
@@ -0,0 +1 @@
1
+ import'./chunk-EUUIJVM6.mjs';export{b as createEditSession,a as preloadEditWasm}from'./chunk-Y7RUNRU2.mjs';import'./chunk-T4EZMUXM.mjs';import'./chunk-TTRUPDAB.mjs';
@@ -300,6 +300,7 @@ declare class EditSession {
300
300
  * deletion and insertion share one revision id.
301
301
  */
302
302
  replace_range(story: string, start_para: string, start_offset: number, end_para: string, end_offset: number, text: string, author_name?: string | null, author_date?: string | null): string;
303
+ resident_caret_snapshot_json(): string;
303
304
  /**
304
305
  * Current offsets of a comment's sticky anchors:
305
306
  * `[{"story","start","end"}]`. Errors when an anchor no longer resolves.
@@ -1 +1 @@
1
- export{b as createEditSession,a as preloadEditWasm}from'./chunk-NTQM4EYN.mjs';import'./chunk-T4EZMUXM.mjs';import'./chunk-TTRUPDAB.mjs';
1
+ export{b as createEditSession,a as preloadEditWasm}from'./chunk-Y7RUNRU2.mjs';import'./chunk-T4EZMUXM.mjs';import'./chunk-TTRUPDAB.mjs';
@@ -48,6 +48,15 @@ declare function hasRangeRectsRegion(): boolean;
48
48
  declare function openDisplayList(displayList: string): number;
49
49
  /** Drop a display-list handle so its parsed list is freed. No-op when the export is absent. */
50
50
  declare function closeDisplayList(handle: number): void;
51
+ /**
52
+ * Apply a page-delta update to a stored display list, re-parsing only its
53
+ * changed pages. Throws when the export is absent or the update is
54
+ * inconsistent — the Rust side closes the handle on failure, so the facade's
55
+ * fallback (a fresh `openDisplayList`) is always safe.
56
+ */
57
+ declare function updateDisplayList(handle: number, update: string): void;
58
+ /** True when the embedded layout wasm carries the page-delta update export. */
59
+ declare function hasDisplayListUpdate(): boolean;
51
60
  /**
52
61
  * Region-aware hit test against a stored display list (by handle). Throws when
53
62
  * the export is absent or the handle is unknown/closed — the facade catches it
@@ -109,4 +118,4 @@ declare function measureParagraphJson(input: string): string;
109
118
  */
110
119
  declare function outlineGlyphJson(fontId: number, glyphId: number): string;
111
120
 
112
- export { buildDisplayListJson, clearMeasureFonts, closeDisplayList, hasDisplayListSession, hasRangeRectsRegion, hitTestRegionsByHandle, hitTestRegionsJson, layoutDocumentJson, measureParagraphJson, openDisplayList, outlineGlyphJson, preloadLayoutWasm, rangeRectsByHandle, rangeRectsJson, rangeRectsRegionByHandle, rangeRectsRegionJson, registerMeasureFont };
121
+ export { buildDisplayListJson, clearMeasureFonts, closeDisplayList, hasDisplayListSession, hasDisplayListUpdate, hasRangeRectsRegion, hitTestRegionsByHandle, hitTestRegionsJson, layoutDocumentJson, measureParagraphJson, openDisplayList, outlineGlyphJson, preloadLayoutWasm, rangeRectsByHandle, rangeRectsJson, rangeRectsRegionByHandle, rangeRectsRegionJson, registerMeasureFont, updateDisplayList };
@@ -1 +1 @@
1
- export{l as buildDisplayListJson,o as clearMeasureFonts,g as closeDisplayList,d as hasDisplayListSession,e as hasRangeRectsRegion,h as hitTestRegionsByHandle,b as hitTestRegionsJson,m as layoutDocumentJson,p as measureParagraphJson,f as openDisplayList,q as outlineGlyphJson,a as preloadLayoutWasm,i as rangeRectsByHandle,c as rangeRectsJson,k as rangeRectsRegionByHandle,j as rangeRectsRegionJson,n as registerMeasureFont}from'./chunk-CIRN3LZA.mjs';import'./chunk-T4EZMUXM.mjs';import'./chunk-TTRUPDAB.mjs';
1
+ export{n as buildDisplayListJson,q as clearMeasureFonts,g as closeDisplayList,d as hasDisplayListSession,i as hasDisplayListUpdate,e as hasRangeRectsRegion,j as hitTestRegionsByHandle,b as hitTestRegionsJson,o as layoutDocumentJson,r as measureParagraphJson,f as openDisplayList,s as outlineGlyphJson,a as preloadLayoutWasm,k as rangeRectsByHandle,c as rangeRectsJson,m as rangeRectsRegionByHandle,l as rangeRectsRegionJson,p as registerMeasureFont,h as updateDisplayList}from'./chunk-WON6K4FY.mjs';import'./chunk-T4EZMUXM.mjs';import'./chunk-TTRUPDAB.mjs';
@@ -1,6 +1,7 @@
1
- export { o as CreateYrsSessionOptions, R as ResidentEngineOffscreenPage, p as ResidentEngineWorkerApplyResult, q as ResidentEngineWorkerClient, r as ResidentEngineWorkerFrame, s as YrsAuthor, t as YrsCellBorder, u as YrsCellBorders, v as YrsCellLoc, w as YrsChangeTarget, x as YrsCommentReceipt, y as YrsContentControlValue, z as YrsEngineApplyProfile, A as YrsHyperlinkAttrs, B as YrsImageGeometry, D as YrsInlineFormatDelta, E as YrsInputParagraphSeed, F as YrsInputParagraphSpan, G as YrsInputPositionMap, m as YrsLoc, H as YrsNumberingProperties, I as YrsParaOffset, J as YrsParagraph, K as YrsParagraphAttrs, L as YrsParagraphLength, M as YrsParagraphReceipt, N as YrsParagraphSeed, O as YrsParagraphSpan, P as YrsParagraphTabStop, Q as YrsRawOp, a as YrsRenderEnv, S as YrsResidentWorkerSnapshot, T as YrsResolveReceipt, U as YrsResolvedCommentAnchor, n as YrsRevisionInfo, V as YrsRevisionReceipt, W as YrsRunMark, g as YrsSelection, X as YrsSelectionContext, Y as YrsSession, Z as YrsSplitReceipt, _ as YrsStoryRange, $ as YrsStorySeed, a0 as YrsStorySegment, a1 as YrsTableLoc, a2 as YrsTableRange, a3 as YrsTableReceipt, a4 as YrsTextColor, a5 as YrsTriState, a6 as YrsWatermark, a7 as canUseResidentEngineWorker, a8 as compareYrsLocs, a9 as createYrsInputPositionMap, aa as createYrsSession, ab as displayPositionToYrsLoc, ac as documentToYrs, ad as yrsLocToDisplayPosition, ae as yrsToDocument } from '../index-Bwxm3oiC.mjs';
2
- import '../types/document.mjs';
3
- import '../content-DLFHRQav.mjs';
1
+ export { o as CreateYrsSessionOptions, R as ResidentCaretPaintStyle, p as ResidentEngineOffscreenPage, q as ResidentEngineWorkerApplyResult, r as ResidentEngineWorkerClient, s as ResidentEngineWorkerFrame, t as YrsAuthor, u as YrsCellBorder, v as YrsCellBorders, w as YrsCellLoc, x as YrsChangeTarget, y as YrsCommentReceipt, z as YrsContentControlValue, A as YrsEngineApplyProfile, B as YrsHyperlinkAttrs, D as YrsImageGeometry, E as YrsInlineFormatDelta, F as YrsInputParagraphSeed, G as YrsInputParagraphSpan, H as YrsInputPositionMap, m as YrsLoc, I as YrsNumberingProperties, J as YrsParaOffset, K as YrsParagraph, L as YrsParagraphAttrs, M as YrsParagraphLength, N as YrsParagraphReceipt, O as YrsParagraphSeed, P as YrsParagraphSpan, Q as YrsParagraphTabStop, S as YrsRawOp, a as YrsRenderEnv, T as YrsResidentCaretRect, U as YrsResidentCaretSnapshot, V as YrsResidentWorkerSnapshot, W as YrsResidentWorkerSyncOptions, X as YrsResolveReceipt, Z as YrsResolvedCommentAnchor, n as YrsRevisionInfo, _ as YrsRevisionReceipt, $ as YrsRunMark, g as YrsSelection, a0 as YrsSelectionContext, Y as YrsSession, a1 as YrsSplitReceipt, a2 as YrsStoryRange, a3 as YrsStorySeed, a4 as YrsStorySegment, a5 as YrsTableLoc, a6 as YrsTableRange, a7 as YrsTableReceipt, a8 as YrsTextColor, a9 as YrsTriState, aa as YrsWatermark, ab as canUseResidentEngineWorker, ac as compareYrsLocs, ad as createYrsInputPositionMap, ae as createYrsSession, af as displayPositionToYrsLoc, ag as documentToYrs, ah as residentCaretDeviceRect, ai as residentCaretSnapshotForFrame, aj as sameYrsSelection, ak as yrsLocToDisplayPosition, al as yrsToDocument } from '../index-Dx4Z3lkz.mjs';
2
+ import '../frameDelta-D965X8yK.mjs';
3
+ import '../content-MOZ6hKP4.mjs';
4
4
  import '../formatting-D1EPSaJP.mjs';
5
5
  import '../docx/wrapTypes.mjs';
6
+ import '../types/document.mjs';
6
7
  import '../styles-Dn_o3Vo5.mjs';