@docx-editor.dev/core 2.16.0 → 2.16.1

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.
Files changed (90) hide show
  1. package/dist/automation.cjs +1 -1
  2. package/dist/automation.d.ts +6 -6
  3. package/dist/automation.js +1 -1
  4. package/dist/binding.cjs +1 -1
  5. package/dist/binding.d.ts +10 -10
  6. package/dist/binding.js +1 -1
  7. package/dist/chunk-3XTHXWEB.js +20 -0
  8. package/dist/chunk-7QG5FJ4X.js +1 -0
  9. package/dist/chunk-B2HDVIGY.cjs +2 -0
  10. package/dist/chunk-BML3CNUT.js +2 -0
  11. package/dist/chunk-DD7ETSGW.cjs +20 -0
  12. package/dist/chunk-FRRMJK2G.js +5 -0
  13. package/dist/{chunk-FAD7DH6Q.cjs → chunk-G5GLQ4SX.cjs} +1 -1
  14. package/dist/chunk-JP253KIZ.cjs +2 -0
  15. package/dist/chunk-JROG4U3Z.cjs +21 -0
  16. package/dist/chunk-L7MVY3DW.js +2 -0
  17. package/dist/{chunk-DYPT6YDY.js → chunk-MBXGQN6J.js} +1 -1
  18. package/dist/{chunk-QVJO5FUR.js → chunk-MDMM3XVQ.js} +6 -6
  19. package/dist/{chunk-4MIFIUEV.cjs → chunk-NO7U62I2.cjs} +1 -1
  20. package/dist/{chunk-WGHVIB6B.cjs → chunk-NPZX5O23.cjs} +1 -1
  21. package/dist/chunk-OISZDVXT.cjs +5 -0
  22. package/dist/{chunk-YRTRPSSA.cjs → chunk-PRNYSOQL.cjs} +1 -1
  23. package/dist/chunk-RXPOTTQQ.js +21 -0
  24. package/dist/{chunk-TDHR2QLH.cjs → chunk-TDMGSCCL.cjs} +1 -1
  25. package/dist/{chunk-BPSGGVP5.cjs → chunk-UIB2MDE3.cjs} +1 -1
  26. package/dist/{chunk-I4ENGOOZ.js → chunk-UXAWPVH6.js} +1 -1
  27. package/dist/{chunk-AEIAYDCG.js → chunk-VYQTZIYH.js} +1 -1
  28. package/dist/chunk-W7GY2IJC.js +2 -0
  29. package/dist/{chunk-YKDRBDI2.js → chunk-XXLS6O6B.js} +1 -1
  30. package/dist/{chunk-GHNTGVKG.cjs → chunk-ZFBNCHRP.cjs} +6 -6
  31. package/dist/collaboration/replication.cjs +1 -1
  32. package/dist/collaboration/replication.d.ts +4 -4
  33. package/dist/collaboration/replication.js +1 -1
  34. package/dist/collaboration.d.ts +4 -4
  35. package/dist/contracts/editor.d.ts +7 -7
  36. package/dist/contracts/modules.d.ts +8 -8
  37. package/dist/{custom-node-writes-4WOL8JB_.d.ts → custom-node-writes-ClTkWM7s.d.ts} +2 -2
  38. package/dist/{editor-PDx0fqSo.d.ts → editor-BlerWPyk.d.ts} +21 -3
  39. package/dist/editor.cjs +1 -1
  40. package/dist/editor.css +1 -1
  41. package/dist/editor.d.ts +26 -26
  42. package/dist/editor.js +1 -1
  43. package/dist/export.cjs +1 -1
  44. package/dist/export.d.ts +11 -11
  45. package/dist/export.js +1 -1
  46. package/dist/{font-resolver-CdqOugwZ.d.ts → font-resolver-DtADJcLL.d.ts} +1 -1
  47. package/dist/{headless-document-view-C9ONlGtf.d.ts → headless-document-view-BDSeMGoK.d.ts} +2 -2
  48. package/dist/{hf-references-BZVHctVD.d.ts → hf-references-kSSFMq9X.d.ts} +1 -1
  49. package/dist/{index-BVb4a6O3.d.ts → index-D51bUVBE.d.ts} +96 -15
  50. package/dist/index.cjs +1 -1
  51. package/dist/index.d.ts +18 -18
  52. package/dist/index.js +1 -1
  53. package/dist/{layout-shaping-D_U5z-Qh.d.ts → layout-shaping-rTElghj2.d.ts} +1 -1
  54. package/dist/layout.cjs +1 -1
  55. package/dist/layout.d.ts +21 -19
  56. package/dist/layout.js +1 -1
  57. package/dist/{note-properties-BosjbkGC.d.ts → note-properties-D5_fXW9K.d.ts} +1 -1
  58. package/dist/{omml-equation-oLlbPpVy.d.ts → omml-equation-C9AJfWy5.d.ts} +1 -1
  59. package/dist/output.cjs +1 -1
  60. package/dist/output.d.ts +6 -6
  61. package/dist/output.js +1 -1
  62. package/dist/{protocol-CUsqt13U.d.ts → protocol-K-Djpjjw.d.ts} +2 -2
  63. package/dist/{review-items-kC-YI70C.d.ts → review-items-CiliAz8H.d.ts} +11 -1
  64. package/dist/review-paragraph-order-BlSnyg9a.d.ts +79 -0
  65. package/dist/{revision-projection-CN_DiOl_.d.ts → revision-projection-JiDclAFU.d.ts} +1 -1
  66. package/dist/{semantic-cell-selection-BMrXDniV.d.ts → semantic-cell-selection-C-VsxNee.d.ts} +4 -4
  67. package/dist/{semantic-interaction-NGeYzYCN.d.ts → semantic-interaction-2vPh96Ey.d.ts} +1 -1
  68. package/dist/{semantic-paint-CM8F-8pH.d.ts → semantic-paint-BEjYcsPK.d.ts} +4 -2
  69. package/dist/{semantic-records-BreR44Ki.d.ts → semantic-records-Bc-MGXbM.d.ts} +9 -3
  70. package/dist/store.cjs +1 -1
  71. package/dist/store.d.ts +99 -15
  72. package/dist/store.js +1 -1
  73. package/dist/{tree-op-types-C5rZzoAz.d.ts → tree-op-types-C71G7rIv.d.ts} +6 -2
  74. package/dist/{tree-package-fragment-DDQHk8sv.d.ts → tree-package-fragment-DRJkmfTW.d.ts} +3 -3
  75. package/dist/{tree-session-contract-dKgbKH9A.d.ts → tree-session-contract-Cp5W25RC.d.ts} +7 -7
  76. package/dist/{tree-store-DU192chS.d.ts → tree-store-BRfhZceK.d.ts} +1 -1
  77. package/package.json +2 -2
  78. package/dist/chunk-66DTF4TD.cjs +0 -2
  79. package/dist/chunk-67U2OZS7.cjs +0 -2
  80. package/dist/chunk-6EGMDUL7.js +0 -21
  81. package/dist/chunk-ABXCIZVW.js +0 -2
  82. package/dist/chunk-CMV2MTDE.js +0 -5
  83. package/dist/chunk-EWV5JMJY.cjs +0 -21
  84. package/dist/chunk-GQVKCK33.js +0 -2
  85. package/dist/chunk-IZHDCQUC.js +0 -20
  86. package/dist/chunk-KEXMDQ2Z.js +0 -1
  87. package/dist/chunk-KQEUFAAG.cjs +0 -20
  88. package/dist/chunk-SIUUTE5M.js +0 -2
  89. package/dist/chunk-XKQTITOJ.cjs +0 -5
  90. package/dist/review-reads-DdvADsmp.d.ts +0 -161
@@ -1 +1 @@
1
- 'use strict';var chunkTDHR2QLH_cjs=require('./chunk-TDHR2QLH.cjs');require('./chunk-4MIFIUEV.cjs');var chunk67U2OZS7_cjs=require('./chunk-67U2OZS7.cjs'),chunkBPSGGVP5_cjs=require('./chunk-BPSGGVP5.cjs'),chunkGHNTGVKG_cjs=require('./chunk-GHNTGVKG.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 i=chunkGHNTGVKG_cjs.cc(t,e.limits??{});if(!i.ok)return {ok:false,reason:i.reason,...i.limit===void 0?{}:{limit:i.limit},...i.detail?{detail:i.detail}:{}};let s=i.package.parts.get(i.package.mainDocumentPart);if(!s)return {ok:false,reason:"no-main-document-part",detail:i.package.mainDocumentPart};let m=new chunk67U2OZS7_cjs.G(i.package,chunkGHNTGVKG_cjs.Kb(s)),f=e.collaborationModel?.session,l=()=>{},n=F(m,f,()=>l()),a=chunkTDHR2QLH_cjs.g({port:n,capabilities:N});return f&&(l=f.attach(chunkBPSGGVP5_cjs.b(m,{documentId:f.documentId}))),{ok:true,host:a}}function W(t,e,i){let s=t.partFor(i);return s?chunkGHNTGVKG_cjs.Ba(t,()=>{let m=chunkGHNTGVKG_cjs.nf(t.currentPackage(),e,s.name);return m?(t.replacePackageShell(m.pkg),m.relationshipId):null},m=>m!==null):null}function F(t,e,i=()=>{}){let s=true,m=0,f=()=>e?(m+=1,{origin:e.identity.role==="agent"?chunkGHNTGVKG_cjs.b.mutationAgent:chunkGHNTGVKG_cjs.b.mutationHuman,actorId:e.identity.actorId,operationId:`${e.identity.actorId}:${e.sessionId}:automation:${m}`,recordsHistory:false}):{},l=n=>(e?.flushPendingJournals(),n);return {localChangeTracking:true,revision:()=>t.packageRevision,currentPackage:()=>s?t.currentPackage():null,apply(n,a=b){if(!s)return {ok:false,reason:"disposed"};let r=n(u=>chunkGHNTGVKG_cjs.Mb(e?.identity.actorId,()=>W(t,u,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,u=>{for(let A of r)u.apply(A);o&&u.applyPackage(A=>chunkBPSGGVP5_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(!s)return {ok:false,reason:"disposed"};let a=e?.gateOperations([n],b);if(a)return {ok:false,reason:a};let r=chunkGHNTGVKG_cjs.Mb(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(!s)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(u=>u.kind==="delete")){let u=n.find(y=>y.kind==="delete"),A=chunkGHNTGVKG_cjs.Mb(e?.identity.actorId,()=>chunk67U2OZS7_cjs.T(t,n.flatMap(y=>y.kind==="delete"?[{commentId:y.commentId,...y.parentCommentId===void 0?{}:{parentCommentId:y.parentCommentId}}]:[]),a,u?.kind==="delete"?u.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 u=chunkGHNTGVKG_cjs.Mb(e?.identity.actorId,()=>chunk67U2OZS7_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 u.ok?l({ok:true,changed:true,..."commentId"in u?{commentId:u.commentId}:{}}):{ok:false,reason:u.reason}}if(o.kind!=="resolve")return {ok:false,reason:"unsupported-comment-write"};let d=chunkGHNTGVKG_cjs.Mb(e?.identity.actorId,()=>chunk67U2OZS7_cjs.S(t,o.commentId,o.resolved));return d.ok?l({ok:true,changed:true}):{ok:false,reason:d.reason}},applyCustomNodeWrite(n,a){if(!s)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=chunkGHNTGVKG_cjs.Mb(e?.identity.actorId,()=>chunk67U2OZS7_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:()=>s?chunkGHNTGVKG_cjs.dc(t.currentPackage()):null,subscribe:n=>t.subscribe(()=>n()),dispose(){i(),s=false;}}}Object.defineProperty(exports,"AUTOMATION_COMMAND_OPERATIONS",{enumerable:true,get:function(){return chunkTDHR2QLH_cjs.b}});Object.defineProperty(exports,"AUTOMATION_QUERY_OPERATIONS",{enumerable:true,get:function(){return chunkTDHR2QLH_cjs.a}});Object.defineProperty(exports,"AUTOMATION_SOLITARY_OPERATIONS",{enumerable:true,get:function(){return chunkTDHR2QLH_cjs.c}});Object.defineProperty(exports,"HEADER_FOOTER_VARIANTS",{enumerable:true,get:function(){return chunkTDHR2QLH_cjs.f}});Object.defineProperty(exports,"isAutomationCommand",{enumerable:true,get:function(){return chunkTDHR2QLH_cjs.e}});Object.defineProperty(exports,"isSolitaryAutomationCommand",{enumerable:true,get:function(){return chunkTDHR2QLH_cjs.d}});exports.SERVER_AUTOMATION_CAPABILITIES=N;exports.createServerAutomationHost=U;
1
+ 'use strict';var chunkTDMGSCCL_cjs=require('./chunk-TDMGSCCL.cjs');require('./chunk-NO7U62I2.cjs');var chunkJP253KIZ_cjs=require('./chunk-JP253KIZ.cjs'),chunkUIB2MDE3_cjs=require('./chunk-UIB2MDE3.cjs'),chunkZFBNCHRP_cjs=require('./chunk-ZFBNCHRP.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 i=chunkZFBNCHRP_cjs.cc(t,e.limits??{});if(!i.ok)return {ok:false,reason:i.reason,...i.limit===void 0?{}:{limit:i.limit},...i.detail?{detail:i.detail}:{}};let s=i.package.parts.get(i.package.mainDocumentPart);if(!s)return {ok:false,reason:"no-main-document-part",detail:i.package.mainDocumentPart};let m=new chunkJP253KIZ_cjs.G(i.package,chunkZFBNCHRP_cjs.Kb(s)),f=e.collaborationModel?.session,l=()=>{},n=F(m,f,()=>l()),a=chunkTDMGSCCL_cjs.g({port:n,capabilities:N});return f&&(l=f.attach(chunkUIB2MDE3_cjs.b(m,{documentId:f.documentId}))),{ok:true,host:a}}function W(t,e,i){let s=t.partFor(i);return s?chunkZFBNCHRP_cjs.Ba(t,()=>{let m=chunkZFBNCHRP_cjs.of(t.currentPackage(),e,s.name);return m?(t.replacePackageShell(m.pkg),m.relationshipId):null},m=>m!==null):null}function F(t,e,i=()=>{}){let s=true,m=0,f=()=>e?(m+=1,{origin:e.identity.role==="agent"?chunkZFBNCHRP_cjs.b.mutationAgent:chunkZFBNCHRP_cjs.b.mutationHuman,actorId:e.identity.actorId,operationId:`${e.identity.actorId}:${e.sessionId}:automation:${m}`,recordsHistory:false}):{},l=n=>(e?.flushPendingJournals(),n);return {localChangeTracking:true,revision:()=>t.packageRevision,currentPackage:()=>s?t.currentPackage():null,apply(n,a=b){if(!s)return {ok:false,reason:"disposed"};let r=n(u=>chunkZFBNCHRP_cjs.Mb(e?.identity.actorId,()=>W(t,u,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,u=>{for(let A of r)u.apply(A);o&&u.applyPackage(A=>chunkUIB2MDE3_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(!s)return {ok:false,reason:"disposed"};let a=e?.gateOperations([n],b);if(a)return {ok:false,reason:a};let r=chunkZFBNCHRP_cjs.Mb(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(!s)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(u=>u.kind==="delete")){let u=n.find(y=>y.kind==="delete"),A=chunkZFBNCHRP_cjs.Mb(e?.identity.actorId,()=>chunkJP253KIZ_cjs.T(t,n.flatMap(y=>y.kind==="delete"?[{commentId:y.commentId,...y.parentCommentId===void 0?{}:{parentCommentId:y.parentCommentId}}]:[]),a,u?.kind==="delete"?u.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 u=chunkZFBNCHRP_cjs.Mb(e?.identity.actorId,()=>chunkJP253KIZ_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 u.ok?l({ok:true,changed:true,..."commentId"in u?{commentId:u.commentId}:{}}):{ok:false,reason:u.reason}}if(o.kind!=="resolve")return {ok:false,reason:"unsupported-comment-write"};let d=chunkZFBNCHRP_cjs.Mb(e?.identity.actorId,()=>chunkJP253KIZ_cjs.S(t,o.commentId,o.resolved));return d.ok?l({ok:true,changed:true}):{ok:false,reason:d.reason}},applyCustomNodeWrite(n,a){if(!s)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=chunkZFBNCHRP_cjs.Mb(e?.identity.actorId,()=>chunkJP253KIZ_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:()=>s?chunkZFBNCHRP_cjs.dc(t.currentPackage()):null,subscribe:n=>t.subscribe(()=>n()),dispose(){i(),s=false;}}}Object.defineProperty(exports,"AUTOMATION_COMMAND_OPERATIONS",{enumerable:true,get:function(){return chunkTDMGSCCL_cjs.b}});Object.defineProperty(exports,"AUTOMATION_QUERY_OPERATIONS",{enumerable:true,get:function(){return chunkTDMGSCCL_cjs.a}});Object.defineProperty(exports,"AUTOMATION_SOLITARY_OPERATIONS",{enumerable:true,get:function(){return chunkTDMGSCCL_cjs.c}});Object.defineProperty(exports,"HEADER_FOOTER_VARIANTS",{enumerable:true,get:function(){return chunkTDMGSCCL_cjs.f}});Object.defineProperty(exports,"isAutomationCommand",{enumerable:true,get:function(){return chunkTDMGSCCL_cjs.e}});Object.defineProperty(exports,"isSolitaryAutomationCommand",{enumerable:true,get:function(){return chunkTDMGSCCL_cjs.d}});exports.SERVER_AUTOMATION_CAPABILITIES=N;exports.createServerAutomationHost=U;
@@ -1,11 +1,11 @@
1
- import { A as AutomationCapabilities, a as AutomationHost } from './protocol-CUsqt13U.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-CUsqt13U.js';
3
- import { H as HeaderFooterVariant } from './hf-references-BZVHctVD.js';
4
- import { N as NoteKind } from './tree-store-DU192chS.js';
5
- import { f as OoxmlPackageLimits, g as OoxmlPackageRejection } from './tree-op-types-C5rZzoAz.js';
1
+ import { A as AutomationCapabilities, a as AutomationHost } from './protocol-K-Djpjjw.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-K-Djpjjw.js';
3
+ import { H as HeaderFooterVariant } from './hf-references-kSSFMq9X.js';
4
+ import { N as NoteKind } from './tree-store-BRfhZceK.js';
5
+ import { f as OoxmlPackageLimits, g as OoxmlPackageRejection } from './tree-op-types-C71G7rIv.js';
6
6
  import { CollaborationModuleContribution } from './collaboration.js';
7
7
  import './contracts/types.js';
8
- import './tree-package-fragment-DDQHk8sv.js';
8
+ import './tree-package-fragment-DRJkmfTW.js';
9
9
  import './collaboration/replication.js';
10
10
  import './failure-BnGjoXf0.js';
11
11
 
@@ -1 +1 @@
1
- import {g}from'./chunk-KEXMDQ2Z.js';export{b as AUTOMATION_COMMAND_OPERATIONS,a as AUTOMATION_QUERY_OPERATIONS,c as AUTOMATION_SOLITARY_OPERATIONS,f as HEADER_FOOTER_VARIANTS,e as isAutomationCommand,d as isSolitaryAutomationCommand}from'./chunk-KEXMDQ2Z.js';import'./chunk-I4ENGOOZ.js';import {G,$,T,R,S}from'./chunk-GQVKCK33.js';import {b as b$1,a}from'./chunk-YKDRBDI2.js';import {cc,Kb,dc,Mb,Ba,nf,b as b$2}from'./chunk-QVJO5FUR.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 i=cc(t,e.limits??{});if(!i.ok)return {ok:false,reason:i.reason,...i.limit===void 0?{}:{limit:i.limit},...i.detail?{detail:i.detail}:{}};let s=i.package.parts.get(i.package.mainDocumentPart);if(!s)return {ok:false,reason:"no-main-document-part",detail:i.package.mainDocumentPart};let m=new G(i.package,Kb(s)),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,i){let s=t.partFor(i);return s?Ba(t,()=>{let m=nf(t.currentPackage(),e,s.name);return m?(t.replacePackageShell(m.pkg),m.relationshipId):null},m=>m!==null):null}function F(t,e,i=()=>{}){let s=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 {localChangeTracking:true,revision:()=>t.packageRevision,currentPackage:()=>s?t.currentPackage():null,apply(n,a$1=b){if(!s)return {ok:false,reason:"disposed"};let r=n(u=>Mb(e?.identity.actorId,()=>W(t,u,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,u=>{for(let A of r)u.apply(A);o&&u.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(!s)return {ok:false,reason:"disposed"};let a=e?.gateOperations([n],b);if(a)return {ok:false,reason:a};let r=Mb(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(!s)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(u=>u.kind==="delete")){let u=n.find(y=>y.kind==="delete"),A=Mb(e?.identity.actorId,()=>T(t,n.flatMap(y=>y.kind==="delete"?[{commentId:y.commentId,...y.parentCommentId===void 0?{}:{parentCommentId:y.parentCommentId}}]:[]),a,u?.kind==="delete"?u.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 u=Mb(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 u.ok?l({ok:true,changed:true,..."commentId"in u?{commentId:u.commentId}:{}}):{ok:false,reason:u.reason}}if(o.kind!=="resolve")return {ok:false,reason:"unsupported-comment-write"};let d=Mb(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(!s)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=Mb(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:()=>s?dc(t.currentPackage()):null,subscribe:n=>t.subscribe(()=>n()),dispose(){i(),s=false;}}}export{N as SERVER_AUTOMATION_CAPABILITIES,U as createServerAutomationHost};
1
+ import {g}from'./chunk-7QG5FJ4X.js';export{b as AUTOMATION_COMMAND_OPERATIONS,a as AUTOMATION_QUERY_OPERATIONS,c as AUTOMATION_SOLITARY_OPERATIONS,f as HEADER_FOOTER_VARIANTS,e as isAutomationCommand,d as isSolitaryAutomationCommand}from'./chunk-7QG5FJ4X.js';import'./chunk-UXAWPVH6.js';import {G,$,T,R,S}from'./chunk-W7GY2IJC.js';import {b as b$1,a}from'./chunk-XXLS6O6B.js';import {cc,Kb,dc,Mb,Ba,of,b as b$2}from'./chunk-MDMM3XVQ.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 i=cc(t,e.limits??{});if(!i.ok)return {ok:false,reason:i.reason,...i.limit===void 0?{}:{limit:i.limit},...i.detail?{detail:i.detail}:{}};let s=i.package.parts.get(i.package.mainDocumentPart);if(!s)return {ok:false,reason:"no-main-document-part",detail:i.package.mainDocumentPart};let m=new G(i.package,Kb(s)),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,i){let s=t.partFor(i);return s?Ba(t,()=>{let m=of(t.currentPackage(),e,s.name);return m?(t.replacePackageShell(m.pkg),m.relationshipId):null},m=>m!==null):null}function F(t,e,i=()=>{}){let s=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 {localChangeTracking:true,revision:()=>t.packageRevision,currentPackage:()=>s?t.currentPackage():null,apply(n,a$1=b){if(!s)return {ok:false,reason:"disposed"};let r=n(u=>Mb(e?.identity.actorId,()=>W(t,u,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,u=>{for(let A of r)u.apply(A);o&&u.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(!s)return {ok:false,reason:"disposed"};let a=e?.gateOperations([n],b);if(a)return {ok:false,reason:a};let r=Mb(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(!s)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(u=>u.kind==="delete")){let u=n.find(y=>y.kind==="delete"),A=Mb(e?.identity.actorId,()=>T(t,n.flatMap(y=>y.kind==="delete"?[{commentId:y.commentId,...y.parentCommentId===void 0?{}:{parentCommentId:y.parentCommentId}}]:[]),a,u?.kind==="delete"?u.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 u=Mb(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 u.ok?l({ok:true,changed:true,..."commentId"in u?{commentId:u.commentId}:{}}):{ok:false,reason:u.reason}}if(o.kind!=="resolve")return {ok:false,reason:"unsupported-comment-write"};let d=Mb(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(!s)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=Mb(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:()=>s?dc(t.currentPackage()):null,subscribe:n=>t.subscribe(()=>n()),dispose(){i(),s=false;}}}export{N as SERVER_AUTOMATION_CAPABILITIES,U as createServerAutomationHost};
package/dist/binding.cjs CHANGED
@@ -1 +1 @@
1
- 'use strict';var chunkXKQTITOJ_cjs=require('./chunk-XKQTITOJ.cjs');require('./chunk-YRTRPSSA.cjs'),require('./chunk-FGBADUSK.cjs'),require('./chunk-WGHVIB6B.cjs'),require('./chunk-4MIFIUEV.cjs'),require('./chunk-67U2OZS7.cjs'),require('./chunk-BPSGGVP5.cjs'),require('./chunk-GHNTGVKG.cjs');Object.defineProperty(exports,"PROJECTION_ORIGIN",{enumerable:true,get:function(){return chunkXKQTITOJ_cjs.k}});Object.defineProperty(exports,"bodyParagraphs",{enumerable:true,get:function(){return chunkXKQTITOJ_cjs.c}});Object.defineProperty(exports,"docToTreeOps",{enumerable:true,get:function(){return chunkXKQTITOJ_cjs.f}});Object.defineProperty(exports,"mountTreeSurface",{enumerable:true,get:function(){return chunkXKQTITOJ_cjs.l}});Object.defineProperty(exports,"openTreeSession",{enumerable:true,get:function(){return chunkXKQTITOJ_cjs.j}});Object.defineProperty(exports,"partHasNode",{enumerable:true,get:function(){return chunkXKQTITOJ_cjs.g}});Object.defineProperty(exports,"reconcileDoc",{enumerable:true,get:function(){return chunkXKQTITOJ_cjs.h}});Object.defineProperty(exports,"runPropsOf",{enumerable:true,get:function(){return chunkXKQTITOJ_cjs.b}});Object.defineProperty(exports,"treeSchema",{enumerable:true,get:function(){return chunkXKQTITOJ_cjs.a}});Object.defineProperty(exports,"treeToDoc",{enumerable:true,get:function(){return chunkXKQTITOJ_cjs.e}});
1
+ 'use strict';var chunkOISZDVXT_cjs=require('./chunk-OISZDVXT.cjs');require('./chunk-PRNYSOQL.cjs'),require('./chunk-FGBADUSK.cjs'),require('./chunk-NPZX5O23.cjs'),require('./chunk-NO7U62I2.cjs'),require('./chunk-JP253KIZ.cjs'),require('./chunk-UIB2MDE3.cjs'),require('./chunk-ZFBNCHRP.cjs');Object.defineProperty(exports,"PROJECTION_ORIGIN",{enumerable:true,get:function(){return chunkOISZDVXT_cjs.k}});Object.defineProperty(exports,"bodyParagraphs",{enumerable:true,get:function(){return chunkOISZDVXT_cjs.c}});Object.defineProperty(exports,"docToTreeOps",{enumerable:true,get:function(){return chunkOISZDVXT_cjs.f}});Object.defineProperty(exports,"mountTreeSurface",{enumerable:true,get:function(){return chunkOISZDVXT_cjs.l}});Object.defineProperty(exports,"openTreeSession",{enumerable:true,get:function(){return chunkOISZDVXT_cjs.j}});Object.defineProperty(exports,"partHasNode",{enumerable:true,get:function(){return chunkOISZDVXT_cjs.g}});Object.defineProperty(exports,"reconcileDoc",{enumerable:true,get:function(){return chunkOISZDVXT_cjs.h}});Object.defineProperty(exports,"runPropsOf",{enumerable:true,get:function(){return chunkOISZDVXT_cjs.b}});Object.defineProperty(exports,"treeSchema",{enumerable:true,get:function(){return chunkOISZDVXT_cjs.a}});Object.defineProperty(exports,"treeToDoc",{enumerable:true,get:function(){return chunkOISZDVXT_cjs.e}});
package/dist/binding.d.ts CHANGED
@@ -1,21 +1,21 @@
1
1
  import { Node, Schema } from 'prosemirror-model';
2
- import { q as OoxmlProperty, g as OoxmlPackageRejection } from './tree-op-types-C5rZzoAz.js';
3
- import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-dKgbKH9A.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-dKgbKH9A.js';
2
+ import { q as OoxmlProperty, g as OoxmlPackageRejection } from './tree-op-types-C71G7rIv.js';
3
+ import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-Cp5W25RC.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-Cp5W25RC.js';
5
5
  import { ReviewModuleContribution } from './contracts/modules.js';
6
- export { S as StoryScope, a as StoryTargetRejection } from './tree-package-fragment-DDQHk8sv.js';
6
+ export { S as StoryScope, a as StoryTargetRejection } from './tree-package-fragment-DRJkmfTW.js';
7
7
  import { EditorView } from 'prosemirror-view';
8
8
  import './contracts/types.js';
9
- import './hf-references-BZVHctVD.js';
10
- import './custom-node-writes-4WOL8JB_.js';
11
- import './tree-store-DU192chS.js';
12
- import './headless-document-view-C9ONlGtf.js';
13
- import './review-items-kC-YI70C.js';
9
+ import './hf-references-kSSFMq9X.js';
10
+ import './custom-node-writes-ClTkWM7s.js';
11
+ import './tree-store-BRfhZceK.js';
12
+ import './headless-document-view-BDSeMGoK.js';
13
+ import './review-items-CiliAz8H.js';
14
14
  import './collaboration/replication.js';
15
15
  import './editor-scope-DZJT4ukT.js';
16
16
  import './collaboration.js';
17
17
  import './failure-BnGjoXf0.js';
18
- import './revision-projection-CN_DiOl_.js';
18
+ import './revision-projection-JiDclAFU.js';
19
19
 
20
20
  /** Attributes carried by a projected paragraph. */
21
21
  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-CMV2MTDE.js';import'./chunk-AEIAYDCG.js';import'./chunk-VP7SDFCM.js';import'./chunk-ABXCIZVW.js';import'./chunk-I4ENGOOZ.js';import'./chunk-GQVKCK33.js';import'./chunk-YKDRBDI2.js';import'./chunk-QVJO5FUR.js';
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-FRRMJK2G.js';import'./chunk-VYQTZIYH.js';import'./chunk-VP7SDFCM.js';import'./chunk-BML3CNUT.js';import'./chunk-UXAWPVH6.js';import'./chunk-W7GY2IJC.js';import'./chunk-XXLS6O6B.js';import'./chunk-MDMM3XVQ.js';