@docx-editor.dev/core 2.30.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 +16 -25
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.ts +15 -16
- package/dist/binding.js +1 -1
- package/dist/bookmark-names-DDuAra_V.d.ts +37 -0
- package/dist/{chrome-print-BM3Js-6X.d.ts → chrome-print-BWvaVEhD.d.ts} +318 -33
- package/dist/chunk-243W4WW2.cjs +2 -0
- package/dist/{chunk-RJCQGJR7.js → chunk-2E2RPEKX.js} +1 -1
- package/dist/chunk-4S24UOPG.js +30 -0
- package/dist/chunk-5JPIEN54.cjs +3 -0
- package/dist/{chunk-KJRTNY2Q.cjs → chunk-5SO5QDMV.cjs} +1 -1
- package/dist/{chunk-WF7JZ755.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-HYASLE2G.cjs → chunk-HC6YNKUI.cjs} +1 -1
- package/dist/chunk-HZ66UCIS.js +2 -0
- package/dist/{chunk-5RRAZMBU.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-YZGUBCHP.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-T32MGBJS.js → chunk-VWIJKH4A.js} +1 -1
- package/dist/chunk-WO4V6PNS.cjs +18 -0
- package/dist/chunk-XMJKFURD.cjs +4 -0
- package/dist/{chunk-FLBEJC6X.cjs → chunk-XSTGE3NI.cjs} +1 -1
- package/dist/chunk-YQWMI6J5.cjs +7 -0
- package/dist/{chunk-WPDD2Y32.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-0v0Kgw1T.d.ts → custom-node-writes-TeUvMP13.d.ts} +2 -2
- package/dist/{diagnostic-context-CcAO4q1s.d.ts → diagnostic-context-DJ0P1uZE.d.ts} +3 -2
- package/dist/{diagnostic-hints-2Bke6H_w.d.ts → diagnostic-hints-C9JlLz1L.d.ts} +1 -1
- package/dist/{document-protection-8eyMWIJ0.d.ts → document-protection-C8x3P2J6.d.ts} +1 -1
- package/dist/{editor-DaEJd2so.d.ts → editor-B2ShlO23.d.ts} +292 -50
- 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 +602 -31
- package/dist/editor.js +1 -1
- package/dist/export.cjs +2 -2
- package/dist/export.d.ts +13 -14
- package/dist/export.js +2 -2
- package/dist/{font-resolver-CL9BVKZo.d.ts → font-resolver-CWh40DYp.d.ts} +1 -1
- package/dist/{headless-document-view-DZQN8Bnx.d.ts → headless-document-view-qOpaCF82.d.ts} +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +22 -23
- package/dist/index.js +1 -1
- package/dist/{layout-shaping-cEnVrhWg.d.ts → layout-shaping-CWS3j0Xr.d.ts} +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.ts +87 -22
- package/dist/layout.js +1 -1
- package/dist/{note-properties-9FH8zAeG.d.ts → note-properties-QsKh24sM.d.ts} +1 -1
- package/dist/{omml-equation-DP2WpUbK.d.ts → omml-equation-BsLAa2lX.d.ts} +27 -9
- package/dist/output.cjs +1 -1
- package/dist/output.d.ts +20 -10
- package/dist/output.js +1 -1
- package/dist/{protocol-CZ1uUlPO.d.ts → protocol-COZJUKUY.d.ts} +94 -2
- package/dist/{review-paragraph-order-CqVelc5A.d.ts → review-paragraph-order-C_QbCKcH.d.ts} +1 -1
- package/dist/{semantic-cell-selection-Dr9yxFZt.d.ts → semantic-cell-selection-Cub9FDa8.d.ts} +2 -2
- package/dist/{semantic-interaction-Dc3pf3hr.d.ts → semantic-interaction-dApRIYpt.d.ts} +1 -1
- package/dist/{semantic-paint-Bz3FBAoH.d.ts → semantic-paint-DLzA8sjP.d.ts} +3 -3
- package/dist/{semantic-record-queries-Bx0pl6kL.d.ts → semantic-record-queries-3yp9o11g.d.ts} +1 -1
- package/dist/{semantic-records-CjcF26ZL.d.ts → semantic-records-B-akgRch.d.ts} +130 -87
- package/dist/store.cjs +1 -1
- package/dist/store.d.ts +48 -22
- package/dist/store.js +1 -1
- package/dist/{tree-package-store-DKhdEVym.d.ts → tree-package-store-B8l8DX3Z.d.ts} +675 -645
- package/dist/{tree-session-contract-CwnTEVLF.d.ts → tree-session-contract-DeLRqohz.d.ts} +26 -13
- package/dist/{types-barrel-CA0xB8kH.d.ts → types-barrel-CkF2JbU4.d.ts} +1146 -745
- package/package.json +2 -2
- package/dist/chunk-2PV5L5NJ.js +0 -5
- package/dist/chunk-5OTS2EJ7.js +0 -7
- package/dist/chunk-5P4223J4.cjs +0 -27
- package/dist/chunk-5SPITS5F.js +0 -18
- package/dist/chunk-7ATNKARV.js +0 -2
- package/dist/chunk-BGCUTKWE.cjs +0 -5
- package/dist/chunk-EBCXSH2W.js +0 -3
- package/dist/chunk-ERECKTIR.cjs +0 -2
- package/dist/chunk-JC47NRJC.cjs +0 -3
- package/dist/chunk-NKPUH3QJ.js +0 -1
- package/dist/chunk-PF5NJWS3.js +0 -2
- package/dist/chunk-PWTRJSES.cjs +0 -18
- package/dist/chunk-QFKGI242.cjs +0 -30
- package/dist/chunk-RPPV4S6T.cjs +0 -4
- package/dist/chunk-UM26GH5B.js +0 -30
- package/dist/chunk-VRCZBFLH.js +0 -27
- package/dist/chunk-WK5X2MMA.cjs +0 -7
- package/dist/chunk-YBMWBXST.cjs +0 -2
- package/dist/chunk-ZOS2PM4A.js +0 -4
- package/dist/image-resources-Bipz8toD.d.ts +0 -211
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { S as StoryScope, g as SelectionMark, h as TransactOptions, 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-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { H as HeadlessDocumentView, D as DocumentProperties } from './headless-document-view-DZQN8Bnx.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.
|
|
@@ -259,7 +258,11 @@ interface TreeApplyResult {
|
|
|
259
258
|
readonly reason?: TreeBindingRejection | StoryTargetRejection | string;
|
|
260
259
|
}
|
|
261
260
|
/** Optional collaboration attribution and history grouping for a direct tree-op transaction. */
|
|
262
|
-
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;
|
|
263
266
|
/** Package resources committed in the same transaction as the tree operations. */
|
|
264
267
|
readonly packageEdits?: readonly ((pkg: OoxmlPackage) => OoxmlPackage)[];
|
|
265
268
|
/** Canonical operations on related package parts, committed in the same undo unit. */
|
|
@@ -268,6 +271,11 @@ type TreeApplyOptions = Pick<TransactOptions, 'origin' | 'actorId' | 'operationI
|
|
|
268
271
|
readonly ops: readonly TreeDocOp[];
|
|
269
272
|
}[];
|
|
270
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
|
+
}
|
|
271
279
|
/**
|
|
272
280
|
* One open document: the canonical tree, and the only write path into it.
|
|
273
281
|
*
|
|
@@ -359,6 +367,11 @@ interface TreeDocxSessionView extends HeadlessDocumentView {
|
|
|
359
367
|
collaborationPort(documentId: string): CollaborationDocumentPort;
|
|
360
368
|
/** Serialize the whole package back to DOCX bytes. */
|
|
361
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>;
|
|
362
375
|
/**
|
|
363
376
|
* The resolved header/footer parts of the section, by variant (phase 2).
|
|
364
377
|
*
|
|
@@ -506,7 +519,7 @@ interface TreeDocxSessionView extends HeadlessDocumentView {
|
|
|
506
519
|
/** ISO-8601. Omitted writes no `@w:date`, because inventing one is a content change. */
|
|
507
520
|
date?: string, scope?: StoryScope,
|
|
508
521
|
/** Binds id allocation to one actor, so two peers cannot mint the same comment id. */
|
|
509
|
-
actorId?: string): string | null;
|
|
522
|
+
actorId?: string, options?: PackageWriteOptions): string | null;
|
|
510
523
|
/**
|
|
511
524
|
* Resolve a comment thread, or reopen it. False when the document holds no such comment.
|
|
512
525
|
*
|
|
@@ -514,7 +527,7 @@ interface TreeDocxSessionView extends HeadlessDocumentView {
|
|
|
514
527
|
* `commentsExtended.xml`, a part a document with no thread does not have, so the state and the
|
|
515
528
|
* part that records it commit together.
|
|
516
529
|
*/
|
|
517
|
-
setCommentResolved(commentId: string, resolved: boolean): boolean;
|
|
530
|
+
setCommentResolved(commentId: string, resolved: boolean, options?: PackageWriteOptions): boolean;
|
|
518
531
|
/**
|
|
519
532
|
* Delete a comment thread outright — body, thread state and story markers.
|
|
520
533
|
*
|
|
@@ -523,7 +536,7 @@ interface TreeDocxSessionView extends HeadlessDocumentView {
|
|
|
523
536
|
* shared notes part. False when the document holds no such comment, or when the removal was
|
|
524
537
|
* refused.
|
|
525
538
|
*/
|
|
526
|
-
deleteComment(commentId: string, scope?: StoryScope, noteId?: number): boolean;
|
|
539
|
+
deleteComment(commentId: string, scope?: StoryScope, noteId?: number, options?: PackageWriteOptions): boolean;
|
|
527
540
|
/**
|
|
528
541
|
* Delete several comment objects as one package transaction and one undo unit.
|
|
529
542
|
*
|
|
@@ -533,7 +546,7 @@ interface TreeDocxSessionView extends HeadlessDocumentView {
|
|
|
533
546
|
deleteComments(comments: readonly {
|
|
534
547
|
readonly commentId: string;
|
|
535
548
|
readonly parentCommentId?: string;
|
|
536
|
-
}[], scope?: StoryScope, noteId?: number): boolean;
|
|
549
|
+
}[], scope?: StoryScope, noteId?: number, options?: PackageWriteOptions): boolean;
|
|
537
550
|
/**
|
|
538
551
|
* Insert a custom node, with the payload it carries, as ONE transaction.
|
|
539
552
|
*
|
|
@@ -545,7 +558,7 @@ interface TreeDocxSessionView extends HeadlessDocumentView {
|
|
|
545
558
|
* to live in its `w:tag` needs.
|
|
546
559
|
*/
|
|
547
560
|
/** `scope` names the story the paragraph is in, and defaults to the body. */
|
|
548
|
-
insertCustomNode(write: InsertCustomNodeWrite, scope?: StoryScope): CustomNodeWriteResult;
|
|
561
|
+
insertCustomNode(write: InsertCustomNodeWrite, scope?: StoryScope, options?: PackageWriteOptions): CustomNodeWriteResult;
|
|
549
562
|
/**
|
|
550
563
|
* Remove a custom node and, in the same transaction, the payload it bound.
|
|
551
564
|
*
|
|
@@ -663,4 +676,4 @@ interface TreeDocxSessionView extends HeadlessDocumentView {
|
|
|
663
676
|
}
|
|
664
677
|
|
|
665
678
|
export { bodyParagraphs as d, docToTreeOps as e, partHasNode as p, reconcileDoc as r, treeToDoc as t };
|
|
666
|
-
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 };
|