@arbidocs/blocks 0.4.146 → 0.4.150

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 (357) hide show
  1. package/dist/ConnectedNativeDocxComparison-3XQSINPQ.cjs +44 -0
  2. package/dist/ConnectedNativeDocxComparison-3XQSINPQ.cjs.map +1 -0
  3. package/dist/ConnectedNativeDocxComparison-XQSXVGHR.js +35 -0
  4. package/dist/ConnectedNativeDocxComparison-XQSXVGHR.js.map +1 -0
  5. package/dist/ConnectedNativeDocxEditor-IPEZDERL.js +33 -0
  6. package/dist/ConnectedNativeDocxEditor-IPEZDERL.js.map +1 -0
  7. package/dist/ConnectedNativeDocxEditor-OUWFMIPH.cjs +46 -0
  8. package/dist/ConnectedNativeDocxEditor-OUWFMIPH.cjs.map +1 -0
  9. package/dist/ConnectedStreamedWordArtifact-D5LSMDO4.cjs +44 -0
  10. package/dist/ConnectedStreamedWordArtifact-D5LSMDO4.cjs.map +1 -0
  11. package/dist/ConnectedStreamedWordArtifact-UZVNBKQB.js +35 -0
  12. package/dist/ConnectedStreamedWordArtifact-UZVNBKQB.js.map +1 -0
  13. package/dist/FactTextEditor-YESAU2IJ.js +25 -0
  14. package/dist/FactTextEditor-YESAU2IJ.js.map +1 -0
  15. package/dist/FactTextEditor-YUPBCTXK.cjs +27 -0
  16. package/dist/FactTextEditor-YUPBCTXK.cjs.map +1 -0
  17. package/dist/{NativeDocxEditor-BE2OEOTJ.cjs → NativeDocxEditor-5VBNM5I7.cjs} +8 -8
  18. package/dist/{NativeDocxEditor-BE2OEOTJ.cjs.map → NativeDocxEditor-5VBNM5I7.cjs.map} +1 -1
  19. package/dist/{NativeDocxEditor-KOPFMRYW.js → NativeDocxEditor-XT5ZLFGU.js} +4 -4
  20. package/dist/{NativeDocxEditor-KOPFMRYW.js.map → NativeDocxEditor-XT5ZLFGU.js.map} +1 -1
  21. package/dist/agents/index.cjs +265 -266
  22. package/dist/agents/index.js +8 -9
  23. package/dist/calendar/index.cjs +117 -125
  24. package/dist/calendar/index.d.ts +0 -1
  25. package/dist/calendar/index.js +1 -1
  26. package/dist/calls/index.cjs +3 -3
  27. package/dist/calls/index.js +2 -2
  28. package/dist/chat/index.cjs +78 -78
  29. package/dist/chat/index.js +3 -3
  30. package/dist/{chunk-2FL7QJKJ.js → chunk-265GOG4W.js} +3 -3
  31. package/dist/{chunk-2FL7QJKJ.js.map → chunk-265GOG4W.js.map} +1 -1
  32. package/dist/{chunk-IJST4EBM.js → chunk-3E2F4AHD.js} +8 -8
  33. package/dist/{chunk-IJST4EBM.js.map → chunk-3E2F4AHD.js.map} +1 -1
  34. package/dist/chunk-3FSXWVHW.cjs +5184 -0
  35. package/dist/chunk-3FSXWVHW.cjs.map +1 -0
  36. package/dist/{chunk-LPYEUD2D.cjs → chunk-4JNKXOFZ.cjs} +3 -3
  37. package/dist/{chunk-LPYEUD2D.cjs.map → chunk-4JNKXOFZ.cjs.map} +1 -1
  38. package/dist/{chunk-ODRHHWHY.cjs → chunk-4KMLM3GY.cjs} +4 -4
  39. package/dist/chunk-4KMLM3GY.cjs.map +1 -0
  40. package/dist/{chunk-MHFF5N65.cjs → chunk-757OYF6G.cjs} +4 -38
  41. package/dist/chunk-757OYF6G.cjs.map +1 -0
  42. package/dist/chunk-AXTDDWMR.js +16 -0
  43. package/dist/chunk-AXTDDWMR.js.map +1 -0
  44. package/dist/{chunk-B3AHCIV5.js → chunk-BJ24VPOA.js} +4 -55
  45. package/dist/chunk-BJ24VPOA.js.map +1 -0
  46. package/dist/chunk-C7PTF6BQ.cjs +172 -0
  47. package/dist/chunk-C7PTF6BQ.cjs.map +1 -0
  48. package/dist/{chunk-T5B7FM7S.js → chunk-COA3S3CZ.js} +3 -3
  49. package/dist/{chunk-T5B7FM7S.js.map → chunk-COA3S3CZ.js.map} +1 -1
  50. package/dist/{chunk-C44TDH54.js → chunk-CQPFW64W.js} +5 -5
  51. package/dist/{chunk-C44TDH54.js.map → chunk-CQPFW64W.js.map} +1 -1
  52. package/dist/chunk-D3WFIFRY.cjs +659 -0
  53. package/dist/chunk-D3WFIFRY.cjs.map +1 -0
  54. package/dist/{chunk-QXMR5YHC.js → chunk-DIB4JYUY.js} +19 -3
  55. package/dist/chunk-DIB4JYUY.js.map +1 -0
  56. package/dist/chunk-DVB5ZKOF.js +22 -0
  57. package/dist/chunk-DVB5ZKOF.js.map +1 -0
  58. package/dist/{chunk-VHJHY7TT.js → chunk-ECERC6TI.js} +3 -3
  59. package/dist/{chunk-VHJHY7TT.js.map → chunk-ECERC6TI.js.map} +1 -1
  60. package/dist/chunk-EDV7CYG6.cjs +18 -0
  61. package/dist/chunk-EDV7CYG6.cjs.map +1 -0
  62. package/dist/chunk-FAXXN7KI.cjs +213 -0
  63. package/dist/chunk-FAXXN7KI.cjs.map +1 -0
  64. package/dist/{chunk-2MJWWPHY.js → chunk-G4IYES7G.js} +140 -15
  65. package/dist/chunk-G4IYES7G.js.map +1 -0
  66. package/dist/{chunk-MFMASSEO.cjs → chunk-GGTUMLCT.cjs} +93 -91
  67. package/dist/chunk-GGTUMLCT.cjs.map +1 -0
  68. package/dist/{chunk-QI6AIHWP.cjs → chunk-GOWXP5KT.cjs} +145 -14
  69. package/dist/chunk-GOWXP5KT.cjs.map +1 -0
  70. package/dist/{chunk-O6IEZDRC.cjs → chunk-GRGS5M6O.cjs} +181 -3
  71. package/dist/chunk-GRGS5M6O.cjs.map +1 -0
  72. package/dist/{chunk-A6IU4GIW.js → chunk-HGLC566X.js} +598 -13
  73. package/dist/chunk-HGLC566X.js.map +1 -0
  74. package/dist/{chunk-O2GW5IY6.cjs → chunk-ILM42LE6.cjs} +33 -33
  75. package/dist/{chunk-O2GW5IY6.cjs.map → chunk-ILM42LE6.cjs.map} +1 -1
  76. package/dist/{chunk-C3CGJK7A.cjs → chunk-IPQ5MJ4Z.cjs} +636 -31
  77. package/dist/chunk-IPQ5MJ4Z.cjs.map +1 -0
  78. package/dist/{chunk-NRFAWUVD.js → chunk-JAANWQGB.js} +157 -157
  79. package/dist/chunk-JAANWQGB.js.map +1 -0
  80. package/dist/{chunk-7RJTEWYM.js → chunk-JGOST4IL.js} +350 -64
  81. package/dist/chunk-JGOST4IL.js.map +1 -0
  82. package/dist/chunk-KHXEIEXN.js +41 -0
  83. package/dist/chunk-KHXEIEXN.js.map +1 -0
  84. package/dist/chunk-KLPRAQCE.cjs +22 -0
  85. package/dist/chunk-KLPRAQCE.cjs.map +1 -0
  86. package/dist/chunk-KQYPP72K.js +644 -0
  87. package/dist/chunk-KQYPP72K.js.map +1 -0
  88. package/dist/chunk-KUT2Y7JF.cjs +43 -0
  89. package/dist/chunk-KUT2Y7JF.cjs.map +1 -0
  90. package/dist/{chunk-6YTHQ73P.cjs → chunk-LLYZGH3L.cjs} +3 -56
  91. package/dist/chunk-LLYZGH3L.cjs.map +1 -0
  92. package/dist/{chunk-YSHIC4NJ.cjs → chunk-LXTOOUEN.cjs} +159 -154
  93. package/dist/chunk-LXTOOUEN.cjs.map +1 -0
  94. package/dist/{chunk-EVUEIBNU.js → chunk-M4S75AEJ.js} +44 -5
  95. package/dist/chunk-M4S75AEJ.js.map +1 -0
  96. package/dist/{chunk-V5OAXIBN.cjs → chunk-NPR5BGFF.cjs} +11 -11
  97. package/dist/{chunk-V5OAXIBN.cjs.map → chunk-NPR5BGFF.cjs.map} +1 -1
  98. package/dist/{chunk-PLJ7PHWU.cjs → chunk-NS7NVX4E.cjs} +3 -3
  99. package/dist/{chunk-PLJ7PHWU.cjs.map → chunk-NS7NVX4E.cjs.map} +1 -1
  100. package/dist/{chunk-RB7GX2VT.cjs → chunk-NWNAYXC7.cjs} +9 -9
  101. package/dist/{chunk-RB7GX2VT.cjs.map → chunk-NWNAYXC7.cjs.map} +1 -1
  102. package/dist/chunk-Q6N6MZKO.js +5004 -0
  103. package/dist/chunk-Q6N6MZKO.js.map +1 -0
  104. package/dist/{chunk-I2QSDQQV.cjs → chunk-QT3A4PFC.cjs} +21 -2
  105. package/dist/chunk-QT3A4PFC.cjs.map +1 -0
  106. package/dist/{chunk-6HCJ3ZEU.js → chunk-R6VCPDPF.js} +178 -6
  107. package/dist/chunk-R6VCPDPF.js.map +1 -0
  108. package/dist/{chunk-ZM26YEOT.js → chunk-RY2SODRN.js} +3 -3
  109. package/dist/{chunk-ZM26YEOT.js.map → chunk-RY2SODRN.js.map} +1 -1
  110. package/dist/chunk-SDOEHEJP.js +208 -0
  111. package/dist/chunk-SDOEHEJP.js.map +1 -0
  112. package/dist/{chunk-DETZZBG2.cjs → chunk-SIB6C7P7.cjs} +43 -2
  113. package/dist/chunk-SIB6C7P7.cjs.map +1 -0
  114. package/dist/{chunk-OPTBQSCV.cjs → chunk-SMN32BQ3.cjs} +4 -183
  115. package/dist/chunk-SMN32BQ3.cjs.map +1 -0
  116. package/dist/chunk-TAWPVD6C.cjs +1956 -0
  117. package/dist/chunk-TAWPVD6C.cjs.map +1 -0
  118. package/dist/chunk-TC25LGIM.js +6584 -0
  119. package/dist/chunk-TC25LGIM.js.map +1 -0
  120. package/dist/{chunk-OBWYM25Y.js → chunk-TL45OJQE.js} +85 -83
  121. package/dist/chunk-TL45OJQE.js.map +1 -0
  122. package/dist/{chunk-AOSUHWIL.js → chunk-TZOQKV64.js} +4 -37
  123. package/dist/chunk-TZOQKV64.js.map +1 -0
  124. package/dist/chunk-UTVY63DG.js +16 -0
  125. package/dist/chunk-UTVY63DG.js.map +1 -0
  126. package/dist/chunk-V4YZXGXR.cjs +6751 -0
  127. package/dist/chunk-V4YZXGXR.cjs.map +1 -0
  128. package/dist/chunk-XRWHFMHK.js +19 -0
  129. package/dist/chunk-XRWHFMHK.js.map +1 -0
  130. package/dist/{chunk-O4YPVYPO.cjs → chunk-YAEXSCUW.cjs} +364 -60
  131. package/dist/chunk-YAEXSCUW.cjs.map +1 -0
  132. package/dist/chunk-YIFCLNII.cjs +18 -0
  133. package/dist/chunk-YIFCLNII.cjs.map +1 -0
  134. package/dist/chunk-Z27QMJ6S.cjs +25 -0
  135. package/dist/chunk-Z27QMJ6S.cjs.map +1 -0
  136. package/dist/{chunk-CSI2B2H5.js → chunk-Z4NQ3TED.js} +4 -4
  137. package/dist/chunk-Z4NQ3TED.js.map +1 -0
  138. package/dist/{chunk-DWZXSPMB.cjs → chunk-ZAVEMQ37.cjs} +3 -3
  139. package/dist/{chunk-DWZXSPMB.cjs.map → chunk-ZAVEMQ37.cjs.map} +1 -1
  140. package/dist/{chunk-FUTMU4FR.js → chunk-ZLEYLCE4.js} +8 -181
  141. package/dist/chunk-ZLEYLCE4.js.map +1 -0
  142. package/dist/chunk-ZNLTEZEF.js +170 -0
  143. package/dist/chunk-ZNLTEZEF.js.map +1 -0
  144. package/dist/chunk-ZO7PJMCO.js +1907 -0
  145. package/dist/chunk-ZO7PJMCO.js.map +1 -0
  146. package/dist/citations/index.cjs +14 -14
  147. package/dist/citations/index.js +2 -2
  148. package/dist/collaboration/index.cjs +74 -74
  149. package/dist/collaboration/index.js +3 -3
  150. package/dist/connect/docx.cjs +23 -28
  151. package/dist/connect/docx.cjs.map +1 -1
  152. package/dist/connect/docx.js +12 -28
  153. package/dist/connect/docx.js.map +1 -1
  154. package/dist/connect/index.cjs +8799 -2057
  155. package/dist/connect/index.cjs.map +1 -1
  156. package/dist/connect/index.d.ts +11 -2
  157. package/dist/connect/index.js +8578 -1884
  158. package/dist/connect/index.js.map +1 -1
  159. package/dist/connect/viewer.cjs +1229 -0
  160. package/dist/connect/viewer.cjs.map +1 -0
  161. package/dist/connect/viewer.d.ts +8 -0
  162. package/dist/connect/viewer.js +1226 -0
  163. package/dist/connect/viewer.js.map +1 -0
  164. package/dist/connection/ConnectedWorkflowsTable.d.ts +2 -12
  165. package/dist/connection/ai.d.ts +2 -9
  166. package/dist/connection/billing/AddAddonDialog.d.ts +24 -0
  167. package/dist/connection/billing/BillingCard.d.ts +18 -0
  168. package/dist/connection/billing/BillingProjectEntity.d.ts +9 -0
  169. package/dist/connection/billing/ChangePlanDialog.d.ts +20 -0
  170. package/dist/connection/billing/ChangeProPlan.d.ts +20 -0
  171. package/dist/connection/billing/CheckoutTotal.d.ts +12 -0
  172. package/dist/connection/billing/DailyCapEditor.d.ts +4 -0
  173. package/dist/connection/billing/InvoicesModal.d.ts +6 -0
  174. package/dist/connection/billing/NewProjectFlow.d.ts +14 -0
  175. package/dist/connection/billing/PlanChangeLines.d.ts +13 -0
  176. package/dist/connection/billing/PlanSelector.d.ts +50 -0
  177. package/dist/connection/billing/ProjectBilling.d.ts +24 -0
  178. package/dist/connection/billing/ProjectDetail.d.ts +16 -0
  179. package/dist/connection/billing/ProjectUsageCard.d.ts +21 -0
  180. package/dist/connection/billing/ProjectUsageContent.d.ts +18 -0
  181. package/dist/connection/billing/ProjectsTable.d.ts +13 -0
  182. package/dist/connection/billing/ReduceAddonDialog.d.ts +18 -0
  183. package/dist/connection/billing/ReferralReward.d.ts +32 -0
  184. package/dist/connection/billing/SharedProjects.d.ts +13 -0
  185. package/dist/connection/billing/StripeCheckoutModal.d.ts +32 -0
  186. package/dist/connection/billing/SubscriptionPlans.d.ts +15 -0
  187. package/dist/connection/billing/SubscriptionStatus.d.ts +10 -0
  188. package/dist/connection/billing/addon-pricing.d.ts +97 -0
  189. package/dist/connection/billing/api-error.d.ts +6 -0
  190. package/dist/connection/billing/billing-country.d.ts +14 -0
  191. package/dist/connection/billing/billing-focus.d.ts +11 -0
  192. package/dist/connection/billing/index.d.ts +22 -0
  193. package/dist/connection/billing/plan-badge.d.ts +15 -0
  194. package/dist/connection/billing/plan-change-outcome.d.ts +15 -0
  195. package/dist/connection/billing/plan-constants.d.ts +29 -0
  196. package/dist/connection/billing/plan-pricing.d.ts +67 -0
  197. package/dist/connection/billing/quota-items.d.ts +33 -0
  198. package/dist/connection/billing/referral-reward.d.ts +28 -0
  199. package/dist/connection/billing/refusal-copy.d.ts +5 -0
  200. package/dist/connection/billing/reward-balance.d.ts +19 -0
  201. package/dist/connection/billing/support.d.ts +35 -0
  202. package/dist/connection/billing/tax-quote.d.ts +36 -0
  203. package/dist/connection/billing/useAddonPurchase.d.ts +32 -0
  204. package/dist/connection/billing/useAutoRefreshPendingProjects.d.ts +11 -0
  205. package/dist/connection/billing/useCheckoutQuote.d.ts +30 -0
  206. package/dist/connection/billing/useOpenBillingPortal.d.ts +12 -0
  207. package/dist/connection/calendar/CalendarSettingsDialog.d.ts +1 -1
  208. package/dist/connection/connectors/ConnectedAppsSettings.d.ts +24 -0
  209. package/dist/connection/connectors/ConnectedDriveSyncDialog.d.ts +12 -0
  210. package/dist/connection/connectors/ConnectedMailboxSyncDialog.d.ts +12 -0
  211. package/dist/connection/connectors/index.d.ts +4 -0
  212. package/dist/connection/connectors/sync-labels.d.ts +21 -0
  213. package/dist/connection/facts/ConnectedFactsPage.d.ts +50 -0
  214. package/dist/connection/facts/FactMarkdownEditor.d.ts +57 -0
  215. package/dist/connection/facts/FactSourcesPopover.d.ts +38 -0
  216. package/dist/connection/facts/FactTextEditor.d.ts +2 -0
  217. package/dist/connection/facts/factNouns.d.ts +4 -0
  218. package/dist/connection/facts/factPageColumns.d.ts +37 -0
  219. package/dist/connection/facts/types.d.ts +127 -0
  220. package/dist/connection/facts/useFactActions.d.ts +10 -0
  221. package/dist/connection/facts/useFactComposer.d.ts +54 -0
  222. package/dist/connection/facts/useFactFilters.d.ts +101 -0
  223. package/dist/connection/facts/useFactSelection.d.ts +82 -0
  224. package/dist/connection/facts/useFactsGrid.d.ts +87 -0
  225. package/dist/connection/facts/useFactsPageView.d.ts +4 -0
  226. package/dist/connection/mail/ConnectedMailComposer.d.ts +3 -1
  227. package/dist/connection/mail/ConnectedMailbox.d.ts +4 -2
  228. package/dist/connection/mail/MailComposerForm.d.ts +4 -2
  229. package/dist/connection/mail/MailRecipientInput.d.ts +14 -0
  230. package/dist/connection/mail/index.d.ts +1 -1
  231. package/dist/connection/mail/types.d.ts +10 -0
  232. package/dist/connection/search/ConnectedSearchPage.d.ts +64 -0
  233. package/dist/connection/search/SearchResultRows.d.ts +38 -0
  234. package/dist/connection/search/index.d.ts +2 -0
  235. package/dist/connection/settings-page/ConnectedSettingsPage.d.ts +4 -0
  236. package/dist/connection/settings-page/index.d.ts +1 -1
  237. package/dist/connection/tags/ConnectedTagTable.d.ts +108 -0
  238. package/dist/connection/tags/ConnectedTagsPage.d.ts +55 -0
  239. package/dist/connection/tags/DocTagPassages.d.ts +25 -0
  240. package/dist/connection/tags/GlossaryExport.d.ts +7 -0
  241. package/dist/connection/tags/TagCombineFilter.d.ts +14 -0
  242. package/dist/connection/tags/TagPlacement.d.ts +16 -0
  243. package/dist/connection/tags/TagsPageSections.d.ts +36 -0
  244. package/dist/connection/tags/tagCombine.d.ts +55 -0
  245. package/dist/connection/useConnectedWorkNotifications.d.ts +7 -24
  246. package/dist/connection/viewer/ConnectedDocumentToolsProvider.d.ts +11 -0
  247. package/dist/connection/viewer/ConnectedDocumentViewer.d.ts +21 -0
  248. package/dist/connection/viewer/FinaliseTranslationButton.d.ts +15 -0
  249. package/dist/connection/viewer/ViewerPdfPane.d.ts +46 -0
  250. package/dist/connection/viewer/support.d.ts +79 -0
  251. package/dist/connection/viewer/useImageCrop.d.ts +13 -0
  252. package/dist/connection/viewer/useViewedDocument.d.ts +70 -0
  253. package/dist/connection/viewer/useViewerBlobs.d.ts +15 -0
  254. package/dist/connection/viewer/useViewerTabs.d.ts +18 -0
  255. package/dist/connection/viewer/useViewerVersions.d.ts +11 -0
  256. package/dist/connection/workspace-settings/useConnectedWorkspaceSettings.d.ts +6 -0
  257. package/dist/document-tools/index.cjs +59 -652
  258. package/dist/document-tools/index.cjs.map +1 -1
  259. package/dist/document-tools/index.js +2 -641
  260. package/dist/document-tools/index.js.map +1 -1
  261. package/dist/docx/index.cjs +48 -47
  262. package/dist/docx/index.js +4 -3
  263. package/dist/facts/FactsBulkBar.d.ts +6 -3
  264. package/dist/facts/cited-version-ref.d.ts +1 -0
  265. package/dist/facts/index.cjs +206 -1942
  266. package/dist/facts/index.cjs.map +1 -1
  267. package/dist/facts/index.d.ts +1 -0
  268. package/dist/facts/index.js +15 -1897
  269. package/dist/facts/index.js.map +1 -1
  270. package/dist/files/ViewerChrome.d.ts +5 -4
  271. package/dist/files/ViewerControlBar.d.ts +12 -0
  272. package/dist/files/doc-labels.d.ts +35 -0
  273. package/dist/files/grid/FilterButton.d.ts +12 -0
  274. package/dist/files/grid/RowDensityControl.d.ts +18 -0
  275. package/dist/files/grid/row-density.d.ts +27 -0
  276. package/dist/files/index.cjs +779 -7100
  277. package/dist/files/index.cjs.map +1 -1
  278. package/dist/files/index.d.ts +5 -0
  279. package/dist/files/index.js +14 -6919
  280. package/dist/files/index.js.map +1 -1
  281. package/dist/home/index.cjs +2 -2
  282. package/dist/home/index.js +2 -2
  283. package/dist/index.cjs +1043 -1259
  284. package/dist/index.cjs.map +1 -1
  285. package/dist/index.js +27 -360
  286. package/dist/index.js.map +1 -1
  287. package/dist/retrieval/SearchSnippet.d.ts +6 -0
  288. package/dist/retrieval/index.cjs +75 -42
  289. package/dist/retrieval/index.d.ts +2 -0
  290. package/dist/retrieval/index.js +3 -2
  291. package/dist/retrieval/search-results.d.ts +46 -0
  292. package/dist/settings/Billing.d.ts +0 -66
  293. package/dist/settings/PlanBadge.d.ts +1 -1
  294. package/dist/settings/SubscriptionParts.d.ts +1 -50
  295. package/dist/settings/index.cjs +501 -3714
  296. package/dist/settings/index.cjs.map +1 -1
  297. package/dist/settings/index.d.ts +3 -2
  298. package/dist/settings/index.js +10 -3527
  299. package/dist/settings/index.js.map +1 -1
  300. package/dist/settings/inverted-index-filter.d.ts +26 -0
  301. package/dist/shell/index.cjs +2 -2
  302. package/dist/shell/index.js +2 -2
  303. package/dist/site/index.cjs +5 -5
  304. package/dist/site/index.js +1 -1
  305. package/dist/studio/index.cjs +6 -6
  306. package/dist/studio/index.js +5 -5
  307. package/dist/tags/definitions.d.ts +10 -0
  308. package/dist/tags/index.d.ts +4 -1
  309. package/dist/tags/page/ExtractEntitiesDialog.d.ts +24 -0
  310. package/dist/tags/page/TagPicker.d.ts +16 -0
  311. package/dist/tags/page/tagsPageLabels.d.ts +36 -0
  312. package/dist/workflow-canvas/index.cjs +21 -22
  313. package/dist/workflow-canvas/index.cjs.map +1 -1
  314. package/dist/workflow-canvas/index.js +8 -9
  315. package/dist/workflow-canvas/index.js.map +1 -1
  316. package/node_modules/@arbidocs/coedit/package.json +1 -1
  317. package/package.json +13 -4
  318. package/dist/calendar/access-setup.d.ts +0 -8
  319. package/dist/chunk-2MJWWPHY.js.map +0 -1
  320. package/dist/chunk-3AFWGEDJ.cjs +0 -53
  321. package/dist/chunk-3AFWGEDJ.cjs.map +0 -1
  322. package/dist/chunk-5YHEHEJT.js +0 -1667
  323. package/dist/chunk-5YHEHEJT.js.map +0 -1
  324. package/dist/chunk-6HCJ3ZEU.js.map +0 -1
  325. package/dist/chunk-6YTHQ73P.cjs.map +0 -1
  326. package/dist/chunk-7RJTEWYM.js.map +0 -1
  327. package/dist/chunk-A6IU4GIW.js.map +0 -1
  328. package/dist/chunk-AOSUHWIL.js.map +0 -1
  329. package/dist/chunk-B3AHCIV5.js.map +0 -1
  330. package/dist/chunk-C3CGJK7A.cjs.map +0 -1
  331. package/dist/chunk-CSI2B2H5.js.map +0 -1
  332. package/dist/chunk-DETZZBG2.cjs.map +0 -1
  333. package/dist/chunk-EVUEIBNU.js.map +0 -1
  334. package/dist/chunk-FUTMU4FR.js.map +0 -1
  335. package/dist/chunk-I2QSDQQV.cjs.map +0 -1
  336. package/dist/chunk-J5CWKFSC.js +0 -170
  337. package/dist/chunk-J5CWKFSC.js.map +0 -1
  338. package/dist/chunk-MFMASSEO.cjs.map +0 -1
  339. package/dist/chunk-MHFF5N65.cjs.map +0 -1
  340. package/dist/chunk-NRFAWUVD.js.map +0 -1
  341. package/dist/chunk-O4YPVYPO.cjs.map +0 -1
  342. package/dist/chunk-O6IEZDRC.cjs.map +0 -1
  343. package/dist/chunk-OBWYM25Y.js.map +0 -1
  344. package/dist/chunk-ODRHHWHY.cjs.map +0 -1
  345. package/dist/chunk-OPTBQSCV.cjs.map +0 -1
  346. package/dist/chunk-QI6AIHWP.cjs.map +0 -1
  347. package/dist/chunk-QXMR5YHC.js.map +0 -1
  348. package/dist/chunk-RFXJYIDV.js +0 -50
  349. package/dist/chunk-RFXJYIDV.js.map +0 -1
  350. package/dist/chunk-U73KPFYH.cjs +0 -1717
  351. package/dist/chunk-U73KPFYH.cjs.map +0 -1
  352. package/dist/chunk-XVUOMWMD.cjs +0 -177
  353. package/dist/chunk-XVUOMWMD.cjs.map +0 -1
  354. package/dist/chunk-YSHIC4NJ.cjs.map +0 -1
  355. package/dist/connection/ConnectedTagTable.d.ts +0 -32
  356. package/dist/connection/calendar/CopyField.d.ts +0 -9
  357. package/dist/connection/calendar/OpenAccessPanel.d.ts +0 -7
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/connection/viewer/support.tsx"],"names":["createContext","jsx","useContext"],"mappings":";;;;;;AA6EA,IAAM,4BAAA,GAA+BA,mBAAA,CAAqC,EAAE,CAAA;AAErE,SAAS,6BAAA,CAA8B;AAAA,EAC5C,KAAA;AAAA,EACA;AACF,CAAA,EAGG;AACD,EAAA,uBACEC,cAAA,CAAC,4BAAA,CAA6B,QAAA,EAA7B,EAAsC,OACpC,QAAA,EACH,CAAA;AAEJ;AAEO,SAAS,wBAAA,GAAkD;AAChE,EAAA,OAAOC,iBAAW,4BAA4B,CAAA;AAChD","file":"chunk-KLPRAQCE.cjs","sourcesContent":["/**\n * What a host adds to the connected document viewer. The viewer reads documents, versions, PDFs,\n * markup and signatures on the signed-in session by itself; these are the host's own things it\n * cannot know: documents the host makes on the client (an artifact streaming in from a chat, an\n * unsaved draft), the host's dialogs and workflows a document action opens, and how the host lays\n * the viewer out. Every field is optional: without one the viewer offers less (no Translate button,\n * no draft controls), never something that does nothing.\n */\n\nimport { createContext, useContext, type ReactNode } from 'react'\nimport type { components } from '@arbidocs/client'\n\n/** A document's record, as the viewer reads it. */\nexport type ViewerDocumentRecord = components['schemas']['DocResponse']\n\n/** An artifact being generated in a chat, shown in the viewer as it streams. */\nexport interface ViewerStreamingDocument {\n title?: string | null\n /** The content so far (Markdown, or the html/react source of a live artifact). */\n content: string\n /** How it is carried: a document draft, a live `html` / `react` artifact, an `image`. */\n mode?: string | null\n isComplete: boolean\n}\n\n/** A document the user started on the client, with no backend record until it is saved. */\nexport interface ViewerDraftDocument {\n kind: 'text' | 'audio' | 'photo' | 'video'\n title?: string | null\n /** A text draft's starting content. */\n content?: string | null\n}\n\nexport interface DocumentViewerSupport {\n /** Artifacts streaming in, by document id. */\n streamingDocuments?: Readonly<Record<string, ViewerStreamingDocument>>\n /** Unsaved drafts, by their client id. */\n draftDocuments?: Readonly<Record<string, ViewerDraftDocument>>\n /** A draft's kind (text, photo, audio, video), in place of the tabs. */\n renderDraftKind?: (draftId: string) => ReactNode\n /** A draft's name (editable), in place of the title. */\n renderDraftTitle?: (draftId: string) => ReactNode\n /** The recorder of a photo, audio or video draft: the whole body of the viewer. */\n renderCaptureDraft?: (draftId: string) => ReactNode\n /** A text draft was saved as `documentId`; the viewer shows it next. */\n onDraftSaved?: (draftId: string, documentId: string) => void\n /** The copy of a document kept on this device, for when the network is down. */\n loadOfflineCopy?: (document: ViewerDocumentRecord) => Promise<Blob | undefined>\n /** Documents related to the one open (near duplicates), beside its name. */\n renderRelated?: (document: ViewerDocumentRecord) => ReactNode\n /** A document as a pill (the comparison's other side). Default: its name. */\n renderDocumentPill?: (documentId: string) => ReactNode\n /** Open the host's share dialog for the document. Default: share it with the workspace. */\n share?: (document: { id: string; name: string | undefined; isPrivate: boolean }) => void\n /** Ask the assistant about a version (`doc-…@v2`) open read-only. Absent: not offered. */\n askAboutVersion?: (versionRef: string) => void\n /** Translate the document (or the version) on screen. Absent: not offered. */\n translate?: (documentRef: string) => void\n /** Start an image generation from the image on screen. Absent: not offered. */\n useImageAsReference?: (documentId: string) => void\n /** The text (parsed) view of the document; the viewer gives it the page and zoom. */\n renderParsedView?: (props: ParsedViewProps) => ReactNode\n /** How dates read (versions, signatures). Default: `fmtDate`. */\n formatDate?: (iso: string) => string\n /** The viewer is shown in another window: PDF pages render without the page's web fonts. */\n isDetached?: boolean\n}\n\n/** What the viewer hands the text view. */\nexport interface ParsedViewProps {\n documentId: string\n onLoadSuccess: (totalPages: number) => void\n scrollTrigger: number\n zoom: number\n onZoomChange: (zoom: number) => void\n}\n\nconst DocumentViewerSupportContext = createContext<DocumentViewerSupport>({})\n\nexport function DocumentViewerSupportProvider({\n value,\n children,\n}: {\n value: DocumentViewerSupport\n children: ReactNode\n}) {\n return (\n <DocumentViewerSupportContext.Provider value={value}>\n {children}\n </DocumentViewerSupportContext.Provider>\n )\n}\n\nexport function useDocumentViewerSupport(): DocumentViewerSupport {\n return useContext(DocumentViewerSupportContext)\n}\n"]}
@@ -0,0 +1,644 @@
1
+ "use client";
2
+ import { ViewerStatusNote } from './chunk-6HKLTYNN.js';
3
+ import { PencilLine, FileText, PenLine, Users, Send, FilePenLine, Download } from 'lucide-react';
4
+ import { Button, Popover, PopoverTrigger, PopoverContent, cn } from '@arbidocs/react/ui';
5
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
6
+ import { useOptionalDocumentTools, certificateLink, useDocumentTools, useDocumentSignatureRequests, useVoidSignatureRequest, matchSignedCopy } from '@arbidocs/react/document-tools';
7
+ import { useState, useRef } from 'react';
8
+
9
+ var TOUCH = "pointer-coarse:min-h-11";
10
+ function AnnotateButton({ active, onClick, compact }) {
11
+ return /* @__PURE__ */ jsxs(
12
+ Button,
13
+ {
14
+ type: "button",
15
+ variant: active ? "default" : "outline",
16
+ size: compact ? "icon" : "sm",
17
+ "aria-pressed": active,
18
+ title: "Annotate: highlight, comment, stamp, redact",
19
+ "aria-label": "Annotate",
20
+ "data-testid": "annotate-toggle",
21
+ className: TOUCH,
22
+ onClick,
23
+ children: [
24
+ /* @__PURE__ */ jsx(PencilLine, { className: "size-4" }),
25
+ !compact && /* @__PURE__ */ jsx("span", { className: "ml-1", children: "Annotate" })
26
+ ]
27
+ }
28
+ );
29
+ }
30
+ function ShowOriginalButton({ active, onClick, compact }) {
31
+ return /* @__PURE__ */ jsxs(
32
+ Button,
33
+ {
34
+ type: "button",
35
+ variant: active ? "default" : "outline",
36
+ size: compact ? "icon" : "sm",
37
+ "aria-pressed": active,
38
+ title: active ? "Show the markup again" : "Show the original, without markup",
39
+ "aria-label": "Show original",
40
+ "data-testid": "markup-show-original",
41
+ className: TOUCH,
42
+ onClick,
43
+ children: [
44
+ /* @__PURE__ */ jsx(FileText, { className: "size-4" }),
45
+ !compact && /* @__PURE__ */ jsx("span", { className: "ml-1", children: "Show original" })
46
+ ]
47
+ }
48
+ );
49
+ }
50
+ function DownloadMarkupButton({
51
+ onClick,
52
+ disabledReason
53
+ }) {
54
+ const button = /* @__PURE__ */ jsx(
55
+ Button,
56
+ {
57
+ type: "button",
58
+ variant: "outline",
59
+ size: "icon",
60
+ title: disabledReason ?? "Download with markup: the PDF with its annotations (opens in Acrobat or Preview)",
61
+ "aria-label": "Download with markup",
62
+ "aria-description": disabledReason,
63
+ disabled: !!disabledReason,
64
+ "data-testid": "markup-download",
65
+ className: TOUCH,
66
+ onClick,
67
+ children: /* @__PURE__ */ jsx(Download, { className: "size-4" })
68
+ }
69
+ );
70
+ return disabledReason ? /* @__PURE__ */ jsx("span", { title: disabledReason, className: "inline-flex", "data-testid": "markup-download-locked", children: button }) : button;
71
+ }
72
+ function SignedEditNote() {
73
+ return /* @__PURE__ */ jsx(
74
+ "p",
75
+ {
76
+ className: "border-b px-3 py-1.5 text-xs text-muted-foreground",
77
+ "data-testid": "signed-edit-note",
78
+ children: "Editing creates a new unsigned version"
79
+ }
80
+ );
81
+ }
82
+ function SignButton({ active, onClick, compact }) {
83
+ return /* @__PURE__ */ jsxs(
84
+ Button,
85
+ {
86
+ type: "button",
87
+ variant: active ? "default" : "outline",
88
+ size: compact ? "icon" : "sm",
89
+ "aria-pressed": active,
90
+ title: "Sign document",
91
+ "aria-label": "Sign",
92
+ "data-testid": "sign-document-button",
93
+ className: TOUCH,
94
+ onClick,
95
+ children: [
96
+ /* @__PURE__ */ jsx(PenLine, { className: "size-4" }),
97
+ !compact && /* @__PURE__ */ jsx("span", { className: "ml-1", children: "Sign" })
98
+ ]
99
+ }
100
+ );
101
+ }
102
+ function RequestSignaturesButton({ active, onClick, compact }) {
103
+ return /* @__PURE__ */ jsxs(
104
+ Button,
105
+ {
106
+ type: "button",
107
+ variant: active ? "default" : "outline",
108
+ size: compact ? "icon" : "sm",
109
+ "aria-pressed": active,
110
+ title: "Request signatures",
111
+ "aria-label": "Request signatures",
112
+ "data-testid": "request-signatures-button",
113
+ className: TOUCH,
114
+ onClick,
115
+ children: [
116
+ /* @__PURE__ */ jsx(Users, { className: "size-4" }),
117
+ !compact && /* @__PURE__ */ jsx("span", { className: "ml-1", children: "Request signatures" })
118
+ ]
119
+ }
120
+ );
121
+ }
122
+ var BAR = "flex flex-wrap items-center justify-between gap-2 border-b px-3 py-2 text-xs";
123
+ var LINK = "font-medium text-primary hover:underline disabled:opacity-50 disabled:no-underline pointer-coarse:min-h-11";
124
+ function MarkupNotices({ legacyPrompt, olderNote, onOpenVersion }) {
125
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
126
+ legacyPrompt && /* @__PURE__ */ jsxs("div", { className: BAR, role: "status", "data-testid": "markup-migration-prompt", children: [
127
+ /* @__PURE__ */ jsxs("span", { children: [
128
+ legacyPrompt.count,
129
+ " annotation",
130
+ legacyPrompt.count === 1 ? "" : "s",
131
+ " on this document",
132
+ legacyPrompt.count === 1 ? " is" : " are",
133
+ " saved only in this browser. Add",
134
+ " ",
135
+ legacyPrompt.count === 1 ? "it" : "them",
136
+ " to the shared markup, where everyone with access sees ",
137
+ legacyPrompt.count === 1 ? "it" : "them",
138
+ "?"
139
+ ] }),
140
+ /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-3", children: [
141
+ /* @__PURE__ */ jsx(
142
+ "button",
143
+ {
144
+ type: "button",
145
+ className: LINK,
146
+ disabled: legacyPrompt.busy,
147
+ "data-testid": "markup-migration-add",
148
+ onClick: legacyPrompt.add,
149
+ children: legacyPrompt.busy ? "Adding\u2026" : "Add to shared markup"
150
+ }
151
+ ),
152
+ /* @__PURE__ */ jsx(
153
+ "button",
154
+ {
155
+ type: "button",
156
+ className: LINK,
157
+ disabled: legacyPrompt.busy,
158
+ "data-testid": "markup-migration-discard",
159
+ onClick: legacyPrompt.discard,
160
+ children: "Discard"
161
+ }
162
+ )
163
+ ] })
164
+ ] }),
165
+ olderNote && /* @__PURE__ */ jsxs("div", { className: BAR, "data-testid": "markup-older-version-note", children: [
166
+ /* @__PURE__ */ jsxs("span", { children: [
167
+ "The markup is on version ",
168
+ olderNote.version,
169
+ ". This version started without it.",
170
+ olderNote.signed && /* @__PURE__ */ jsxs("span", { "data-testid": "markup-older-version-signed", children: [
171
+ " ",
172
+ "It is signed: comments copied here are kept beside it, and the signed PDF does not change."
173
+ ] })
174
+ ] }),
175
+ /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-3", children: [
176
+ /* @__PURE__ */ jsxs(
177
+ "button",
178
+ {
179
+ type: "button",
180
+ className: LINK,
181
+ "data-testid": "markup-open-older-version",
182
+ onClick: () => onOpenVersion(olderNote.version),
183
+ children: [
184
+ "Open version ",
185
+ olderNote.version
186
+ ]
187
+ }
188
+ ),
189
+ /* @__PURE__ */ jsx(
190
+ "button",
191
+ {
192
+ type: "button",
193
+ className: LINK,
194
+ disabled: olderNote.busy,
195
+ "data-testid": "markup-copy-open-threads",
196
+ title: "Copy the unresolved comment threads onto this version (redactions never carry over)",
197
+ onClick: olderNote.copy,
198
+ children: olderNote.busy ? "Copying\u2026" : "Copy open comments here"
199
+ }
200
+ )
201
+ ] })
202
+ ] })
203
+ ] });
204
+ }
205
+ function MarkupViewNote({ showOriginal, onToggle }) {
206
+ return /* @__PURE__ */ jsxs(ViewerStatusNote, { testId: "markup-view-note", children: [
207
+ showOriginal ? "Original, without markup" : "With markup",
208
+ " \xB7 ",
209
+ /* @__PURE__ */ jsx(
210
+ "button",
211
+ {
212
+ type: "button",
213
+ className: "font-medium text-primary hover:underline pointer-coarse:min-h-11",
214
+ "data-testid": "markup-view-note-toggle",
215
+ onClick: onToggle,
216
+ children: showOriginal ? "Show markup" : "Show original"
217
+ }
218
+ )
219
+ ] });
220
+ }
221
+ function formatSignedAt(iso) {
222
+ const date = new Date(iso);
223
+ if (Number.isNaN(date.getTime())) return iso;
224
+ return date.toLocaleString([], { dateStyle: "medium", timeStyle: "short" });
225
+ }
226
+ function Row({ label, field, children }) {
227
+ return /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-[5.5rem_1fr] gap-2", children: [
228
+ /* @__PURE__ */ jsx("dt", { className: "text-muted-foreground", children: label }),
229
+ /* @__PURE__ */ jsx("dd", { className: "min-w-0 break-words", "data-testid": `signature-detail-${field}`, children })
230
+ ] });
231
+ }
232
+ function SignatureStatus({
233
+ status,
234
+ formatDate = formatSignedAt,
235
+ certificateUrl
236
+ }) {
237
+ const tools = useOptionalDocumentTools();
238
+ const hostCertificateUrl = certificateUrl ?? tools?.certificateUrl;
239
+ const signatures = status.signatures ?? [];
240
+ const isCounterSigned = signatures.length > 1;
241
+ return /* @__PURE__ */ jsxs(Popover, { children: [
242
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
243
+ "button",
244
+ {
245
+ type: "button",
246
+ className: "flex-shrink-0 text-sm text-muted-foreground underline decoration-dotted underline-offset-4 hover:text-foreground pointer-coarse:min-h-11",
247
+ "data-testid": "document-signature-status",
248
+ "aria-label": `${status.intact ? "Signed, locked" : "Modified after signing"}: show signature details`,
249
+ children: status.intact ? "Signed \u2014 locked" : "Modified after signing"
250
+ }
251
+ ) }),
252
+ /* @__PURE__ */ jsxs(
253
+ PopoverContent,
254
+ {
255
+ className: "max-h-[70vh] w-80 overflow-y-auto p-3 text-sm",
256
+ align: "start",
257
+ "data-testid": "signature-details",
258
+ children: [
259
+ /* @__PURE__ */ jsx("p", { className: "mb-2 font-medium", "data-testid": "signature-details-title", children: isCounterSigned ? `Electronic signatures (${signatures.length})` : "Electronic signature" }),
260
+ signatures.map((signature, index) => /* @__PURE__ */ jsxs(
261
+ "dl",
262
+ {
263
+ className: `mb-3 space-y-1 ${index > 0 ? "border-t border-border pt-2" : ""}`,
264
+ "data-testid": `signature-item-${index}`,
265
+ children: [
266
+ /* @__PURE__ */ jsx(Row, { label: "Signed by", field: "signer", children: signature.signer_name || signature.signer_email }),
267
+ /* @__PURE__ */ jsx(Row, { label: "On", field: "time", children: formatDate(signature.signed_at) }),
268
+ /* @__PURE__ */ jsx("dd", { children: /* @__PURE__ */ jsx(
269
+ "a",
270
+ {
271
+ href: certificateLink(signature, hostCertificateUrl),
272
+ target: "_blank",
273
+ rel: "noopener noreferrer",
274
+ className: "inline-flex items-center font-medium text-primary hover:underline pointer-coarse:min-h-11",
275
+ "data-testid": `signature-certificate-link-${index}`,
276
+ children: "View certificate"
277
+ }
278
+ ) })
279
+ ]
280
+ },
281
+ signature.reference
282
+ )),
283
+ /* @__PURE__ */ jsx(
284
+ "p",
285
+ {
286
+ className: `border-t border-border pt-2 ${status.intact ? "" : "text-red-text"}`,
287
+ "data-testid": "signature-detail-intact",
288
+ children: status.intact ? isCounterSigned ? "\u2713 Unchanged since the last signature" : "\u2713 Unchanged since signing" : "\u2717 Changed after it was signed"
289
+ }
290
+ ),
291
+ /* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-muted-foreground", "data-testid": "signature-detail-locked", children: "Locked: only further signatures can be added." })
292
+ ]
293
+ }
294
+ )
295
+ ] });
296
+ }
297
+ function Frame({ children }) {
298
+ return /* @__PURE__ */ jsxs(
299
+ "main",
300
+ {
301
+ className: "mx-auto w-full max-w-xl px-4 py-10 text-foreground",
302
+ "data-testid": "signature-certificate",
303
+ children: [
304
+ /* @__PURE__ */ jsx("h1", { className: "mb-6 text-xl font-semibold", children: "Signature certificate" }),
305
+ children
306
+ ]
307
+ }
308
+ );
309
+ }
310
+ function copyResult(name, match) {
311
+ if (match.kind === "current") return `\u2713 ${name} is the signed document, unchanged.`;
312
+ if (match.kind === "earlier") {
313
+ return `\u2713 ${name}: this is the version signed by ${match.signature.signer_name || "an ARBI user"}.`;
314
+ }
315
+ return `\u2717 ${name} is not the signed document: it differs from what was signed.`;
316
+ }
317
+ function SignatureCertificate({
318
+ reference,
319
+ verification,
320
+ isLoading = false,
321
+ error,
322
+ isErrorTransient = false,
323
+ formatDate = formatSignedAt,
324
+ allowCopyCheck = true
325
+ }) {
326
+ const [copy, setCopy] = useState({ state: "idle" });
327
+ const [dragging, setDragging] = useState(false);
328
+ const input = useRef(null);
329
+ if (isLoading) {
330
+ return /* @__PURE__ */ jsx(Frame, { children: /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", "data-testid": "signature-certificate-loading", children: "Checking the signature\u2026" }) });
331
+ }
332
+ if (error || !verification) {
333
+ return /* @__PURE__ */ jsx(Frame, { children: /* @__PURE__ */ jsx(
334
+ "p",
335
+ {
336
+ className: isErrorTransient ? "text-muted-foreground" : "text-red-text",
337
+ role: isErrorTransient ? "status" : "alert",
338
+ "data-testid": "signature-certificate-error",
339
+ children: error || "The signature could not be checked."
340
+ }
341
+ ) });
342
+ }
343
+ const [first, ...counter] = verification.signatures;
344
+ const check = async (file) => {
345
+ if (!file) return;
346
+ setCopy({ state: "checking", name: file.name });
347
+ try {
348
+ setCopy({ state: "done", name: file.name, match: await matchSignedCopy(file, verification) });
349
+ } catch {
350
+ setCopy({ state: "failed", name: file.name });
351
+ }
352
+ };
353
+ const onDrop = (e) => {
354
+ e.preventDefault();
355
+ setDragging(false);
356
+ void check(e.dataTransfer.files[0]);
357
+ };
358
+ return /* @__PURE__ */ jsxs(Frame, { children: [
359
+ /* @__PURE__ */ jsxs("section", { className: "space-y-3", children: [
360
+ first && /* @__PURE__ */ jsxs("p", { className: "text-base", "data-testid": "signature-certificate-signer", children: [
361
+ "Signed by ",
362
+ /* @__PURE__ */ jsx("strong", { children: first.signer_name || "an ARBI user" }),
363
+ " on",
364
+ " ",
365
+ formatDate(first.signed_at)
366
+ ] }),
367
+ counter.length > 0 && /* @__PURE__ */ jsx("ul", { className: "space-y-1 text-sm", "data-testid": "signature-certificate-counter", children: counter.map((s, i) => /* @__PURE__ */ jsxs("li", { children: [
368
+ "Also signed by ",
369
+ /* @__PURE__ */ jsx("strong", { children: s.signer_name || "an ARBI user" }),
370
+ " on",
371
+ " ",
372
+ formatDate(s.signed_at)
373
+ ] }, `${s.sha256}-${i}`)) }),
374
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "ARBI checks that this document hasn\u2019t changed since it was signed. If anything changed, this check fails." }),
375
+ /* @__PURE__ */ jsx(
376
+ "p",
377
+ {
378
+ className: cn(
379
+ "rounded-md border px-3 py-2 font-medium",
380
+ verification.intact ? "border-green-border bg-green-bg text-green-text" : "border-red-text text-red-text"
381
+ ),
382
+ role: "status",
383
+ "data-testid": "signature-certificate-result",
384
+ "data-intact": verification.intact,
385
+ children: verification.intact ? "\u2713 Unchanged since signing" : "\u2717 Changed since signing: this is not the document that was signed"
386
+ }
387
+ )
388
+ ] }),
389
+ allowCopyCheck && /* @__PURE__ */ jsxs("section", { className: "mt-8 space-y-2", children: [
390
+ /* @__PURE__ */ jsx("h2", { className: "text-sm font-medium", children: "Check your copy" }),
391
+ /* @__PURE__ */ jsxs(
392
+ "div",
393
+ {
394
+ role: "button",
395
+ tabIndex: 0,
396
+ className: cn(
397
+ "flex min-h-24 cursor-pointer flex-col items-center justify-center rounded-md border border-dashed px-4 py-6 text-center text-sm text-muted-foreground pointer-coarse:min-h-32",
398
+ dragging && "border-primary bg-muted"
399
+ ),
400
+ "data-testid": "signature-certificate-dropzone",
401
+ onClick: () => input.current?.click(),
402
+ onKeyDown: (e) => {
403
+ if (e.key === "Enter" || e.key === " ") {
404
+ e.preventDefault();
405
+ input.current?.click();
406
+ }
407
+ },
408
+ onDragOver: (e) => {
409
+ e.preventDefault();
410
+ setDragging(true);
411
+ },
412
+ onDragLeave: () => setDragging(false),
413
+ onDrop,
414
+ children: [
415
+ "Drop the PDF you were sent here, or choose it",
416
+ /* @__PURE__ */ jsx("span", { className: "mt-1 text-xs", children: "It is checked in this browser and never uploaded." }),
417
+ /* @__PURE__ */ jsx(
418
+ "input",
419
+ {
420
+ ref: input,
421
+ type: "file",
422
+ accept: "application/pdf,.pdf",
423
+ className: "sr-only",
424
+ "data-testid": "signature-certificate-file-input",
425
+ onChange: (e) => void check(e.target.files?.[0])
426
+ }
427
+ )
428
+ ]
429
+ }
430
+ ),
431
+ copy.state !== "idle" && /* @__PURE__ */ jsx(
432
+ "p",
433
+ {
434
+ className: cn(
435
+ "text-sm",
436
+ copy.state === "done" && copy.match.kind !== "none" && "text-green-text",
437
+ (copy.state === "done" && copy.match.kind === "none" || copy.state === "failed") && "text-red-text"
438
+ ),
439
+ role: "status",
440
+ "data-testid": "signature-certificate-copy-result",
441
+ children: copy.state === "checking" ? `Checking ${copy.name}\u2026` : copy.state === "failed" ? `${copy.name} could not be read.` : copyResult(copy.name, copy.match)
442
+ }
443
+ )
444
+ ] }),
445
+ reference && /* @__PURE__ */ jsxs(
446
+ "p",
447
+ {
448
+ className: "mt-8 text-xs text-muted-foreground",
449
+ "data-testid": "signature-certificate-reference",
450
+ children: [
451
+ "Reference ",
452
+ reference
453
+ ]
454
+ }
455
+ )
456
+ ] });
457
+ }
458
+ var LINK2 = "font-medium text-primary hover:underline pointer-coarse:min-h-11";
459
+ var DEFAULT_VERSION_SNAPSHOT_BAR_LABELS = {
460
+ title: (number) => `${number ? `Version ${number}` : "Saved version"} \xB7 read only`,
461
+ ask: "Ask about this version",
462
+ returnToCurrent: "Return to current version",
463
+ returnToLive: "Return to live document"
464
+ };
465
+ function VersionSnapshotBar({
466
+ versionNumber,
467
+ live = false,
468
+ onAsk,
469
+ onReturn,
470
+ labels: overrides
471
+ }) {
472
+ const labels = { ...DEFAULT_VERSION_SNAPSHOT_BAR_LABELS, ...overrides };
473
+ return /* @__PURE__ */ jsxs(
474
+ "div",
475
+ {
476
+ className: "flex items-center justify-between border-b px-3 py-2 text-xs",
477
+ "data-testid": "version-snapshot-bar",
478
+ children: [
479
+ /* @__PURE__ */ jsx("span", { children: labels.title(versionNumber) }),
480
+ /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-3", children: [
481
+ onAsk && /* @__PURE__ */ jsx("button", { type: "button", className: LINK2, "data-testid": "version-snapshot-ask", onClick: onAsk, children: labels.ask }),
482
+ /* @__PURE__ */ jsx(
483
+ "button",
484
+ {
485
+ type: "button",
486
+ className: LINK2,
487
+ "data-testid": "version-snapshot-return",
488
+ onClick: onReturn,
489
+ children: live ? labels.returnToLive : labels.returnToCurrent
490
+ }
491
+ )
492
+ ] })
493
+ ]
494
+ }
495
+ );
496
+ }
497
+ function names(request, status) {
498
+ return request.signers.filter((s) => s.status === status).map((s) => s.name || s.email || "");
499
+ }
500
+ function SignatureRequestBanner({
501
+ documentId,
502
+ onSign,
503
+ onEditDraft,
504
+ hidden = false
505
+ }) {
506
+ const { user, notify } = useDocumentTools();
507
+ const requests = useDocumentSignatureRequests(documentId, !hidden);
508
+ const voidRequest = useVoidSignatureRequest();
509
+ const me = user?.externalId ?? null;
510
+ if (hidden || !me || !requests.data) return null;
511
+ const open = requests.data.filter((r) => r.status === "sent" || r.status === "draft");
512
+ const awaitingMe = open.filter(
513
+ (r) => r.status === "sent" && r.signers.some((s) => s.user_ext_id === me && s.status === "pending")
514
+ );
515
+ const sentByMe = open.filter(
516
+ (r) => r.status === "sent" && r.created_by === me && !awaitingMe.includes(r)
517
+ );
518
+ const drafts = open.filter((r) => r.status === "draft" && r.created_by === me);
519
+ if (awaitingMe.length + sentByMe.length + drafts.length === 0) return null;
520
+ const doVoid = async (request) => {
521
+ try {
522
+ await voidRequest.mutateAsync(request.external_id);
523
+ notify(request.status === "draft" ? "Draft discarded." : "Signature request voided.", "info");
524
+ } catch (err) {
525
+ notify(err instanceof Error ? err.message : "Could not void it", "error");
526
+ }
527
+ };
528
+ return /* @__PURE__ */ jsxs(
529
+ "div",
530
+ {
531
+ className: "space-y-1.5 border-b border-border px-3 py-2 text-sm",
532
+ "data-testid": "signature-request-banner",
533
+ children: [
534
+ awaitingMe.map((r) => {
535
+ const count = r.fields.filter((f) => f.signer === me).length;
536
+ const author = r.signers.find((s) => s.user_ext_id === r.created_by)?.name;
537
+ return /* @__PURE__ */ jsxs(
538
+ "div",
539
+ {
540
+ className: "flex flex-wrap items-center gap-2 rounded-md bg-blue-50 px-2 py-1.5 text-blue-950 dark:bg-blue-950/40 dark:text-blue-100",
541
+ "data-testid": "signature-request-awaiting-me",
542
+ children: [
543
+ /* @__PURE__ */ jsx(PenLine, { className: "size-4 shrink-0", "aria-hidden": true }),
544
+ /* @__PURE__ */ jsxs("span", { className: "mr-auto", children: [
545
+ author && r.created_by !== me ? `${author} asked you to sign` : "You are asked to sign",
546
+ " ",
547
+ count,
548
+ " field",
549
+ count === 1 ? "" : "s",
550
+ " in this document.",
551
+ r.stale && " It has changed since it was sent: ask for it again."
552
+ ] }),
553
+ /* @__PURE__ */ jsx(
554
+ Button,
555
+ {
556
+ type: "button",
557
+ size: "sm",
558
+ onClick: () => onSign(r),
559
+ disabled: r.stale,
560
+ "data-testid": "signature-request-start",
561
+ children: "Review and sign"
562
+ }
563
+ )
564
+ ]
565
+ },
566
+ r.external_id
567
+ );
568
+ }),
569
+ sentByMe.map((r) => {
570
+ const pending = names(r, "pending");
571
+ const signed = r.signers.length - pending.length;
572
+ return /* @__PURE__ */ jsxs(
573
+ "div",
574
+ {
575
+ className: "flex flex-wrap items-center gap-2",
576
+ "data-testid": "signature-request-sent",
577
+ children: [
578
+ /* @__PURE__ */ jsx(Send, { className: "size-4 shrink-0 text-muted-foreground", "aria-hidden": true }),
579
+ /* @__PURE__ */ jsxs("span", { className: "mr-auto", children: [
580
+ "Out for signature: ",
581
+ signed,
582
+ " of ",
583
+ r.signers.length,
584
+ " signed",
585
+ pending.length > 0 && /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground", children: [
586
+ " \xB7 waiting for ",
587
+ pending.join(", ")
588
+ ] }),
589
+ r.stale && /* @__PURE__ */ jsx("span", { className: "text-red-text", children: " \xB7 the document has changed since it was sent" })
590
+ ] }),
591
+ /* @__PURE__ */ jsx(
592
+ Button,
593
+ {
594
+ type: "button",
595
+ size: "sm",
596
+ variant: "ghost",
597
+ onClick: () => doVoid(r),
598
+ disabled: voidRequest.isPending,
599
+ children: "Void"
600
+ }
601
+ )
602
+ ]
603
+ },
604
+ r.external_id
605
+ );
606
+ }),
607
+ drafts.map((r) => /* @__PURE__ */ jsxs(
608
+ "div",
609
+ {
610
+ className: "flex flex-wrap items-center gap-2",
611
+ "data-testid": "signature-request-draft",
612
+ children: [
613
+ /* @__PURE__ */ jsx(FilePenLine, { className: "size-4 shrink-0 text-muted-foreground", "aria-hidden": true }),
614
+ /* @__PURE__ */ jsxs("span", { className: "mr-auto", children: [
615
+ "Draft signature request: ",
616
+ r.fields.length,
617
+ " field",
618
+ r.fields.length === 1 ? "" : "s",
619
+ ", not sent yet."
620
+ ] }),
621
+ /* @__PURE__ */ jsx(Button, { type: "button", size: "sm", variant: "outline", onClick: () => onEditDraft(r), children: "Continue" }),
622
+ /* @__PURE__ */ jsx(
623
+ Button,
624
+ {
625
+ type: "button",
626
+ size: "sm",
627
+ variant: "ghost",
628
+ onClick: () => doVoid(r),
629
+ disabled: voidRequest.isPending,
630
+ children: "Discard"
631
+ }
632
+ )
633
+ ]
634
+ },
635
+ r.external_id
636
+ ))
637
+ ]
638
+ }
639
+ );
640
+ }
641
+
642
+ export { AnnotateButton, DEFAULT_VERSION_SNAPSHOT_BAR_LABELS, DownloadMarkupButton, MarkupNotices, MarkupViewNote, RequestSignaturesButton, ShowOriginalButton, SignButton, SignatureCertificate, SignatureRequestBanner, SignatureStatus, SignedEditNote, VersionSnapshotBar, formatSignedAt };
643
+ //# sourceMappingURL=chunk-KQYPP72K.js.map
644
+ //# sourceMappingURL=chunk-KQYPP72K.js.map