@arbidocs/blocks 0.4.100 → 0.4.102

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 (225) hide show
  1. package/dist/agents/index.cjs +207 -207
  2. package/dist/agents/index.js +2 -2
  3. package/dist/{chunk-NJX774HB.js → chunk-5NQIBJPP.js} +3 -3
  4. package/dist/{chunk-NJX774HB.js.map → chunk-5NQIBJPP.js.map} +1 -1
  5. package/dist/chunk-6MG62I5B.cjs +272 -0
  6. package/dist/chunk-6MG62I5B.cjs.map +1 -0
  7. package/dist/{chunk-NW3LFDZL.cjs → chunk-DDYXFALG.cjs} +3 -3
  8. package/dist/{chunk-NW3LFDZL.cjs.map → chunk-DDYXFALG.cjs.map} +1 -1
  9. package/dist/chunk-EQB3WELX.js +269 -0
  10. package/dist/chunk-EQB3WELX.js.map +1 -0
  11. package/dist/{chunk-B7P73VHX.cjs → chunk-FAGQTB3D.cjs} +30 -214
  12. package/dist/chunk-FAGQTB3D.cjs.map +1 -0
  13. package/dist/{chunk-6HZNFOHW.js → chunk-G5JH2YMQ.js} +3 -3
  14. package/dist/{chunk-6HZNFOHW.js.map → chunk-G5JH2YMQ.js.map} +1 -1
  15. package/dist/{chunk-72PQ42YI.js → chunk-MYALCKDR.js} +34 -217
  16. package/dist/chunk-MYALCKDR.js.map +1 -0
  17. package/dist/{chunk-O24WPHLD.cjs → chunk-Y5XW57U4.cjs} +5 -5
  18. package/dist/{chunk-O24WPHLD.cjs.map → chunk-Y5XW57U4.cjs.map} +1 -1
  19. package/dist/{chunk-E2QWWLK5.js → chunk-YGREW5TZ.js} +3 -3
  20. package/dist/{chunk-E2QWWLK5.js.map → chunk-YGREW5TZ.js.map} +1 -1
  21. package/dist/{chunk-IE55TWIG.cjs → chunk-ZT2EBBSC.cjs} +5 -5
  22. package/dist/{chunk-IE55TWIG.cjs.map → chunk-ZT2EBBSC.cjs.map} +1 -1
  23. package/dist/connect/docx.cjs +6 -6
  24. package/dist/connect/docx.js +4 -4
  25. package/dist/connect/index.cjs +3 -3
  26. package/dist/connect/index.js +2 -2
  27. package/dist/document-tools/AdoptSignatureDialog.d.ts +25 -0
  28. package/dist/document-tools/DocumentToolButtons.d.ts +2 -0
  29. package/dist/document-tools/SignatureRequestBanner.d.ts +18 -0
  30. package/dist/document-tools/index.cjs +175 -0
  31. package/dist/document-tools/index.cjs.map +1 -1
  32. package/dist/document-tools/index.d.ts +3 -1
  33. package/dist/document-tools/index.js +168 -3
  34. package/dist/document-tools/index.js.map +1 -1
  35. package/dist/document-tools/viewer/GuidedSigningViewer.d.ts +26 -0
  36. package/dist/document-tools/viewer/SignatureFieldsOverlay.d.ts +41 -0
  37. package/dist/document-tools/viewer/SignatureRequestEditor.d.ts +26 -0
  38. package/dist/document-tools/viewer/index.cjs +983 -0
  39. package/dist/document-tools/viewer/index.cjs.map +1 -1
  40. package/dist/document-tools/viewer/index.d.ts +3 -0
  41. package/dist/document-tools/viewer/index.js +983 -5
  42. package/dist/document-tools/viewer/index.js.map +1 -1
  43. package/dist/docx/NativeDocxEditor.d.ts +1 -1
  44. package/dist/docx/definitions/DefinedTerms.d.ts +1 -12
  45. package/dist/docx/definitions/commands.d.ts +3 -27
  46. package/dist/docx/index.cjs +35 -39
  47. package/dist/docx/index.d.ts +1 -1
  48. package/dist/docx/index.js +3 -3
  49. package/dist/facts/index.cjs +1 -1
  50. package/dist/facts/index.js +1 -1
  51. package/dist/files/index.cjs +1 -1
  52. package/dist/files/index.js +1 -1
  53. package/dist/home/index.cjs +1 -1
  54. package/dist/home/index.js +1 -1
  55. package/dist/index.cjs +253 -253
  56. package/dist/index.js +3 -3
  57. package/dist/shell/index.cjs +1 -1
  58. package/dist/shell/index.js +1 -1
  59. package/dist/studio/index.cjs +1 -1
  60. package/dist/studio/index.js +1 -1
  61. package/dist/workflow-canvas/index.cjs +9 -9
  62. package/dist/workflow-canvas/index.js +2 -2
  63. package/node_modules/@arbidocs/coedit/LICENSE +21 -0
  64. package/node_modules/@arbidocs/coedit/dist/encoding.cjs +751 -0
  65. package/node_modules/@arbidocs/coedit/dist/encoding.cjs.map +1 -0
  66. package/node_modules/@arbidocs/coedit/dist/encoding.d.cts +192 -0
  67. package/node_modules/@arbidocs/coedit/dist/encoding.d.ts +192 -0
  68. package/node_modules/@arbidocs/coedit/dist/encoding.js +716 -0
  69. package/node_modules/@arbidocs/coedit/dist/encoding.js.map +1 -0
  70. package/node_modules/@arbidocs/coedit/dist/hocuspocus.cjs +1759 -0
  71. package/node_modules/@arbidocs/coedit/dist/hocuspocus.cjs.map +1 -0
  72. package/node_modules/@arbidocs/coedit/dist/hocuspocus.d.cts +39 -0
  73. package/node_modules/@arbidocs/coedit/dist/hocuspocus.d.ts +39 -0
  74. package/node_modules/@arbidocs/coedit/dist/hocuspocus.js +1736 -0
  75. package/node_modules/@arbidocs/coedit/dist/hocuspocus.js.map +1 -0
  76. package/node_modules/@arbidocs/coedit/dist/index.cjs +1692 -0
  77. package/node_modules/@arbidocs/coedit/dist/index.cjs.map +1 -0
  78. package/node_modules/@arbidocs/coedit/dist/index.d.cts +16 -0
  79. package/node_modules/@arbidocs/coedit/dist/index.d.ts +16 -0
  80. package/node_modules/@arbidocs/coedit/dist/index.js +1664 -0
  81. package/node_modules/@arbidocs/coedit/dist/index.js.map +1 -0
  82. package/node_modules/@arbidocs/coedit/dist/server.cjs +1852 -0
  83. package/node_modules/@arbidocs/coedit/dist/server.cjs.map +1 -0
  84. package/node_modules/@arbidocs/coedit/dist/server.d.cts +43 -0
  85. package/node_modules/@arbidocs/coedit/dist/server.d.ts +43 -0
  86. package/node_modules/@arbidocs/coedit/dist/server.js +1822 -0
  87. package/node_modules/@arbidocs/coedit/dist/server.js.map +1 -0
  88. package/node_modules/@arbidocs/coedit/dist/session-Cf9iu1Vt.d.cts +82 -0
  89. package/node_modules/@arbidocs/coedit/dist/session-Cf9iu1Vt.d.ts +82 -0
  90. package/node_modules/@arbidocs/coedit/dist/template.cjs +1627 -0
  91. package/node_modules/@arbidocs/coedit/dist/template.cjs.map +1 -0
  92. package/node_modules/@arbidocs/coedit/dist/template.d.cts +125 -0
  93. package/node_modules/@arbidocs/coedit/dist/template.d.ts +125 -0
  94. package/node_modules/@arbidocs/coedit/dist/template.js +1612 -0
  95. package/node_modules/@arbidocs/coedit/dist/template.js.map +1 -0
  96. package/node_modules/@arbidocs/coedit/dist/versions-DXiFQMA6.d.cts +8 -0
  97. package/node_modules/@arbidocs/coedit/dist/versions-DXiFQMA6.d.ts +8 -0
  98. package/node_modules/@arbidocs/coedit/package.json +68 -0
  99. package/node_modules/@docx-editor.dev/core/LICENSE +201 -0
  100. package/node_modules/@docx-editor.dev/core/README.md +125 -0
  101. package/node_modules/@docx-editor.dev/core/THIRD_PARTY_NOTICES.md +56 -0
  102. package/node_modules/@docx-editor.dev/core/dist/automation.cjs +1 -0
  103. package/node_modules/@docx-editor.dev/core/dist/automation.d.ts +162 -0
  104. package/node_modules/@docx-editor.dev/core/dist/automation.js +1 -0
  105. package/node_modules/@docx-editor.dev/core/dist/binding.cjs +1 -0
  106. package/node_modules/@docx-editor.dev/core/dist/binding.d.ts +164 -0
  107. package/node_modules/@docx-editor.dev/core/dist/binding.js +1 -0
  108. package/node_modules/@docx-editor.dev/core/dist/chunk-2GO5T2JU.cjs +1 -0
  109. package/node_modules/@docx-editor.dev/core/dist/chunk-2RC2EPND.js +3 -0
  110. package/node_modules/@docx-editor.dev/core/dist/chunk-4GBTELJV.cjs +28 -0
  111. package/node_modules/@docx-editor.dev/core/dist/chunk-4R3TEXMN.js +18 -0
  112. package/node_modules/@docx-editor.dev/core/dist/chunk-5CSUYANV.js +1 -0
  113. package/node_modules/@docx-editor.dev/core/dist/chunk-6APGXLBB.cjs +3 -0
  114. package/node_modules/@docx-editor.dev/core/dist/chunk-6AWEKBLB.cjs +1 -0
  115. package/node_modules/@docx-editor.dev/core/dist/chunk-6EYYL7FL.js +1 -0
  116. package/node_modules/@docx-editor.dev/core/dist/chunk-6JIJOZDW.js +1 -0
  117. package/node_modules/@docx-editor.dev/core/dist/chunk-BTQKU64Q.cjs +1 -0
  118. package/node_modules/@docx-editor.dev/core/dist/chunk-E7BQA6UP.js +2 -0
  119. package/node_modules/@docx-editor.dev/core/dist/chunk-EO4C5QJW.cjs +2 -0
  120. package/node_modules/@docx-editor.dev/core/dist/chunk-ETTO6GK3.js +1 -0
  121. package/node_modules/@docx-editor.dev/core/dist/chunk-FIJZIQXA.cjs +18 -0
  122. package/node_modules/@docx-editor.dev/core/dist/chunk-FRXAOVTB.js +28 -0
  123. package/node_modules/@docx-editor.dev/core/dist/chunk-J6BVWIDB.js +2 -0
  124. package/node_modules/@docx-editor.dev/core/dist/chunk-JGNVNT2A.cjs +2 -0
  125. package/node_modules/@docx-editor.dev/core/dist/chunk-K5U2PLDP.cjs +2 -0
  126. package/node_modules/@docx-editor.dev/core/dist/chunk-KKIJG3C6.js +2 -0
  127. package/node_modules/@docx-editor.dev/core/dist/chunk-LWDSDCMO.js +27 -0
  128. package/node_modules/@docx-editor.dev/core/dist/chunk-NBCVVZOM.cjs +1 -0
  129. package/node_modules/@docx-editor.dev/core/dist/chunk-O2AL2HSJ.cjs +1 -0
  130. package/node_modules/@docx-editor.dev/core/dist/chunk-O5INAWZQ.js +1 -0
  131. package/node_modules/@docx-editor.dev/core/dist/chunk-QMLCVPCD.cjs +1 -0
  132. package/node_modules/@docx-editor.dev/core/dist/chunk-RCHS4ZEH.cjs +27 -0
  133. package/node_modules/@docx-editor.dev/core/dist/chunk-RIYSCEFQ.js +2 -0
  134. package/node_modules/@docx-editor.dev/core/dist/chunk-S6J4O5XP.js +1 -0
  135. package/node_modules/@docx-editor.dev/core/dist/chunk-SRPILEWV.cjs +5 -0
  136. package/node_modules/@docx-editor.dev/core/dist/chunk-TSLBZ26X.js +1 -0
  137. package/node_modules/@docx-editor.dev/core/dist/chunk-UKVVUHZL.cjs +1 -0
  138. package/node_modules/@docx-editor.dev/core/dist/chunk-VDNNLG6X.js +2 -0
  139. package/node_modules/@docx-editor.dev/core/dist/chunk-VHAVHCQY.js +7 -0
  140. package/node_modules/@docx-editor.dev/core/dist/chunk-VX43VBAX.cjs +7 -0
  141. package/node_modules/@docx-editor.dev/core/dist/chunk-Z6WBFXJU.js +5 -0
  142. package/node_modules/@docx-editor.dev/core/dist/chunk-ZUHOMK52.cjs +2 -0
  143. package/node_modules/@docx-editor.dev/core/dist/collaboration/replication.cjs +1 -0
  144. package/node_modules/@docx-editor.dev/core/dist/collaboration/replication.d.ts +270 -0
  145. package/node_modules/@docx-editor.dev/core/dist/collaboration/replication.js +1 -0
  146. package/node_modules/@docx-editor.dev/core/dist/collaboration.cjs +1 -0
  147. package/node_modules/@docx-editor.dev/core/dist/collaboration.d.ts +269 -0
  148. package/node_modules/@docx-editor.dev/core/dist/collaboration.js +1 -0
  149. package/node_modules/@docx-editor.dev/core/dist/contracts/document.cjs +1 -0
  150. package/node_modules/@docx-editor.dev/core/dist/contracts/document.d.ts +290 -0
  151. package/node_modules/@docx-editor.dev/core/dist/contracts/document.js +0 -0
  152. package/node_modules/@docx-editor.dev/core/dist/contracts/editor.cjs +1 -0
  153. package/node_modules/@docx-editor.dev/core/dist/contracts/editor.d.ts +22 -0
  154. package/node_modules/@docx-editor.dev/core/dist/contracts/editor.js +1 -0
  155. package/node_modules/@docx-editor.dev/core/dist/contracts/interaction.cjs +1 -0
  156. package/node_modules/@docx-editor.dev/core/dist/contracts/interaction.d.ts +103 -0
  157. package/node_modules/@docx-editor.dev/core/dist/contracts/interaction.js +0 -0
  158. package/node_modules/@docx-editor.dev/core/dist/contracts/modules.cjs +1 -0
  159. package/node_modules/@docx-editor.dev/core/dist/contracts/modules.d.ts +143 -0
  160. package/node_modules/@docx-editor.dev/core/dist/contracts/modules.js +1 -0
  161. package/node_modules/@docx-editor.dev/core/dist/contracts/types.cjs +1 -0
  162. package/node_modules/@docx-editor.dev/core/dist/contracts/types.d.ts +11 -0
  163. package/node_modules/@docx-editor.dev/core/dist/contracts/types.js +0 -0
  164. package/node_modules/@docx-editor.dev/core/dist/custom-node-writes-cvL5rhcD.d.ts +323 -0
  165. package/node_modules/@docx-editor.dev/core/dist/dist-PKZR6RSH.js +2 -0
  166. package/node_modules/@docx-editor.dev/core/dist/document-protection-BAGVGqaP.d.ts +20 -0
  167. package/node_modules/@docx-editor.dev/core/dist/editor-Ci7IZGmG.d.ts +2448 -0
  168. package/node_modules/@docx-editor.dev/core/dist/editor-scope-OHPwVQ5l.d.ts +84 -0
  169. package/node_modules/@docx-editor.dev/core/dist/editor.cjs +1 -0
  170. package/node_modules/@docx-editor.dev/core/dist/editor.css +15 -0
  171. package/node_modules/@docx-editor.dev/core/dist/editor.d.ts +1394 -0
  172. package/node_modules/@docx-editor.dev/core/dist/editor.js +1 -0
  173. package/node_modules/@docx-editor.dev/core/dist/export.cjs +2 -0
  174. package/node_modules/@docx-editor.dev/core/dist/export.d.ts +391 -0
  175. package/node_modules/@docx-editor.dev/core/dist/export.js +2 -0
  176. package/node_modules/@docx-editor.dev/core/dist/failure-NS2lsya4.d.ts +115 -0
  177. package/node_modules/@docx-editor.dev/core/dist/font-resolver-BVQB14qT.d.ts +256 -0
  178. package/node_modules/@docx-editor.dev/core/dist/harfbuzz.wasm +0 -0
  179. package/node_modules/@docx-editor.dev/core/dist/headless-document-view-qH331moE.d.ts +143 -0
  180. package/node_modules/@docx-editor.dev/core/dist/image-resources-BN-hUgCn.d.ts +211 -0
  181. package/node_modules/@docx-editor.dev/core/dist/index-Bsg7oIKP.d.ts +3869 -0
  182. package/node_modules/@docx-editor.dev/core/dist/index.cjs +1 -0
  183. package/node_modules/@docx-editor.dev/core/dist/index.d.ts +53 -0
  184. package/node_modules/@docx-editor.dev/core/dist/index.js +1 -0
  185. package/node_modules/@docx-editor.dev/core/dist/layout-shaping-BEyuiQOk.d.ts +246 -0
  186. package/node_modules/@docx-editor.dev/core/dist/layout.cjs +1 -0
  187. package/node_modules/@docx-editor.dev/core/dist/layout.d.ts +3151 -0
  188. package/node_modules/@docx-editor.dev/core/dist/layout.js +1 -0
  189. package/node_modules/@docx-editor.dev/core/dist/node-module-shim-TTKTT66I.js +1 -0
  190. package/node_modules/@docx-editor.dev/core/dist/note-properties-4Y9o6Gyk.d.ts +68 -0
  191. package/node_modules/@docx-editor.dev/core/dist/omml-equation-CuzBL5DD.d.ts +85 -0
  192. package/node_modules/@docx-editor.dev/core/dist/output.cjs +1 -0
  193. package/node_modules/@docx-editor.dev/core/dist/output.d.ts +97 -0
  194. package/node_modules/@docx-editor.dev/core/dist/output.js +1 -0
  195. package/node_modules/@docx-editor.dev/core/dist/protocol-Bqk4Izjc.d.ts +1651 -0
  196. package/node_modules/@docx-editor.dev/core/dist/review-pane-D9jm8DcY.d.ts +128 -0
  197. package/node_modules/@docx-editor.dev/core/dist/review-paragraph-order-DT-n6ouC.d.ts +85 -0
  198. package/node_modules/@docx-editor.dev/core/dist/revision-projection-DZ4kKVev.d.ts +242 -0
  199. package/node_modules/@docx-editor.dev/core/dist/semantic-cell-selection-D9D1KSXq.d.ts +464 -0
  200. package/node_modules/@docx-editor.dev/core/dist/semantic-interaction-CIC-PooQ.d.ts +135 -0
  201. package/node_modules/@docx-editor.dev/core/dist/semantic-paint-BME37OMv.d.ts +326 -0
  202. package/node_modules/@docx-editor.dev/core/dist/semantic-record-queries-CBlZqZNa.d.ts +177 -0
  203. package/node_modules/@docx-editor.dev/core/dist/semantic-records-4B3WwFAi.d.ts +3532 -0
  204. package/node_modules/@docx-editor.dev/core/dist/store.cjs +1 -0
  205. package/node_modules/@docx-editor.dev/core/dist/store.d.ts +2706 -0
  206. package/node_modules/@docx-editor.dev/core/dist/store.js +1 -0
  207. package/node_modules/@docx-editor.dev/core/dist/tree-package-fragment-BeeKxDw8.d.ts +1201 -0
  208. package/node_modules/@docx-editor.dev/core/dist/tree-session-contract-CVbmlMlq.d.ts +664 -0
  209. package/node_modules/@docx-editor.dev/core/dist/types-barrel-D3xCgQX6.d.ts +4269 -0
  210. package/node_modules/@docx-editor.dev/core/licenses/HarfBuzz-COPYING.txt +42 -0
  211. package/node_modules/@docx-editor.dev/core/package.json +140 -0
  212. package/node_modules/@docx-editor.dev/react/LICENSE +201 -0
  213. package/node_modules/@docx-editor.dev/react/README.md +141 -0
  214. package/node_modules/@docx-editor.dev/react/THIRD_PARTY_NOTICES.md +18 -0
  215. package/node_modules/@docx-editor.dev/react/dist/index.d.mts +4928 -0
  216. package/node_modules/@docx-editor.dev/react/dist/index.d.ts +4928 -0
  217. package/node_modules/@docx-editor.dev/react/dist/index.js +4 -0
  218. package/node_modules/@docx-editor.dev/react/dist/index.mjs +4 -0
  219. package/node_modules/@docx-editor.dev/react/package.json +74 -0
  220. package/node_modules/@docx-editor.dev/react/src/styles/editor.css +6 -0
  221. package/node_modules/@docx-editor.dev/react/src/styles/zIndex.ts +28 -0
  222. package/package.json +26 -15
  223. package/src/docx/README.md +2 -3
  224. package/dist/chunk-72PQ42YI.js.map +0 -1
  225. package/dist/chunk-B7P73VHX.cjs.map +0 -1
@@ -0,0 +1,115 @@
1
+ /**
2
+ * Lifecycle state of one collaboration replica.
3
+ *
4
+ * One axis, because the only question a host has to answer is whether to tell the reader to
5
+ * wait or to reload:
6
+ *
7
+ * - `initializing` — joining. Edits are refused. Recovers on its own.
8
+ * - `ready` — replicating. Accepts edits.
9
+ * - `disconnected` — the transport dropped. The replica is intact and recovers on its own,
10
+ * so wait rather than reload. Edits continue by default, and the buffered updates merge on
11
+ * reconnect. A session created with `offlineEditing: false` refuses them until reconnect.
12
+ * - `error` — this replica does not agree with the room. Edits are refused.
13
+ * {@link CollaborationStatusSnapshot.reason} says why. A remote update the replica could
14
+ * not apply yet heals when a later update completes shared state
15
+ * ({@link CollaborationStatusSnapshot.recovering}). A format or version mismatch needs an
16
+ * upgrade of this client or the room; every other cause needs a rejoin.
17
+ * - `destroyed` — torn down. Terminal.
18
+ *
19
+ * @public
20
+ */
21
+ type CollaborationStatus = 'initializing' | 'ready' | 'disconnected' | 'error' | 'destroyed';
22
+ /**
23
+ * Why a replica refused work, left `ready`, or failed a schema check.
24
+ *
25
+ * Free-form extras (a transport phrase, a blob key, a store refusal) travel in
26
+ * {@link CollaborationFailure.detail}, not here. Branch on the code; log the detail.
27
+ *
28
+ * Codes are grouped by cause, and each group comment names the host action. In `error`, only
29
+ * a remote update that is not applied yet, or one refused local edit, heals on its own. The
30
+ * failure codes table in the collaboration reference lists every code.
31
+ * `transport-disconnected` and `authentication-failed` need opposite answers: wait for the
32
+ * first; refresh the credential and rejoin for the second. `room-generation-changed` means
33
+ * the server compacted the room while this replica was away: save a copy if it holds unsent
34
+ * changes, then rejoin.
35
+ *
36
+ * @public
37
+ */
38
+ type CollaborationFailureCode =
39
+ /** Edit refused by the session gate. The status does not change. Wait for `ready`. */
40
+ 'collaboration-session-destroyed' | 'collaboration-session-not-attached' | 'collaboration-session-not-ready' | 'collaboration-text-limit' | 'experimental-collaboration-body-text-only'
41
+ /** Factory input rejected before joining. Fix the value the host passed. */
42
+ | 'invalid-document-id' | 'invalid-identity' | 'invalid-identity-color' | 'invalid-session-id'
43
+ /** Join or seed did not complete. Connect the provider, check the room id, and retry. */
44
+ | 'already-initialized' | 'document-id-mismatch' | 'initialization-aborted' | 'initialization-timeout' | 'not-initialized'
45
+ /** The seed document cannot seed a room. Fix the file. */
46
+ | 'baseline-too-large' | 'blob-read' | 'invalid-baseline' | 'missing-local-blob' | 'no-main-document-part'
47
+ /** This client and the room have different formats. Terminal. Save local work. */
48
+ | 'collaboration-format-mismatch' | 'protocol-version-mismatch' | 'schema-version-mismatch'
49
+ /** The room is unusable. Terminal. Create a new room from saved bytes. */
50
+ | 'blob-digest-mismatch' | 'concurrent-seed' | 'port-already-attached'
51
+ /** A remote update is not applied yet. Heals when a later update arrives. Wait. */
52
+ | 'duplicate-paragraph-id' | 'invalid-relationships' | 'materialize-dropped-content' | 'missing-blob' | 'missing-root' | 'remote-apply-failed' | 'unknown-paragraph-id'
53
+ /** Over a resource limit. A local edit realigns; shared state over a limit is terminal. */
54
+ | 'blob-store-full' | 'blob-too-large' | 'invalid-blob-descriptor' | 'invalid-bound' | 'invalid-logical-id' | 'invalid-string' | 'prototype-key' | 'text-too-long' | 'too-many-attributes' | 'too-many-children' | 'too-many-nodes' | 'too-many-parts' | 'too-many-relationships' | 'tree-too-deep' | 'unknown-logical-id' | 'unsafe-part-name'
55
+ /** Transport state. Only `transport-disconnected` recovers on its own. */
56
+ | 'authentication-failed' | 'room-generation-changed' | 'transport' | 'transport-disconnected'
57
+ /** Reserved for a room server that refuses a saved room. Passed through, never emitted. */
58
+ | 'invalid-saved-room' | 'saved-room-unavailable'
59
+ /** @deprecated Emitted by nothing. Kept for compatibility; do not branch on these. */
60
+ | 'baseline-digest-mismatch' | 'experimental-collaboration-existing-paragraphs-only' | 'experimental-collaboration-text-only' | 'experimental-collaboration-untracked-text-only' | 'immutable-baseline-changed' | 'immutable-metadata-changed' | 'invalid-shared-metadata' | 'local-mirror-failed' | 'paragraph-set-mismatch' | 'shared-schema-invalid' | 'unsupported-root-key';
61
+ /** True when `value` is a {@link CollaborationFailureCode} member. @public */
62
+ declare function isCollaborationFailureCode(value: string): value is CollaborationFailureCode;
63
+ /** One collaboration failure: a typed code plus optional free-form detail. @public */
64
+ interface CollaborationFailure {
65
+ /** Stable code for application logic. */
66
+ readonly code: CollaborationFailureCode;
67
+ /** Bounded diagnostic text for logs. Not a parsing contract. */
68
+ readonly detail?: string;
69
+ }
70
+ /**
71
+ * Cached status read. Same reference until one of its fields changes.
72
+ *
73
+ * @public
74
+ */
75
+ interface CollaborationStatusSnapshot {
76
+ /** Current lifecycle state. */
77
+ readonly status: CollaborationStatus;
78
+ /** Why the replica holds `status`, or `undefined` when nothing is wrong. */
79
+ readonly reason: CollaborationFailure | undefined;
80
+ /** The most recent `error` reason. Kept after the replica recovers. */
81
+ readonly lastFailure: CollaborationFailure | undefined;
82
+ /**
83
+ * How many failures this session has recorded. It changes with each new failure, also when
84
+ * its code and detail repeat the last one, as a refused edit refused again does. Absent
85
+ * from a session that does not count.
86
+ */
87
+ readonly failureCount?: number;
88
+ /**
89
+ * The session is in `error` but heals by itself: it realigns on the next clean update and
90
+ * returns to its previous status. A host shows a passing notice, not a rejoin action.
91
+ * Absent means false.
92
+ */
93
+ readonly recovering?: boolean;
94
+ /**
95
+ * Edits wait: the room sent an update that depends on one still on its way, and an edit
96
+ * made now could touch the text it changes. The editor refuses edits meanwhile, with
97
+ * `collaboration-session-not-ready`, and accepts them again when the update arrives or the
98
+ * wait times out. Absent means false.
99
+ */
100
+ readonly waiting?: boolean;
101
+ }
102
+ /** @internal */
103
+ interface CollaborationStatusTracker {
104
+ status(): CollaborationStatus;
105
+ snapshot(): CollaborationStatusSnapshot;
106
+ /** `recovering` marks an `error` the session heals by itself. */
107
+ set(status: CollaborationStatus, code?: CollaborationFailureCode, detail?: string, recovering?: boolean): boolean;
108
+ /** Whether edits wait for the room; returns whether the snapshot changed. */
109
+ setWaiting(waiting: boolean): boolean;
110
+ }
111
+ /** @internal */
112
+ declare function createCollaborationStatusTracker(initial?: CollaborationStatus): CollaborationStatusTracker;
113
+
114
+ export { createCollaborationStatusTracker as d, isCollaborationFailureCode as i };
115
+ export type { CollaborationStatus as C, CollaborationStatusSnapshot as a, CollaborationFailureCode as b, CollaborationFailure as c };
@@ -0,0 +1,256 @@
1
+ import { F as FontFaceRequest, a as FontConfiguration, b as FontSource, c as FontSourceSubstitution } from './editor-Ci7IZGmG.js';
2
+
3
+ /**
4
+ * A partial font configuration one origin contributes: sources, substitutions, or both.
5
+ * `loadDefaultFonts()` (the substitute package) and `loadFonts()` (the fetch helper) both
6
+ * return this shape, so every origin composes through `composeFontConfiguration` the
7
+ * same way.
8
+ */
9
+ interface FontConfigurationFragment {
10
+ /** Selectable provider families, independent of loaded bytes. Listing them performs no fetch. */
11
+ readonly supportedFamilies?: readonly string[];
12
+ readonly sources?: readonly FontSource[];
13
+ readonly substitutions?: readonly FontSourceSubstitution[];
14
+ }
15
+ /**
16
+ * The base of a composition: everything a `FontConfiguration` carries, all optional.
17
+ * Omitted fields take the documented defaults (`epoch` 0, `maxFontBytes` at the engine
18
+ * hard maximum, `defaultFont` Calibri at 11pt — Word's own default face and size).
19
+ */
20
+ interface FontConfigurationBase extends FontConfigurationFragment {
21
+ /**
22
+ * Identity of this configuration's byte set. The engine uses it to tell one resolved
23
+ * font set from another; leave it unset and the editor supplies the load sequence.
24
+ */
25
+ readonly epoch?: number;
26
+ /** Per-face byte ceiling. Defaults to the engine hard maximum; lower it to tighten intake. */
27
+ readonly maxFontBytes?: number;
28
+ /** The face used when a run names no font. Defaults to Word's own: Calibri at 11pt. */
29
+ readonly defaultFont?: FontConfiguration['defaultFont'];
30
+ /** BCP-47 tag passed to the shaper for language-sensitive shaping. */
31
+ readonly language?: string;
32
+ }
33
+ /**
34
+ * What the document turned out to need, handed to an on-demand resolver.
35
+ *
36
+ * The families are the ones the file actually names — already name-validated and capped,
37
+ * so a resolver may treat them as a list to look up, never as URLs or paths to build.
38
+ */
39
+ interface FontResolutionRequest {
40
+ /**
41
+ * Families needed by the document, deduped and capped at {@link MAX_RESOLVER_FAMILIES}.
42
+ * Order is deterministic but may express host priority; do not sort it before resolving.
43
+ */
44
+ readonly families: readonly string[];
45
+ /** The face a run naming no font resolves to, so a resolver can cover it too. */
46
+ readonly defaultFamily: string;
47
+ /** Cancels document-scoped resolution; network-backed resolvers should pass it to fetch. */
48
+ readonly signal?: AbortSignal;
49
+ /**
50
+ * Faces an EARLIER origin in the same composition can already PAINT — either because it
51
+ * supplied the bytes, or because it mapped that face onto one it did supply.
52
+ *
53
+ * Absent, not empty, when there is nothing to report: the engine calling a resolver
54
+ * directly, and the first origin of a composition.
55
+ *
56
+ * FACES, not families, and only faces backed by bytes. Both narrowings are load-bearing.
57
+ * A family-grained list would let an origin holding only regular Arial suppress the bold
58
+ * and italic a later origin would have supplied, and a list built from substitutions
59
+ * alone would let an origin whose fetches all failed suppress the failover behind it,
60
+ * because both shipped resolvers emit their substitution map before fetching. Together
61
+ * they are what makes honouring this an OPTIMIZATION rather than a correctness
62
+ * requirement: skipping a reported face cannot lose one, so a resolver that ignores this
63
+ * list only spends bytes on a face first-wins composition would drop anyway.
64
+ *
65
+ * Match it case-insensitively. Word matches font names that way and both shipped
66
+ * resolvers do.
67
+ */
68
+ readonly resolvedFaces?: readonly FontFaceRequest[];
69
+ }
70
+ /**
71
+ * Resolve fonts once the document's needs are known, instead of ahead of them.
72
+ *
73
+ * Called after the file is mounted and again when editing requests a new family.
74
+ * Results compose with previously supplied faces; resolvedFaces identifies that coverage.
75
+ * Returning nothing is a valid answer — it means "I cover none of this", and the
76
+ * document stays on the fixed measurer.
77
+ *
78
+ * A resolver that fetches makes opening a document perform network requests. That is a
79
+ * real change in posture and it must stay the APP's decision: the engine never supplies
80
+ * one, and the families here are file-derived, so a resolver must look them up in a set
81
+ * it shipped rather than interpolate them into a URL.
82
+ */
83
+ type FontResolver = (request: FontResolutionRequest) => FontConfiguration | FontConfigurationFragment | undefined | Promise<FontConfiguration | FontConfigurationFragment | undefined>;
84
+ /**
85
+ * Ceiling on the families one document can put in front of a resolver.
86
+ *
87
+ * A resolver typically turns each family into up to four faces, and the resource snapshot
88
+ * refuses more than `HARD_MAX_FONT_SOURCES` (256) sources — so 64 families is the point
89
+ * past which a document could no longer be served anyway. Capping here means a file
90
+ * declaring thousands of distinct `w:rFonts` cannot fan a resolver out across thousands
91
+ * of lookups (or fetches) before that limit is ever reached.
92
+ */
93
+ declare const MAX_RESOLVER_FAMILIES = 64;
94
+ /** The document default font when nothing else says otherwise: Calibri at 11pt. */
95
+ declare const DEFAULT_FONT: FontConfiguration['defaultFont'];
96
+ /** @deprecated Use {@link DEFAULT_FONT}. */
97
+ declare const WORD_DEFAULT_FONT: FontConfiguration['defaultFont'];
98
+ /**
99
+ * Merge a base and any number of fragments into one frozen `FontConfiguration`.
100
+ *
101
+ * A bare fragment IS a valid base, so the single-origin case is one argument:
102
+ * `composeFontConfiguration(await loadDefaultFonts())`. Pass extra fragments to layer
103
+ * origins, and set `epoch`/`maxFontBytes`/`defaultFont` on the base only when you need
104
+ * something other than the documented defaults.
105
+ *
106
+ * - Sources dedupe first-wins by (family, weight, style), in argument order — base
107
+ * before fragments, earlier fragments before later ones.
108
+ * - Substitutions dedupe first-wins by their `from` face, in the same order, and every
109
+ * substitution whose `from` face has a direct source anywhere in the composition is
110
+ * dropped: a real face always beats a stand-in.
111
+ * - The result is frozen (arrays included); the byte arrays themselves are the callers'
112
+ * and are not copied here — the resource snapshot takes its own defensive copy.
113
+ */
114
+ declare function composeFontConfiguration(base: FontConfigurationBase, ...fragments: readonly FontConfigurationFragment[]): FontConfiguration;
115
+
116
+ /**
117
+ * The namespaced key carrying the type-level half of the mark, and the runtime property
118
+ * name that backs it.
119
+ *
120
+ * A plain string rather than a symbol on purpose: `@docx-editor.dev/fonts` has no runtime
121
+ * or type dependency on the engine, so it declares the same mark itself, and two
122
+ * `unique symbol`s in two packages would not unify. Two identical string keys do.
123
+ *
124
+ * @public
125
+ */
126
+ declare const FONT_RESOLVER_MARK_KEY = "docx-editor.dev/font-resolver";
127
+ /**
128
+ * The runtime marker `defineFontResolver` sets and {@link isFontResolver} reads.
129
+ *
130
+ * Exported because a package mirroring the font contract structurally still has to mark
131
+ * the resolvers it builds. A package in that position sets
132
+ * `Symbol.for('docx-editor.dev/font-resolver')` itself; this constant is the same symbol,
133
+ * named, for everyone who can import it.
134
+ *
135
+ * @public
136
+ */
137
+ declare const FONT_RESOLVER_BRAND: unique symbol;
138
+ /**
139
+ * The type-level half of the mark: what {@link defineFontResolver} adds to a function's
140
+ * type so a `FontOrigin` list can REQUIRE it.
141
+ *
142
+ * Declared with a string key so `@docx-editor.dev/fonts` can declare an identical
143
+ * interface and have the two unify without importing anything from the engine. Set at
144
+ * runtime as well as in the type — non-enumerable, so it stays out of `Object.keys` and
145
+ * out of a host's own spread.
146
+ *
147
+ * @public
148
+ */
149
+ interface FontResolverMark {
150
+ /** Always `true`. Set non-enumerably by {@link defineFontResolver}. */
151
+ readonly 'docx-editor.dev/font-resolver': true;
152
+ }
153
+ /**
154
+ * A {@link FontResolver} that has been through {@link defineFontResolver}.
155
+ *
156
+ * This, not bare `FontResolver`, is what a `FontOrigin` list accepts. The mark is the only
157
+ * thing separating a resolver from a zero-argument loader, and getting that wrong loses
158
+ * every font silently, so the type asks for it up front.
159
+ *
160
+ * @public
161
+ */
162
+ type MarkedFontResolver<T extends FontResolver = FontResolver> = T & FontResolverMark;
163
+ /**
164
+ * Mark a function as an on-demand {@link FontResolver}.
165
+ *
166
+ * Wrap every resolver you put in a `fonts` list — `useFonts(...)`, `useDocxSource`'s
167
+ * `fonts` option, `composeFontOrigins`. The `fonts` PROP needs no marking, because a
168
+ * function there is always a resolver; a list also accepts the older zero-argument loader
169
+ * form (`{ fonts: defaultFonts }`), and this is what keeps the two apart.
170
+ *
171
+ * Returns the same function object, mutated, so the mark survives being passed around and
172
+ * a marked resolver stays `===` to itself. It does NOT survive `.bind()` or being wrapped:
173
+ * both make a new function object. Re-mark the result.
174
+ *
175
+ * ```ts
176
+ * const brandFonts = defineFontResolver(async ({ families }) => ({
177
+ * sources: await loadMine(families),
178
+ * }));
179
+ * ```
180
+ *
181
+ * Throws a `TypeError` on a frozen or sealed function, which cannot take the mark. That is
182
+ * deliberate: returning it unmarked would compile — the return TYPE says marked — and then
183
+ * lose every font at runtime.
184
+ *
185
+ * @public
186
+ */
187
+ declare function defineFontResolver<T extends FontResolver>(resolve: T): MarkedFontResolver<T>;
188
+ /**
189
+ * Whether a value is a function marked by {@link defineFontResolver}.
190
+ *
191
+ * False for an unmarked function, which callers read as a zero-argument loader. Calling a
192
+ * resolver that way reads `request.defaultFamily` off `undefined` and throws, so the
193
+ * callers that make this choice say so rather than swallowing it — and the type-level mark
194
+ * on {@link MarkedFontResolver} is there to stop it reaching runtime at all.
195
+ *
196
+ * @public
197
+ */
198
+ declare function isFontResolver(value: unknown): value is MarkedFontResolver;
199
+ /**
200
+ * ONE font origin, in the one shape every origin takes: a finished configuration, a
201
+ * fragment, a promise for either, or a marked resolver that answers per document.
202
+ *
203
+ * The point of the union is that `packagedFonts()`, `googleFonts()`, `await defaultFonts()`
204
+ * and a hand-built `{ sources }` are all the same kind of thing, so a list of them needs no
205
+ * ordering rule beyond "first wins".
206
+ *
207
+ * The resolver arm is {@link MarkedFontResolver}, not bare `FontResolver`: a list may also
208
+ * hold a zero-argument loader, and only the mark separates the two.
209
+ *
210
+ * @public
211
+ */
212
+ type FontOrigin = FontConfiguration | FontConfigurationFragment | MarkedFontResolver | Promise<FontConfiguration | FontConfigurationFragment | undefined> | undefined;
213
+ /** A failed font origin or a partial failure in an otherwise usable fragment. @public */
214
+ interface FontOriginFailure {
215
+ /** Zero-based position in the first-wins origin list. */
216
+ readonly originIndex: number;
217
+ /** Resolver function name when one is safely available. */
218
+ readonly originName?: string;
219
+ readonly cause: unknown;
220
+ }
221
+ /** Diagnostics hook for ordered font-origin composition. @public */
222
+ interface ComposeFontOriginsOptions {
223
+ /** Fire-and-forget diagnostics; returned promises are observed but do not delay resolution. */
224
+ readonly onOriginFailure?: (failure: FontOriginFailure) => void;
225
+ }
226
+ /**
227
+ * Resolve a list of {@link FontOrigin}s against one document's needs and merge them,
228
+ * first-wins in list order.
229
+ *
230
+ * Origins resolve IN ORDER, one after another, and each is told which faces the ones
231
+ * before it can already paint ({@link FontResolutionRequest.resolvedFaces}). Sequential
232
+ * rather than a `Promise.all`, and that is a real cost — one extra origin's latency on the
233
+ * critical path — bought deliberately: composition is first-wins, so a later origin's copy
234
+ * of a face an earlier one supplied can never be used, and fetching it anyway spends the
235
+ * bytes twice and tells a font host which families the document uses for a result that
236
+ * gets thrown away. Order origins cheapest-first.
237
+ *
238
+ * A resolver that ignores `resolvedFaces` still composes correctly; it just spends more.
239
+ *
240
+ * ONE ORIGIN CANNOT SINK THE REST. An origin that throws, answers `null`, or answers
241
+ * something malformed is reported and skipped whole, and the origins around it still
242
+ * compose — an app that listed a flaky network origin behind a bundled one keeps the
243
+ * bundled faces. Skipped WHOLE: an answer is read completely before any of it is
244
+ * committed, so a half-ingested origin can never reach composition.
245
+ *
246
+ * The result carries NO `epoch`: it is a fragment for the engine to stamp with the load
247
+ * sequence. A fixed epoch from here would label every document's byte set as the same one.
248
+ * `undefined` means no origin contributed anything, which is a normal answer — the document
249
+ * stays on the fixed measurer.
250
+ *
251
+ * @public
252
+ */
253
+ declare function composeFontOrigins(origins: readonly FontOrigin[], request: FontResolutionRequest, options?: ComposeFontOriginsOptions): Promise<FontConfigurationFragment | undefined>;
254
+
255
+ export { DEFAULT_FONT as D, MAX_RESOLVER_FAMILIES as M, WORD_DEFAULT_FONT as W, FONT_RESOLVER_BRAND as b, FONT_RESOLVER_MARK_KEY as c, composeFontConfiguration as j, composeFontOrigins as k, defineFontResolver as l, isFontResolver as m };
256
+ export type { ComposeFontOriginsOptions as C, FontOriginFailure as F, FontOrigin as a, FontConfigurationBase as d, FontConfigurationFragment as e, FontResolutionRequest as f, FontResolver as g, FontResolverMark as h, MarkedFontResolver as i };
@@ -0,0 +1,143 @@
1
+ import { H as HeaderFooterParts, b as HeaderFooterSectionResolution, T as TreePackageStore } from './tree-package-fragment-BeeKxDw8.js';
2
+ import { Q as OoxmlPackage, O as OoxmlPart, Z as OoxmlElement, Y as OoxmlPackageRejection } from './types-barrel-D3xCgQX6.js';
3
+
4
+ /** The package with a hyperlink relationship guaranteed present, and that relationship's id. */
5
+ interface EnsuredHyperlinkRelationship {
6
+ readonly pkg: OoxmlPackage;
7
+ readonly relationshipId: string;
8
+ }
9
+ /**
10
+ * The target this engine would write for `url`, or null when it would write none.
11
+ *
12
+ * The VALIDATION half of {@link ensureHyperlinkRelationship}, exported so a caller that must decide
13
+ * "would this be authored?" before it is allowed to change the package can ask without changing it.
14
+ * A relationship outlives a refusal — it lives beside the trees, outside the undo stack — so a
15
+ * caller planning a batch that may yet be refused has to ask this and mint later.
16
+ *
17
+ * Same rules, one implementation: `sanitizeHref`'s allowlist, a bound on the length, XML-writable
18
+ * text, and the absolute-URI gate the READ side applies. There is no legitimate reason for this
19
+ * engine to author a scheme it would refuse to open.
20
+ */
21
+ declare function authorableHyperlinkTarget(url: string): string | null;
22
+ /**
23
+ * The external hyperlink relationship for `url` on `ownerPart` (default: main document),
24
+ * reusing an existing one with the same target, or `null` when the URL is not something to
25
+ * write.
26
+ *
27
+ * REUSE IS BY EXACT TARGET, matching Word: linking twice to the same address produces one
28
+ * relationship. It is safe because a hyperlink relationship carries nothing but its target —
29
+ * two links sharing one are indistinguishable from two links with identical targets, and
30
+ * retargeting one always mints rather than rewriting (see the edit op).
31
+ *
32
+ * Ownership follows the story that holds the `w:hyperlink`: a header/footer or notes part
33
+ * mints into that part's `.rels`, never into `document.xml.rels`. Passing an owner the
34
+ * package does not declare fails closed (`null`) so a scoped insert cannot leave a stray
35
+ * body relationship behind.
36
+ *
37
+ * The URL is refused unless `sanitizeHref` admits it. Storing a `javascript:` target that a
38
+ * FILE authored is required — round-tripping never rewrites a document — but AUTHORING one
39
+ * here is not: there is no legitimate reason for this engine to write a scheme it would then
40
+ * refuse to open, and writing it would hand the next reader a live target this reader made.
41
+ */
42
+ declare function ensureHyperlinkRelationship(pkg: OoxmlPackage, url: string, ownerPart?: string): EnsuredHyperlinkRelationship | null;
43
+ /**
44
+ * What a part's relationships answer for one `r:id`, over both maps.
45
+ *
46
+ * `relationships` holds the internal records and `externalTargets` the external ones, so a
47
+ * resolver reading only the first sees every hyperlink as dangling.
48
+ */
49
+ declare function relationshipTargetIn(pkg: OoxmlPackage, ownerPart: string, relationshipId: string): {
50
+ readonly target: string;
51
+ readonly external: boolean;
52
+ readonly sinkSafe?: boolean;
53
+ } | null;
54
+
55
+ /**
56
+ * The document metadata Word's document-property fields render.
57
+ *
58
+ * Every member is optional: an absent part, an absent element, or an empty value all read as
59
+ * `undefined`, and a field over a missing property paints nothing. Keys are engine-internal
60
+ * names; the field → property mapping (`TITLE` → `title`, `AUTHOR` → `creator`, …) lives in
61
+ * `layout/field-doc-property.ts`.
62
+ */
63
+ interface DocumentProperties {
64
+ /** `dc:title` — TITLE. */
65
+ readonly title?: string;
66
+ /** `dc:creator` — AUTHOR. */
67
+ readonly creator?: string;
68
+ /** `dc:subject` — SUBJECT. */
69
+ readonly subject?: string;
70
+ /** `cp:keywords` — KEYWORDS. */
71
+ readonly keywords?: string;
72
+ /** `cp:lastModifiedBy` — LASTSAVEDBY. */
73
+ readonly lastModifiedBy?: string;
74
+ /** `dc:description` — COMMENTS. */
75
+ readonly description?: string;
76
+ /** `Company` from `docProps/app.xml`. No field maps to it yet; carried for completeness. */
77
+ readonly company?: string;
78
+ /** `Manager` from `docProps/app.xml`. No field maps to it yet; carried for completeness. */
79
+ readonly manager?: string;
80
+ }
81
+
82
+ /** Theme typefaces already validated for use by layout. @public */
83
+ interface HeadlessThemeFonts {
84
+ readonly major: string | null;
85
+ readonly minor: string | null;
86
+ /** East Asian heading face; optional for backwards-compatible custom views. */
87
+ readonly majorEastAsia?: string | null;
88
+ /** East Asian body face; optional for backwards-compatible custom views. */
89
+ readonly minorEastAsia?: string | null;
90
+ /** Complex-script heading and body theme faces. */
91
+ readonly majorBidi?: string | null;
92
+ readonly minorBidi?: string | null;
93
+ /** Language-specific theme faces, keyed by ISO 15924 script. */
94
+ readonly majorSupplemental?: Readonly<Record<string, string>>;
95
+ readonly minorSupplemental?: Readonly<Record<string, string>>;
96
+ }
97
+ /**
98
+ * The read capabilities shared by browser layout, server export, and future renderers.
99
+ *
100
+ * It deliberately exposes resolved package facts rather than a binding or editor session.
101
+ * An exporter can therefore consume the live document without importing ProseMirror or a DOM.
102
+ * @public
103
+ */
104
+ interface HeadlessDocumentView {
105
+ part(): OoxmlPart;
106
+ currentPackage(): OoxmlPackage;
107
+ packageRevision(): number;
108
+ stylesRoot(): OoxmlElement | null;
109
+ numberingRoot(): OoxmlElement | null;
110
+ settingsRoot(): OoxmlElement | null;
111
+ documentThemeFonts(): HeadlessThemeFonts;
112
+ documentProperties(): DocumentProperties;
113
+ headerFooterPartsBySection(): readonly HeaderFooterParts[];
114
+ /**
115
+ * Occurrence-specific relationship metadata for header/footer stories.
116
+ *
117
+ * Optional for backwards-compatible host views; core derives it from `currentPackage()` when
118
+ * absent. Hosts with a working-tree overlay should expose their canonical resolution directly.
119
+ */
120
+ headerFooterResolutionBySection?(): readonly HeaderFooterSectionResolution[];
121
+ relationshipTarget(relationshipId: string): ReturnType<typeof relationshipTargetIn>;
122
+ }
123
+ /** A bad package is data, not an exceptional control path. @public */
124
+ type HeadlessDocumentRejection = OoxmlPackageRejection | 'no-main-document-tree';
125
+ /** Result of opening untrusted DOCX bytes for neutral layout. @public */
126
+ type OpenHeadlessDocumentResult = {
127
+ readonly ok: true;
128
+ readonly view: HeadlessDocumentView;
129
+ } | {
130
+ readonly ok: false;
131
+ readonly reason: HeadlessDocumentRejection;
132
+ readonly detail?: string;
133
+ };
134
+ /**
135
+ * Open DOCX bytes through the bounded store reader and expose only neutral layout reads.
136
+ * @public
137
+ */
138
+ declare function openHeadlessDocument(bytes: Uint8Array): OpenHeadlessDocumentResult;
139
+ /** Internal live read view over the canonical store, preserving node identities for field pagination. */
140
+ declare function headlessViewOfStore(store: TreePackageStore): HeadlessDocumentView;
141
+
142
+ export { authorableHyperlinkTarget as c, ensureHyperlinkRelationship as e, headlessViewOfStore as h, openHeadlessDocument as o, relationshipTargetIn as r };
143
+ export type { DocumentProperties as D, EnsuredHyperlinkRelationship as E, HeadlessDocumentView as H, OpenHeadlessDocumentResult as O, HeadlessDocumentRejection as a, HeadlessThemeFonts as b };