@docx-editor.dev/core 2.10.0 → 2.11.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.cts +14 -5
- package/dist/automation.d.ts +14 -5
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.cts +12 -11
- package/dist/binding.d.ts +12 -11
- package/dist/binding.js +1 -1
- package/dist/chunk-34BNQUD4.js +10 -0
- package/dist/chunk-5AVHO75P.cjs +19 -0
- package/dist/chunk-6HMSC7UV.js +2 -0
- package/dist/chunk-6JIJOZDW.js +1 -0
- package/dist/chunk-76Y3Y45J.cjs +2 -0
- package/dist/chunk-BP7ANXGA.js +1 -0
- package/dist/chunk-BTQKU64Q.cjs +1 -0
- package/dist/chunk-CRZR6K5Z.js +19 -0
- package/dist/chunk-D5EHDHYV.js +1 -0
- package/dist/chunk-EJATEGJZ.cjs +1 -0
- package/dist/{chunk-PSZH2VXP.js → chunk-GOEBQ26R.js} +1 -1
- package/dist/chunk-GRDFEH5Q.cjs +2 -0
- package/dist/chunk-GWV65NQW.cjs +10 -0
- package/dist/chunk-GXLZCXEH.js +2 -0
- package/dist/chunk-JUQOPVSK.cjs +2 -0
- package/dist/chunk-LAETEBHD.js +1 -0
- package/dist/chunk-M6Z3KFXM.cjs +5 -0
- package/dist/{chunk-YMYCPY5Y.cjs → chunk-OHJQ7GPZ.cjs} +1 -1
- package/dist/chunk-UQFOYZJO.cjs +18 -0
- package/dist/chunk-WPQMPHNR.cjs +1 -0
- package/dist/chunk-WXQ245MQ.js +18 -0
- package/dist/chunk-WZHIFNSU.js +5 -0
- package/dist/chunk-X7A5XART.js +2 -0
- package/dist/chunk-ZKWRCLT2.cjs +1 -0
- package/dist/collaboration/replication.cjs +1 -0
- package/dist/collaboration/replication.d.cts +216 -0
- package/dist/collaboration/replication.d.ts +216 -0
- package/dist/collaboration/replication.js +1 -0
- package/dist/collaboration.cjs +1 -0
- package/dist/collaboration.d.cts +176 -0
- package/dist/collaboration.d.ts +176 -0
- package/dist/collaboration.js +1 -0
- package/dist/contracts/editor.cjs +1 -1
- package/dist/contracts/editor.d.cts +8 -9
- package/dist/contracts/editor.d.ts +8 -9
- package/dist/contracts/editor.js +1 -1
- package/dist/contracts/interaction.d.cts +8 -9
- package/dist/contracts/interaction.d.ts +8 -9
- package/dist/contracts/modules.cjs +1 -1
- package/dist/contracts/modules.d.cts +21 -8
- package/dist/contracts/modules.d.ts +21 -8
- package/dist/contracts/modules.js +1 -1
- package/dist/custom-node-writes-CwkYRw3V.d.cts +310 -0
- package/dist/custom-node-writes-JfTn-Sy6.d.ts +310 -0
- package/dist/document-properties-D6Ahr8D6.d.cts +28 -0
- package/dist/document-properties-D6Ahr8D6.d.ts +28 -0
- package/dist/{editor-C0my6Uta.d.ts → editor-BogcVHXk.d.ts} +145 -49
- package/dist/{editor-CwzY2Hcg.d.cts → editor-C8edZgy5.d.cts} +145 -49
- package/dist/editor.cjs +1 -1
- package/dist/editor.css +1 -7299
- package/dist/editor.d.cts +26 -25
- package/dist/editor.d.ts +26 -25
- package/dist/editor.js +1 -1
- package/dist/failure-BnGjoXf0.d.cts +64 -0
- package/dist/failure-BnGjoXf0.d.ts +64 -0
- package/dist/{index-kID8Ymkp.d.ts → index-BNv-ZLQP.d.ts} +262 -81
- package/dist/{index-nLFwo_17.d.cts → index-Dn0lOp9Z.d.cts} +262 -81
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +19 -18
- package/dist/index.d.ts +19 -18
- package/dist/index.js +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.cts +71 -53
- package/dist/layout.d.ts +71 -53
- package/dist/layout.js +1 -1
- package/dist/{note-properties-jvnw_DGG.d.ts → note-properties-BmoSdyKS.d.ts} +1 -1
- package/dist/{note-properties-CQlxjic_.d.cts → note-properties-BvGfHk5e.d.cts} +1 -1
- package/dist/{omml-equation-Dd3mBep-.d.ts → omml-equation-Ciq5rgb7.d.ts} +1 -1
- package/dist/{omml-equation-BD-LsmWE.d.cts → omml-equation-CqQOt_dD.d.cts} +1 -1
- package/dist/output.cjs +1 -1
- package/dist/output.d.cts +6 -8
- package/dist/output.d.ts +6 -8
- package/dist/output.js +1 -1
- package/dist/{protocol-UuZOcOp7.d.cts → protocol-BB-WP3zk.d.cts} +2 -2
- package/dist/{protocol-C7ahrdUx.d.ts → protocol-Ckl7hWsv.d.ts} +2 -2
- package/dist/{review-items-Dw-8a6Ie.d.ts → review-items-BdeLNRi2.d.cts} +1 -2
- package/dist/{review-items-CwixiHNe.d.cts → review-items-CkYyXhXM.d.ts} +1 -2
- package/dist/{review-reads-BqkiJTeR.d.cts → review-reads-BOLSBm5w.d.cts} +2 -2
- package/dist/{review-reads-C0u-IKEA.d.ts → review-reads-Crf0Xn42.d.ts} +2 -2
- package/dist/{revision-projection-CILpvv4M.d.ts → revision-projection-Ae2CWa8E.d.ts} +1 -1
- package/dist/{revision-projection-Cc4wz30g.d.cts → revision-projection-C2S8PSQm.d.cts} +1 -1
- package/dist/{semantic-cell-selection-DT9x9WLf.d.cts → semantic-cell-selection-C0OFD4D9.d.cts} +4 -4
- package/dist/{semantic-cell-selection-Utrf0lz7.d.ts → semantic-cell-selection-DdmoxC-y.d.ts} +4 -4
- package/dist/{semantic-interaction-B6hFRQLy.d.ts → semantic-interaction-COyhZ9WH.d.ts} +1 -1
- package/dist/{semantic-interaction-Z0xKQcB4.d.cts → semantic-interaction-Cs2jErnt.d.cts} +1 -1
- package/dist/{semantic-paint-CQEOC0Od.d.cts → semantic-paint-UHaj3sBY.d.cts} +2 -2
- package/dist/{semantic-paint-quke354p.d.ts → semantic-paint-vA-oLSdV.d.ts} +2 -2
- package/dist/{semantic-records-Do3-i5oB.d.ts → semantic-records-5AOQJmLX.d.cts} +5 -4
- package/dist/{semantic-records-CMakzQ1X.d.cts → semantic-records-9xhwbJ23.d.ts} +5 -4
- package/dist/{shaped-measurer-DzRwWrL5.d.cts → shaped-measurer-NeF2mPSu.d.cts} +1 -1
- package/dist/{shaped-measurer-BxwTUluj.d.ts → shaped-measurer-vzsY88oK.d.ts} +1 -1
- package/dist/store.cjs +1 -1
- package/dist/store.d.cts +74 -16
- package/dist/store.d.ts +74 -16
- package/dist/store.js +1 -1
- package/dist/{tree-op-types-DSJYmf5b.d.cts → tree-op-types-BPyXNxyL.d.cts} +1247 -10
- package/dist/{tree-op-types-BuOfCrkp.d.ts → tree-op-types-DnzAOnc9.d.ts} +1247 -10
- package/dist/{custom-node-writes-BvpWCnW8.d.ts → tree-package-fragment-BjZ3RWAS.d.cts} +107 -322
- package/dist/{custom-node-writes-Db8H6Z3n.d.cts → tree-package-fragment-CDER0G3B.d.ts} +107 -322
- package/dist/{tree-session-contract-C1dfE9hy.d.ts → tree-session-contract-BF2FVBOM.d.cts} +16 -10
- package/dist/{tree-session-contract-ByWx8eew.d.cts → tree-session-contract-DhdsFT_z.d.ts} +16 -10
- package/dist/{tree-store-ASBtz7UB.d.ts → tree-store-CNZ3O83s.d.ts} +130 -25
- package/dist/{tree-store-CWOUMGN8.d.cts → tree-store-DfZi7FqY.d.cts} +130 -25
- package/package.json +14 -3
- package/dist/chunk-27APDXY2.js +0 -2
- package/dist/chunk-35MI6K7M.cjs +0 -10
- package/dist/chunk-4XL7SOWQ.cjs +0 -2
- package/dist/chunk-6K6QQVAZ.cjs +0 -18
- package/dist/chunk-7VQ7YLW3.cjs +0 -1
- package/dist/chunk-7ZJL5AEY.cjs +0 -1
- package/dist/chunk-C6LK2BYA.cjs +0 -2
- package/dist/chunk-GQQOL4PV.js +0 -1
- package/dist/chunk-HBEBUCRM.cjs +0 -5
- package/dist/chunk-LG5K46OM.js +0 -2
- package/dist/chunk-LWADHMVV.js +0 -5
- package/dist/chunk-N725IUO7.js +0 -18
- package/dist/chunk-N7DBENH4.js +0 -10
- package/dist/chunk-NVGFWMCO.js +0 -1
- package/dist/chunk-SYTWKJPJ.cjs +0 -18
- package/dist/chunk-YI6JXF7U.js +0 -18
- package/dist/hf-references-Dvk6De4Q.d.cts +0 -70
- package/dist/hf-references-z5Y4N1ab.d.ts +0 -70
- package/dist/note-nodes-BNCANoGN.d.ts +0 -108
- package/dist/note-nodes-DL-Au22P.d.cts +0 -108
- package/dist/ooxml-package-CdEy9ufK.d.cts +0 -1222
- package/dist/ooxml-package-CdEy9ufK.d.ts +0 -1222
- package/dist/tree-op-revision-attribution-CN06Xshv.d.cts +0 -24
- package/dist/tree-op-revision-attribution-CN06Xshv.d.ts +0 -24
package/dist/automation.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkEJATEGJZ_cjs=require('./chunk-EJATEGJZ.cjs'),chunk76Y3Y45J_cjs=require('./chunk-76Y3Y45J.cjs'),chunkWPQMPHNR_cjs=require('./chunk-WPQMPHNR.cjs'),chunkGWV65NQW_cjs=require('./chunk-GWV65NQW.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=chunkGWV65NQW_cjs.Sb(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 chunk76Y3Y45J_cjs.f(s.package,chunkGWV65NQW_cjs.yb(u)),f=e.collaborationModel?.session,l=()=>{},n=F(m,f,()=>l()),a=chunkEJATEGJZ_cjs.g({port:n,capabilities:N});return f&&(l=f.attach(chunkWPQMPHNR_cjs.b(m,{documentId:f.documentId}))),{ok:true,host:a}}function W(t,e,s){let u=t.partFor(s);return u?chunkGWV65NQW_cjs.xa(t,()=>{let m=chunkGWV65NQW_cjs.Bd(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"?chunkGWV65NQW_cjs.b.mutationAgent:chunkGWV65NQW_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=>chunkGWV65NQW_cjs.Ab(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=>chunkWPQMPHNR_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=chunkGWV65NQW_cjs.Ab(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=chunkGWV65NQW_cjs.Ab(e?.identity.actorId,()=>chunk76Y3Y45J_cjs.s(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=chunkGWV65NQW_cjs.Ab(e?.identity.actorId,()=>chunk76Y3Y45J_cjs.q(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=chunkGWV65NQW_cjs.Ab(e?.identity.actorId,()=>chunk76Y3Y45J_cjs.r(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=chunkGWV65NQW_cjs.Ab(e?.identity.actorId,()=>chunk76Y3Y45J_cjs.A(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?chunkGWV65NQW_cjs.Tb(t.currentPackage()):null,subscribe:n=>t.subscribe(()=>n()),dispose(){s(),u=false;}}}Object.defineProperty(exports,"AUTOMATION_COMMAND_OPERATIONS",{enumerable:true,get:function(){return chunkEJATEGJZ_cjs.c}});Object.defineProperty(exports,"AUTOMATION_QUERY_OPERATIONS",{enumerable:true,get:function(){return chunkEJATEGJZ_cjs.b}});Object.defineProperty(exports,"AUTOMATION_SOLITARY_OPERATIONS",{enumerable:true,get:function(){return chunkEJATEGJZ_cjs.d}});Object.defineProperty(exports,"HEADER_FOOTER_VARIANTS",{enumerable:true,get:function(){return chunkEJATEGJZ_cjs.a}});Object.defineProperty(exports,"isAutomationCommand",{enumerable:true,get:function(){return chunkEJATEGJZ_cjs.f}});Object.defineProperty(exports,"isSolitaryAutomationCommand",{enumerable:true,get:function(){return chunkEJATEGJZ_cjs.e}});exports.SERVER_AUTOMATION_CAPABILITIES=N;exports.createServerAutomationHost=U;
|
package/dist/automation.d.cts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
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 './
|
|
4
|
-
import { N as NoteKind } from './
|
|
5
|
-
import {
|
|
1
|
+
import { A as AutomationCapabilities, a as AutomationHost } from './protocol-BB-WP3zk.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-BB-WP3zk.cjs';
|
|
3
|
+
import { H as HeaderFooterVariant } from './tree-package-fragment-BjZ3RWAS.cjs';
|
|
4
|
+
import { N as NoteKind } from './tree-store-DfZi7FqY.cjs';
|
|
5
|
+
import { e as OoxmlPackageLimits, f as OoxmlPackageRejection } from './tree-op-types-BPyXNxyL.cjs';
|
|
6
|
+
import { CollaborationModuleContribution } from './collaboration.cjs';
|
|
7
|
+
import './contracts/types.cjs';
|
|
8
|
+
import './collaboration/replication.cjs';
|
|
9
|
+
import './failure-BnGjoXf0.cjs';
|
|
6
10
|
|
|
7
11
|
/** The variants a section can declare furniture for. */
|
|
8
12
|
declare const HEADER_FOOTER_VARIANTS: readonly HeaderFooterVariant[];
|
|
@@ -61,6 +65,11 @@ interface ServerAutomationHostOptions {
|
|
|
61
65
|
* may want smaller limits than the defaults. Omitted means the engine's own defaults.
|
|
62
66
|
*/
|
|
63
67
|
readonly limits?: OoxmlPackageLimits;
|
|
68
|
+
/**
|
|
69
|
+
* Collaboration replica from the module registry. Absent, this host does
|
|
70
|
+
* not attach a replica.
|
|
71
|
+
*/
|
|
72
|
+
readonly collaborationModel?: CollaborationModuleContribution;
|
|
64
73
|
}
|
|
65
74
|
/**
|
|
66
75
|
* Open DOCX bytes into a headless automation host.
|
package/dist/automation.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
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 './
|
|
4
|
-
import { N as NoteKind } from './
|
|
5
|
-
import {
|
|
1
|
+
import { A as AutomationCapabilities, a as AutomationHost } from './protocol-Ckl7hWsv.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-Ckl7hWsv.js';
|
|
3
|
+
import { H as HeaderFooterVariant } from './tree-package-fragment-CDER0G3B.js';
|
|
4
|
+
import { N as NoteKind } from './tree-store-CNZ3O83s.js';
|
|
5
|
+
import { e as OoxmlPackageLimits, f as OoxmlPackageRejection } from './tree-op-types-DnzAOnc9.js';
|
|
6
|
+
import { CollaborationModuleContribution } from './collaboration.js';
|
|
7
|
+
import './contracts/types.js';
|
|
8
|
+
import './collaboration/replication.js';
|
|
9
|
+
import './failure-BnGjoXf0.js';
|
|
6
10
|
|
|
7
11
|
/** The variants a section can declare furniture for. */
|
|
8
12
|
declare const HEADER_FOOTER_VARIANTS: readonly HeaderFooterVariant[];
|
|
@@ -61,6 +65,11 @@ interface ServerAutomationHostOptions {
|
|
|
61
65
|
* may want smaller limits than the defaults. Omitted means the engine's own defaults.
|
|
62
66
|
*/
|
|
63
67
|
readonly limits?: OoxmlPackageLimits;
|
|
68
|
+
/**
|
|
69
|
+
* Collaboration replica from the module registry. Absent, this host does
|
|
70
|
+
* not attach a replica.
|
|
71
|
+
*/
|
|
72
|
+
readonly collaborationModel?: CollaborationModuleContribution;
|
|
64
73
|
}
|
|
65
74
|
/**
|
|
66
75
|
* Open DOCX bytes into a headless automation host.
|
package/dist/automation.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import {g}from'./chunk-
|
|
1
|
+
import {g}from'./chunk-LAETEBHD.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-LAETEBHD.js';import {f,A,s,q,r}from'./chunk-X7A5XART.js';import {b as b$1,a}from'./chunk-BP7ANXGA.js';import {Sb,yb,Tb,Ab,xa,Bd,b as b$2}from'./chunk-34BNQUD4.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=Sb(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 f(s.package,yb(u)),f$1=e.collaborationModel?.session,l=()=>{},n=F(m,f$1,()=>l()),a=g({port:n,capabilities:N});return f$1&&(l=f$1.attach(b$1(m,{documentId:f$1.documentId}))),{ok:true,host:a}}function W(t,e,s){let u=t.partFor(s);return u?xa(t,()=>{let m=Bd(t.currentPackage(),e,u.name);return m?(t.replacePackageShell(m.pkg),m.relationshipId):null},m=>m!==null):null}function F(t,e,s$1=()=>{}){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=>Ab(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=Ab(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$1=e?.gateOperations([],a);if(r$1)return {ok:false,reason:r$1};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=Ab(e?.identity.actorId,()=>s(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=Ab(e?.identity.actorId,()=>q(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=Ab(e?.identity.actorId,()=>r(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=Ab(e?.identity.actorId,()=>A(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?Tb(t.currentPackage()):null,subscribe:n=>t.subscribe(()=>n()),dispose(){s$1(),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 chunkM6Z3KFXM_cjs=require('./chunk-M6Z3KFXM.cjs');require('./chunk-GRDFEH5Q.cjs'),require('./chunk-76Y3Y45J.cjs'),require('./chunk-WPQMPHNR.cjs'),require('./chunk-GWV65NQW.cjs');Object.defineProperty(exports,"PROJECTION_ORIGIN",{enumerable:true,get:function(){return chunkM6Z3KFXM_cjs.k}});Object.defineProperty(exports,"bodyParagraphs",{enumerable:true,get:function(){return chunkM6Z3KFXM_cjs.c}});Object.defineProperty(exports,"docToTreeOps",{enumerable:true,get:function(){return chunkM6Z3KFXM_cjs.f}});Object.defineProperty(exports,"mountTreeSurface",{enumerable:true,get:function(){return chunkM6Z3KFXM_cjs.l}});Object.defineProperty(exports,"openTreeSession",{enumerable:true,get:function(){return chunkM6Z3KFXM_cjs.j}});Object.defineProperty(exports,"partHasNode",{enumerable:true,get:function(){return chunkM6Z3KFXM_cjs.g}});Object.defineProperty(exports,"reconcileDoc",{enumerable:true,get:function(){return chunkM6Z3KFXM_cjs.h}});Object.defineProperty(exports,"runPropsOf",{enumerable:true,get:function(){return chunkM6Z3KFXM_cjs.b}});Object.defineProperty(exports,"treeSchema",{enumerable:true,get:function(){return chunkM6Z3KFXM_cjs.a}});Object.defineProperty(exports,"treeToDoc",{enumerable:true,get:function(){return chunkM6Z3KFXM_cjs.e}});
|
package/dist/binding.d.cts
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { Node, Schema } from 'prosemirror-model';
|
|
2
|
-
import {
|
|
3
|
-
import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-
|
|
4
|
-
export { D as DocumentStyleEntry, M as MapResult, b as
|
|
2
|
+
import { s as OoxmlProperty, f as OoxmlPackageRejection } from './tree-op-types-BPyXNxyL.cjs';
|
|
3
|
+
import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-BF2FVBOM.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-BF2FVBOM.cjs';
|
|
5
5
|
import { ReviewModuleContribution } from './contracts/modules.cjs';
|
|
6
|
-
|
|
7
|
-
export { S as StoryScope, a as StoryTargetRejection } from './custom-node-writes-Db8H6Z3n.cjs';
|
|
6
|
+
export { S as StoryScope, a as StoryTargetRejection } from './tree-package-fragment-BjZ3RWAS.cjs';
|
|
8
7
|
import { EditorView } from 'prosemirror-view';
|
|
9
8
|
import './contracts/types.cjs';
|
|
10
|
-
import './
|
|
11
|
-
import './
|
|
12
|
-
import './
|
|
13
|
-
import './review-items-
|
|
14
|
-
import './
|
|
15
|
-
import './
|
|
9
|
+
import './custom-node-writes-CwkYRw3V.cjs';
|
|
10
|
+
import './tree-store-DfZi7FqY.cjs';
|
|
11
|
+
import './document-properties-D6Ahr8D6.cjs';
|
|
12
|
+
import './review-items-BdeLNRi2.cjs';
|
|
13
|
+
import './collaboration/replication.cjs';
|
|
14
|
+
import './collaboration.cjs';
|
|
15
|
+
import './failure-BnGjoXf0.cjs';
|
|
16
|
+
import './revision-projection-C2S8PSQm.cjs';
|
|
16
17
|
|
|
17
18
|
/** Attributes carried by a projected paragraph. */
|
|
18
19
|
interface ParagraphAttrs {
|
package/dist/binding.d.ts
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { Node, Schema } from 'prosemirror-model';
|
|
2
|
-
import {
|
|
3
|
-
import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-
|
|
4
|
-
export { D as DocumentStyleEntry, M as MapResult, b as
|
|
2
|
+
import { s as OoxmlProperty, f as OoxmlPackageRejection } from './tree-op-types-DnzAOnc9.js';
|
|
3
|
+
import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-DhdsFT_z.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-DhdsFT_z.js';
|
|
5
5
|
import { ReviewModuleContribution } from './contracts/modules.js';
|
|
6
|
-
|
|
7
|
-
export { S as StoryScope, a as StoryTargetRejection } from './custom-node-writes-BvpWCnW8.js';
|
|
6
|
+
export { S as StoryScope, a as StoryTargetRejection } from './tree-package-fragment-CDER0G3B.js';
|
|
8
7
|
import { EditorView } from 'prosemirror-view';
|
|
9
8
|
import './contracts/types.js';
|
|
10
|
-
import './
|
|
11
|
-
import './
|
|
12
|
-
import './
|
|
13
|
-
import './review-items-
|
|
14
|
-
import './
|
|
15
|
-
import './
|
|
9
|
+
import './custom-node-writes-JfTn-Sy6.js';
|
|
10
|
+
import './tree-store-CNZ3O83s.js';
|
|
11
|
+
import './document-properties-D6Ahr8D6.js';
|
|
12
|
+
import './review-items-CkYyXhXM.js';
|
|
13
|
+
import './collaboration/replication.js';
|
|
14
|
+
import './collaboration.js';
|
|
15
|
+
import './failure-BnGjoXf0.js';
|
|
16
|
+
import './revision-projection-Ae2CWa8E.js';
|
|
16
17
|
|
|
17
18
|
/** Attributes carried by a projected paragraph. */
|
|
18
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-WZHIFNSU.js';import'./chunk-6HMSC7UV.js';import'./chunk-X7A5XART.js';import'./chunk-BP7ANXGA.js';import'./chunk-34BNQUD4.js';
|