@docx-editor.dev/core 2.33.0 → 2.34.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 +11 -11
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.ts +13 -13
- package/dist/binding.js +1 -1
- package/dist/{chrome-print-CrPI9ZQc.d.ts → chrome-print-DY0xsXm_.d.ts} +163 -112
- package/dist/{chunk-X34QRAUU.cjs → chunk-37IYWENL.cjs} +1 -1
- package/dist/chunk-37RNWL45.js +4 -0
- package/dist/chunk-5HUVQXET.cjs +4 -0
- package/dist/chunk-5JP3QQF7.js +7 -0
- package/dist/chunk-5KOLFKOB.cjs +5 -0
- package/dist/chunk-6MF5PN2E.js +236 -0
- package/dist/chunk-77JT2AU7.js +2 -0
- package/dist/{chunk-2F2UEAE2.js → chunk-7FUORGCW.js} +1 -1
- package/dist/chunk-A5BTVPET.cjs +236 -0
- package/dist/chunk-AFXFH2T2.js +3 -0
- package/dist/chunk-AVCYP7OY.js +5 -0
- package/dist/chunk-BL2E4QRA.js +1 -0
- package/dist/chunk-DB7X4Y6O.js +4 -0
- package/dist/chunk-DR6W23TB.cjs +2 -0
- package/dist/{chunk-2DR4TH6B.js → chunk-DYLB5U42.js} +1 -1
- package/dist/chunk-E5BKDHIP.cjs +1 -0
- package/dist/chunk-IWXBRUPG.cjs +4 -0
- package/dist/{chunk-L3YXJDPX.js → chunk-KCUXXO3Q.js} +1 -1
- package/dist/chunk-KYA4Y2YB.js +1 -0
- package/dist/{chunk-PXMTQ73F.cjs → chunk-L74TCGVH.cjs} +1 -1
- package/dist/chunk-NBSSQSKY.js +30 -0
- package/dist/{chunk-RFUNFTGV.cjs → chunk-NEM774E3.cjs} +1 -1
- package/dist/chunk-NKZVMMHU.cjs +1 -0
- package/dist/chunk-TXIO5WYQ.cjs +32 -0
- package/dist/chunk-UKG2TXWH.cjs +7 -0
- package/dist/chunk-V7CO55DO.cjs +3 -0
- package/dist/chunk-VLQDQNSS.js +1 -0
- package/dist/chunk-VQOAC3VI.cjs +30 -0
- package/dist/chunk-YWJSQA2O.js +32 -0
- package/dist/chunk-ZJ74LCFI.cjs +1 -0
- package/dist/collaboration/replication.cjs +1 -1
- package/dist/collaboration/replication.d.ts +3 -3
- package/dist/collaboration/replication.js +1 -1
- package/dist/collaboration.d.ts +2 -2
- package/dist/contracts/document.d.ts +2 -2
- package/dist/contracts/editor.d.ts +9 -9
- package/dist/contracts/modules.d.ts +11 -11
- package/dist/contracts/types.d.ts +3 -3
- package/dist/{custom-node-writes-AqY5KpVx.d.ts → custom-node-writes-DparEcZK.d.ts} +45 -7
- package/dist/{diagnostic-context-CuzhOX0g.d.ts → diagnostic-context-CkZKkKvB.d.ts} +1 -1
- package/dist/{diagnostic-hints-BtCaCqQC.d.ts → diagnostic-hints-BTyb8yzX.d.ts} +1 -1
- package/dist/{document-protection-BvbpSXbQ.d.ts → document-protection-DdWxihIN.d.ts} +1 -1
- package/dist/{drawing-graphic-kind-CXYGYbB3.d.ts → drawing-graphic-kind-CK0cMc7H.d.ts} +91 -18
- package/dist/{drawing-preview-package-B9lSLRg4.d.ts → drawing-preview-package-fFjXpOMS.d.ts} +1 -1
- package/dist/{editor-B7OOAAie.d.ts → editor-DDCkWqfD.d.ts} +47 -15
- package/dist/editor.cjs +1 -1
- package/dist/editor.css +2 -2
- package/dist/editor.d.ts +200 -75
- package/dist/editor.js +1 -1
- package/dist/export.cjs +2 -2
- package/dist/export.d.ts +8 -8
- package/dist/export.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +20 -20
- package/dist/index.js +1 -1
- package/dist/{layout-shaping-Ci_BTnSU.d.ts → layout-shaping-Byj-TwsI.d.ts} +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.ts +289 -129
- package/dist/layout.js +1 -1
- package/dist/{metafile-drawing-DtMFyMKq.d.ts → metafile-drawing-Ce6TuWLm.d.ts} +9 -1
- package/dist/{note-properties-DCIJUKIy.d.ts → note-properties-BiunaIQa.d.ts} +31 -7
- package/dist/output.cjs +1 -1
- package/dist/output.d.ts +76 -12
- package/dist/output.js +1 -1
- package/dist/{protocol-Cp_QzVxS.d.ts → protocol-Dn44dL4M.d.ts} +184 -120
- package/dist/{review-paragraph-order-BJQ43_r0.d.ts → review-paragraph-order-BWMXAKuA.d.ts} +1 -1
- package/dist/{revision-projection-OVusTS77.d.ts → revision-projection-DwFhgIR0.d.ts} +1 -1
- package/dist/{semantic-cell-selection-CoI5hHBm.d.ts → semantic-cell-selection-DhalxEBH.d.ts} +2 -2
- package/dist/{semantic-interaction-BbA4dgEo.d.ts → semantic-interaction-QeuzEtAk.d.ts} +2 -4
- package/dist/{semantic-paint-B5JcIv9c.d.ts → semantic-paint-BYDZbTiY.d.ts} +4 -4
- package/dist/{semantic-record-queries-DnO8J5_j.d.ts → semantic-record-queries-Bf5bgQL3.d.ts} +1 -1
- package/dist/{semantic-records-DoK0lNjS.d.ts → semantic-records-CzZiWMY8.d.ts} +99 -94
- package/dist/store.cjs +1 -1
- package/dist/store.d.ts +31 -16
- package/dist/store.js +1 -1
- package/dist/{tree-op-types-Df4oY2u4.d.ts → tree-op-types-DKvJSH8T.d.ts} +204 -147
- package/dist/{tree-package-store-DXhX1PE-.d.ts → tree-package-store-Cl3BkWXF.d.ts} +1 -1
- package/dist/{tree-session-contract-CF2625mv.d.ts → tree-session-contract-BL50pqs8.d.ts} +14 -7
- package/dist/{unsupported-elements-CUojsaCr.d.ts → unsupported-elements-Bra4QTOM.d.ts} +1 -1
- package/package.json +2 -2
- package/dist/chunk-23MKR33J.js +0 -4
- package/dist/chunk-2DEY5NUC.cjs +0 -32
- package/dist/chunk-2GPGAFOJ.cjs +0 -5
- package/dist/chunk-ALD626VU.cjs +0 -2
- package/dist/chunk-AU33YWEJ.js +0 -236
- package/dist/chunk-AXU63LYW.cjs +0 -1
- package/dist/chunk-CM5VZRBV.js +0 -32
- package/dist/chunk-D7FAFFTN.js +0 -1
- package/dist/chunk-DYUVJNDD.cjs +0 -1
- package/dist/chunk-ESYUKD5D.js +0 -2
- package/dist/chunk-F7TGQMVR.js +0 -5
- package/dist/chunk-FLW7KIQX.js +0 -30
- package/dist/chunk-JG4A6W6I.js +0 -7
- package/dist/chunk-JNGLSBPH.js +0 -2
- package/dist/chunk-KE6ZWRIY.cjs +0 -236
- package/dist/chunk-LI42N7OW.cjs +0 -4
- package/dist/chunk-PLKDS4JT.js +0 -1
- package/dist/chunk-R4R3AAE4.js +0 -1
- package/dist/chunk-SVM6PGMS.js +0 -3
- package/dist/chunk-SZURLHR3.cjs +0 -3
- package/dist/chunk-UYCGCVZ2.cjs +0 -1
- package/dist/chunk-XNBYG4XJ.cjs +0 -30
- package/dist/chunk-ZDFJW5XS.cjs +0 -2
- package/dist/chunk-ZWO4JHNN.cjs +0 -7
package/dist/automation.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkUKG2TXWH_cjs=require('./chunk-UKG2TXWH.cjs');require('./chunk-ZJ74LCFI.cjs'),require('./chunk-TXIO5WYQ.cjs'),require('./chunk-L74TCGVH.cjs'),require('./chunk-NEM774E3.cjs'),require('./chunk-E5BKDHIP.cjs'),require('./chunk-5HUVQXET.cjs'),require('./chunk-37IYWENL.cjs'),require('./chunk-A5BTVPET.cjs');Object.defineProperty(exports,"AUTOMATION_COMMAND_OPERATIONS",{enumerable:true,get:function(){return chunkUKG2TXWH_cjs.i}});Object.defineProperty(exports,"AUTOMATION_QUERY_OPERATIONS",{enumerable:true,get:function(){return chunkUKG2TXWH_cjs.h}});Object.defineProperty(exports,"AUTOMATION_SOLITARY_OPERATIONS",{enumerable:true,get:function(){return chunkUKG2TXWH_cjs.j}});Object.defineProperty(exports,"HEADER_FOOTER_VARIANTS",{enumerable:true,get:function(){return chunkUKG2TXWH_cjs.g}});Object.defineProperty(exports,"SERVER_AUTOMATION_CAPABILITIES",{enumerable:true,get:function(){return chunkUKG2TXWH_cjs.r}});Object.defineProperty(exports,"byteSizeBucket",{enumerable:true,get:function(){return chunkUKG2TXWH_cjs.A}});Object.defineProperty(exports,"countBucket",{enumerable:true,get:function(){return chunkUKG2TXWH_cjs.B}});Object.defineProperty(exports,"createAutomationPaginationProvider",{enumerable:true,get:function(){return chunkUKG2TXWH_cjs.p}});Object.defineProperty(exports,"createDiagnosticEmitter",{enumerable:true,get:function(){return chunkUKG2TXWH_cjs.C}});Object.defineProperty(exports,"createServerAutomationHost",{enumerable:true,get:function(){return chunkUKG2TXWH_cjs.s}});Object.defineProperty(exports,"diagnosticCause",{enumerable:true,get:function(){return chunkUKG2TXWH_cjs.E}});Object.defineProperty(exports,"diagnosticCauses",{enumerable:true,get:function(){return chunkUKG2TXWH_cjs.D}});Object.defineProperty(exports,"diagnosticCodes",{enumerable:true,get:function(){return chunkUKG2TXWH_cjs.v}});Object.defineProperty(exports,"diagnosticErrorName",{enumerable:true,get:function(){return chunkUKG2TXWH_cjs.H}});Object.defineProperty(exports,"documentPartKind",{enumerable:true,get:function(){return chunkUKG2TXWH_cjs.I}});Object.defineProperty(exports,"exceptionCause",{enumerable:true,get:function(){return chunkUKG2TXWH_cjs.G}});Object.defineProperty(exports,"explainDiagnostic",{enumerable:true,get:function(){return chunkUKG2TXWH_cjs.u}});Object.defineProperty(exports,"isAutomationCommand",{enumerable:true,get:function(){return chunkUKG2TXWH_cjs.l}});Object.defineProperty(exports,"isSolitaryAutomationCommand",{enumerable:true,get:function(){return chunkUKG2TXWH_cjs.k}});Object.defineProperty(exports,"openDiagnosticCode",{enumerable:true,get:function(){return chunkUKG2TXWH_cjs.w}});Object.defineProperty(exports,"paginationSnapshotOf",{enumerable:true,get:function(){return chunkUKG2TXWH_cjs.n}});Object.defineProperty(exports,"reviewCodeOfSkip",{enumerable:true,get:function(){return chunkUKG2TXWH_cjs.y}});Object.defineProperty(exports,"reviewDiagnosticCode",{enumerable:true,get:function(){return chunkUKG2TXWH_cjs.z}});Object.defineProperty(exports,"reviewSkipOfReason",{enumerable:true,get:function(){return chunkUKG2TXWH_cjs.F}});Object.defineProperty(exports,"storeEditDiagnosticCode",{enumerable:true,get:function(){return chunkUKG2TXWH_cjs.x}});
|
package/dist/automation.d.ts
CHANGED
|
@@ -11,18 +11,18 @@
|
|
|
11
11
|
* @packageDocumentation
|
|
12
12
|
* @public
|
|
13
13
|
*/
|
|
14
|
-
import { A as AutomationOperation, a as AutomationCapabilities, b as AutomationHost } from './protocol-
|
|
15
|
-
export { c as AutomationAlignment, d as AutomationAuthoringOperation, e as AutomationBatchRequest, f as AutomationBatchResponse, g as AutomationChangeEvent, h as AutomationContentControlLock, i as AutomationContentControlRangeLocation, j as AutomationContentControlScope, k as AutomationContentControlSubtype, l as AutomationContentControlValue, m as AutomationCustomNodePayload, n as AutomationEndpoint, o as AutomationError, p as AutomationErrorCode, q as AutomationFontRead, r as AutomationFontWrite, s as AutomationHandle, t as AutomationHandleRef, u as AutomationInlinePictureRead, v as AutomationInlinePictureWrite, w as AutomationListBullet, x as AutomationListLevelFormat, y as AutomationListNumbering, z as AutomationObjectKind, B as AutomationOperationKind, C as AutomationOperationResult, D as AutomationPageOrientation, E as AutomationPageSetupRead, F as AutomationPageSetupWrite, G as AutomationParagraphFormatRead, H as AutomationParagraphFormatWrite, I as AutomationParagraphRef, J as AutomationPoint, K as AutomationReadingOrder, L as AutomationSaveResult, M as AutomationSearchOptions, N as AutomationSelectionMode, O as AutomationShapeRead, P as AutomationShapeType, Q as AutomationSpan, R as AutomationSpanRef, S as
|
|
16
|
-
import { H as HeaderFooterVariant, N as NoteKind, C as ContentLockPolicy } from './tree-package-store-
|
|
17
|
-
import { az as OoxmlPackageLimits, aA as OoxmlPackageRejection } from './tree-op-types-
|
|
18
|
-
export { aB as AutomationTableMutation, J as RevisionAuthorEntry, K as RevisionAuthorResult, L as RevisionAuthorSkipReason, M as RevisionBatchEntry, Q as RevisionBatchResult, T as RevisionBatchSkipDetail, U as RevisionBatchSkipReason, V as RevisionSiteRefusal } from './tree-op-types-
|
|
19
|
-
import { T as TextMeasurer, S as SemanticLayout } from './semantic-records-
|
|
20
|
-
import { H as HeadlessDocumentView } from './drawing-graphic-kind-
|
|
14
|
+
import { A as AutomationOperation, a as AutomationCapabilities, b as AutomationHost } from './protocol-Dn44dL4M.js';
|
|
15
|
+
export { c as AutomationAlignment, d as AutomationAuthoringOperation, e as AutomationBatchRequest, f as AutomationBatchResponse, g as AutomationChangeEvent, h as AutomationContentControlLock, i as AutomationContentControlRangeLocation, j as AutomationContentControlScope, k as AutomationContentControlSubtype, l as AutomationContentControlValue, m as AutomationCustomNodePayload, n as AutomationEndpoint, o as AutomationError, p as AutomationErrorCode, q as AutomationFontRead, r as AutomationFontWrite, s as AutomationHandle, t as AutomationHandleRef, u as AutomationInlinePictureRead, v as AutomationInlinePictureWrite, w as AutomationListBullet, x as AutomationListLevelFormat, y as AutomationListNumbering, z as AutomationObjectKind, B as AutomationOperationKind, C as AutomationOperationResult, D as AutomationPageOrientation, E as AutomationPageSetupRead, F as AutomationPageSetupWrite, G as AutomationParagraphFormatRead, H as AutomationParagraphFormatWrite, I as AutomationParagraphRef, J as AutomationPoint, K as AutomationReadingOrder, L as AutomationSaveResult, M as AutomationSearchOptions, N as AutomationSelectionMode, O as AutomationShapeRead, P as AutomationShapeType, Q as AutomationSpan, R as AutomationSpanRef, S as AutomationStyleKind, T as AutomationStyleRead, U as AutomationTextProjection, V as AutomationUnsubscribe, W as AutomationValue } from './protocol-Dn44dL4M.js';
|
|
16
|
+
import { H as HeaderFooterVariant, N as NoteKind, C as ContentLockPolicy } from './tree-package-store-Cl3BkWXF.js';
|
|
17
|
+
import { az as OoxmlPackageLimits, aA as OoxmlPackageRejection } from './tree-op-types-DKvJSH8T.js';
|
|
18
|
+
export { aB as AutomationTableMutation, J as RevisionAuthorEntry, K as RevisionAuthorResult, L as RevisionAuthorSkipReason, M as RevisionBatchEntry, Q as RevisionBatchResult, T as RevisionBatchSkipDetail, U as RevisionBatchSkipReason, V as RevisionSiteRefusal } from './tree-op-types-DKvJSH8T.js';
|
|
19
|
+
import { T as TextMeasurer, S as SemanticLayout } from './semantic-records-CzZiWMY8.js';
|
|
20
|
+
import { H as HeadlessDocumentView } from './drawing-graphic-kind-CK0cMc7H.js';
|
|
21
21
|
import { CollaborationModuleContribution } from './collaboration.js';
|
|
22
|
-
export { D as DiagnosticEmitter, a as DiagnosticPayload, b as byteSizeBucket, c as countBucket, e as createDiagnosticEmitter, f as diagnosticCause, d as diagnosticCauses, g as diagnosticErrorName, h as documentPartKind, i as exceptionCause, o as openDiagnosticCode, r as reviewCodeOfSkip, j as reviewDiagnosticCode, k as reviewSkipOfReason, s as storeEditDiagnosticCode } from './diagnostic-context-
|
|
23
|
-
export { B as ByteSizeBucket, C as CollaborationDiagnosticCode, a as CountBucket, b as CustomNodeDiagnosticCode, D as DiagnosticCode, c as DiagnosticErrorName, d as DiagnosticExplanation, e as DocumentOpenDiagnosticCode, f as DocumentPartKind, g as DocumentSaveDiagnosticCode, E as EditDiagnosticCode, F as FailureStage, h as FontDiagnosticCode, i as FormattingChangeKind, H as HistoryDiagnosticCode, P as PerformanceDiagnosticCode, j as ReviewChangeKind, R as ReviewDiagnosticCode, k as ReviewOperation, l as diagnosticCodes, m as explainDiagnostic } from './diagnostic-hints-
|
|
22
|
+
export { D as DiagnosticEmitter, a as DiagnosticPayload, b as byteSizeBucket, c as countBucket, e as createDiagnosticEmitter, f as diagnosticCause, d as diagnosticCauses, g as diagnosticErrorName, h as documentPartKind, i as exceptionCause, o as openDiagnosticCode, r as reviewCodeOfSkip, j as reviewDiagnosticCode, k as reviewSkipOfReason, s as storeEditDiagnosticCode } from './diagnostic-context-CkZKkKvB.js';
|
|
23
|
+
export { B as ByteSizeBucket, C as CollaborationDiagnosticCode, a as CountBucket, b as CustomNodeDiagnosticCode, D as DiagnosticCode, c as DiagnosticErrorName, d as DiagnosticExplanation, e as DocumentOpenDiagnosticCode, f as DocumentPartKind, g as DocumentSaveDiagnosticCode, E as EditDiagnosticCode, F as FailureStage, h as FontDiagnosticCode, i as FormattingChangeKind, H as HistoryDiagnosticCode, P as PerformanceDiagnosticCode, j as ReviewChangeKind, R as ReviewDiagnosticCode, k as ReviewOperation, l as diagnosticCodes, m as explainDiagnostic } from './diagnostic-hints-BTyb8yzX.js';
|
|
24
24
|
export { c as HistoryGroup, H as HistoryGroupOutcome } from './editor-scope-CA6egMaK.js';
|
|
25
|
-
import './revision-projection-
|
|
25
|
+
import './revision-projection-DwFhgIR0.js';
|
|
26
26
|
import './collaboration/replication.js';
|
|
27
27
|
import './failure-6KGFrDO9.js';
|
|
28
28
|
|
|
@@ -61,7 +61,7 @@ type AutomationShapeOwnerStory = {
|
|
|
61
61
|
};
|
|
62
62
|
|
|
63
63
|
/** Operations that read. They never open a transaction. */
|
|
64
|
-
declare const AUTOMATION_QUERY_OPERATIONS: readonly ["getTables", "getTable", "getTableRows", "getTableCells", "getTableCell", "getMergedTableCell", "getTableCellProperties", "getTableCellBody", "getFields", "getField", "getFieldResult", "getInlinePictures", "getInlinePicture", "getShapes", "getShape", "getShapeBody", "getChangeTrackingMode", "getDocument", "getDocumentProperty", "getBody", "getParagraphs", "getRange", "getSpanParagraphs", "getText", "getSpanText", "getTextRanges", "expandSpan", "getReviewedText", "getParagraphId", "search", "getFont", "getParagraphFormat", "getStyle", "getSections", "getPageSetup", "getFurniture", "getNotes", "getNoteBody", "getNoteText", "getNoteKind", "getLists", "getListId", "getListById", "getListParagraphs", "getParagraphList", "getListLevel", "getHyperlink", "getBookmarks", "getBookmarkName", "getBookmarkRange", "getBookmarkNames", "getBookmarkRangeByName", "getComments", "getCommentReplies", "getCommentId", "getCommentAuthor", "getCommentDate", "getCommentText", "getCommentRange", "getCommentResolved", "getRevisions", "getRevisionType", "getRevisionAuthor", "getRevisionDate", "getRevisionRange", "getReviewItemRange", "getContentControls", "getContentControlById", "getContentControlsByTag", "getContentControlsByTitle", "getContentControlTag", "getContentControlTitle", "getContentControlFileId", "getContentControlSubtype", "getContentControlLock", "getContentControlIsBound", "getContentControlPlaceholderShown", "getContentControlTemporary", "getContentControlText", "getContentControlParagraphs", "getContentControlRange"];
|
|
64
|
+
declare const AUTOMATION_QUERY_OPERATIONS: readonly ["getTables", "getTable", "getTableRows", "getTableCells", "getTableCell", "getMergedTableCell", "getTableCellProperties", "getTableCellBody", "getFields", "getField", "getFieldResult", "getInlinePictures", "getInlinePicture", "getShapes", "getShape", "getShapeBody", "getChangeTrackingMode", "getDocument", "getDocumentProperty", "getStyles", "getBody", "getParagraphs", "getRange", "getSpanParagraphs", "getText", "getSpanText", "getTextRanges", "expandSpan", "getReviewedText", "getParagraphId", "search", "getFont", "getParagraphFormat", "getStyle", "getSections", "getPageSetup", "getFurniture", "getNotes", "getNoteBody", "getNoteText", "getNoteKind", "getLists", "getListId", "getListById", "getListParagraphs", "getParagraphList", "getListLevel", "getHyperlink", "getBookmarks", "getBookmarkName", "getBookmarkRange", "getBookmarkNames", "getBookmarkRangeByName", "getComments", "getCommentReplies", "getCommentId", "getCommentAuthor", "getCommentDate", "getCommentText", "getCommentRange", "getCommentResolved", "getRevisions", "getRevisionType", "getRevisionAuthor", "getRevisionDate", "getRevisionRange", "getReviewItemRange", "getContentControls", "getContentControlById", "getContentControlsByTag", "getContentControlsByTitle", "getContentControlTag", "getContentControlTitle", "getContentControlFileId", "getContentControlSubtype", "getContentControlLock", "getContentControlIsBound", "getContentControlPlaceholderShown", "getContentControlTemporary", "getContentControlText", "getContentControlParagraphs", "getContentControlRange"];
|
|
65
65
|
/** Operations that write. Every one of these goes through the single transaction path. */
|
|
66
66
|
declare const AUTOMATION_COMMAND_OPERATIONS: readonly ["removeDocumentInformation", "setDocumentProperties", "insertTableRows", "insertTable", "updateTable", "updateTableCell", "splitTableCell", "setInlinePicture", "deleteInlinePicture", "insertField", "insertOoxml", "setFieldCode", "setFieldResult", "deleteField", "updateFieldResult", "insertInlinePicture", "insertBreak", "setChangeTrackingMode", "proposeInsertion", "proposeDeletion", "proposeReplacement", "insertText", "replaceSpan", "replaceStoryBlocks", "insertParagraph", "splitParagraph", "deleteParagraph", "selectSpan", "selectBookmark", "insertBookmark", "deleteBookmark", "setFont", "setParagraphFormat", "setStyle", "setPageSetup", "deleteNote", "setListLevel", "startNewList", "attachToList", "detachFromList", "setListLevelFormat", "insertListParagraph", "setHyperlink", "insertComment", "setCommentResolved", "replyToComment", "deleteComment", "acceptRevision", "rejectRevision", "resolveRevisionBatch", "setRevisionAuthorBatch", "acceptAllRevisions", "rejectAllRevisions", "setContentControlValue", "setContentControlProperties", "deleteContentControl", "insertContentControlText", "insertContentControl", "insertCustomNode"];
|
|
67
67
|
/**
|
package/dist/automation.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{i as AUTOMATION_COMMAND_OPERATIONS,h as AUTOMATION_QUERY_OPERATIONS,j as AUTOMATION_SOLITARY_OPERATIONS,g as HEADER_FOOTER_VARIANTS,r as SERVER_AUTOMATION_CAPABILITIES,A as byteSizeBucket,B as countBucket,p as createAutomationPaginationProvider,C as createDiagnosticEmitter,s as createServerAutomationHost,E as diagnosticCause,D as diagnosticCauses,v as diagnosticCodes,H as diagnosticErrorName,I as documentPartKind,G as exceptionCause,u as explainDiagnostic,l as isAutomationCommand,k as isSolitaryAutomationCommand,w as openDiagnosticCode,n as paginationSnapshotOf,y as reviewCodeOfSkip,z as reviewDiagnosticCode,F as reviewSkipOfReason,x as storeEditDiagnosticCode}from'./chunk-5JP3QQF7.js';import'./chunk-KYA4Y2YB.js';import'./chunk-YWJSQA2O.js';import'./chunk-7FUORGCW.js';import'./chunk-KCUXXO3Q.js';import'./chunk-VLQDQNSS.js';import'./chunk-DB7X4Y6O.js';import'./chunk-DYLB5U42.js';import'./chunk-6MF5PN2E.js';
|
package/dist/binding.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunk5KOLFKOB_cjs=require('./chunk-5KOLFKOB.cjs');require('./chunk-NKZVMMHU.cjs'),require('./chunk-L74TCGVH.cjs'),require('./chunk-NEM774E3.cjs'),require('./chunk-E5BKDHIP.cjs'),require('./chunk-5HUVQXET.cjs'),require('./chunk-37IYWENL.cjs'),require('./chunk-A5BTVPET.cjs');Object.defineProperty(exports,"PROJECTION_ORIGIN",{enumerable:true,get:function(){return chunk5KOLFKOB_cjs.o}});Object.defineProperty(exports,"bodyParagraphs",{enumerable:true,get:function(){return chunk5KOLFKOB_cjs.c}});Object.defineProperty(exports,"docToTreeOps",{enumerable:true,get:function(){return chunk5KOLFKOB_cjs.f}});Object.defineProperty(exports,"mountTreeSurface",{enumerable:true,get:function(){return chunk5KOLFKOB_cjs.p}});Object.defineProperty(exports,"openTreeSession",{enumerable:true,get:function(){return chunk5KOLFKOB_cjs.m}});Object.defineProperty(exports,"partHasNode",{enumerable:true,get:function(){return chunk5KOLFKOB_cjs.g}});Object.defineProperty(exports,"reconcileDoc",{enumerable:true,get:function(){return chunk5KOLFKOB_cjs.h}});Object.defineProperty(exports,"runPropsOf",{enumerable:true,get:function(){return chunk5KOLFKOB_cjs.b}});Object.defineProperty(exports,"treeSchema",{enumerable:true,get:function(){return chunk5KOLFKOB_cjs.a}});Object.defineProperty(exports,"treeToDoc",{enumerable:true,get:function(){return chunk5KOLFKOB_cjs.e}});
|
package/dist/binding.d.ts
CHANGED
|
@@ -9,28 +9,28 @@
|
|
|
9
9
|
* @public
|
|
10
10
|
*/
|
|
11
11
|
import { Node, Schema } from 'prosemirror-model';
|
|
12
|
-
import { aC as OoxmlProperty, aD as OoxmlPackageResult, aA as OoxmlPackageRejection } from './tree-op-types-
|
|
13
|
-
import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-
|
|
14
|
-
export { D as DocumentStyleEntry, M as MapResult, P as PackageWriteOptions, b as TreeApplyOptions, c as TreeBindingRejection, d as bodyParagraphs, e as docToTreeOps, p as partHasNode, r as reconcileDoc, t as treeToDoc } from './tree-session-contract-
|
|
15
|
-
import { C as ContentLockPolicy } from './tree-package-store-
|
|
16
|
-
export { S as StoryScope, a as StoryTargetRejection } from './tree-package-store-
|
|
12
|
+
import { aC as OoxmlProperty, aD as OoxmlPackageResult, aA as OoxmlPackageRejection } from './tree-op-types-DKvJSH8T.js';
|
|
13
|
+
import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-BL50pqs8.js';
|
|
14
|
+
export { D as DocumentStyleEntry, M as MapResult, P as PackageWriteOptions, b as TreeApplyOptions, c as TreeBindingRejection, d as bodyParagraphs, e as docToTreeOps, p as partHasNode, r as reconcileDoc, t as treeToDoc } from './tree-session-contract-BL50pqs8.js';
|
|
15
|
+
import { C as ContentLockPolicy } from './tree-package-store-Cl3BkWXF.js';
|
|
16
|
+
export { S as StoryScope, a as StoryTargetRejection } from './tree-package-store-Cl3BkWXF.js';
|
|
17
17
|
import { ReviewModuleContribution } from './contracts/modules.js';
|
|
18
18
|
import { EditorView } from 'prosemirror-view';
|
|
19
19
|
import './editor-scope-CA6egMaK.js';
|
|
20
|
-
import './custom-node-writes-
|
|
21
|
-
import './drawing-graphic-kind-
|
|
20
|
+
import './custom-node-writes-DparEcZK.js';
|
|
21
|
+
import './drawing-graphic-kind-CK0cMc7H.js';
|
|
22
22
|
import './collaboration/replication.js';
|
|
23
|
-
import './revision-projection-
|
|
23
|
+
import './revision-projection-DwFhgIR0.js';
|
|
24
24
|
import './contracts/types.js';
|
|
25
25
|
import './failure-6KGFrDO9.js';
|
|
26
|
-
import './document-protection-
|
|
27
|
-
import './editor-
|
|
26
|
+
import './document-protection-DdWxihIN.js';
|
|
27
|
+
import './editor-DDCkWqfD.js';
|
|
28
28
|
import './editor-fonts-D_-vjuJi.js';
|
|
29
|
-
import './diagnostic-hints-
|
|
29
|
+
import './diagnostic-hints-BTyb8yzX.js';
|
|
30
30
|
import './contracts/document.js';
|
|
31
31
|
import './contracts/interaction.js';
|
|
32
|
-
import './semantic-interaction-
|
|
33
|
-
import './semantic-records-
|
|
32
|
+
import './semantic-interaction-QeuzEtAk.js';
|
|
33
|
+
import './semantic-records-CzZiWMY8.js';
|
|
34
34
|
import './collaboration.js';
|
|
35
35
|
|
|
36
36
|
/** Attributes carried by a projected paragraph. */
|
package/dist/binding.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{o as PROJECTION_ORIGIN,c as bodyParagraphs,f as docToTreeOps,p as mountTreeSurface,m as openTreeSession,g as partHasNode,h as reconcileDoc,b as runPropsOf,a as treeSchema,e as treeToDoc}from'./chunk-AVCYP7OY.js';import'./chunk-BL2E4QRA.js';import'./chunk-7FUORGCW.js';import'./chunk-KCUXXO3Q.js';import'./chunk-VLQDQNSS.js';import'./chunk-DB7X4Y6O.js';import'./chunk-DYLB5U42.js';import'./chunk-6MF5PN2E.js';
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { d as FontOrigin, M as MarkedFontResolver, c as FontConfigurationFragment, g as FontResolver, f as FontResolutionRequest } from './font-resolver-Bm9XqTNO.js';
|
|
2
2
|
import { F as FontConfiguration, a as FontFaceRequest, b as FontSource } from './editor-fonts-D_-vjuJi.js';
|
|
3
3
|
import { V as ViewScope, a as EditorExecOptions } from './editor-scope-CA6egMaK.js';
|
|
4
|
-
import { au as TreeDocOp,
|
|
5
|
-
import { e as BookmarkStory, u as DocumentSource,
|
|
6
|
-
import { T as TextMeasurer,
|
|
7
|
-
import { a as ReviewDisplayMode, d as ResolvedRevisionMarkup, k as RevisionMarkupOptions, g as RevisionMarkupChromeHandlers } from './revision-projection-
|
|
8
|
-
import { F as FieldResultsMode, C as ContentLockPolicy, I as InsertImageInput, S as StoryScope, A as ApplyImagePropertiesInput, i as ImageIntentResult } from './tree-package-store-
|
|
4
|
+
import { au as TreeDocOp, b3 as TextFormFieldRange, b4 as TextFormFieldOptions, ad as ImageDecodePort, ao as Unsubscribe, E as ExecResult, aa as DrawingPositionInput, aZ as DrawingTransform, G as ParagraphTabStop, y as IndentFormatting, F as ParagraphFlags, A as ParagraphDisagreements, aJ as DrawingTreeDocOp, an as SupportedImageMime, am as SelectionPin, a5 as OoxmlPackage, g as ReviewRevisionKind, aH as PackageWatermarkWrite, ag as ImageWrapTarget } from './tree-op-types-DKvJSH8T.js';
|
|
5
|
+
import { aJ as TableInteractionLabelKey, e as BookmarkStory, u as DocumentSource, aR as ZoomMode, J as EditorFontError, x as Editor, b as EditorCommand, C as CanResult, ax as SelectedImageState, _ as FormatPainterSurfaceState, f as BookmarkSummary, av as ScrollPlacement, aP as TrackedChangePredicate, aO as TrackedChangeFilterMode, a9 as ImageContext, aB as TableBorderEdgeTarget, aC as TableBorderSpec, aD as TableBorderStyle, aI as TableContext } from './editor-DDCkWqfD.js';
|
|
6
|
+
import { T as TextMeasurer, i as UnsupportedElementRule, S as SemanticLayout, C as ContentControlBoundaryRecord, t as SectionProperties } from './semantic-records-CzZiWMY8.js';
|
|
7
|
+
import { a as ReviewDisplayMode, d as ResolvedRevisionMarkup, k as RevisionMarkupOptions, g as RevisionMarkupChromeHandlers } from './revision-projection-DwFhgIR0.js';
|
|
8
|
+
import { F as FieldResultsMode, C as ContentLockPolicy, I as InsertImageInput, S as StoryScope, A as ApplyImagePropertiesInput, i as ImageIntentResult } from './tree-package-store-Cl3BkWXF.js';
|
|
9
9
|
import { ReviewPaneOptions } from './contracts/types.js';
|
|
10
10
|
import { F as FontShapingOptions } from './font-shaping-policy-BvpkrfxM.js';
|
|
11
11
|
import { CollaborationModuleContribution, EditorCollaborationSession, CollaborationRemoteSelection } from './collaboration.js';
|
|
12
|
-
import { F as FieldShadingMode, c as RevisionStyles, f as DrawingPaintStrings, R as ReviewAuthorInfo, b as RevisionAuthorStyle } from './semantic-paint-
|
|
12
|
+
import { F as FieldShadingMode, c as RevisionStyles, f as DrawingPaintStrings, R as ReviewAuthorInfo, b as RevisionAuthorStyle } from './semantic-paint-BYDZbTiY.js';
|
|
13
13
|
import { ReviewModuleContribution, EditorModule } from './contracts/modules.js';
|
|
14
|
-
import { S as SemanticPosition, a as SemanticSelection, N as NavigationCommand } from './semantic-interaction-
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-
|
|
14
|
+
import { S as SemanticPosition, a as SemanticSelection, N as NavigationCommand } from './semantic-interaction-QeuzEtAk.js';
|
|
15
|
+
import { C as CellSelection } from './semantic-cell-selection-DhalxEBH.js';
|
|
16
|
+
import { R as ResolvedFootnoteProperties, a as ResolvedEndnoteProperties, A as AuthoredNoteProperties } from './note-properties-BiunaIQa.js';
|
|
17
|
+
import { B as BookmarkIndex } from './custom-node-writes-DparEcZK.js';
|
|
18
|
+
import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-BL50pqs8.js';
|
|
19
19
|
import { a as CollaborationStatus } from './failure-6KGFrDO9.js';
|
|
20
20
|
|
|
21
21
|
/**
|
|
@@ -77,6 +77,9 @@ type TableCommandSelectionPolicy = {
|
|
|
77
77
|
readonly kind: 'preserveSelection';
|
|
78
78
|
} | {
|
|
79
79
|
readonly kind: 'adoptCommittedCaret';
|
|
80
|
+
} | {
|
|
81
|
+
readonly kind: 'selectCells';
|
|
82
|
+
readonly cells: CellSelection;
|
|
80
83
|
};
|
|
81
84
|
type TableCommandPlan = {
|
|
82
85
|
readonly ok: true;
|
|
@@ -270,6 +273,29 @@ interface HyperlinkOps {
|
|
|
270
273
|
fieldLinkAtCaret(): SurfaceHyperlink | null;
|
|
271
274
|
/** The link with this node id, or null. */
|
|
272
275
|
linkById(linkId: string): SurfaceHyperlink | null;
|
|
276
|
+
/**
|
|
277
|
+
* Whether every character the selection covers is a pending tracked deletion.
|
|
278
|
+
*
|
|
279
|
+
* A link panel opened over live words reads this to learn that a peer struck those words in
|
|
280
|
+
* suggesting mode: the selected text is unchanged, but it is about to leave the document.
|
|
281
|
+
*
|
|
282
|
+
* Reads the laid-out deletions, so it is true in All Markup and Original views. In Simple
|
|
283
|
+
* Markup and No Markup the struck text is hidden and the selection holds none of it, so it
|
|
284
|
+
* returns false; there the selected text itself changes, and a text comparison catches the
|
|
285
|
+
* strike instead. False for a caret and for a selection that spans paragraphs.
|
|
286
|
+
*/
|
|
287
|
+
selectionIsPendingDeletion(): boolean;
|
|
288
|
+
/**
|
|
289
|
+
* The word a new link takes when the caret is collapsed inside it, or null.
|
|
290
|
+
*
|
|
291
|
+
* A link panel opened at such a caret selects this word first, so the word becomes the
|
|
292
|
+
* display text and the linked text. Null at a word edge, in a link, inside tracked deleted
|
|
293
|
+
* text, and for a range selection. Inside means the same as for formatting at the caret.
|
|
294
|
+
*/
|
|
295
|
+
wordAtCaret(): {
|
|
296
|
+
readonly from: SemanticPosition;
|
|
297
|
+
readonly to: SemanticPosition;
|
|
298
|
+
} | null;
|
|
273
299
|
/**
|
|
274
300
|
* Apply a link to the selection, or retarget the one the caret is already in.
|
|
275
301
|
*
|
|
@@ -515,9 +541,9 @@ interface PaginatedSurfaceOptions {
|
|
|
515
541
|
/**
|
|
516
542
|
* Ctrl/Cmd+K — Word's Insert Hyperlink. The engine reports the request; the host's chrome
|
|
517
543
|
* decides what a link dialog looks like. A host that passes nothing leaves the key alone
|
|
518
|
-
* rather than doing something surprising with it.
|
|
544
|
+
* rather than doing something surprising with it. Answering `false` leaves it alone too.
|
|
519
545
|
*/
|
|
520
|
-
readonly onRequestHyperlink?: () => void;
|
|
546
|
+
readonly onRequestHyperlink?: () => boolean | void;
|
|
521
547
|
/**
|
|
522
548
|
* Ctrl/Cmd+Shift+F5: open the host's bookmark dialog. Answers whether chrome took the
|
|
523
549
|
* request; when none did, or when this is absent, the key is left to the browser.
|
|
@@ -538,7 +564,7 @@ interface PaginatedSurfaceOptions {
|
|
|
538
564
|
* Localized accessible names for core-owned table insertion furniture.
|
|
539
565
|
* Defaults to English from `@docx-editor.dev/i18n` when omitted.
|
|
540
566
|
*/
|
|
541
|
-
readonly tableInteractionLabel?: (key:
|
|
567
|
+
readonly tableInteractionLabel?: (key: TableInteractionLabelKey) => string;
|
|
542
568
|
/** Localized drawing refusal labels; defaults to English when omitted. */
|
|
543
569
|
readonly drawingStrings?: DrawingPaintStrings;
|
|
544
570
|
/** Override raster decode for package image intents; defaults to browser/headless. */
|
|
@@ -727,7 +753,7 @@ interface DocxEditorConfig {
|
|
|
727
753
|
zoomMode?: ZoomMode | 'auto';
|
|
728
754
|
onFontError?: (error: EditorFontError) => void;
|
|
729
755
|
/** Localized labels for table insertion furniture on the painted surface. */
|
|
730
|
-
tableInteractionLabel?: (key:
|
|
756
|
+
tableInteractionLabel?: (key: TableInteractionLabelKey) => string;
|
|
731
757
|
}
|
|
732
758
|
/**
|
|
733
759
|
* Which measurer the current document's layout runs on, and whether shaped resolution is
|
|
@@ -1558,6 +1584,12 @@ interface ParagraphPropertyEdit {
|
|
|
1558
1584
|
readonly remove?: boolean;
|
|
1559
1585
|
}
|
|
1560
1586
|
|
|
1587
|
+
/** Why a table of contents cannot be removed: none is addressed, or it cannot go now. @public */
|
|
1588
|
+
interface TocRemovalRefusal {
|
|
1589
|
+
readonly code: 'notFound' | 'unsupported';
|
|
1590
|
+
readonly reason: string;
|
|
1591
|
+
}
|
|
1592
|
+
|
|
1561
1593
|
/**
|
|
1562
1594
|
* Which review write is being committed through `commitReviewOps`.
|
|
1563
1595
|
*
|
|
@@ -1715,6 +1747,102 @@ interface PaginatedSurfacePerf {
|
|
|
1715
1747
|
readonly cancelledRuns: number;
|
|
1716
1748
|
}
|
|
1717
1749
|
|
|
1750
|
+
/** Indent and list commands of the paginated surface. */
|
|
1751
|
+
interface SurfaceIndentAndListOps {
|
|
1752
|
+
/**
|
|
1753
|
+
* Word's Increase/Decrease Indent, over every paragraph the selection touches.
|
|
1754
|
+
*
|
|
1755
|
+
* A NUMBERED or BULLETED paragraph changes LEVEL: `w:numPr/w:ilvl` moves by one, which
|
|
1756
|
+
* re-resolves its marker from `numbering.xml` — so a bullet becomes a hollow circle, a
|
|
1757
|
+
* `1.` becomes an `a.`, exactly as Word demotes a list item. A level the definition
|
|
1758
|
+
* does not declare is DECLARED on the way, with Word's default format for that depth
|
|
1759
|
+
* (its stock bullets and number formats cycle every three levels) — a definition that
|
|
1760
|
+
* stops at `ilvl 0` never blocks the press. Everything else moves its `w:ind/@left` by
|
|
1761
|
+
* one default tab stop, never past the margin.
|
|
1762
|
+
*
|
|
1763
|
+
* Answers whether anything changed, so a caller can fall back (Tab inserting a tab
|
|
1764
|
+
* where there is no list to demote).
|
|
1765
|
+
*/
|
|
1766
|
+
adjustIndent(direction: 'increase' | 'decrease'): boolean;
|
|
1767
|
+
/**
|
|
1768
|
+
* Tab (`increase`) or Shift+Tab (`decrease`) over a selection outside a list and outside a
|
|
1769
|
+
* table cell (the key moves between cells there): change the indent and keep the text.
|
|
1770
|
+
*
|
|
1771
|
+
* A selection over two or more paragraphs, or a cell rectangle (only from a host calling
|
|
1772
|
+
* this directly), steps the left indent of each paragraph. A selection in one paragraph that
|
|
1773
|
+
* starts at the paragraph start, whole or partial, works on the first line: Tab sets a first-line indent of one default tab stop
|
|
1774
|
+
* (`w:defaultTabStop`), or steps the left indent when the first line already has that
|
|
1775
|
+
* indent or more, or a hanging indent. Shift+Tab clears a first-line indent that the
|
|
1776
|
+
* paragraph states itself, so a style value applies again, and otherwise steps the left
|
|
1777
|
+
* indent back. A paragraph the selection reaches only at its start is not touched by this
|
|
1778
|
+
* rule, unless it is the empty last paragraph of the story.
|
|
1779
|
+
*
|
|
1780
|
+
* Answers true when the selection takes this rule, also when the write is refused or
|
|
1781
|
+
* changes nothing, so the text is never replaced. Answers false for a caret and for a
|
|
1782
|
+
* selection in one paragraph that starts inside the text; there Tab types a tab character
|
|
1783
|
+
* and Shift+Tab steps the left indent.
|
|
1784
|
+
*/
|
|
1785
|
+
indentWithTab(direction: 'increase' | 'decrease'): boolean;
|
|
1786
|
+
/**
|
|
1787
|
+
* Set indent to exact values on every paragraph the selection touches — what a ruler
|
|
1788
|
+
* drag and an indent spinner both need, where {@link adjustIndent} only steps.
|
|
1789
|
+
*
|
|
1790
|
+
* Twips. Omitting a field leaves it as authored; `null` CLEARS it, so the paragraph
|
|
1791
|
+
* falls back to its style — distinct from zero, which blocks the cascade.
|
|
1792
|
+
*
|
|
1793
|
+
* `firstLine` is ONE SIGNED offset, negative for a hanging indent; the two OOXML
|
|
1794
|
+
* spellings are written for it, the unused one as an explicit zero. Answers whether
|
|
1795
|
+
* anything was committed.
|
|
1796
|
+
*/
|
|
1797
|
+
setIndent(update: {
|
|
1798
|
+
readonly left?: number | null;
|
|
1799
|
+
readonly right?: number | null;
|
|
1800
|
+
readonly firstLine?: number | null;
|
|
1801
|
+
}): boolean;
|
|
1802
|
+
/**
|
|
1803
|
+
* Whether Increase/Decrease Indent would do anything right now.
|
|
1804
|
+
*
|
|
1805
|
+
* A list item at level 0 cannot outdent and one at level 8 cannot indent — `w:ilvl`
|
|
1806
|
+
* has nine levels and Word greys the control out at the ends. A missing level
|
|
1807
|
+
* DEFINITION never disables it: `adjustIndent` declares the level as it goes. The one
|
|
1808
|
+
* residue: a `w:numStyleLink` definition missing the level refuses the declaration
|
|
1809
|
+
* (its levels belong to the linked style), so there the press is a safe no-op rather
|
|
1810
|
+
* than a greyed control.
|
|
1811
|
+
*/
|
|
1812
|
+
canAdjustIndent(direction: 'increase' | 'decrease'): boolean;
|
|
1813
|
+
/**
|
|
1814
|
+
* Enter on an empty list item: outdent a level, or leave the list at level 0. Backspace
|
|
1815
|
+
* at an item's start (`removeListNumber`): drop its number and keep the text in place.
|
|
1816
|
+
* Both answer false when they did not handle the key, so the caller splits or joins.
|
|
1817
|
+
*/
|
|
1818
|
+
exitListOnEmptyItem(): boolean;
|
|
1819
|
+
/** Backspace at the start of `paragraphId`: drop its list number; false if it is not one. */
|
|
1820
|
+
removeListNumber(paragraphId: string): boolean;
|
|
1821
|
+
/**
|
|
1822
|
+
* Backspace at the start of an unnumbered `paragraphId`: remove its left and first-line or
|
|
1823
|
+
* hanging indent, or step it back to the marker of the list item it lines up with.
|
|
1824
|
+
*
|
|
1825
|
+
* False when the press should join instead: for a list item, an empty paragraph, a
|
|
1826
|
+
* paragraph in a content-locked control, and an indent this write cannot change (from a
|
|
1827
|
+
* table style, a level that paints no marker, or the earlier properties the Original view
|
|
1828
|
+
* shows). True when it wrote, and also when the write was refused, so the key is spent on
|
|
1829
|
+
* the refusal the surface publishes.
|
|
1830
|
+
*/
|
|
1831
|
+
removeParagraphIndent(paragraphId: string): boolean;
|
|
1832
|
+
/** Whether the paragraph at the caret is a list item, for Tab's Word-like fallback. */
|
|
1833
|
+
isListParagraph(): boolean;
|
|
1834
|
+
/**
|
|
1835
|
+
* Word's Bullets and Numbering buttons.
|
|
1836
|
+
*
|
|
1837
|
+
* Turns every paragraph the selection touches into a list of `kind`, or takes them all
|
|
1838
|
+
* out when they are already one. The definition is created in `numbering.xml` on first
|
|
1839
|
+
* use — a document that has never carried a list has no numbering part at all.
|
|
1840
|
+
*/
|
|
1841
|
+
toggleList(kind: 'bullet' | 'ordered'): boolean;
|
|
1842
|
+
/** Whether every paragraph the selection touches is already a list of `kind`. */
|
|
1843
|
+
isListActive(kind: 'bullet' | 'ordered'): boolean;
|
|
1844
|
+
}
|
|
1845
|
+
|
|
1718
1846
|
/**
|
|
1719
1847
|
* One live remote-caret label the engine positioned. The host owns its content; the engine
|
|
1720
1848
|
* still owns the label's geometry, class, and presence colour, and rebuilds the labels
|
|
@@ -1908,8 +2036,8 @@ interface PaginatedSurfaceState {
|
|
|
1908
2036
|
/**
|
|
1909
2037
|
* The TOC the last right-click landed on, or null.
|
|
1910
2038
|
*
|
|
1911
|
-
* A
|
|
1912
|
-
*
|
|
2039
|
+
* A TOC refuses the caret entirely, so a right-click on one leaves the caret where it was
|
|
2040
|
+
* and `selection` can never say which table of contents the user is pointing at.
|
|
1913
2041
|
* This is how a host's context menu learns it. Surface chrome, not document state.
|
|
1914
2042
|
*/
|
|
1915
2043
|
readonly contextTocId: string | null;
|
|
@@ -1952,7 +2080,7 @@ type SectionBreakInsertType = 'nextPage' | 'continuous';
|
|
|
1952
2080
|
* Every write goes through the guarded mutation path on this object. Reaching past it into
|
|
1953
2081
|
* `session` to apply ops directly bypasses the layout invalidation and the caret bookkeeping.
|
|
1954
2082
|
*/
|
|
1955
|
-
interface PaginatedSurface {
|
|
2083
|
+
interface PaginatedSurface extends SurfaceIndentAndListOps {
|
|
1956
2084
|
readonly session: TreeDocxSessionView;
|
|
1957
2085
|
/** The collaboration replica a `collaborationModule` attached, or null. */
|
|
1958
2086
|
collaborationSession(): EditorCollaborationSession | null;
|
|
@@ -2021,86 +2149,6 @@ interface PaginatedSurface {
|
|
|
2021
2149
|
insertLineBreak(): void;
|
|
2022
2150
|
/** A `w:br w:type="page"` — Ctrl+Enter, a hard page break inside the paragraph. */
|
|
2023
2151
|
insertPageBreak(): void;
|
|
2024
|
-
/**
|
|
2025
|
-
* Word's Increase/Decrease Indent, over every paragraph the selection touches.
|
|
2026
|
-
*
|
|
2027
|
-
* A NUMBERED or BULLETED paragraph changes LEVEL: `w:numPr/w:ilvl` moves by one, which
|
|
2028
|
-
* re-resolves its marker from `numbering.xml` — so a bullet becomes a hollow circle, a
|
|
2029
|
-
* `1.` becomes an `a.`, exactly as Word demotes a list item. A level the definition
|
|
2030
|
-
* does not declare is DECLARED on the way, with Word's default format for that depth
|
|
2031
|
-
* (its stock bullets and number formats cycle every three levels) — a definition that
|
|
2032
|
-
* stops at `ilvl 0` never blocks the press. Everything else moves its `w:ind/@left` by
|
|
2033
|
-
* one default tab stop, never past the margin.
|
|
2034
|
-
*
|
|
2035
|
-
* Answers whether anything changed, so a caller can fall back (Tab inserting a tab
|
|
2036
|
-
* where there is no list to demote).
|
|
2037
|
-
*/
|
|
2038
|
-
adjustIndent(direction: 'increase' | 'decrease'): boolean;
|
|
2039
|
-
/**
|
|
2040
|
-
* Tab (`increase`) or Shift+Tab (`decrease`) over a selection outside a list and outside a
|
|
2041
|
-
* table cell (the key moves between cells there): change the indent and keep the text.
|
|
2042
|
-
*
|
|
2043
|
-
* A selection over two or more paragraphs, or a cell rectangle (only from a host calling
|
|
2044
|
-
* this directly), steps the left indent of each paragraph. A selection in one paragraph that starts at the paragraph start, whole or
|
|
2045
|
-
* partial, works on the first line: Tab sets a first-line indent of one default tab stop
|
|
2046
|
-
* (`w:defaultTabStop`), or steps the left indent when the first line already has that
|
|
2047
|
-
* indent or more, or a hanging indent. Shift+Tab clears a first-line indent that the
|
|
2048
|
-
* paragraph states itself, so a style value applies again, and otherwise steps the left
|
|
2049
|
-
* indent back. A paragraph the selection reaches only at its start is not touched by this
|
|
2050
|
-
* rule, unless it is the empty last paragraph of the story.
|
|
2051
|
-
*
|
|
2052
|
-
* Answers true when the selection takes this rule, also when the write is refused or
|
|
2053
|
-
* changes nothing, so the text is never replaced. Answers false for a caret and for a
|
|
2054
|
-
* selection in one paragraph that starts inside the text; there Tab types a tab character
|
|
2055
|
-
* and Shift+Tab steps the left indent.
|
|
2056
|
-
*/
|
|
2057
|
-
indentWithTab(direction: 'increase' | 'decrease'): boolean;
|
|
2058
|
-
/**
|
|
2059
|
-
* Set indent to exact values on every paragraph the selection touches — what a ruler
|
|
2060
|
-
* drag and an indent spinner both need, where {@link adjustIndent} only steps.
|
|
2061
|
-
*
|
|
2062
|
-
* Twips. Omitting a field leaves it as authored; `null` CLEARS it, so the paragraph
|
|
2063
|
-
* falls back to its style — distinct from zero, which blocks the cascade.
|
|
2064
|
-
*
|
|
2065
|
-
* `firstLine` is ONE SIGNED offset, negative for a hanging indent; the two OOXML
|
|
2066
|
-
* spellings are written for it, the unused one as an explicit zero. Answers whether
|
|
2067
|
-
* anything was committed.
|
|
2068
|
-
*/
|
|
2069
|
-
setIndent(update: {
|
|
2070
|
-
readonly left?: number | null;
|
|
2071
|
-
readonly right?: number | null;
|
|
2072
|
-
readonly firstLine?: number | null;
|
|
2073
|
-
}): boolean;
|
|
2074
|
-
/**
|
|
2075
|
-
* Whether Increase/Decrease Indent would do anything right now.
|
|
2076
|
-
*
|
|
2077
|
-
* A list item at level 0 cannot outdent and one at level 8 cannot indent — `w:ilvl`
|
|
2078
|
-
* has nine levels and Word greys the control out at the ends. A missing level
|
|
2079
|
-
* DEFINITION never disables it: `adjustIndent` declares the level as it goes. The one
|
|
2080
|
-
* residue: a `w:numStyleLink` definition missing the level refuses the declaration
|
|
2081
|
-
* (its levels belong to the linked style), so there the press is a safe no-op rather
|
|
2082
|
-
* than a greyed control.
|
|
2083
|
-
*/
|
|
2084
|
-
canAdjustIndent(direction: 'increase' | 'decrease'): boolean;
|
|
2085
|
-
/**
|
|
2086
|
-
* Enter on an empty list item: outdent a level, or leave the list at level 0.
|
|
2087
|
-
*
|
|
2088
|
-
* Answers false when the caret is not on an empty list item, so the caller falls
|
|
2089
|
-
* through to an ordinary paragraph split.
|
|
2090
|
-
*/
|
|
2091
|
-
exitListOnEmptyItem(): boolean;
|
|
2092
|
-
/** Whether the paragraph at the caret is a list item, for Tab's Word-like fallback. */
|
|
2093
|
-
isListParagraph(): boolean;
|
|
2094
|
-
/**
|
|
2095
|
-
* Word's Bullets and Numbering buttons.
|
|
2096
|
-
*
|
|
2097
|
-
* Turns every paragraph the selection touches into a list of `kind`, or takes them all
|
|
2098
|
-
* out when they are already one. The definition is created in `numbering.xml` on first
|
|
2099
|
-
* use — a document that has never carried a list has no numbering part at all.
|
|
2100
|
-
*/
|
|
2101
|
-
toggleList(kind: 'bullet' | 'ordered'): boolean;
|
|
2102
|
-
/** Whether every paragraph the selection touches is already a list of `kind`. */
|
|
2103
|
-
isListActive(kind: 'bullet' | 'ordered'): boolean;
|
|
2104
2152
|
/** Select the whole document. */
|
|
2105
2153
|
selectAll(): void;
|
|
2106
2154
|
/**
|
|
@@ -2325,6 +2373,16 @@ interface PaginatedSurface {
|
|
|
2325
2373
|
canEditTextFormField(): boolean;
|
|
2326
2374
|
editTextFormField(): boolean;
|
|
2327
2375
|
refreshToc(tocId?: string, mode?: 'entire' | 'pageNumbers'): boolean;
|
|
2376
|
+
/**
|
|
2377
|
+
* Why the addressed (or right-clicked, or caret-local) body TOC cannot be removed now, or
|
|
2378
|
+
* null when it can: `notFound` when there is none, `unsupported` with the reason otherwise.
|
|
2379
|
+
*/
|
|
2380
|
+
removeTocRefusal(tocId?: string): TocRemovalRefusal | null;
|
|
2381
|
+
/**
|
|
2382
|
+
* Remove a body TOC: its field, or the table of contents control around it with its
|
|
2383
|
+
* heading. Text before and after the field stays. One undo step. Refused while suggesting.
|
|
2384
|
+
*/
|
|
2385
|
+
removeToc(tocId?: string): boolean;
|
|
2328
2386
|
/**
|
|
2329
2387
|
* Rewrite stale REF field results in the body, footnote and endnote stories so a save
|
|
2330
2388
|
* exports what the pages paint. Fresh results commit nothing (no transaction, no revision
|
|
@@ -2641,7 +2699,7 @@ interface PaginatedSurface {
|
|
|
2641
2699
|
*
|
|
2642
2700
|
* @public
|
|
2643
2701
|
*/
|
|
2644
|
-
setTableInteractionLabel(resolver: (key:
|
|
2702
|
+
setTableInteractionLabel(resolver: (key: TableInteractionLabelKey) => string): void;
|
|
2645
2703
|
/**
|
|
2646
2704
|
* Move the painted pages into `container`, which may belong to another document: a pop-out
|
|
2647
2705
|
* window or an iframe. The session, undo history, selection and collaboration replica stay
|
|
@@ -3909,8 +3967,7 @@ declare const DEFAULT_TABLE_CHROME_DRAFT: TableChromeDraft;
|
|
|
3909
3967
|
type TableChromeSlotId = 'table.borderTarget' | 'table.borderColor' | 'table.borderStyle' | 'table.borderWidth' | 'table.cellFill';
|
|
3910
3968
|
/** Every {@link TableChromeSlotId}, for iteration and for {@link isTableChromeSlot}. */
|
|
3911
3969
|
declare const TABLE_CHROME_SLOT_IDS: readonly TableChromeSlotId[];
|
|
3912
|
-
|
|
3913
|
-
type TableInteractionLabelKey = 'table.insertRowBelow' | 'table.insertColumnRight';
|
|
3970
|
+
|
|
3914
3971
|
/**
|
|
3915
3972
|
* The English label for a furniture-insertion control.
|
|
3916
3973
|
*
|
|
@@ -4007,15 +4064,9 @@ declare function commandExecOptions(value: unknown): EditorExecOptions | undefin
|
|
|
4007
4064
|
* command needs an argument the slot itself cannot supply.
|
|
4008
4065
|
*
|
|
4009
4066
|
* `text.link` is the case: whether this selection could become a link is the engine's
|
|
4010
|
-
* question, but WHICH link is a URL field's.
|
|
4011
|
-
*
|
|
4012
|
-
*
|
|
4013
|
-
* DELIBERATELY NOT in `SLOT_COMMANDS`. Enabled state has one source, and putting the probe
|
|
4014
|
-
* there would enable the control in EVERY adapter — including Vue, which has grown no link
|
|
4015
|
-
* UI, where the result is an enabled button whose click can only be refused. A dead button
|
|
4016
|
-
* is the worse lie: `file.save` was a disabled control for a capability that works, and this
|
|
4017
|
-
* would be an enabled control for one that is not reachable. Vue's slot therefore keeps
|
|
4018
|
-
* reporting the honest "not wired to an editor command" until its popover lands.
|
|
4067
|
+
* question, but WHICH link is a URL field's. `toolbarCommandState` answers the slot from
|
|
4068
|
+
* this probe and from whether a link UI is registered, and `runToolbarCommand` opens that
|
|
4069
|
+
* UI, so chrome reads the slot like any other.
|
|
4019
4070
|
*
|
|
4020
4071
|
* @public
|
|
4021
4072
|
*/
|
|
@@ -4299,5 +4350,5 @@ interface ChromePrintJob {
|
|
|
4299
4350
|
*/
|
|
4300
4351
|
declare function runChromePrint(editor: Pick<Editor, 'save'> & Partial<Pick<Editor, 'snapshot'>>, handlers?: ChromeExportHandlers, container?: Document | Element): Promise<ChromePrintJob>;
|
|
4301
4352
|
|
|
4302
|
-
export { bindHistoryGroup as $, CHROME_GROUPS as C, blankDocumentBytes as a0, chromeMenuSlots as a1, commandForSlot as a2, commandForSlotValue as a3, createDocxEditor as a4, createFontSource as a5, customFonts as a6, deferFonts as a7, isChromePrintShortcut as a8, loadFonts as a9, IMAGE_OVERLAY_NUDGE_SHIFT_PT as aA, TABLE_BORDER_STYLE_OPTIONS as
|
|
4303
|
-
export type { AttachOptions as A, BlankDocumentOptions as B, DocxEditorConfig as D, EquationActivation as E, EquationChromeHandlers as F, FontLoadFailure as G, FontLoadFailureReason as H, FontMeasurementState as I, FontUrlSource as J, GoToChromeHandlers as K, HistoryGroupBinding as L, HistoryGroupBindingOptions as M, HyperlinkActivation as N, HyperlinkChromeHandlers as O, InvalidTextFormFieldChromeHandlers as P, InvalidTextFormFieldSession as Q, LoadFontsRequest as R, LoadFontsResult as S, LockedControlNavigation as T, PopupChromeRegistrationOptions as U, SurfaceEquation as V, SurfaceHyperlink as W, TableChromeSlotId as X, ToolbarCommandState as Y, ToolbarValueMap as Z, ToolbarValueSlot as _, BookmarkChromeHandlers as a,
|
|
4353
|
+
export { bindHistoryGroup as $, CHROME_GROUPS as C, blankDocumentBytes as a0, chromeMenuSlots as a1, commandForSlot as a2, commandForSlotValue as a3, createDocxEditor as a4, createFontSource as a5, customFonts as a6, deferFonts as a7, isChromePrintShortcut as a8, loadFonts as a9, IMAGE_OVERLAY_NUDGE_SHIFT_PT as aA, TABLE_BORDER_STYLE_OPTIONS as aV, TABLE_BORDER_TARGET_OPTIONS as aW, TABLE_BORDER_WIDTH_OPTIONS as aX, TABLE_CHROME_SLOT_IDS as aY, runChromeExport as aa, runChromePrint as ab, runToolbarCommand as ac, toolbarCommandState as ad, CHROME_UNAVAILABLE_KEY as al, DEFAULT_TABLE_CHROME_DRAFT as ar, EMU_PER_POINT as at, IMAGE_OVERLAY_NUDGE_PT as az, applyTableChromePick as b7, canExecuteImageCommand as b8, captureImageMutationPreconditions as b9, runSave as bA, runTableChromeCommand as bB, runTableCommand as bC, selectedDrawingOverlayTargetOf as bD, selectedImageStateOf as bE, surfacePaintScale as bF, tableChromeIconPaths as bG, tableChromeLabelKeyForTarget as bH, tableChromeToolbarState as bI, tableChromeVisible as bJ, tableCommandToolbarState as bK, toolbarCommandStates as bL, chromeControlCount as ba, chromeProbeForSlot as bb, chromeSlotId as bc, chromeSlotIsToggle as bd, commandExecOptions as be, commandForTableChromeSlotValue as bf, computeImageResizeResult as bg, computeMovedImagePosition as bh, computeResizedImageExtentEmu as bi, createImageOverlayScrollPort as bj, cssPixelsToLayoutPoints as bk, defaultChromeGroups as bl, defaultTableLabel as bm, emuToOverlayPoints as bn, equationAtPosition as bo, executeImageCommand as bp, finalizeImageOverlayInteraction as bq, formattingBarChromeGroups as br, isStaleImageInteractionCommit as bs, isTableChromeSlot as bt, layoutPointsToCssPixels as bu, overlayFrameToSheetCssPixels as bv, overlayHostOrigin as bw, pointsToEmu as bx, probeTableChromeCommand as by, resizePreservesAspect as bz, CHROME_MENUS as d, ChromeExportError as e, ChromePrintError as p };
|
|
4354
|
+
export type { AttachOptions as A, BlankDocumentOptions as B, DocxEditorConfig as D, EquationActivation as E, EquationChromeHandlers as F, FontLoadFailure as G, FontLoadFailureReason as H, FontMeasurementState as I, FontUrlSource as J, GoToChromeHandlers as K, HistoryGroupBinding as L, HistoryGroupBindingOptions as M, HyperlinkActivation as N, HyperlinkChromeHandlers as O, InvalidTextFormFieldChromeHandlers as P, InvalidTextFormFieldSession as Q, LoadFontsRequest as R, LoadFontsResult as S, LockedControlNavigation as T, PopupChromeRegistrationOptions as U, SurfaceEquation as V, SurfaceHyperlink as W, TableChromeSlotId as X, ToolbarCommandState as Y, ToolbarValueMap as Z, ToolbarValueSlot as _, BookmarkChromeHandlers as a, TableBorderTargetValue as a$, ImageInteractionSession as aB, ImageOverlayScrollPort as aC, ImageResizeHandle as aD, ImageResizeResult as aE, OpeningIndicatorHost as aF, OverlayFrameRect as aG, PaginatedSurfaceState as aH, ParagraphPropertyEdit as aI, RemoteCaretLabelAnchor as aJ, RemoteCaretLabelHost as aK, ReviewWriteIntent as aL, RunTableChromeCommandResult as aM, SectionAnchor as aN, SectionBreakInsertType as aO, SelectedDrawingOverlayTarget as aP, SurfaceIndentAndListOps as aQ, SurfaceInsertImageInput as aR, SurfaceNavigation as aS, SurfaceOverlayCoordinates as aT, SurfaceParagraphFormat as aU, TableBorderStyleOption as aZ, TableBorderTargetOption as a_, PaginatedSurfaceOptions as ae, OpenPaginatedResult as af, PaginatedSurface as ag, TableCommandPlan as ah, SurfaceFormatting as ai, AnchorFrameOrigin as aj, BookmarkMarkOptionsSource as ak, ChromeControl as am, ChromeControlId as an, ChromeControlState as ao, ChromeGroup as ap, ChromeGroupId as aq, DrawingSelectionIntent as as, EditorCommandExecute as au, EquationOps as av, FinalizedImageOverlayInteraction as aw, FormattingBarOptions as ax, HyperlinkOps as ay, BookmarkMarkInfo as b, TableBorderWidthOption as b0, TableChromeDraft as b1, TableChromePick as b2, TextFormFieldChromeHandlers as b3, TextFormFieldDialogSession as b4, TocRemovalRefusal as b5, ToolbarSlotValue as b6, BookmarkMarkOptions as c, ChromeExportFormat as f, ChromeExportHandlers as g, ChromeExportResult as h, ChromeExportView as i, ChromeMenu as j, ChromeMenuEntry as k, ChromeMenuId as l, ChromeMenuItemEntry as m, ChromeMenuSeparatorEntry as n, ChromeMenuSubmenuEntry as o, ChromePrintErrorCode as q, ChromePrintJob as r, ChromePrintOptions as s, ChromeSlotId as t, CommentDraftChromeHandlers as u, ContentControlWidgetChromeHandlers as v, ContentControlWidgetSession as w, CustomFontsOptions as x, CustomFontsResolver as y, DocxEditorInstance as z };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkA5BTVPET_cjs=require('./chunk-A5BTVPET.cjs');var K=new Set(["document","hdr","ftr","footnotes","endnotes"]),rr=24,H=512,z=chunkA5BTVPET_cjs.Eb(rr);function G(t){let n=t.root;return n.namespaceUri===chunkA5BTVPET_cjs.pa&&K.has(n.localName)}function tr(t){let n=[],e=r=>{if(r.kind!=="textValue"){r.namespaceUri===chunkA5BTVPET_cjs.pa&&r.localName==="p"&&n.push(r);for(let a of r.children)e(a);}};return e(t.root),n}function X(t){let n=chunkA5BTVPET_cjs.Ob(t);let e=[],r=new Set;for(let a of tr(n)){let i=chunkA5BTVPET_cjs.Gb(a);if(!i||!chunkA5BTVPET_cjs.Fb(i))continue;let o=i.toUpperCase();if(r.has(o))continue;r.add(o);let l=chunkA5BTVPET_cjs.Dm(n,a.id);l!==null&&e.push(Object.freeze({paragraphId:o,nodeId:a.id,text:l}));}return Object.freeze(e)}function er(t){let n=z.get(t.root);if(n)return n;let e=W(t,"byParagraphId");return z.set(t.root,e),e}function W(t,n){let e=chunkA5BTVPET_cjs.Ob(t);let r=new Map,a=new Set,i=o=>{if(o.kind!=="textValue"){if(o.namespaceUri===chunkA5BTVPET_cjs.pa&&o.localName==="p"){let l=chunkA5BTVPET_cjs.Gb(o);if(l&&chunkA5BTVPET_cjs.Fb(l)){let s=l.toUpperCase();a.has(s)||(a.add(s),o.kind==="paragraph"&&(n==="byParagraphId"?r.set(s,o.id):r.set(o.id,s)));}}for(let l of o.children)i(l);}};return i(e.root),r}function V(t,n){if(t.length!==n.length)return false;for(let e=0;e<t.length;e+=1)if(t[e].root!==n[e])return false;return true}function $(t){let n=new Map,e=null,r=(o,l,s)=>{for(n.delete(o),n.set(o,{partName:l.name,root:l.root,nodeId:s});n.size>H;){let d=n.keys().next();if(d.done)break;n.delete(d.value);}},a=(o,l)=>{let s=n.get(o);if(!s)return null;let d=l.find(k=>k.name===s.partName);if(!d)return null;if(d.root===s.root)return {part:d,nodeId:s.nodeId};let u=chunkA5BTVPET_cjs.cb(d,s.nodeId);if(!u||u.kind!=="paragraph")return null;let x=chunkA5BTVPET_cjs.Gb(u);return !x||x.toUpperCase()!==o?null:(r(o,d,s.nodeId),{part:d,nodeId:s.nodeId})};return Object.assign(o=>{let l=t(),s=a(o,l);if(s)return s;if(e&&e.ids.has(o)&&V(l,e.roots))return null;for(let d of l){let u=er(d).get(o);if(u!==void 0)return r(o,d,u),{part:d,nodeId:u}}return (!e||!V(l,e.roots))&&(e={roots:l.map(d=>d.root),ids:new Set}),e.ids.size<H&&e.ids.add(o),null},{forgetIds(o){for(let{paragraphId:l,nodeId:s}of o)n.get(l)?.nodeId!==s&&n.delete(l);},forgetAll(){n.clear();},hasHints(){return n.size>0}})}function Y(t,n,e){if(!t.hasHints())return;let r=[...e.dirty,...e.created];if(e.impact!=="text-local"||r.length===0)return t.forgetAll();let a=[];for(let i of r){let o=n.find(d=>i.startsWith(`${d.name}#`)),l=o?chunkA5BTVPET_cjs.cb(o,i):null,s=l?.kind==="paragraph"?chunkA5BTVPET_cjs.Gb(l):null;if(!s)return t.forgetAll();a.push({paragraphId:s.toUpperCase(),nodeId:i});}t.forgetIds(a);}function q(t){let n=null;return e=>{let r=t();n?.root!==r.root&&(n={root:r.root,byNodeId:W(r,"byNodeId")});let a=n.byNodeId.get(e);if(a===void 0)return null;let i=chunkA5BTVPET_cjs.Dm(r,e);return i===null?null:Object.freeze({paragraphId:a,nodeId:e,text:i})}}function Z(t,n){return chunkA5BTVPET_cjs.Ua(t,n)}var or=Object.freeze({kind:"body"}),ar=1e6;function A(t,n){if(n<=0||n>=t.length)return false;let e=t.charCodeAt(n-1),r=t.charCodeAt(n);return e>=55296&&e<=56319&&r>=56320&&r<=57343}function ir(t,n,e){if(n===e)return [];let r=0,a=Math.min(n.length,e.length);for(;r<a&&n.charCodeAt(r)===e.charCodeAt(r);)r+=1;for(;r>0&&(A(n,r)||A(e,r));)r-=1;let i=0;for(;i<n.length-r&&i<e.length-r&&n.charCodeAt(n.length-i-1)===e.charCodeAt(e.length-i-1);)i+=1;for(;i>0&&(A(n,n.length-i)||A(e,e.length-i));)i-=1;let o=n.length-r-i,l=e.slice(r,e.length-i),s=[];return o>0&&s.push({op:"deleteText",paragraphId:t,start:r,end:r+o}),l.length>0&&s.push({op:"insertText",paragraphId:t,offset:r,text:l}),Object.freeze(s)}function lr(t){let n=r=>!!r&&r.kind!=="textValue"&&r.namespaceUri===chunkA5BTVPET_cjs.pa&&r.localName==="t"&&r.attributes.every(a=>a.namespaceUri===chunkA5BTVPET_cjs.qa&&a.localName==="space")&&r.children.every(a=>a.kind==="textValue"),e=[];for(let r of t){let a=e.at(-1);if(!n(a)||!n(r)){e.push(r);continue}let i=a.children.map(o=>o.kind==="textValue"?o.value:"").join("")+r.children.map(o=>o.kind==="textValue"?o.value:"").join("");e[e.length-1]={...a,attributes:/^\s|\s$/.test(i)?[{kind:"xmlSpace",namespaceUri:chunkA5BTVPET_cjs.qa,localName:"space",prefix:"xml",value:"preserve"}]:[],children:[{id:a.children[0]?.id??`${a.id}/text`,kind:"textValue",value:i}]};}return e}function F(t){if(t.kind==="textValue")return t;let n=false,e=t.children.map(r=>{let a=F(r);return a!==r&&(n=true),a});if(t.namespaceUri===chunkA5BTVPET_cjs.pa&&t.localName==="r"){let r=lr(e);(r.length!==e.length||r.some((a,i)=>a!==e[i]))&&(e=[...r],n=true);}return n?{...t,children:e}:t}function sr(t,n,e){let r=t.parts.get(n);if(!r)return t;let a=false,i=new Set;for(let o of e)(o.op==="insertText"||o.op==="deleteText")&&!o.revision&&i.add(o.paragraphId);for(let o of i){let l=chunkA5BTVPET_cjs.cb(r,o);if(!l||l.kind==="textValue")continue;let s=F(l);if(s===l)continue;let d=chunkA5BTVPET_cjs.ib(r,o,s,{deferValidation:true});d.ok&&(r=d.part,a=true);}return a?chunkA5BTVPET_cjs.kg(t,r):t}function dr(t,n){let e=n.documentId.trim();if(e.length===0||e.length>256)throw new TypeError("documentId must contain 1 to 256 characters");let r=()=>X(t.bodyStore().part),a,i=()=>{let p=t.bodyStore().part,c=t.currentPackage();if(a?.pkg===c&&a.body===p)return a.parts;let g=[p];for(let m of c.parts.values())m===p||!G(m)||g.push(m);return a={pkg:c,body:p,parts:Object.freeze(g)},a.parts},o=$(i),l=t.packageRevision,s=t.lastModelChange,d=()=>{let p=t.packageRevision,c=t.lastModelChange;p===l&&c===s||(p===l+1&&c!==null&&c!==s?Y(o,i(),c):o.forgetAll(),l=p,s=c);},u=q(()=>t.bodyStore().part),x=(p,c)=>{if(p.length===0)return {ok:true,changed:false};let g=r(),m=new Set,O=[];for(let h of p){if(typeof h.text!="string"||h.text.length>ar)return {ok:false,reason:"collaboration-text-limit"};if(typeof h.paragraphId!="string"||h.paragraphId.length===0||h.paragraphId.length>256)return {ok:false,reason:"unknown-paragraph-id"};let f=h.paragraphId.toUpperCase();if(m.has(f))return {ok:false,reason:"duplicate-paragraph-id"};m.add(f);let D=g.filter(Q=>Q.paragraphId===f);if(D.length!==1)return {ok:false,reason:"unknown-paragraph-id"};let w=D[0];O.push(...ir(w.nodeId,w.text,h.text));}if(O.length===0)return {ok:true,changed:false};let v=t.transact(or,h=>{for(let f of O)h.apply(f);h.applyPackage(f=>sr(f,f.mainDocumentPart,O));},{origin:c.origin,actorId:c.actorId,operationId:c.operationId,recordsHistory:false});return v.ok?{ok:true,changed:v.change!==null}:{ok:false,reason:v.detail??v.reason}},k={documentId:e,interactive:n.interactive===true,paragraphs:r,paragraphByNodeId:u,paragraphTextOf(p){for(let c of i()){let g=chunkA5BTVPET_cjs.Dm(c,p);if(g!==null)return g}return null},paragraphByStableId(p){let c=p.toUpperCase();d();let g=o(c);if(!g)return null;let m=chunkA5BTVPET_cjs.Dm(g.part,g.nodeId);return m===null?null:Object.freeze({paragraphId:c,nodeId:g.nodeId,text:m})},applyParagraphText(p,c,g){return x([{paragraphId:p,text:c}],g)},applyParagraphTexts:x,applyRemotePackage(p,c){let g=t.publishRemotePackage(p,c);return g.ok?{ok:true,changed:g.change!==null}:{ok:false,reason:g.detail??g.reason}},revision:()=>t.packageRevision,subscribe:p=>t.subscribe(p),observePrimitiveJournal:p=>Z(t,p),hasPendingJournals:()=>chunkA5BTVPET_cjs.Ra(t),flushPendingJournals:()=>{chunkA5BTVPET_cjs.Sa(t);},save:()=>chunkA5BTVPET_cjs.ig(t.currentPackage()),binaryPart(p){let c=t.currentPackage();return c.partBytes.get(p)??c.partBytes.get(p.startsWith("/")?p.slice(1):`/${p}`)??null}};return Object.freeze(k)}function pr(t,n,e){if(n===e||t>n.length)return Math.min(t,e.length);let r=0;for(;r<n.length&&r<e.length&&n[r]===e[r];)r+=1;let a=0;for(;a<n.length-r&&a<e.length-r&&n[n.length-1-a]===e[e.length-1-a];)a+=1;if(t<=r)return Math.min(t,e.length);if(t>n.length-a)return Math.min(e.length,t+e.length-n.length);let i=ur(n,e,r,a),o=i.offsets.get(t);return o===void 0&&(o=(i.table?mr(i.table,t,n,e,r):null)??yr(t,n,e,r,a)??r,i.offsets.set(t,o)),o}var b=[],cr=16;function ur(t,n,e,r){let a=b.findIndex(o=>o.before===t&&o.after===n);if(a>=0){let[o]=b.splice(a,1);return b.push(o),o}let i={before:t,after:n,table:hr(t,n,e,r),offsets:new Map};return b.length>=cr&&b.shift(),b.push(i),i}var gr=1<<18;function hr(t,n,e,r){let a=t.length-r-e,i=n.length-r-e;if(a*i>gr)return null;let o=i+1,l=new Uint32Array((a+1)*o);for(let s=a-1;s>=0;s-=1)for(let d=i-1;d>=0;d-=1)l[s*o+d]=t[e+s]===n[e+d]?l[(s+1)*o+d+1]+1:Math.max(l[(s+1)*o+d],l[s*o+d+1]);return {lengths:l,width:o,columns:i}}function mr(t,n,e,r,a){let{lengths:i,width:o,columns:l}=t,s=n-a,d=0,u=0;for(;d<s;)u<l&&e[a+d]===r[a+u]?(d+=1,u+=1):u>=l||i[(d+1)*o+u]>=i[d*o+u+1]?d+=1:u+=1;return a+u}var fr=[32,16,8,4];function yr(t,n,e,r,a){let i=e.slice(r,e.length-a),o=l=>{let s=i.indexOf(l);return s>=0&&i.indexOf(l,s+1)<0?s:null};for(let l of fr){let s=n.slice(Math.max(r,t-l),t);if(s.length===l){let u=o(s);if(u!==null)return r+u+s.length}let d=n.slice(t,Math.min(n.length-a,t+l));if(d.length===l){let u=o(d);if(u!==null)return r+u}}return null}exports.a=sr;exports.b=dr;exports.c=pr;
|