@docx-editor.dev/core 2.29.0 → 2.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/automation.cjs +1 -1
- package/dist/automation.d.ts +22 -26
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.ts +47 -40
- package/dist/binding.js +1 -1
- package/dist/bookmark-names-DDuAra_V.d.ts +37 -0
- package/dist/{chrome-print-CAs51cpq.d.ts → chrome-print-BWvaVEhD.d.ts} +577 -243
- package/dist/chunk-243W4WW2.cjs +2 -0
- package/dist/{chunk-G4HOFIKJ.js → chunk-2E2RPEKX.js} +1 -1
- package/dist/chunk-4S24UOPG.js +30 -0
- package/dist/chunk-5JPIEN54.cjs +3 -0
- package/dist/{chunk-7WQ7AAHW.cjs → chunk-5SO5QDMV.cjs} +1 -1
- package/dist/{chunk-UHHYFIDT.cjs → chunk-6IDOVU6L.cjs} +1 -1
- package/dist/chunk-DBOOTED4.cjs +30 -0
- package/dist/chunk-EOTAXOJY.cjs +5 -0
- package/dist/chunk-FDAKJ2SJ.cjs +30 -0
- package/dist/chunk-FNNOJNGY.js +3 -0
- package/dist/chunk-FT33HRZP.js +5 -0
- package/dist/{chunk-W35WTWAO.cjs → chunk-HC6YNKUI.cjs} +1 -1
- package/dist/chunk-HZ66UCIS.js +2 -0
- package/dist/{chunk-MM5QBMTE.cjs → chunk-IBRBNT37.cjs} +1 -1
- package/dist/chunk-IVIN7X43.js +30 -0
- package/dist/chunk-LZY6B6IV.js +4 -0
- package/dist/chunk-MOYYRVFV.cjs +2 -0
- package/dist/{chunk-OMCG63ZF.js → chunk-N6B3BXCL.js} +1 -1
- package/dist/chunk-Q5K2GGNG.js +2 -0
- package/dist/chunk-R2XINWVE.js +7 -0
- package/dist/chunk-SUEXVBPR.js +1 -0
- package/dist/chunk-T2QQHG5C.js +18 -0
- package/dist/{chunk-LSZ6KPKK.js → chunk-VWIJKH4A.js} +1 -1
- package/dist/chunk-WO4V6PNS.cjs +18 -0
- package/dist/chunk-XMJKFURD.cjs +4 -0
- package/dist/{chunk-BY2ACZZ6.cjs → chunk-XSTGE3NI.cjs} +1 -1
- package/dist/chunk-YQWMI6J5.cjs +7 -0
- package/dist/{chunk-RCLZXP3B.js → chunk-ZCJS7D7S.js} +1 -1
- package/dist/collaboration/replication.cjs +1 -1
- package/dist/collaboration/replication.d.ts +4 -5
- package/dist/collaboration/replication.js +1 -1
- package/dist/collaboration.d.ts +3 -4
- package/dist/contracts/document.d.ts +3 -3
- package/dist/contracts/editor.d.ts +8 -9
- package/dist/contracts/interaction.d.ts +2 -2
- package/dist/contracts/modules.d.ts +12 -13
- package/dist/contracts/types.d.ts +2 -2
- package/dist/{custom-node-writes-Bn6uciLb.d.ts → custom-node-writes-TeUvMP13.d.ts} +2 -2
- package/dist/{diagnostic-context-B8M79cfK.d.ts → diagnostic-context-DJ0P1uZE.d.ts} +3 -2
- package/dist/{diagnostic-hints-BeVjfNOv.d.ts → diagnostic-hints-C9JlLz1L.d.ts} +12 -5
- package/dist/{document-protection-CUb55pl_.d.ts → document-protection-C8x3P2J6.d.ts} +1 -1
- package/dist/{editor-CZQZmTIU.d.ts → editor-B2ShlO23.d.ts} +368 -52
- package/dist/{editor-scope-7o9xweiJ.d.ts → editor-scope-C7ke1KJG.d.ts} +57 -4
- package/dist/editor.cjs +1 -1
- package/dist/editor.css +5 -3
- package/dist/editor.d.ts +606 -34
- package/dist/editor.js +1 -1
- package/dist/export.cjs +2 -2
- package/dist/export.d.ts +17 -15
- package/dist/export.js +2 -2
- package/dist/{font-resolver-lSBLirLR.d.ts → font-resolver-CWh40DYp.d.ts} +1 -1
- package/dist/font-shaping-policy-BvpkrfxM.d.ts +7 -0
- package/dist/{headless-document-view-pp3q7wIh.d.ts → headless-document-view-qOpaCF82.d.ts} +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +24 -24
- package/dist/index.js +1 -1
- package/dist/{layout-shaping-BD-dF_rn.d.ts → layout-shaping-CWS3j0Xr.d.ts} +3 -2
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.ts +112 -44
- package/dist/layout.js +1 -1
- package/dist/{note-properties-qQUjO1GQ.d.ts → note-properties-QsKh24sM.d.ts} +1 -1
- package/dist/{omml-equation-BUbU0utM.d.ts → omml-equation-BsLAa2lX.d.ts} +38 -8
- package/dist/output.cjs +1 -1
- package/dist/output.d.ts +20 -10
- package/dist/output.js +1 -1
- package/dist/{protocol-DYzzz2ej.d.ts → protocol-COZJUKUY.d.ts} +94 -2
- package/dist/{review-paragraph-order-CN_0l2Cb.d.ts → review-paragraph-order-C_QbCKcH.d.ts} +1 -1
- package/dist/{semantic-cell-selection-eYag3P47.d.ts → semantic-cell-selection-Cub9FDa8.d.ts} +2 -2
- package/dist/{semantic-interaction-kR_QB845.d.ts → semantic-interaction-dApRIYpt.d.ts} +1 -1
- package/dist/{semantic-paint-ZayFF3tD.d.ts → semantic-paint-DLzA8sjP.d.ts} +3 -3
- package/dist/{semantic-record-queries-Bsgth6lv.d.ts → semantic-record-queries-3yp9o11g.d.ts} +1 -1
- package/dist/{semantic-records-DQmumPgL.d.ts → semantic-records-B-akgRch.d.ts} +207 -139
- package/dist/store.cjs +1 -1
- package/dist/store.d.ts +49 -136
- package/dist/store.js +1 -1
- package/dist/{tree-package-store-CovjNARF.d.ts → tree-package-store-B8l8DX3Z.d.ts} +612 -428
- package/dist/{tree-session-contract-CZVAGl51.d.ts → tree-session-contract-DeLRqohz.d.ts} +28 -13
- package/dist/{types-barrel-DuC5QBNC.d.ts → types-barrel-CkF2JbU4.d.ts} +1146 -745
- package/package.json +2 -2
- package/dist/chunk-236O4YQW.js +0 -2
- package/dist/chunk-6JPL6ZAS.cjs +0 -5
- package/dist/chunk-6ZQP4HQ7.js +0 -3
- package/dist/chunk-BCXH4BXB.js +0 -5
- package/dist/chunk-CAJEXXVG.cjs +0 -4
- package/dist/chunk-CPWLFPWC.js +0 -30
- package/dist/chunk-D7ZMDMPX.cjs +0 -3
- package/dist/chunk-DOHF6FA7.cjs +0 -30
- package/dist/chunk-DVX32P2P.js +0 -27
- package/dist/chunk-E4LOMDNL.js +0 -1
- package/dist/chunk-EKLM7NWB.cjs +0 -7
- package/dist/chunk-G3K63G7P.cjs +0 -27
- package/dist/chunk-JLVBDYVQ.cjs +0 -2
- package/dist/chunk-LQX36Z5P.js +0 -7
- package/dist/chunk-OSFOJTHU.cjs +0 -18
- package/dist/chunk-T6K2QYNZ.cjs +0 -2
- package/dist/chunk-TRGAVV2Y.js +0 -4
- package/dist/chunk-U4JZVSOE.js +0 -2
- package/dist/chunk-YQ5G6LC7.js +0 -18
- package/dist/image-resources-tXLQShoC.d.ts +0 -211
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { S as StoryScope, g as SelectionMark, h as TransactOptions,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { H as HeadlessDocumentView, D as DocumentProperties } from './headless-document-view-pp3q7wIh.js';
|
|
1
|
+
import { S as StoryScope, g as SelectionMark, h as TransactOptions, d as HistoryGroup, b as StoryTargetRejection, e as TreeModelChange, H as HeaderFooterParts, a as HeaderFooterSectionResolution, I as InsertImageInput, i as ImageIntentResult, R as ReplaceImageOptions, A as ApplyImagePropertiesInput, j as FragmentPasteInput, k as FragmentPasteResult } from './tree-package-store-B8l8DX3Z.js';
|
|
2
|
+
import { ao as TreeDocOp, O as OoxmlPart, N as OoxmlNode, Q as OoxmlPackage, ap as OoxmlElement, a as ReviewItem, af as SupportedImageMime, aE as ImageDecodePort, aG as RevisionAttributionInput } from './types-barrel-CkF2JbU4.js';
|
|
3
|
+
import { D as DocumentTrackingSettings, I as InsertCustomNodeWrite, C as CustomNodeWriteResult, a as CustomNodeSweepOutcome, E as EmbeddedFont, B as BookmarkIndex, L as ListKind } from './custom-node-writes-TeUvMP13.js';
|
|
4
|
+
import { H as HeadlessDocumentView, D as DocumentProperties } from './headless-document-view-qOpaCF82.js';
|
|
6
5
|
import { Node } from 'prosemirror-model';
|
|
7
6
|
import { CollaborationDocumentPort } from './collaboration/replication.js';
|
|
8
|
-
import { V as ViewScope } from './editor-scope-
|
|
7
|
+
import { V as ViewScope } from './editor-scope-C7ke1KJG.js';
|
|
9
8
|
|
|
10
9
|
/**
|
|
11
10
|
* Why an edited projection could not be mapped back into tree ops.
|
|
@@ -90,6 +89,8 @@ interface ThemeSchemeFaces {
|
|
|
90
89
|
readonly minorSupplemental?: Readonly<Record<string, string>>;
|
|
91
90
|
/** Lower-cased font table names that declare a Chinese character set. */
|
|
92
91
|
readonly chineseFontTableFaces?: readonly string[];
|
|
92
|
+
/** Lower-cased font table names that declare an East Asian character set. */
|
|
93
|
+
readonly eastAsianFontTableFaces?: readonly string[];
|
|
93
94
|
}
|
|
94
95
|
/** The theme's font slots, fully resolved, for resolving `w:rFonts` theme attributes. */
|
|
95
96
|
interface DocumentThemeFonts extends ThemeSchemeFaces {
|
|
@@ -257,7 +258,11 @@ interface TreeApplyResult {
|
|
|
257
258
|
readonly reason?: TreeBindingRejection | StoryTargetRejection | string;
|
|
258
259
|
}
|
|
259
260
|
/** Optional collaboration attribution and history grouping for a direct tree-op transaction. */
|
|
260
|
-
type TreeApplyOptions = Pick<TransactOptions, 'origin' | 'actorId' | 'operationId' | 'recordsHistory'
|
|
261
|
+
type TreeApplyOptions = Pick<TransactOptions, 'origin' | 'actorId' | 'operationId' | 'recordsHistory'> & {
|
|
262
|
+
/** The store token of the commit's history group, as `commitReviewOps` hands it over. */
|
|
263
|
+
readonly historyToken?: HistoryGroup;
|
|
264
|
+
/** @deprecated Use `historyToken`, the same store token under its one name. */
|
|
265
|
+
readonly historyGroup?: HistoryGroup;
|
|
261
266
|
/** Package resources committed in the same transaction as the tree operations. */
|
|
262
267
|
readonly packageEdits?: readonly ((pkg: OoxmlPackage) => OoxmlPackage)[];
|
|
263
268
|
/** Canonical operations on related package parts, committed in the same undo unit. */
|
|
@@ -266,6 +271,11 @@ type TreeApplyOptions = Pick<TransactOptions, 'origin' | 'actorId' | 'operationI
|
|
|
266
271
|
readonly ops: readonly TreeDocOp[];
|
|
267
272
|
}[];
|
|
268
273
|
};
|
|
274
|
+
/** History grouping for a comment or custom-node write: frames of one group share one undo step. */
|
|
275
|
+
interface PackageWriteOptions {
|
|
276
|
+
/** The store token of the commit's history group, as `commitReviewOps` hands it over. */
|
|
277
|
+
readonly historyToken?: HistoryGroup;
|
|
278
|
+
}
|
|
269
279
|
/**
|
|
270
280
|
* One open document: the canonical tree, and the only write path into it.
|
|
271
281
|
*
|
|
@@ -357,6 +367,11 @@ interface TreeDocxSessionView extends HeadlessDocumentView {
|
|
|
357
367
|
collaborationPort(documentId: string): CollaborationDocumentPort;
|
|
358
368
|
/** Serialize the whole package back to DOCX bytes. */
|
|
359
369
|
save(): Uint8Array;
|
|
370
|
+
/**
|
|
371
|
+
* {@link save} in steps a caller can pause between. The package is captured at the call, so
|
|
372
|
+
* the bytes describe the document as it was then, whatever happens between steps.
|
|
373
|
+
*/
|
|
374
|
+
saveSteps(): Generator<void, Uint8Array>;
|
|
360
375
|
/**
|
|
361
376
|
* The resolved header/footer parts of the section, by variant (phase 2).
|
|
362
377
|
*
|
|
@@ -504,7 +519,7 @@ interface TreeDocxSessionView extends HeadlessDocumentView {
|
|
|
504
519
|
/** ISO-8601. Omitted writes no `@w:date`, because inventing one is a content change. */
|
|
505
520
|
date?: string, scope?: StoryScope,
|
|
506
521
|
/** Binds id allocation to one actor, so two peers cannot mint the same comment id. */
|
|
507
|
-
actorId?: string): string | null;
|
|
522
|
+
actorId?: string, options?: PackageWriteOptions): string | null;
|
|
508
523
|
/**
|
|
509
524
|
* Resolve a comment thread, or reopen it. False when the document holds no such comment.
|
|
510
525
|
*
|
|
@@ -512,7 +527,7 @@ interface TreeDocxSessionView extends HeadlessDocumentView {
|
|
|
512
527
|
* `commentsExtended.xml`, a part a document with no thread does not have, so the state and the
|
|
513
528
|
* part that records it commit together.
|
|
514
529
|
*/
|
|
515
|
-
setCommentResolved(commentId: string, resolved: boolean): boolean;
|
|
530
|
+
setCommentResolved(commentId: string, resolved: boolean, options?: PackageWriteOptions): boolean;
|
|
516
531
|
/**
|
|
517
532
|
* Delete a comment thread outright — body, thread state and story markers.
|
|
518
533
|
*
|
|
@@ -521,7 +536,7 @@ interface TreeDocxSessionView extends HeadlessDocumentView {
|
|
|
521
536
|
* shared notes part. False when the document holds no such comment, or when the removal was
|
|
522
537
|
* refused.
|
|
523
538
|
*/
|
|
524
|
-
deleteComment(commentId: string, scope?: StoryScope, noteId?: number): boolean;
|
|
539
|
+
deleteComment(commentId: string, scope?: StoryScope, noteId?: number, options?: PackageWriteOptions): boolean;
|
|
525
540
|
/**
|
|
526
541
|
* Delete several comment objects as one package transaction and one undo unit.
|
|
527
542
|
*
|
|
@@ -531,7 +546,7 @@ interface TreeDocxSessionView extends HeadlessDocumentView {
|
|
|
531
546
|
deleteComments(comments: readonly {
|
|
532
547
|
readonly commentId: string;
|
|
533
548
|
readonly parentCommentId?: string;
|
|
534
|
-
}[], scope?: StoryScope, noteId?: number): boolean;
|
|
549
|
+
}[], scope?: StoryScope, noteId?: number, options?: PackageWriteOptions): boolean;
|
|
535
550
|
/**
|
|
536
551
|
* Insert a custom node, with the payload it carries, as ONE transaction.
|
|
537
552
|
*
|
|
@@ -543,7 +558,7 @@ interface TreeDocxSessionView extends HeadlessDocumentView {
|
|
|
543
558
|
* to live in its `w:tag` needs.
|
|
544
559
|
*/
|
|
545
560
|
/** `scope` names the story the paragraph is in, and defaults to the body. */
|
|
546
|
-
insertCustomNode(write: InsertCustomNodeWrite, scope?: StoryScope): CustomNodeWriteResult;
|
|
561
|
+
insertCustomNode(write: InsertCustomNodeWrite, scope?: StoryScope, options?: PackageWriteOptions): CustomNodeWriteResult;
|
|
547
562
|
/**
|
|
548
563
|
* Remove a custom node and, in the same transaction, the payload it bound.
|
|
549
564
|
*
|
|
@@ -661,4 +676,4 @@ interface TreeDocxSessionView extends HeadlessDocumentView {
|
|
|
661
676
|
}
|
|
662
677
|
|
|
663
678
|
export { bodyParagraphs as d, docToTreeOps as e, partHasNode as p, reconcileDoc as r, treeToDoc as t };
|
|
664
|
-
export type { DocumentStyleEntry as D, MapResult as M, TreeDocxSessionView as T, TreeApplyResult as a, TreeApplyOptions as b, TreeBindingRejection as c, DocumentThemeColorEntry as f };
|
|
679
|
+
export type { DocumentStyleEntry as D, MapResult as M, PackageWriteOptions as P, TreeDocxSessionView as T, TreeApplyResult as a, TreeApplyOptions as b, TreeBindingRejection as c, DocumentThemeColorEntry as f };
|