wordinweb 0.1.8 → 0.1.9

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.
package/README.md CHANGED
@@ -14,7 +14,7 @@ Editing is in an Alpha state and is strictly opt-in via the `editable` flag; the
14
14
 
15
15
  If you discover an edge case or perf issue create an issue and include the offending Word file.
16
16
 
17
- Part of the broader roadmap is to migrate away from DOM rendering to canvas rendering, or a hybrid of the two. Editing performance can suffer on very long documents.
17
+ Long-document performance work focuses on incremental parsing/layout and page virtualization; the current renderer remains DOM-based.
18
18
 
19
19
  ---
20
20
 
package/dist/index.d.ts CHANGED
@@ -1245,16 +1245,24 @@ declare class DocxDocument {
1245
1245
  * stable across a plain text edit). */
1246
1246
  layoutGlobalSig(): string;
1247
1247
  refresh(): void;
1248
- /**
1249
- * Reparse the two direct body paragraphs created by Enter without rebuilding
1250
- * the complete document model. This deliberately covers only the simple
1251
- * single-section body case used by incremental pagination; structural
1252
- * containers, revisions, bookmarks, and section breaks use refresh().
1253
- */
1248
+ /** Reparse the two sibling body-story paragraphs created by Enter without
1249
+ * rebuilding the complete document model. Paragraphs nested in table cells
1250
+ * are included because legal documents spend most of their body inside
1251
+ * tables; revisions, bookmarks, fields, and section breaks use refresh(). */
1254
1252
  reparseDirectBodyParagraphSplit(beforeSource: XmlElement, afterSource: XmlElement): {
1255
1253
  before: Paragraph;
1256
1254
  after: Paragraph;
1257
1255
  } | null;
1256
+ /** Reparse a body paragraph plus several new siblings created by
1257
+ * click-and-type without rebuilding the complete document model. */
1258
+ reparseDirectBodyParagraphSplits(beforeSource: XmlElement, afterSources: XmlElement[]): Paragraph[] | null;
1259
+ /** Reparse one retained body-story paragraph after a structural edit that
1260
+ * leaves its surrounding block list unchanged, such as inserting ink. */
1261
+ reparseBodyParagraph(source: XmlElement): Paragraph | null;
1262
+ /** Reparse two sibling body-story paragraphs after Backspace/Delete merged
1263
+ * their XML into one. Keeps the parsed model generation stable so long
1264
+ * documents can use incremental layout instead of repaginating in full. */
1265
+ reparseDirectBodyParagraphMerge(beforeSource: XmlElement, afterSource: XmlElement, survivorSource: XmlElement): Paragraph | null;
1258
1266
  private deriveComments;
1259
1267
  /** Retained comments tree for edit commands (null when the doc has none). */
1260
1268
  /**
@@ -1792,10 +1800,8 @@ interface LayoutOptions {
1792
1800
  * type/delete. Lets the incremental scan skip re-hashing every block: it
1793
1801
  * re-hashes only the hinted block and its two neighbours and reuses prev's
1794
1802
  * per-block signatures for the rest. Purely an optimisation — the fast path
1795
- * is gated on block-count parity and neighbour-signature checks, so a stale,
1796
- * structural, or wrong hint falls through to the full block scan. Absent for
1797
- * multi-block edits (paste, paragraph split/merge, undo/redo, structural ops),
1798
- * which take the full scan. */
1803
+ * is gated on block identity/count and neighbour-signature checks, so a stale
1804
+ * or wrong hint falls through to the full block scan. */
1799
1805
  dirtyHint?: XmlElement;
1800
1806
  /** Exact retained text element changed by a local edit. Used only to bound
1801
1807
  * structural page comparison before the first actually dirty page. */