@betteroffice/docx 0.4.0 → 0.4.2

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 (74) hide show
  1. package/README.md +2 -1
  2. package/dist/chunk-4PRCO6EC.mjs +1 -0
  3. package/dist/chunk-5Z22FORG.mjs +1 -0
  4. package/dist/chunk-7SUVUKWT.mjs +1 -0
  5. package/dist/chunk-7ZV6P6NZ.mjs +57 -0
  6. package/dist/{chunk-2QHGQA3V.mjs → chunk-AXFMDV66.mjs} +1 -1
  7. package/dist/{chunk-YLFKV2NT.mjs → chunk-EBYC3CX7.mjs} +1 -1
  8. package/dist/{chunk-3CYO46ML.mjs → chunk-GKWXOZZH.mjs} +1 -1
  9. package/dist/chunk-HGKSOBXK.mjs +1 -0
  10. package/dist/chunk-LIOWZSE7.mjs +1 -0
  11. package/dist/chunk-ML6E23W2.mjs +1 -0
  12. package/dist/{chunk-NVN26RHH.mjs → chunk-MLEMGJP7.mjs} +1 -1
  13. package/dist/chunk-QBMNRD5V.mjs +2 -0
  14. package/dist/chunk-RNNTXPXC.mjs +1 -0
  15. package/dist/chunk-UBUTIWXN.mjs +1 -0
  16. package/dist/chunk-VH7P4734.mjs +16 -0
  17. package/dist/collaboration/index.d.mts +6 -5
  18. package/dist/compareDocx-CWOYEBCE.mjs +1 -0
  19. package/dist/{computeLayout-4MNWHE2T.mjs → computeLayout-ZTO6TBWX.mjs} +1 -1
  20. package/dist/{content-BzoC6bSz.d.mts → content-DSb-6a9T.d.mts} +5 -5
  21. package/dist/core.d.mts +5 -5
  22. package/dist/core.mjs +1 -1
  23. package/dist/{displayListQueries-H5YnU_hX.d.mts → displayListQueries-BVBDVXoP.d.mts} +2 -2
  24. package/dist/docx/index.d.mts +3 -3
  25. package/dist/docx/index.mjs +2 -2
  26. package/dist/editor/index.d.mts +11 -6
  27. package/dist/editor/index.mjs +1 -1
  28. package/dist/{frameDelta-ByU7HBuB.d.mts → frameDelta-CLeO7K5z.d.mts} +5 -2
  29. package/dist/generated/edit/docx_edit_bg.wasm +0 -0
  30. package/dist/generated/layout/docx_layout_bg.wasm +0 -0
  31. package/dist/generated/opc/ooxml_opc_bg.wasm +0 -0
  32. package/dist/generated/parse/docx_parse_bg.wasm +0 -0
  33. package/dist/{index-CHy6_Yuo.d.mts → index-DzZVJC8-.d.mts} +453 -12
  34. package/dist/layout/index.d.mts +2 -2
  35. package/dist/layout/index.mjs +1 -1
  36. package/dist/layout/pagination/index.d.mts +3 -3
  37. package/dist/layout/render/index.d.mts +32 -11
  38. package/dist/layout/render/index.mjs +1 -1
  39. package/dist/{pagedExport---0Dlmzo.d.mts → pagedExport-BmSlEhoP.d.mts} +1 -1
  40. package/dist/{parseWasm-NLAG22EU.mjs → parseWasm-BESKFFA3.mjs} +1 -1
  41. package/dist/plugin-api/RenderedDomContext.d.mts +5 -5
  42. package/dist/plugin-api/index.d.mts +1 -1
  43. package/dist/plugin-api/resolveItemPositions.d.mts +1 -1
  44. package/dist/{rustDisplayList-LcRZHCSL.d.mts → rustDisplayList-B7uPoItK.d.mts} +2 -2
  45. package/dist/types/content.d.mts +1 -1
  46. package/dist/types/document.d.mts +2 -2
  47. package/dist/{types-D6Pra38E.d.mts → types-Cz7S77Ut.d.mts} +23 -1
  48. package/dist/utils/comments.d.mts +1 -1
  49. package/dist/utils/index.d.mts +1 -1
  50. package/dist/utils/index.mjs +1 -1
  51. package/dist/{wasm-K6DRABAA.mjs → wasm-GFT55YT6.mjs} +1 -1
  52. package/dist/wasm-QI7MWC5D.mjs +1 -0
  53. package/dist/wasm-QXYYV7LU.mjs +1 -0
  54. package/dist/wasm-edit.d.mts +41 -2
  55. package/dist/wasm-edit.mjs +1 -1
  56. package/dist/wasm-layout.mjs +1 -1
  57. package/dist/wasm-opc.mjs +1 -1
  58. package/dist/wasm-parse.mjs +1 -1
  59. package/dist/yrs/index.d.mts +5 -4
  60. package/dist/yrs/index.mjs +1 -1
  61. package/dist/yrs/residentEngineWorker.mjs +1 -1
  62. package/package.json +1 -1
  63. package/dist/chunk-24Z6ZVFZ.mjs +0 -1
  64. package/dist/chunk-6CHGYCFU.mjs +0 -1
  65. package/dist/chunk-F2VBW6RB.mjs +0 -1
  66. package/dist/chunk-L2ML3DDI.mjs +0 -1
  67. package/dist/chunk-LIGZ75FP.mjs +0 -1
  68. package/dist/chunk-ND3FBCB3.mjs +0 -16
  69. package/dist/chunk-NMDQHUQB.mjs +0 -57
  70. package/dist/chunk-OK5UFGX3.mjs +0 -1
  71. package/dist/chunk-RZQ3OXZY.mjs +0 -2
  72. package/dist/compareDocx-IHFPGIGV.mjs +0 -1
  73. package/dist/wasm-GSI2XMOH.mjs +0 -1
  74. package/dist/wasm-NF6B3AH7.mjs +0 -1
@@ -1,20 +1,23 @@
1
1
  import { R as ResidentMeasurementConfig } from '../rustMeasureSource-BkCx1FDx.mjs';
2
- import { L as Layout, a as LayoutOptions } from '../types-D6Pra38E.mjs';
2
+ import { L as Layout, a as LayoutOptions } from '../types-Cz7S77Ut.mjs';
3
3
  import { MeasuredBlock } from '../layout/pagination/index.mjs';
4
- import { D as DisplayListHeadersFooters } from '../rustDisplayList-LcRZHCSL.mjs';
4
+ import { D as DisplayListHeadersFooters } from '../rustDisplayList-B7uPoItK.mjs';
5
5
  import { Document } from '../types/document.mjs';
6
- import { Y as YrsSession, a as YrsRenderEnv } from '../index-CHy6_Yuo.mjs';
7
- import { f as SectionProperties, N as NoteKind, g as DocumentBody } from '../content-BzoC6bSz.mjs';
6
+ import { Y as YrsSession, a as YrsRenderEnv } from '../index-DzZVJC8-.mjs';
7
+ import { f as SectionProperties, N as NoteKind, g as DocumentBody } from '../content-DSb-6a9T.mjs';
8
8
  import '../formatting-gqLFeJ9X.mjs';
9
- import '../frameDelta-ByU7HBuB.mjs';
9
+ import '../frameDelta-CLeO7K5z.mjs';
10
10
  import '../styles-AryxLAhx.mjs';
11
- import '../pagedExport---0Dlmzo.mjs';
11
+ import '../pagedExport-BmSlEhoP.mjs';
12
12
  import '../loadWasmAsset-Cr95TImt.mjs';
13
+ import '../plugin-api/index.mjs';
13
14
  import '../rezip-Bxiq4Z_R.mjs';
14
15
  import '../docx/wrapTypes.mjs';
15
16
 
16
17
  interface ResidentRegionLayoutRequest {
17
18
  bodyStory: 'body';
19
+ /** @internal Use saved page totals while the layout is partial. */
20
+ cachedPageTotals?: boolean;
18
21
  options: Pick<LayoutOptions, 'contractVersion' | 'pageGap'>;
19
22
  regions: {
20
23
  sections: Array<{
@@ -40,6 +43,8 @@ interface ComputeLayoutInputs {
40
43
  session: Pick<YrsSession, 'layoutDocumentWithRegionsRetainedJson' | 'residentWorkerProbe' | 'retainedKernelInputsJson'>;
41
44
  renderEnv: YrsRenderEnv;
42
45
  measurement: ResidentMeasurementConfig;
46
+ /** @internal See `ResidentRegionLayoutRequest.cachedPageTotals`. */
47
+ cachedPageTotals?: boolean;
43
48
  }
44
49
  interface LayoutComputation {
45
50
  layout: Layout;
@@ -1 +1 @@
1
- export{c as buildResidentRegionLayoutRequest,e as computeLayout,d as getLayoutKernelInputs,a as resolvedFinalSectionProperties,b as updateFinalSectionProperties,f as workerLayoutComputation}from'../chunk-NVN26RHH.mjs';import'../chunk-TTRUPDAB.mjs';
1
+ export{c as buildResidentRegionLayoutRequest,e as computeLayout,d as getLayoutKernelInputs,a as resolvedFinalSectionProperties,b as updateFinalSectionProperties,f as workerLayoutComputation}from'../chunk-MLEMGJP7.mjs';import'../chunk-TTRUPDAB.mjs';
@@ -1,5 +1,5 @@
1
1
  import { T as TextModernEffects } from './formatting-gqLFeJ9X.mjs';
2
- import { D as DrawingScene, c as ShapeTextBodyProperties } from './content-BzoC6bSz.mjs';
2
+ import { D as DrawingScene, c as ShapeTextBodyProperties } from './content-DSb-6a9T.mjs';
3
3
 
4
4
  interface DisplayList {
5
5
  /** Contract version. Undefined reads as legacy version 0. */
@@ -736,6 +736,7 @@ interface FramePagePositionShift {
736
736
  readonly fingerprint: bigint;
737
737
  readonly runs: readonly FramePositionShiftRun[];
738
738
  readonly anchors: readonly FrameNoteAnchor[];
739
+ readonly spanDelta?: number;
739
740
  }
740
741
  type FramePageOperation = FramePageUpsert | FramePageRemove | FramePageMove | FramePagePositionPatch | FramePagePositionShift;
741
742
  interface DecodedFrameDelta {
@@ -776,6 +777,8 @@ interface RetainedFrame {
776
777
  * browser state. Page payloads are typed values, not embedded JSON strings.
777
778
  */
778
779
  declare function decodeFrameDelta(input: Uint8Array | ArrayBuffer): DecodedFrameDelta;
780
+ /** @internal Decode in resumable slices without publishing partial state. */
781
+ declare function decodeFrameDeltaSteps(input: Uint8Array | ArrayBuffer): Generator<void, DecodedFrameDelta>;
779
782
  /** Apply one already-validated frame atomically, rejecting stale generations. */
780
783
  declare function applyFrameDelta(previous: RetainedFrame | null, delta: DecodedFrameDelta): RetainedFrame;
781
784
  /**
@@ -801,4 +804,4 @@ declare function displayPageRevision(page: DisplayPage): number;
801
804
  */
802
805
  declare function displayPageNoteAnchorRevision(page: DisplayPage): number;
803
806
 
804
- export { type DisplayList as D, FRAME_DELTA_HEADER_BYTES as F, type GlyphRunPrimitive as G, type HfRegion as H, type ImagePrimitive as I, type LinePrimitive as L, type PositionedGlyph as P, type RetainedFrame as R, type TextRunPrimitive as T, type DisplayPage as a, type DisplayPrimitive as b, type DecodedFrameDelta as c, type DecorationPrimitive as d, type DisplayBounds as e, type DocAttrs as f, FRAME_DELTA_PAGE_OP_BYTES as g, FRAME_DELTA_VERSION as h, FrameDeltaError as i, type FrameDeltaErrorCode as j, type FramePageOperation as k, type RectPrimitive as l, type RetainedFramePage as m, type TableCellRef as n, applyFrameDelta as o, applyFrameDeltaOwned as p, decodeFrameDelta as q, displayPageNoteAnchorRevision as r, displayPageRevision as s };
807
+ export { type DisplayList as D, FRAME_DELTA_HEADER_BYTES as F, type GlyphRunPrimitive as G, type HfRegion as H, type ImagePrimitive as I, type LinePrimitive as L, type PositionedGlyph as P, type RetainedFrame as R, type TextRunPrimitive as T, type DisplayPage as a, type DisplayPrimitive as b, type DecodedFrameDelta as c, type DecorationPrimitive as d, type DisplayBounds as e, type DocAttrs as f, FRAME_DELTA_PAGE_OP_BYTES as g, FRAME_DELTA_VERSION as h, FrameDeltaError as i, type FrameDeltaErrorCode as j, type FramePageOperation as k, type RectPrimitive as l, type RetainedFramePage as m, type TableCellRef as n, applyFrameDelta as o, applyFrameDeltaOwned as p, decodeFrameDelta as q, decodeFrameDeltaSteps as r, displayPageNoteAnchorRevision as s, displayPageRevision as t };