@docx-editor.dev/core 2.12.0 → 2.13.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 +18 -14
- package/dist/automation.cjs +1 -1
- package/dist/automation.d.cts +5 -5
- package/dist/automation.d.ts +5 -5
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.cts +8 -8
- package/dist/binding.d.ts +8 -8
- package/dist/binding.js +1 -1
- package/dist/chunk-3AT4RUQ3.cjs +19 -0
- package/dist/chunk-4NAQLFXA.cjs +2 -0
- package/dist/{chunk-XCFM3G5L.cjs → chunk-67S7OHE6.cjs} +1 -1
- package/dist/chunk-BHAUFJO6.js +20 -0
- package/dist/{chunk-TKEGK4GQ.cjs → chunk-F7U4OLMS.cjs} +2 -2
- package/dist/chunk-FNMXRLGW.cjs +5 -0
- package/dist/{chunk-W77HJGYX.js → chunk-HWWHGREA.js} +1 -1
- package/dist/chunk-I36WS6XX.cjs +20 -0
- package/dist/chunk-IOTL2GGW.js +1 -0
- package/dist/chunk-OF2QZCTN.js +19 -0
- package/dist/chunk-PFSJVAWJ.cjs +1 -0
- package/dist/chunk-PRIBU3UH.js +2 -0
- package/dist/{chunk-WU7PUTVA.js → chunk-RIYSCEFQ.js} +1 -1
- package/dist/chunk-RO3HFCML.js +5 -0
- package/dist/chunk-SFOUCTKA.js +2 -0
- package/dist/{chunk-MHQNR2OU.js → chunk-VBEKERLJ.js} +2 -2
- package/dist/chunk-WANKXD34.cjs +2 -0
- package/dist/chunk-XETEMUIP.cjs +11 -0
- package/dist/chunk-YMW34EBA.js +11 -0
- package/dist/collaboration/replication.cjs +1 -1
- package/dist/collaboration/replication.d.cts +3 -3
- package/dist/collaboration/replication.d.ts +3 -3
- package/dist/collaboration/replication.js +1 -1
- package/dist/collaboration.d.cts +3 -3
- package/dist/collaboration.d.ts +3 -3
- package/dist/contracts/editor.d.cts +7 -7
- package/dist/contracts/editor.d.ts +7 -7
- package/dist/contracts/interaction.d.cts +7 -7
- package/dist/contracts/interaction.d.ts +7 -7
- package/dist/contracts/modules.d.cts +7 -7
- package/dist/contracts/modules.d.ts +7 -7
- package/dist/{custom-node-writes-D4rMJIES.d.cts → custom-node-writes-C46r3_5O.d.cts} +2 -2
- package/dist/{custom-node-writes-CcNeHH5C.d.ts → custom-node-writes-DntmaAVW.d.ts} +2 -2
- package/dist/{dist-YFULGVS3.js → dist-OSUJGKTK.js} +1 -1
- package/dist/{editor-B76SEMZw.d.cts → editor-DLrTueVe.d.cts} +21 -9
- package/dist/{editor-BcdsPdbY.d.ts → editor-KiB6JNvk.d.ts} +21 -9
- package/dist/editor.cjs +1 -1
- package/dist/editor.d.cts +22 -22
- package/dist/editor.d.ts +22 -22
- package/dist/editor.js +1 -1
- package/dist/{index-BYTvklN5.d.ts → index-D4Pxdo_p.d.ts} +168 -13
- package/dist/{index-CDGhPib1.d.cts → index-D_PA2Xv6.d.cts} +168 -13
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +15 -15
- package/dist/index.d.ts +15 -15
- package/dist/index.js +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.cts +179 -519
- package/dist/layout.d.ts +179 -519
- package/dist/layout.js +1 -1
- package/dist/{note-properties-Bx7rXruA.d.ts → note-properties-CDFiNXcD.d.ts} +1 -1
- package/dist/{note-properties-zQ8w04en.d.cts → note-properties-Y6qYh2Hv.d.cts} +1 -1
- package/dist/{omml-equation-69O1Pd8G.d.ts → omml-equation-BY49UOIF.d.ts} +1 -1
- package/dist/{omml-equation-BmV51rim.d.cts → omml-equation-DB8d-jCq.d.cts} +1 -1
- package/dist/output.cjs +1 -1
- package/dist/output.d.cts +6 -6
- package/dist/output.d.ts +6 -6
- package/dist/output.js +1 -1
- package/dist/{protocol-FTXtrAIT.d.cts → protocol-C8L58j66.d.cts} +2 -2
- package/dist/{protocol-DC7ueVuo.d.ts → protocol-DjgYKCAy.d.ts} +2 -2
- package/dist/{review-items-B78OsJU2.d.ts → review-items-CCS1h93f.d.ts} +1 -1
- package/dist/{review-items-C-2WQdEb.d.cts → review-items-CaAkgi5s.d.cts} +1 -1
- package/dist/{review-reads-CbBQlb-n.d.cts → review-reads-BrTDmoYH.d.cts} +2 -2
- package/dist/{review-reads-UexYBp-m.d.ts → review-reads-DcGYCH0w.d.ts} +2 -2
- package/dist/{revision-projection-B2v9U3qx.d.ts → revision-projection-BmLtLPxH.d.ts} +1 -1
- package/dist/{revision-projection-6u8lae9J.d.cts → revision-projection-Dknlar93.d.cts} +1 -1
- package/dist/{semantic-cell-selection-DsYz2Vg3.d.ts → semantic-cell-selection-BZ50i-Fu.d.ts} +4 -4
- package/dist/{semantic-cell-selection-nEE7E3Z8.d.cts → semantic-cell-selection-COnfaOZO.d.cts} +4 -4
- package/dist/{semantic-interaction-C00BpIyC.d.ts → semantic-interaction-BDJ4TBjm.d.ts} +4 -2
- package/dist/{semantic-interaction-DiOX0FIH.d.cts → semantic-interaction-Bq3ixB0I.d.cts} +4 -2
- package/dist/{semantic-paint-Cc11nrDL.d.cts → semantic-paint-C5SMTO8Y.d.cts} +2 -2
- package/dist/{semantic-paint-ofuoBsYo.d.ts → semantic-paint-DuhhY5-R.d.ts} +2 -2
- package/dist/{semantic-records-CzI0ZEuR.d.ts → semantic-records-BI1jpft7.d.ts} +603 -8
- package/dist/{semantic-records-CRG1r6-a.d.cts → semantic-records-Btw3Ao4v.d.cts} +603 -8
- package/dist/{shaped-measurer-CneACGcP.d.cts → shaped-measurer-CqdYa0fa.d.cts} +9 -1
- package/dist/{shaped-measurer-CkOGZQn9.d.ts → shaped-measurer-qnBJziPx.d.ts} +9 -1
- package/dist/store.cjs +1 -1
- package/dist/store.d.cts +15 -12
- package/dist/store.d.ts +15 -12
- package/dist/store.js +1 -1
- package/dist/{tree-op-types-CA7qgAUF.d.cts → tree-op-types-BUulYD5y.d.cts} +15 -2
- package/dist/{tree-op-types-HKfUzt_-.d.ts → tree-op-types-D6HzlPR4.d.ts} +15 -2
- package/dist/{tree-package-fragment-oJZX_5iN.d.ts → tree-package-fragment-B1supBtE.d.ts} +2 -2
- package/dist/{tree-package-fragment-Cz-v-0B3.d.cts → tree-package-fragment-ByN5yzll.d.cts} +2 -2
- package/dist/{tree-session-contract-BPDLrEPX.d.ts → tree-session-contract-BasiwZgZ.d.ts} +28 -5
- package/dist/{tree-session-contract-Cbl87xa8.d.cts → tree-session-contract-DbeBenMR.d.cts} +28 -5
- package/dist/{tree-store-B7hd6cEa.d.ts → tree-store-APgWx6qn.d.ts} +1 -1
- package/dist/{tree-store-BenW0Mg_.d.cts → tree-store-DEEQ9wz_.d.cts} +1 -1
- package/package.json +5 -2
- package/dist/chunk-3JON7JMD.cjs +0 -1
- package/dist/chunk-5V6FNKBE.cjs +0 -2
- package/dist/chunk-BXRVGHTY.cjs +0 -18
- package/dist/chunk-BXTTPJSH.js +0 -5
- package/dist/chunk-ILTZTY3K.cjs +0 -10
- package/dist/chunk-IUM7FZPA.js +0 -2
- package/dist/chunk-JWZG4QJ5.cjs +0 -2
- package/dist/chunk-JXZYDBKU.cjs +0 -19
- package/dist/chunk-KBOOIC2Q.js +0 -19
- package/dist/chunk-L6XZTLPS.js +0 -10
- package/dist/chunk-L7OR5TJK.cjs +0 -5
- package/dist/chunk-MLGPISGH.js +0 -1
- package/dist/chunk-NJXQABQU.js +0 -18
- package/dist/chunk-VGFMPWND.js +0 -2
package/README.md
CHANGED
|
@@ -25,6 +25,8 @@ types to write a function signature.
|
|
|
25
25
|
npm install @docx-editor.dev/core
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
+
Node use requires `^20.16.0 || >=22.3.0`.
|
|
29
|
+
|
|
28
30
|
## Entry points
|
|
29
31
|
|
|
30
32
|
```ts
|
|
@@ -36,20 +38,22 @@ The root covers most uses: creating an editor, the `Editor` contract it implemen
|
|
|
36
38
|
the chrome registry, and the document model types. Subpaths expose the canonical tree, the
|
|
37
39
|
layout pass, and the paint step directly.
|
|
38
40
|
|
|
39
|
-
| Subpath
|
|
40
|
-
|
|
|
41
|
-
| `.`
|
|
42
|
-
| `./editor`
|
|
43
|
-
| `./contracts/editor`
|
|
44
|
-
| `./contracts/document`
|
|
45
|
-
| `./contracts/interaction`
|
|
46
|
-
| `./contracts/types`
|
|
47
|
-
| `./contracts/modules`
|
|
48
|
-
| `./store`
|
|
49
|
-
| `./layout`
|
|
50
|
-
| `./output`
|
|
51
|
-
| `./automation`
|
|
52
|
-
| `./
|
|
41
|
+
| Subpath | What's there |
|
|
42
|
+
| ----------------------------- | -------------------------------------------------------------------------------------------- |
|
|
43
|
+
| `.` | Create an editor, the contract, fonts, the chrome registry, the document model. |
|
|
44
|
+
| `./editor` | Everything the root re-exports, plus the paginated surface and ruler geometry. |
|
|
45
|
+
| `./contracts/editor` | `Editor`, `EditorCommand`, `EditorQuery`, `EditorSnapshot`, `PageSetup`. |
|
|
46
|
+
| `./contracts/document` | The document-level edit and query vocabulary. |
|
|
47
|
+
| `./contracts/interaction` | Semantic addressing (`SemanticTarget`) and the `InteractionOutcome` an attempt answers with. |
|
|
48
|
+
| `./contracts/types` | Document model types. |
|
|
49
|
+
| `./contracts/modules` | `EditorModule` — the shape `@docx-editor.dev/pro` implements. |
|
|
50
|
+
| `./store` | The canonical tree and its transactional store. |
|
|
51
|
+
| `./layout` | The DOM-free layout pass. |
|
|
52
|
+
| `./output` | Serialization. |
|
|
53
|
+
| `./automation` | The object model behind `@docx-editor.dev/editor-api`. |
|
|
54
|
+
| `./collaboration` | Provider-neutral collaboration session contracts. |
|
|
55
|
+
| `./collaboration/replication` | Replication helpers for collaboration providers. |
|
|
56
|
+
| `./styles/editor.css` | The one editor stylesheet, shared by packaged and custom chrome. |
|
|
53
57
|
|
|
54
58
|
## Architecture
|
|
55
59
|
|
package/dist/automation.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkPFSJVAWJ_cjs=require('./chunk-PFSJVAWJ.cjs'),chunk4NAQLFXA_cjs=require('./chunk-4NAQLFXA.cjs'),chunk67S7OHE6_cjs=require('./chunk-67S7OHE6.cjs'),chunkXETEMUIP_cjs=require('./chunk-XETEMUIP.cjs');var N=Object.freeze({document:true,save:true,events:true,selection:false,scrolling:false,layout:false}),b=Object.freeze({kind:"body"});function U(t,e={}){let s=chunkXETEMUIP_cjs.Vb(t,e.limits??{});if(!s.ok)return {ok:false,reason:s.reason,...s.detail?{detail:s.detail}:{}};let u=s.package.parts.get(s.package.mainDocumentPart);if(!u)return {ok:false,reason:"no-main-document-part",detail:s.package.mainDocumentPart};let m=new chunk4NAQLFXA_cjs.G(s.package,chunkXETEMUIP_cjs.Bb(u)),f=e.collaborationModel?.session,l=()=>{},n=F(m,f,()=>l()),a=chunkPFSJVAWJ_cjs.g({port:n,capabilities:N});return f&&(l=f.attach(chunk67S7OHE6_cjs.b(m,{documentId:f.documentId}))),{ok:true,host:a}}function W(t,e,s){let u=t.partFor(s);return u?chunkXETEMUIP_cjs.xa(t,()=>{let m=chunkXETEMUIP_cjs.Ed(t.currentPackage(),e,u.name);return m?(t.replacePackageShell(m.pkg),m.relationshipId):null},m=>m!==null):null}function F(t,e,s=()=>{}){let u=true,m=0,f=()=>e?(m+=1,{origin:e.identity.role==="agent"?chunkXETEMUIP_cjs.b.mutationAgent:chunkXETEMUIP_cjs.b.mutationHuman,actorId:e.identity.actorId,operationId:`${e.identity.actorId}:${e.sessionId}:automation:${m}`,recordsHistory:false}):{},l=n=>(e?.flushPendingJournals(),n);return {revision:()=>t.packageRevision,currentPackage:()=>u?t.currentPackage():null,apply(n,a=b){if(!u)return {ok:false,reason:"disposed"};let r=n(i=>chunkXETEMUIP_cjs.Db(e?.identity.actorId,()=>W(t,i,a)));if(r===null)return {ok:false,reason:"unsupported-target"};let p=e?.gateOperations(r,a);if(p)return {ok:false,reason:p};let o=e?t.partFor(a)?.name:void 0,d=t.transact(a,i=>{for(let A of r)i.apply(A);o&&i.applyPackage(A=>chunk67S7OHE6_cjs.a(A,o,r));},f());return d.ok?l({ok:true,changed:d.change!==null}):{ok:false,reason:d.detail?`${d.reason}: ${d.detail}`:d.reason}},applyLifecycle(n){if(!u)return {ok:false,reason:"disposed"};let a=e?.gateOperations([n],b);if(a)return {ok:false,reason:a};let r=chunkXETEMUIP_cjs.Db(e?.identity.actorId,()=>t.applyLifecycleOp(n));return r.ok?l({ok:true,changed:r.change!==null}):{ok:false,reason:r.detail?`${r.reason}: ${r.detail}`:r.reason}},applyCommentWrites(n,a){if(!u)return {ok:false,reason:"disposed"};if(n.length===0)return {ok:true,changed:false};let r=e?.gateOperations([],a);if(r)return {ok:false,reason:r};let p=t.resolveStory(a);if(!p.ok)return {ok:false,reason:p.reason};if(p.store.graftPackage(()=>t.currentPackage()),n.every(i=>i.kind==="delete")){let i=n.find(k=>k.kind==="delete"),A=chunkXETEMUIP_cjs.Db(e?.identity.actorId,()=>chunk4NAQLFXA_cjs.T(t,n.flatMap(k=>k.kind==="delete"?[{commentId:k.commentId,...k.parentCommentId===void 0?{}:{parentCommentId:k.parentCommentId}}]:[]),a,i?.kind==="delete"?i.noteId:void 0));return A?l({ok:true,changed:A}):{ok:false,reason:"comment-delete-refused"}}if(n.length!==1)return {ok:false,reason:"mixed-comment-writes"};let o=n[0];if(o.kind==="create"||o.kind==="reply"){let i=chunkXETEMUIP_cjs.Db(e?.identity.actorId,()=>chunk4NAQLFXA_cjs.R(t,{anchor:o.anchor,author:o.author,text:o.text,...o.date===void 0?{}:{date:o.date},...o.kind==="reply"?{replyToCommentId:o.parentCommentId}:{}},a));return i.ok?l({ok:true,changed:true,..."commentId"in i?{commentId:i.commentId}:{}}):{ok:false,reason:i.reason}}if(o.kind!=="resolve")return {ok:false,reason:"unsupported-comment-write"};let d=chunkXETEMUIP_cjs.Db(e?.identity.actorId,()=>chunk4NAQLFXA_cjs.S(t,o.commentId,o.resolved));return d.ok?l({ok:true,changed:true}):{ok:false,reason:d.reason}},applyCustomNodeWrite(n,a){if(!u)return {ok:false,reason:"disposed"};let r=e?.gateOperations([],a);if(r)return {ok:false,reason:r};let p=t.resolveStory(a);if(!p.ok)return {ok:false,reason:p.reason};let o=chunkXETEMUIP_cjs.Db(e?.identity.actorId,()=>chunk4NAQLFXA_cjs.$(t,n,a));return o.ok?l({ok:true,changed:o.change!==null}):{ok:false,reason:o.detail?`${o.reason}: ${o.detail}`:o.reason}},save:()=>u?chunkXETEMUIP_cjs.Wb(t.currentPackage()):null,subscribe:n=>t.subscribe(()=>n()),dispose(){s(),u=false;}}}Object.defineProperty(exports,"AUTOMATION_COMMAND_OPERATIONS",{enumerable:true,get:function(){return chunkPFSJVAWJ_cjs.c}});Object.defineProperty(exports,"AUTOMATION_QUERY_OPERATIONS",{enumerable:true,get:function(){return chunkPFSJVAWJ_cjs.b}});Object.defineProperty(exports,"AUTOMATION_SOLITARY_OPERATIONS",{enumerable:true,get:function(){return chunkPFSJVAWJ_cjs.d}});Object.defineProperty(exports,"HEADER_FOOTER_VARIANTS",{enumerable:true,get:function(){return chunkPFSJVAWJ_cjs.a}});Object.defineProperty(exports,"isAutomationCommand",{enumerable:true,get:function(){return chunkPFSJVAWJ_cjs.f}});Object.defineProperty(exports,"isSolitaryAutomationCommand",{enumerable:true,get:function(){return chunkPFSJVAWJ_cjs.e}});exports.SERVER_AUTOMATION_CAPABILITIES=N;exports.createServerAutomationHost=U;
|
package/dist/automation.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as AutomationCapabilities, a as AutomationHost } from './protocol-
|
|
2
|
-
export { b as AUTOMATION_COMMAND_OPERATIONS, c as AUTOMATION_QUERY_OPERATIONS, d as AUTOMATION_SOLITARY_OPERATIONS, e as AutomationAlignment, f as AutomationBatchRequest, g as AutomationBatchResponse, h as AutomationChangeEvent, i as AutomationContentControlLock, j as AutomationContentControlRangeLocation, k as AutomationContentControlScope, l as AutomationContentControlSubtype, m as AutomationContentControlValue, n as AutomationError, o as AutomationErrorCode, p as AutomationFontRead, q as AutomationFontWrite, r as AutomationHandle, s as AutomationHandleRef, t as AutomationObjectKind, u as AutomationOperation, v as AutomationOperationKind, w as AutomationOperationResult, x as AutomationPageOrientation, y as AutomationPageSetupRead, z as AutomationPageSetupWrite, B as AutomationParagraphFormatRead, C as AutomationParagraphFormatWrite, D as AutomationParagraphRef, E as AutomationPoint, F as AutomationSaveResult, G as AutomationSearchOptions, H as AutomationSelectionMode, I as AutomationSpan, J as AutomationSpanRef, K as AutomationTextProjection, L as AutomationUnsubscribe, M as AutomationValue, N as isAutomationCommand, O as isSolitaryAutomationCommand } from './protocol-
|
|
3
|
-
import { H as HeaderFooterVariant } from './tree-package-fragment-
|
|
4
|
-
import { N as NoteKind } from './tree-store-
|
|
5
|
-
import { e as OoxmlPackageLimits, f as OoxmlPackageRejection } from './tree-op-types-
|
|
1
|
+
import { A as AutomationCapabilities, a as AutomationHost } from './protocol-C8L58j66.cjs';
|
|
2
|
+
export { b as AUTOMATION_COMMAND_OPERATIONS, c as AUTOMATION_QUERY_OPERATIONS, d as AUTOMATION_SOLITARY_OPERATIONS, e as AutomationAlignment, f as AutomationBatchRequest, g as AutomationBatchResponse, h as AutomationChangeEvent, i as AutomationContentControlLock, j as AutomationContentControlRangeLocation, k as AutomationContentControlScope, l as AutomationContentControlSubtype, m as AutomationContentControlValue, n as AutomationError, o as AutomationErrorCode, p as AutomationFontRead, q as AutomationFontWrite, r as AutomationHandle, s as AutomationHandleRef, t as AutomationObjectKind, u as AutomationOperation, v as AutomationOperationKind, w as AutomationOperationResult, x as AutomationPageOrientation, y as AutomationPageSetupRead, z as AutomationPageSetupWrite, B as AutomationParagraphFormatRead, C as AutomationParagraphFormatWrite, D as AutomationParagraphRef, E as AutomationPoint, F as AutomationSaveResult, G as AutomationSearchOptions, H as AutomationSelectionMode, I as AutomationSpan, J as AutomationSpanRef, K as AutomationTextProjection, L as AutomationUnsubscribe, M as AutomationValue, N as isAutomationCommand, O as isSolitaryAutomationCommand } from './protocol-C8L58j66.cjs';
|
|
3
|
+
import { H as HeaderFooterVariant } from './tree-package-fragment-ByN5yzll.cjs';
|
|
4
|
+
import { N as NoteKind } from './tree-store-DEEQ9wz_.cjs';
|
|
5
|
+
import { e as OoxmlPackageLimits, f as OoxmlPackageRejection } from './tree-op-types-BUulYD5y.cjs';
|
|
6
6
|
import { CollaborationModuleContribution } from './collaboration.cjs';
|
|
7
7
|
import './contracts/types.cjs';
|
|
8
8
|
import './collaboration/replication.cjs';
|
package/dist/automation.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as AutomationCapabilities, a as AutomationHost } from './protocol-
|
|
2
|
-
export { b as AUTOMATION_COMMAND_OPERATIONS, c as AUTOMATION_QUERY_OPERATIONS, d as AUTOMATION_SOLITARY_OPERATIONS, e as AutomationAlignment, f as AutomationBatchRequest, g as AutomationBatchResponse, h as AutomationChangeEvent, i as AutomationContentControlLock, j as AutomationContentControlRangeLocation, k as AutomationContentControlScope, l as AutomationContentControlSubtype, m as AutomationContentControlValue, n as AutomationError, o as AutomationErrorCode, p as AutomationFontRead, q as AutomationFontWrite, r as AutomationHandle, s as AutomationHandleRef, t as AutomationObjectKind, u as AutomationOperation, v as AutomationOperationKind, w as AutomationOperationResult, x as AutomationPageOrientation, y as AutomationPageSetupRead, z as AutomationPageSetupWrite, B as AutomationParagraphFormatRead, C as AutomationParagraphFormatWrite, D as AutomationParagraphRef, E as AutomationPoint, F as AutomationSaveResult, G as AutomationSearchOptions, H as AutomationSelectionMode, I as AutomationSpan, J as AutomationSpanRef, K as AutomationTextProjection, L as AutomationUnsubscribe, M as AutomationValue, N as isAutomationCommand, O as isSolitaryAutomationCommand } from './protocol-
|
|
3
|
-
import { H as HeaderFooterVariant } from './tree-package-fragment-
|
|
4
|
-
import { N as NoteKind } from './tree-store-
|
|
5
|
-
import { e as OoxmlPackageLimits, f as OoxmlPackageRejection } from './tree-op-types-
|
|
1
|
+
import { A as AutomationCapabilities, a as AutomationHost } from './protocol-DjgYKCAy.js';
|
|
2
|
+
export { b as AUTOMATION_COMMAND_OPERATIONS, c as AUTOMATION_QUERY_OPERATIONS, d as AUTOMATION_SOLITARY_OPERATIONS, e as AutomationAlignment, f as AutomationBatchRequest, g as AutomationBatchResponse, h as AutomationChangeEvent, i as AutomationContentControlLock, j as AutomationContentControlRangeLocation, k as AutomationContentControlScope, l as AutomationContentControlSubtype, m as AutomationContentControlValue, n as AutomationError, o as AutomationErrorCode, p as AutomationFontRead, q as AutomationFontWrite, r as AutomationHandle, s as AutomationHandleRef, t as AutomationObjectKind, u as AutomationOperation, v as AutomationOperationKind, w as AutomationOperationResult, x as AutomationPageOrientation, y as AutomationPageSetupRead, z as AutomationPageSetupWrite, B as AutomationParagraphFormatRead, C as AutomationParagraphFormatWrite, D as AutomationParagraphRef, E as AutomationPoint, F as AutomationSaveResult, G as AutomationSearchOptions, H as AutomationSelectionMode, I as AutomationSpan, J as AutomationSpanRef, K as AutomationTextProjection, L as AutomationUnsubscribe, M as AutomationValue, N as isAutomationCommand, O as isSolitaryAutomationCommand } from './protocol-DjgYKCAy.js';
|
|
3
|
+
import { H as HeaderFooterVariant } from './tree-package-fragment-B1supBtE.js';
|
|
4
|
+
import { N as NoteKind } from './tree-store-APgWx6qn.js';
|
|
5
|
+
import { e as OoxmlPackageLimits, f as OoxmlPackageRejection } from './tree-op-types-D6HzlPR4.js';
|
|
6
6
|
import { CollaborationModuleContribution } from './collaboration.js';
|
|
7
7
|
import './contracts/types.js';
|
|
8
8
|
import './collaboration/replication.js';
|
package/dist/automation.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import {g}from'./chunk-
|
|
1
|
+
import {g}from'./chunk-IOTL2GGW.js';export{c as AUTOMATION_COMMAND_OPERATIONS,b as AUTOMATION_QUERY_OPERATIONS,d as AUTOMATION_SOLITARY_OPERATIONS,a as HEADER_FOOTER_VARIANTS,f as isAutomationCommand,e as isSolitaryAutomationCommand}from'./chunk-IOTL2GGW.js';import {G,$,T,R,S}from'./chunk-SFOUCTKA.js';import {b as b$1,a}from'./chunk-HWWHGREA.js';import {Vb,Bb,Wb,Db,xa,Ed,b as b$2}from'./chunk-YMW34EBA.js';var N=Object.freeze({document:true,save:true,events:true,selection:false,scrolling:false,layout:false}),b=Object.freeze({kind:"body"});function U(t,e={}){let s=Vb(t,e.limits??{});if(!s.ok)return {ok:false,reason:s.reason,...s.detail?{detail:s.detail}:{}};let u=s.package.parts.get(s.package.mainDocumentPart);if(!u)return {ok:false,reason:"no-main-document-part",detail:s.package.mainDocumentPart};let m=new G(s.package,Bb(u)),f=e.collaborationModel?.session,l=()=>{},n=F(m,f,()=>l()),a=g({port:n,capabilities:N});return f&&(l=f.attach(b$1(m,{documentId:f.documentId}))),{ok:true,host:a}}function W(t,e,s){let u=t.partFor(s);return u?xa(t,()=>{let m=Ed(t.currentPackage(),e,u.name);return m?(t.replacePackageShell(m.pkg),m.relationshipId):null},m=>m!==null):null}function F(t,e,s=()=>{}){let u=true,m=0,f=()=>e?(m+=1,{origin:e.identity.role==="agent"?b$2.mutationAgent:b$2.mutationHuman,actorId:e.identity.actorId,operationId:`${e.identity.actorId}:${e.sessionId}:automation:${m}`,recordsHistory:false}):{},l=n=>(e?.flushPendingJournals(),n);return {revision:()=>t.packageRevision,currentPackage:()=>u?t.currentPackage():null,apply(n,a$1=b){if(!u)return {ok:false,reason:"disposed"};let r=n(i=>Db(e?.identity.actorId,()=>W(t,i,a$1)));if(r===null)return {ok:false,reason:"unsupported-target"};let p=e?.gateOperations(r,a$1);if(p)return {ok:false,reason:p};let o=e?t.partFor(a$1)?.name:void 0,d=t.transact(a$1,i=>{for(let A of r)i.apply(A);o&&i.applyPackage(A=>a(A,o,r));},f());return d.ok?l({ok:true,changed:d.change!==null}):{ok:false,reason:d.detail?`${d.reason}: ${d.detail}`:d.reason}},applyLifecycle(n){if(!u)return {ok:false,reason:"disposed"};let a=e?.gateOperations([n],b);if(a)return {ok:false,reason:a};let r=Db(e?.identity.actorId,()=>t.applyLifecycleOp(n));return r.ok?l({ok:true,changed:r.change!==null}):{ok:false,reason:r.detail?`${r.reason}: ${r.detail}`:r.reason}},applyCommentWrites(n,a){if(!u)return {ok:false,reason:"disposed"};if(n.length===0)return {ok:true,changed:false};let r=e?.gateOperations([],a);if(r)return {ok:false,reason:r};let p=t.resolveStory(a);if(!p.ok)return {ok:false,reason:p.reason};if(p.store.graftPackage(()=>t.currentPackage()),n.every(i=>i.kind==="delete")){let i=n.find(k=>k.kind==="delete"),A=Db(e?.identity.actorId,()=>T(t,n.flatMap(k=>k.kind==="delete"?[{commentId:k.commentId,...k.parentCommentId===void 0?{}:{parentCommentId:k.parentCommentId}}]:[]),a,i?.kind==="delete"?i.noteId:void 0));return A?l({ok:true,changed:A}):{ok:false,reason:"comment-delete-refused"}}if(n.length!==1)return {ok:false,reason:"mixed-comment-writes"};let o=n[0];if(o.kind==="create"||o.kind==="reply"){let i=Db(e?.identity.actorId,()=>R(t,{anchor:o.anchor,author:o.author,text:o.text,...o.date===void 0?{}:{date:o.date},...o.kind==="reply"?{replyToCommentId:o.parentCommentId}:{}},a));return i.ok?l({ok:true,changed:true,..."commentId"in i?{commentId:i.commentId}:{}}):{ok:false,reason:i.reason}}if(o.kind!=="resolve")return {ok:false,reason:"unsupported-comment-write"};let d=Db(e?.identity.actorId,()=>S(t,o.commentId,o.resolved));return d.ok?l({ok:true,changed:true}):{ok:false,reason:d.reason}},applyCustomNodeWrite(n,a){if(!u)return {ok:false,reason:"disposed"};let r=e?.gateOperations([],a);if(r)return {ok:false,reason:r};let p=t.resolveStory(a);if(!p.ok)return {ok:false,reason:p.reason};let o=Db(e?.identity.actorId,()=>$(t,n,a));return o.ok?l({ok:true,changed:o.change!==null}):{ok:false,reason:o.detail?`${o.reason}: ${o.detail}`:o.reason}},save:()=>u?Wb(t.currentPackage()):null,subscribe:n=>t.subscribe(()=>n()),dispose(){s(),u=false;}}}export{N as SERVER_AUTOMATION_CAPABILITIES,U as createServerAutomationHost};
|
package/dist/binding.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkFNMXRLGW_cjs=require('./chunk-FNMXRLGW.cjs');require('./chunk-WANKXD34.cjs'),require('./chunk-4NAQLFXA.cjs'),require('./chunk-67S7OHE6.cjs'),require('./chunk-XETEMUIP.cjs');Object.defineProperty(exports,"PROJECTION_ORIGIN",{enumerable:true,get:function(){return chunkFNMXRLGW_cjs.k}});Object.defineProperty(exports,"bodyParagraphs",{enumerable:true,get:function(){return chunkFNMXRLGW_cjs.c}});Object.defineProperty(exports,"docToTreeOps",{enumerable:true,get:function(){return chunkFNMXRLGW_cjs.f}});Object.defineProperty(exports,"mountTreeSurface",{enumerable:true,get:function(){return chunkFNMXRLGW_cjs.l}});Object.defineProperty(exports,"openTreeSession",{enumerable:true,get:function(){return chunkFNMXRLGW_cjs.j}});Object.defineProperty(exports,"partHasNode",{enumerable:true,get:function(){return chunkFNMXRLGW_cjs.g}});Object.defineProperty(exports,"reconcileDoc",{enumerable:true,get:function(){return chunkFNMXRLGW_cjs.h}});Object.defineProperty(exports,"runPropsOf",{enumerable:true,get:function(){return chunkFNMXRLGW_cjs.b}});Object.defineProperty(exports,"treeSchema",{enumerable:true,get:function(){return chunkFNMXRLGW_cjs.a}});Object.defineProperty(exports,"treeToDoc",{enumerable:true,get:function(){return chunkFNMXRLGW_cjs.e}});
|
package/dist/binding.d.cts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { Node, Schema } from 'prosemirror-model';
|
|
2
|
-
import { s as OoxmlProperty, f as OoxmlPackageRejection } from './tree-op-types-
|
|
3
|
-
import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-
|
|
4
|
-
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-
|
|
2
|
+
import { s as OoxmlProperty, f as OoxmlPackageRejection } from './tree-op-types-BUulYD5y.cjs';
|
|
3
|
+
import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-DbeBenMR.cjs';
|
|
4
|
+
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-DbeBenMR.cjs';
|
|
5
5
|
import { ReviewModuleContribution } from './contracts/modules.cjs';
|
|
6
|
-
export { S as StoryScope, a as StoryTargetRejection } from './tree-package-fragment-
|
|
6
|
+
export { S as StoryScope, a as StoryTargetRejection } from './tree-package-fragment-ByN5yzll.cjs';
|
|
7
7
|
import { EditorView } from 'prosemirror-view';
|
|
8
8
|
import './contracts/types.cjs';
|
|
9
|
-
import './custom-node-writes-
|
|
10
|
-
import './tree-store-
|
|
9
|
+
import './custom-node-writes-C46r3_5O.cjs';
|
|
10
|
+
import './tree-store-DEEQ9wz_.cjs';
|
|
11
11
|
import './document-properties-D6Ahr8D6.cjs';
|
|
12
|
-
import './review-items-
|
|
12
|
+
import './review-items-CaAkgi5s.cjs';
|
|
13
13
|
import './collaboration/replication.cjs';
|
|
14
14
|
import './collaboration.cjs';
|
|
15
15
|
import './failure-BnGjoXf0.cjs';
|
|
16
|
-
import './revision-projection-
|
|
16
|
+
import './revision-projection-Dknlar93.cjs';
|
|
17
17
|
|
|
18
18
|
/** Attributes carried by a projected paragraph. */
|
|
19
19
|
interface ParagraphAttrs {
|
package/dist/binding.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { Node, Schema } from 'prosemirror-model';
|
|
2
|
-
import { s as OoxmlProperty, f as OoxmlPackageRejection } from './tree-op-types-
|
|
3
|
-
import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-
|
|
4
|
-
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-
|
|
2
|
+
import { s as OoxmlProperty, f as OoxmlPackageRejection } from './tree-op-types-D6HzlPR4.js';
|
|
3
|
+
import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-BasiwZgZ.js';
|
|
4
|
+
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-BasiwZgZ.js';
|
|
5
5
|
import { ReviewModuleContribution } from './contracts/modules.js';
|
|
6
|
-
export { S as StoryScope, a as StoryTargetRejection } from './tree-package-fragment-
|
|
6
|
+
export { S as StoryScope, a as StoryTargetRejection } from './tree-package-fragment-B1supBtE.js';
|
|
7
7
|
import { EditorView } from 'prosemirror-view';
|
|
8
8
|
import './contracts/types.js';
|
|
9
|
-
import './custom-node-writes-
|
|
10
|
-
import './tree-store-
|
|
9
|
+
import './custom-node-writes-DntmaAVW.js';
|
|
10
|
+
import './tree-store-APgWx6qn.js';
|
|
11
11
|
import './document-properties-D6Ahr8D6.js';
|
|
12
|
-
import './review-items-
|
|
12
|
+
import './review-items-CCS1h93f.js';
|
|
13
13
|
import './collaboration/replication.js';
|
|
14
14
|
import './collaboration.js';
|
|
15
15
|
import './failure-BnGjoXf0.js';
|
|
16
|
-
import './revision-projection-
|
|
16
|
+
import './revision-projection-BmLtLPxH.js';
|
|
17
17
|
|
|
18
18
|
/** Attributes carried by a projected paragraph. */
|
|
19
19
|
interface ParagraphAttrs {
|
package/dist/binding.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{k as PROJECTION_ORIGIN,c as bodyParagraphs,f as docToTreeOps,l as mountTreeSurface,j as openTreeSession,g as partHasNode,h as reconcileDoc,b as runPropsOf,a as treeSchema,e as treeToDoc}from'./chunk-
|
|
1
|
+
export{k as PROJECTION_ORIGIN,c as bodyParagraphs,f as docToTreeOps,l as mountTreeSurface,j as openTreeSession,g as partHasNode,h as reconcileDoc,b as runPropsOf,a as treeSchema,e as treeToDoc}from'./chunk-RO3HFCML.js';import'./chunk-PRIBU3UH.js';import'./chunk-SFOUCTKA.js';import'./chunk-HWWHGREA.js';import'./chunk-YMW34EBA.js';
|