@arbidocs/blocks 0.5.16 → 0.5.17

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 (191) hide show
  1. package/dist/{ConnectedCallDock-PNF46ZCD.js → ConnectedCallDock-2NBGBWY5.js} +6 -6
  2. package/dist/{ConnectedCallDock-PNF46ZCD.js.map → ConnectedCallDock-2NBGBWY5.js.map} +1 -1
  3. package/dist/{ConnectedCallDock-AN7H7EA5.cjs → ConnectedCallDock-W5WIPP3F.cjs} +15 -15
  4. package/dist/{ConnectedCallDock-AN7H7EA5.cjs.map → ConnectedCallDock-W5WIPP3F.cjs.map} +1 -1
  5. package/dist/{ConnectedCallRoom-BCBK3JOH.js → ConnectedCallRoom-5AZH33AJ.js} +6 -6
  6. package/dist/{ConnectedCallRoom-BCBK3JOH.js.map → ConnectedCallRoom-5AZH33AJ.js.map} +1 -1
  7. package/dist/{ConnectedCallRoom-CISDTK4R.cjs → ConnectedCallRoom-XR25N6PN.cjs} +7 -7
  8. package/dist/{ConnectedCallRoom-CISDTK4R.cjs.map → ConnectedCallRoom-XR25N6PN.cjs.map} +1 -1
  9. package/dist/{ConnectedNativeDocxComparison-FCAICKSW.js → ConnectedNativeDocxComparison-BC5WSJEU.js} +11 -10
  10. package/dist/{ConnectedNativeDocxComparison-FCAICKSW.js.map → ConnectedNativeDocxComparison-BC5WSJEU.js.map} +1 -1
  11. package/dist/{ConnectedNativeDocxComparison-M2YD5ZIU.cjs → ConnectedNativeDocxComparison-O2COCSHL.cjs} +12 -11
  12. package/dist/{ConnectedNativeDocxComparison-M2YD5ZIU.cjs.map → ConnectedNativeDocxComparison-O2COCSHL.cjs.map} +1 -1
  13. package/dist/{ConnectedNativeDocxEditor-WCVJ7UTP.js → ConnectedNativeDocxEditor-JGIHX4KM.js} +10 -9
  14. package/dist/{ConnectedNativeDocxEditor-WCVJ7UTP.js.map → ConnectedNativeDocxEditor-JGIHX4KM.js.map} +1 -1
  15. package/dist/{ConnectedNativeDocxEditor-USWYSQTI.cjs → ConnectedNativeDocxEditor-OLKFI6ER.cjs} +12 -11
  16. package/dist/{ConnectedNativeDocxEditor-USWYSQTI.cjs.map → ConnectedNativeDocxEditor-OLKFI6ER.cjs.map} +1 -1
  17. package/dist/{ConnectedStreamedWordArtifact-4VXP44AG.cjs → ConnectedStreamedWordArtifact-FCHEZYHG.cjs} +12 -11
  18. package/dist/ConnectedStreamedWordArtifact-FCHEZYHG.cjs.map +1 -0
  19. package/dist/{ConnectedStreamedWordArtifact-EWTERIGT.js → ConnectedStreamedWordArtifact-QXVGVP22.js} +11 -10
  20. package/dist/ConnectedStreamedWordArtifact-QXVGVP22.js.map +1 -0
  21. package/dist/{WorkspaceTableView-V236NDPK.js → WorkspaceTableView-V4ZNTVS4.js} +3 -3
  22. package/dist/{WorkspaceTableView-V236NDPK.js.map → WorkspaceTableView-V4ZNTVS4.js.map} +1 -1
  23. package/dist/{WorkspaceTableView-P4PCXHZ6.cjs → WorkspaceTableView-VCIRIQRL.cjs} +3 -3
  24. package/dist/{WorkspaceTableView-P4PCXHZ6.cjs.map → WorkspaceTableView-VCIRIQRL.cjs.map} +1 -1
  25. package/dist/agents/index.cjs +329 -328
  26. package/dist/agents/index.js +7 -6
  27. package/dist/calls/index.cjs +142 -142
  28. package/dist/calls/index.js +10 -10
  29. package/dist/{chunk-5QJDDEYV.js → chunk-2AWDMU6T.js} +3 -3
  30. package/dist/{chunk-5QJDDEYV.js.map → chunk-2AWDMU6T.js.map} +1 -1
  31. package/dist/{chunk-ATNQD3AE.js → chunk-2EYAJAKT.js} +3 -3
  32. package/dist/{chunk-ATNQD3AE.js.map → chunk-2EYAJAKT.js.map} +1 -1
  33. package/dist/{chunk-PBM6BFFH.cjs → chunk-3L5MXUBZ.cjs} +4 -4
  34. package/dist/{chunk-PBM6BFFH.cjs.map → chunk-3L5MXUBZ.cjs.map} +1 -1
  35. package/dist/{chunk-OKYALUAN.js → chunk-4R5OHS2D.js} +3 -3
  36. package/dist/{chunk-OKYALUAN.js.map → chunk-4R5OHS2D.js.map} +1 -1
  37. package/dist/{chunk-4IMTH6Z4.js → chunk-5RHNGSVP.js} +3 -3
  38. package/dist/{chunk-4IMTH6Z4.js.map → chunk-5RHNGSVP.js.map} +1 -1
  39. package/dist/{chunk-TRHAIU6U.js → chunk-5S424MAG.js} +4 -4
  40. package/dist/{chunk-TRHAIU6U.js.map → chunk-5S424MAG.js.map} +1 -1
  41. package/dist/{chunk-TDIC7IXS.cjs → chunk-63VQD4R7.cjs} +7 -7
  42. package/dist/{chunk-TDIC7IXS.cjs.map → chunk-63VQD4R7.cjs.map} +1 -1
  43. package/dist/{chunk-LFBT3XTK.cjs → chunk-6MHGFCIW.cjs} +14 -14
  44. package/dist/{chunk-LFBT3XTK.cjs.map → chunk-6MHGFCIW.cjs.map} +1 -1
  45. package/dist/{chunk-RPWNNTJJ.js → chunk-7TAWJXSR.js} +6 -6
  46. package/dist/{chunk-RPWNNTJJ.js.map → chunk-7TAWJXSR.js.map} +1 -1
  47. package/dist/{chunk-ZJX7RUQ3.js → chunk-B5BJH76B.js} +4 -4
  48. package/dist/{chunk-ZJX7RUQ3.js.map → chunk-B5BJH76B.js.map} +1 -1
  49. package/dist/{chunk-VP7VAE2M.cjs → chunk-B5SEHTMC.cjs} +4 -4
  50. package/dist/{chunk-VP7VAE2M.cjs.map → chunk-B5SEHTMC.cjs.map} +1 -1
  51. package/dist/{chunk-4AAM6UQG.js → chunk-BIZDGRNM.js} +3 -3
  52. package/dist/{chunk-4AAM6UQG.js.map → chunk-BIZDGRNM.js.map} +1 -1
  53. package/dist/{chunk-5NFQCGGO.cjs → chunk-BLESTVHK.cjs} +5 -5
  54. package/dist/{chunk-5NFQCGGO.cjs.map → chunk-BLESTVHK.cjs.map} +1 -1
  55. package/dist/{chunk-5TALCIRH.js → chunk-CH4FHZSR.js} +4 -91
  56. package/dist/chunk-CH4FHZSR.js.map +1 -0
  57. package/dist/{chunk-AAWF27UG.js → chunk-D3OGQ5ZW.js} +3 -3
  58. package/dist/{chunk-AAWF27UG.js.map → chunk-D3OGQ5ZW.js.map} +1 -1
  59. package/dist/{chunk-DJ4BTWMA.cjs → chunk-DAL6B556.cjs} +4 -4
  60. package/dist/{chunk-DJ4BTWMA.cjs.map → chunk-DAL6B556.cjs.map} +1 -1
  61. package/dist/{chunk-35AUFGD7.js → chunk-E65JWVDL.js} +3 -3
  62. package/dist/{chunk-35AUFGD7.js.map → chunk-E65JWVDL.js.map} +1 -1
  63. package/dist/{chunk-XUWZMZP5.cjs → chunk-F4UYC2M2.cjs} +5 -5
  64. package/dist/{chunk-XUWZMZP5.cjs.map → chunk-F4UYC2M2.cjs.map} +1 -1
  65. package/dist/{chunk-WINJF2AK.js → chunk-F6UJUUFK.js} +3 -3
  66. package/dist/{chunk-WINJF2AK.js.map → chunk-F6UJUUFK.js.map} +1 -1
  67. package/dist/{chunk-ITOQYYTG.cjs → chunk-G6NRTQ25.cjs} +5 -5
  68. package/dist/{chunk-ITOQYYTG.cjs.map → chunk-G6NRTQ25.cjs.map} +1 -1
  69. package/dist/{chunk-RG4SLXZG.js → chunk-G7PAZQHJ.js} +3 -3
  70. package/dist/{chunk-RG4SLXZG.js.map → chunk-G7PAZQHJ.js.map} +1 -1
  71. package/dist/{chunk-CJFJNR2V.js → chunk-GTO65EQQ.js} +3 -3
  72. package/dist/{chunk-CJFJNR2V.js.map → chunk-GTO65EQQ.js.map} +1 -1
  73. package/dist/{chunk-IUPZMPXP.cjs → chunk-HPUEYVG3.cjs} +18 -18
  74. package/dist/{chunk-IUPZMPXP.cjs.map → chunk-HPUEYVG3.cjs.map} +1 -1
  75. package/dist/{chunk-LHLBMP24.js → chunk-HVXNEOOU.js} +6 -6
  76. package/dist/{chunk-LHLBMP24.js.map → chunk-HVXNEOOU.js.map} +1 -1
  77. package/dist/{chunk-PSWTOD7E.js → chunk-HXYYH4OB.js} +3 -3
  78. package/dist/{chunk-PSWTOD7E.js.map → chunk-HXYYH4OB.js.map} +1 -1
  79. package/dist/{chunk-I5KTRLKB.cjs → chunk-I5UQUMUL.cjs} +8 -8
  80. package/dist/{chunk-I5KTRLKB.cjs.map → chunk-I5UQUMUL.cjs.map} +1 -1
  81. package/dist/{chunk-4MADJGGF.cjs → chunk-JYYJGYUP.cjs} +4 -4
  82. package/dist/{chunk-4MADJGGF.cjs.map → chunk-JYYJGYUP.cjs.map} +1 -1
  83. package/dist/{chunk-AE3M3RTH.js → chunk-KB5RAHUZ.js} +6 -6
  84. package/dist/{chunk-AE3M3RTH.js.map → chunk-KB5RAHUZ.js.map} +1 -1
  85. package/dist/{chunk-AUDT4L2H.cjs → chunk-KNQQFJNE.cjs} +4 -4
  86. package/dist/{chunk-AUDT4L2H.cjs.map → chunk-KNQQFJNE.cjs.map} +1 -1
  87. package/dist/{chunk-UCVCYHAC.js → chunk-KUDS6DY4.js} +3 -3
  88. package/dist/{chunk-UCVCYHAC.js.map → chunk-KUDS6DY4.js.map} +1 -1
  89. package/dist/{chunk-TSD3GFOH.js → chunk-L5UHXBJK.js} +3 -3
  90. package/dist/{chunk-TSD3GFOH.js.map → chunk-L5UHXBJK.js.map} +1 -1
  91. package/dist/{chunk-52BZME74.cjs → chunk-LDB77NUS.cjs} +4 -4
  92. package/dist/{chunk-52BZME74.cjs.map → chunk-LDB77NUS.cjs.map} +1 -1
  93. package/dist/{chunk-SWBD76UN.cjs → chunk-M36FYCOE.cjs} +9 -9
  94. package/dist/{chunk-SWBD76UN.cjs.map → chunk-M36FYCOE.cjs.map} +1 -1
  95. package/dist/{chunk-3NTC4UZV.js → chunk-NUHWRBSL.js} +3 -3
  96. package/dist/{chunk-3NTC4UZV.js.map → chunk-NUHWRBSL.js.map} +1 -1
  97. package/dist/{chunk-VPUGVNGV.cjs → chunk-NXOPNJ3Y.cjs} +4 -4
  98. package/dist/{chunk-VPUGVNGV.cjs.map → chunk-NXOPNJ3Y.cjs.map} +1 -1
  99. package/dist/{chunk-RAPIHS52.js → chunk-NZUPFIS7.js} +3 -3
  100. package/dist/{chunk-RAPIHS52.js.map → chunk-NZUPFIS7.js.map} +1 -1
  101. package/dist/{chunk-5DRKMFRL.cjs → chunk-PYIDGKZW.cjs} +52 -52
  102. package/dist/{chunk-5DRKMFRL.cjs.map → chunk-PYIDGKZW.cjs.map} +1 -1
  103. package/dist/{chunk-JWNCZ6UP.cjs → chunk-QVMQMPBZ.cjs} +4 -4
  104. package/dist/{chunk-JWNCZ6UP.cjs.map → chunk-QVMQMPBZ.cjs.map} +1 -1
  105. package/dist/{chunk-CPLRUC7D.cjs → chunk-SHRNXL2Q.cjs} +76 -76
  106. package/dist/{chunk-CPLRUC7D.cjs.map → chunk-SHRNXL2Q.cjs.map} +1 -1
  107. package/dist/chunk-SI222Z3A.cjs +185 -0
  108. package/dist/chunk-SI222Z3A.cjs.map +1 -0
  109. package/dist/{chunk-DCQGJNZQ.js → chunk-SX2RX5DT.js} +3 -3
  110. package/dist/{chunk-DCQGJNZQ.js.map → chunk-SX2RX5DT.js.map} +1 -1
  111. package/dist/{chunk-3EVLRDXP.cjs → chunk-SZGUU2TS.cjs} +7 -7
  112. package/dist/{chunk-3EVLRDXP.cjs.map → chunk-SZGUU2TS.cjs.map} +1 -1
  113. package/dist/{chunk-A6MGGHHN.cjs → chunk-T55BHIB7.cjs} +4 -4
  114. package/dist/{chunk-A6MGGHHN.cjs.map → chunk-T55BHIB7.cjs.map} +1 -1
  115. package/dist/{chunk-ML27HIMM.cjs → chunk-TCT2VS72.cjs} +6 -6
  116. package/dist/{chunk-ML27HIMM.cjs.map → chunk-TCT2VS72.cjs.map} +1 -1
  117. package/dist/chunk-U4HWVCRN.js +180 -0
  118. package/dist/chunk-U4HWVCRN.js.map +1 -0
  119. package/dist/{chunk-NEODSOVW.js → chunk-VIUWP2FC.js} +3 -3
  120. package/dist/{chunk-NEODSOVW.js.map → chunk-VIUWP2FC.js.map} +1 -1
  121. package/dist/{chunk-3GT6GPTM.cjs → chunk-XGCXHDZT.cjs} +26 -26
  122. package/dist/{chunk-3GT6GPTM.cjs.map → chunk-XGCXHDZT.cjs.map} +1 -1
  123. package/dist/{chunk-U7ZBIU4S.cjs → chunk-XZ2IUJQV.cjs} +4 -4
  124. package/dist/{chunk-U7ZBIU4S.cjs.map → chunk-XZ2IUJQV.cjs.map} +1 -1
  125. package/dist/{chunk-5RIPA5DV.js → chunk-YFLARXLW.js} +5 -5
  126. package/dist/{chunk-5RIPA5DV.js.map → chunk-YFLARXLW.js.map} +1 -1
  127. package/dist/{chunk-MRG4OUL3.js → chunk-YN6ND3LW.js} +5 -5
  128. package/dist/{chunk-MRG4OUL3.js.map → chunk-YN6ND3LW.js.map} +1 -1
  129. package/dist/{chunk-OTV7TUKD.cjs → chunk-Z3IB6UMJ.cjs} +29 -29
  130. package/dist/{chunk-OTV7TUKD.cjs.map → chunk-Z3IB6UMJ.cjs.map} +1 -1
  131. package/dist/{chunk-BZF6E46W.cjs → chunk-ZLSMS6OK.cjs} +5 -92
  132. package/dist/chunk-ZLSMS6OK.cjs.map +1 -0
  133. package/dist/citations/index.cjs +12 -10
  134. package/dist/citations/index.js +4 -2
  135. package/dist/connect/docx.cjs +14 -13
  136. package/dist/connect/docx.js +10 -9
  137. package/dist/connect/index.cjs +711 -711
  138. package/dist/connect/index.cjs.map +1 -1
  139. package/dist/connect/index.js +31 -31
  140. package/dist/connect/index.js.map +1 -1
  141. package/dist/connect/viewer.cjs +91 -91
  142. package/dist/connect/viewer.js +14 -14
  143. package/dist/connection/billing/{ReferralReward.d.ts → ConnectedReferralReward.d.ts} +7 -7
  144. package/dist/connection/billing/referral-reward.d.ts +1 -1
  145. package/dist/document-tools/index.cjs +16 -16
  146. package/dist/document-tools/index.js +2 -2
  147. package/dist/facts/index.cjs +4 -3
  148. package/dist/facts/index.cjs.map +1 -1
  149. package/dist/facts/index.js +3 -2
  150. package/dist/facts/index.js.map +1 -1
  151. package/dist/files/index.cjs +224 -223
  152. package/dist/files/index.js +4 -3
  153. package/dist/home/index.cjs +31 -30
  154. package/dist/home/index.cjs.map +1 -1
  155. package/dist/home/index.js +6 -5
  156. package/dist/home/index.js.map +1 -1
  157. package/dist/index.cjs +453 -452
  158. package/dist/index.cjs.map +1 -1
  159. package/dist/index.js +14 -13
  160. package/dist/index.js.map +1 -1
  161. package/dist/provider/dialogs.d.ts +43 -0
  162. package/dist/retrieval/index.cjs +5 -4
  163. package/dist/retrieval/index.js +3 -2
  164. package/dist/settings/index.cjs +3 -3
  165. package/dist/settings/index.d.ts +1 -1
  166. package/dist/settings/index.js +1 -1
  167. package/dist/shell/index.cjs +47 -46
  168. package/dist/shell/index.js +4 -3
  169. package/dist/studio/index.cjs +14 -13
  170. package/dist/studio/index.cjs.map +1 -1
  171. package/dist/studio/index.js +6 -5
  172. package/dist/studio/index.js.map +1 -1
  173. package/dist/workflow-canvas/index.cjs +27 -26
  174. package/dist/workflow-canvas/index.cjs.map +1 -1
  175. package/dist/workflow-canvas/index.js +9 -8
  176. package/dist/workflow-canvas/index.js.map +1 -1
  177. package/dist/workspaces/index.cjs +22 -20
  178. package/dist/workspaces/index.cjs.map +1 -1
  179. package/dist/workspaces/index.js +6 -4
  180. package/dist/workspaces/index.js.map +1 -1
  181. package/node_modules/@arbidocs/coedit/package.json +1 -1
  182. package/package.json +5 -5
  183. package/dist/ConnectedStreamedWordArtifact-4VXP44AG.cjs.map +0 -1
  184. package/dist/ConnectedStreamedWordArtifact-EWTERIGT.js.map +0 -1
  185. package/dist/chunk-5TALCIRH.js.map +0 -1
  186. package/dist/chunk-BZF6E46W.cjs.map +0 -1
  187. package/dist/chunk-ECERC6TI.js +0 -77
  188. package/dist/chunk-ECERC6TI.js.map +0 -1
  189. package/dist/chunk-ZAVEMQ37.cjs +0 -80
  190. package/dist/chunk-ZAVEMQ37.cjs.map +0 -1
  191. package/dist/settings/ConfirmDialog.d.ts +0 -31
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var chunkBZF6E46W_cjs = require('./chunk-BZF6E46W.cjs');
4
+ var chunkZLSMS6OK_cjs = require('./chunk-ZLSMS6OK.cjs');
5
5
  var react = require('react');
6
6
  var lucideReact = require('lucide-react');
7
7
  var ui = require('@arbidocs/react/ui');
@@ -29,7 +29,7 @@ var SearchHit = react.memo(function SearchHit2({
29
29
  className
30
30
  }) {
31
31
  const l = { ...DEFAULT_SEARCH_HIT_LABELS, ...labels };
32
- const { linkComponent: Link } = chunkBZF6E46W_cjs.useBlocksEnvironment();
32
+ const { linkComponent: Link } = chunkZLSMS6OK_cjs.useBlocksEnvironment();
33
33
  const [expanded, setExpanded] = react.useState(false);
34
34
  const [overflowing, setOverflowing] = react.useState(false);
35
35
  const bodyRef = react.useRef(null);
@@ -92,5 +92,5 @@ var SearchHit = react.memo(function SearchHit2({
92
92
 
93
93
  exports.DEFAULT_SEARCH_HIT_LABELS = DEFAULT_SEARCH_HIT_LABELS;
94
94
  exports.SearchHit = SearchHit;
95
- //# sourceMappingURL=chunk-4MADJGGF.cjs.map
96
- //# sourceMappingURL=chunk-4MADJGGF.cjs.map
95
+ //# sourceMappingURL=chunk-JYYJGYUP.cjs.map
96
+ //# sourceMappingURL=chunk-JYYJGYUP.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/retrieval/SearchHit.tsx"],"names":["memo","SearchHit","useBlocksEnvironment","useState","useRef","useLayoutEffect","jsx","PassageCard","cn","Eye"],"mappings":";;;;;;;;AAYO,IAAM,yBAAA,GAA6C;AAAA,EACxD,QAAA,EAAU,WAAA;AAAA,EACV,QAAA,EAAU;AACZ;AAEA,SAAS,gBAAgB,CAAA,EAAwB;AAC/C,EAAA,OAAO,CAAA,CAAE,WAAW,CAAA,IAAK,CAAA,CAAE,WAAW,CAAA,CAAE,OAAA,IAAW,CAAA,CAAE,QAAA,IAAY,CAAA,CAAE,MAAA;AACrE;AAgCO,IAAM,SAAA,GAAYA,UAAA,CAAK,SAASC,UAAAA,CAAU;AAAA,EAC/C,MAAA;AAAA,EACA,OAAA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CAAC,GAAA,EAAA,EAAG,GAAG,SAAA,EAAY,QAAA,EAAA,IAAA,EAAK,CAAA;AAC7E,CAAC","file":"chunk-4MADJGGF.cjs","sourcesContent":["import { memo, useLayoutEffect, useRef, useState, type MouseEvent, type ReactNode } from 'react'\nimport { Eye } from 'lucide-react'\n\nimport { cn, PassageCard } from '@arbidocs/react/ui'\nimport { useBlocksEnvironment } from '../provider/environment'\nimport type { BlockLinkRenderProps } from '../components/blockLink'\n\nexport interface SearchHitLabels {\n showMore: string\n showLess: string\n}\n\nexport const DEFAULT_SEARCH_HIT_LABELS: SearchHitLabels = {\n showMore: 'Show more',\n showLess: 'Show less',\n}\n\nfunction isModifiedClick(e: MouseEvent): boolean {\n return e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey\n}\n\nexport interface SearchHitProps {\n /** Left side of the header row: a source pill or a small page label. */\n header: ReactNode\n /** Raw snippet text (passed through `renderSnippet`). */\n content: string\n /** Query terms to highlight; handed to `renderSnippet`. */\n terms: string[]\n /** Renders the snippet (markdown + highlight). The app owns the markdown pipeline. */\n renderSnippet: (content: string, terms: string[]) => ReactNode\n onClick: (e: MouseEvent) => void\n /** This passage is the one open in the viewer (yellow wash). */\n active?: boolean\n /** Marks the hit as the one currently open elsewhere (accent border + ring). */\n selected?: boolean\n /** Replaces the default open-eye on the right of the header. */\n headerRight?: ReactNode\n /**\n * Destination of the hit. Rendered as a real link (provider link component) so ctrl/cmd-click\n * opens it in a new tab; a plain click calls `onClick` and does not navigate.\n */\n href?: string\n labels?: Partial<SearchHitLabels>\n testId?: string\n className?: string\n}\n\n/**\n * Snippet-first search result: header over a 3-line clamped excerpt with a Show more toggle.\n * The card is a single click target; nothing interactive may sit inside its header.\n */\nexport const SearchHit = memo(function SearchHit({\n header,\n content,\n terms,\n renderSnippet,\n onClick,\n active = false,\n selected = false,\n headerRight,\n href,\n labels,\n testId,\n className,\n}: SearchHitProps) {\n const l = { ...DEFAULT_SEARCH_HIT_LABELS, ...labels }\n const { linkComponent: Link } = useBlocksEnvironment()\n const [expanded, setExpanded] = useState(false)\n const [overflowing, setOverflowing] = useState(false)\n const bodyRef = useRef<HTMLDivElement>(null)\n\n // Only offer \"Show more\" when the clamped snippet actually hides content.\n useLayoutEffect(() => {\n const el = bodyRef.current\n if (!el || expanded) return\n setOverflowing(el.scrollHeight > el.clientHeight + 1)\n }, [content, terms, expanded])\n\n const handleCardClick = (e: MouseEvent) => {\n if (href && isModifiedClick(e)) return\n if (href) e.preventDefault()\n onClick(e)\n }\n\n const card = (\n <PassageCard\n header={header}\n className={cn(\n // Plain `:hover` (not Tailwind `hover:`) so touchscreen laptops also get the border.\n '[&:hover]:border-primary',\n active && 'bg-yellow-100 dark:bg-yellow-800/40',\n className\n )}\n active={selected}\n headerRight={headerRight ?? <Eye className=\"size-4 text-muted-foreground\" aria-hidden />}\n onClick={handleCardClick}\n data-testid={testId}\n footer={\n (overflowing || expanded) && (\n <div className=\"flex justify-end\">\n <button\n type=\"button\"\n className=\"mt-1 text-xs font-medium text-primary hover:underline pointer-coarse:min-h-11\"\n onClick={(e) => {\n e.stopPropagation()\n e.preventDefault()\n setExpanded((v) => !v)\n }}\n >\n {expanded ? l.showLess : l.showMore}\n </button>\n </div>\n )\n }\n >\n <div\n ref={bodyRef}\n data-slot=\"search-hit\"\n className={cn('text-sm text-foreground/90', !expanded && 'line-clamp-3')}\n >\n {renderSnippet(content, terms)}\n </div>\n </PassageCard>\n )\n if (!href) return card\n const linkProps = {\n href,\n className: 'block',\n 'data-slot': 'search-hit-link',\n } as unknown as BlockLinkRenderProps\n return Link ? <Link {...linkProps}>{card}</Link> : <a {...linkProps}>{card}</a>\n})\n"]}
1
+ {"version":3,"sources":["../src/retrieval/SearchHit.tsx"],"names":["memo","SearchHit","useBlocksEnvironment","useState","useRef","useLayoutEffect","jsx","PassageCard","cn","Eye"],"mappings":";;;;;;;;AAYO,IAAM,yBAAA,GAA6C;AAAA,EACxD,QAAA,EAAU,WAAA;AAAA,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;AAAA,GACF;AAEF,EAAA,IAAI,CAAC,MAAM,OAAO,IAAA;AAClB,EAAA,MAAM,SAAA,GAAY;AAAA,IAChB,IAAA;AAAA,IACA,SAAA,EAAW,OAAA;AAAA,IACX,WAAA,EAAa;AAAA,GACf;AACA,EAAA,OAAO,IAAA,mBAAOF,cAAA,CAAC,IAAA,EAAA,EAAM,GAAG,SAAA,EAAY,QAAA,EAAA,IAAA,EAAK,CAAA,mBAAUA,cAAA,CAAC,GAAA,EAAA,EAAG,GAAG,SAAA,EAAY,QAAA,EAAA,IAAA,EAAK,CAAA;AAC7E,CAAC","file":"chunk-JYYJGYUP.cjs","sourcesContent":["import { memo, useLayoutEffect, useRef, useState, type MouseEvent, type ReactNode } from 'react'\nimport { Eye } from 'lucide-react'\n\nimport { cn, PassageCard } from '@arbidocs/react/ui'\nimport { useBlocksEnvironment } from '../provider/environment'\nimport type { BlockLinkRenderProps } from '../components/blockLink'\n\nexport interface SearchHitLabels {\n showMore: string\n showLess: string\n}\n\nexport const DEFAULT_SEARCH_HIT_LABELS: SearchHitLabels = {\n showMore: 'Show more',\n showLess: 'Show less',\n}\n\nfunction isModifiedClick(e: MouseEvent): boolean {\n return e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey\n}\n\nexport interface SearchHitProps {\n /** Left side of the header row: a source pill or a small page label. */\n header: ReactNode\n /** Raw snippet text (passed through `renderSnippet`). */\n content: string\n /** Query terms to highlight; handed to `renderSnippet`. */\n terms: string[]\n /** Renders the snippet (markdown + highlight). The app owns the markdown pipeline. */\n renderSnippet: (content: string, terms: string[]) => ReactNode\n onClick: (e: MouseEvent) => void\n /** This passage is the one open in the viewer (yellow wash). */\n active?: boolean\n /** Marks the hit as the one currently open elsewhere (accent border + ring). */\n selected?: boolean\n /** Replaces the default open-eye on the right of the header. */\n headerRight?: ReactNode\n /**\n * Destination of the hit. Rendered as a real link (provider link component) so ctrl/cmd-click\n * opens it in a new tab; a plain click calls `onClick` and does not navigate.\n */\n href?: string\n labels?: Partial<SearchHitLabels>\n testId?: string\n className?: string\n}\n\n/**\n * Snippet-first search result: header over a 3-line clamped excerpt with a Show more toggle.\n * The card is a single click target; nothing interactive may sit inside its header.\n */\nexport const SearchHit = memo(function SearchHit({\n header,\n content,\n terms,\n renderSnippet,\n onClick,\n active = false,\n selected = false,\n headerRight,\n href,\n labels,\n testId,\n className,\n}: SearchHitProps) {\n const l = { ...DEFAULT_SEARCH_HIT_LABELS, ...labels }\n const { linkComponent: Link } = useBlocksEnvironment()\n const [expanded, setExpanded] = useState(false)\n const [overflowing, setOverflowing] = useState(false)\n const bodyRef = useRef<HTMLDivElement>(null)\n\n // Only offer \"Show more\" when the clamped snippet actually hides content.\n useLayoutEffect(() => {\n const el = bodyRef.current\n if (!el || expanded) return\n setOverflowing(el.scrollHeight > el.clientHeight + 1)\n }, [content, terms, expanded])\n\n const handleCardClick = (e: MouseEvent) => {\n if (href && isModifiedClick(e)) return\n if (href) e.preventDefault()\n onClick(e)\n }\n\n const card = (\n <PassageCard\n header={header}\n className={cn(\n // Plain `:hover` (not Tailwind `hover:`) so touchscreen laptops also get the border.\n '[&:hover]:border-primary',\n active && 'bg-yellow-100 dark:bg-yellow-800/40',\n className\n )}\n active={selected}\n headerRight={headerRight ?? <Eye className=\"size-4 text-muted-foreground\" aria-hidden />}\n onClick={handleCardClick}\n data-testid={testId}\n footer={\n (overflowing || expanded) && (\n <div className=\"flex justify-end\">\n <button\n type=\"button\"\n className=\"mt-1 text-xs font-medium text-primary hover:underline pointer-coarse:min-h-11\"\n onClick={(e) => {\n e.stopPropagation()\n e.preventDefault()\n setExpanded((v) => !v)\n }}\n >\n {expanded ? l.showLess : l.showMore}\n </button>\n </div>\n )\n }\n >\n <div\n ref={bodyRef}\n data-slot=\"search-hit\"\n className={cn('text-sm text-foreground/90', !expanded && 'line-clamp-3')}\n >\n {renderSnippet(content, terms)}\n </div>\n </PassageCard>\n )\n if (!href) return card\n const linkProps = {\n href,\n className: 'block',\n 'data-slot': 'search-hit-link',\n } as unknown as BlockLinkRenderProps\n return Link ? <Link {...linkProps}>{card}</Link> : <a {...linkProps}>{card}</a>\n})\n"]}
@@ -1,12 +1,12 @@
1
1
  "use client";
2
2
  import { loadDocxFonts, isCandidate } from './chunk-MTSKK3BN.js';
3
3
  import { NativeDocxEditor, contentPath, builtinHouseTemplate } from './chunk-TRDY3ZT7.js';
4
- import { buildWorkflowScopeSource, documentScopeLabels, WorkflowDocumentsField, WorkflowLauncher, WorkflowsTable, workflowTriggerType } from './chunk-OKYALUAN.js';
4
+ import { buildWorkflowScopeSource, documentScopeLabels, WorkflowDocumentsField, WorkflowLauncher, WorkflowsTable, workflowTriggerType } from './chunk-4R5OHS2D.js';
5
5
  import { DocumentPicker } from './chunk-WNDIVNPT.js';
6
- import { useListedDocuments, useConnectedTags, useConnectedConversations } from './chunk-RG4SLXZG.js';
7
- import { useConnectedWorkspace } from './chunk-4AAM6UQG.js';
6
+ import { useListedDocuments, useConnectedTags, useConnectedConversations } from './chunk-G7PAZQHJ.js';
7
+ import { useConnectedWorkspace } from './chunk-BIZDGRNM.js';
8
8
  import { useHost } from './chunk-T4P237N6.js';
9
- import { useBlocksEnvironment } from './chunk-5TALCIRH.js';
9
+ import { useBlocksEnvironment } from './chunk-CH4FHZSR.js';
10
10
  import { parseDeepLinkPath, buildDeepLinkUrl } from './chunk-7Q5INDUS.js';
11
11
  import { fmtDate } from './chunk-OXF2IFXG.js';
12
12
  import { useMemo, useRef, useState, useCallback, useEffect } from 'react';
@@ -551,5 +551,5 @@ function useConnectedNativeDocxAdapter(fontBaseUrl = "/native-docx/fonts") {
551
551
  }
552
552
 
553
553
  export { ConnectedNativeDocxEditor, ConnectedWorkflowDocumentsField, ConnectedWorkflowLauncher, ConnectedWorkflowsTable, DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS, toWorkflowFieldDocument, useConnectedAgentOptions, useConnectedNativeDocxAdapter, useConnectedWorkflowScopeSource, useConnectedWorkspaceRole, useDocxCommentTarget, useNativeDocxSupport };
554
- //# sourceMappingURL=chunk-AE3M3RTH.js.map
555
- //# sourceMappingURL=chunk-AE3M3RTH.js.map
554
+ //# sourceMappingURL=chunk-KB5RAHUZ.js.map
555
+ //# sourceMappingURL=chunk-KB5RAHUZ.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/connection/docx/support.ts","../src/connection/ConnectedWorkflowLauncher.tsx","../src/connection/docx/useConnectedDocxReferences.tsx","../src/connection/ConnectedWorkflowsTable.tsx","../src/connection/docx/useConnectedHouseTemplate.ts","../src/connection/docx/ConnectedNativeDocxEditor.tsx"],"names":["useMemo","jsx","useRef","useAgents","useState","useArbi","jsxs","useWorkspaceUsers"],"mappings":";;;;;;;;;;;;;;;;;;AAuBA,IAAM,aAAgC,EAAC;AACvC,IAAM,YAAY,MAAM,IAAA;AAEjB,SAAS,oBAAA,GAA0C;AACxD,EAAA,OAAO,OAAA,GAAU,IAAA,IAAQ,UAAA;AAC3B;AAGO,SAAS,oBAAA,GAAyE;AACvF,EAAA,MAAM,SAAA,GAAY,oBAAA,EAAqB,CAAE,gBAAA,IAAoB,SAAA;AAC7D,EAAA,OAAO,SAAA,EAAU;AACnB;ACZA,IAAM,gBAAA,mBAAmB,IAAI,GAAA,CAAI,CAAC,KAAA,EAAO,KAAA,EAAO,MAAA,EAAQ,KAAA,EAAO,KAAA,EAAO,MAAA,EAAQ,MAAM,CAAC,CAAA;AAG9E,SAAS,wBAAwB,GAAA,EAA+C;AAErF,EAAA,MAAM,UAAU,gBAAA,CAAiB,GAAA,CAAA,CAAK,IAAI,SAAA,IAAa,EAAA,EAAI,aAAa,CAAA;AACxE,EAAA,OAAO;AAAA,IACL,IAAI,GAAA,CAAI,WAAA;AAAA,IACR,OAAO,GAAA,CAAI,YAAA,EAAc,KAAA,IAAS,GAAA,CAAI,aAAa,GAAA,CAAI,WAAA;AAAA,IACvD,UAAU,GAAA,CAAI,SAAA;AAAA,IACd,KAAA,EAAO,OAAA,GAAU,I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AAA;AAAA,UACR,OAAA,EAAS,EAAE,cAAA,EAAgB,kBAAA,EAAmB;AAAA,UAC9C,IAAA,EAAM,KAAK,SAAA,CAAU;AAAA,YACnB,YAAY,OAAA,CAAQ,SAAA;AAAA,YACpB,aAAa,OAAA,CAAQ,WAAA;AAAA,YACrB,YAAY,OAAA,CAAQ,SAAA;AAAA,YACpB,eAAe,OAAA,CAAQ;AAAA,WACxB;AAAA,SACF,CAAA;AACD,QAAA,MAAM,QAAA,GAAY,MAAM,QAAA,CAAS,IAAA,EAAK;AACtC,QAAA,MAAA,CAAO,sBAAsB,SAAS,CAAA;AACtC,QAAA,OAAO,EAAE,WAAA,EAAa,QAAA,CAAS,YAAA,IAAgB,EAAC,EAAE;AAAA,MACpD,CAAA;AAAA,MACA,cAAA,EAAgB,OAAO,UAAA,KAAA,CAAgB,MAAM,KAAK,SAAA,CAAU,WAAA,CAAY,UAAU,CAAA,EAAG,MAAA;AAAA,MACrF,aAAa,OAAA,CAAQ,WAAA;AAAA,MACrB,UAAA;AAAA,MACA,iBAAiB,OAAA,CAAQ,eAAA;AAAA,MACzB;AAAA,KACF,CAAA;AAAA,IACA;AAAA,MACE,IAAA;AAAA,MACA,MAAA;AAAA,MACA,OAAA;AAAA,MACA,mBAAA;AAAA,MACA,WAAA;AAAA,MACA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,kBAAA;AAAA,MACA,OAAA;AAAA,MACA,UAAA;AAAA,MACA,aAAA;AAAA,MACA,IAAA,EAAM;AAAA;AACR,GACF;AACA,EAAA,OAAO,OAAA;AACT","file":"chunk-AE3M3RTH.js","sourcesContent":["/**\n * What a host adds to the connected Word editor that the platform API alone cannot give: the\n * workspace's definitions (facts labelled \"Definitions\"), image generation (an assistant run), the\n * host's leave-page guard, and a comment to open the editor at. It is the host configuration's\n * `docx`; every field is optional, and without one the editor simply offers less (no Defined term,\n * no Generate image).\n */\n\nimport { useHost } from '../../provider/host'\nimport type { DefinitionSource } from '../../tags/definitions'\nimport type { DocxImageGeneration } from '../../docx/layout/GenerateImage'\n\nexport interface NativeDocxSupport {\n /** The workspace's definitions. Present: Insert offers Defined term and `@@` the type-ahead. */\n definitions?: () => Promise<DefinitionSource[]>\n /** The platform's image generation. Present: Insert offers Generate image. */\n imageGeneration?: DocxImageGeneration\n /** The open editor has (or no longer has) unsaved changes. */\n onDirtyChange?: (dirty: boolean) => void\n /** A comment thread to open when its document opens (a notification's link), as a hook. */\n useCommentTarget?: () => { documentId: string; commentId: string } | null\n}\n\nconst NO_SUPPORT: NativeDocxSupport = {}\nconst NO_TARGET = () => null\n\nexport function useNativeDocxSupport(): NativeDocxSupport {\n return useHost().docx ?? NO_SUPPORT\n}\n\n/** The comment thread to open with its document (none without the host's). */\nexport function useDocxCommentTarget(): { documentId: string; commentId: string } | null {\n const useTarget = useNativeDocxSupport().useCommentTarget ?? NO_TARGET\n return useTarget()\n}\n","/**\n * The workflow launcher bound to the connection: the open workspace's folders, labels and files\n * behind its scope and `documents` fields (files can be added right there), and the user's agents\n * behind \"Run as\". The host still says what a launch does (`onLaunch`): open a chat, start a task.\n */\n\nimport { useCallback, useMemo, useRef, useState } from 'react'\nimport { useAgents, useThumbnails, useUploadDocuments } from '@arbidocs/react'\nimport { WorkflowLauncher, type WorkflowLauncherProps } from '../agents/workflows/WorkflowLauncher'\nimport {\n WorkflowDocumentsField,\n type WorkflowDocumentsFieldLabels,\n type WorkflowFieldDocument,\n} from '../agents/workflows/WorkflowDocumentsField'\nimport type { WorkflowScopeSource } from '../agents/workflows/WorkflowConfigDialog'\nimport { buildWorkflowScopeSource, documentScopeLabels } from '../agents/workflows/workspaceScope'\nimport type { AgentOption } from '../agents/workflows/AgentSelect'\nimport type { WorkflowField, WorkflowScope } from '../agents/workflows/types'\nimport { useBlocksEnvironment } from '../provider/environment'\nimport { useConnectedWorkspace } from './ConnectionProvider'\nimport { useConnectedTags, useListedDocuments, type ConnectedDocument } from './workspaceData'\n\nconst IMAGE_FILE_TYPES = new Set(['png', 'jpg', 'jpeg', 'gif', 'bmp', 'tiff', 'webp'])\n\n/** A workspace document as a `documents` field offers it. */\nexport function toWorkflowFieldDocument(doc: ConnectedDocument): WorkflowFieldDocument {\n // Pages and tokens are a text-parsing concept: never meaningful for an image.\n const isImage = IMAGE_FILE_TYPES.has((doc.file_type ?? '').toLowerCase())\n return {\n id: doc.external_id,\n title: doc.doc_metadata?.title || doc.file_name || doc.external_id,\n fileName: doc.file_name,\n pages: isImage ? null : (doc.n_pages ?? null),\n tokens: isImage ? null : (doc.tokens ?? null),\n status: doc.status,\n isImage,\n }\n}\n\n/** The open workspace's folders and labels for a workflow's scope field. */\nexport function useConnectedWorkflowScopeSource(): WorkflowScopeSource {\n const { data: docs } = useListedDocuments()\n const { data: tags } = useConnectedTags()\n return useMemo(() => buildWorkflowScopeSource(docs, documentScopeLabels(tags)), [docs, tags])\n}\n\n/** The user's agents, for \"Run as\". */\nexport function useConnectedAgentOptions(): AgentOption[] {\n const { data: agents } = useAgents()\n return useMemo(\n () => (agents ?? []).map((a) => ({ id: a.external_id, label: a.given_name || a.email })),\n [agents]\n )\n}\n\nexport interface ConnectedWorkflowDocumentsFieldProps {\n field: WorkflowField\n value: WorkflowScope\n onChange: (value: WorkflowScope) => void\n /** Add files the host's way (its upload dialog). Absent: they are uploaded here. */\n onAddFiles?: (files?: File[]) => void\n labels?: Partial<WorkflowDocumentsFieldLabels>\n}\n\n/**\n * A workflow `documents` field over the open workspace's files: pick, add (or drop) files, see the\n * chosen images. A launcher's or a task composer's `renderDocuments`.\n */\nexport function ConnectedWorkflowDocumentsField({\n field,\n value,\n onChange,\n onAddFiles,\n labels,\n}: ConnectedWorkflowDocumentsFieldProps) {\n const { notify } = useBlocksEnvironment()\n const { ensureWorkspaceOpen } = useConnectedWorkspace()\n const { data: docs, loaded } = useListedDocuments()\n const uploadDocuments = useUploadDocuments()\n const documents = useMemo(() => docs.map(toWorkflowFieldDocument), [docs])\n const chosen = value.documents ?? []\n const { data: thumbnails } = useThumbnails(chosen, { enabled: (field.max ?? 1) > 1 })\n const input = useRef<HTMLInputElement>(null)\n const [adding, setAdding] = useState(false)\n\n const upload = useCallback(\n async (files: File[]) => {\n setAdding(true)\n try {\n await ensureWorkspaceOpen()\n // Each new document joins the shared list as it lands.\n for (const file of files) await uploadDocuments.mutateAsync({ files: [file] })\n } catch (error) {\n notify(error instanceof Error && error.message ? error.message : String(error), 'error')\n } finally {\n setAdding(false)\n }\n },\n [uploadDocuments, ensureWorkspaceOpen, notify]\n )\n\n return (\n <>\n {!onAddFiles && (\n <input\n ref={input}\n type=\"file\"\n multiple\n className=\"hidden\"\n aria-label=\"Add files\"\n data-testid=\"workflow-add-files-input\"\n onChange={(e) => {\n const files = Array.from(e.target.files ?? [])\n e.target.value = ''\n if (files.length) void upload(files)\n }}\n />\n )}\n <WorkflowDocumentsField\n field={field}\n value={value}\n onChange={onChange}\n documents={documents}\n loaded={loaded}\n thumbnailOf={(id) => thumbnails?.[id]}\n onAddFiles={\n onAddFiles ?? ((files) => (files?.length ? void upload(files) : input.current?.click()))\n }\n adding={adding}\n labels={labels}\n />\n </>\n )\n}\n\nexport interface ConnectedWorkflowLauncherProps extends Omit<\n WorkflowLauncherProps,\n 'scopeSource' | 'renderDocuments' | 'agents'\n> {\n /** Add files from a `documents` field the host's way (its upload dialog). Absent: uploaded here. */\n onAddFiles?: (files?: File[]) => void\n}\n\nexport function ConnectedWorkflowLauncher({\n onAddFiles,\n ...props\n}: ConnectedWorkflowLauncherProps) {\n const scopeSource = useConnectedWorkflowScopeSource()\n const agents = useConnectedAgentOptions()\n return (\n <WorkflowLauncher\n {...props}\n scopeSource={scopeSource}\n agents={agents}\n renderDocuments={(field, value, onChange) => (\n <ConnectedWorkflowDocumentsField\n field={field}\n value={value}\n onChange={onChange}\n onAddFiles={onAddFiles}\n />\n )}\n />\n )\n}\n","/**\n * The Word editor's references to the workspace's other documents: the documents and their\n * passages (the same parsed passages a fact's citations quote), the ARBI address of a passage\n * (`/wrk-…/doc-…/cnk-…`, the deep link that opens a document at a passage, so the link works from\n * Word too), and opening one wherever the host shows documents, highlighted like a citation.\n */\nimport { useMemo, useRef } from 'react'\nimport { useArbi } from '@arbidocs/react'\nimport type { DocxReferencesAdapter } from '../../docx/references/CrossReferences'\nimport { DocumentPicker } from '../../settings/DocumentPicker'\nimport { buildDeepLinkUrl, parseDeepLinkPath } from '../../lib/deep-link'\nimport { useBlocksEnvironment } from '../../provider/environment'\nimport { useConnectedWorkspace } from '../ConnectionProvider'\nimport { toWorkflowFieldDocument } from '../ConnectedWorkflowLauncher'\nimport { useListedDocuments, type ConnectedDocument } from '../workspaceData'\n\ninterface ParsedChunk {\n content?: string | null\n metadata?: { chunk_ext_id?: string | null; page_number?: number | null } | null\n}\n\n/** Top-level documents only: an attachment opens with its parent. */\nconst isTopLevel = (doc: ConnectedDocument) => !doc.parent_ext_id\n\nfunction ReferencePicker({\n documents,\n selectedId,\n onSelect,\n}: {\n documents: ConnectedDocument[]\n selectedId: string | null\n onSelect: (documentId: string) => void\n}) {\n const groups = useMemo(() => {\n const docs = documents\n .filter(isTopLevel)\n .map(toWorkflowFieldDocument)\n .sort((a, b) => a.title.toLowerCase().localeCompare(b.title.toLowerCase()))\n return [{ id: 'all', heading: 'In this workspace', docs }]\n }, [documents])\n const selected = groups[0].docs.find((d) => d.id === selectedId)\n return (\n <DocumentPicker\n groups={groups}\n value={selectedId ?? ''}\n onValueChange={onSelect}\n selected={selected}\n labels={{ placeholder: 'Search documents…' }}\n />\n )\n}\n\nexport function useConnectedDocxReferences(): DocxReferencesAdapter {\n const arbi = useArbi()\n const { workspaceId } = useConnectedWorkspace()\n const { openDocument, runtimeConfig } = useBlocksEnvironment()\n const { data: documents } = useListedDocuments()\n // Read when called (the picker, a link): the list grows while the editor is open.\n const documentsRef = useRef(documents)\n documentsRef.current = documents\n return useMemo<DocxReferencesAdapter>(\n () => ({\n documents: async () =>\n documentsRef.current\n .filter(isTopLevel)\n .map((d) => ({ id: d.external_id, title: toWorkflowFieldDocument(d).title })),\n passages: async (documentId) => {\n const parsed = await arbi.documents.getParsedContent(documentId, 'final')\n return ((parsed.chunks ?? []) as ParsedChunk[]).flatMap((chunk) =>\n chunk.metadata?.chunk_ext_id && chunk.content?.trim()\n ? [\n {\n chunkId: chunk.metadata.chunk_ext_id,\n page: chunk.metadata.page_number ?? null,\n text: chunk.content,\n },\n ]\n : []\n )\n },\n linkFor: ({ documentId, chunkId, page }) => {\n const url = buildDeepLinkUrl(\n { workspaceId: workspaceId ?? undefined, documentId, chunkId },\n runtimeConfig.deploymentDomain\n )\n return page ? `${url}?page=${page}` : url\n },\n targetOf: (href) => {\n let url: URL\n try {\n url = new URL(href, window.location.origin)\n } catch {\n return null\n }\n const { documentId, chunkId } = parseDeepLinkPath(url.pathname)\n if (!documentId || !chunkId) return null\n const page = Number(url.searchParams.get('page')) || null\n return { documentId, chunkId, page }\n },\n open: ({ documentId, chunkId, page }) =>\n openDocument(documentId, { passageId: chunkId, page: page ?? undefined }),\n renderDocumentPicker: (onSelect, selectedId) => (\n <ReferencePicker\n documents={documentsRef.current}\n selectedId={selectedId}\n onSelect={onSelect}\n />\n ),\n }),\n [arbi, workspaceId, openDocument, runtimeConfig.deploymentDomain]\n )\n}\n","/**\n * The saved workflows bound to the connection: when each starts, its last run (a link to the thread\n * it created) and next run, who runs it, pause and resume, share, run now, delete (one or many), and\n * the workflow's history. The host opens a workflow (its builder) and its history; threads open\n * through the environment's `openConversation`, failures are told through its `notify`.\n */\n\nimport { useEffect, useMemo, useState } from 'react'\nimport {\n useAgents,\n useDeleteWorkflow,\n useRunWorkflow,\n useUpdateWorkflow,\n useWorkflows,\n useWorkspaceUsers,\n type WorkflowResponse,\n} from '@arbidocs/react'\nimport { WorkflowsTable, type WorkflowsTableProps } from '../agents/tasks/WorkflowsTable'\nimport { workflowTriggerType } from '../agents/tasks/workflowRows'\nimport { fmtDate } from '../lib/format'\nimport { useBlocksEnvironment } from '../provider/environment'\nimport { useConnectedWorkspace } from './ConnectionProvider'\nimport { useConnectedConversations } from './workspaceData'\n\n/** The viewer's role in the open workspace, and the workspace's members. */\nexport function useConnectedWorkspaceRole() {\n const { workspaceId, live, userId, ensureWorkspaceOpen } = useConnectedWorkspace()\n const { data: members = [] } = useWorkspaceUsers(workspaceId ?? undefined, {\n enabled: live && !!workspaceId,\n beforeFetch: ensureWorkspaceOpen,\n })\n const role = members.find((m) => m.user.external_id === userId)?.role\n return {\n members,\n role,\n /** An owner or a collaborator edits, pauses, resumes and runs what is shared with the workspace. */\n canEditShared: role === 'owner' || role === 'collaborator',\n /** With an item's creator, the only one who deletes it. */\n isWorkspaceOwner: role === 'owner',\n }\n}\n\nexport interface ConnectedWorkflowsTableLabels {\n /** A change (pause, share, delete) that failed without a message. */\n updateFailed: string\n deleteTitle: string\n deleteOne: (name: string) => string\n deleteMany: (count: number) => string\n /** A run that failed: its history has the error report. */\n runFailed: string\n /** A run that created no thread. */\n noThread: string\n /** A document action that started (it has no thread): what is happening. */\n documentAction: (workflow: WorkflowResponse) => string\n untitledTask: string\n}\n\nexport const DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS: ConnectedWorkflowsTableLabels = {\n updateFailed: 'Could not update the workflow',\n deleteTitle: 'Delete workflow',\n deleteOne: (name) => `Delete “${name}”? Threads it already created stay.`,\n deleteMany: (count) => `Delete ${count} workflows? Threads they already created stay.`,\n runFailed: 'The workflow failed. You can send an error report from its history.',\n noThread: 'The workflow did not create a thread.',\n documentAction: (workflow) =>\n workflow.action?.type === 'email_documents'\n ? 'Preparing your document email'\n : 'Reviewing documents',\n untitledTask: 'Untitled thread',\n}\n\ntype TableProps = WorkflowsTableProps<WorkflowResponse>\n\nexport interface ConnectedWorkflowsTableProps extends Omit<\n TableProps,\n | 'workflows'\n | 'isLoading'\n | 'busyId'\n | 'describeTrigger'\n | 'formatDate'\n | 'onToggleActive'\n | 'onToggleShared'\n | 'onDelete'\n | 'onDeleteMany'\n | 'onToggleActiveMany'\n | 'onRun'\n | 'onOpenThread'\n | 'lastRuns'\n | 'agentNames'\n | 'taskNames'\n | 'canEditShared'\n | 'isWorkspaceOwner'\n> {\n /** Which saved workflows to list (e.g. those on a schedule). Default: all. */\n filter?: (workflow: WorkflowResponse) => boolean\n /** When a workflow starts, in the host's words. Default: its trigger type. */\n describeTrigger?: TableProps['describeTrigger']\n formatDate?: TableProps['formatDate']\n connectedLabels?: Partial<ConnectedWorkflowsTableLabels>\n}\n\nconst messageOf = (error: unknown) => (error instanceof Error ? error.message : '')\n\nexport function ConnectedWorkflowsTable({\n filter,\n describeTrigger = (w) => workflowTriggerType(w).replaceAll('_', ' '),\n formatDate = fmtDate,\n onViewRuns,\n connectedLabels,\n ...tableProps\n}: ConnectedWorkflowsTableProps) {\n const l = { ...DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS, ...connectedLabels }\n const { notify, confirm, openConversation } = useBlocksEnvironment()\n const { canEditShared, isWorkspaceOwner } = useConnectedWorkspaceRole()\n const { data: saved = [], isLoading } = useWorkflows({ live: true })\n const { data: conversations, refetch } = useConnectedConversations({ live: true })\n const { data: agents = [] } = useAgents()\n const update = useUpdateWorkflow()\n const remove = useDeleteWorkflow()\n const run = useRunWorkflow()\n const [busyId, setBusyId] = useState<string | null>(null)\n\n const workflows = useMemo(() => (filter ? saved.filter(filter) : saved), [saved, filter])\n // A clock or an event fired a workflow: the thread it created is new to the conversation list.\n const firingStamp = saved.map((w) => `${w.external_id}:${w.last_fired_at ?? ''}`).join('|')\n useEffect(() => {\n void refetch?.()\n }, [firingStamp, refetch])\n\n const lastRuns = useMemo(() => {\n const out: NonNullable<TableProps['lastRuns']> = {}\n for (const c of conversations) {\n const id = c.workflow_ext_id\n if (id && (!out[id] || Date.parse(c.created_at) > Date.parse(out[id].at)))\n out[id] = { conversationId: c.external_id, at: c.created_at, threadStatus: c.status }\n }\n return out\n }, [conversations])\n const agentNames = useMemo(\n () => Object.fromEntries(agents.map((a) => [a.external_id, a.given_name || a.email])),\n [agents]\n )\n const taskNames = useMemo(\n () =>\n Object.fromEntries(\n conversations\n .filter((c) => c.status != null)\n .map((c) => [c.external_id, c.title || l.untitledTask])\n ),\n [conversations, l.untitledTask]\n )\n\n const act = async (workflow: WorkflowResponse, action: () => Promise<unknown>) => {\n setBusyId(workflow.external_id)\n try {\n await action()\n } catch (error) {\n notify(messageOf(error) || l.updateFailed, 'error')\n } finally {\n setBusyId(null)\n }\n }\n const setActive = (workflow: WorkflowResponse, active: boolean) =>\n act(workflow, () => update.mutateAsync({ workflowId: workflow.external_id, patch: { active } }))\n const deleteAll = async (items: WorkflowResponse[]) => {\n if (!items.length) return\n const ok = await confirm({\n title: l.deleteTitle,\n message: items.length === 1 ? l.deleteOne(items[0].name) : l.deleteMany(items.length),\n })\n if (!ok) return\n for (const workflow of items)\n await act(workflow, () => remove.mutateAsync(workflow.external_id))\n }\n\n return (\n <WorkflowsTable\n {...tableProps}\n workflows={workflows}\n isLoading={isLoading}\n busyId={busyId}\n describeTrigger={describeTrigger}\n formatDate={formatDate}\n agentNames={agentNames}\n taskNames={taskNames}\n lastRuns={lastRuns}\n canEditShared={canEditShared}\n isWorkspaceOwner={isWorkspaceOwner}\n onOpenThread={(conversationId) => openConversation(conversationId)}\n onViewRuns={onViewRuns}\n onToggleActive={(workflow, active) => void setActive(workflow, active)}\n onToggleActiveMany={(items, active) => {\n void (async () => {\n for (const workflow of items) await setActive(workflow, active)\n })()\n }}\n onToggleShared={(workflow, shared) =>\n void act(workflow, () =>\n update.mutateAsync({ workflowId: workflow.external_id, patch: { shared } })\n )\n }\n onDelete={(workflow) => void deleteAll([workflow])}\n onDeleteMany={(items) => void deleteAll(items)}\n onRun={(workflow) =>\n void act(workflow, async () => {\n const result = await run.mutateAsync(workflow.external_id)\n if (result.conversation_ext_id) openConversation(result.conversation_ext_id)\n if (result.error) {\n onViewRuns?.(workflow)\n notify(l.runFailed, 'error')\n return\n }\n if (result.execution_id && !result.conversation_ext_id) {\n // A document action runs without a thread: its history shows how it goes.\n onViewRuns?.(workflow)\n notify(l.documentAction(workflow), 'success')\n return\n }\n if (!result.conversation_ext_id) throw new Error(l.noThread)\n })\n }\n />\n )\n}\n","/**\n * The house template for the open workspace: its own (a document of the workspace), else the\n * deployment's default, else ARBI's built-in legal template. A workspace owner can make a document\n * the house template once the server supports it.\n */\nimport { useMemo } from 'react'\nimport {\n supportsHouseTemplates,\n useArbi,\n useHouseTemplateCandidates,\n useSetWorkspaceHouseTemplate,\n useWorkspaces,\n workspaceHouseTemplateId,\n} from '@arbidocs/react'\nimport { contentPath } from '../../docx/NativeDocxEditor'\nimport {\n builtinHouseTemplate,\n type HouseTemplate,\n type HouseTemplateHost,\n} from '../../docx/template/HouseTemplate'\nimport { isCandidate } from '../../docx/template/candidates'\nimport { useConnectedWorkspace } from '../ConnectionProvider'\nimport { useConnectedWorkspaceRole } from '../ConnectedWorkflowsTable'\n\nexport function useConnectedHouseTemplate(): HouseTemplateHost {\n const arbi = useArbi()\n const { mutateAsync: setWorkspaceTemplate } = useSetWorkspaceHouseTemplate()\n const { workspaceId, live, ensureWorkspaceOpen } = useConnectedWorkspace()\n const { data: workspaces } = useWorkspaces({ enabled: live })\n const workspace = workspaces?.find((w) => w.external_id === workspaceId)\n const { isWorkspaceOwner } = useConnectedWorkspaceRole()\n const supported = supportsHouseTemplates(workspace)\n const templateId = workspaceHouseTemplateId(workspace)\n // Only an eligible document (shared, Word, here or in a public workspace) is offered as the template.\n const { data: candidates } = useHouseTemplateCandidates(\n workspaceId,\n supported && isWorkspaceOwner\n )\n return useMemo<HouseTemplateHost>(\n () => ({\n load: async (): Promise<HouseTemplate> => {\n if (templateId) {\n await ensureWorkspaceOpen()\n const response = await arbi.editor.request(contentPath(templateId))\n const [record] = await arbi.documents.get([templateId]).catch(() => [])\n return {\n bytes: new Uint8Array(await response.arrayBuffer()),\n name: record?.file_name ?? 'House template.docx',\n source: 'workspace',\n documentId: templateId,\n }\n }\n if (supported) {\n const deployment = await arbi.houseTemplates.deployment()\n if (deployment) return { ...deployment, source: 'deployment' }\n }\n return builtinHouseTemplate()\n },\n setFromDocument:\n supported && isWorkspaceOwner\n ? async (documentId) => {\n await ensureWorkspaceOpen()\n await setWorkspaceTemplate(documentId)\n }\n : undefined,\n isEligible: (documentId) => isCandidate(candidates, documentId),\n }),\n [\n arbi,\n setWorkspaceTemplate,\n supported,\n templateId,\n isWorkspaceOwner,\n candidates,\n ensureWorkspaceOpen,\n ]\n )\n}\n","import { useMemo, useRef, useState } from 'react'\nimport { useQueryClient } from '@tanstack/react-query'\nimport { refreshDocuments, useArbi, useWorkspaceUsers } from '@arbidocs/react'\nimport {\n fetchSavedSignature,\n storeSavedSignature,\n useOptionalDocumentTools,\n} from '@arbidocs/react/document-tools'\nimport {\n NativeDocxEditor,\n type NativeDocxAdapter,\n type NativeDocxEditorProps,\n} from '../../docx/NativeDocxEditor'\nimport { loadDocxFonts } from '../../docx/fonts'\nimport { useRegisterOpenDocument } from '@arbidocs/react/shell'\nimport { useBlocksEnvironment } from '../../provider/environment'\nimport { useConnectedWorkspace } from '../ConnectionProvider'\nimport { useDocxCommentTarget, useNativeDocxSupport } from './support'\nimport { useConnectedDocxReferences } from './useConnectedDocxReferences'\nimport { useConnectedHouseTemplate } from './useConnectedHouseTemplate'\n\nexport type ConnectedNativeDocxEditorProps = Omit<NativeDocxEditorProps, 'adapter'> & {\n fontBaseUrl?: string\n}\n\n/**\n * The native Word editor on the signed-in ARBI session, under any host (`defaultHost`'s sign-in\n * layer, or the host's own `arbi` and session state). Until a live session has opened, a failure to\n * open one falls back to the saved copy, read-only, so the document is still readable; later token\n * refreshes are not guarded (switching modes would drop unsaved edits).\n */\nexport function ConnectedNativeDocxEditor({\n fontBaseUrl = '/native-docx/fonts',\n ...props\n}: ConnectedNativeDocxEditorProps) {\n const adapter = useConnectedNativeDocxAdapter(fontBaseUrl)\n const { workspaceId } = useConnectedWorkspace()\n const commentTarget = useDocxCommentTarget()\n const [openFailed, setOpenFailed] = useState(false)\n const hasOpened = useRef(false)\n const guardedAdapter = useMemo<NativeDocxAdapter>(\n () => ({\n ...adapter,\n open: async (documentId) => {\n try {\n const session = await adapter.open(documentId)\n hasOpened.current = true\n return session\n } catch (error) {\n if (!hasOpened.current) setOpenFailed(true)\n throw error\n }\n },\n }),\n [adapter]\n )\n // Drafting mode: the saved Word document being edited is what the chat is about. A history\n // snapshot, a streamed preview, an unsaved draft and an embedded body field are not.\n const live = !props.snapshot && !props.stream && !props.draftContent && !props.compact\n useRegisterOpenDocument({ documentId: live ? props.documentId : null, workspaceId })\n const initialCommentId =\n props.initialCommentId ??\n (commentTarget?.documentId === props.documentId ? commentTarget.commentId : undefined)\n return (\n <div className=\"flex h-full min-h-0 flex-col\">\n {openFailed && (\n <p role=\"status\" className=\"text-muted-foreground border-b px-3 py-2 text-xs\">\n Co-editing isn&apos;t available for this document right now, so this is a read-only copy\n of the last saved version.\n </p>\n )}\n <div className=\"min-h-0 flex-1\">\n <NativeDocxEditor\n {...props}\n snapshot={props.snapshot || openFailed}\n initialCommentId={initialCommentId}\n adapter={guardedAdapter}\n />\n </div>\n </div>\n )\n}\n\n/** The access token changed (a refresh): the live room is told the new one. */\nfunction tokenChanges(arbi: ReturnType<typeof useArbi>) {\n return (listener: () => void) => {\n if (!arbi.isLoggedIn) return () => {}\n const session = arbi.getClient().session\n let token = session.getState().accessToken\n return session.subscribe((state) => {\n if (state.accessToken === token) return\n token = state.accessToken\n listener()\n })\n }\n}\n\n/**\n * The native Word adapter on the signed-in session: the editor transport, the people to mention,\n * cross-references, the house template, and the host's extras (its host config's `docx`).\n */\nexport function useConnectedNativeDocxAdapter(fontBaseUrl = '/native-docx/fonts') {\n const arbi = useArbi()\n const { workspaceId, live, user, ensureWorkspaceOpen } = useConnectedWorkspace()\n const queries = useQueryClient()\n const { notify } = useBlocksEnvironment()\n const tools = useOptionalDocumentTools()\n const support = useNativeDocxSupport()\n const references = useConnectedDocxReferences()\n const houseTemplate = useConnectedHouseTemplate()\n const { data: members } = useWorkspaceUsers(workspaceId ?? undefined, {\n enabled: live && !!workspaceId,\n beforeFetch: ensureWorkspaceOpen,\n })\n const onDocumentsChanged = tools?.onDocumentsChanged\n // Tracked changes and comments are authored by the user's first name.\n const author = (live && arbi.user.profile()?.givenName) || user?.name || 'You'\n const adapter = useMemo<NativeDocxAdapter>(\n () => ({\n request: async (path, options) => {\n await ensureWorkspaceOpen()\n return arbi.editor.request(path, options)\n },\n open: async (id) => {\n await ensureWorkspaceOpen()\n return (\n await arbi.editor.request(`/${encodeURIComponent(id)}/session`, { method: 'POST' })\n ).json()\n },\n save: async (id, state) =>\n (\n await arbi.editor.request(`/${encodeURIComponent(id)}/save`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ state }),\n })\n ).json(),\n loadFonts: () => loadDocxFonts(fontBaseUrl),\n baseUrl: arbi.getConnectionInfo()?.baseUrl || window.location.origin,\n author,\n subscribeTokenChanges: tokenChanges(arbi),\n onDirtyChange: support.onDirtyChange,\n // The document's row moves to the saved version in place: through the host when it keeps\n // the lists (its document tools refresh them), else here.\n onVersionSaved: async (id) => {\n await (onDocumentsChanged\n ? onDocumentsChanged([id], 'version')\n : refreshDocuments(queries, arbi, [id]))\n },\n notify,\n mentions: members?.map(({ user: member }) => ({\n id: member.external_id,\n name: [member.given_name, member.family_name].filter(Boolean).join(' '),\n kind: member.external_id.startsWith('agt-') ? 'agent' : 'human',\n })),\n savedSignature: {\n load: () => fetchSavedSignature(arbi.getClient().fetch),\n save: (signature) => storeSavedSignature(arbi.getClient().fetch, signature),\n defaultName: user?.name ?? '',\n },\n signatureSigners: members\n ?.filter(({ user: member }) => member.external_id.startsWith('usr-'))\n .map(({ user: member }) => ({\n email: member.email,\n name: [member.given_name, member.family_name].filter(Boolean).join(' '),\n })),\n requestAgent: async (id, request) => {\n const response = await arbi.editor.request(`/${encodeURIComponent(id)}/mentions`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({\n comment_id: request.commentId,\n instruction: request.instruction,\n request_id: request.requestId,\n recipient_ids: request.recipientIds,\n }),\n })\n const delivery = (await response.json()) as { response_ids: string[] }\n notify('Mention delivered.', 'success')\n return { responseIds: delivery.response_ids || [] }\n },\n getAgentStatus: async (responseId) => (await arbi.assistant.getResponse(responseId)).status,\n definitions: support.definitions,\n references,\n imageGeneration: support.imageGeneration,\n houseTemplate,\n }),\n [\n arbi,\n author,\n members,\n ensureWorkspaceOpen,\n fontBaseUrl,\n queries,\n notify,\n onDocumentsChanged,\n support,\n references,\n houseTemplate,\n user?.name,\n ]\n )\n return adapter\n}\n"]}
1
+ {"version":3,"sources":["../src/connection/docx/support.ts","../src/connection/ConnectedWorkflowLauncher.tsx","../src/connection/docx/useConnectedDocxReferences.tsx","../src/connection/ConnectedWorkflowsTable.tsx","../src/connection/docx/useConnectedHouseTemplate.ts","../src/connection/docx/ConnectedNativeDocxEditor.tsx"],"names":["useMemo","jsx","useRef","useAgents","useState","useArbi","jsxs","useWorkspaceUsers"],"mappings":";;;;;;;;;;;;;;;;;;AAuBA,IAAM,aAAgC,EAAC;AACvC,IAAM,YAAY,MAAM,IAAA;AAEjB,SAAS,oBAAA,GAA0C;AACxD,EAAA,OAAO,OAAA,GAAU,IAAA,IAAQ,UAAA;AAC3B;AAGO,SAAS,oBAAA,GAAyE;AACvF,EAAA,MAAM,SAAA,GAAY,oBAAA,EAAqB,CAAE,gBAAA,IAAoB,SAAA;AAC7D,EAAA,OAAO,SAAA,EAAU;AACnB;ACZA,IAAM,gBAAA,mBAAmB,IAAI,GAAA,CAAI,CAAC,KAAA,EAAO,KAAA,EAAO,MAAA,EAAQ,KAAA,EAAO,KAAA,EAAO,MAAA,EAAQ,MAAM,CAAC,CAAA;AAG9E,SAAS,wBAAwB,GAAA,EAA+C;AAErF,EAAA,MAAM,UAAU,gBAAA,CAAiB,GAAA,CAAA,CAAK,IAAI,SAAA,IAAa,EAAA,EAAI,aAAa,CAAA;AACxE,EAAA,OAAO;AAAA,IACL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EAAA,EAAI,OAAA,KAAY;AACnC,QAAA,MAAM,QAAA,GAAW,MAAM,IAAA,CAAK,MAAA,CAAO,QAAQ,CAAA,CAAA,EAAI,kBAAA,CAAmB,EAAE,CAAC,CAAA,SAAA,CAAA,EAAa;AAAA,UAChF,MAAA,EAAQ,MAAA;AAAA,UACR,OAAA,EAAS,EAAE,cAAA,EAAgB,kBAAA,EAAmB;AAAA,UAC9C,IAAA,EAAM,KAAK,SAAA,CAAU;AAAA,YACnB,YAAY,OAAA,CAAQ,SAAA;AAAA,YACpB,aAAa,OAAA,CAAQ,WAAA;AAAA,YACrB,YAAY,OAAA,CAAQ,SAAA;AAAA,YACpB,eAAe,OAAA,CAAQ;AAAA,WACxB;AAAA,SACF,CAAA;AACD,QAAA,MAAM,QAAA,GAAY,MAAM,QAAA,CAAS,IAAA,EAAK;AACtC,QAAA,MAAA,CAAO,sBAAsB,SAAS,CAAA;AACtC,QAAA,OAAO,EAAE,WAAA,EAAa,QAAA,CAAS,YAAA,IAAgB,EAAC,EAAE;AAAA,MACpD,CAAA;AAAA,MACA,cAAA,EAAgB,OAAO,UAAA,KAAA,CAAgB,MAAM,KAAK,SAAA,CAAU,WAAA,CAAY,UAAU,CAAA,EAAG,MAAA;AAAA,MACrF,aAAa,OAAA,CAAQ,WAAA;AAAA,MACrB,UAAA;AAAA,MACA,iBAAiB,OAAA,CAAQ,eAAA;AAAA,MACzB;AAAA,KACF,CAAA;AAAA,IACA;AAAA,MACE,IAAA;AAAA,MACA,MAAA;AAAA,MACA,OAAA;AAAA,MACA,mBAAA;AAAA,MACA,WAAA;AAAA,MACA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,kBAAA;AAAA,MACA,OAAA;AAAA,MACA,UAAA;AAAA,MACA,aAAA;AAAA,MACA,IAAA,EAAM;AAAA;AACR,GACF;AACA,EAAA,OAAO,OAAA;AACT","file":"chunk-KB5RAHUZ.js","sourcesContent":["/**\n * What a host adds to the connected Word editor that the platform API alone cannot give: the\n * workspace's definitions (facts labelled \"Definitions\"), image generation (an assistant run), the\n * host's leave-page guard, and a comment to open the editor at. It is the host configuration's\n * `docx`; every field is optional, and without one the editor simply offers less (no Defined term,\n * no Generate image).\n */\n\nimport { useHost } from '../../provider/host'\nimport type { DefinitionSource } from '../../tags/definitions'\nimport type { DocxImageGeneration } from '../../docx/layout/GenerateImage'\n\nexport interface NativeDocxSupport {\n /** The workspace's definitions. Present: Insert offers Defined term and `@@` the type-ahead. */\n definitions?: () => Promise<DefinitionSource[]>\n /** The platform's image generation. Present: Insert offers Generate image. */\n imageGeneration?: DocxImageGeneration\n /** The open editor has (or no longer has) unsaved changes. */\n onDirtyChange?: (dirty: boolean) => void\n /** A comment thread to open when its document opens (a notification's link), as a hook. */\n useCommentTarget?: () => { documentId: string; commentId: string } | null\n}\n\nconst NO_SUPPORT: NativeDocxSupport = {}\nconst NO_TARGET = () => null\n\nexport function useNativeDocxSupport(): NativeDocxSupport {\n return useHost().docx ?? NO_SUPPORT\n}\n\n/** The comment thread to open with its document (none without the host's). */\nexport function useDocxCommentTarget(): { documentId: string; commentId: string } | null {\n const useTarget = useNativeDocxSupport().useCommentTarget ?? NO_TARGET\n return useTarget()\n}\n","/**\n * The workflow launcher bound to the connection: the open workspace's folders, labels and files\n * behind its scope and `documents` fields (files can be added right there), and the user's agents\n * behind \"Run as\". The host still says what a launch does (`onLaunch`): open a chat, start a task.\n */\n\nimport { useCallback, useMemo, useRef, useState } from 'react'\nimport { useAgents, useThumbnails, useUploadDocuments } from '@arbidocs/react'\nimport { WorkflowLauncher, type WorkflowLauncherProps } from '../agents/workflows/WorkflowLauncher'\nimport {\n WorkflowDocumentsField,\n type WorkflowDocumentsFieldLabels,\n type WorkflowFieldDocument,\n} from '../agents/workflows/WorkflowDocumentsField'\nimport type { WorkflowScopeSource } from '../agents/workflows/WorkflowConfigDialog'\nimport { buildWorkflowScopeSource, documentScopeLabels } from '../agents/workflows/workspaceScope'\nimport type { AgentOption } from '../agents/workflows/AgentSelect'\nimport type { WorkflowField, WorkflowScope } from '../agents/workflows/types'\nimport { useBlocksEnvironment } from '../provider/environment'\nimport { useConnectedWorkspace } from './ConnectionProvider'\nimport { useConnectedTags, useListedDocuments, type ConnectedDocument } from './workspaceData'\n\nconst IMAGE_FILE_TYPES = new Set(['png', 'jpg', 'jpeg', 'gif', 'bmp', 'tiff', 'webp'])\n\n/** A workspace document as a `documents` field offers it. */\nexport function toWorkflowFieldDocument(doc: ConnectedDocument): WorkflowFieldDocument {\n // Pages and tokens are a text-parsing concept: never meaningful for an image.\n const isImage = IMAGE_FILE_TYPES.has((doc.file_type ?? '').toLowerCase())\n return {\n id: doc.external_id,\n title: doc.doc_metadata?.title || doc.file_name || doc.external_id,\n fileName: doc.file_name,\n pages: isImage ? null : (doc.n_pages ?? null),\n tokens: isImage ? null : (doc.tokens ?? null),\n status: doc.status,\n isImage,\n }\n}\n\n/** The open workspace's folders and labels for a workflow's scope field. */\nexport function useConnectedWorkflowScopeSource(): WorkflowScopeSource {\n const { data: docs } = useListedDocuments()\n const { data: tags } = useConnectedTags()\n return useMemo(() => buildWorkflowScopeSource(docs, documentScopeLabels(tags)), [docs, tags])\n}\n\n/** The user's agents, for \"Run as\". */\nexport function useConnectedAgentOptions(): AgentOption[] {\n const { data: agents } = useAgents()\n return useMemo(\n () => (agents ?? []).map((a) => ({ id: a.external_id, label: a.given_name || a.email })),\n [agents]\n )\n}\n\nexport interface ConnectedWorkflowDocumentsFieldProps {\n field: WorkflowField\n value: WorkflowScope\n onChange: (value: WorkflowScope) => void\n /** Add files the host's way (its upload dialog). Absent: they are uploaded here. */\n onAddFiles?: (files?: File[]) => void\n labels?: Partial<WorkflowDocumentsFieldLabels>\n}\n\n/**\n * A workflow `documents` field over the open workspace's files: pick, add (or drop) files, see the\n * chosen images. A launcher's or a task composer's `renderDocuments`.\n */\nexport function ConnectedWorkflowDocumentsField({\n field,\n value,\n onChange,\n onAddFiles,\n labels,\n}: ConnectedWorkflowDocumentsFieldProps) {\n const { notify } = useBlocksEnvironment()\n const { ensureWorkspaceOpen } = useConnectedWorkspace()\n const { data: docs, loaded } = useListedDocuments()\n const uploadDocuments = useUploadDocuments()\n const documents = useMemo(() => docs.map(toWorkflowFieldDocument), [docs])\n const chosen = value.documents ?? []\n const { data: thumbnails } = useThumbnails(chosen, { enabled: (field.max ?? 1) > 1 })\n const input = useRef<HTMLInputElement>(null)\n const [adding, setAdding] = useState(false)\n\n const upload = useCallback(\n async (files: File[]) => {\n setAdding(true)\n try {\n await ensureWorkspaceOpen()\n // Each new document joins the shared list as it lands.\n for (const file of files) await uploadDocuments.mutateAsync({ files: [file] })\n } catch (error) {\n notify(error instanceof Error && error.message ? error.message : String(error), 'error')\n } finally {\n setAdding(false)\n }\n },\n [uploadDocuments, ensureWorkspaceOpen, notify]\n )\n\n return (\n <>\n {!onAddFiles && (\n <input\n ref={input}\n type=\"file\"\n multiple\n className=\"hidden\"\n aria-label=\"Add files\"\n data-testid=\"workflow-add-files-input\"\n onChange={(e) => {\n const files = Array.from(e.target.files ?? [])\n e.target.value = ''\n if (files.length) void upload(files)\n }}\n />\n )}\n <WorkflowDocumentsField\n field={field}\n value={value}\n onChange={onChange}\n documents={documents}\n loaded={loaded}\n thumbnailOf={(id) => thumbnails?.[id]}\n onAddFiles={\n onAddFiles ?? ((files) => (files?.length ? void upload(files) : input.current?.click()))\n }\n adding={adding}\n labels={labels}\n />\n </>\n )\n}\n\nexport interface ConnectedWorkflowLauncherProps extends Omit<\n WorkflowLauncherProps,\n 'scopeSource' | 'renderDocuments' | 'agents'\n> {\n /** Add files from a `documents` field the host's way (its upload dialog). Absent: uploaded here. */\n onAddFiles?: (files?: File[]) => void\n}\n\nexport function ConnectedWorkflowLauncher({\n onAddFiles,\n ...props\n}: ConnectedWorkflowLauncherProps) {\n const scopeSource = useConnectedWorkflowScopeSource()\n const agents = useConnectedAgentOptions()\n return (\n <WorkflowLauncher\n {...props}\n scopeSource={scopeSource}\n agents={agents}\n renderDocuments={(field, value, onChange) => (\n <ConnectedWorkflowDocumentsField\n field={field}\n value={value}\n onChange={onChange}\n onAddFiles={onAddFiles}\n />\n )}\n />\n )\n}\n","/**\n * The Word editor's references to the workspace's other documents: the documents and their\n * passages (the same parsed passages a fact's citations quote), the ARBI address of a passage\n * (`/wrk-…/doc-…/cnk-…`, the deep link that opens a document at a passage, so the link works from\n * Word too), and opening one wherever the host shows documents, highlighted like a citation.\n */\nimport { useMemo, useRef } from 'react'\nimport { useArbi } from '@arbidocs/react'\nimport type { DocxReferencesAdapter } from '../../docx/references/CrossReferences'\nimport { DocumentPicker } from '../../settings/DocumentPicker'\nimport { buildDeepLinkUrl, parseDeepLinkPath } from '../../lib/deep-link'\nimport { useBlocksEnvironment } from '../../provider/environment'\nimport { useConnectedWorkspace } from '../ConnectionProvider'\nimport { toWorkflowFieldDocument } from '../ConnectedWorkflowLauncher'\nimport { useListedDocuments, type ConnectedDocument } from '../workspaceData'\n\ninterface ParsedChunk {\n content?: string | null\n metadata?: { chunk_ext_id?: string | null; page_number?: number | null } | null\n}\n\n/** Top-level documents only: an attachment opens with its parent. */\nconst isTopLevel = (doc: ConnectedDocument) => !doc.parent_ext_id\n\nfunction ReferencePicker({\n documents,\n selectedId,\n onSelect,\n}: {\n documents: ConnectedDocument[]\n selectedId: string | null\n onSelect: (documentId: string) => void\n}) {\n const groups = useMemo(() => {\n const docs = documents\n .filter(isTopLevel)\n .map(toWorkflowFieldDocument)\n .sort((a, b) => a.title.toLowerCase().localeCompare(b.title.toLowerCase()))\n return [{ id: 'all', heading: 'In this workspace', docs }]\n }, [documents])\n const selected = groups[0].docs.find((d) => d.id === selectedId)\n return (\n <DocumentPicker\n groups={groups}\n value={selectedId ?? ''}\n onValueChange={onSelect}\n selected={selected}\n labels={{ placeholder: 'Search documents…' }}\n />\n )\n}\n\nexport function useConnectedDocxReferences(): DocxReferencesAdapter {\n const arbi = useArbi()\n const { workspaceId } = useConnectedWorkspace()\n const { openDocument, runtimeConfig } = useBlocksEnvironment()\n const { data: documents } = useListedDocuments()\n // Read when called (the picker, a link): the list grows while the editor is open.\n const documentsRef = useRef(documents)\n documentsRef.current = documents\n return useMemo<DocxReferencesAdapter>(\n () => ({\n documents: async () =>\n documentsRef.current\n .filter(isTopLevel)\n .map((d) => ({ id: d.external_id, title: toWorkflowFieldDocument(d).title })),\n passages: async (documentId) => {\n const parsed = await arbi.documents.getParsedContent(documentId, 'final')\n return ((parsed.chunks ?? []) as ParsedChunk[]).flatMap((chunk) =>\n chunk.metadata?.chunk_ext_id && chunk.content?.trim()\n ? [\n {\n chunkId: chunk.metadata.chunk_ext_id,\n page: chunk.metadata.page_number ?? null,\n text: chunk.content,\n },\n ]\n : []\n )\n },\n linkFor: ({ documentId, chunkId, page }) => {\n const url = buildDeepLinkUrl(\n { workspaceId: workspaceId ?? undefined, documentId, chunkId },\n runtimeConfig.deploymentDomain\n )\n return page ? `${url}?page=${page}` : url\n },\n targetOf: (href) => {\n let url: URL\n try {\n url = new URL(href, window.location.origin)\n } catch {\n return null\n }\n const { documentId, chunkId } = parseDeepLinkPath(url.pathname)\n if (!documentId || !chunkId) return null\n const page = Number(url.searchParams.get('page')) || null\n return { documentId, chunkId, page }\n },\n open: ({ documentId, chunkId, page }) =>\n openDocument(documentId, { passageId: chunkId, page: page ?? undefined }),\n renderDocumentPicker: (onSelect, selectedId) => (\n <ReferencePicker\n documents={documentsRef.current}\n selectedId={selectedId}\n onSelect={onSelect}\n />\n ),\n }),\n [arbi, workspaceId, openDocument, runtimeConfig.deploymentDomain]\n )\n}\n","/**\n * The saved workflows bound to the connection: when each starts, its last run (a link to the thread\n * it created) and next run, who runs it, pause and resume, share, run now, delete (one or many), and\n * the workflow's history. The host opens a workflow (its builder) and its history; threads open\n * through the environment's `openConversation`, failures are told through its `notify`.\n */\n\nimport { useEffect, useMemo, useState } from 'react'\nimport {\n useAgents,\n useDeleteWorkflow,\n useRunWorkflow,\n useUpdateWorkflow,\n useWorkflows,\n useWorkspaceUsers,\n type WorkflowResponse,\n} from '@arbidocs/react'\nimport { WorkflowsTable, type WorkflowsTableProps } from '../agents/tasks/WorkflowsTable'\nimport { workflowTriggerType } from '../agents/tasks/workflowRows'\nimport { fmtDate } from '../lib/format'\nimport { useBlocksEnvironment } from '../provider/environment'\nimport { useConnectedWorkspace } from './ConnectionProvider'\nimport { useConnectedConversations } from './workspaceData'\n\n/** The viewer's role in the open workspace, and the workspace's members. */\nexport function useConnectedWorkspaceRole() {\n const { workspaceId, live, userId, ensureWorkspaceOpen } = useConnectedWorkspace()\n const { data: members = [] } = useWorkspaceUsers(workspaceId ?? undefined, {\n enabled: live && !!workspaceId,\n beforeFetch: ensureWorkspaceOpen,\n })\n const role = members.find((m) => m.user.external_id === userId)?.role\n return {\n members,\n role,\n /** An owner or a collaborator edits, pauses, resumes and runs what is shared with the workspace. */\n canEditShared: role === 'owner' || role === 'collaborator',\n /** With an item's creator, the only one who deletes it. */\n isWorkspaceOwner: role === 'owner',\n }\n}\n\nexport interface ConnectedWorkflowsTableLabels {\n /** A change (pause, share, delete) that failed without a message. */\n updateFailed: string\n deleteTitle: string\n deleteOne: (name: string) => string\n deleteMany: (count: number) => string\n /** A run that failed: its history has the error report. */\n runFailed: string\n /** A run that created no thread. */\n noThread: string\n /** A document action that started (it has no thread): what is happening. */\n documentAction: (workflow: WorkflowResponse) => string\n untitledTask: string\n}\n\nexport const DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS: ConnectedWorkflowsTableLabels = {\n updateFailed: 'Could not update the workflow',\n deleteTitle: 'Delete workflow',\n deleteOne: (name) => `Delete “${name}”? Threads it already created stay.`,\n deleteMany: (count) => `Delete ${count} workflows? Threads they already created stay.`,\n runFailed: 'The workflow failed. You can send an error report from its history.',\n noThread: 'The workflow did not create a thread.',\n documentAction: (workflow) =>\n workflow.action?.type === 'email_documents'\n ? 'Preparing your document email'\n : 'Reviewing documents',\n untitledTask: 'Untitled thread',\n}\n\ntype TableProps = WorkflowsTableProps<WorkflowResponse>\n\nexport interface ConnectedWorkflowsTableProps extends Omit<\n TableProps,\n | 'workflows'\n | 'isLoading'\n | 'busyId'\n | 'describeTrigger'\n | 'formatDate'\n | 'onToggleActive'\n | 'onToggleShared'\n | 'onDelete'\n | 'onDeleteMany'\n | 'onToggleActiveMany'\n | 'onRun'\n | 'onOpenThread'\n | 'lastRuns'\n | 'agentNames'\n | 'taskNames'\n | 'canEditShared'\n | 'isWorkspaceOwner'\n> {\n /** Which saved workflows to list (e.g. those on a schedule). Default: all. */\n filter?: (workflow: WorkflowResponse) => boolean\n /** When a workflow starts, in the host's words. Default: its trigger type. */\n describeTrigger?: TableProps['describeTrigger']\n formatDate?: TableProps['formatDate']\n connectedLabels?: Partial<ConnectedWorkflowsTableLabels>\n}\n\nconst messageOf = (error: unknown) => (error instanceof Error ? error.message : '')\n\nexport function ConnectedWorkflowsTable({\n filter,\n describeTrigger = (w) => workflowTriggerType(w).replaceAll('_', ' '),\n formatDate = fmtDate,\n onViewRuns,\n connectedLabels,\n ...tableProps\n}: ConnectedWorkflowsTableProps) {\n const l = { ...DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS, ...connectedLabels }\n const { notify, confirm, openConversation } = useBlocksEnvironment()\n const { canEditShared, isWorkspaceOwner } = useConnectedWorkspaceRole()\n const { data: saved = [], isLoading } = useWorkflows({ live: true })\n const { data: conversations, refetch } = useConnectedConversations({ live: true })\n const { data: agents = [] } = useAgents()\n const update = useUpdateWorkflow()\n const remove = useDeleteWorkflow()\n const run = useRunWorkflow()\n const [busyId, setBusyId] = useState<string | null>(null)\n\n const workflows = useMemo(() => (filter ? saved.filter(filter) : saved), [saved, filter])\n // A clock or an event fired a workflow: the thread it created is new to the conversation list.\n const firingStamp = saved.map((w) => `${w.external_id}:${w.last_fired_at ?? ''}`).join('|')\n useEffect(() => {\n void refetch?.()\n }, [firingStamp, refetch])\n\n const lastRuns = useMemo(() => {\n const out: NonNullable<TableProps['lastRuns']> = {}\n for (const c of conversations) {\n const id = c.workflow_ext_id\n if (id && (!out[id] || Date.parse(c.created_at) > Date.parse(out[id].at)))\n out[id] = { conversationId: c.external_id, at: c.created_at, threadStatus: c.status }\n }\n return out\n }, [conversations])\n const agentNames = useMemo(\n () => Object.fromEntries(agents.map((a) => [a.external_id, a.given_name || a.email])),\n [agents]\n )\n const taskNames = useMemo(\n () =>\n Object.fromEntries(\n conversations\n .filter((c) => c.status != null)\n .map((c) => [c.external_id, c.title || l.untitledTask])\n ),\n [conversations, l.untitledTask]\n )\n\n const act = async (workflow: WorkflowResponse, action: () => Promise<unknown>) => {\n setBusyId(workflow.external_id)\n try {\n await action()\n } catch (error) {\n notify(messageOf(error) || l.updateFailed, 'error')\n } finally {\n setBusyId(null)\n }\n }\n const setActive = (workflow: WorkflowResponse, active: boolean) =>\n act(workflow, () => update.mutateAsync({ workflowId: workflow.external_id, patch: { active } }))\n const deleteAll = async (items: WorkflowResponse[]) => {\n if (!items.length) return\n const ok = await confirm({\n title: l.deleteTitle,\n message: items.length === 1 ? l.deleteOne(items[0].name) : l.deleteMany(items.length),\n })\n if (!ok) return\n for (const workflow of items)\n await act(workflow, () => remove.mutateAsync(workflow.external_id))\n }\n\n return (\n <WorkflowsTable\n {...tableProps}\n workflows={workflows}\n isLoading={isLoading}\n busyId={busyId}\n describeTrigger={describeTrigger}\n formatDate={formatDate}\n agentNames={agentNames}\n taskNames={taskNames}\n lastRuns={lastRuns}\n canEditShared={canEditShared}\n isWorkspaceOwner={isWorkspaceOwner}\n onOpenThread={(conversationId) => openConversation(conversationId)}\n onViewRuns={onViewRuns}\n onToggleActive={(workflow, active) => void setActive(workflow, active)}\n onToggleActiveMany={(items, active) => {\n void (async () => {\n for (const workflow of items) await setActive(workflow, active)\n })()\n }}\n onToggleShared={(workflow, shared) =>\n void act(workflow, () =>\n update.mutateAsync({ workflowId: workflow.external_id, patch: { shared } })\n )\n }\n onDelete={(workflow) => void deleteAll([workflow])}\n onDeleteMany={(items) => void deleteAll(items)}\n onRun={(workflow) =>\n void act(workflow, async () => {\n const result = await run.mutateAsync(workflow.external_id)\n if (result.conversation_ext_id) openConversation(result.conversation_ext_id)\n if (result.error) {\n onViewRuns?.(workflow)\n notify(l.runFailed, 'error')\n return\n }\n if (result.execution_id && !result.conversation_ext_id) {\n // A document action runs without a thread: its history shows how it goes.\n onViewRuns?.(workflow)\n notify(l.documentAction(workflow), 'success')\n return\n }\n if (!result.conversation_ext_id) throw new Error(l.noThread)\n })\n }\n />\n )\n}\n","/**\n * The house template for the open workspace: its own (a document of the workspace), else the\n * deployment's default, else ARBI's built-in legal template. A workspace owner can make a document\n * the house template once the server supports it.\n */\nimport { useMemo } from 'react'\nimport {\n supportsHouseTemplates,\n useArbi,\n useHouseTemplateCandidates,\n useSetWorkspaceHouseTemplate,\n useWorkspaces,\n workspaceHouseTemplateId,\n} from '@arbidocs/react'\nimport { contentPath } from '../../docx/NativeDocxEditor'\nimport {\n builtinHouseTemplate,\n type HouseTemplate,\n type HouseTemplateHost,\n} from '../../docx/template/HouseTemplate'\nimport { isCandidate } from '../../docx/template/candidates'\nimport { useConnectedWorkspace } from '../ConnectionProvider'\nimport { useConnectedWorkspaceRole } from '../ConnectedWorkflowsTable'\n\nexport function useConnectedHouseTemplate(): HouseTemplateHost {\n const arbi = useArbi()\n const { mutateAsync: setWorkspaceTemplate } = useSetWorkspaceHouseTemplate()\n const { workspaceId, live, ensureWorkspaceOpen } = useConnectedWorkspace()\n const { data: workspaces } = useWorkspaces({ enabled: live })\n const workspace = workspaces?.find((w) => w.external_id === workspaceId)\n const { isWorkspaceOwner } = useConnectedWorkspaceRole()\n const supported = supportsHouseTemplates(workspace)\n const templateId = workspaceHouseTemplateId(workspace)\n // Only an eligible document (shared, Word, here or in a public workspace) is offered as the template.\n const { data: candidates } = useHouseTemplateCandidates(\n workspaceId,\n supported && isWorkspaceOwner\n )\n return useMemo<HouseTemplateHost>(\n () => ({\n load: async (): Promise<HouseTemplate> => {\n if (templateId) {\n await ensureWorkspaceOpen()\n const response = await arbi.editor.request(contentPath(templateId))\n const [record] = await arbi.documents.get([templateId]).catch(() => [])\n return {\n bytes: new Uint8Array(await response.arrayBuffer()),\n name: record?.file_name ?? 'House template.docx',\n source: 'workspace',\n documentId: templateId,\n }\n }\n if (supported) {\n const deployment = await arbi.houseTemplates.deployment()\n if (deployment) return { ...deployment, source: 'deployment' }\n }\n return builtinHouseTemplate()\n },\n setFromDocument:\n supported && isWorkspaceOwner\n ? async (documentId) => {\n await ensureWorkspaceOpen()\n await setWorkspaceTemplate(documentId)\n }\n : undefined,\n isEligible: (documentId) => isCandidate(candidates, documentId),\n }),\n [\n arbi,\n setWorkspaceTemplate,\n supported,\n templateId,\n isWorkspaceOwner,\n candidates,\n ensureWorkspaceOpen,\n ]\n )\n}\n","import { useMemo, useRef, useState } from 'react'\nimport { useQueryClient } from '@tanstack/react-query'\nimport { refreshDocuments, useArbi, useWorkspaceUsers } from '@arbidocs/react'\nimport {\n fetchSavedSignature,\n storeSavedSignature,\n useOptionalDocumentTools,\n} from '@arbidocs/react/document-tools'\nimport {\n NativeDocxEditor,\n type NativeDocxAdapter,\n type NativeDocxEditorProps,\n} from '../../docx/NativeDocxEditor'\nimport { loadDocxFonts } from '../../docx/fonts'\nimport { useRegisterOpenDocument } from '@arbidocs/react/shell'\nimport { useBlocksEnvironment } from '../../provider/environment'\nimport { useConnectedWorkspace } from '../ConnectionProvider'\nimport { useDocxCommentTarget, useNativeDocxSupport } from './support'\nimport { useConnectedDocxReferences } from './useConnectedDocxReferences'\nimport { useConnectedHouseTemplate } from './useConnectedHouseTemplate'\n\nexport type ConnectedNativeDocxEditorProps = Omit<NativeDocxEditorProps, 'adapter'> & {\n fontBaseUrl?: string\n}\n\n/**\n * The native Word editor on the signed-in ARBI session, under any host (`defaultHost`'s sign-in\n * layer, or the host's own `arbi` and session state). Until a live session has opened, a failure to\n * open one falls back to the saved copy, read-only, so the document is still readable; later token\n * refreshes are not guarded (switching modes would drop unsaved edits).\n */\nexport function ConnectedNativeDocxEditor({\n fontBaseUrl = '/native-docx/fonts',\n ...props\n}: ConnectedNativeDocxEditorProps) {\n const adapter = useConnectedNativeDocxAdapter(fontBaseUrl)\n const { workspaceId } = useConnectedWorkspace()\n const commentTarget = useDocxCommentTarget()\n const [openFailed, setOpenFailed] = useState(false)\n const hasOpened = useRef(false)\n const guardedAdapter = useMemo<NativeDocxAdapter>(\n () => ({\n ...adapter,\n open: async (documentId) => {\n try {\n const session = await adapter.open(documentId)\n hasOpened.current = true\n return session\n } catch (error) {\n if (!hasOpened.current) setOpenFailed(true)\n throw error\n }\n },\n }),\n [adapter]\n )\n // Drafting mode: the saved Word document being edited is what the chat is about. A history\n // snapshot, a streamed preview, an unsaved draft and an embedded body field are not.\n const live = !props.snapshot && !props.stream && !props.draftContent && !props.compact\n useRegisterOpenDocument({ documentId: live ? props.documentId : null, workspaceId })\n const initialCommentId =\n props.initialCommentId ??\n (commentTarget?.documentId === props.documentId ? commentTarget.commentId : undefined)\n return (\n <div className=\"flex h-full min-h-0 flex-col\">\n {openFailed && (\n <p role=\"status\" className=\"text-muted-foreground border-b px-3 py-2 text-xs\">\n Co-editing isn&apos;t available for this document right now, so this is a read-only copy\n of the last saved version.\n </p>\n )}\n <div className=\"min-h-0 flex-1\">\n <NativeDocxEditor\n {...props}\n snapshot={props.snapshot || openFailed}\n initialCommentId={initialCommentId}\n adapter={guardedAdapter}\n />\n </div>\n </div>\n )\n}\n\n/** The access token changed (a refresh): the live room is told the new one. */\nfunction tokenChanges(arbi: ReturnType<typeof useArbi>) {\n return (listener: () => void) => {\n if (!arbi.isLoggedIn) return () => {}\n const session = arbi.getClient().session\n let token = session.getState().accessToken\n return session.subscribe((state) => {\n if (state.accessToken === token) return\n token = state.accessToken\n listener()\n })\n }\n}\n\n/**\n * The native Word adapter on the signed-in session: the editor transport, the people to mention,\n * cross-references, the house template, and the host's extras (its host config's `docx`).\n */\nexport function useConnectedNativeDocxAdapter(fontBaseUrl = '/native-docx/fonts') {\n const arbi = useArbi()\n const { workspaceId, live, user, ensureWorkspaceOpen } = useConnectedWorkspace()\n const queries = useQueryClient()\n const { notify } = useBlocksEnvironment()\n const tools = useOptionalDocumentTools()\n const support = useNativeDocxSupport()\n const references = useConnectedDocxReferences()\n const houseTemplate = useConnectedHouseTemplate()\n const { data: members } = useWorkspaceUsers(workspaceId ?? undefined, {\n enabled: live && !!workspaceId,\n beforeFetch: ensureWorkspaceOpen,\n })\n const onDocumentsChanged = tools?.onDocumentsChanged\n // Tracked changes and comments are authored by the user's first name.\n const author = (live && arbi.user.profile()?.givenName) || user?.name || 'You'\n const adapter = useMemo<NativeDocxAdapter>(\n () => ({\n request: async (path, options) => {\n await ensureWorkspaceOpen()\n return arbi.editor.request(path, options)\n },\n open: async (id) => {\n await ensureWorkspaceOpen()\n return (\n await arbi.editor.request(`/${encodeURIComponent(id)}/session`, { method: 'POST' })\n ).json()\n },\n save: async (id, state) =>\n (\n await arbi.editor.request(`/${encodeURIComponent(id)}/save`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ state }),\n })\n ).json(),\n loadFonts: () => loadDocxFonts(fontBaseUrl),\n baseUrl: arbi.getConnectionInfo()?.baseUrl || window.location.origin,\n author,\n subscribeTokenChanges: tokenChanges(arbi),\n onDirtyChange: support.onDirtyChange,\n // The document's row moves to the saved version in place: through the host when it keeps\n // the lists (its document tools refresh them), else here.\n onVersionSaved: async (id) => {\n await (onDocumentsChanged\n ? onDocumentsChanged([id], 'version')\n : refreshDocuments(queries, arbi, [id]))\n },\n notify,\n mentions: members?.map(({ user: member }) => ({\n id: member.external_id,\n name: [member.given_name, member.family_name].filter(Boolean).join(' '),\n kind: member.external_id.startsWith('agt-') ? 'agent' : 'human',\n })),\n savedSignature: {\n load: () => fetchSavedSignature(arbi.getClient().fetch),\n save: (signature) => storeSavedSignature(arbi.getClient().fetch, signature),\n defaultName: user?.name ?? '',\n },\n signatureSigners: members\n ?.filter(({ user: member }) => member.external_id.startsWith('usr-'))\n .map(({ user: member }) => ({\n email: member.email,\n name: [member.given_name, member.family_name].filter(Boolean).join(' '),\n })),\n requestAgent: async (id, request) => {\n const response = await arbi.editor.request(`/${encodeURIComponent(id)}/mentions`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({\n comment_id: request.commentId,\n instruction: request.instruction,\n request_id: request.requestId,\n recipient_ids: request.recipientIds,\n }),\n })\n const delivery = (await response.json()) as { response_ids: string[] }\n notify('Mention delivered.', 'success')\n return { responseIds: delivery.response_ids || [] }\n },\n getAgentStatus: async (responseId) => (await arbi.assistant.getResponse(responseId)).status,\n definitions: support.definitions,\n references,\n imageGeneration: support.imageGeneration,\n houseTemplate,\n }),\n [\n arbi,\n author,\n members,\n ensureWorkspaceOpen,\n fontBaseUrl,\n queries,\n notify,\n onDocumentsChanged,\n support,\n references,\n houseTemplate,\n user?.name,\n ]\n )\n return adapter\n}\n"]}
@@ -2,7 +2,7 @@
2
2
  'use strict';
3
3
 
4
4
  var chunkSQ5F5BFW_cjs = require('./chunk-SQ5F5BFW.cjs');
5
- var chunkPBM6BFFH_cjs = require('./chunk-PBM6BFFH.cjs');
5
+ var chunk3L5MXUBZ_cjs = require('./chunk-3L5MXUBZ.cjs');
6
6
  var jsxRuntime = require('react/jsx-runtime');
7
7
  var ui = require('@arbidocs/react/ui');
8
8
  var lucideReact = require('lucide-react');
@@ -125,7 +125,7 @@ function MetricCard({
125
125
  );
126
126
  if (!isInteractive) return card;
127
127
  return /* @__PURE__ */ jsxRuntime.jsx(
128
- chunkPBM6BFFH_cjs.ActionLink,
128
+ chunk3L5MXUBZ_cjs.ActionLink,
129
129
  {
130
130
  href,
131
131
  onSelect,
@@ -156,5 +156,5 @@ exports.DataTableBlock = DataTableBlock;
156
156
  exports.MetricCard = MetricCard;
157
157
  exports.PageHeader = PageHeader;
158
158
  exports.StatGroup = StatGroup;
159
- //# sourceMappingURL=chunk-AUDT4L2H.cjs.map
160
- //# sourceMappingURL=chunk-AUDT4L2H.cjs.map
159
+ //# sourceMappingURL=chunk-KNQQFJNE.cjs.map
160
+ //# sourceMappingURL=chunk-KNQQFJNE.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/DataTableBlock.tsx","../src/components/PageHeader.tsx","../src/components/MetricCard.tsx","../src/components/StatGroup.tsx"],"names":["jsxs","jsx","DataTable","cn","Card","ArrowUpRight","ArrowDownRight","ActionLink"],"mappings":";;;;;;;;AA6CO,SAAS,eAAe,EAAE,OAAA,EAAS,MAAM,OAAA,EAAS,SAAA,EAAW,QAAO,EAAwB;AACjG,EAAA,MAAM,OAAO,MAAA,IAAU,kBAAA;AAEvB,EAAA,MAAM,YAAA,GAAuC,OAAA,CAAQ,GAAA,CAAI,CAAC,KAAK,KAAA,MAAW;AAAA,IACxE,GAAA,EAAK,GAAA,CAAI,KAAA,IAAS,CAAA,IAAA,EAAO,KAAK,CAAA,CAAA;AAAA,IAC9B,QAAQ,GAAA,CAAI,MAAA;AAAA,IACZ,OAAO,GAAA,CAAI,KAAA;AAAA,IACX,QAAQ,CAAC,GAAA,KAAQ,IAAI,KAAA,CAAM,GAAA,CAAI,KAAK,CAAA,IAAK;AAAA,GAC3C,CAAE,CAAA;AAEF,EAAA,MAAM,SAAA,GAA4B,IAAA,CAAK,GAAA,CAAI,CAAC,KAAA,EAAO,KAAA,MAAW,EAAE,IAAA,EAAM,MAAA,CAAO,KAAK,CAAA,EAAG,KAAA,EAAM,CAAE,CAAA;AAE7F,EAAA,uBACEA,eAAA,CAAC,KAAA,EAAA,EAAI,aAAA,EAAa,MAAA,EACf,QAAA,EAAA;AAAA,IAAA,OAAA,mBACCC,cAAA;AAAA,MAAC,GAAA;AAAA,MAAA;AAAA,QACC,SAAA,EAAU,oCAAA;AAAA,QACV,aAAA,EAAa,MAAA,GAAS,CAAA,EAAG,MAAM,CAAA,QAAA,CAAA,GAAa,MAAA;AAAA,QAE3C,QAAA,EAAA;AAAA;AAAA,KACH,GACE,IAAA;AAAA,oBACJA,cAA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AAA,EANpE,CAOV,CACD,CAAA,EACH,CAAA;AAEJ","file":"chunk-AUDT4L2H.cjs","sourcesContent":["/**\n * A **serializable** data table for the Puck builder.\n *\n * The library's developer-facing {@link DataTable} is driven by `Column<T>` whose\n * `header`/`render` are React nodes and functions — powerful, but non-serializable,\n * so it can never be a Puck block. `DataTableBlock` closes that gap with a flat,\n * JSON-safe schema (string headers, string field keys, string cells) and rebuilds\n * the non-serializable `Column<Row>[]` internally, rendering through the very same\n * {@link DataTable} so it inherits the library's markup and tokens verbatim.\n */\nimport { DataTable, type Column } from './DataTable'\n\nexport interface DataTableBlockColumn {\n /** Column heading text. */\n header: string\n /** Key used to look a cell up in each row record. */\n field: string\n /** Cell/heading alignment. */\n align?: 'left' | 'right' | 'center'\n}\n\nexport interface DataTableBlockProps {\n /** Serializable column schema. */\n columns: DataTableBlockColumn[]\n /** One record per row; cells are looked up by each column's `field`. */\n rows: Array<Record<string, string>>\n /** Optional caption rendered above the table. */\n caption?: string\n /** Empty-state title shown when there are no rows. */\n emptyText?: string\n /** testid area prefix; also set on the wrapper element. */\n testId?: string\n}\n\n/** A row wrapper so {@link DataTable} gets a stable id without polluting the record. */\ninterface TableRowData {\n __id: string\n cells: Record<string, string>\n}\n\n/**\n * Renders a {@link DataTable} from a flat, serializable schema. Columns are mapped\n * to `Column<TableRowData>[]` (header string, positional-stable key, alignment) and\n * each cell is resolved by `field`; rows carry a synthetic id for React keys/testids.\n */\nexport function DataTableBlock({ columns, rows, caption, emptyText, testId }: DataTableBlockProps) {\n const area = testId ?? 'data-table-block'\n\n const tableColumns: Column<TableRowData>[] = columns.map((col, index) => ({\n key: col.field || `col-${index}`,\n header: col.header,\n align: col.align,\n render: (row) => row.cells[col.field] ?? '',\n }))\n\n const tableRows: TableRowData[] = rows.map((cells, index) => ({ __id: String(index), cells }))\n\n return (\n <div data-testid={testId}>\n {caption ? (\n <p\n className=\"mb-2 text-sm text-muted-foreground\"\n data-testid={testId ? `${testId}-caption` : undefined}\n >\n {caption}\n </p>\n ) : null}\n <DataTable\n columns={tableColumns}\n rows={tableRows}\n getRowId={(row) => row.__id}\n area={area}\n emptyTitle={emptyText}\n />\n </div>\n )\n}\n","import type { ReactNode } from 'react'\nimport { cn } from '@arbidocs/react/ui'\n\nexport interface PageHeaderProps {\n title: ReactNode\n eyebrow?: ReactNode\n description?: ReactNode\n /** Before the title block: a back button, an avatar or an icon. */\n leading?: ReactNode\n actions?: ReactNode\n /** Under the whole header: a tab strip or segmented control. */\n tabs?: ReactNode\n className?: string\n testId?: string\n}\n\n/** Standard page title block: leading + eyebrow + title + description + actions, then tabs. */\nexport function PageHeader({\n title,\n eyebrow,\n description,\n leading,\n actions,\n tabs,\n className,\n testId,\n}: PageHeaderProps) {\n return (\n <div className={cn('flex flex-col gap-3', className)} data-testid={testId}>\n <div className=\"flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between\">\n <div className=\"flex min-w-0 items-center gap-3\">\n {leading && (\n <div className=\"shrink-0\" data-slot=\"page-header-leading\">\n {leading}\n </div>\n )}\n <div className=\"min-w-0\">\n {eyebrow && (\n <p className=\"mb-1 text-xs font-semibold uppercase tracking-wider text-muted-foreground\">\n {eyebrow}\n </p>\n )}\n <h1 className=\"font-display text-2xl font-semibold tracking-tight text-foreground\">\n {title}\n </h1>\n {description && (\n <p className=\"mt-1 max-w-2xl text-sm text-muted-foreground\">{description}</p>\n )}\n </div>\n </div>\n {actions && <div className=\"flex shrink-0 items-center gap-2\">{actions}</div>}\n </div>\n {tabs && <div data-slot=\"page-header-tabs\">{tabs}</div>}\n </div>\n )\n}\n","import type { ReactNode } from 'react'\nimport type { LucideIcon } from 'lucide-react'\nimport { ArrowDownRight, ArrowUpRight } from 'lucide-react'\nimport { Card, cn } from '@arbidocs/react/ui'\nimport { ActionLink } from './ActionLink'\n\nexport interface MetricCardProps {\n label: ReactNode\n value: ReactNode\n icon?: LucideIcon\n hint?: ReactNode\n delta?: { value: string; direction: 'up' | 'down'; good?: boolean }\n /**\n * Icon accent as a theme colour-token key (e.g. `primary`, `success`, or the host's own brand\n * token). Resolved to `var(--color-<accent>)` at render. `'default'` inherits `foreground`.\n */\n accent?: string\n /** Show a placeholder instead of the value (the figure is still being fetched). */\n isLoading?: boolean\n /** Makes the tile a real link (ctrl/cmd-click works). */\n href?: string\n /** Click handler; with `href`, a plain click calls it instead of navigating. */\n onSelect?: () => void\n className?: string\n testId?: string\n}\n\n/** The one true KPI tile. Used across every dashboard and module header. */\nexport function MetricCard({\n label,\n value,\n icon: Icon,\n hint,\n delta,\n accent = 'default',\n isLoading = false,\n href,\n onSelect,\n className,\n testId,\n}: MetricCardProps) {\n const accentStyle =\n accent && accent !== 'default' ? { color: `var(--color-${accent})` } : undefined\n const deltaGood = delta?.good ?? delta?.direction === 'up'\n const isInteractive = Boolean(href || onSelect)\n const card = (\n <Card\n variant=\"elevated\"\n className={cn('card-hover min-w-0 rounded-xl p-5', className)}\n data-testid={isInteractive ? undefined : testId}\n aria-busy={isLoading || undefined}\n >\n <div className=\"flex items-start justify-between gap-3\">\n <p className=\"min-w-0 text-xs font-medium uppercase tracking-wide text-muted-foreground\">\n {label}\n </p>\n {Icon && <Icon className=\"size-4 shrink-0\" style={accentStyle} />}\n </div>\n {isLoading ? (\n <div\n className=\"mt-2 h-8 w-20 animate-pulse rounded bg-muted\"\n data-slot=\"metric-card-skeleton\"\n />\n ) : (\n <p\n className=\"mt-2 font-display text-2xl font-semibold tracking-tight [overflow-wrap:anywhere]\"\n data-testid={testId && `${testId}-value`}\n >\n {value}\n </p>\n )}\n <div className=\"mt-1 flex items-center gap-2\">\n {delta && !isLoading && (\n <span\n className={cn(\n 'inline-flex items-center gap-0.5 text-xs font-medium',\n deltaGood ? 'text-success' : 'text-destructive'\n )}\n >\n {delta.direction === 'up' ? (\n <ArrowUpRight className=\"size-3\" />\n ) : (\n <ArrowDownRight className=\"size-3\" />\n )}\n {delta.value}\n </span>\n )}\n {hint && <span className=\"text-xs text-muted-foreground\">{hint}</span>}\n </div>\n </Card>\n )\n if (!isInteractive) return card\n return (\n <ActionLink\n href={href}\n onSelect={onSelect}\n className=\"block rounded-xl text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\"\n data-testid={testId}\n >\n {card}\n </ActionLink>\n )\n}\n","import { cn } from '@arbidocs/react/ui'\n\nexport interface StatItem {\n value: string\n label: string\n /** Optional caption under the label (e.g. a qualifier or unit). */\n sub?: string\n}\n\nexport interface StatGroupProps {\n items: StatItem[]\n testId?: string\n}\n\nconst GRID: Record<number, string> = {\n 1: 'grid-cols-1',\n 2: 'grid-cols-2',\n 3: 'grid-cols-2 sm:grid-cols-3',\n 4: 'grid-cols-2 lg:grid-cols-4',\n}\n\n/** Big-number stat group — headline metrics with captions. */\nexport function StatGroup({ items, testId }: StatGroupProps) {\n const list = items ?? []\n const cols = GRID[Math.min(list.length, 4)] ?? GRID[4]\n return (\n <dl className={cn('grid gap-8', cols)} data-testid={testId}>\n {list.map((item, i) => (\n <div key={i} className=\"min-w-0 text-center\" data-testid={testId && `${testId}-item-${i}`}>\n <dt className=\"sr-only\">{item.label}</dt>\n <dd className=\"text-4xl font-semibold tracking-tight [overflow-wrap:anywhere] sm:text-5xl\">\n {item.value}\n </dd>\n <p className=\"mt-2 text-sm text-muted-foreground\">{item.label}</p>\n {item.sub && <p className=\"mt-1 text-xs text-muted-foreground/80\">{item.sub}</p>}\n </div>\n ))}\n </dl>\n )\n}\n"]}
1
+ {"version":3,"sources":["../src/components/DataTableBlock.tsx","../src/components/PageHeader.tsx","../src/components/MetricCard.tsx","../src/components/StatGroup.tsx"],"names":["jsxs","jsx","DataTable","cn","Card","ArrowUpRight","ArrowDownRight","ActionLink"],"mappings":";;;;;;;;AA6CO,SAAS,eAAe,EAAE,OAAA,EAAS,MAAM,OAAA,EAAS,SAAA,EAAW,QAAO,EAAwB;AACjG,EAAA,MAAM,OAAO,MAAA,IAAU,kBAAA;AAEvB,EAAA,MAAM,YAAA,GAAuC,OAAA,CAAQ,GAA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,CAAC,CAAC,CAAA,IAAK,IAAA,CAAK,CAAC,CAAA;AACrD,EAAA,uBACEN,cAAAA,CAAC,IAAA,EAAA,EAAG,SAAA,EAAWE,KAAAA,CAAG,YAAA,EAAc,IAAI,CAAA,EAAG,aAAA,EAAa,MAAA,EACjD,QAAA,EAAA,IAAA,CAAK,GAAA,CAAI,CAAC,MAAM,CAAA,qBACfH,eAAAA,CAAC,KAAA,EAAA,EAAY,SAAA,EAAU,qBAAA,EAAsB,aAAA,EAAa,MAAA,IAAU,CAAA,EAAG,MAAM,CAAA,MAAA,EAAS,CAAC,CAAA,CAAA,EACrF,QAAA,EAAA;AAAA,oBAAAC,cAAAA,CAAC,IAAA,EAAA,EAAG,SAAA,EAAU,SAAA,EAAW,eAAK,KAAA,EAAM,CAAA;AAAA,oBACpCA,cAAAA,CAAC,IAAA,EAAA,EAAG,SAAA,EAAU,4EAAA,EACX,eAAK,KAAA,EACR,CAAA;AAAA,oBACAA,cAAAA,CAAC,GAAA,EAAA,EAAE,SAAA,EAAU,oCAAA,EAAsC,eAAK,KAAA,EAAM,CAAA;AAAA,IAC7D,IAAA,CAAK,uBAAOA,cAAAA,CAAC,OAAE,SAAA,EAAU,uCAAA,EAAyC,eAAK,GAAA,EAAI;AAAA,GAAA,EAAA,EANpE,CAOV,CACD,CAAA,EACH,CAAA;AAEJ","file":"chunk-KNQQFJNE.cjs","sourcesContent":["/**\n * A **serializable** data table for the Puck builder.\n *\n * The library's developer-facing {@link DataTable} is driven by `Column<T>` whose\n * `header`/`render` are React nodes and functions — powerful, but non-serializable,\n * so it can never be a Puck block. `DataTableBlock` closes that gap with a flat,\n * JSON-safe schema (string headers, string field keys, string cells) and rebuilds\n * the non-serializable `Column<Row>[]` internally, rendering through the very same\n * {@link DataTable} so it inherits the library's markup and tokens verbatim.\n */\nimport { DataTable, type Column } from './DataTable'\n\nexport interface DataTableBlockColumn {\n /** Column heading text. */\n header: string\n /** Key used to look a cell up in each row record. */\n field: string\n /** Cell/heading alignment. */\n align?: 'left' | 'right' | 'center'\n}\n\nexport interface DataTableBlockProps {\n /** Serializable column schema. */\n columns: DataTableBlockColumn[]\n /** One record per row; cells are looked up by each column's `field`. */\n rows: Array<Record<string, string>>\n /** Optional caption rendered above the table. */\n caption?: string\n /** Empty-state title shown when there are no rows. */\n emptyText?: string\n /** testid area prefix; also set on the wrapper element. */\n testId?: string\n}\n\n/** A row wrapper so {@link DataTable} gets a stable id without polluting the record. */\ninterface TableRowData {\n __id: string\n cells: Record<string, string>\n}\n\n/**\n * Renders a {@link DataTable} from a flat, serializable schema. Columns are mapped\n * to `Column<TableRowData>[]` (header string, positional-stable key, alignment) and\n * each cell is resolved by `field`; rows carry a synthetic id for React keys/testids.\n */\nexport function DataTableBlock({ columns, rows, caption, emptyText, testId }: DataTableBlockProps) {\n const area = testId ?? 'data-table-block'\n\n const tableColumns: Column<TableRowData>[] = columns.map((col, index) => ({\n key: col.field || `col-${index}`,\n header: col.header,\n align: col.align,\n render: (row) => row.cells[col.field] ?? '',\n }))\n\n const tableRows: TableRowData[] = rows.map((cells, index) => ({ __id: String(index), cells }))\n\n return (\n <div data-testid={testId}>\n {caption ? (\n <p\n className=\"mb-2 text-sm text-muted-foreground\"\n data-testid={testId ? `${testId}-caption` : undefined}\n >\n {caption}\n </p>\n ) : null}\n <DataTable\n columns={tableColumns}\n rows={tableRows}\n getRowId={(row) => row.__id}\n area={area}\n emptyTitle={emptyText}\n />\n </div>\n )\n}\n","import type { ReactNode } from 'react'\nimport { cn } from '@arbidocs/react/ui'\n\nexport interface PageHeaderProps {\n title: ReactNode\n eyebrow?: ReactNode\n description?: ReactNode\n /** Before the title block: a back button, an avatar or an icon. */\n leading?: ReactNode\n actions?: ReactNode\n /** Under the whole header: a tab strip or segmented control. */\n tabs?: ReactNode\n className?: string\n testId?: string\n}\n\n/** Standard page title block: leading + eyebrow + title + description + actions, then tabs. */\nexport function PageHeader({\n title,\n eyebrow,\n description,\n leading,\n actions,\n tabs,\n className,\n testId,\n}: PageHeaderProps) {\n return (\n <div className={cn('flex flex-col gap-3', className)} data-testid={testId}>\n <div className=\"flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between\">\n <div className=\"flex min-w-0 items-center gap-3\">\n {leading && (\n <div className=\"shrink-0\" data-slot=\"page-header-leading\">\n {leading}\n </div>\n )}\n <div className=\"min-w-0\">\n {eyebrow && (\n <p className=\"mb-1 text-xs font-semibold uppercase tracking-wider text-muted-foreground\">\n {eyebrow}\n </p>\n )}\n <h1 className=\"font-display text-2xl font-semibold tracking-tight text-foreground\">\n {title}\n </h1>\n {description && (\n <p className=\"mt-1 max-w-2xl text-sm text-muted-foreground\">{description}</p>\n )}\n </div>\n </div>\n {actions && <div className=\"flex shrink-0 items-center gap-2\">{actions}</div>}\n </div>\n {tabs && <div data-slot=\"page-header-tabs\">{tabs}</div>}\n </div>\n )\n}\n","import type { ReactNode } from 'react'\nimport type { LucideIcon } from 'lucide-react'\nimport { ArrowDownRight, ArrowUpRight } from 'lucide-react'\nimport { Card, cn } from '@arbidocs/react/ui'\nimport { ActionLink } from './ActionLink'\n\nexport interface MetricCardProps {\n label: ReactNode\n value: ReactNode\n icon?: LucideIcon\n hint?: ReactNode\n delta?: { value: string; direction: 'up' | 'down'; good?: boolean }\n /**\n * Icon accent as a theme colour-token key (e.g. `primary`, `success`, or the host's own brand\n * token). Resolved to `var(--color-<accent>)` at render. `'default'` inherits `foreground`.\n */\n accent?: string\n /** Show a placeholder instead of the value (the figure is still being fetched). */\n isLoading?: boolean\n /** Makes the tile a real link (ctrl/cmd-click works). */\n href?: string\n /** Click handler; with `href`, a plain click calls it instead of navigating. */\n onSelect?: () => void\n className?: string\n testId?: string\n}\n\n/** The one true KPI tile. Used across every dashboard and module header. */\nexport function MetricCard({\n label,\n value,\n icon: Icon,\n hint,\n delta,\n accent = 'default',\n isLoading = false,\n href,\n onSelect,\n className,\n testId,\n}: MetricCardProps) {\n const accentStyle =\n accent && accent !== 'default' ? { color: `var(--color-${accent})` } : undefined\n const deltaGood = delta?.good ?? delta?.direction === 'up'\n const isInteractive = Boolean(href || onSelect)\n const card = (\n <Card\n variant=\"elevated\"\n className={cn('card-hover min-w-0 rounded-xl p-5', className)}\n data-testid={isInteractive ? undefined : testId}\n aria-busy={isLoading || undefined}\n >\n <div className=\"flex items-start justify-between gap-3\">\n <p className=\"min-w-0 text-xs font-medium uppercase tracking-wide text-muted-foreground\">\n {label}\n </p>\n {Icon && <Icon className=\"size-4 shrink-0\" style={accentStyle} />}\n </div>\n {isLoading ? (\n <div\n className=\"mt-2 h-8 w-20 animate-pulse rounded bg-muted\"\n data-slot=\"metric-card-skeleton\"\n />\n ) : (\n <p\n className=\"mt-2 font-display text-2xl font-semibold tracking-tight [overflow-wrap:anywhere]\"\n data-testid={testId && `${testId}-value`}\n >\n {value}\n </p>\n )}\n <div className=\"mt-1 flex items-center gap-2\">\n {delta && !isLoading && (\n <span\n className={cn(\n 'inline-flex items-center gap-0.5 text-xs font-medium',\n deltaGood ? 'text-success' : 'text-destructive'\n )}\n >\n {delta.direction === 'up' ? (\n <ArrowUpRight className=\"size-3\" />\n ) : (\n <ArrowDownRight className=\"size-3\" />\n )}\n {delta.value}\n </span>\n )}\n {hint && <span className=\"text-xs text-muted-foreground\">{hint}</span>}\n </div>\n </Card>\n )\n if (!isInteractive) return card\n return (\n <ActionLink\n href={href}\n onSelect={onSelect}\n className=\"block rounded-xl text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\"\n data-testid={testId}\n >\n {card}\n </ActionLink>\n )\n}\n","import { cn } from '@arbidocs/react/ui'\n\nexport interface StatItem {\n value: string\n label: string\n /** Optional caption under the label (e.g. a qualifier or unit). */\n sub?: string\n}\n\nexport interface StatGroupProps {\n items: StatItem[]\n testId?: string\n}\n\nconst GRID: Record<number, string> = {\n 1: 'grid-cols-1',\n 2: 'grid-cols-2',\n 3: 'grid-cols-2 sm:grid-cols-3',\n 4: 'grid-cols-2 lg:grid-cols-4',\n}\n\n/** Big-number stat group — headline metrics with captions. */\nexport function StatGroup({ items, testId }: StatGroupProps) {\n const list = items ?? []\n const cols = GRID[Math.min(list.length, 4)] ?? GRID[4]\n return (\n <dl className={cn('grid gap-8', cols)} data-testid={testId}>\n {list.map((item, i) => (\n <div key={i} className=\"min-w-0 text-center\" data-testid={testId && `${testId}-item-${i}`}>\n <dt className=\"sr-only\">{item.label}</dt>\n <dd className=\"text-4xl font-semibold tracking-tight [overflow-wrap:anywhere] sm:text-5xl\">\n {item.value}\n </dd>\n <p className=\"mt-2 text-sm text-muted-foreground\">{item.label}</p>\n {item.sub && <p className=\"mt-1 text-xs text-muted-foreground/80\">{item.sub}</p>}\n </div>\n ))}\n </dl>\n )\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { useConnectedNativeDocxAdapter } from './chunk-AE3M3RTH.js';
2
+ import { useConnectedNativeDocxAdapter } from './chunk-KB5RAHUZ.js';
3
3
  import { NativeDocxComparison } from './chunk-PAKPD3LB.js';
4
4
  import { jsx } from 'react/jsx-runtime';
5
5
 
@@ -12,5 +12,5 @@ function ConnectedNativeDocxComparison({
12
12
  }
13
13
 
14
14
  export { ConnectedNativeDocxComparison };
15
- //# sourceMappingURL=chunk-UCVCYHAC.js.map
16
- //# sourceMappingURL=chunk-UCVCYHAC.js.map
15
+ //# sourceMappingURL=chunk-KUDS6DY4.js.map
16
+ //# sourceMappingURL=chunk-KUDS6DY4.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/connection/docx/ConnectedNativeDocxComparison.tsx"],"names":[],"mappings":";;;;AAOO,SAAS,6BAAA,CAA8B;AAAA,EAC5C,WAAA;AAAA,EACA,GAAG;AACL,CAAA,EAAyF;AACvF,EAAA,MAAM,OAAA,GAAU,8BAA8B,WAAW,CAAA;AACzD,EAAA,2BAAQ,oBAAA,EAAA,EAAsB,GAAG,OAAO,OAAA,EAAkB,UAAA,EAAY,QAAQ,cAAA,EAAgB,CAAA;AAChG","file":"chunk-UCVCYHAC.js","sourcesContent":["import {\n NativeDocxComparison,\n type NativeDocxComparisonProps,\n} from '../../docx/NativeDocxComparison'\nimport { useConnectedNativeDocxAdapter } from './ConnectedNativeDocxEditor'\n\n/** The Word redline of two documents or versions, on the signed-in session. */\nexport function ConnectedNativeDocxComparison({\n fontBaseUrl,\n ...props\n}: Omit<NativeDocxComparisonProps, 'adapter' | 'onCompared'> & { fontBaseUrl?: string }) {\n const adapter = useConnectedNativeDocxAdapter(fontBaseUrl)\n return <NativeDocxComparison {...props} adapter={adapter} onCompared={adapter.onVersionSaved} />\n}\n"]}
1
+ {"version":3,"sources":["../src/connection/docx/ConnectedNativeDocxComparison.tsx"],"names":[],"mappings":";;;;AAOO,SAAS,6BAAA,CAA8B;AAAA,EAC5C,WAAA;AAAA,EACA,GAAG;AACL,CAAA,EAAyF;AACvF,EAAA,MAAM,OAAA,GAAU,8BAA8B,WAAW,CAAA;AACzD,EAAA,2BAAQ,oBAAA,EAAA,EAAsB,GAAG,OAAO,OAAA,EAAkB,UAAA,EAAY,QAAQ,cAAA,EAAgB,CAAA;AAChG","file":"chunk-KUDS6DY4.js","sourcesContent":["import {\n NativeDocxComparison,\n type NativeDocxComparisonProps,\n} from '../../docx/NativeDocxComparison'\nimport { useConnectedNativeDocxAdapter } from './ConnectedNativeDocxEditor'\n\n/** The Word redline of two documents or versions, on the signed-in session. */\nexport function ConnectedNativeDocxComparison({\n fontBaseUrl,\n ...props\n}: Omit<NativeDocxComparisonProps, 'adapter' | 'onCompared'> & { fontBaseUrl?: string }) {\n const adapter = useConnectedNativeDocxAdapter(fontBaseUrl)\n return <NativeDocxComparison {...props} adapter={adapter} onCompared={adapter.onVersionSaved} />\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { useBlocksEnvironment } from './chunk-5TALCIRH.js';
2
+ import { useBlocksEnvironment } from './chunk-CH4FHZSR.js';
3
3
  import { useCallback, useState, useRef, useEffect } from 'react';
4
4
  import { Check, Copy } from 'lucide-react';
5
5
  import { cn, MarkMenu, Tooltip, TooltipTrigger, TooltipContent } from '@arbidocs/react/ui';
@@ -402,5 +402,5 @@ function NoteMark({
402
402
  }
403
403
 
404
404
  export { DEFAULT_PASSAGE_PILL_LABELS, DEFAULT_QUIET_MARK_LABELS, LabelMark, NoteMark, PassageMark, PassagePill, QuietLink, useCopyText };
405
- //# sourceMappingURL=chunk-TSD3GFOH.js.map
406
- //# sourceMappingURL=chunk-TSD3GFOH.js.map
405
+ //# sourceMappingURL=chunk-L5UHXBJK.js.map
406
+ //# sourceMappingURL=chunk-L5UHXBJK.js.map