@betteroffice/docx 0.4.1 → 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.
- package/dist/chunk-4PRCO6EC.mjs +1 -0
- package/dist/chunk-5Z22FORG.mjs +1 -0
- package/dist/chunk-7SUVUKWT.mjs +1 -0
- package/dist/chunk-7ZV6P6NZ.mjs +57 -0
- package/dist/{chunk-2QHGQA3V.mjs → chunk-AXFMDV66.mjs} +1 -1
- package/dist/{chunk-YLFKV2NT.mjs → chunk-EBYC3CX7.mjs} +1 -1
- package/dist/{chunk-3CYO46ML.mjs → chunk-GKWXOZZH.mjs} +1 -1
- package/dist/chunk-HGKSOBXK.mjs +1 -0
- package/dist/{chunk-DKWD4P4J.mjs → chunk-LIOWZSE7.mjs} +1 -1
- package/dist/chunk-ML6E23W2.mjs +1 -0
- package/dist/{chunk-NVN26RHH.mjs → chunk-MLEMGJP7.mjs} +1 -1
- package/dist/chunk-QBMNRD5V.mjs +2 -0
- package/dist/{chunk-2HLVVQIL.mjs → chunk-RNNTXPXC.mjs} +1 -1
- package/dist/chunk-UBUTIWXN.mjs +1 -0
- package/dist/{chunk-7DDF4RHB.mjs → chunk-VH7P4734.mjs} +1 -1
- package/dist/collaboration/index.d.mts +5 -5
- package/dist/compareDocx-CWOYEBCE.mjs +1 -0
- package/dist/{computeLayout-4MNWHE2T.mjs → computeLayout-ZTO6TBWX.mjs} +1 -1
- package/dist/{content-BzoC6bSz.d.mts → content-DSb-6a9T.d.mts} +5 -5
- package/dist/core.d.mts +3 -3
- package/dist/core.mjs +1 -1
- package/dist/{displayListQueries-DnHmHUPY.d.mts → displayListQueries-BVBDVXoP.d.mts} +2 -2
- package/dist/docx/index.d.mts +1 -1
- package/dist/docx/index.mjs +2 -2
- package/dist/editor/index.d.mts +10 -6
- package/dist/editor/index.mjs +1 -1
- package/dist/{frameDelta-ByU7HBuB.d.mts → frameDelta-CLeO7K5z.d.mts} +5 -2
- package/dist/generated/edit/docx_edit_bg.wasm +0 -0
- package/dist/generated/layout/docx_layout_bg.wasm +0 -0
- package/dist/generated/opc/ooxml_opc_bg.wasm +0 -0
- package/dist/generated/parse/docx_parse_bg.wasm +0 -0
- package/dist/{index-yOtBET85.d.mts → index-DzZVJC8-.d.mts} +230 -86
- package/dist/layout/index.d.mts +2 -2
- package/dist/layout/index.mjs +1 -1
- package/dist/layout/pagination/index.d.mts +3 -3
- package/dist/layout/render/index.d.mts +9 -9
- package/dist/layout/render/index.mjs +1 -1
- package/dist/{parseWasm-NLAG22EU.mjs → parseWasm-BESKFFA3.mjs} +1 -1
- package/dist/plugin-api/RenderedDomContext.d.mts +5 -5
- package/dist/plugin-api/index.d.mts +1 -1
- package/dist/plugin-api/resolveItemPositions.d.mts +1 -1
- package/dist/{rustDisplayList-DcaA5iok.d.mts → rustDisplayList-B7uPoItK.d.mts} +2 -2
- package/dist/types/content.d.mts +1 -1
- package/dist/types/document.d.mts +2 -2
- package/dist/{types-Buyw6dFd.d.mts → types-Cz7S77Ut.d.mts} +3 -1
- package/dist/utils/comments.d.mts +1 -1
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.mjs +1 -1
- package/dist/{wasm-IBCLSJQU.mjs → wasm-GFT55YT6.mjs} +1 -1
- package/dist/wasm-QI7MWC5D.mjs +1 -0
- package/dist/wasm-QXYYV7LU.mjs +1 -0
- package/dist/wasm-edit.d.mts +27 -2
- package/dist/wasm-edit.mjs +1 -1
- package/dist/wasm-layout.mjs +1 -1
- package/dist/wasm-opc.mjs +1 -1
- package/dist/wasm-parse.mjs +1 -1
- package/dist/yrs/index.d.mts +4 -4
- package/dist/yrs/index.mjs +1 -1
- package/dist/yrs/residentEngineWorker.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-3OWET2KZ.mjs +0 -1
- package/dist/chunk-4GEXNR7A.mjs +0 -1
- package/dist/chunk-4QHAMEAS.mjs +0 -1
- package/dist/chunk-6CHGYCFU.mjs +0 -1
- package/dist/chunk-C5BX34CG.mjs +0 -2
- package/dist/chunk-EIPVFGIC.mjs +0 -1
- package/dist/chunk-FMOSOX5V.mjs +0 -57
- package/dist/compareDocx-QX2YF3EF.mjs +0 -1
- package/dist/wasm-6WSIEYWC.mjs +0 -1
- package/dist/wasm-GSI2XMOH.mjs +0 -1
package/dist/editor/index.d.mts
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import { R as ResidentMeasurementConfig } from '../rustMeasureSource-BkCx1FDx.mjs';
|
|
2
|
-
import { L as Layout, a as LayoutOptions } from '../types-
|
|
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-
|
|
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-
|
|
7
|
-
import { f as SectionProperties, N as NoteKind, g as DocumentBody } from '../content-
|
|
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-
|
|
9
|
+
import '../frameDelta-CLeO7K5z.mjs';
|
|
10
10
|
import '../styles-AryxLAhx.mjs';
|
|
11
11
|
import '../pagedExport-BmSlEhoP.mjs';
|
|
12
12
|
import '../loadWasmAsset-Cr95TImt.mjs';
|
|
13
|
-
import '../rezip-Bxiq4Z_R.mjs';
|
|
14
13
|
import '../plugin-api/index.mjs';
|
|
14
|
+
import '../rezip-Bxiq4Z_R.mjs';
|
|
15
15
|
import '../docx/wrapTypes.mjs';
|
|
16
16
|
|
|
17
17
|
interface ResidentRegionLayoutRequest {
|
|
18
18
|
bodyStory: 'body';
|
|
19
|
+
/** @internal Use saved page totals while the layout is partial. */
|
|
20
|
+
cachedPageTotals?: boolean;
|
|
19
21
|
options: Pick<LayoutOptions, 'contractVersion' | 'pageGap'>;
|
|
20
22
|
regions: {
|
|
21
23
|
sections: Array<{
|
|
@@ -41,6 +43,8 @@ interface ComputeLayoutInputs {
|
|
|
41
43
|
session: Pick<YrsSession, 'layoutDocumentWithRegionsRetainedJson' | 'residentWorkerProbe' | 'retainedKernelInputsJson'>;
|
|
42
44
|
renderEnv: YrsRenderEnv;
|
|
43
45
|
measurement: ResidentMeasurementConfig;
|
|
46
|
+
/** @internal See `ResidentRegionLayoutRequest.cachedPageTotals`. */
|
|
47
|
+
cachedPageTotals?: boolean;
|
|
44
48
|
}
|
|
45
49
|
interface LayoutComputation {
|
|
46
50
|
layout: Layout;
|
package/dist/editor/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{c as buildResidentRegionLayoutRequest,e as computeLayout,d as getLayoutKernelInputs,a as resolvedFinalSectionProperties,b as updateFinalSectionProperties,f as workerLayoutComputation}from'../chunk-
|
|
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-
|
|
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,
|
|
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 };
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { C as ColorValue } from './formatting-gqLFeJ9X.mjs';
|
|
2
2
|
import { Document, CompatibilityFlags } from './types/document.mjs';
|
|
3
3
|
import { a0 as DocxEditSuggestion, a1 as DocxEditFailure, a2 as DocxEditFailureCode, a3 as DocxTextRange, a4 as DocxReadParagraphsRequest, a5 as DocxReadParagraphsResult, a6 as DocxFindTextRequest, a7 as DocxFindTextResult, a8 as DocxEditRequest, a9 as DocxValidationResult, aa as DocxEditResult, ab as DocxTextTarget, ac as DocxEditRefusal, a as DocxExportOptions, H as DocxExportResult, c as DocxStructuredContent, b as DocxMarkdownContent, d as DocxPageExportOptions, f as DocxPagedStructuredContent, i as DocxLayoutMap, g as DocxSnapshotLayoutMap, D as DocxExportFailure, V as DocxParagraphHeading, m as DocxContentControlsOptions, w as DocxContentControlsResult, l as DocxContentControlQuery } from './pagedExport-BmSlEhoP.mjs';
|
|
4
|
-
import { R as RetainedFrame } from './frameDelta-
|
|
4
|
+
import { R as RetainedFrame } from './frameDelta-CLeO7K5z.mjs';
|
|
5
5
|
import { a as WasmModuleMemory } from './loadWasmAsset-Cr95TImt.mjs';
|
|
6
|
-
import { R as RepackOptions } from './rezip-Bxiq4Z_R.mjs';
|
|
7
|
-
import { e as Comment } from './content-BzoC6bSz.mjs';
|
|
8
6
|
import { PointPosition } from './plugin-api/index.mjs';
|
|
7
|
+
import { B as BlockContent, e as Comment } from './content-DSb-6a9T.mjs';
|
|
8
|
+
import { R as RepackOptions } from './rezip-Bxiq4Z_R.mjs';
|
|
9
9
|
|
|
10
10
|
type CollaborationUpdateOrigin = 'local' | 'remote';
|
|
11
11
|
interface CollaborationReplica {
|
|
@@ -110,6 +110,19 @@ interface RustParagraphIds {
|
|
|
110
110
|
part: string;
|
|
111
111
|
paraIds: Array<[number, string]>;
|
|
112
112
|
}>;
|
|
113
|
+
/**
|
|
114
|
+
* Story parts written as their source bytes with only some paragraphs
|
|
115
|
+
* re-serialized: those whose `sourceOrdinal` is in `changed`, or whose
|
|
116
|
+
* written comments, revisions, notes or relationships differ from their
|
|
117
|
+
* source. `paragraphs` lists every `sourceOrdinal` the model holds for the
|
|
118
|
+
* part, `sha256` the source part it addresses.
|
|
119
|
+
*/
|
|
120
|
+
splicedParts?: Array<{
|
|
121
|
+
part: string;
|
|
122
|
+
sha256: string;
|
|
123
|
+
paragraphs: number[];
|
|
124
|
+
changed: number[];
|
|
125
|
+
}>;
|
|
113
126
|
}
|
|
114
127
|
|
|
115
128
|
/**
|
|
@@ -241,8 +254,18 @@ type DocxParagraphAnchorResult = {
|
|
|
241
254
|
status: 'unsupported';
|
|
242
255
|
reason: 'foreign-session' | 'foreign-package' | 'no-source-package';
|
|
243
256
|
};
|
|
244
|
-
/**
|
|
245
|
-
|
|
257
|
+
/**
|
|
258
|
+
* The paragraph IDs a session save applies, as the package writer's
|
|
259
|
+
* `paragraphIds`, with each spliced part's paragraphs as `[ordinal, session key]`. @internal
|
|
260
|
+
*/
|
|
261
|
+
interface DocxParagraphSavePlan extends Omit<RustParagraphIds, 'splicedParts'> {
|
|
262
|
+
splicedParts?: Array<{
|
|
263
|
+
part: string;
|
|
264
|
+
sha256: string;
|
|
265
|
+
paragraphs: Array<[number, string]>;
|
|
266
|
+
changed: number[];
|
|
267
|
+
}>;
|
|
268
|
+
}
|
|
246
269
|
|
|
247
270
|
/**
|
|
248
271
|
* Host proposals: tracked changes a host proposes by paragraph anchor and search, grouped by the
|
|
@@ -381,6 +404,102 @@ declare function residentCaretDeviceRect(rect: Pick<YrsResidentCaretRect, 'x' |
|
|
|
381
404
|
};
|
|
382
405
|
declare function residentCaretSnapshotForFrame(snapshot: YrsResidentCaretSnapshot, frame: RetainedFrame): YrsResidentCaretSnapshot | null;
|
|
383
406
|
|
|
407
|
+
type PositionReader = Pick<YrsSession, 'hasStory' | 'storySegments'>;
|
|
408
|
+
type YrsLocProjection = Pick<YrsPositionProjection, 'positionForLoc'>;
|
|
409
|
+
type YrsPositionOutline = Record<string, {
|
|
410
|
+
contentStart: number;
|
|
411
|
+
size: number;
|
|
412
|
+
paragraphs: Array<{
|
|
413
|
+
paraId: string;
|
|
414
|
+
displayStart: number;
|
|
415
|
+
length: number;
|
|
416
|
+
leading: number;
|
|
417
|
+
}>;
|
|
418
|
+
}>;
|
|
419
|
+
declare function createYrsLocProjectionFromOutline(outline: YrsPositionOutline): YrsLocProjection;
|
|
420
|
+
/** @internal */
|
|
421
|
+
interface YrsProjectedNode {
|
|
422
|
+
kind: string;
|
|
423
|
+
start: number;
|
|
424
|
+
nodeSize: number;
|
|
425
|
+
attrs: Record<string, unknown>;
|
|
426
|
+
story: string;
|
|
427
|
+
}
|
|
428
|
+
/** @internal */
|
|
429
|
+
interface YrsProjectedTable extends YrsProjectedNode {
|
|
430
|
+
kind: 'table';
|
|
431
|
+
tableIndex: number;
|
|
432
|
+
widthsTwips: number[];
|
|
433
|
+
rowCount: number;
|
|
434
|
+
cells: YrsProjectedCell[];
|
|
435
|
+
}
|
|
436
|
+
/** @internal */
|
|
437
|
+
interface YrsProjectedCell {
|
|
438
|
+
row: number;
|
|
439
|
+
column: number;
|
|
440
|
+
rowspan: number;
|
|
441
|
+
colspan: number;
|
|
442
|
+
story: string;
|
|
443
|
+
start: number;
|
|
444
|
+
contentStart: number;
|
|
445
|
+
nodeSize: number;
|
|
446
|
+
attrs: Record<string, unknown>;
|
|
447
|
+
}
|
|
448
|
+
/** @internal */
|
|
449
|
+
interface YrsPointerProjectionTarget {
|
|
450
|
+
story: string;
|
|
451
|
+
displayPosition: number;
|
|
452
|
+
cell?: YrsCellLoc;
|
|
453
|
+
}
|
|
454
|
+
/** @internal */
|
|
455
|
+
interface YrsStorySegmentSource {
|
|
456
|
+
segments(story: string): YrsStorySegment[];
|
|
457
|
+
}
|
|
458
|
+
/** @internal */
|
|
459
|
+
declare function createYrsPositionProjection(session: PositionReader, rootStory: string, source?: YrsStorySegmentSource): YrsPositionProjection | null;
|
|
460
|
+
/** @internal */
|
|
461
|
+
declare function projectYrsDisplayPosition(position: number | PointPosition, getProjection: (rootStory: string) => YrsPositionProjection | null): YrsPointerProjectionTarget | null;
|
|
462
|
+
/** @internal */
|
|
463
|
+
declare class YrsPositionProjection {
|
|
464
|
+
readonly rootStory: string;
|
|
465
|
+
private readonly stories;
|
|
466
|
+
private readonly nodes;
|
|
467
|
+
private readonly tables;
|
|
468
|
+
private readonly source;
|
|
469
|
+
private readonly paragraphsById;
|
|
470
|
+
constructor(session: Pick<YrsSession, 'storySegments'>, rootStory: string, source?: YrsStorySegmentSource);
|
|
471
|
+
get size(): number;
|
|
472
|
+
nodeAt(position: number): YrsProjectedNode | null;
|
|
473
|
+
tableAtPosition(position: number): YrsProjectedTable | null;
|
|
474
|
+
tableAtStart(start: number): YrsProjectedTable | null;
|
|
475
|
+
tableStartForLoc(at: YrsCellLoc): number | null;
|
|
476
|
+
cellPosition(tableStart: number, row: number, column: number): number | null;
|
|
477
|
+
targetAt(position: number): YrsPointerProjectionTarget;
|
|
478
|
+
positionForLoc(loc: YrsLoc): number | null;
|
|
479
|
+
/** First paragraph for each paraId. */
|
|
480
|
+
private paragraphIndex;
|
|
481
|
+
bookmarkPosition(name: string): number | null;
|
|
482
|
+
private buildStory;
|
|
483
|
+
private inputPositionAt;
|
|
484
|
+
private buildTable;
|
|
485
|
+
}
|
|
486
|
+
/** @internal */
|
|
487
|
+
declare function yrsLocToProjectedDisplayPosition(reader: Pick<YrsSession, 'hasStory' | 'paragraphSpans'>, projectionFor: (rootStory: string) => YrsLocProjection | null, loc: YrsLoc, activeRootStory?: string, inputMap?: (story: string) => YrsInputPositionMap | null): number | null;
|
|
488
|
+
|
|
489
|
+
/** @internal */
|
|
490
|
+
interface ResidentSearchMatch {
|
|
491
|
+
story: string;
|
|
492
|
+
paraId: string;
|
|
493
|
+
start: number;
|
|
494
|
+
displayFrom: number;
|
|
495
|
+
displayTo: number;
|
|
496
|
+
}
|
|
497
|
+
/** @internal */
|
|
498
|
+
interface ResidentSearchResult {
|
|
499
|
+
matches: ResidentSearchMatch[];
|
|
500
|
+
carried: number;
|
|
501
|
+
}
|
|
502
|
+
|
|
384
503
|
/** @internal */
|
|
385
504
|
interface AnchorResolutionFailure {
|
|
386
505
|
ok: false;
|
|
@@ -392,7 +511,12 @@ interface AnchorResolutionFailure {
|
|
|
392
511
|
/** @internal */
|
|
393
512
|
type AnchorReader = Pick<YrsSession, 'resolveParagraphAnchor' | 'hasStory' | 'paragraphSpans' | 'storySegments' | 'findText' | 'listRevisions'>;
|
|
394
513
|
/** @internal */
|
|
395
|
-
type ProposalGeometryReader = AnchorReader & Pick<YrsSession, 'storyIds' | 'paragraphs' | 'paragraphIdCount' | 'locateParagraph' | 'version'
|
|
514
|
+
type ProposalGeometryReader = AnchorReader & Pick<YrsSession, 'storyIds' | 'paragraphs' | 'paragraphIdCount' | 'locateParagraph' | 'version'> & {
|
|
515
|
+
proposalRevisions?(ids: readonly string[]): readonly ProposalGeometryRevision[];
|
|
516
|
+
positionOutline?(root: string): YrsPositionOutline | null;
|
|
517
|
+
};
|
|
518
|
+
/** @internal */
|
|
519
|
+
type ProposalGeometryRevision = Pick<ReturnType<AnchorReader['listRevisions']>[number], 'revisionId' | 'kind' | 'story' | 'range'>;
|
|
396
520
|
/** @internal */
|
|
397
521
|
type AnchorGeometryTarget = {
|
|
398
522
|
kind: 'proposal';
|
|
@@ -433,9 +557,9 @@ declare function textRangeToRaw(segments: readonly YrsStorySegment[], range: Doc
|
|
|
433
557
|
range: RawAnchorRange;
|
|
434
558
|
} | AnchorResolutionFailure;
|
|
435
559
|
/** @internal */
|
|
436
|
-
declare function hiddenRanges(session: AnchorReader, version: string, snapshot: DocxProposalSnapshot | null): RawAnchorRange[];
|
|
560
|
+
declare function hiddenRanges(session: AnchorReader, version: string, snapshot: DocxProposalSnapshot | null, revisions?: readonly ProposalGeometryRevision[]): RawAnchorRange[];
|
|
437
561
|
/** @internal */
|
|
438
|
-
declare function resolveAnchorTarget(session: AnchorReader, target: AnchorGeometryTarget, version: string, snapshot?: DocxProposalSnapshot | null): AnchorResolution;
|
|
562
|
+
declare function resolveAnchorTarget(session: AnchorReader, target: AnchorGeometryTarget, version: string, snapshot?: DocxProposalSnapshot | null, proposalRevisions?: readonly ProposalGeometryRevision[]): AnchorResolution;
|
|
439
563
|
/** @internal */
|
|
440
564
|
interface ProposalDisplayTarget {
|
|
441
565
|
ranges: {
|
|
@@ -454,6 +578,7 @@ interface ProposalGeometryMirror {
|
|
|
454
578
|
previewVersion: number;
|
|
455
579
|
proposals: string;
|
|
456
580
|
targets: Record<string, ProposalGeometryTarget>;
|
|
581
|
+
navigationTargets?: Record<string, ReturnType<typeof resolveNavigationTarget>>;
|
|
457
582
|
hidden: {
|
|
458
583
|
from: number;
|
|
459
584
|
to: number;
|
|
@@ -462,7 +587,9 @@ interface ProposalGeometryMirror {
|
|
|
462
587
|
/** @internal */
|
|
463
588
|
declare function proposalSetIdentity(snapshot: DocxProposalSnapshot): string;
|
|
464
589
|
/** @internal */
|
|
465
|
-
declare function computeProposalGeometryMirror(reader: ProposalGeometryReader, snapshot: DocxProposalSnapshot): ProposalGeometryMirror;
|
|
590
|
+
declare function computeProposalGeometryMirror(reader: ProposalGeometryReader, snapshot: DocxProposalSnapshot, includeNavigationTargets?: boolean): ProposalGeometryMirror;
|
|
591
|
+
/** @internal */
|
|
592
|
+
declare function resolveMirroredNavigationTarget(mirror: ProposalGeometryMirror | null, snapshot: DocxProposalSnapshot, story: string, paraId: string): ReturnType<typeof resolveNavigationTarget> | null;
|
|
466
593
|
/** @internal */
|
|
467
594
|
declare function resolveNavigationTarget(reader: ProposalGeometryReader, story: string, paraId: string): {
|
|
468
595
|
loc: YrsLoc;
|
|
@@ -493,6 +620,10 @@ interface ResidentProposalResponse {
|
|
|
493
620
|
updates: ArrayBuffer[];
|
|
494
621
|
stateVector: ArrayBuffer;
|
|
495
622
|
geometry: ProposalGeometryMirror;
|
|
623
|
+
fontRequirements?: {
|
|
624
|
+
layoutInput: string;
|
|
625
|
+
requirementsJson: string;
|
|
626
|
+
};
|
|
496
627
|
}
|
|
497
628
|
/** @internal */
|
|
498
629
|
type ResidentDocumentRead = {
|
|
@@ -503,6 +634,15 @@ type ResidentDocumentRead = {
|
|
|
503
634
|
} | {
|
|
504
635
|
kind: 'readParagraphs';
|
|
505
636
|
request: DocxReadParagraphsRequest;
|
|
637
|
+
} | {
|
|
638
|
+
kind: 'searchText';
|
|
639
|
+
query: string;
|
|
640
|
+
caseSensitive: boolean;
|
|
641
|
+
carry?: YrsStickyPosition | null;
|
|
642
|
+
} | {
|
|
643
|
+
kind: 'stickyAnchors';
|
|
644
|
+
locs: YrsLoc[];
|
|
645
|
+
version: string;
|
|
506
646
|
} | {
|
|
507
647
|
kind: 'navigationTarget';
|
|
508
648
|
story: string;
|
|
@@ -516,10 +656,18 @@ interface ResidentDocumentReadValues {
|
|
|
516
656
|
};
|
|
517
657
|
readParagraphs: DocxReadParagraphsResult;
|
|
518
658
|
navigationTarget: ReturnType<typeof resolveNavigationTarget>;
|
|
659
|
+
searchText: ResidentSearchResult;
|
|
660
|
+
stickyAnchors: Array<YrsStickyPosition | null>;
|
|
519
661
|
}
|
|
662
|
+
/** @internal */
|
|
663
|
+
type ResidentEngineWorkerHostModule = {
|
|
664
|
+
type: 'editModule';
|
|
665
|
+
module: WebAssembly.Module | null;
|
|
666
|
+
};
|
|
520
667
|
type ResidentEngineWorkerRequest = {
|
|
521
668
|
id: number;
|
|
522
669
|
type: 'warm';
|
|
670
|
+
hostModule?: true;
|
|
523
671
|
} | {
|
|
524
672
|
id: number;
|
|
525
673
|
type: 'bootstrap';
|
|
@@ -554,6 +702,11 @@ type ResidentEngineWorkerRequest = {
|
|
|
554
702
|
generation?: string;
|
|
555
703
|
/** The most the worker's editing core may allocate at once. */
|
|
556
704
|
heapLimitBytes?: number;
|
|
705
|
+
/**
|
|
706
|
+
* Opens a display-only preview of the first `previewBlocks` body blocks instead. A later
|
|
707
|
+
* `open` of the whole document replaces it.
|
|
708
|
+
*/
|
|
709
|
+
previewBlocks?: number;
|
|
557
710
|
} | {
|
|
558
711
|
id: number;
|
|
559
712
|
type: 'fontRequirements';
|
|
@@ -587,12 +740,23 @@ type ResidentEngineWorkerRequest = {
|
|
|
587
740
|
layoutExtras?: string;
|
|
588
741
|
displayWindow?: [number, number];
|
|
589
742
|
retainBuiltPages?: boolean;
|
|
743
|
+
provisionalPages?: number;
|
|
590
744
|
} | {
|
|
591
745
|
id: number;
|
|
592
746
|
type: 'buildPages';
|
|
593
747
|
pages: number[];
|
|
594
748
|
expectedFrameEpoch: number;
|
|
595
749
|
paintCaret: boolean;
|
|
750
|
+
background?: boolean;
|
|
751
|
+
} | {
|
|
752
|
+
id: number;
|
|
753
|
+
type: 'releasePages';
|
|
754
|
+
pages: Array<{
|
|
755
|
+
index: number;
|
|
756
|
+
pageId: string;
|
|
757
|
+
}>;
|
|
758
|
+
expectedFrameEpoch: number;
|
|
759
|
+
paintCaret: boolean;
|
|
596
760
|
} | {
|
|
597
761
|
id: number;
|
|
598
762
|
type: 'completeLayout';
|
|
@@ -659,6 +823,9 @@ type ResidentEngineWorkerResponse = ({
|
|
|
659
823
|
id: number;
|
|
660
824
|
ok: true;
|
|
661
825
|
frame?: ArrayBuffer;
|
|
826
|
+
pageFrames?: ArrayBuffer[];
|
|
827
|
+
pageBuildSuperseded?: boolean;
|
|
828
|
+
superseded?: true;
|
|
662
829
|
updates?: ArrayBuffer[];
|
|
663
830
|
engineMs?: number;
|
|
664
831
|
workerTotalMs?: number;
|
|
@@ -681,6 +848,8 @@ type ResidentEngineWorkerResponse = ({
|
|
|
681
848
|
layoutProvisional?: boolean;
|
|
682
849
|
/** An `open` reply: the opened package's host metadata JSON. */
|
|
683
850
|
hostJson?: string;
|
|
851
|
+
/** An `open` reply: the package cannot open as a preview; nothing was opened. */
|
|
852
|
+
previewRefused?: boolean;
|
|
684
853
|
/** A `fontRequirements` reply. */
|
|
685
854
|
requirementsJson?: string;
|
|
686
855
|
/** An `encodeState` reply: the document state as one yrs v1 update. */
|
|
@@ -718,6 +887,7 @@ interface ResidentProposalReply extends Omit<ResidentProposalResponse, 'updates'
|
|
|
718
887
|
}
|
|
719
888
|
interface ResidentEngineWorkerFrame {
|
|
720
889
|
frame: Uint8Array;
|
|
890
|
+
pageFrames?: Uint8Array[];
|
|
721
891
|
updates: Uint8Array[];
|
|
722
892
|
engineMs: number;
|
|
723
893
|
workerTotalMs: number;
|
|
@@ -742,7 +912,7 @@ interface ResidentEngineWorkerLayoutOptions {
|
|
|
742
912
|
layoutExtras?: string;
|
|
743
913
|
/** The host state vector the snapshot brings the worker to. */
|
|
744
914
|
stateVector?: Uint8Array;
|
|
745
|
-
/**
|
|
915
|
+
/** Lay out just the body's first pages before replying. */
|
|
746
916
|
provisionalPages?: number;
|
|
747
917
|
/** Bootstrap only: lay out the document {@link ResidentEngineWorkerClient.open} opened. */
|
|
748
918
|
opened?: boolean;
|
|
@@ -777,7 +947,7 @@ interface ResidentEngineWorkerPort {
|
|
|
777
947
|
onmessage: ((event: MessageEvent<ResidentEngineWorkerResponse>) => void) | null;
|
|
778
948
|
onerror: ((event: ErrorEvent) => void) | null;
|
|
779
949
|
onmessageerror: ((event: MessageEvent) => void) | null;
|
|
780
|
-
postMessage(message: ResidentEngineWorkerRequest, transfer?: Transferable[]): void;
|
|
950
|
+
postMessage(message: ResidentEngineWorkerRequest | ResidentEngineWorkerHostModule, transfer?: Transferable[]): void;
|
|
781
951
|
terminate(): void;
|
|
782
952
|
}
|
|
783
953
|
/** Dedicated-worker owner for resident input, pagination, and FrameDelta output. */
|
|
@@ -795,13 +965,17 @@ declare class ResidentEngineWorkerClient {
|
|
|
795
965
|
/** Set once `open` is sent, with the heap limit it opened under. */
|
|
796
966
|
private openedHeapLimit;
|
|
797
967
|
private bootstraps;
|
|
968
|
+
/** The font-requirements read still in flight, shared while nothing was posted after it. */
|
|
969
|
+
private fontRead;
|
|
798
970
|
/** Id of the last snapshot request sent; replies to earlier requests must
|
|
799
971
|
* not replace the state it recorded. */
|
|
800
972
|
private lastSnapshotId;
|
|
801
973
|
private keepSurfaces;
|
|
974
|
+
private bootstrapWaiters;
|
|
802
975
|
private lastMemory;
|
|
803
976
|
private answeredFrameEpoch;
|
|
804
977
|
private retainBuiltPages;
|
|
978
|
+
private failureListener;
|
|
805
979
|
constructor(worker?: ResidentEngineWorkerPort);
|
|
806
980
|
isReady(): boolean;
|
|
807
981
|
/** @internal */
|
|
@@ -813,7 +987,9 @@ declare class ResidentEngineWorkerClient {
|
|
|
813
987
|
answeredFrame(): number;
|
|
814
988
|
/** @internal */
|
|
815
989
|
setRetainBuiltPages(retain: boolean): void;
|
|
816
|
-
/** @internal
|
|
990
|
+
/** @internal Called once when the worker fails, whether or not a request was waiting; not on `destroy`. */
|
|
991
|
+
onFailure(listener: ((error: Error) => void) | null): void;
|
|
992
|
+
/** @internal Whether foreground document or frame work awaits its reply. */
|
|
817
993
|
frameRequestPending(): boolean;
|
|
818
994
|
/** The worker replica's last reported yrs state vector (null before any). */
|
|
819
995
|
remoteStateVector(): Uint8Array | null;
|
|
@@ -821,6 +997,8 @@ declare class ResidentEngineWorkerClient {
|
|
|
821
997
|
syncedFontsRevision(): number | null;
|
|
822
998
|
/** A bootstrap was sent; later snapshots go as syncs queued behind it. */
|
|
823
999
|
bootstrapSent(): boolean;
|
|
1000
|
+
/** Resolves once a bootstrap is sent, at once when one was. */
|
|
1001
|
+
whenBootstrapSent(): Promise<void>;
|
|
824
1002
|
/**
|
|
825
1003
|
* Starts over with another document in the same worker: the next request
|
|
826
1004
|
* is a bootstrap, which keeps the page surfaces already attached so the
|
|
@@ -837,6 +1015,15 @@ declare class ResidentEngineWorkerClient {
|
|
|
837
1015
|
generation?: string;
|
|
838
1016
|
heapLimitBytes?: number;
|
|
839
1017
|
}): Promise<ResidentEngineWorkerOpened>;
|
|
1018
|
+
/**
|
|
1019
|
+
* Opens a display-only preview of the first `blocks` body blocks of a DOCX in the worker, or
|
|
1020
|
+
* resolves null when the package cannot open as a preview. Its first layout is a bootstrap
|
|
1021
|
+
* with `opened`; {@link rebootstrap} then lets {@link open} replace it with the whole document.
|
|
1022
|
+
* A copy of `bytes` is transferred.
|
|
1023
|
+
*/
|
|
1024
|
+
openPreview(bytes: Uint8Array, blocks: number, options?: {
|
|
1025
|
+
heapLimitBytes?: number;
|
|
1026
|
+
}): Promise<ResidentEngineWorkerOpened | null>;
|
|
840
1027
|
/** The font requirements of a region layout request, read from the opened document. */
|
|
841
1028
|
fontRequirements(layoutInput: string): Promise<string>;
|
|
842
1029
|
/** @internal */
|
|
@@ -868,6 +1055,14 @@ declare class ResidentEngineWorkerClient {
|
|
|
868
1055
|
buildFrame(extras: string, expectedFrameEpoch: number, paintCaret?: boolean, displayWindow?: [number, number]): Promise<ResidentEngineWorkerFrame>;
|
|
869
1056
|
/** Build unbuilt display pages; the reply frame carries them. */
|
|
870
1057
|
buildPages(pages: number[], expectedFrameEpoch: number, paintCaret?: boolean): Promise<ResidentEngineWorkerFrame>;
|
|
1058
|
+
/** @internal */
|
|
1059
|
+
buildPages(pages: number[], expectedFrameEpoch: number, paintCaret: boolean, background: boolean): Promise<ResidentEngineWorkerFrame | null>;
|
|
1060
|
+
releasePages(pages: Array<{
|
|
1061
|
+
index: number;
|
|
1062
|
+
pageId: string;
|
|
1063
|
+
}>, expectedFrameEpoch: number, paintCaret?: boolean): Promise<ResidentEngineWorkerFrame | {
|
|
1064
|
+
superseded: true;
|
|
1065
|
+
}>;
|
|
871
1066
|
applyInput(text: string, selection: YrsSelection, expectedFrameEpoch: number, profile?: boolean, paintCaret?: boolean, displayWindow?: [number, number]): Promise<ResidentEngineWorkerApplyResult | {
|
|
872
1067
|
applied: false;
|
|
873
1068
|
}>;
|
|
@@ -937,6 +1132,12 @@ declare function documentToYrs(session: YrsSession, document: Document, options?
|
|
|
937
1132
|
|
|
938
1133
|
/** yrs-to-OOXML save projection. */
|
|
939
1134
|
|
|
1135
|
+
/**
|
|
1136
|
+
* `blocks` with paragraphs of their own, in table cells too, each still the
|
|
1137
|
+
* session paragraph it was projected from: a save edits these, not the
|
|
1138
|
+
* projection the next one reuses. @internal
|
|
1139
|
+
*/
|
|
1140
|
+
declare function ownProjectedParagraphs(blocks: readonly BlockContent[]): BlockContent[];
|
|
940
1141
|
/**
|
|
941
1142
|
* Rebuild all yrs-owned editable stories into the serializer-facing Document
|
|
942
1143
|
* while preserving every package part the editor does not own.
|
|
@@ -989,11 +1190,13 @@ declare function captureSessionSave(session: YrsSession): DocxSessionSave;
|
|
|
989
1190
|
/**
|
|
990
1191
|
* Writes `document`, projected from `session` when `capture` was taken, and
|
|
991
1192
|
* records the Word paragraph IDs the bytes hold as saved. `patches` selects
|
|
992
|
-
* the planned parts written as `originalBuffer`'s bytes with IDs patched in
|
|
993
|
-
*
|
|
1193
|
+
* the planned parts written as `originalBuffer`'s bytes with IDs patched in,
|
|
1194
|
+
* and `splices` the story parts written as its bytes with only the
|
|
1195
|
+
* paragraphs that need it re-serialized; each selects none unless
|
|
1196
|
+
* `originalBuffer` is the session's source package.
|
|
994
1197
|
* @internal
|
|
995
1198
|
*/
|
|
996
|
-
declare function writeSessionSave(session: YrsSession, document: Document, capture: DocxSessionSave, originalBuffer: ArrayBuffer, options?: RepackOptions, patches?: (part: string) => boolean, skipMutations?: boolean): Promise<DocxSavedDocument>;
|
|
1199
|
+
declare function writeSessionSave(session: YrsSession, document: Document, capture: DocxSessionSave, originalBuffer: ArrayBuffer, options?: RepackOptions, patches?: (part: string) => boolean, skipMutations?: boolean, splices?: (part: string) => boolean): Promise<DocxSavedDocument>;
|
|
997
1200
|
/**
|
|
998
1201
|
* Saves a session opened from DOCX bytes and reports each saved paragraph's
|
|
999
1202
|
* persisted anchor, read from the same projection the bytes are written
|
|
@@ -1024,76 +1227,6 @@ declare function sessionSourcePackage(session: YrsSession): {
|
|
|
1024
1227
|
keys: ReturnType<typeof editorSaveKeys>;
|
|
1025
1228
|
} | null;
|
|
1026
1229
|
|
|
1027
|
-
type PositionReader = Pick<YrsSession, 'hasStory' | 'storySegments'>;
|
|
1028
|
-
/** @internal */
|
|
1029
|
-
interface YrsProjectedNode {
|
|
1030
|
-
kind: string;
|
|
1031
|
-
start: number;
|
|
1032
|
-
nodeSize: number;
|
|
1033
|
-
attrs: Record<string, unknown>;
|
|
1034
|
-
story: string;
|
|
1035
|
-
}
|
|
1036
|
-
/** @internal */
|
|
1037
|
-
interface YrsProjectedTable extends YrsProjectedNode {
|
|
1038
|
-
kind: 'table';
|
|
1039
|
-
tableIndex: number;
|
|
1040
|
-
widthsTwips: number[];
|
|
1041
|
-
rowCount: number;
|
|
1042
|
-
cells: YrsProjectedCell[];
|
|
1043
|
-
}
|
|
1044
|
-
/** @internal */
|
|
1045
|
-
interface YrsProjectedCell {
|
|
1046
|
-
row: number;
|
|
1047
|
-
column: number;
|
|
1048
|
-
rowspan: number;
|
|
1049
|
-
colspan: number;
|
|
1050
|
-
story: string;
|
|
1051
|
-
start: number;
|
|
1052
|
-
contentStart: number;
|
|
1053
|
-
nodeSize: number;
|
|
1054
|
-
attrs: Record<string, unknown>;
|
|
1055
|
-
}
|
|
1056
|
-
/** @internal */
|
|
1057
|
-
interface YrsPointerProjectionTarget {
|
|
1058
|
-
story: string;
|
|
1059
|
-
displayPosition: number;
|
|
1060
|
-
cell?: YrsCellLoc;
|
|
1061
|
-
}
|
|
1062
|
-
/** @internal */
|
|
1063
|
-
interface YrsStorySegmentSource {
|
|
1064
|
-
segments(story: string): YrsStorySegment[];
|
|
1065
|
-
}
|
|
1066
|
-
/** @internal */
|
|
1067
|
-
declare function createYrsPositionProjection(session: PositionReader, rootStory: string, source?: YrsStorySegmentSource): YrsPositionProjection | null;
|
|
1068
|
-
/** @internal */
|
|
1069
|
-
declare function projectYrsDisplayPosition(position: number | PointPosition, getProjection: (rootStory: string) => YrsPositionProjection | null): YrsPointerProjectionTarget | null;
|
|
1070
|
-
/** @internal */
|
|
1071
|
-
declare class YrsPositionProjection {
|
|
1072
|
-
readonly rootStory: string;
|
|
1073
|
-
private readonly stories;
|
|
1074
|
-
private readonly nodes;
|
|
1075
|
-
private readonly tables;
|
|
1076
|
-
private readonly source;
|
|
1077
|
-
private readonly paragraphsById;
|
|
1078
|
-
constructor(session: Pick<YrsSession, 'storySegments'>, rootStory: string, source?: YrsStorySegmentSource);
|
|
1079
|
-
get size(): number;
|
|
1080
|
-
nodeAt(position: number): YrsProjectedNode | null;
|
|
1081
|
-
tableAtPosition(position: number): YrsProjectedTable | null;
|
|
1082
|
-
tableAtStart(start: number): YrsProjectedTable | null;
|
|
1083
|
-
tableStartForLoc(at: YrsCellLoc): number | null;
|
|
1084
|
-
cellPosition(tableStart: number, row: number, column: number): number | null;
|
|
1085
|
-
targetAt(position: number): YrsPointerProjectionTarget;
|
|
1086
|
-
positionForLoc(loc: YrsLoc): number | null;
|
|
1087
|
-
/** First paragraph for each paraId. */
|
|
1088
|
-
private paragraphIndex;
|
|
1089
|
-
bookmarkPosition(name: string): number | null;
|
|
1090
|
-
private buildStory;
|
|
1091
|
-
private inputPositionAt;
|
|
1092
|
-
private buildTable;
|
|
1093
|
-
}
|
|
1094
|
-
/** @internal */
|
|
1095
|
-
declare function yrsLocToProjectedDisplayPosition(reader: Pick<YrsSession, 'hasStory' | 'paragraphSpans'>, projectionFor: (rootStory: string) => YrsPositionProjection | null, loc: YrsLoc, activeRootStory?: string, inputMap?: (story: string) => YrsInputPositionMap | null): number | null;
|
|
1096
|
-
|
|
1097
1230
|
interface YrsDocxHost {
|
|
1098
1231
|
document: Document;
|
|
1099
1232
|
referencedFonts: string[];
|
|
@@ -1104,6 +1237,8 @@ interface YrsDocxHost {
|
|
|
1104
1237
|
* preview's cover only its own first pages.
|
|
1105
1238
|
*/
|
|
1106
1239
|
unusedScriptFonts?: string[];
|
|
1240
|
+
/** A preview whose cut holds the whole body. */
|
|
1241
|
+
wholeBody?: true;
|
|
1107
1242
|
embeddedFonts: Map<string, ArrayBuffer>;
|
|
1108
1243
|
fontTableRelationshipsXml?: string;
|
|
1109
1244
|
}
|
|
@@ -1841,8 +1976,12 @@ interface YrsSession extends CollaborationReplica {
|
|
|
1841
1976
|
setDisplayWindow(start: number, end: number): void;
|
|
1842
1977
|
/** Keep every previously built page while windowed builds are on. @internal */
|
|
1843
1978
|
setDisplayRetainBuiltPages(retain: boolean): void;
|
|
1979
|
+
/** @internal */
|
|
1980
|
+
setWindowedIncrementalBuilds(enabled: boolean): void;
|
|
1844
1981
|
/** Build the listed unbuilt pages into a FrameDelta v1. @internal */
|
|
1845
1982
|
buildDisplayPagesFrame(pages: readonly number[], expectedFrameEpoch: number): Uint8Array;
|
|
1983
|
+
/** Release built pages; null means the request was superseded. @internal */
|
|
1984
|
+
releaseDisplayPagesFrame(pages: number[], expectedFrameEpoch: number): Uint8Array | null;
|
|
1846
1985
|
/** Make the next frame a full one, for a host taking over from another engine; no-op once destroyed. */
|
|
1847
1986
|
resetFrameBase(): void;
|
|
1848
1987
|
/** Caret geometry from the current resident display frame. */
|
|
@@ -1905,6 +2044,11 @@ interface YrsSession extends CollaborationReplica {
|
|
|
1905
2044
|
openDocxPreview(bytes: Uint8Array, blocks: number): YrsDocxHost | null;
|
|
1906
2045
|
/** Opened by {@link openDocxPreview}: its document refuses every change. @internal */
|
|
1907
2046
|
isDisplayOnly(): boolean;
|
|
2047
|
+
/**
|
|
2048
|
+
* Marks this empty session as showing a preview another engine opened: it refuses every
|
|
2049
|
+
* change, and {@link openDocxPreview} can still load the preview here. @internal
|
|
2050
|
+
*/
|
|
2051
|
+
markDisplayOnly(): void;
|
|
1908
2052
|
/**
|
|
1909
2053
|
* Marks whether the document is a preview's, as a replica of one is: its
|
|
1910
2054
|
* layouts render NUMPAGES empty. @internal
|
|
@@ -2320,4 +2464,4 @@ declare function decodeDocxHostJson(json: string, source: Uint8Array): YrsDocxHo
|
|
|
2320
2464
|
*/
|
|
2321
2465
|
declare function createYrsSession(options?: CreateYrsSessionOptions): Promise<YrsSession>;
|
|
2322
2466
|
|
|
2323
|
-
export { type DocxSavedDocument as $, type AnchorGeometryTarget as A, type DocxParagraphAnchor as B, type CollaborationReplica as C, type DocxOccurrence as D, type DocxParagraphAnchorResult as E, type DocxParagraphIdAssignment as F, type DocxParagraphIdDiagnostic as G, type DocxParagraphIdOrigin as H, type DocxParagraphIdRefusal as I, type DocxParagraphIdentity as J, type DocxParagraphIdentityReceipt as K, type DocxParagraphIdentitySnapshot as L, type DocxParagraphOrigin as M, type DocxParagraphRef as N, type DocxParagraphSavePlan as O, type DocxPersistedParagraphAnchor as P, type DocxProposalFailure as Q, type DocxProposalInput as R, type DocxProposalRecord as S, type DocxProposalRegistryState as T, type DocxProposalRequest as U, type DocxProposalResult as V, type DocxProposalSnapshot as W, type DocxProposalState as X, type YrsSession as Y, type DocxProposalStateRequest as Z, type DocxProposalWithdrawRequest as _, type YrsRenderEnv as a, type
|
|
2467
|
+
export { type DocxSavedDocument as $, type AnchorGeometryTarget as A, type DocxParagraphAnchor as B, type CollaborationReplica as C, type DocxOccurrence as D, type DocxParagraphAnchorResult as E, type DocxParagraphIdAssignment as F, type DocxParagraphIdDiagnostic as G, type DocxParagraphIdOrigin as H, type DocxParagraphIdRefusal as I, type DocxParagraphIdentity as J, type DocxParagraphIdentityReceipt as K, type DocxParagraphIdentitySnapshot as L, type DocxParagraphOrigin as M, type DocxParagraphRef as N, type DocxParagraphSavePlan as O, type DocxPersistedParagraphAnchor as P, type DocxProposalFailure as Q, type DocxProposalInput as R, type DocxProposalRecord as S, type DocxProposalRegistryState as T, type DocxProposalRequest as U, type DocxProposalResult as V, type DocxProposalSnapshot as W, type DocxProposalState as X, type YrsSession as Y, type DocxProposalStateRequest as Z, type DocxProposalWithdrawRequest as _, type YrsRenderEnv as a, type YrsResolvedCommentAnchor as a$, type DocxSavedParagraph as a0, type DocxSessionParagraphAnchor as a1, type DocxSessionSave as a2, type DocxSourceParagraphAnchor as a3, type DocxSourceStory as a4, type ProposalDisplayTarget as a5, type ProposalGeometryMirror as a6, type ProposalGeometryReader as a7, type ProposalGeometryRevision as a8, type ProposalGeometryTarget as a9, type YrsLocProjection as aA, type YrsMediaSource as aB, type YrsNumberingProperties as aC, type YrsOpeningOptions as aD, type YrsParaOffset as aE, type YrsParagraph as aF, type YrsParagraphAttrs as aG, type YrsParagraphLength as aH, type YrsParagraphReceipt as aI, type YrsParagraphSeed as aJ, type YrsParagraphSpan as aK, type YrsParagraphTabStop as aL, type YrsPointerProjectionTarget as aM, type YrsPositionOutline as aN, YrsPositionProjection as aO, type YrsProjectedCell as aP, type YrsProjectedNode as aQ, type YrsProjectedTable as aR, type YrsRawOp as aS, type YrsRegionLayoutProgress as aT, type YrsReplaceReceipt as aU, type YrsResidentCaretRect as aV, type YrsResidentCaretSnapshot as aW, type YrsResidentFontRegistration as aX, type YrsResidentWorkerSnapshot as aY, type YrsResidentWorkerSyncOptions as aZ, type YrsResolveReceipt as a_, type RawAnchorRange as aa, type ResidentCaretPaintStyle as ab, type ResidentEngineOffscreenPage as ac, type ResidentEngineWorkerApplyResult as ad, ResidentEngineWorkerClient as ae, type ResidentEngineWorkerFrame as af, type ResidentEngineWorkerOpened as ag, type ResidentProposalReply as ah, ResidentWorkerFailureError as ai, ResidentWorkerOutOfMemoryError as aj, type YrsAuthor as ak, type YrsCellBorder as al, type YrsCellBorders as am, type YrsCellLoc as an, type YrsChangeTarget as ao, type YrsCommentInfo as ap, type YrsCommentReceipt as aq, type YrsContentControlValue as ar, type YrsDocxHost as as, type YrsEngineApplyProfile as at, type YrsHyperlinkAttrs as au, type YrsImageGeometry as av, type YrsInlineFormatDelta as aw, type YrsInputParagraphSeed as ax, type YrsInputParagraphSpan as ay, type YrsInputPositionMap as az, type CollaborationTransport as b, type YrsRevisionReceipt as b0, type YrsRunMark as b1, type YrsSelectionContext as b2, type YrsSelectionText as b3, type YrsSplitReceipt as b4, type YrsStickyPosition as b5, type YrsStoryRange as b6, type YrsStorySeed as b7, type YrsStorySegmentSource as b8, type YrsTableLoc as b9, preloadDocxEngine as bA, preloadResidentEngineWorker as bB, prepareDocxBytes as bC, preparedDocxDigest as bD, projectYrsDisplayPosition as bE, proposalRevisionPreview as bF, proposalSetIdentity as bG, residentCaretDeviceRect as bH, residentCaretSnapshotForFrame as bI, resolveAnchorTarget as bJ, resolveMirroredNavigationTarget as bK, resolveNavigationTarget as bL, retainPreloadedResidentEngineWorker as bM, sameYrsSelection as bN, saveYrsDocx as bO, sessionSourcePackage as bP, takePreloadedResidentEngineWorker as bQ, textRangeToRaw as bR, writeSessionSave as bS, yrsLocToDisplayPosition as bT, yrsLocToProjectedDisplayPosition as bU, yrsToDocument as bV, type YrsTableRange as ba, type YrsTableReceipt as bb, type YrsTargetEditResult as bc, type YrsTextColor as bd, type YrsTextMatch as be, type YrsTextSearchOptions as bf, type YrsTriState as bg, type YrsUndoCaptureMode as bh, type YrsWatermark as bi, type YrsWorkerDocumentMirror as bj, anchorFailure as bk, canUseResidentEngineWorker as bl, captureSessionSave as bm, compareYrsLocs as bn, computeProposalGeometryMirror as bo, createYrsInputPositionMap as bp, createYrsLocProjectionFromOutline as bq, createYrsPositionProjection as br, createYrsSession as bs, decodeDocxHostJson as bt, displayPositionToYrsLoc as bu, documentToYrs as bv, editorSaveKeys as bw, hiddenRanges as bx, isBodyStory as by, ownProjectedParagraphs as bz, type CollaborationProviderOptions as c, type CollaborationStatus as d, type CollaborationPeer as e, type CollaborationCursor as f, type CollaborationPeerListener as g, type CollaborationStatusListener as h, type CollaborationErrorListener as i, type YrsSelection as j, type CollaborationAwarenessState as k, CollaborationError as l, type CollaborationErrorCode as m, type CollaborationPresence as n, type CollaborationResolvedUser as o, type CollaborationStatusChange as p, type CollaborationTextInsertion as q, type CollaborationTransportEvent as r, type CollaborationUpdateOrigin as s, type CollaborationUser as t, type YrsLoc as u, type YrsStorySegment as v, type YrsRevisionInfo as w, type AnchorReader as x, type AnchorResolutionFailure as y, type CreateYrsSessionOptions as z };
|
package/dist/layout/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { B as BundledFontProvider } from '../rustMeasureSource-BkCx1FDx.mjs';
|
|
2
2
|
export { a as BundledFontProviderSource, E as EmbeddedFaceInput, F as FontScript, b as ResidentFontRequirement, R as ResidentMeasurementConfig, c as RustMeasureSource, d as RustTextEngine, e as createRustMeasureSource, g as getRustTextEngine } from '../rustMeasureSource-BkCx1FDx.mjs';
|
|
3
|
-
import { f as SectionProperties, H as HeaderFooter } from '../content-
|
|
4
|
-
export { D as DrawingScene, V as DrawingSceneNode, b as ShapeEffect, aX as ShapeFillPaint, aY as ShapeStrokePaint, c as ShapeTextBodyProperties } from '../content-
|
|
3
|
+
import { f as SectionProperties, H as HeaderFooter } from '../content-DSb-6a9T.mjs';
|
|
4
|
+
export { D as DrawingScene, V as DrawingSceneNode, b as ShapeEffect, aX as ShapeFillPaint, aY as ShapeStrokePaint, c as ShapeTextBodyProperties } from '../content-DSb-6a9T.mjs';
|
|
5
5
|
import { Document } from '../types/document.mjs';
|
|
6
6
|
import '../formatting-gqLFeJ9X.mjs';
|
|
7
7
|
import '../docx/wrapTypes.mjs';
|