@docx-editor.dev/core 2.27.0 → 2.29.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.
Files changed (124) hide show
  1. package/dist/automation.cjs +1 -1
  2. package/dist/automation.d.ts +76 -16
  3. package/dist/automation.js +1 -1
  4. package/dist/binding.cjs +1 -1
  5. package/dist/binding.d.ts +31 -12
  6. package/dist/binding.js +1 -1
  7. package/dist/{index-CkQVRJtJ.d.ts → chrome-print-CAs51cpq.d.ts} +248 -115
  8. package/dist/chunk-236O4YQW.js +2 -0
  9. package/dist/chunk-4HENIAFG.js +1 -0
  10. package/dist/chunk-6JPL6ZAS.cjs +5 -0
  11. package/dist/chunk-6ZQP4HQ7.js +3 -0
  12. package/dist/{chunk-2GK7YQB2.cjs → chunk-7WQ7AAHW.cjs} +1 -1
  13. package/dist/chunk-BCXH4BXB.js +5 -0
  14. package/dist/chunk-BY2ACZZ6.cjs +1 -0
  15. package/dist/chunk-CAJEXXVG.cjs +4 -0
  16. package/dist/chunk-CPWLFPWC.js +30 -0
  17. package/dist/chunk-D7ZMDMPX.cjs +3 -0
  18. package/dist/chunk-DOHF6FA7.cjs +30 -0
  19. package/dist/chunk-DVX32P2P.js +27 -0
  20. package/dist/chunk-E4LOMDNL.js +1 -0
  21. package/dist/chunk-EKLM7NWB.cjs +7 -0
  22. package/dist/chunk-G3K63G7P.cjs +27 -0
  23. package/dist/chunk-G4HOFIKJ.js +1 -0
  24. package/dist/chunk-JLVBDYVQ.cjs +2 -0
  25. package/dist/chunk-LQX36Z5P.js +7 -0
  26. package/dist/chunk-LSZ6KPKK.js +1 -0
  27. package/dist/chunk-MM5QBMTE.cjs +1 -0
  28. package/dist/chunk-OMCG63ZF.js +1 -0
  29. package/dist/chunk-OSFOJTHU.cjs +18 -0
  30. package/dist/chunk-RCLZXP3B.js +2 -0
  31. package/dist/chunk-T6K2QYNZ.cjs +2 -0
  32. package/dist/chunk-TRGAVV2Y.js +4 -0
  33. package/dist/chunk-U4JZVSOE.js +2 -0
  34. package/dist/chunk-UHHYFIDT.cjs +1 -0
  35. package/dist/chunk-V3N4SOAK.cjs +1 -0
  36. package/dist/chunk-W35WTWAO.cjs +1 -0
  37. package/dist/chunk-YQ5G6LC7.js +18 -0
  38. package/dist/collaboration/replication.cjs +1 -1
  39. package/dist/collaboration/replication.d.ts +42 -6
  40. package/dist/collaboration/replication.js +1 -1
  41. package/dist/collaboration.cjs +1 -1
  42. package/dist/collaboration.d.ts +99 -7
  43. package/dist/collaboration.js +1 -1
  44. package/dist/contracts/document.d.ts +18 -3
  45. package/dist/contracts/editor.d.ts +19 -10
  46. package/dist/contracts/interaction.d.ts +31 -2
  47. package/dist/contracts/modules.cjs +1 -1
  48. package/dist/contracts/modules.d.ts +56 -8
  49. package/dist/contracts/modules.js +1 -1
  50. package/dist/contracts/types.d.ts +11 -2
  51. package/dist/{custom-node-writes-Vzpq9I8_.d.ts → custom-node-writes-Bn6uciLb.d.ts} +2 -2
  52. package/dist/diagnostic-context-B8M79cfK.d.ts +30 -0
  53. package/dist/diagnostic-hints-BeVjfNOv.d.ts +113 -0
  54. package/dist/{document-protection-9zpIHWTE.d.ts → document-protection-CUb55pl_.d.ts} +2 -2
  55. package/dist/{editor-B3OBYNrF.d.ts → editor-CZQZmTIU.d.ts} +770 -141
  56. package/dist/{editor-scope-OHPwVQ5l.d.ts → editor-scope-7o9xweiJ.d.ts} +1 -1
  57. package/dist/editor.cjs +1 -1
  58. package/dist/editor.css +5 -5
  59. package/dist/editor.d.ts +439 -33
  60. package/dist/editor.js +1 -1
  61. package/dist/export.cjs +2 -2
  62. package/dist/export.d.ts +23 -14
  63. package/dist/export.js +2 -2
  64. package/dist/failure-NS2lsya4.d.ts +115 -0
  65. package/dist/{font-resolver-DN0xNOf_.d.ts → font-resolver-lSBLirLR.d.ts} +3 -3
  66. package/dist/{headless-document-view-ICYqNkQ1.d.ts → headless-document-view-pp3q7wIh.d.ts} +2 -2
  67. package/dist/{image-resources-BDFxcu7W.d.ts → image-resources-tXLQShoC.d.ts} +10 -10
  68. package/dist/index.cjs +1 -1
  69. package/dist/index.d.ts +92 -20
  70. package/dist/index.js +1 -1
  71. package/dist/{layout-shaping-BvZD_VKP.d.ts → layout-shaping-BD-dF_rn.d.ts} +1 -1
  72. package/dist/layout.cjs +1 -1
  73. package/dist/layout.d.ts +168 -79
  74. package/dist/layout.js +1 -1
  75. package/dist/{note-properties-CkAk7g-n.d.ts → note-properties-qQUjO1GQ.d.ts} +3 -3
  76. package/dist/{omml-equation-DuczgG5o.d.ts → omml-equation-BUbU0utM.d.ts} +1 -1
  77. package/dist/output.cjs +1 -1
  78. package/dist/output.d.ts +18 -9
  79. package/dist/output.js +1 -1
  80. package/dist/{protocol-aKYr8r3u.d.ts → protocol-DYzzz2ej.d.ts} +44 -4
  81. package/dist/{review-paragraph-order-Ddj5d6rp.d.ts → review-paragraph-order-CN_0l2Cb.d.ts} +5 -2
  82. package/dist/{semantic-cell-selection-DoqYCz_F.d.ts → semantic-cell-selection-eYag3P47.d.ts} +8 -213
  83. package/dist/{semantic-interaction-G0bjmmmk.d.ts → semantic-interaction-kR_QB845.d.ts} +25 -34
  84. package/dist/{semantic-paint-CsMzF8-O.d.ts → semantic-paint-ZayFF3tD.d.ts} +17 -5
  85. package/dist/{semantic-record-queries-1du6lQqS.d.ts → semantic-record-queries-Bsgth6lv.d.ts} +1 -1
  86. package/dist/{semantic-records-B9OolWGN.d.ts → semantic-records-DQmumPgL.d.ts} +1367 -884
  87. package/dist/store.cjs +1 -1
  88. package/dist/store.d.ts +1611 -1586
  89. package/dist/store.js +1 -1
  90. package/dist/{tree-package-fragment-DYZIk1rY.d.ts → tree-package-store-CovjNARF.d.ts} +157 -137
  91. package/dist/{tree-session-contract-DQVJOOkv.d.ts → tree-session-contract-CZVAGl51.d.ts} +8 -6
  92. package/dist/{types-barrel-BFKR8Pzp.d.ts → types-barrel-DuC5QBNC.d.ts} +352 -231
  93. package/package.json +3 -3
  94. package/dist/chunk-4KZ6L5YF.cjs +0 -15
  95. package/dist/chunk-55AT3MOU.cjs +0 -25
  96. package/dist/chunk-6ZQMII6V.js +0 -1
  97. package/dist/chunk-7IGCWG4H.js +0 -2
  98. package/dist/chunk-7MYITTAH.js +0 -5
  99. package/dist/chunk-AVKVRU7Z.cjs +0 -5
  100. package/dist/chunk-CWRBFNK5.cjs +0 -5
  101. package/dist/chunk-DGPA3TST.cjs +0 -27
  102. package/dist/chunk-DNXVNQEO.js +0 -1
  103. package/dist/chunk-FQN4KSFL.cjs +0 -7
  104. package/dist/chunk-GVUOWHTO.cjs +0 -1
  105. package/dist/chunk-GWQJ5774.js +0 -5
  106. package/dist/chunk-HAQ72KD7.js +0 -1
  107. package/dist/chunk-HO5XFO32.cjs +0 -3
  108. package/dist/chunk-IGR23DV2.js +0 -1
  109. package/dist/chunk-JSIX2EOH.js +0 -3
  110. package/dist/chunk-K246T47S.cjs +0 -1
  111. package/dist/chunk-KAXOGCGA.js +0 -1
  112. package/dist/chunk-LZLTN5A3.cjs +0 -1
  113. package/dist/chunk-NBCVVZOM.cjs +0 -1
  114. package/dist/chunk-O5INAWZQ.js +0 -1
  115. package/dist/chunk-OHAXVTWG.cjs +0 -1
  116. package/dist/chunk-S74GRBNE.js +0 -7
  117. package/dist/chunk-UBLUVNZR.js +0 -27
  118. package/dist/chunk-UMRSBLO7.js +0 -15
  119. package/dist/chunk-VIPMGGUT.js +0 -25
  120. package/dist/chunk-WG4KMSX2.cjs +0 -2
  121. package/dist/chunk-WRLKVNNR.cjs +0 -1
  122. package/dist/chunk-ZU7IVN6G.js +0 -2
  123. package/dist/failure-BIPVQbRm.d.ts +0 -65
  124. package/dist/revision-projection-CSNFudZY.d.ts +0 -242
@@ -1 +1 @@
1
- 'use strict';var chunkFQN4KSFL_cjs=require('./chunk-FQN4KSFL.cjs');require('./chunk-WRLKVNNR.cjs'),require('./chunk-55AT3MOU.cjs'),require('./chunk-2GK7YQB2.cjs'),require('./chunk-K246T47S.cjs');var chunkAVKVRU7Z_cjs=require('./chunk-AVKVRU7Z.cjs'),chunkGVUOWHTO_cjs=require('./chunk-GVUOWHTO.cjs'),chunk4KZ6L5YF_cjs=require('./chunk-4KZ6L5YF.cjs');var j=Object.freeze({document:true,save:true,events:true,selection:false,scrolling:false,layout:false}),D=Object.freeze({kind:"body"});function Y(o,t={}){let m=chunk4KZ6L5YF_cjs.ne(o,t.limits??{});if(!m.ok)return {ok:false,reason:m.reason,...m.limit===void 0?{}:{limit:m.limit},...m.detail?{detail:m.detail}:{}};let p=m.package.parts.get(m.package.mainDocumentPart);if(!p)return {ok:false,reason:"no-main-document-part",detail:m.package.mainDocumentPart};let u=new chunkAVKVRU7Z_cjs.X(m.package,chunkAVKVRU7Z_cjs.Xa(m.package,chunk4KZ6L5YF_cjs.qb(p))),y=t.collaborationModel?.session,c=()=>{},n=K(u,y,()=>c());if(t.pagination){let i,l=-1,e=t.pagination;n.prepare=async f=>{if(!f.operations.some(s=>s.op==="updateFieldResult"))return;i=void 0;let a=u.packageRevision,d=await e(chunkAVKVRU7Z_cjs.bb(u));u.packageRevision===a&&(i=d,l=a);},n.fieldPageContext=(f,a,d)=>{if(u.packageRevision!==l)return null;let s=chunkFQN4KSFL_cjs.g(u.currentPackage()).story(f);return s?chunkFQN4KSFL_cjs.d(i,s.part,a,d):null};}let r=chunkFQN4KSFL_cjs.m({port:n,capabilities:j});return y&&(c=y.attach(chunkGVUOWHTO_cjs.b(u,{documentId:y.documentId}))),{ok:true,host:r}}function G(o,t,m){let p=o.partFor(m);return p?chunk4KZ6L5YF_cjs.Fa(o,()=>{let u=chunk4KZ6L5YF_cjs.og(o.currentPackage(),t,p.name);return u?(o.replacePackageShell(u.pkg),u.relationshipId):null},u=>u!==null):null}function K(o,t,m=()=>{}){let p=true,u=0,y=()=>t?(u+=1,{origin:t.identity.role==="agent"?chunk4KZ6L5YF_cjs.b.mutationAgent:chunk4KZ6L5YF_cjs.b.mutationHuman,actorId:t.identity.actorId,operationId:`${t.identity.actorId}:${t.sessionId}:automation:${u}`,recordsHistory:false}):{},c=n=>(t?.flushPendingJournals(),n);return {localChangeTracking:true,collaborative:()=>!!t,revision:()=>o.packageRevision,currentPackage:()=>p?o.currentPackage():null,apply(n,r=D,i=[]){if(!p)return {ok:false,reason:"disposed"};let l=n(d=>chunk4KZ6L5YF_cjs.tb(t?.identity.actorId,()=>G(o,d,r)));if(l===null)return {ok:false,reason:"unsupported-target"};let e=t?.gateOperations(l,r);if(e)return {ok:false,reason:e};let f=t?o.partFor(r)?.name:void 0,a=o.transact(r,d=>{for(let s of i)d.applyPackage(s);for(let s of l)d.apply(s);f&&d.applyPackage(s=>chunkGVUOWHTO_cjs.a(s,f,l));},y());return a.ok?c({ok:true,changed:a.change!==null}):{ok:false,reason:a.detail?`${a.reason}: ${a.detail}`:a.reason}},applyLifecycle(n){if(!p)return {ok:false,reason:"disposed"};let r=t?.gateOperations([n],D);if(r)return {ok:false,reason:r};let i=chunk4KZ6L5YF_cjs.tb(t?.identity.actorId,()=>o.applyLifecycleOp(n));return i.ok?c({ok:true,changed:i.change!==null}):{ok:false,reason:i.detail?`${i.reason}: ${i.detail}`:i.reason}},applyCommentWrites(n,r){if(!p)return {ok:false,reason:"disposed"};if(n.length===0)return {ok:true,changed:false};let i=t?.gateOperations([],r);if(i)return {ok:false,reason:i};let l=o.resolveStory(r);if(!l.ok)return {ok:false,reason:l.reason};if(l.store.graftPackage(()=>o.currentPackage()),n.every(a=>a.kind==="delete")){let a=n.find(s=>s.kind==="delete"),d=chunk4KZ6L5YF_cjs.tb(t?.identity.actorId,()=>chunkAVKVRU7Z_cjs.ia(o,n.flatMap(s=>s.kind==="delete"?[{commentId:s.commentId,...s.parentCommentId===void 0?{}:{parentCommentId:s.parentCommentId}}]:[]),r,a?.kind==="delete"?a.noteId:void 0));return d?c({ok:true,changed:d}):{ok:false,reason:"comment-delete-refused"}}if(n.length!==1)return {ok:false,reason:"mixed-comment-writes"};let e=n[0];if(e.kind==="create"||e.kind==="reply"){let a=chunk4KZ6L5YF_cjs.tb(t?.identity.actorId,()=>chunkAVKVRU7Z_cjs.ga(o,{anchor:e.anchor,author:e.author,text:e.text,...e.date===void 0?{}:{date:e.date},...e.kind==="reply"?{replyToCommentId:e.parentCommentId}:{}},r));return a.ok?c({ok:true,changed:true,..."commentId"in a?{commentId:a.commentId}:{}}):{ok:false,reason:a.reason}}if(e.kind!=="resolve")return {ok:false,reason:"unsupported-comment-write"};let f=chunk4KZ6L5YF_cjs.tb(t?.identity.actorId,()=>chunkAVKVRU7Z_cjs.ha(o,e.commentId,e.resolved));return f.ok?c({ok:true,changed:true}):{ok:false,reason:f.reason}},applyCustomNodeWrite(n,r){if(!p)return {ok:false,reason:"disposed"};let i=t?.gateOperations([],r);if(i)return {ok:false,reason:i};let l=o.resolveStory(r);if(!l.ok)return {ok:false,reason:l.reason};let e=chunk4KZ6L5YF_cjs.tb(t?.identity.actorId,()=>chunkAVKVRU7Z_cjs.qa(o,n,r));return e.ok?c({ok:true,changed:e.change!==null}):{ok:false,reason:e.detail?`${e.reason}: ${e.detail}`:e.reason}},save:()=>p?chunk4KZ6L5YF_cjs.oe(o.currentPackage()):null,subscribe:n=>o.subscribe(()=>n()),dispose(){m(),p=false;}}}Object.defineProperty(exports,"AUTOMATION_COMMAND_OPERATIONS",{enumerable:true,get:function(){return chunkFQN4KSFL_cjs.i}});Object.defineProperty(exports,"AUTOMATION_QUERY_OPERATIONS",{enumerable:true,get:function(){return chunkFQN4KSFL_cjs.h}});Object.defineProperty(exports,"AUTOMATION_SOLITARY_OPERATIONS",{enumerable:true,get:function(){return chunkFQN4KSFL_cjs.j}});Object.defineProperty(exports,"HEADER_FOOTER_VARIANTS",{enumerable:true,get:function(){return chunkFQN4KSFL_cjs.f}});Object.defineProperty(exports,"createAutomationPaginationProvider",{enumerable:true,get:function(){return chunkFQN4KSFL_cjs.e}});Object.defineProperty(exports,"isAutomationCommand",{enumerable:true,get:function(){return chunkFQN4KSFL_cjs.l}});Object.defineProperty(exports,"isSolitaryAutomationCommand",{enumerable:true,get:function(){return chunkFQN4KSFL_cjs.k}});Object.defineProperty(exports,"paginationSnapshotOf",{enumerable:true,get:function(){return chunkFQN4KSFL_cjs.c}});exports.SERVER_AUTOMATION_CAPABILITIES=j;exports.createServerAutomationHost=Y;
1
+ 'use strict';var chunkEKLM7NWB_cjs=require('./chunk-EKLM7NWB.cjs');require('./chunk-W35WTWAO.cjs'),require('./chunk-DOHF6FA7.cjs'),require('./chunk-7WQ7AAHW.cjs'),require('./chunk-MM5QBMTE.cjs'),require('./chunk-T6K2QYNZ.cjs'),require('./chunk-UHHYFIDT.cjs'),require('./chunk-OSFOJTHU.cjs');Object.defineProperty(exports,"AUTOMATION_COMMAND_OPERATIONS",{enumerable:true,get:function(){return chunkEKLM7NWB_cjs.e}});Object.defineProperty(exports,"AUTOMATION_QUERY_OPERATIONS",{enumerable:true,get:function(){return chunkEKLM7NWB_cjs.d}});Object.defineProperty(exports,"AUTOMATION_SOLITARY_OPERATIONS",{enumerable:true,get:function(){return chunkEKLM7NWB_cjs.f}});Object.defineProperty(exports,"HEADER_FOOTER_VARIANTS",{enumerable:true,get:function(){return chunkEKLM7NWB_cjs.c}});Object.defineProperty(exports,"SERVER_AUTOMATION_CAPABILITIES",{enumerable:true,get:function(){return chunkEKLM7NWB_cjs.n}});Object.defineProperty(exports,"byteSizeBucket",{enumerable:true,get:function(){return chunkEKLM7NWB_cjs.u}});Object.defineProperty(exports,"countBucket",{enumerable:true,get:function(){return chunkEKLM7NWB_cjs.v}});Object.defineProperty(exports,"createAutomationPaginationProvider",{enumerable:true,get:function(){return chunkEKLM7NWB_cjs.l}});Object.defineProperty(exports,"createDiagnosticEmitter",{enumerable:true,get:function(){return chunkEKLM7NWB_cjs.w}});Object.defineProperty(exports,"createServerAutomationHost",{enumerable:true,get:function(){return chunkEKLM7NWB_cjs.o}});Object.defineProperty(exports,"diagnosticCause",{enumerable:true,get:function(){return chunkEKLM7NWB_cjs.y}});Object.defineProperty(exports,"diagnosticCauses",{enumerable:true,get:function(){return chunkEKLM7NWB_cjs.x}});Object.defineProperty(exports,"diagnosticCodes",{enumerable:true,get:function(){return chunkEKLM7NWB_cjs.q}});Object.defineProperty(exports,"diagnosticErrorName",{enumerable:true,get:function(){return chunkEKLM7NWB_cjs.A}});Object.defineProperty(exports,"documentPartKind",{enumerable:true,get:function(){return chunkEKLM7NWB_cjs.B}});Object.defineProperty(exports,"exceptionCause",{enumerable:true,get:function(){return chunkEKLM7NWB_cjs.z}});Object.defineProperty(exports,"explainDiagnostic",{enumerable:true,get:function(){return chunkEKLM7NWB_cjs.p}});Object.defineProperty(exports,"isAutomationCommand",{enumerable:true,get:function(){return chunkEKLM7NWB_cjs.h}});Object.defineProperty(exports,"isSolitaryAutomationCommand",{enumerable:true,get:function(){return chunkEKLM7NWB_cjs.g}});Object.defineProperty(exports,"openDiagnosticCode",{enumerable:true,get:function(){return chunkEKLM7NWB_cjs.r}});Object.defineProperty(exports,"paginationSnapshotOf",{enumerable:true,get:function(){return chunkEKLM7NWB_cjs.j}});Object.defineProperty(exports,"reviewDiagnosticCode",{enumerable:true,get:function(){return chunkEKLM7NWB_cjs.t}});Object.defineProperty(exports,"storeEditDiagnosticCode",{enumerable:true,get:function(){return chunkEKLM7NWB_cjs.s}});
@@ -1,17 +1,32 @@
1
- import { A as AutomationOperation, a as AutomationCapabilities, b as AutomationHost } from './protocol-aKYr8r3u.js';
2
- export { c as AutomationAlignment, d as AutomationBatchRequest, e as AutomationBatchResponse, f as AutomationChangeEvent, g as AutomationContentControlLock, h as AutomationContentControlRangeLocation, i as AutomationContentControlScope, j as AutomationContentControlSubtype, k as AutomationContentControlValue, l as AutomationError, m as AutomationErrorCode, n as AutomationFontRead, o as AutomationFontWrite, p as AutomationHandle, q as AutomationHandleRef, r as AutomationObjectKind, s as AutomationOperationKind, t as AutomationOperationResult, u as AutomationPageOrientation, v as AutomationPageSetupRead, w as AutomationPageSetupWrite, x as AutomationParagraphFormatRead, y as AutomationParagraphFormatWrite, z as AutomationParagraphRef, B as AutomationPoint, C as AutomationSaveResult, D as AutomationSearchOptions, E as AutomationSelectionMode, F as AutomationSpan, G as AutomationSpanRef, H as AutomationTextProjection, I as AutomationUnsubscribe, J as AutomationValue } from './protocol-aKYr8r3u.js';
3
- import { c as HeaderFooterVariant, N as NoteKind } from './tree-package-fragment-DYZIk1rY.js';
4
- import { T as TextMeasurer, S as SemanticLayout } from './semantic-records-B9OolWGN.js';
5
- import { H as HeadlessDocumentView } from './headless-document-view-ICYqNkQ1.js';
6
- import { a1 as OoxmlPackageLimits, Y as OoxmlPackageRejection } from './types-barrel-BFKR8Pzp.js';
7
- export { a2 as RevisionBatchEntry, a3 as RevisionBatchResult, a4 as RevisionBatchSkipReason } from './types-barrel-BFKR8Pzp.js';
1
+ /**
2
+ * `@docx-editor.dev/core/automation` — the host protocol document automation runs against.
3
+ *
4
+ * One interface with two implementations: a headless host owning bytes it opened, and a browser
5
+ * host borrowing the live editor's session. Both answer the same operations identically, because
6
+ * the operations are implemented once above this protocol.
7
+ *
8
+ * Everything here is transport-shaped — a handle is a NAME, never a pointer — so the same host
9
+ * works behind a worker port, an HTTP boundary, or nothing at all.
10
+ *
11
+ * @packageDocumentation
12
+ * @public
13
+ */
14
+ import { A as AutomationOperation, a as AutomationCapabilities, b as AutomationHost } from './protocol-DYzzz2ej.js';
15
+ export { c as AutomationAlignment, d as AutomationBatchRequest, e as AutomationBatchResponse, f as AutomationChangeEvent, g as AutomationContentControlLock, h as AutomationContentControlRangeLocation, i as AutomationContentControlScope, j as AutomationContentControlSubtype, k as AutomationContentControlValue, l as AutomationError, m as AutomationErrorCode, n as AutomationFontRead, o as AutomationFontWrite, p as AutomationHandle, q as AutomationHandleRef, r as AutomationObjectKind, s as AutomationOperationKind, t as AutomationOperationResult, u as AutomationPageOrientation, v as AutomationPageSetupRead, w as AutomationPageSetupWrite, x as AutomationParagraphFormatRead, y as AutomationParagraphFormatWrite, z as AutomationParagraphRef, B as AutomationPoint, C as AutomationReadingOrder, D as AutomationSaveResult, E as AutomationSearchOptions, F as AutomationSelectionMode, G as AutomationSpan, H as AutomationSpanRef, I as AutomationTextProjection, J as AutomationUnsubscribe, K as AutomationValue } from './protocol-DYzzz2ej.js';
16
+ import { c as HeaderFooterVariant, N as NoteKind } from './tree-package-store-CovjNARF.js';
17
+ import { T as TextMeasurer, S as SemanticLayout } from './semantic-records-DQmumPgL.js';
18
+ import { H as HeadlessDocumentView } from './headless-document-view-pp3q7wIh.js';
19
+ import { ao as OoxmlPackageLimits, aj as OoxmlPackageRejection } from './types-barrel-DuC5QBNC.js';
20
+ export { ap as RevisionAuthorEntry, a8 as RevisionAuthorResult, aq as RevisionAuthorSkipReason, ar as RevisionBatchEntry, a9 as RevisionBatchResult, as as RevisionBatchSkipDetail, at as RevisionBatchSkipReason, au as RevisionSiteRefusal } from './types-barrel-DuC5QBNC.js';
8
21
  import { CollaborationModuleContribution } from './collaboration.js';
9
- import './image-resources-BDFxcu7W.js';
10
- import './revision-projection-CSNFudZY.js';
11
- import './omml-equation-DuczgG5o.js';
12
- import './editor-scope-OHPwVQ5l.js';
22
+ import { B as ByteSizeBucket, b as CountBucket, f as DocumentOpenDiagnosticCode, i as ReviewDiagnosticCode, E as EditDiagnosticCode } from './diagnostic-hints-BeVjfNOv.js';
23
+ export { C as CollaborationDiagnosticCode, c as CustomNodeDiagnosticCode, d as DiagnosticCode, D as DiagnosticErrorName, e as DiagnosticExplanation, a as DocumentPartKind, F as FailureStage, g as FontDiagnosticCode, h as FormattingChangeKind, H as HistoryDiagnosticCode, P as PerformanceDiagnosticCode, R as ReviewChangeKind, j as ReviewOperation, k as diagnosticCodes, l as explainDiagnostic } from './diagnostic-hints-BeVjfNOv.js';
24
+ export { a as diagnosticCause, d as diagnosticCauses, b as diagnosticErrorName, c as documentPartKind, e as exceptionCause } from './diagnostic-context-B8M79cfK.js';
25
+ import './image-resources-tXLQShoC.js';
26
+ import './omml-equation-BUbU0utM.js';
27
+ import './editor-scope-7o9xweiJ.js';
13
28
  import './collaboration/replication.js';
14
- import './failure-BIPVQbRm.js';
29
+ import './failure-NS2lsya4.js';
15
30
 
16
31
  /** The variants a section can declare furniture for. */
17
32
  declare const HEADER_FOOTER_VARIANTS: readonly HeaderFooterVariant[];
@@ -50,7 +65,7 @@ type AutomationShapeOwnerStory = {
50
65
  /** Operations that read. They never open a transaction. */
51
66
  declare const AUTOMATION_QUERY_OPERATIONS: readonly ["getTables", "getTable", "getTableRows", "getTableCells", "getTableCell", "getTableCellProperties", "getTableCellBody", "getFields", "getField", "getInlinePictures", "getInlinePicture", "getShapes", "getShape", "getShapeBody", "getChangeTrackingMode", "getDocument", "getDocumentProperty", "getBody", "getParagraphs", "getRange", "getSpanParagraphs", "getText", "getSpanText", "getParagraphId", "search", "getFont", "getParagraphFormat", "getStyle", "getSections", "getPageSetup", "getFurniture", "getNotes", "getNoteBody", "getNoteText", "getNoteKind", "getLists", "getListId", "getListById", "getListParagraphs", "getParagraphList", "getListLevel", "getHyperlink", "getBookmarks", "getBookmarkName", "getBookmarkRange", "getComments", "getCommentReplies", "getCommentId", "getCommentAuthor", "getCommentDate", "getCommentText", "getCommentRange", "getCommentResolved", "getRevisions", "getRevisionType", "getRevisionAuthor", "getRevisionDate", "getRevisionRange", "getContentControls", "getContentControlById", "getContentControlsByTag", "getContentControlsByTitle", "getContentControlTag", "getContentControlTitle", "getContentControlFileId", "getContentControlSubtype", "getContentControlLock", "getContentControlIsBound", "getContentControlPlaceholderShown", "getContentControlTemporary", "getContentControlText", "getContentControlParagraphs", "getContentControlRange"];
52
67
  /** Operations that write. Every one of these goes through the single transaction path. */
53
- declare const AUTOMATION_COMMAND_OPERATIONS: readonly ["removeDocumentInformation", "setDocumentProperties", "insertTableRows", "insertTable", "updateTable", "updateTableCell", "setInlinePicture", "deleteInlinePicture", "insertField", "setFieldCode", "deleteField", "updateFieldResult", "insertInlinePicture", "insertBreak", "setChangeTrackingMode", "proposeInsertion", "proposeDeletion", "proposeReplacement", "insertText", "replaceSpan", "replaceStoryBlocks", "insertParagraph", "splitParagraph", "deleteParagraph", "selectSpan", "selectBookmark", "setFont", "setParagraphFormat", "setStyle", "setPageSetup", "deleteNote", "setListLevel", "startNewList", "attachToList", "detachFromList", "setListLevelFormat", "insertListParagraph", "setHyperlink", "insertComment", "setCommentResolved", "replyToComment", "deleteComment", "acceptRevision", "rejectRevision", "resolveRevisionBatch", "acceptAllRevisions", "rejectAllRevisions", "setContentControlValue", "setContentControlProperties", "deleteContentControl", "insertContentControlText", "insertContentControl", "insertCustomNode"];
68
+ declare const AUTOMATION_COMMAND_OPERATIONS: readonly ["removeDocumentInformation", "setDocumentProperties", "insertTableRows", "insertTable", "updateTable", "updateTableCell", "setInlinePicture", "deleteInlinePicture", "insertField", "setFieldCode", "deleteField", "updateFieldResult", "insertInlinePicture", "insertBreak", "setChangeTrackingMode", "proposeInsertion", "proposeDeletion", "proposeReplacement", "insertText", "replaceSpan", "replaceStoryBlocks", "insertParagraph", "splitParagraph", "deleteParagraph", "selectSpan", "selectBookmark", "setFont", "setParagraphFormat", "setStyle", "setPageSetup", "deleteNote", "setListLevel", "startNewList", "attachToList", "detachFromList", "setListLevelFormat", "insertListParagraph", "setHyperlink", "insertComment", "setCommentResolved", "replyToComment", "deleteComment", "acceptRevision", "rejectRevision", "resolveRevisionBatch", "setRevisionAuthorBatch", "acceptAllRevisions", "rejectAllRevisions", "setContentControlValue", "setContentControlProperties", "deleteContentControl", "insertContentControlText", "insertContentControl", "insertCustomNode"];
54
69
  /**
55
70
  * Commands that commit as a PACKAGE transaction and therefore share a batch with nothing.
56
71
  *
@@ -64,7 +79,7 @@ declare const AUTOMATION_COMMAND_OPERATIONS: readonly ["removeDocumentInformatio
64
79
  * and shares its batch, and some `updateTable` mutations travel alone. Classify one operation
65
80
  * with {@link isSolitaryAutomationCommand}, not by membership here.
66
81
  */
67
- declare const AUTOMATION_SOLITARY_OPERATIONS: readonly ["removeDocumentInformation", "insertTableRows", "resolveRevisionBatch", "insertTable", "insertInlinePicture", "insertBreak", "startNewList", "deleteNote", "insertComment", "setCommentResolved", "replyToComment", "insertCustomNode"];
82
+ declare const AUTOMATION_SOLITARY_OPERATIONS: readonly ["removeDocumentInformation", "insertTableRows", "resolveRevisionBatch", "setRevisionAuthorBatch", "insertTable", "insertInlinePicture", "insertBreak", "startNewList", "deleteNote", "insertComment", "setCommentResolved", "replyToComment", "insertCustomNode"];
68
83
  /** Whether an operation must be the only one in its batch. */
69
84
  declare function isSolitaryAutomationCommand(operation: AutomationOperation): boolean;
70
85
  /** Whether an operation writes. Drives the query/command split inside one batch. */
@@ -145,5 +160,50 @@ interface ServerAutomationHostOptions {
145
160
  */
146
161
  declare function createServerAutomationHost(bytes: Uint8Array, options?: ServerAutomationHostOptions): ServerAutomationHostResult;
147
162
 
148
- export { AUTOMATION_COMMAND_OPERATIONS, AUTOMATION_QUERY_OPERATIONS, AUTOMATION_SOLITARY_OPERATIONS, AutomationCapabilities, AutomationHost, AutomationOperation, HEADER_FOOTER_VARIANTS, SERVER_AUTOMATION_CAPABILITIES, createAutomationPaginationProvider, createServerAutomationHost, isAutomationCommand, isSolitaryAutomationCommand, paginationSnapshotOf };
149
- export type { AutomationPaginationOptions, AutomationPaginationProvider, AutomationPaginationSnapshot, AutomationStoryId, ServerAutomationHostOptions, ServerAutomationHostRejection, ServerAutomationHostResult };
163
+ /**
164
+ * Anonymous diagnostics, the neutral half: store reasons → public codes, size and count
165
+ * buckets, and one delivery path. The browser editor and the headless automation runtime both
166
+ * build their diagnostics here, so a refusal gets the same public code on either host.
167
+ *
168
+ * Only the RESULT of a lookup leaves the engine. A raw reason can be a sentence, and a package
169
+ * `detail` can name parts of the file, so neither is ever copied into a diagnostic.
170
+ */
171
+
172
+ /**
173
+ * The public code for a refused open. `too-large` is the one reason two layers share: the
174
+ * archive reports it WITH the limit it crossed, a single XML part reports it without one.
175
+ *
176
+ * @public
177
+ */
178
+ declare function openDiagnosticCode(reason: string, limit?: string): DocumentOpenDiagnosticCode;
179
+ /**
180
+ * The public code for a store or host refusal reason, or `null` for a reason this table does
181
+ * not know (a sentence, a binding reason). `unsupported-revision:<kind>` counts as
182
+ * `unsupported-revision`.
183
+ *
184
+ * @public
185
+ */
186
+ declare function storeEditDiagnosticCode(reason: string): EditDiagnosticCode | null;
187
+ /** The public code for a skipped tracked change, or null for a reason with no public code. */
188
+ declare function reviewDiagnosticCode(reason: string): ReviewDiagnosticCode | null;
189
+ /** The power-of-two bucket of a byte size. */
190
+ declare function byteSizeBucket(bytes: number): ByteSizeBucket;
191
+ /** The order-of-magnitude bucket of a count. */
192
+ declare function countBucket(count: number): CountBucket;
193
+ /** A diagnostic without the fields the emitter adds. Distributes over the union. */
194
+ type DiagnosticPayload<T> = T extends unknown ? Omit<T, 'schemaVersion' | 'editorSessionId' | 'time'> : never;
195
+ /** One delivery path for one editor or runtime instance. */
196
+ interface DiagnosticEmitter<E> {
197
+ /** Random for this instance and never stored. */
198
+ readonly editorSessionId: string;
199
+ /** Stamp the payload and hand it to every listener. A listener that throws is ignored. */
200
+ deliver(payload: DiagnosticPayload<E>): void;
201
+ }
202
+ /**
203
+ * A delivery path over `listeners`, read at each delivery so a later listener is heard. Generic
204
+ * over the event union, which the editor contracts own: this lane never names them.
205
+ */
206
+ declare function createDiagnosticEmitter<E>(listeners: () => Iterable<(event: E) => unknown>, now?: () => number): DiagnosticEmitter<E>;
207
+
208
+ export { AUTOMATION_COMMAND_OPERATIONS, AUTOMATION_QUERY_OPERATIONS, AUTOMATION_SOLITARY_OPERATIONS, AutomationCapabilities, AutomationHost, AutomationOperation, ByteSizeBucket, CountBucket, DocumentOpenDiagnosticCode, EditDiagnosticCode, HEADER_FOOTER_VARIANTS, ReviewDiagnosticCode, SERVER_AUTOMATION_CAPABILITIES, byteSizeBucket, countBucket, createAutomationPaginationProvider, createDiagnosticEmitter, createServerAutomationHost, isAutomationCommand, isSolitaryAutomationCommand, openDiagnosticCode, paginationSnapshotOf, reviewDiagnosticCode, storeEditDiagnosticCode };
209
+ export type { AutomationPaginationOptions, AutomationPaginationProvider, AutomationPaginationSnapshot, AutomationStoryId, DiagnosticEmitter, DiagnosticPayload, ServerAutomationHostOptions, ServerAutomationHostRejection, ServerAutomationHostResult };
@@ -1 +1 @@
1
- import {m,g,d}from'./chunk-S74GRBNE.js';export{i as AUTOMATION_COMMAND_OPERATIONS,h as AUTOMATION_QUERY_OPERATIONS,j as AUTOMATION_SOLITARY_OPERATIONS,f as HEADER_FOOTER_VARIANTS,e as createAutomationPaginationProvider,l as isAutomationCommand,k as isSolitaryAutomationCommand,c as paginationSnapshotOf}from'./chunk-S74GRBNE.js';import'./chunk-KAXOGCGA.js';import'./chunk-VIPMGGUT.js';import'./chunk-ZU7IVN6G.js';import'./chunk-6ZQMII6V.js';import {X,Xa,bb,qa,ia,ga,ha}from'./chunk-GWQJ5774.js';import {b,a}from'./chunk-DNXVNQEO.js';import {ne,qb,oe,tb,Fa,og,b as b$1}from'./chunk-UMRSBLO7.js';var j=Object.freeze({document:true,save:true,events:true,selection:false,scrolling:false,layout:false}),D=Object.freeze({kind:"body"});function Y(o,t={}){let m$1=ne(o,t.limits??{});if(!m$1.ok)return {ok:false,reason:m$1.reason,...m$1.limit===void 0?{}:{limit:m$1.limit},...m$1.detail?{detail:m$1.detail}:{}};let p=m$1.package.parts.get(m$1.package.mainDocumentPart);if(!p)return {ok:false,reason:"no-main-document-part",detail:m$1.package.mainDocumentPart};let u=new X(m$1.package,Xa(m$1.package,qb(p))),y=t.collaborationModel?.session,c=()=>{},n=K(u,y,()=>c());if(t.pagination){let i,l=-1,e=t.pagination;n.prepare=async f=>{if(!f.operations.some(s=>s.op==="updateFieldResult"))return;i=void 0;let a=u.packageRevision,d=await e(bb(u));u.packageRevision===a&&(i=d,l=a);},n.fieldPageContext=(f,a,d$1)=>{if(u.packageRevision!==l)return null;let s=g(u.currentPackage()).story(f);return s?d(i,s.part,a,d$1):null};}let r=m({port:n,capabilities:j});return y&&(c=y.attach(b(u,{documentId:y.documentId}))),{ok:true,host:r}}function G(o,t,m){let p=o.partFor(m);return p?Fa(o,()=>{let u=og(o.currentPackage(),t,p.name);return u?(o.replacePackageShell(u.pkg),u.relationshipId):null},u=>u!==null):null}function K(o,t,m=()=>{}){let p=true,u=0,y=()=>t?(u+=1,{origin:t.identity.role==="agent"?b$1.mutationAgent:b$1.mutationHuman,actorId:t.identity.actorId,operationId:`${t.identity.actorId}:${t.sessionId}:automation:${u}`,recordsHistory:false}):{},c=n=>(t?.flushPendingJournals(),n);return {localChangeTracking:true,collaborative:()=>!!t,revision:()=>o.packageRevision,currentPackage:()=>p?o.currentPackage():null,apply(n,r=D,i=[]){if(!p)return {ok:false,reason:"disposed"};let l=n(d=>tb(t?.identity.actorId,()=>G(o,d,r)));if(l===null)return {ok:false,reason:"unsupported-target"};let e=t?.gateOperations(l,r);if(e)return {ok:false,reason:e};let f=t?o.partFor(r)?.name:void 0,a$1=o.transact(r,d=>{for(let s of i)d.applyPackage(s);for(let s of l)d.apply(s);f&&d.applyPackage(s=>a(s,f,l));},y());return a$1.ok?c({ok:true,changed:a$1.change!==null}):{ok:false,reason:a$1.detail?`${a$1.reason}: ${a$1.detail}`:a$1.reason}},applyLifecycle(n){if(!p)return {ok:false,reason:"disposed"};let r=t?.gateOperations([n],D);if(r)return {ok:false,reason:r};let i=tb(t?.identity.actorId,()=>o.applyLifecycleOp(n));return i.ok?c({ok:true,changed:i.change!==null}):{ok:false,reason:i.detail?`${i.reason}: ${i.detail}`:i.reason}},applyCommentWrites(n,r){if(!p)return {ok:false,reason:"disposed"};if(n.length===0)return {ok:true,changed:false};let i=t?.gateOperations([],r);if(i)return {ok:false,reason:i};let l=o.resolveStory(r);if(!l.ok)return {ok:false,reason:l.reason};if(l.store.graftPackage(()=>o.currentPackage()),n.every(a=>a.kind==="delete")){let a=n.find(s=>s.kind==="delete"),d=tb(t?.identity.actorId,()=>ia(o,n.flatMap(s=>s.kind==="delete"?[{commentId:s.commentId,...s.parentCommentId===void 0?{}:{parentCommentId:s.parentCommentId}}]:[]),r,a?.kind==="delete"?a.noteId:void 0));return d?c({ok:true,changed:d}):{ok:false,reason:"comment-delete-refused"}}if(n.length!==1)return {ok:false,reason:"mixed-comment-writes"};let e=n[0];if(e.kind==="create"||e.kind==="reply"){let a=tb(t?.identity.actorId,()=>ga(o,{anchor:e.anchor,author:e.author,text:e.text,...e.date===void 0?{}:{date:e.date},...e.kind==="reply"?{replyToCommentId:e.parentCommentId}:{}},r));return a.ok?c({ok:true,changed:true,..."commentId"in a?{commentId:a.commentId}:{}}):{ok:false,reason:a.reason}}if(e.kind!=="resolve")return {ok:false,reason:"unsupported-comment-write"};let f=tb(t?.identity.actorId,()=>ha(o,e.commentId,e.resolved));return f.ok?c({ok:true,changed:true}):{ok:false,reason:f.reason}},applyCustomNodeWrite(n,r){if(!p)return {ok:false,reason:"disposed"};let i=t?.gateOperations([],r);if(i)return {ok:false,reason:i};let l=o.resolveStory(r);if(!l.ok)return {ok:false,reason:l.reason};let e=tb(t?.identity.actorId,()=>qa(o,n,r));return e.ok?c({ok:true,changed:e.change!==null}):{ok:false,reason:e.detail?`${e.reason}: ${e.detail}`:e.reason}},save:()=>p?oe(o.currentPackage()):null,subscribe:n=>o.subscribe(()=>n()),dispose(){m(),p=false;}}}export{j as SERVER_AUTOMATION_CAPABILITIES,Y as createServerAutomationHost};
1
+ export{e as AUTOMATION_COMMAND_OPERATIONS,d as AUTOMATION_QUERY_OPERATIONS,f as AUTOMATION_SOLITARY_OPERATIONS,c as HEADER_FOOTER_VARIANTS,n as SERVER_AUTOMATION_CAPABILITIES,u as byteSizeBucket,v as countBucket,l as createAutomationPaginationProvider,w as createDiagnosticEmitter,o as createServerAutomationHost,y as diagnosticCause,x as diagnosticCauses,q as diagnosticCodes,A as diagnosticErrorName,B as documentPartKind,z as exceptionCause,p as explainDiagnostic,h as isAutomationCommand,g as isSolitaryAutomationCommand,r as openDiagnosticCode,j as paginationSnapshotOf,t as reviewDiagnosticCode,s as storeEditDiagnosticCode}from'./chunk-LQX36Z5P.js';import'./chunk-E4LOMDNL.js';import'./chunk-CPWLFPWC.js';import'./chunk-RCLZXP3B.js';import'./chunk-LSZ6KPKK.js';import'./chunk-U4JZVSOE.js';import'./chunk-OMCG63ZF.js';import'./chunk-YQ5G6LC7.js';
package/dist/binding.cjs CHANGED
@@ -1 +1 @@
1
- 'use strict';var chunkCWRBFNK5_cjs=require('./chunk-CWRBFNK5.cjs');require('./chunk-LZLTN5A3.cjs'),require('./chunk-2GK7YQB2.cjs'),require('./chunk-K246T47S.cjs'),require('./chunk-AVKVRU7Z.cjs'),require('./chunk-GVUOWHTO.cjs'),require('./chunk-4KZ6L5YF.cjs');Object.defineProperty(exports,"PROJECTION_ORIGIN",{enumerable:true,get:function(){return chunkCWRBFNK5_cjs.k}});Object.defineProperty(exports,"bodyParagraphs",{enumerable:true,get:function(){return chunkCWRBFNK5_cjs.c}});Object.defineProperty(exports,"docToTreeOps",{enumerable:true,get:function(){return chunkCWRBFNK5_cjs.f}});Object.defineProperty(exports,"mountTreeSurface",{enumerable:true,get:function(){return chunkCWRBFNK5_cjs.l}});Object.defineProperty(exports,"openTreeSession",{enumerable:true,get:function(){return chunkCWRBFNK5_cjs.j}});Object.defineProperty(exports,"partHasNode",{enumerable:true,get:function(){return chunkCWRBFNK5_cjs.g}});Object.defineProperty(exports,"reconcileDoc",{enumerable:true,get:function(){return chunkCWRBFNK5_cjs.h}});Object.defineProperty(exports,"runPropsOf",{enumerable:true,get:function(){return chunkCWRBFNK5_cjs.b}});Object.defineProperty(exports,"treeSchema",{enumerable:true,get:function(){return chunkCWRBFNK5_cjs.a}});Object.defineProperty(exports,"treeToDoc",{enumerable:true,get:function(){return chunkCWRBFNK5_cjs.e}});
1
+ 'use strict';var chunk6JPL6ZAS_cjs=require('./chunk-6JPL6ZAS.cjs');require('./chunk-BY2ACZZ6.cjs'),require('./chunk-7WQ7AAHW.cjs'),require('./chunk-MM5QBMTE.cjs'),require('./chunk-T6K2QYNZ.cjs'),require('./chunk-UHHYFIDT.cjs'),require('./chunk-OSFOJTHU.cjs');Object.defineProperty(exports,"PROJECTION_ORIGIN",{enumerable:true,get:function(){return chunk6JPL6ZAS_cjs.l}});Object.defineProperty(exports,"bodyParagraphs",{enumerable:true,get:function(){return chunk6JPL6ZAS_cjs.c}});Object.defineProperty(exports,"docToTreeOps",{enumerable:true,get:function(){return chunk6JPL6ZAS_cjs.f}});Object.defineProperty(exports,"mountTreeSurface",{enumerable:true,get:function(){return chunk6JPL6ZAS_cjs.m}});Object.defineProperty(exports,"openTreeSession",{enumerable:true,get:function(){return chunk6JPL6ZAS_cjs.j}});Object.defineProperty(exports,"partHasNode",{enumerable:true,get:function(){return chunk6JPL6ZAS_cjs.g}});Object.defineProperty(exports,"reconcileDoc",{enumerable:true,get:function(){return chunk6JPL6ZAS_cjs.h}});Object.defineProperty(exports,"runPropsOf",{enumerable:true,get:function(){return chunk6JPL6ZAS_cjs.b}});Object.defineProperty(exports,"treeSchema",{enumerable:true,get:function(){return chunk6JPL6ZAS_cjs.a}});Object.defineProperty(exports,"treeToDoc",{enumerable:true,get:function(){return chunk6JPL6ZAS_cjs.e}});
package/dist/binding.d.ts CHANGED
@@ -1,18 +1,35 @@
1
+ /**
2
+ * `@docx-editor.dev/core/binding` — the canonical tree ↔ ProseMirror binding.
3
+ *
4
+ * Forward: project one revision of the tree into a ProseMirror doc. Reverse: explain an edited
5
+ * doc as the smallest set of tree ops, or REFUSE. The reverse direction never reconstructs the
6
+ * tree from the projection, so anything the projection does not model stays carried by the tree.
7
+ *
8
+ * @packageDocumentation
9
+ * @public
10
+ */
1
11
  import { Node, Schema } from 'prosemirror-model';
2
- import { X as OoxmlProperty, Y as OoxmlPackageRejection } from './types-barrel-BFKR8Pzp.js';
3
- import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-DQVJOOkv.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-DQVJOOkv.js';
12
+ import { ah as OoxmlProperty, ai as OoxmlPackageResult, aj as OoxmlPackageRejection } from './types-barrel-DuC5QBNC.js';
13
+ import { T as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-contract-CZVAGl51.js';
14
+ export { D as DocumentStyleEntry, M as MapResult, b as TreeApplyOptions, c as TreeBindingRejection, d as bodyParagraphs, e as docToTreeOps, p as partHasNode, r as reconcileDoc, t as treeToDoc } from './tree-session-contract-CZVAGl51.js';
5
15
  import { ReviewModuleContribution } from './contracts/modules.js';
6
- export { S as StoryScope, a as StoryTargetRejection } from './tree-package-fragment-DYZIk1rY.js';
16
+ export { S as StoryScope, a as StoryTargetRejection } from './tree-package-store-CovjNARF.js';
7
17
  import { EditorView } from 'prosemirror-view';
8
- import './editor-scope-OHPwVQ5l.js';
9
- import './image-resources-BDFxcu7W.js';
10
- import './custom-node-writes-Vzpq9I8_.js';
11
- import './headless-document-view-ICYqNkQ1.js';
18
+ import './editor-scope-7o9xweiJ.js';
19
+ import './image-resources-tXLQShoC.js';
20
+ import './custom-node-writes-Bn6uciLb.js';
21
+ import './headless-document-view-pp3q7wIh.js';
12
22
  import './collaboration/replication.js';
13
- import './revision-projection-CSNFudZY.js';
23
+ import './semantic-records-DQmumPgL.js';
24
+ import './omml-equation-BUbU0utM.js';
25
+ import './editor-CZQZmTIU.js';
26
+ import './contracts/document.js';
27
+ import './contracts/interaction.js';
28
+ import './semantic-interaction-kR_QB845.js';
29
+ import './document-protection-CUb55pl_.js';
30
+ import './failure-NS2lsya4.js';
31
+ import './diagnostic-hints-BeVjfNOv.js';
14
32
  import './collaboration.js';
15
- import './failure-BIPVQbRm.js';
16
33
 
17
34
  /** Attributes carried by a projected paragraph. */
18
35
  interface ParagraphAttrs {
@@ -75,9 +92,11 @@ type TreeSessionRejection = OoxmlPackageRejection | 'no-main-document-tree';
75
92
  type OpenTreeSessionResult = {
76
93
  readonly ok: true;
77
94
  readonly session: TreeDocxSession;
78
- } | {
95
+ } | Extract<OoxmlPackageResult, {
96
+ readonly ok: false;
97
+ }> | {
79
98
  readonly ok: false;
80
- readonly reason: TreeSessionRejection;
99
+ readonly reason: 'no-main-document-tree';
81
100
  readonly detail?: string;
82
101
  };
83
102
  interface OpenTreeSessionOptions {
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-7MYITTAH.js';import'./chunk-HAQ72KD7.js';import'./chunk-ZU7IVN6G.js';import'./chunk-6ZQMII6V.js';import'./chunk-GWQJ5774.js';import'./chunk-DNXVNQEO.js';import'./chunk-UMRSBLO7.js';
1
+ export{l as PROJECTION_ORIGIN,c as bodyParagraphs,f as docToTreeOps,m as mountTreeSurface,j as openTreeSession,g as partHasNode,h as reconcileDoc,b as runPropsOf,a as treeSchema,e as treeToDoc}from'./chunk-BCXH4BXB.js';import'./chunk-G4HOFIKJ.js';import'./chunk-RCLZXP3B.js';import'./chunk-LSZ6KPKK.js';import'./chunk-U4JZVSOE.js';import'./chunk-OMCG63ZF.js';import'./chunk-YQ5G6LC7.js';