@docx-editor.dev/core 2.30.0 → 2.32.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/README.md +24 -0
- package/dist/automation.cjs +1 -1
- package/dist/automation.d.ts +18 -27
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.ts +17 -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-CznJ0ucN.d.ts} +361 -41
- package/dist/chunk-25EXMBV2.cjs +5 -0
- package/dist/chunk-2CWQY27B.cjs +1 -0
- package/dist/chunk-3IEXDEFH.cjs +7 -0
- package/dist/chunk-65XBN67F.cjs +2 -0
- package/dist/chunk-6NVZNB7O.cjs +3 -0
- package/dist/chunk-6UDJUI3W.cjs +2 -0
- package/dist/chunk-ACLR4DMK.js +1 -0
- package/dist/{chunk-RJCQGJR7.js → chunk-B2BEELUE.js} +1 -1
- package/dist/chunk-DDFHKQFU.js +30 -0
- package/dist/chunk-E4IAO4CY.cjs +2 -0
- package/dist/chunk-ETDZFNMI.js +2 -0
- package/dist/chunk-FDSL5OJU.cjs +30 -0
- package/dist/chunk-FS7CMYLT.js +4 -0
- package/dist/chunk-GDS24SZN.js +30 -0
- package/dist/chunk-GIY6NT2X.js +5 -0
- package/dist/chunk-GWM3AKUD.js +18 -0
- package/dist/chunk-HDOXACHP.js +2 -0
- package/dist/chunk-IILEENID.js +1 -0
- package/dist/chunk-L5TYBFDB.js +1 -0
- package/dist/chunk-MNF2K7NN.cjs +30 -0
- package/dist/chunk-O324RB6R.cjs +1 -0
- package/dist/chunk-OKMEMSKB.cjs +1 -0
- package/dist/chunk-QXJKYNYZ.js +1 -0
- package/dist/chunk-RALTVLB6.js +2 -0
- package/dist/chunk-SRVKFUFI.js +3 -0
- package/dist/chunk-TELQ52LG.cjs +1 -0
- package/dist/chunk-TJHE5EET.cjs +1 -0
- package/dist/chunk-UMMRURPE.js +7 -0
- package/dist/chunk-WN7ICTA5.js +1 -0
- package/dist/{chunk-FLBEJC6X.cjs → chunk-XJYZVGQR.cjs} +1 -1
- package/dist/chunk-ZGTIE3QJ.cjs +4 -0
- package/dist/chunk-ZOZI27AW.cjs +18 -0
- package/dist/collaboration/replication.cjs +1 -1
- package/dist/collaboration/replication.d.ts +20 -5
- package/dist/collaboration/replication.js +1 -1
- package/dist/collaboration.cjs +1 -1
- package/dist/collaboration.d.ts +5 -6
- package/dist/collaboration.js +1 -1
- package/dist/contracts/document.d.ts +3 -3
- package/dist/contracts/editor.d.ts +13 -10
- package/dist/contracts/interaction.d.ts +2 -2
- package/dist/contracts/modules.d.ts +15 -13
- package/dist/contracts/types.d.ts +135 -2
- package/dist/{custom-node-writes-0v0Kgw1T.d.ts → custom-node-writes-CLJKGD9t.d.ts} +7 -2
- package/dist/{diagnostic-context-CcAO4q1s.d.ts → diagnostic-context-BtDUY3v2.d.ts} +3 -2
- package/dist/{diagnostic-hints-2Bke6H_w.d.ts → diagnostic-hints-DK8-V0fk.d.ts} +2 -2
- package/dist/{document-protection-8eyMWIJ0.d.ts → document-protection-NaniLHWF.d.ts} +1 -1
- package/dist/{editor-DaEJd2so.d.ts → editor-DZwOTmlR.d.ts} +386 -279
- package/dist/editor-fonts-D_-vjuJi.d.ts +53 -0
- package/dist/{editor-scope-7o9xweiJ.d.ts → editor-scope-B3L-1ALc.d.ts} +57 -4
- package/dist/editor.cjs +1 -1
- package/dist/editor.css +6 -4
- package/dist/editor.d.ts +646 -31
- package/dist/editor.js +1 -1
- package/dist/export.cjs +2 -2
- package/dist/export.d.ts +9 -16
- package/dist/export.js +2 -2
- package/dist/{failure-NS2lsya4.d.ts → failure-6KGFrDO9.d.ts} +1 -1
- package/dist/{font-resolver-CL9BVKZo.d.ts → font-resolver-BlQNGdvR.d.ts} +1 -1
- package/dist/{headless-document-view-DZQN8Bnx.d.ts → headless-document-view-Bcz9_Qva.d.ts} +115 -4
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +27 -26
- package/dist/index.js +1 -1
- package/dist/{layout-shaping-cEnVrhWg.d.ts → layout-shaping-E5J4Z1Gf.d.ts} +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.ts +95 -23
- package/dist/layout.js +1 -1
- package/dist/{note-properties-9FH8zAeG.d.ts → note-properties-Ds5R2_3F.d.ts} +1 -1
- package/dist/output.cjs +1 -1
- package/dist/output.d.ts +24 -10
- package/dist/output.js +1 -1
- package/dist/{protocol-CZ1uUlPO.d.ts → protocol-DKa4qt7F.d.ts} +167 -5
- package/dist/{review-paragraph-order-CqVelc5A.d.ts → review-paragraph-order-Dc17w_6v.d.ts} +1 -1
- package/dist/revision-projection-Cn6rZJ7H.d.ts +258 -0
- package/dist/{semantic-cell-selection-Dr9yxFZt.d.ts → semantic-cell-selection-BaUR0iJ4.d.ts} +2 -2
- package/dist/{semantic-interaction-Dc3pf3hr.d.ts → semantic-interaction-CJoHLoOl.d.ts} +1 -1
- package/dist/{semantic-paint-Bz3FBAoH.d.ts → semantic-paint-BPw_n0li.d.ts} +7 -4
- package/dist/{semantic-record-queries-Bx0pl6kL.d.ts → semantic-record-queries-C0rJ3sB4.d.ts} +1 -1
- package/dist/{semantic-records-CjcF26ZL.d.ts → semantic-records-BvN-WWst.d.ts} +365 -512
- package/dist/store.cjs +1 -1
- package/dist/store.d.ts +47 -22
- package/dist/store.js +1 -1
- package/dist/{types-barrel-CA0xB8kH.d.ts → tree-op-types-C_S2niXW.d.ts} +1239 -747
- package/dist/{tree-package-store-DKhdEVym.d.ts → tree-package-store-CRHvMyNj.d.ts} +676 -646
- package/dist/{tree-session-contract-CwnTEVLF.d.ts → tree-session-contract-D1awo_dA.d.ts} +26 -13
- package/dist/unsupported-elements-CVos5cqe.d.ts +23 -0
- package/docs/accept-reject-without-scrolling.md +95 -0
- package/docs/comment-on-found-text.md +72 -0
- package/docs/custom-review-cards.md +178 -0
- package/docs/highlight-ranges.md +48 -0
- package/docs/index.md +36 -0
- package/docs/propose-rewrite.md +247 -0
- package/docs/tracked-replacement.md +68 -0
- package/package.json +3 -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-5RRAZMBU.cjs +0 -1
- package/dist/chunk-5SPITS5F.js +0 -18
- package/dist/chunk-6JIJOZDW.js +0 -1
- package/dist/chunk-7ATNKARV.js +0 -2
- package/dist/chunk-BGCUTKWE.cjs +0 -5
- package/dist/chunk-BTQKU64Q.cjs +0 -1
- package/dist/chunk-EBCXSH2W.js +0 -3
- package/dist/chunk-ERECKTIR.cjs +0 -2
- package/dist/chunk-HYASLE2G.cjs +0 -1
- package/dist/chunk-JC47NRJC.cjs +0 -3
- package/dist/chunk-KJRTNY2Q.cjs +0 -2
- 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-T32MGBJS.js +0 -1
- package/dist/chunk-UM26GH5B.js +0 -30
- package/dist/chunk-VRCZBFLH.js +0 -27
- package/dist/chunk-WF7JZ755.cjs +0 -1
- package/dist/chunk-WK5X2MMA.cjs +0 -7
- package/dist/chunk-WPDD2Y32.js +0 -2
- package/dist/chunk-YBMWBXST.cjs +0 -2
- package/dist/chunk-YZGUBCHP.js +0 -1
- package/dist/chunk-ZOS2PM4A.js +0 -4
- package/dist/image-resources-Bipz8toD.d.ts +0 -211
- package/dist/omml-equation-DP2WpUbK.d.ts +0 -97
package/README.md
CHANGED
|
@@ -114,6 +114,30 @@ Treat DOCX files as untrusted input. The engine validates URLs and limits XML en
|
|
|
114
114
|
|
|
115
115
|
Anything you render from document data (a font name, a hyperlink target, a comment body) is still attacker-controlled at your boundary. Render it as text; do not build markup or URLs from it.
|
|
116
116
|
|
|
117
|
+
## Which API for which job
|
|
118
|
+
|
|
119
|
+
| Job | Use |
|
|
120
|
+
| --- | --- |
|
|
121
|
+
| Build a review UI in the browser | The React or Vue adapter hooks, plus the review hooks and `DocxEditorReview` from `@docx-editor.dev/pro/react` or `@docx-editor.dev/pro/vue`. |
|
|
122
|
+
| Edit in a headless, server, or agent pipeline | The editing API in `@docx-editor.dev/editor-api`, which follows the Office.js object model. |
|
|
123
|
+
|
|
124
|
+
| Task | Browser host (React or Vue) | Headless, server, or agent |
|
|
125
|
+
| --- | --- | --- |
|
|
126
|
+
| [Comment on found text](https://www.docx-editor.dev/docs/2.x/recipes/comment-on-found-text) | `editor.findMatches`, `editor.selectMatch`, then `useReview().comment` | `body.search`, then `Range.insertComment` |
|
|
127
|
+
| Reply to a thread | `useReview().reply(item, text)` | `Comment.reply(text)` |
|
|
128
|
+
| [Record a tracked replacement](https://www.docx-editor.dev/docs/2.x/recipes/tracked-replacement) | Suggesting mode, then `editor.exec({ type: 'replaceMatch', match, text })` | `document.changeTrackingMode = 'TrackMineOnly'`, then `Range.insertText(text, 'Replace')` |
|
|
129
|
+
| [Propose an AI rewrite as tracked changes](https://www.docx-editor.dev/docs/2.x/recipes/propose-rewrite) | The same code through `DocxEditor.createBrowser` from `@docx-editor.dev/editor-api/browser` | `prepareRewrite` from `@docx-editor.dev/editor-api/agent` |
|
|
130
|
+
| [Accept or reject a change](https://www.docx-editor.dev/docs/2.x/recipes/accept-reject-without-scrolling) | `useReview().accept(item)` or `useReview().reject(item)` | `Revision.accept()` or `Revision.reject()` |
|
|
131
|
+
| [Open or reveal a change without scrolling](https://www.docx-editor.dev/docs/2.x/recipes/accept-reject-without-scrolling) | `useReview().setActive(key, { reveal: false })` | Not applicable: no viewport |
|
|
132
|
+
| [Highlight ranges](https://www.docx-editor.dev/docs/2.x/recipes/highlight-ranges) | `useHighlights(name, source, options)` | Not applicable |
|
|
133
|
+
| [Custom review rail cards](https://www.docx-editor.dev/docs/2.x/recipes/custom-review-cards) | `DocxEditorReview` with `preset` set to `false`, `useReview().items`, `useStackedReviewPositions`, and `useReviewRailMetrics` | Not applicable |
|
|
134
|
+
| Comment-on-selection button | `DocxEditorReview.AddComment` as a direct child of `DocxEditorReview`, or `useEditorCommand('review.addComment')` | Not applicable |
|
|
135
|
+
| Page setup and paragraph dialogs from a custom toolbar | `DocxEditor.PageSetupDialog` or `DocxEditor.ParagraphDialog` with `open` and a close handler (`onClose` in React, `@close` in Vue); enable the button from `usePageSetup().isEnabled` or `useParagraphFormat().isEnabled` | `Section.pageSetup`, and `Paragraph` properties such as `alignment` |
|
|
136
|
+
|
|
137
|
+
The review hooks need `reviewModule()` from `@docx-editor.dev/pro` in the editor's modules, and an editor `author` for comments and tracked changes. The editing API takes its author from the `author` option of `DocxEditor.createServer`, imported from `@docx-editor.dev/editor-api`, or of `DocxEditor.createBrowser`, imported from `@docx-editor.dev/editor-api/browser`.
|
|
138
|
+
|
|
139
|
+
This package ships the task recipes in [`docs/index.md`](./docs/index.md). They are also on the site: [Task recipes](https://www.docx-editor.dev/docs/2.x/recipes).
|
|
140
|
+
|
|
117
141
|
## Documentation
|
|
118
142
|
|
|
119
143
|
- [Core overview](https://www.docx-editor.dev/docs/2.x/core)
|
package/dist/automation.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunk3IEXDEFH_cjs=require('./chunk-3IEXDEFH.cjs');require('./chunk-TELQ52LG.cjs'),require('./chunk-FDSL5OJU.cjs'),require('./chunk-6UDJUI3W.cjs'),require('./chunk-OKMEMSKB.cjs'),require('./chunk-TJHE5EET.cjs'),require('./chunk-65XBN67F.cjs'),require('./chunk-O324RB6R.cjs'),require('./chunk-ZOZI27AW.cjs');Object.defineProperty(exports,"AUTOMATION_COMMAND_OPERATIONS",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.f}});Object.defineProperty(exports,"AUTOMATION_QUERY_OPERATIONS",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.e}});Object.defineProperty(exports,"AUTOMATION_SOLITARY_OPERATIONS",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.g}});Object.defineProperty(exports,"HEADER_FOOTER_VARIANTS",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.d}});Object.defineProperty(exports,"SERVER_AUTOMATION_CAPABILITIES",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.o}});Object.defineProperty(exports,"byteSizeBucket",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.w}});Object.defineProperty(exports,"countBucket",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.x}});Object.defineProperty(exports,"createAutomationPaginationProvider",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.m}});Object.defineProperty(exports,"createDiagnosticEmitter",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.y}});Object.defineProperty(exports,"createServerAutomationHost",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.p}});Object.defineProperty(exports,"diagnosticCause",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.A}});Object.defineProperty(exports,"diagnosticCauses",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.z}});Object.defineProperty(exports,"diagnosticCodes",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.s}});Object.defineProperty(exports,"diagnosticErrorName",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.C}});Object.defineProperty(exports,"documentPartKind",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.D}});Object.defineProperty(exports,"exceptionCause",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.B}});Object.defineProperty(exports,"explainDiagnostic",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.r}});Object.defineProperty(exports,"isAutomationCommand",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.i}});Object.defineProperty(exports,"isSolitaryAutomationCommand",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.h}});Object.defineProperty(exports,"openDiagnosticCode",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.t}});Object.defineProperty(exports,"paginationSnapshotOf",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.k}});Object.defineProperty(exports,"reviewDiagnosticCode",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.v}});Object.defineProperty(exports,"storeEditDiagnosticCode",{enumerable:true,get:function(){return chunk3IEXDEFH_cjs.u}});
|
package/dist/automation.d.ts
CHANGED
|
@@ -11,22 +11,21 @@
|
|
|
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
|
|
16
|
-
import { c as HeaderFooterVariant, N as NoteKind, C as ContentLockPolicy } from './tree-package-store-
|
|
17
|
-
import {
|
|
18
|
-
|
|
19
|
-
import {
|
|
20
|
-
|
|
14
|
+
import { A as AutomationOperation, a as AutomationCapabilities, b as AutomationHost } from './protocol-DKa4qt7F.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 AutomationTextProjection, T as AutomationUnsubscribe, U as AutomationValue } from './protocol-DKa4qt7F.js';
|
|
16
|
+
import { c as HeaderFooterVariant, N as NoteKind, C as ContentLockPolicy } from './tree-package-store-CRHvMyNj.js';
|
|
17
|
+
import { aD as OoxmlPackageLimits, aB as OoxmlPackageRejection } from './tree-op-types-C_S2niXW.js';
|
|
18
|
+
export { aE 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-C_S2niXW.js';
|
|
19
|
+
import { T as TextMeasurer, S as SemanticLayout } from './semantic-records-BvN-WWst.js';
|
|
20
|
+
import { H as HeadlessDocumentView } from './headless-document-view-Bcz9_Qva.js';
|
|
21
21
|
import { CollaborationModuleContribution } from './collaboration.js';
|
|
22
|
-
import { B as ByteSizeBucket, b as CountBucket, f as DocumentOpenDiagnosticCode, j as ReviewDiagnosticCode, E as EditDiagnosticCode } from './diagnostic-hints-
|
|
23
|
-
export { C as CollaborationDiagnosticCode, c as CustomNodeDiagnosticCode, d as DiagnosticCode, D as DiagnosticErrorName, e as DiagnosticExplanation, a as DocumentPartKind, g as DocumentSaveDiagnosticCode, F as FailureStage, h as FontDiagnosticCode, i as FormattingChangeKind, H as HistoryDiagnosticCode, P as PerformanceDiagnosticCode, R as ReviewChangeKind, k as ReviewOperation, l as diagnosticCodes, m as explainDiagnostic } from './diagnostic-hints-
|
|
24
|
-
export { a as diagnosticCause, d as diagnosticCauses, b as diagnosticErrorName, c as documentPartKind, e as exceptionCause } from './diagnostic-context-
|
|
25
|
-
|
|
26
|
-
import './
|
|
27
|
-
import './editor-scope-7o9xweiJ.js';
|
|
22
|
+
import { B as ByteSizeBucket, b as CountBucket, f as DocumentOpenDiagnosticCode, j as ReviewDiagnosticCode, E as EditDiagnosticCode } from './diagnostic-hints-DK8-V0fk.js';
|
|
23
|
+
export { C as CollaborationDiagnosticCode, c as CustomNodeDiagnosticCode, d as DiagnosticCode, D as DiagnosticErrorName, e as DiagnosticExplanation, a as DocumentPartKind, g as DocumentSaveDiagnosticCode, F as FailureStage, h as FontDiagnosticCode, i as FormattingChangeKind, H as HistoryDiagnosticCode, P as PerformanceDiagnosticCode, R as ReviewChangeKind, k as ReviewOperation, l as diagnosticCodes, m as explainDiagnostic } from './diagnostic-hints-DK8-V0fk.js';
|
|
24
|
+
export { a as diagnosticCause, d as diagnosticCauses, b as diagnosticErrorName, c as documentPartKind, e as exceptionCause } from './diagnostic-context-BtDUY3v2.js';
|
|
25
|
+
export { c as HistoryGroup, H as HistoryGroupOutcome } from './editor-scope-B3L-1ALc.js';
|
|
26
|
+
import './revision-projection-Cn6rZJ7H.js';
|
|
28
27
|
import './collaboration/replication.js';
|
|
29
|
-
import './failure-
|
|
28
|
+
import './failure-6KGFrDO9.js';
|
|
30
29
|
|
|
31
30
|
/** The variants a section can declare furniture for. */
|
|
32
31
|
declare const HEADER_FOOTER_VARIANTS: readonly HeaderFooterVariant[];
|
|
@@ -63,9 +62,9 @@ type AutomationShapeOwnerStory = {
|
|
|
63
62
|
};
|
|
64
63
|
|
|
65
64
|
/** Operations that read. They never open a transaction. */
|
|
66
|
-
declare const AUTOMATION_QUERY_OPERATIONS: readonly ["getTables", "getTable", "getTableRows", "getTableCells", "getTableCell", "getTableCellProperties", "getTableCellBody", "getFields", "getField", "getInlinePictures", "getInlinePicture", "getShapes", "getShape", "getShapeBody", "getChangeTrackingMode", "getDocument", "getDocumentProperty", "getBody", "getParagraphs", "getRange", "getSpanParagraphs", "getText", "getSpanText", "getParagraphId", "search", "getFont", "getParagraphFormat", "getStyle", "getSections", "getPageSetup", "getFurniture", "getNotes", "getNoteBody", "getNoteText", "getNoteKind", "getLists", "getListId", "getListById", "getListParagraphs", "getParagraphList", "getListLevel", "getHyperlink", "getBookmarks", "getBookmarkName", "getBookmarkRange", "getComments", "getCommentReplies", "getCommentId", "getCommentAuthor", "getCommentDate", "getCommentText", "getCommentRange", "getCommentResolved", "getRevisions", "getRevisionType", "getRevisionAuthor", "getRevisionDate", "getRevisionRange", "getContentControls", "getContentControlById", "getContentControlsByTag", "getContentControlsByTitle", "getContentControlTag", "getContentControlTitle", "getContentControlFileId", "getContentControlSubtype", "getContentControlLock", "getContentControlIsBound", "getContentControlPlaceholderShown", "getContentControlTemporary", "getContentControlText", "getContentControlParagraphs", "getContentControlRange"];
|
|
65
|
+
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"];
|
|
67
66
|
/** Operations that write. Every one of these goes through the single transaction path. */
|
|
68
|
-
declare const AUTOMATION_COMMAND_OPERATIONS: readonly ["removeDocumentInformation", "setDocumentProperties", "insertTableRows", "insertTable", "updateTable", "updateTableCell", "setInlinePicture", "deleteInlinePicture", "insertField", "setFieldCode", "deleteField", "updateFieldResult", "insertInlinePicture", "insertBreak", "setChangeTrackingMode", "proposeInsertion", "proposeDeletion", "proposeReplacement", "insertText", "replaceSpan", "replaceStoryBlocks", "insertParagraph", "splitParagraph", "deleteParagraph", "selectSpan", "selectBookmark", "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
|
+
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"];
|
|
69
68
|
/**
|
|
70
69
|
* Commands that commit as a PACKAGE transaction and therefore share a batch with nothing.
|
|
71
70
|
*
|
|
@@ -165,15 +164,6 @@ interface ServerAutomationHostOptions {
|
|
|
165
164
|
*/
|
|
166
165
|
declare function createServerAutomationHost(bytes: Uint8Array, options?: ServerAutomationHostOptions): ServerAutomationHostResult;
|
|
167
166
|
|
|
168
|
-
/**
|
|
169
|
-
* Anonymous diagnostics, the neutral half: store reasons → public codes, size and count
|
|
170
|
-
* buckets, and one delivery path. The browser editor and the headless automation runtime both
|
|
171
|
-
* build their diagnostics here, so a refusal gets the same public code on either host.
|
|
172
|
-
*
|
|
173
|
-
* Only the RESULT of a lookup leaves the engine. A raw reason can be a sentence, and a package
|
|
174
|
-
* `detail` can name parts of the file, so neither is ever copied into a diagnostic.
|
|
175
|
-
*/
|
|
176
|
-
|
|
177
167
|
/**
|
|
178
168
|
* The public code for a refused open. `too-large` is the one reason two layers share: the
|
|
179
169
|
* archive reports it WITH the limit it crossed, a single XML part reports it without one.
|
|
@@ -184,7 +174,8 @@ declare function openDiagnosticCode(reason: string, limit?: string): DocumentOpe
|
|
|
184
174
|
/**
|
|
185
175
|
* The public code for a store or host refusal reason, or `null` for a reason this table does
|
|
186
176
|
* not know (a sentence, a binding reason). `unsupported-revision:<kind>` counts as
|
|
187
|
-
* `unsupported-revision
|
|
177
|
+
* `unsupported-revision`, except `unsupported-revision:foreign-insertion`, which has its own
|
|
178
|
+
* code.
|
|
188
179
|
*
|
|
189
180
|
* @public
|
|
190
181
|
*/
|
|
@@ -211,4 +202,4 @@ interface DiagnosticEmitter<E> {
|
|
|
211
202
|
declare function createDiagnosticEmitter<E>(listeners: () => Iterable<(event: E) => unknown>, now?: () => number): DiagnosticEmitter<E>;
|
|
212
203
|
|
|
213
204
|
export { AUTOMATION_COMMAND_OPERATIONS, AUTOMATION_QUERY_OPERATIONS, AUTOMATION_SOLITARY_OPERATIONS, AutomationCapabilities, AutomationHost, AutomationOperation, ByteSizeBucket, ContentLockPolicy, CountBucket, DocumentOpenDiagnosticCode, EditDiagnosticCode, HEADER_FOOTER_VARIANTS, ReviewDiagnosticCode, SERVER_AUTOMATION_CAPABILITIES, byteSizeBucket, countBucket, createAutomationPaginationProvider, createDiagnosticEmitter, createServerAutomationHost, isAutomationCommand, isSolitaryAutomationCommand, openDiagnosticCode, paginationSnapshotOf, reviewDiagnosticCode, storeEditDiagnosticCode };
|
|
214
|
-
export type { AutomationPaginationOptions, AutomationPaginationProvider, AutomationPaginationSnapshot, AutomationStoryId, DiagnosticEmitter, DiagnosticPayload, ServerAutomationHostOptions, ServerAutomationHostRejection, ServerAutomationHostResult };
|
|
205
|
+
export type { AutomationPaginationOptions, AutomationPaginationProvider, AutomationPaginationSnapshot, AutomationShapeOwnerStory, AutomationStoryId, DiagnosticEmitter, DiagnosticPayload, ServerAutomationHostOptions, ServerAutomationHostRejection, ServerAutomationHostResult };
|
package/dist/automation.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{f as AUTOMATION_COMMAND_OPERATIONS,e as AUTOMATION_QUERY_OPERATIONS,g as AUTOMATION_SOLITARY_OPERATIONS,d as HEADER_FOOTER_VARIANTS,o as SERVER_AUTOMATION_CAPABILITIES,w as byteSizeBucket,x as countBucket,m as createAutomationPaginationProvider,y as createDiagnosticEmitter,p as createServerAutomationHost,A as diagnosticCause,z as diagnosticCauses,s as diagnosticCodes,C as diagnosticErrorName,D as documentPartKind,B as exceptionCause,r as explainDiagnostic,i as isAutomationCommand,h as isSolitaryAutomationCommand,t as openDiagnosticCode,k as paginationSnapshotOf,v as reviewDiagnosticCode,u as storeEditDiagnosticCode}from'./chunk-UMMRURPE.js';import'./chunk-QXJKYNYZ.js';import'./chunk-DDFHKQFU.js';import'./chunk-ETDZFNMI.js';import'./chunk-L5TYBFDB.js';import'./chunk-ACLR4DMK.js';import'./chunk-HDOXACHP.js';import'./chunk-IILEENID.js';import'./chunk-GWM3AKUD.js';
|
package/dist/binding.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunk25EXMBV2_cjs=require('./chunk-25EXMBV2.cjs');require('./chunk-XJYZVGQR.cjs'),require('./chunk-6UDJUI3W.cjs'),require('./chunk-OKMEMSKB.cjs'),require('./chunk-TJHE5EET.cjs'),require('./chunk-65XBN67F.cjs'),require('./chunk-O324RB6R.cjs'),require('./chunk-ZOZI27AW.cjs');Object.defineProperty(exports,"PROJECTION_ORIGIN",{enumerable:true,get:function(){return chunk25EXMBV2_cjs.n}});Object.defineProperty(exports,"bodyParagraphs",{enumerable:true,get:function(){return chunk25EXMBV2_cjs.c}});Object.defineProperty(exports,"docToTreeOps",{enumerable:true,get:function(){return chunk25EXMBV2_cjs.f}});Object.defineProperty(exports,"mountTreeSurface",{enumerable:true,get:function(){return chunk25EXMBV2_cjs.o}});Object.defineProperty(exports,"openTreeSession",{enumerable:true,get:function(){return chunk25EXMBV2_cjs.l}});Object.defineProperty(exports,"partHasNode",{enumerable:true,get:function(){return chunk25EXMBV2_cjs.g}});Object.defineProperty(exports,"reconcileDoc",{enumerable:true,get:function(){return chunk25EXMBV2_cjs.h}});Object.defineProperty(exports,"runPropsOf",{enumerable:true,get:function(){return chunk25EXMBV2_cjs.b}});Object.defineProperty(exports,"treeSchema",{enumerable:true,get:function(){return chunk25EXMBV2_cjs.a}});Object.defineProperty(exports,"treeToDoc",{enumerable:true,get:function(){return chunk25EXMBV2_cjs.e}});
|
package/dist/binding.d.ts
CHANGED
|
@@ -9,27 +9,28 @@
|
|
|
9
9
|
* @public
|
|
10
10
|
*/
|
|
11
11
|
import { Node, Schema } from 'prosemirror-model';
|
|
12
|
-
import {
|
|
13
|
-
import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-
|
|
14
|
-
export { D as DocumentStyleEntry, M as MapResult, 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,
|
|
12
|
+
import { az as OoxmlProperty, aA as OoxmlPackageResult, aB as OoxmlPackageRejection } from './tree-op-types-C_S2niXW.js';
|
|
13
|
+
import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-D1awo_dA.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-D1awo_dA.js';
|
|
15
|
+
import { C as ContentLockPolicy } from './tree-package-store-CRHvMyNj.js';
|
|
16
|
+
export { S as StoryScope, a as StoryTargetRejection } from './tree-package-store-CRHvMyNj.js';
|
|
17
17
|
import { ReviewModuleContribution } from './contracts/modules.js';
|
|
18
18
|
import { EditorView } from 'prosemirror-view';
|
|
19
|
-
import './editor-scope-
|
|
20
|
-
import './
|
|
21
|
-
import './
|
|
22
|
-
import './headless-document-view-DZQN8Bnx.js';
|
|
19
|
+
import './editor-scope-B3L-1ALc.js';
|
|
20
|
+
import './custom-node-writes-CLJKGD9t.js';
|
|
21
|
+
import './headless-document-view-Bcz9_Qva.js';
|
|
23
22
|
import './collaboration/replication.js';
|
|
24
|
-
import './
|
|
25
|
-
import './
|
|
26
|
-
import './
|
|
23
|
+
import './revision-projection-Cn6rZJ7H.js';
|
|
24
|
+
import './contracts/types.js';
|
|
25
|
+
import './failure-6KGFrDO9.js';
|
|
26
|
+
import './document-protection-NaniLHWF.js';
|
|
27
|
+
import './editor-DZwOTmlR.js';
|
|
28
|
+
import './editor-fonts-D_-vjuJi.js';
|
|
29
|
+
import './diagnostic-hints-DK8-V0fk.js';
|
|
27
30
|
import './contracts/document.js';
|
|
28
31
|
import './contracts/interaction.js';
|
|
29
|
-
import './semantic-interaction-
|
|
30
|
-
import './
|
|
31
|
-
import './failure-NS2lsya4.js';
|
|
32
|
-
import './diagnostic-hints-2Bke6H_w.js';
|
|
32
|
+
import './semantic-interaction-CJoHLoOl.js';
|
|
33
|
+
import './semantic-records-BvN-WWst.js';
|
|
33
34
|
import './collaboration.js';
|
|
34
35
|
|
|
35
36
|
/** Attributes carried by a projected paragraph. */
|
package/dist/binding.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{n as PROJECTION_ORIGIN,c as bodyParagraphs,f as docToTreeOps,o as mountTreeSurface,l as openTreeSession,g as partHasNode,h as reconcileDoc,b as runPropsOf,a as treeSchema,e as treeToDoc}from'./chunk-GIY6NT2X.js';import'./chunk-B2BEELUE.js';import'./chunk-ETDZFNMI.js';import'./chunk-L5TYBFDB.js';import'./chunk-ACLR4DMK.js';import'./chunk-HDOXACHP.js';import'./chunk-IILEENID.js';import'./chunk-GWM3AKUD.js';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/** The longest name a bookmark is written with. */
|
|
2
|
+
declare const MAX_AUTHORED_BOOKMARK_NAME_LENGTH = 40;
|
|
3
|
+
/**
|
|
4
|
+
* Why a name cannot be written, or null when it can.
|
|
5
|
+
*
|
|
6
|
+
* - `empty`: no characters.
|
|
7
|
+
* - `tooLong`: more than {@link MAX_AUTHORED_BOOKMARK_NAME_LENGTH} characters.
|
|
8
|
+
* - `invalidStart`: the first character is not a letter or an underscore.
|
|
9
|
+
* - `invalidCharacter`: a later character is not a letter, a digit or an underscore.
|
|
10
|
+
*
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
type BookmarkNameProblem = 'empty' | 'tooLong' | 'invalidStart' | 'invalidCharacter';
|
|
14
|
+
/**
|
|
15
|
+
* Check a name before it is written. Measured in code points, so a letter outside the Basic
|
|
16
|
+
* Multilingual Plane counts once.
|
|
17
|
+
*
|
|
18
|
+
* @public
|
|
19
|
+
*/
|
|
20
|
+
declare function bookmarkNameProblem(name: string): BookmarkNameProblem | null;
|
|
21
|
+
/**
|
|
22
|
+
* Whether a bookmark is hidden: its name starts with an underscore. Hidden bookmarks are the
|
|
23
|
+
* ones applications write for themselves, such as the targets of a table of contents.
|
|
24
|
+
*
|
|
25
|
+
* @public
|
|
26
|
+
*/
|
|
27
|
+
declare function isHiddenBookmarkName(name: string): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* The key two names are compared by. Names are case-insensitive, so `Intro` and `intro`
|
|
30
|
+
* share a key.
|
|
31
|
+
*
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
34
|
+
declare function bookmarkNameKey(name: string): string;
|
|
35
|
+
|
|
36
|
+
export { MAX_AUTHORED_BOOKMARK_NAME_LENGTH as M, bookmarkNameProblem as a, bookmarkNameKey as b, isHiddenBookmarkName as i };
|
|
37
|
+
export type { BookmarkNameProblem as B };
|