@arbidocs/blocks 0.5.153 → 0.5.154

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 (265) hide show
  1. package/dist/{ConnectedNativeDocxComparison-244UIHSM.cjs → ConnectedNativeDocxComparison-2DAQX5GX.cjs} +9 -9
  2. package/dist/{ConnectedStreamedWordArtifact-V6BRZMEQ.cjs.map → ConnectedNativeDocxComparison-2DAQX5GX.cjs.map} +1 -1
  3. package/dist/{ConnectedPresentation-JUXIXKYN.cjs → ConnectedPresentation-J42JPUVR.cjs} +13 -13
  4. package/dist/{ConnectedPresentation-JUXIXKYN.cjs.map → ConnectedPresentation-J42JPUVR.cjs.map} +1 -1
  5. package/dist/{ConnectedSlidesTab-JA3VB66W.cjs → ConnectedSlidesTab-BYS7HFNK.cjs} +12 -12
  6. package/dist/{ConnectedSlidesTab-JA3VB66W.cjs.map → ConnectedSlidesTab-BYS7HFNK.cjs.map} +1 -1
  7. package/dist/{ConnectedStreamedWordArtifact-V6BRZMEQ.cjs → ConnectedStreamedWordArtifact-LTYB62VM.cjs} +9 -9
  8. package/dist/{ConnectedNativeDocxComparison-244UIHSM.cjs.map → ConnectedStreamedWordArtifact-LTYB62VM.cjs.map} +1 -1
  9. package/dist/{DocumentReviewCard-5W2QQWKA.cjs → DocumentReviewCard-ILDLYZ5A.cjs} +15 -13
  10. package/dist/DocumentReviewCard-ILDLYZ5A.cjs.map +1 -0
  11. package/dist/{FilesViewerDialog-63QUTG4L.cjs → FilesViewerDialog-YLD5YFP2.cjs} +25 -22
  12. package/dist/FilesViewerDialog-YLD5YFP2.cjs.map +1 -0
  13. package/dist/{RechartsRenderer-NU6WUZJS.cjs → RechartsRenderer-EPVL5QZA.cjs} +2 -2
  14. package/dist/{RechartsRenderer-NU6WUZJS.cjs.map → RechartsRenderer-EPVL5QZA.cjs.map} +1 -1
  15. package/dist/{SpotlightStrip-HXQFPAAL.cjs → SpotlightStrip-JE6MXUBT.cjs} +6 -6
  16. package/dist/{SpotlightStrip-HXQFPAAL.cjs.map → SpotlightStrip-JE6MXUBT.cjs.map} +1 -1
  17. package/dist/{WorkspaceTableView-2QP2HJLK.cjs → WorkspaceTableView-V3N64LJG.cjs} +13 -11
  18. package/dist/WorkspaceTableView-V3N64LJG.cjs.map +1 -0
  19. package/dist/agents/index.cjs +245 -244
  20. package/dist/agents/workflows/WorkflowLauncher.d.ts +3 -1
  21. package/dist/agents/workflows/WorkflowLauncher.js +2 -0
  22. package/dist/agents/workflows/WorkflowLauncher.js.map +2 -2
  23. package/dist/{ai-ODGRIL6Y.cjs → ai-QFY4LYQZ.cjs} +16 -16
  24. package/dist/ai-QFY4LYQZ.cjs.map +1 -0
  25. package/dist/calls/index.cjs +25 -24
  26. package/dist/calls/index.cjs.map +1 -1
  27. package/dist/{chunk-MAKCWF45.cjs → chunk-6GKCGCMT.cjs} +4 -4
  28. package/dist/{chunk-MAKCWF45.cjs.map → chunk-6GKCGCMT.cjs.map} +1 -1
  29. package/dist/{chunk-LYKT336H.cjs → chunk-6I5HHWCD.cjs} +5 -5
  30. package/dist/{chunk-LYKT336H.cjs.map → chunk-6I5HHWCD.cjs.map} +1 -1
  31. package/dist/{chunk-KWJW5TMH.cjs → chunk-6OPDKROP.cjs} +4 -41
  32. package/dist/chunk-6OPDKROP.cjs.map +1 -0
  33. package/dist/{chunk-QWOPEBH2.cjs → chunk-6P4U63HO.cjs} +4 -4
  34. package/dist/{chunk-QWOPEBH2.cjs.map → chunk-6P4U63HO.cjs.map} +1 -1
  35. package/dist/{chunk-QKCFV36K.cjs → chunk-7UPEFZCV.cjs} +9 -9
  36. package/dist/{chunk-QKCFV36K.cjs.map → chunk-7UPEFZCV.cjs.map} +1 -1
  37. package/dist/{chunk-DUNXLT63.cjs → chunk-AHUEBRLX.cjs} +2 -238
  38. package/dist/chunk-AHUEBRLX.cjs.map +1 -0
  39. package/dist/{chunk-B5BGVPQ5.cjs → chunk-AURL2KT5.cjs} +4 -4
  40. package/dist/{chunk-B5BGVPQ5.cjs.map → chunk-AURL2KT5.cjs.map} +1 -1
  41. package/dist/chunk-BH322H5B.cjs +594 -0
  42. package/dist/chunk-BH322H5B.cjs.map +1 -0
  43. package/dist/{chunk-ZCQXQIBA.cjs → chunk-BNDIMTWJ.cjs} +28 -28
  44. package/dist/{chunk-ZCQXQIBA.cjs.map → chunk-BNDIMTWJ.cjs.map} +1 -1
  45. package/dist/{chunk-AG6KAGAX.cjs → chunk-BTQ7IAOH.cjs} +4 -4
  46. package/dist/{chunk-AG6KAGAX.cjs.map → chunk-BTQ7IAOH.cjs.map} +1 -1
  47. package/dist/{chunk-FCT62ZPE.cjs → chunk-BZVK7JW5.cjs} +5 -5
  48. package/dist/{chunk-FCT62ZPE.cjs.map → chunk-BZVK7JW5.cjs.map} +1 -1
  49. package/dist/{chunk-WUM76MJU.cjs → chunk-CNBYM5Q7.cjs} +7 -7
  50. package/dist/{chunk-WUM76MJU.cjs.map → chunk-CNBYM5Q7.cjs.map} +1 -1
  51. package/dist/{chunk-HNLNRAEU.cjs → chunk-DSLMJ24E.cjs} +2 -261
  52. package/dist/chunk-DSLMJ24E.cjs.map +1 -0
  53. package/dist/chunk-DWRUGOTQ.cjs +35 -0
  54. package/dist/chunk-DWRUGOTQ.cjs.map +1 -0
  55. package/dist/{chunk-GAA222SK.cjs → chunk-EG3DPKXM.cjs} +5 -5
  56. package/dist/{chunk-GAA222SK.cjs.map → chunk-EG3DPKXM.cjs.map} +1 -1
  57. package/dist/chunk-FEAHTNTY.cjs +1447 -0
  58. package/dist/chunk-FEAHTNTY.cjs.map +1 -0
  59. package/dist/{chunk-VSDD5TH5.cjs → chunk-G3MRW4WB.cjs} +10 -8
  60. package/dist/chunk-G3MRW4WB.cjs.map +1 -0
  61. package/dist/{chunk-TFRCNIUY.cjs → chunk-GF6AYAMI.cjs} +9 -9
  62. package/dist/{chunk-TFRCNIUY.cjs.map → chunk-GF6AYAMI.cjs.map} +1 -1
  63. package/dist/{chunk-4ZR4O5SP.cjs → chunk-GK3U3FWY.cjs} +60 -28
  64. package/dist/chunk-GK3U3FWY.cjs.map +1 -0
  65. package/dist/{chunk-3CJTO6RV.cjs → chunk-GXRD5OSU.cjs} +8 -8
  66. package/dist/{chunk-3CJTO6RV.cjs.map → chunk-GXRD5OSU.cjs.map} +1 -1
  67. package/dist/{chunk-JLNKD56X.cjs → chunk-GYI4UXX6.cjs} +4 -4
  68. package/dist/{chunk-JLNKD56X.cjs.map → chunk-GYI4UXX6.cjs.map} +1 -1
  69. package/dist/{chunk-4I2PCP7O.cjs → chunk-I3XTTTPZ.cjs} +41 -40
  70. package/dist/chunk-I3XTTTPZ.cjs.map +1 -0
  71. package/dist/chunk-JWCVA4LC.cjs +248 -0
  72. package/dist/chunk-JWCVA4LC.cjs.map +1 -0
  73. package/dist/{chunk-UM3EWCDE.cjs → chunk-K5F2VNCX.cjs} +35 -10
  74. package/dist/chunk-K5F2VNCX.cjs.map +1 -0
  75. package/dist/chunk-KD66CBYO.cjs +44 -0
  76. package/dist/chunk-KD66CBYO.cjs.map +1 -0
  77. package/dist/chunk-LLVE5TST.cjs +318 -0
  78. package/dist/chunk-LLVE5TST.cjs.map +1 -0
  79. package/dist/{chunk-JCFXS336.cjs → chunk-NRGLF4J4.cjs} +2 -466
  80. package/dist/chunk-NRGLF4J4.cjs.map +1 -0
  81. package/dist/{chunk-CVVQHFLR.cjs → chunk-O7U6KL2W.cjs} +72 -650
  82. package/dist/chunk-O7U6KL2W.cjs.map +1 -0
  83. package/dist/{chunk-Z3N32LL4.cjs → chunk-OOANNOH4.cjs} +35 -33
  84. package/dist/chunk-OOANNOH4.cjs.map +1 -0
  85. package/dist/chunk-SGYURQ23.cjs +271 -0
  86. package/dist/chunk-SGYURQ23.cjs.map +1 -0
  87. package/dist/{chunk-A5SKK3CU.cjs → chunk-SLCH5JRI.cjs} +64 -35
  88. package/dist/chunk-SLCH5JRI.cjs.map +1 -0
  89. package/dist/chunk-T26UYA6Q.cjs +64 -0
  90. package/dist/chunk-T26UYA6Q.cjs.map +1 -0
  91. package/dist/chunk-T3Y3LZ4Y.cjs +477 -0
  92. package/dist/chunk-T3Y3LZ4Y.cjs.map +1 -0
  93. package/dist/{chunk-4XNP27N4.cjs → chunk-T7BUGVSG.cjs} +36 -36
  94. package/dist/{chunk-4XNP27N4.cjs.map → chunk-T7BUGVSG.cjs.map} +1 -1
  95. package/dist/{chunk-SMO4SPPB.cjs → chunk-TD5V5BZ3.cjs} +5 -5
  96. package/dist/{chunk-SMO4SPPB.cjs.map → chunk-TD5V5BZ3.cjs.map} +1 -1
  97. package/dist/{chunk-IXTDOPSB.cjs → chunk-TSAZWUPZ.cjs} +4 -4
  98. package/dist/{chunk-IXTDOPSB.cjs.map → chunk-TSAZWUPZ.cjs.map} +1 -1
  99. package/dist/{chunk-5DGNJ6VJ.cjs → chunk-UD3LPATQ.cjs} +6 -6
  100. package/dist/{chunk-5DGNJ6VJ.cjs.map → chunk-UD3LPATQ.cjs.map} +1 -1
  101. package/dist/{chunk-OF7KMG6R.cjs → chunk-UJHQ4DA4.cjs} +5 -5
  102. package/dist/{chunk-OF7KMG6R.cjs.map → chunk-UJHQ4DA4.cjs.map} +1 -1
  103. package/dist/{chunk-NUFZFWHZ.cjs → chunk-W5QSKW7T.cjs} +3 -29
  104. package/dist/chunk-W5QSKW7T.cjs.map +1 -0
  105. package/dist/{chunk-NNZFZYTI.cjs → chunk-WOVNXJK5.cjs} +4 -54
  106. package/dist/chunk-WOVNXJK5.cjs.map +1 -0
  107. package/dist/{chunk-E6BM5ENI.cjs → chunk-WRTEKOQP.cjs} +2 -309
  108. package/dist/chunk-WRTEKOQP.cjs.map +1 -0
  109. package/dist/{chunk-KRQCUVH7.cjs → chunk-YSAUOJA7.cjs} +9 -3
  110. package/dist/chunk-YSAUOJA7.cjs.map +1 -0
  111. package/dist/{chunk-6ZZWQ3OL.cjs → chunk-YXY52OGU.cjs} +4 -4
  112. package/dist/{chunk-6ZZWQ3OL.cjs.map → chunk-YXY52OGU.cjs.map} +1 -1
  113. package/dist/{chunk-D5DOK2AE.cjs → chunk-ZW2ZFC3Q.cjs} +58 -58
  114. package/dist/{chunk-D5DOK2AE.cjs.map → chunk-ZW2ZFC3Q.cjs.map} +1 -1
  115. package/dist/components/gestures/usePointerGesture.d.ts +13 -1
  116. package/dist/components/gestures/usePointerGesture.js +33 -8
  117. package/dist/components/gestures/usePointerGesture.js.map +2 -2
  118. package/dist/connect/docx.cjs +12 -12
  119. package/dist/connect/index.cjs +1281 -2346
  120. package/dist/connect/index.cjs.map +1 -1
  121. package/dist/connect/index.d.ts +1 -0
  122. package/dist/connect/index.js +1 -0
  123. package/dist/connect/index.js.map +2 -2
  124. package/dist/connect/viewer.cjs +15 -12
  125. package/dist/connection/dashboards/DashboardPanel.d.ts +2 -0
  126. package/dist/connection/dashboards/DashboardPanel.js +4 -0
  127. package/dist/connection/dashboards/DashboardPanel.js.map +2 -2
  128. package/dist/connection/dashboards/index.d.ts +1 -1
  129. package/dist/connection/dashboards/index.js +2 -0
  130. package/dist/connection/dashboards/index.js.map +2 -2
  131. package/dist/connection/dashboards/templates.d.ts +10 -5
  132. package/dist/connection/dashboards/templates.js +7 -1
  133. package/dist/connection/dashboards/templates.js.map +2 -2
  134. package/dist/connection/live-blocks/ConnectedAgendaBlock.d.ts +13 -0
  135. package/dist/connection/live-blocks/ConnectedAgendaBlock.js +19 -0
  136. package/dist/connection/live-blocks/ConnectedAgendaBlock.js.map +7 -0
  137. package/dist/connection/live-blocks/ConnectedCarouselBlock.d.ts +7 -0
  138. package/dist/connection/live-blocks/ConnectedCarouselBlock.js +84 -0
  139. package/dist/connection/live-blocks/ConnectedCarouselBlock.js.map +7 -0
  140. package/dist/connection/live-blocks/ConnectedListBlock.d.ts +29 -0
  141. package/dist/connection/live-blocks/ConnectedListBlock.js +193 -0
  142. package/dist/connection/live-blocks/ConnectedListBlock.js.map +7 -0
  143. package/dist/connection/live-blocks/ConnectedStartBlock.d.ts +7 -0
  144. package/dist/connection/live-blocks/ConnectedStartBlock.js +16 -0
  145. package/dist/connection/live-blocks/ConnectedStartBlock.js.map +7 -0
  146. package/dist/connection/live-blocks/DashboardAgenda.d.ts +10 -0
  147. package/dist/connection/{workspace-dashboard → live-blocks}/DashboardAgenda.js +10 -2
  148. package/dist/connection/live-blocks/DashboardAgenda.js.map +7 -0
  149. package/dist/connection/{workspace-dashboard → live-blocks}/DashboardStart.js.map +1 -1
  150. package/dist/connection/live-blocks/LiveBlockRoot.d.ts +11 -0
  151. package/dist/connection/live-blocks/LiveBlockRoot.js +22 -0
  152. package/dist/connection/live-blocks/LiveBlockRoot.js.map +7 -0
  153. package/dist/connection/live-blocks/index.d.ts +5 -0
  154. package/dist/connection/live-blocks/index.js +20 -0
  155. package/dist/connection/live-blocks/index.js.map +7 -0
  156. package/dist/connection/{workspace-dashboard/dashboard-rows.d.ts → live-blocks/list-rows.d.ts} +22 -4
  157. package/dist/connection/{workspace-dashboard/dashboard-rows.js → live-blocks/list-rows.js} +13 -8
  158. package/dist/connection/live-blocks/list-rows.js.map +7 -0
  159. package/dist/connection/{workspace-dashboard → live-blocks}/useDashboardAdd.js.map +1 -1
  160. package/dist/connection/live-blocks/workspace-dashboard-blocks.d.ts +23 -0
  161. package/dist/connection/live-blocks/workspace-dashboard-blocks.js +58 -0
  162. package/dist/connection/live-blocks/workspace-dashboard-blocks.js.map +7 -0
  163. package/dist/connection/pages/BlockEditor.d.ts +3 -1
  164. package/dist/connection/pages/BlockEditor.js +18 -1
  165. package/dist/connection/pages/BlockEditor.js.map +2 -2
  166. package/dist/connection/pages/ConnectedPagesPage.d.ts +5 -4
  167. package/dist/connection/pages/ConnectedPagesPage.js +122 -46
  168. package/dist/connection/pages/ConnectedPagesPage.js.map +2 -2
  169. package/dist/connection/pages/EditablePageGrid.d.ts +25 -15
  170. package/dist/connection/pages/EditablePageGrid.js +145 -50
  171. package/dist/connection/pages/EditablePageGrid.js.map +2 -2
  172. package/dist/connection/pages/LiveBlockEditor.d.ts +30 -0
  173. package/dist/connection/pages/LiveBlockEditor.js +175 -0
  174. package/dist/connection/pages/LiveBlockEditor.js.map +7 -0
  175. package/dist/connection/pages/PageBlockView.d.ts +5 -3
  176. package/dist/connection/pages/PageBlockView.js +69 -4
  177. package/dist/connection/pages/PageBlockView.js.map +2 -2
  178. package/dist/connection/pages/PageGrid.d.ts +4 -3
  179. package/dist/connection/pages/PageGrid.js +4 -2
  180. package/dist/connection/pages/PageGrid.js.map +2 -2
  181. package/dist/connection/pages/PagesList.d.ts +4 -3
  182. package/dist/connection/pages/PagesList.js.map +2 -2
  183. package/dist/connection/pages/grid-layout.d.ts +44 -12
  184. package/dist/connection/pages/grid-layout.js +71 -27
  185. package/dist/connection/pages/grid-layout.js.map +2 -2
  186. package/dist/connection/pages/index.d.ts +4 -2
  187. package/dist/connection/pages/index.js +34 -5
  188. package/dist/connection/pages/index.js.map +2 -2
  189. package/dist/connection/pages/labels.js +5 -1
  190. package/dist/connection/pages/labels.js.map +2 -2
  191. package/dist/connection/pages/page-templates.d.ts +10 -0
  192. package/dist/connection/pages/page-templates.js +16 -0
  193. package/dist/connection/pages/page-templates.js.map +7 -0
  194. package/dist/connection/workflows/ConnectedWorkflowStart.d.ts +2 -0
  195. package/dist/connection/workflows/ConnectedWorkflowStart.js.map +2 -2
  196. package/dist/connection/workspace-dashboard/ConnectedWorkspaceDashboard.d.ts +10 -7
  197. package/dist/connection/workspace-dashboard/ConnectedWorkspaceDashboard.js +31 -171
  198. package/dist/connection/workspace-dashboard/ConnectedWorkspaceDashboard.js.map +3 -3
  199. package/dist/dashboards/ChartRenderer.d.ts +5 -3
  200. package/dist/dashboards/ChartRenderer.js +29 -18
  201. package/dist/dashboards/ChartRenderer.js.map +2 -2
  202. package/dist/dashboards/PanelView.d.ts +6 -1
  203. package/dist/dashboards/PanelView.js +24 -7
  204. package/dist/dashboards/PanelView.js.map +2 -2
  205. package/dist/dashboards/RechartsRenderer.d.ts +2 -1
  206. package/dist/dashboards/RechartsRenderer.js.map +2 -2
  207. package/dist/dashboards/index.cjs +25 -21
  208. package/dist/embed/index.cjs +23 -20
  209. package/dist/files/index.cjs +250 -249
  210. package/dist/home/FactsStrip.d.ts +3 -1
  211. package/dist/home/FactsStrip.js +3 -2
  212. package/dist/home/FactsStrip.js.map +2 -2
  213. package/dist/home/RecentList.d.ts +4 -2
  214. package/dist/home/RecentList.js +3 -2
  215. package/dist/home/RecentList.js.map +2 -2
  216. package/dist/home/StartTiles.d.ts +6 -1
  217. package/dist/home/StartTiles.js +55 -33
  218. package/dist/home/StartTiles.js.map +2 -2
  219. package/dist/home/index.cjs +62 -57
  220. package/dist/home/index.d.ts +1 -1
  221. package/dist/home/index.js +2 -1
  222. package/dist/home/index.js.map +2 -2
  223. package/dist/home/sections.d.ts +5 -0
  224. package/dist/home/sections.js +7 -0
  225. package/dist/home/sections.js.map +2 -2
  226. package/dist/index.cjs +339 -337
  227. package/dist/index.cjs.map +1 -1
  228. package/dist/pages/index.cjs +620 -139
  229. package/dist/pages/index.cjs.map +1 -1
  230. package/dist/settings/index.cjs +170 -169
  231. package/dist/shell/index.cjs +35 -34
  232. package/dist/studio/index.cjs +12 -12
  233. package/dist/styles.css +1 -1
  234. package/dist/workflow-canvas/index.cjs +33 -29
  235. package/dist/workflow-canvas/index.cjs.map +1 -1
  236. package/dist/workspaces/index.cjs +49 -47
  237. package/dist/workspaces/index.cjs.map +1 -1
  238. package/node_modules/@arbidocs/coedit/package.json +1 -1
  239. package/package.json +5 -5
  240. package/dist/DocumentReviewCard-5W2QQWKA.cjs.map +0 -1
  241. package/dist/FilesViewerDialog-63QUTG4L.cjs.map +0 -1
  242. package/dist/WorkspaceTableView-2QP2HJLK.cjs.map +0 -1
  243. package/dist/ai-ODGRIL6Y.cjs.map +0 -1
  244. package/dist/chunk-4I2PCP7O.cjs.map +0 -1
  245. package/dist/chunk-4ZR4O5SP.cjs.map +0 -1
  246. package/dist/chunk-A5SKK3CU.cjs.map +0 -1
  247. package/dist/chunk-CVVQHFLR.cjs.map +0 -1
  248. package/dist/chunk-DUNXLT63.cjs.map +0 -1
  249. package/dist/chunk-E6BM5ENI.cjs.map +0 -1
  250. package/dist/chunk-HNLNRAEU.cjs.map +0 -1
  251. package/dist/chunk-JCFXS336.cjs.map +0 -1
  252. package/dist/chunk-KRQCUVH7.cjs.map +0 -1
  253. package/dist/chunk-KWJW5TMH.cjs.map +0 -1
  254. package/dist/chunk-NNZFZYTI.cjs.map +0 -1
  255. package/dist/chunk-NUFZFWHZ.cjs.map +0 -1
  256. package/dist/chunk-UM3EWCDE.cjs.map +0 -1
  257. package/dist/chunk-VSDD5TH5.cjs.map +0 -1
  258. package/dist/chunk-Z3N32LL4.cjs.map +0 -1
  259. package/dist/connection/workspace-dashboard/DashboardAgenda.d.ts +0 -1
  260. package/dist/connection/workspace-dashboard/DashboardAgenda.js.map +0 -7
  261. package/dist/connection/workspace-dashboard/dashboard-rows.js.map +0 -7
  262. /package/dist/connection/{workspace-dashboard → live-blocks}/DashboardStart.d.ts +0 -0
  263. /package/dist/connection/{workspace-dashboard → live-blocks}/DashboardStart.js +0 -0
  264. /package/dist/connection/{workspace-dashboard → live-blocks}/useDashboardAdd.d.ts +0 -0
  265. /package/dist/connection/{workspace-dashboard → live-blocks}/useDashboardAdd.js +0 -0
@@ -51,6 +51,7 @@ export * from '../connection/workspace-list';
51
51
  export * from '../connection/projects';
52
52
  export * from '../connection/contacts';
53
53
  export * from '../connection/workspace-dashboard';
54
+ export * from '../connection/live-blocks';
54
55
  export * from '../connection/ask';
55
56
  export * from '../connection/command';
56
57
  export * from '../connection/remote-control';
@@ -140,6 +140,7 @@ export * from "../connection/workspace-list/index.js";
140
140
  export * from "../connection/projects/index.js";
141
141
  export * from "../connection/contacts/index.js";
142
142
  export * from "../connection/workspace-dashboard/index.js";
143
+ export * from "../connection/live-blocks/index.js";
143
144
  export * from "../connection/ask/index.js";
144
145
  export * from "../connection/command/index.js";
145
146
  export * from "../connection/remote-control/index.js";
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/connect/index.ts"],
4
- "sourcesContent": ["/**\n * @arbidocs/blocks/connect: the demo/live connection layer (auth, workspace selection, agent\n * hooks; `defaultHost` for a blocks-only site) and the connected kits. Kept off the root barrel\n * because it needs React Query and the SDK.\n */\nexport {\n type ArbiMode,\n type ConnectionStatus,\n type ArbiUser,\n type AssistantStep,\n type AssistantCitation,\n type AssistantMessage,\n type ArbiConnectionConfig,\n} from '../connection/types'\nexport {\n SESSION_EXPIRED_MESSAGE,\n useConnection,\n useConnectedWorkspace,\n type ConnectedWorkspace,\n isAuthenticated,\n} from '../connection/ConnectionProvider'\nexport { defaultHost, type DefaultHostOptions } from '../connection/defaultHost'\n// The sidebar as the session keeps it, for `useSidebarController`.\nexport { useSessionSidebar } from '../connection/useSessionSidebar'\nexport { ConnectedTaskAccessRequest } from '../connection/ConnectedTaskAccessRequest'\nexport {\n ConnectedWorkspaceActivity,\n type ConnectedWorkspaceActivityProps,\n} from '../connection/ConnectedWorkspaceActivity'\nexport {\n ConnectedWorkspaceActivityPanel,\n DEFAULT_WORKSPACE_ACTIVITY_PANEL_LABELS,\n type ConnectedWorkspaceActivityPanelProps,\n type WorkspaceActivityPanelLabels,\n} from '../connection/ConnectedWorkspaceActivityPanel'\nexport { useOpenWorkspaceActivityTarget } from '../connection/useOpenWorkspaceActivityTarget'\n// The notification centre page (persisted notifications + the session log) and its parts.\nexport * from '../connection/notification-center'\n// Changes made offline that wait to sync\nexport * from '../connection/offline'\nexport {\n ConnectedWorkspaceNotificationMenu,\n ConnectedThreadFollow,\n type ConnectedWorkspaceNotificationMenuProps,\n type ConnectedThreadFollowProps,\n} from '../connection/ConnectedNotificationRelevance'\nexport {\n useConnectedDocuments,\n useListedDocuments,\n useDocumentFilter,\n isListedDocument,\n useConnectedTags,\n useConnectedConversations,\n type ConnectedConversationRow,\n type ConnectedWorkspaceData,\n type ConnectedList,\n type ConnectedListResult,\n type ConnectedDocument,\n type ConnectedTag,\n} from '../connection/workspaceData'\nexport {\n ConnectedWorkflowsTable,\n DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS,\n useConnectedWorkspaceRole,\n type ConnectedWorkflowsTableProps,\n type ConnectedWorkflowsTableLabels,\n} from '../connection/ConnectedWorkflowsTable'\nexport {\n ConnectedWorkflowLauncher,\n ConnectedWorkflowDocumentsField,\n useConnectedWorkflowScopeSource,\n toWorkflowFieldDocument,\n type ConnectedWorkflowLauncherProps,\n type ConnectedWorkflowDocumentsFieldProps,\n} from '../connection/ConnectedWorkflowLauncher'\nexport {\n ConnectedSkillsLibrary,\n type ConnectedSkillsLibraryProps,\n} from '../connection/ConnectedSkillsLibrary'\nexport {\n ConnectedSkillsBrowser,\n DEFAULT_CONNECTED_SKILLS_BROWSER_LABELS,\n type ConnectedSkillsBrowserProps,\n type ConnectedSkillsBrowserLabels,\n} from '../connection/ConnectedSkillsBrowser'\nexport {\n useInstallSkillPackOnSignIn,\n type InstallSkillPackOnSignInOptions,\n} from '../connection/useInstallSkillPackOnSignIn'\nexport { useIsExternalAccount } from '../connection/useIsExternalAccount'\nexport {\n ConnectedAgentCreator,\n type ConnectedAgentCreatorProps,\n type ConnectedAgentCreatorAgent,\n} from '../connection/ConnectedAgentCreator'\nexport {\n useConnectedAgentManagement,\n type AgentManagementLabels,\n type ConnectedAgentManagementOptions,\n} from '../connection/agents/useConnectedAgentManagement'\nexport {\n ConnectedAgentsPage,\n ConnectedAgentsPageScope,\n ConnectedAgentsSection,\n ConnectedAgentsSectionHeading,\n ConnectedAgentsNewTask,\n DEFAULT_AGENTS_PAGE_SECTIONS,\n type ConnectedAgentsPageProps,\n type ConnectedAgentsPageScopeProps,\n type ConnectedAgentsSectionProps,\n type AgentsPageSection,\n type AgentCardDetail,\n type AgentsPageAgentOptions,\n type AgentsPageLauncherOptions,\n type AgentsPageStatAccents,\n type AgentsPageTestIdKey,\n} from '../connection/agents/ConnectedAgentsPage'\nexport {\n DEFAULT_CONNECTED_AGENTS_PAGE_LABELS,\n type ConnectedAgentsPageLabels,\n} from '../connection/agents/agentsPageLabels'\nexport {\n ConnectedWorkflowHistory,\n ConnectedTaskActivityDialog,\n workflowRunView,\n type ConnectedWorkflowHistoryProps,\n type ConnectedTaskActivityDialogProps,\n} from '../connection/ConnectedWorkflowHistory'\nexport {\n ConnectedSkillUpload,\n DEFAULT_CONNECTED_SKILL_UPLOAD_LABELS,\n type ConnectedSkillUploadProps,\n type ConnectedSkillUploadLabels,\n} from '../connection/ConnectedSkillUpload'\nexport {\n useConnectedAiTask,\n useConnectedChat,\n ConnectedAssistantDock,\n useWorkspaceDocs,\n useSemanticSearch,\n toRedlineMarkdown,\n redlineStats,\n textToArtifact,\n type AiTaskStatus,\n type AiRunOptions,\n type SearchChunk,\n type ArtifactEvent,\n} from '../connection/ai'\nexport { StreamedArtifact, type StreamedArtifactProps } from '../connection/StreamedArtifact'\nexport {\n ConnectedWorkflowRunner,\n DEFAULT_CONNECTED_WORKFLOW_RUNNER_LABELS,\n type ConnectedWorkflowRunnerProps,\n type ConnectedWorkflowRunnerLabels,\n type WorkflowRunnerDocument,\n} from '../connection/ConnectedWorkflowRunner'\nexport { WorkflowRunThread, type WorkflowRunThreadProps } from '../connection/WorkflowRunThread'\nexport {\n ConnectedTagTable,\n type ConnectedTagTableProps,\n type TagTableFilter,\n type TagTableFilterField,\n} from '../connection/tags/ConnectedTagTable'\nexport {\n ConnectedAssistantPage,\n DEFAULT_ASSISTANT_LABELS,\n type ConnectedAssistantPageLabels,\n type ConnectedAssistantPageProps,\n} from '../connection/assistant/ConnectedAssistantPage'\nexport {\n AssistantStatusPanel,\n DEFAULT_ASSISTANT_STATUS_LABELS,\n type AssistantStatusLabels,\n} from '../connection/assistant/AssistantStatusPanel'\nexport { ConnectedTagsPage, type TagsReviewKind } from '../connection/tags/ConnectedTagsPage'\nexport {\n FACTS_COMPOSE_VIEW,\n FACTS_FILTER_KEY,\n FACTS_FOCUS_VIEW,\n FACTS_GRID_ID,\n} from '../connection/facts/view-keys'\nexport { ConnectedFactsPage } from '../connection/facts/ConnectedFactsPage'\nexport {\n ConnectedFactsSmartSearch,\n type ConnectedFactsSmartSearchProps,\n} from '../connection/facts/ConnectedFactsSmartSearch'\nexport {\n useConnectedShellWorkspaces,\n type UseConnectedShellWorkspacesOptions,\n} from '../connection/useConnectedShellWorkspaces'\nexport {\n ConnectedProfileCard,\n ConnectedSecuritySection,\n ConnectedPasswordChangeDialog,\n ConnectedNotificationPreferences,\n ConnectedSessionsRow,\n ConnectedLogoutDialog,\n ConnectedDangerZone,\n ConnectedIdentityVerification,\n type ConnectedProfileCardProps,\n type ConnectedSecuritySectionProps,\n type ConnectedPasswordChangeDialogProps,\n type ConnectedNotificationPreferencesProps,\n type ConnectedSessionsRowProps,\n type ConnectedLogoutDialogProps,\n type ConnectedDangerZoneProps,\n type ConnectedIdentityVerificationProps,\n} from '../connection/ConnectedSettings'\n// The settings page: addressable sections (`openSettings(section)`), the connected ones bound to the account\nexport * from '../connection/settings-page'\nexport * from '../connection/storage'\n// A workspace's own settings page (identity, visibility, members, leave)\nexport * from '../connection/workspace-settings'\n// Archiving a workspace and bringing it back: the Archive button, the unarchive dialog, the list's status line\nexport * from '../connection/workspace-archive'\nexport * from '../connection/workspace-form'\n// Connectors: connected apps, mailbox and drive sync settings\nexport * from '../connection/connectors'\n// Billing: projects, plans, usage, add-ons and checkout (Stripe from the host)\nexport * from '../connection/billing'\n// The user's workspaces grouped by project, as cards or a table; the Projects panel\nexport * from '../connection/workspace-list'\nexport * from '../connection/projects'\n// The address book: directory, card editor, .vcf import, add by e-mail, the contact star.\nexport * from '../connection/contacts'\n// The open workspace's home: Start, recent files and threads, facts, the agenda\nexport * from '../connection/workspace-dashboard'\n// The workspace's ask field (ask a new chat, or search the files) and what asking means\nexport * from '../connection/ask'\n// The \u2318K command palette: pages, the built-in actions and the host's, ask and search\nexport * from '../connection/command'\n// Remote control: the consent prompt, the pill, the settings switch and the socket's handler\nexport * from '../connection/remote-control'\n\n// Smart Search: the whole search page\nexport * from '../connection/search'\n\n// Mail: the whole mailbox, and the composer on its own\nexport * from '../connection/mail'\n\n// Secure mail: the page a secure-mail link opens, and the capture of the link's key\nexport * from '../connection/secure-mail'\n\n// Calendar: the whole calendar, its upcoming list, the mail invitation card and the public booking page\nexport * from '../connection/calendar'\n\n// Files: the explorer, and what a host adds to the Files kits\nexport * from '../connection/files'\nexport * from '../connection/databases'\n\n// Export, copy or move: the dialog any list opens, and the watcher that follows a copy or move\nexport * from '../connection/export'\n\n// Chats: the messenger (direct, group and meeting chats), one thread, group members, attachments\nexport * from '../connection/messenger'\n\n// Assistant configuration: the model picker, config forms and the developer's config editor\nexport * from '../connection/config'\n\n// Workspace access requests: the owner's grant dialog (a task's run resumes on a grant)\nexport * from '../connection/workspace-access'\nexport * from '../connection/entities'\nexport * from '../connection/account-cluster'\nexport * from '../connection/runtime'\n// The address bar and the session kept in step through the route codec (`hrefFor` / `parseHref`).\nexport { useDeepLinkSync, type DeepLinkSyncOptions } from '../connection/routes/useDeepLinkSync'\nexport * from '../connection/report-problem'\n// The global dialogs (the dialog registry's kinds), mounted once in the shell.\nexport * from '../connection/dialogs'\n\n// The Threads page's tabs (decision 1), a thread's chip, status and switcher\nexport * from '../connection/threads'\n\n// A thread's tasks: its top bar (a run's steps, its activity, its options) and its activity\nexport * from '../connection/tasks'\n\n// Workflows: definitions, the one launch handler, the launch host and the launcher wired to run\nexport * from '../connection/workflows'\n\n// A conversation's agent steps, live turn bar, sub-agent roster and run stats\nexport * from '../connection/conversation'\n// The chat's context: the composer's documents-and-facts control and its add paths\nexport * from '../connection/chat-context'\n\nexport {\n ConnectedAgentChatPanel,\n DEFAULT_AGENT_CHAT_CARD_LABELS,\n type ConnectedAgentChatPanelProps,\n type AgentChatCardLabels,\n} from '../connection/ConnectedAgentChatPanel'\nexport {\n useDocxCommentTarget,\n useNativeDocxSupport,\n type NativeDocxSupport,\n} from '../connection/docx/support'\n// The PDF document tools on the signed-in session (and the host's binding of them), for a dialog\n// that needs them outside the viewer (a production set).\nexport {\n ConnectedDocumentToolsProvider,\n type DocumentToolsHost,\n} from '../connection/viewer/ConnectedDocumentToolsProvider'\n// The public certificate a signed PDF's signature links to (no sign-in).\nexport {\n ConnectedSignatureVerifyPage,\n type ConnectedSignatureVerifyPageProps,\n} from '../connection/viewer/ConnectedSignatureVerifyPage'\nexport {\n useDocumentViewerSupport,\n useViewerIsDetached,\n useViewerPassageCitation,\n useViewerStreamingDocument,\n type DocumentViewerSupport,\n type PassageCitation,\n type PickedPassage,\n type ViewerDocumentRecord,\n type ViewerStreamingDocument,\n} from '../connection/viewer/support'\nexport { compareDocumentsIn } from '../connection/viewer/compareDocuments'\nexport * from '../connection/auth'\n\nexport { ConnectedSharedFilesPage } from '../connection/viewer/ConnectedSharedFilesPage'\n// Where a link opens a document (a passage, a page) and the one rule every way in uses; the views\n// of the files page's document dialog (`DocumentViewerDialog`).\nexport {\n dialogTabForPlace,\n documentPlaceKey,\n showDocumentPlace,\n type DocumentPlace,\n} from '../connection/viewer/documentPlace'\nexport {\n DEFAULT_ASK_SUGGESTIONS,\n DEFAULT_DOCUMENT_VIEWER_LABELS,\n DEFAULT_DOCUMENT_VIEWER_TABS,\n type DocumentViewerDialogLabels,\n type DocumentViewerTab,\n} from '../connection/viewer/documentViewerTabs'\n\nexport { ConnectedAccountAccessBadge } from '../connection/ConnectedAccountAccessBadge'\nexport {\n ConnectedEntitlementGate,\n type ConnectedEntitlementGateProps,\n} from '../connection/ConnectedEntitlementGate'\n\nexport {\n ConnectedThreadsPage,\n type ConnectedThreadsPageProps,\n} from '../connection/threads-page/ConnectedThreadsPage'\nexport {\n ConnectedPanelHost,\n type ConnectedPanelHostProps,\n} from '../connection/panels/ConnectedPanelHost'\nexport { useSessionPanelMode } from '../connection/panels/useSessionPanelMode'\nexport {\n ConnectedPanelRegistry,\n type ConnectedPanelRegistryProps,\n type PanelRegistration,\n} from '../connection/panels/ConnectedPanelRegistry'\nexport { useMainAreaPanel } from '../connection/panels/useMainAreaPanel'\nexport { useTogglePanel } from '../connection/panels/useTogglePanel'\nexport { usePanelDmTabs, type UsePanelDmTabsOptions } from '../connection/panels/usePanelDmTabs'\n\nexport { ConnectedFilterDropdown } from '../connection/ConnectedFilterDropdown'\nexport * from '../connection/sharing'\nexport * from '../connection/people'\nexport {\n ConnectedAppShell,\n type ConnectedAppShellProps,\n type RoutedShellProps,\n} from '../connection/shell/ConnectedAppShell'\nexport { useAppShell, type AppShellController } from '../connection/shell/app-shell-controller'\nexport {\n ConnectedShellSidebar,\n type ConnectedShellSidebarProps,\n} from '../connection/shell/ConnectedShellSidebar'\nexport {\n ConnectedShellTopbar,\n type ConnectedShellTopbarProps,\n} from '../connection/shell/ConnectedShellTopbar'\nexport { ConnectedShellTabBar } from '../connection/shell/ConnectedShellTabBar'\nexport {\n ConnectedPageRegistry,\n type ConnectedPageRegistryProps,\n type PageRegistration,\n} from '../connection/shell/ConnectedPageRegistry'\nexport type { ShellAccountConfig } from '../connection/shell/ShellAccount'\nexport {\n useShellNavigation,\n type ResolvedShellNavigation,\n type ShellBrand,\n type ShellBrandPlacement,\n type ShellNavigation,\n} from '../connection/shell/shell-navigation'\nexport type {\n RoutedShellChromeProps,\n ShellAskConfig,\n ShellDockConfig,\n ShellToolConfig,\n} from '../connection/shell/RoutedShellChrome'\nexport {\n ConnectedWorkspaceSwitcher,\n type ConnectedWorkspaceSwitcherProps,\n} from '../connection/shell/ConnectedWorkspaceSwitcher'\nexport { workspaceProjectLine } from '../connection/shell/workspace-project-line'\nexport { useContextualHints } from '../connection/tips/useContextualHints'\nexport {\n ConnectedTipBar,\n DEFAULT_TIPS_OFF_LABEL,\n type ConnectedTipBarLabels,\n type ConnectedTipBarProps,\n type TipEditorRenderProps,\n type TipSituation,\n} from '../connection/tips/ConnectedTipBar'\nexport {\n ConnectedGettingStarted,\n type ConnectedGettingStartedProps,\n} from '../connection/tips/ConnectedGettingStarted'\nexport {\n useGettingStarted,\n DEFAULT_GETTING_STARTED_STEPS,\n GETTING_STARTED_DONE_TIP,\n type GettingStartedOptions,\n type GettingStartedState,\n type GettingStartedStep,\n type GettingStartedStepCopy,\n type GettingStartedStepId,\n} from '../connection/tips/useGettingStarted'\n\nexport {\n ArbiChat,\n ConnectedEmbeddedChat,\n EmbeddedChatPanel,\n type ArbiChatProps,\n type ConnectedEmbeddedChatProps,\n type EmbeddedChatPanelProps,\n} from '../connection/embedded/EmbeddedChatPanel'\n// Where an embedded panel keeps its workspace and documents, for the host's own commands to read\n// (the Word add-in's ribbon commands, `@arbidocs/blocks/office`, run in another frame).\nexport { EMBEDDED_SELECTED_DOCS_KEY, SELECTED_WORKSPACE_KEY } from '../connection/embedded/keys'\n\nexport { ChromeInstallDialog } from '../connection/auth/ChromeInstallDialog'\n\nexport {\n THREAD_TAG_FILTER_VIEW,\n type ThreadTagFilter,\n} from '../connection/threads/useThreadTagFilter'\n\nexport { useOpenTaggedContent } from '../connection/tags/tagged-content'\n"],
5
- "mappings": ";AAcA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,OACK;AACP,SAAS,mBAA4C;AAErD,SAAS,yBAAyB;AAClC,SAAS,kCAAkC;AAC3C;AAAA,EACE;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP,SAAS,sCAAsC;AAE/C,cAAc;AAEd,cAAc;AACd;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAOK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP;AAAA,EACE;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP;AAAA,EACE;AAAA,OAEK;AACP,SAAS,4BAA4B;AAC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,EACE;AAAA,EACA;AAAA,OAGK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OAEK;AAGP;AAAA,EACE;AAAA,OAEK;AAEP;AAAA,EACE;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAMK;AACP,SAAS,0BAA0B;AACnC,cAAc;AAEd,SAAS,gCAAgC;AAGzC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AAEP,SAAS,mCAAmC;AAC5C;AAAA,EACE;AAAA,OAEK;AAEP;AAAA,EACE;AAAA,OAEK;AACP;AAAA,EACE;AAAA,OAEK;AACP,SAAS,2BAA2B;AACpC;AAAA,EACE;AAAA,OAGK;AACP,SAAS,wBAAwB;AACjC,SAAS,sBAAsB;AAC/B,SAAS,sBAAkD;AAE3D,SAAS,+BAA+B;AACxC,cAAc;AACd,cAAc;AACd;AAAA,EACE;AAAA,OAGK;AACP,SAAS,mBAA4C;AACrD;AAAA,EACE;AAAA,OAEK;AACP;AAAA,EACE;AAAA,OAEK;AACP,SAAS,4BAA4B;AACrC;AAAA,EACE;AAAA,OAGK;AAEP;AAAA,EACE;AAAA,OAKK;AAOP;AAAA,EACE;AAAA,OAEK;AACP,SAAS,4BAA4B;AACrC,SAAS,0BAA0B;AACnC;AAAA,EACE;AAAA,EACA;AAAA,OAKK;AACP;AAAA,EACE;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAMK;AAEP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAIK;AAGP,SAAS,4BAA4B,8BAA8B;AAEnE,SAAS,2BAA2B;AAEpC;AAAA,EACE;AAAA,OAEK;AAEP,SAAS,4BAA4B;",
4
+ "sourcesContent": ["/**\n * @arbidocs/blocks/connect: the demo/live connection layer (auth, workspace selection, agent\n * hooks; `defaultHost` for a blocks-only site) and the connected kits. Kept off the root barrel\n * because it needs React Query and the SDK.\n */\nexport {\n type ArbiMode,\n type ConnectionStatus,\n type ArbiUser,\n type AssistantStep,\n type AssistantCitation,\n type AssistantMessage,\n type ArbiConnectionConfig,\n} from '../connection/types'\nexport {\n SESSION_EXPIRED_MESSAGE,\n useConnection,\n useConnectedWorkspace,\n type ConnectedWorkspace,\n isAuthenticated,\n} from '../connection/ConnectionProvider'\nexport { defaultHost, type DefaultHostOptions } from '../connection/defaultHost'\n// The sidebar as the session keeps it, for `useSidebarController`.\nexport { useSessionSidebar } from '../connection/useSessionSidebar'\nexport { ConnectedTaskAccessRequest } from '../connection/ConnectedTaskAccessRequest'\nexport {\n ConnectedWorkspaceActivity,\n type ConnectedWorkspaceActivityProps,\n} from '../connection/ConnectedWorkspaceActivity'\nexport {\n ConnectedWorkspaceActivityPanel,\n DEFAULT_WORKSPACE_ACTIVITY_PANEL_LABELS,\n type ConnectedWorkspaceActivityPanelProps,\n type WorkspaceActivityPanelLabels,\n} from '../connection/ConnectedWorkspaceActivityPanel'\nexport { useOpenWorkspaceActivityTarget } from '../connection/useOpenWorkspaceActivityTarget'\n// The notification centre page (persisted notifications + the session log) and its parts.\nexport * from '../connection/notification-center'\n// Changes made offline that wait to sync\nexport * from '../connection/offline'\nexport {\n ConnectedWorkspaceNotificationMenu,\n ConnectedThreadFollow,\n type ConnectedWorkspaceNotificationMenuProps,\n type ConnectedThreadFollowProps,\n} from '../connection/ConnectedNotificationRelevance'\nexport {\n useConnectedDocuments,\n useListedDocuments,\n useDocumentFilter,\n isListedDocument,\n useConnectedTags,\n useConnectedConversations,\n type ConnectedConversationRow,\n type ConnectedWorkspaceData,\n type ConnectedList,\n type ConnectedListResult,\n type ConnectedDocument,\n type ConnectedTag,\n} from '../connection/workspaceData'\nexport {\n ConnectedWorkflowsTable,\n DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS,\n useConnectedWorkspaceRole,\n type ConnectedWorkflowsTableProps,\n type ConnectedWorkflowsTableLabels,\n} from '../connection/ConnectedWorkflowsTable'\nexport {\n ConnectedWorkflowLauncher,\n ConnectedWorkflowDocumentsField,\n useConnectedWorkflowScopeSource,\n toWorkflowFieldDocument,\n type ConnectedWorkflowLauncherProps,\n type ConnectedWorkflowDocumentsFieldProps,\n} from '../connection/ConnectedWorkflowLauncher'\nexport {\n ConnectedSkillsLibrary,\n type ConnectedSkillsLibraryProps,\n} from '../connection/ConnectedSkillsLibrary'\nexport {\n ConnectedSkillsBrowser,\n DEFAULT_CONNECTED_SKILLS_BROWSER_LABELS,\n type ConnectedSkillsBrowserProps,\n type ConnectedSkillsBrowserLabels,\n} from '../connection/ConnectedSkillsBrowser'\nexport {\n useInstallSkillPackOnSignIn,\n type InstallSkillPackOnSignInOptions,\n} from '../connection/useInstallSkillPackOnSignIn'\nexport { useIsExternalAccount } from '../connection/useIsExternalAccount'\nexport {\n ConnectedAgentCreator,\n type ConnectedAgentCreatorProps,\n type ConnectedAgentCreatorAgent,\n} from '../connection/ConnectedAgentCreator'\nexport {\n useConnectedAgentManagement,\n type AgentManagementLabels,\n type ConnectedAgentManagementOptions,\n} from '../connection/agents/useConnectedAgentManagement'\nexport {\n ConnectedAgentsPage,\n ConnectedAgentsPageScope,\n ConnectedAgentsSection,\n ConnectedAgentsSectionHeading,\n ConnectedAgentsNewTask,\n DEFAULT_AGENTS_PAGE_SECTIONS,\n type ConnectedAgentsPageProps,\n type ConnectedAgentsPageScopeProps,\n type ConnectedAgentsSectionProps,\n type AgentsPageSection,\n type AgentCardDetail,\n type AgentsPageAgentOptions,\n type AgentsPageLauncherOptions,\n type AgentsPageStatAccents,\n type AgentsPageTestIdKey,\n} from '../connection/agents/ConnectedAgentsPage'\nexport {\n DEFAULT_CONNECTED_AGENTS_PAGE_LABELS,\n type ConnectedAgentsPageLabels,\n} from '../connection/agents/agentsPageLabels'\nexport {\n ConnectedWorkflowHistory,\n ConnectedTaskActivityDialog,\n workflowRunView,\n type ConnectedWorkflowHistoryProps,\n type ConnectedTaskActivityDialogProps,\n} from '../connection/ConnectedWorkflowHistory'\nexport {\n ConnectedSkillUpload,\n DEFAULT_CONNECTED_SKILL_UPLOAD_LABELS,\n type ConnectedSkillUploadProps,\n type ConnectedSkillUploadLabels,\n} from '../connection/ConnectedSkillUpload'\nexport {\n useConnectedAiTask,\n useConnectedChat,\n ConnectedAssistantDock,\n useWorkspaceDocs,\n useSemanticSearch,\n toRedlineMarkdown,\n redlineStats,\n textToArtifact,\n type AiTaskStatus,\n type AiRunOptions,\n type SearchChunk,\n type ArtifactEvent,\n} from '../connection/ai'\nexport { StreamedArtifact, type StreamedArtifactProps } from '../connection/StreamedArtifact'\nexport {\n ConnectedWorkflowRunner,\n DEFAULT_CONNECTED_WORKFLOW_RUNNER_LABELS,\n type ConnectedWorkflowRunnerProps,\n type ConnectedWorkflowRunnerLabels,\n type WorkflowRunnerDocument,\n} from '../connection/ConnectedWorkflowRunner'\nexport { WorkflowRunThread, type WorkflowRunThreadProps } from '../connection/WorkflowRunThread'\nexport {\n ConnectedTagTable,\n type ConnectedTagTableProps,\n type TagTableFilter,\n type TagTableFilterField,\n} from '../connection/tags/ConnectedTagTable'\nexport {\n ConnectedAssistantPage,\n DEFAULT_ASSISTANT_LABELS,\n type ConnectedAssistantPageLabels,\n type ConnectedAssistantPageProps,\n} from '../connection/assistant/ConnectedAssistantPage'\nexport {\n AssistantStatusPanel,\n DEFAULT_ASSISTANT_STATUS_LABELS,\n type AssistantStatusLabels,\n} from '../connection/assistant/AssistantStatusPanel'\nexport { ConnectedTagsPage, type TagsReviewKind } from '../connection/tags/ConnectedTagsPage'\nexport {\n FACTS_COMPOSE_VIEW,\n FACTS_FILTER_KEY,\n FACTS_FOCUS_VIEW,\n FACTS_GRID_ID,\n} from '../connection/facts/view-keys'\nexport { ConnectedFactsPage } from '../connection/facts/ConnectedFactsPage'\nexport {\n ConnectedFactsSmartSearch,\n type ConnectedFactsSmartSearchProps,\n} from '../connection/facts/ConnectedFactsSmartSearch'\nexport {\n useConnectedShellWorkspaces,\n type UseConnectedShellWorkspacesOptions,\n} from '../connection/useConnectedShellWorkspaces'\nexport {\n ConnectedProfileCard,\n ConnectedSecuritySection,\n ConnectedPasswordChangeDialog,\n ConnectedNotificationPreferences,\n ConnectedSessionsRow,\n ConnectedLogoutDialog,\n ConnectedDangerZone,\n ConnectedIdentityVerification,\n type ConnectedProfileCardProps,\n type ConnectedSecuritySectionProps,\n type ConnectedPasswordChangeDialogProps,\n type ConnectedNotificationPreferencesProps,\n type ConnectedSessionsRowProps,\n type ConnectedLogoutDialogProps,\n type ConnectedDangerZoneProps,\n type ConnectedIdentityVerificationProps,\n} from '../connection/ConnectedSettings'\n// The settings page: addressable sections (`openSettings(section)`), the connected ones bound to the account\nexport * from '../connection/settings-page'\nexport * from '../connection/storage'\n// A workspace's own settings page (identity, visibility, members, leave)\nexport * from '../connection/workspace-settings'\n// Archiving a workspace and bringing it back: the Archive button, the unarchive dialog, the list's status line\nexport * from '../connection/workspace-archive'\nexport * from '../connection/workspace-form'\n// Connectors: connected apps, mailbox and drive sync settings\nexport * from '../connection/connectors'\n// Billing: projects, plans, usage, add-ons and checkout (Stripe from the host)\nexport * from '../connection/billing'\n// The user's workspaces grouped by project, as cards or a table; the Projects panel\nexport * from '../connection/workspace-list'\nexport * from '../connection/projects'\n// The address book: directory, card editor, .vcf import, add by e-mail, the contact star.\nexport * from '../connection/contacts'\n// The open workspace's home: Start, recent files and threads, facts, the agenda\nexport * from '../connection/workspace-dashboard'\nexport * from '../connection/live-blocks'\n// The workspace's ask field (ask a new chat, or search the files) and what asking means\nexport * from '../connection/ask'\n// The \u2318K command palette: pages, the built-in actions and the host's, ask and search\nexport * from '../connection/command'\n// Remote control: the consent prompt, the pill, the settings switch and the socket's handler\nexport * from '../connection/remote-control'\n\n// Smart Search: the whole search page\nexport * from '../connection/search'\n\n// Mail: the whole mailbox, and the composer on its own\nexport * from '../connection/mail'\n\n// Secure mail: the page a secure-mail link opens, and the capture of the link's key\nexport * from '../connection/secure-mail'\n\n// Calendar: the whole calendar, its upcoming list, the mail invitation card and the public booking page\nexport * from '../connection/calendar'\n\n// Files: the explorer, and what a host adds to the Files kits\nexport * from '../connection/files'\nexport * from '../connection/databases'\n\n// Export, copy or move: the dialog any list opens, and the watcher that follows a copy or move\nexport * from '../connection/export'\n\n// Chats: the messenger (direct, group and meeting chats), one thread, group members, attachments\nexport * from '../connection/messenger'\n\n// Assistant configuration: the model picker, config forms and the developer's config editor\nexport * from '../connection/config'\n\n// Workspace access requests: the owner's grant dialog (a task's run resumes on a grant)\nexport * from '../connection/workspace-access'\nexport * from '../connection/entities'\nexport * from '../connection/account-cluster'\nexport * from '../connection/runtime'\n// The address bar and the session kept in step through the route codec (`hrefFor` / `parseHref`).\nexport { useDeepLinkSync, type DeepLinkSyncOptions } from '../connection/routes/useDeepLinkSync'\nexport * from '../connection/report-problem'\n// The global dialogs (the dialog registry's kinds), mounted once in the shell.\nexport * from '../connection/dialogs'\n\n// The Threads page's tabs (decision 1), a thread's chip, status and switcher\nexport * from '../connection/threads'\n\n// A thread's tasks: its top bar (a run's steps, its activity, its options) and its activity\nexport * from '../connection/tasks'\n\n// Workflows: definitions, the one launch handler, the launch host and the launcher wired to run\nexport * from '../connection/workflows'\n\n// A conversation's agent steps, live turn bar, sub-agent roster and run stats\nexport * from '../connection/conversation'\n// The chat's context: the composer's documents-and-facts control and its add paths\nexport * from '../connection/chat-context'\n\nexport {\n ConnectedAgentChatPanel,\n DEFAULT_AGENT_CHAT_CARD_LABELS,\n type ConnectedAgentChatPanelProps,\n type AgentChatCardLabels,\n} from '../connection/ConnectedAgentChatPanel'\nexport {\n useDocxCommentTarget,\n useNativeDocxSupport,\n type NativeDocxSupport,\n} from '../connection/docx/support'\n// The PDF document tools on the signed-in session (and the host's binding of them), for a dialog\n// that needs them outside the viewer (a production set).\nexport {\n ConnectedDocumentToolsProvider,\n type DocumentToolsHost,\n} from '../connection/viewer/ConnectedDocumentToolsProvider'\n// The public certificate a signed PDF's signature links to (no sign-in).\nexport {\n ConnectedSignatureVerifyPage,\n type ConnectedSignatureVerifyPageProps,\n} from '../connection/viewer/ConnectedSignatureVerifyPage'\nexport {\n useDocumentViewerSupport,\n useViewerIsDetached,\n useViewerPassageCitation,\n useViewerStreamingDocument,\n type DocumentViewerSupport,\n type PassageCitation,\n type PickedPassage,\n type ViewerDocumentRecord,\n type ViewerStreamingDocument,\n} from '../connection/viewer/support'\nexport { compareDocumentsIn } from '../connection/viewer/compareDocuments'\nexport * from '../connection/auth'\n\nexport { ConnectedSharedFilesPage } from '../connection/viewer/ConnectedSharedFilesPage'\n// Where a link opens a document (a passage, a page) and the one rule every way in uses; the views\n// of the files page's document dialog (`DocumentViewerDialog`).\nexport {\n dialogTabForPlace,\n documentPlaceKey,\n showDocumentPlace,\n type DocumentPlace,\n} from '../connection/viewer/documentPlace'\nexport {\n DEFAULT_ASK_SUGGESTIONS,\n DEFAULT_DOCUMENT_VIEWER_LABELS,\n DEFAULT_DOCUMENT_VIEWER_TABS,\n type DocumentViewerDialogLabels,\n type DocumentViewerTab,\n} from '../connection/viewer/documentViewerTabs'\n\nexport { ConnectedAccountAccessBadge } from '../connection/ConnectedAccountAccessBadge'\nexport {\n ConnectedEntitlementGate,\n type ConnectedEntitlementGateProps,\n} from '../connection/ConnectedEntitlementGate'\n\nexport {\n ConnectedThreadsPage,\n type ConnectedThreadsPageProps,\n} from '../connection/threads-page/ConnectedThreadsPage'\nexport {\n ConnectedPanelHost,\n type ConnectedPanelHostProps,\n} from '../connection/panels/ConnectedPanelHost'\nexport { useSessionPanelMode } from '../connection/panels/useSessionPanelMode'\nexport {\n ConnectedPanelRegistry,\n type ConnectedPanelRegistryProps,\n type PanelRegistration,\n} from '../connection/panels/ConnectedPanelRegistry'\nexport { useMainAreaPanel } from '../connection/panels/useMainAreaPanel'\nexport { useTogglePanel } from '../connection/panels/useTogglePanel'\nexport { usePanelDmTabs, type UsePanelDmTabsOptions } from '../connection/panels/usePanelDmTabs'\n\nexport { ConnectedFilterDropdown } from '../connection/ConnectedFilterDropdown'\nexport * from '../connection/sharing'\nexport * from '../connection/people'\nexport {\n ConnectedAppShell,\n type ConnectedAppShellProps,\n type RoutedShellProps,\n} from '../connection/shell/ConnectedAppShell'\nexport { useAppShell, type AppShellController } from '../connection/shell/app-shell-controller'\nexport {\n ConnectedShellSidebar,\n type ConnectedShellSidebarProps,\n} from '../connection/shell/ConnectedShellSidebar'\nexport {\n ConnectedShellTopbar,\n type ConnectedShellTopbarProps,\n} from '../connection/shell/ConnectedShellTopbar'\nexport { ConnectedShellTabBar } from '../connection/shell/ConnectedShellTabBar'\nexport {\n ConnectedPageRegistry,\n type ConnectedPageRegistryProps,\n type PageRegistration,\n} from '../connection/shell/ConnectedPageRegistry'\nexport type { ShellAccountConfig } from '../connection/shell/ShellAccount'\nexport {\n useShellNavigation,\n type ResolvedShellNavigation,\n type ShellBrand,\n type ShellBrandPlacement,\n type ShellNavigation,\n} from '../connection/shell/shell-navigation'\nexport type {\n RoutedShellChromeProps,\n ShellAskConfig,\n ShellDockConfig,\n ShellToolConfig,\n} from '../connection/shell/RoutedShellChrome'\nexport {\n ConnectedWorkspaceSwitcher,\n type ConnectedWorkspaceSwitcherProps,\n} from '../connection/shell/ConnectedWorkspaceSwitcher'\nexport { workspaceProjectLine } from '../connection/shell/workspace-project-line'\nexport { useContextualHints } from '../connection/tips/useContextualHints'\nexport {\n ConnectedTipBar,\n DEFAULT_TIPS_OFF_LABEL,\n type ConnectedTipBarLabels,\n type ConnectedTipBarProps,\n type TipEditorRenderProps,\n type TipSituation,\n} from '../connection/tips/ConnectedTipBar'\nexport {\n ConnectedGettingStarted,\n type ConnectedGettingStartedProps,\n} from '../connection/tips/ConnectedGettingStarted'\nexport {\n useGettingStarted,\n DEFAULT_GETTING_STARTED_STEPS,\n GETTING_STARTED_DONE_TIP,\n type GettingStartedOptions,\n type GettingStartedState,\n type GettingStartedStep,\n type GettingStartedStepCopy,\n type GettingStartedStepId,\n} from '../connection/tips/useGettingStarted'\n\nexport {\n ArbiChat,\n ConnectedEmbeddedChat,\n EmbeddedChatPanel,\n type ArbiChatProps,\n type ConnectedEmbeddedChatProps,\n type EmbeddedChatPanelProps,\n} from '../connection/embedded/EmbeddedChatPanel'\n// Where an embedded panel keeps its workspace and documents, for the host's own commands to read\n// (the Word add-in's ribbon commands, `@arbidocs/blocks/office`, run in another frame).\nexport { EMBEDDED_SELECTED_DOCS_KEY, SELECTED_WORKSPACE_KEY } from '../connection/embedded/keys'\n\nexport { ChromeInstallDialog } from '../connection/auth/ChromeInstallDialog'\n\nexport {\n THREAD_TAG_FILTER_VIEW,\n type ThreadTagFilter,\n} from '../connection/threads/useThreadTagFilter'\n\nexport { useOpenTaggedContent } from '../connection/tags/tagged-content'\n"],
5
+ "mappings": ";AAcA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,OACK;AACP,SAAS,mBAA4C;AAErD,SAAS,yBAAyB;AAClC,SAAS,kCAAkC;AAC3C;AAAA,EACE;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP,SAAS,sCAAsC;AAE/C,cAAc;AAEd,cAAc;AACd;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAOK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP;AAAA,EACE;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP;AAAA,EACE;AAAA,OAEK;AACP,SAAS,4BAA4B;AACrC;AAAA,EACE;AAAA,OAGK;AACP;AAAA,EACE;AAAA,OAGK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAUK;AACP;AAAA,EACE;AAAA,OAEK;AACP;A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ACA;AAAA,EACA;AAAA,OAMK;AACP,SAAS,0BAA0B;AACnC,cAAc;AAEd,SAAS,gCAAgC;AAGzC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AAEP,SAAS,mCAAmC;AAC5C;AAAA,EACE;AAAA,OAEK;AAEP;AAAA,EACE;AAAA,OAEK;AACP;AAAA,EACE;AAAA,OAEK;AACP,SAAS,2BAA2B;AACpC;AAAA,EACE;AAAA,OAGK;AACP,SAAS,wBAAwB;AACjC,SAAS,sBAAsB;AAC/B,SAAS,sBAAkD;AAE3D,SAAS,+BAA+B;AACxC,cAAc;AACd,cAAc;AACd;AAAA,EACE;AAAA,OAGK;AACP,SAAS,mBAA4C;AACrD;AAAA,EACE;AAAA,OAEK;AACP;AAAA,EACE;AAAA,OAEK;AACP,SAAS,4BAA4B;AACrC;AAAA,EACE;AAAA,OAGK;AAEP;AAAA,EACE;AAAA,OAKK;AAOP;AAAA,EACE;AAAA,OAEK;AACP,SAAS,4BAA4B;AACrC,SAAS,0BAA0B;AACnC;AAAA,EACE;AAAA,EACA;AAAA,OAKK;AACP;AAAA,EACE;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAMK;AAEP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAIK;AAGP,SAAS,4BAA4B,8BAA8B;AAEnE,SAAS,2BAA2B;AAEpC;AAAA,EACE;AAAA,OAEK;AAEP,SAAS,4BAA4B;",
6
6
  "names": []
7
7
  }
@@ -1,27 +1,29 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var chunkD5DOK2AE_cjs = require('../chunk-D5DOK2AE.cjs');
4
+ var chunkZW2ZFC3Q_cjs = require('../chunk-ZW2ZFC3Q.cjs');
5
5
  require('../chunk-JITYC4OS.cjs');
6
6
  require('../chunk-WVZLAAIZ.cjs');
7
7
  require('../chunk-X7ALF4MP.cjs');
8
8
  require('../chunk-4CIVQWAX.cjs');
9
9
  require('../chunk-QWVUBTW3.cjs');
10
10
  require('../chunk-JVEDKKNO.cjs');
11
- require('../chunk-B5BGVPQ5.cjs');
11
+ require('../chunk-AURL2KT5.cjs');
12
12
  require('../chunk-CYWOL2LS.cjs');
13
- require('../chunk-4XNP27N4.cjs');
14
- require('../chunk-DUNXLT63.cjs');
13
+ require('../chunk-T7BUGVSG.cjs');
14
+ require('../chunk-AHUEBRLX.cjs');
15
15
  require('../chunk-HYUKPHCT.cjs');
16
- require('../chunk-JCFXS336.cjs');
16
+ require('../chunk-NRGLF4J4.cjs');
17
17
  require('../chunk-223D4727.cjs');
18
18
  require('../chunk-SNUBQMIS.cjs');
19
19
  var chunkDLGYR4JL_cjs = require('../chunk-DLGYR4JL.cjs');
20
- require('../chunk-FCT62ZPE.cjs');
20
+ require('../chunk-JWCVA4LC.cjs');
21
+ require('../chunk-T3Y3LZ4Y.cjs');
22
+ require('../chunk-BZVK7JW5.cjs');
21
23
  require('../chunk-4ONPEVTP.cjs');
22
24
  require('../chunk-V3KLUWQQ.cjs');
23
25
  require('../chunk-5GBM7BQB.cjs');
24
- require('../chunk-5DGNJ6VJ.cjs');
26
+ require('../chunk-UD3LPATQ.cjs');
25
27
  require('../chunk-3RAW2ZH5.cjs');
26
28
  require('../chunk-D4SJT3NG.cjs');
27
29
  require('../chunk-OUYBYZ7Y.cjs');
@@ -34,12 +36,13 @@ require('../chunk-PIWXX2M4.cjs');
34
36
  require('../chunk-K4763GD5.cjs');
35
37
  require('../chunk-2RLA6QO2.cjs');
36
38
  require('../chunk-MZZ3SBQL.cjs');
37
- require('../chunk-E6BM5ENI.cjs');
39
+ require('../chunk-LLVE5TST.cjs');
38
40
  require('../chunk-DYIZ7W4P.cjs');
39
41
  require('../chunk-WQMR3O2D.cjs');
40
42
  require('../chunk-NZNBJF3M.cjs');
41
43
  require('../chunk-NWNVWO6L.cjs');
42
44
  require('../chunk-SK6HQ46Q.cjs');
45
+ require('../chunk-WRTEKOQP.cjs');
43
46
  require('../chunk-MNIQDXM6.cjs');
44
47
  require('../chunk-EKFA2OS3.cjs');
45
48
  require('../chunk-WCT6FT2K.cjs');
@@ -51,11 +54,11 @@ require('../chunk-II2OEXHW.cjs');
51
54
  require('../chunk-KWWGUQJV.cjs');
52
55
  require('../chunk-3YEXZX4H.cjs');
53
56
  require('../chunk-4PA6VCCR.cjs');
54
- require('../chunk-VSDD5TH5.cjs');
55
- require('../chunk-AHDJXIUB.cjs');
56
57
  require('../chunk-RL2HI6NP.cjs');
57
58
  require('../chunk-6UZC4XVV.cjs');
58
- require('../chunk-A5SKK3CU.cjs');
59
+ require('../chunk-G3MRW4WB.cjs');
60
+ require('../chunk-AHDJXIUB.cjs');
61
+ require('../chunk-SLCH5JRI.cjs');
59
62
  require('../chunk-DKY67DA6.cjs');
60
63
  require('../chunk-YA6GXWC2.cjs');
61
64
  require('../chunk-ZVEW3JBT.cjs');
@@ -95,7 +98,7 @@ require('../chunk-PLIF5CUV.cjs');
95
98
 
96
99
  Object.defineProperty(exports, "ConnectedDocumentViewer", {
97
100
  enumerable: true,
98
- get: function () { return chunkD5DOK2AE_cjs.ConnectedDocumentViewer; }
101
+ get: function () { return chunkZW2ZFC3Q_cjs.ConnectedDocumentViewer; }
99
102
  });
100
103
  Object.defineProperty(exports, "ConnectedDocumentToolsProvider", {
101
104
  enumerable: true,
@@ -26,6 +26,8 @@ export interface DashboardPanelProps {
26
26
  enabled?: boolean;
27
27
  /** `plain`: no card around it (a chart placed in a page). */
28
28
  variant?: 'card' | 'plain';
29
+ /** Fit the box it is given (a page's tile): see `PanelView`'s `fit`. */
30
+ fit?: boolean;
29
31
  formatters?: UnitFormatters;
30
32
  labels?: Partial<DashboardPanelLabels>;
31
33
  className?: string;
@@ -38,6 +38,7 @@ function SourcePanel({
38
38
  actions,
39
39
  enabled,
40
40
  variant,
41
+ fit,
41
42
  formatters,
42
43
  labels,
43
44
  className,
@@ -104,6 +105,7 @@ function SourcePanel({
104
105
  emptyAction,
105
106
  actions,
106
107
  variant,
108
+ fit,
107
109
  formatters,
108
110
  labels,
109
111
  className,
@@ -131,6 +133,7 @@ function DashboardPanel({
131
133
  actions: props.actions,
132
134
  labels: { ...l, empty: l.noWorkspace ?? l.empty },
133
135
  variant: props.variant,
136
+ fit: props.fit,
134
137
  className: props.className,
135
138
  testId: props.testId
136
139
  }
@@ -146,6 +149,7 @@ function DashboardPanel({
146
149
  errorDetail: l.unknownSource?.(props.panel.source.id),
147
150
  actions: props.actions,
148
151
  labels: l,
152
+ fit: props.fit,
149
153
  className: props.className,
150
154
  testId: props.testId
151
155
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/connection/dashboards/DashboardPanel.tsx"],
4
- "sourcesContent": ["/**\n * `DashboardPanel`: one panel of a dashboard, from its `PanelSpec`. It looks its source up in the\n * host's registry (`useDataSources`), reads the dataset the spec asks for (`usePanelDataset`:\n * grouped and measured by the source) and shows it through `PanelView`.\n */\nimport { useEffect, useMemo, type ReactNode } from 'react'\nimport {\n formatGbp,\n useArbiSessionState,\n useDataSources,\n usePanelDataset,\n type DataSource,\n type PanelSpec,\n} from '@arbidocs/react'\nimport { Button } from '@arbidocs/react/ui'\nimport { useBlocksEnvironment } from '../../provider/environment'\nimport { formatBytes } from '../storage/storage-labels'\nimport {\n chartModelOf,\n DEFAULT_UNIT_FORMATTERS,\n formatterOf,\n metricValueOf,\n type DrawnChartType,\n type UnitFormatters,\n} from '../../dashboards/chartModel'\nimport { preloadChartRenderer } from '../../dashboards/ChartRenderer'\nimport { PanelView, type PanelBody, type PanelViewLabels } from '../../dashboards/PanelView'\n\n/** The package's formatters: the one \u00A3 formatter for AI usage, and file sizes. */\nexport const PANEL_FORMATTERS: UnitFormatters = {\n ...DEFAULT_UNIT_FORMATTERS,\n gbp: (v) => formatGbp(v),\n bytes: (v) => formatBytes(v),\n}\n\nexport interface DashboardPanelLabels extends PanelViewLabels {\n /** A panel whose source the host does not offer. */\n unknownSource: (id: string) => string\n /** The empty state's link to the databases (where data is created or imported). */\n openDatabases: string\n /** A panel over workspace data (documents, threads\u2026) while no workspace is open. */\n noWorkspace: string\n}\n\nexport const DEFAULT_DASHBOARD_PANEL_LABELS: Partial<DashboardPanelLabels> = {\n unknownSource: (id) => `This panel reads \u201C${id}\u201D, which is not available here.`,\n openDatabases: 'Open databases',\n noWorkspace: 'Open a workspace to see this.',\n}\n\nexport interface DashboardPanelProps {\n panel: PanelSpec\n /** Buttons in the panel's corner (a dashboard being edited). */\n actions?: ReactNode\n /** Don't read data (an editor showing the panel's frame only). */\n enabled?: boolean\n /** `plain`: no card around it (a chart placed in a page). */\n variant?: 'card' | 'plain'\n formatters?: UnitFormatters\n labels?: Partial<DashboardPanelLabels>\n className?: string\n testId?: string\n}\n\nconst DRAWN = new Set(['bar', 'line', 'area', 'pie', 'donut'])\n\nfunction kindOf(panel: PanelSpec): 'metric' | 'chart' | 'table' {\n return panel.chart.type === 'metric' ? 'metric' : panel.chart.type === 'table' ? 'table' : 'chart'\n}\n\nfunction SourcePanel({\n source,\n panel,\n actions,\n enabled,\n variant,\n formatters,\n labels,\n className,\n testId,\n}: DashboardPanelProps & { source: DataSource; labels: Partial<DashboardPanelLabels> }) {\n const environment = useBlocksEnvironment()\n const { chart } = panel\n // A drawn chart fetches its drawing code while its data loads, not after.\n const drawn = DRAWN.has(chart.type) && enabled !== false\n useEffect(() => {\n if (drawn) preloadChartRenderer()\n }, [drawn])\n const { dataset, fields, isLoading, error } = usePanelDataset(\n source,\n panel.source.params,\n chart,\n { enabled }\n )\n const body = useMemo((): PanelBody | undefined => {\n if (!dataset) return undefined\n const other = labels.other\n if (chart.type === 'metric') {\n const valueField = dataset.fields.find((f) => f.id === 'value')\n // Nothing matched: a count or a sum of nothing is 0; an average of nothing has no value.\n const op = chart.aggregate ?? 'count'\n return {\n kind: 'metric',\n value: metricValueOf(dataset) ?? (op === 'count' || op === 'sum' ? 0 : null),\n format: formatterOf(valueField, formatters),\n }\n }\n if (DRAWN.has(chart.type)) {\n return {\n kind: 'chart',\n model: chartModelOf({ ...chart, type: chart.type as DrawnChartType }, dataset, {\n fields,\n formatters,\n otherLabel: other,\n }),\n }\n }\n if (chart.x) {\n return {\n kind: 'groups',\n model: chartModelOf({ ...chart, type: 'bar' }, dataset, {\n fields,\n formatters,\n otherLabel: other,\n }),\n }\n }\n const shown = chart.columns?.length\n ? chart.columns.flatMap((id) => dataset.fields.filter((f) => f.id === id))\n : dataset.fields\n return { kind: 'records', fields: shown, rows: dataset.rows }\n }, [dataset, chart, fields, formatters, labels.other])\n\n const state = error\n ? 'error'\n : !dataset\n ? isLoading\n ? 'loading'\n : 'empty'\n : chart.type !== 'metric' && dataset.rows.length === 0\n ? 'empty'\n : 'ready'\n\n const emptyAction =\n source.id === 'database' && environment.openDatabases ? (\n <Button variant=\"outline\" size=\"sm\" onClick={() => environment.openDatabases?.()}>\n {labels.openDatabases}\n </Button>\n ) : undefined\n\n return (\n <PanelView\n kind={kindOf(panel)}\n title={panel.title}\n description={panel.description}\n state={state}\n body={body}\n errorDetail={error instanceof Error ? error.message : undefined}\n emptyAction={emptyAction}\n actions={actions}\n variant={variant}\n formatters={formatters}\n labels={labels}\n className={className}\n testId={testId}\n />\n )\n}\n\nexport function DashboardPanel({\n formatters = PANEL_FORMATTERS,\n labels,\n ...props\n}: DashboardPanelProps) {\n const registry = useDataSources()\n const l = { ...DEFAULT_DASHBOARD_PANEL_LABELS, ...labels }\n const source = registry.get(props.panel.source.id)\n const workspaceId = useArbiSessionState((s) => s.workspaceId)\n const scope =\n typeof source?.scope === 'function'\n ? source.scope(props.panel.source.params ?? {})\n : source?.scope\n if (scope === 'workspace' && !workspaceId) {\n return (\n <PanelView\n kind={kindOf(props.panel)}\n title={props.panel.title}\n state=\"empty\"\n actions={props.actions}\n labels={{ ...l, empty: l.noWorkspace ?? l.empty }}\n variant={props.variant}\n className={props.className}\n testId={props.testId}\n />\n )\n }\n if (!source) {\n return (\n <PanelView\n kind={kindOf(props.panel)}\n title={props.panel.title}\n state=\"error\"\n errorDetail={l.unknownSource?.(props.panel.source.id)}\n actions={props.actions}\n labels={l}\n className={props.className}\n testId={props.testId}\n />\n )\n }\n // Keyed by source: a source's hooks differ from another's, so a new source mounts afresh.\n return (\n <SourcePanel key={source.id} source={source} formatters={formatters} labels={l} {...props} />\n )\n}\n"],
5
- "mappings": ";AAiJM;AA5IN,SAAS,WAAW,eAA+B;AACnD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP,SAAS,cAAc;AACvB,SAAS,4BAA4B;AACrC,SAAS,mBAAmB;AAC5B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP,SAAS,4BAA4B;AACrC,SAAS,iBAAuD;AAGzD,MAAM,mBAAmC;AAAA,EAC9C,GAAG;AAAA,EACH,KAAK,CAAC,MAAM,UAAU,CAAC;AAAA,EACvB,OAAO,CAAC,MAAM,YAAY,CAAC;AAC7B;AAWO,MAAM,iCAAgE;AAAA,EAC3E,eAAe,CAAC,OAAO,0BAAqB,EAAE;AAAA,EAC9C,eAAe;AAAA,EACf,aAAa;AACf;AAgBA,MAAM,QAAQ,oBAAI,IAAI,CAAC,OAAO,QAAQ,QAAQ,OAAO,OAAO,CAAC;AAE7D,SAAS,OAAO,OAAgD;AAC9D,SAAO,MAAM,MAAM,SAAS,WAAW,WAAW,MAAM,MAAM,SAAS,UAAU,UAAU;AAC7F;AAEA,SAAS,YAAY;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAwF;AACtF,QAAM,cAAc,qBAAqB;AACzC,QAAM,EAAE,MAAM,IAAI;AAElB,QAAM,QAAQ,MAAM,IAAI,MAAM,IAAI,KAAK,YAAY;AACnD,YAAU,MAAM;AACd,QAAI,MAAO,sBAAqB;AAAA,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ACE;AAAA,MAAC;AAAA;AAAA,QACC,MAAM,OAAO,MAAM,KAAK;AAAA,QACxB,OAAO,MAAM,MAAM;AAAA,QACnB,OAAM;AAAA,QACN,aAAa,EAAE,gBAAgB,MAAM,MAAM,OAAO,EAAE;AAAA,QACpD,SAAS,MAAM;AAAA,QACf,QAAQ;AAAA,QACR,WAAW,MAAM;AAAA,QACjB,QAAQ,MAAM;AAAA;AAAA,IAChB;AAAA,EAEJ;AAEA,SACE,oBAAC,eAA4B,QAAgB,YAAwB,QAAQ,GAAI,GAAG,SAAlE,OAAO,EAAkE;AAE/F;",
4
+ "sourcesContent": ["/**\n * `DashboardPanel`: one panel of a dashboard, from its `PanelSpec`. It looks its source up in the\n * host's registry (`useDataSources`), reads the dataset the spec asks for (`usePanelDataset`:\n * grouped and measured by the source) and shows it through `PanelView`.\n */\nimport { useEffect, useMemo, type ReactNode } from 'react'\nimport {\n formatGbp,\n useArbiSessionState,\n useDataSources,\n usePanelDataset,\n type DataSource,\n type PanelSpec,\n} from '@arbidocs/react'\nimport { Button } from '@arbidocs/react/ui'\nimport { useBlocksEnvironment } from '../../provider/environment'\nimport { formatBytes } from '../storage/storage-labels'\nimport {\n chartModelOf,\n DEFAULT_UNIT_FORMATTERS,\n formatterOf,\n metricValueOf,\n type DrawnChartType,\n type UnitFormatters,\n} from '../../dashboards/chartModel'\nimport { preloadChartRenderer } from '../../dashboards/ChartRenderer'\nimport { PanelView, type PanelBody, type PanelViewLabels } from '../../dashboards/PanelView'\n\n/** The package's formatters: the one \u00A3 formatter for AI usage, and file sizes. */\nexport const PANEL_FORMATTERS: UnitFormatters = {\n ...DEFAULT_UNIT_FORMATTERS,\n gbp: (v) => formatGbp(v),\n bytes: (v) => formatBytes(v),\n}\n\nexport interface DashboardPanelLabels extends PanelViewLabels {\n /** A panel whose source the host does not offer. */\n unknownSource: (id: string) => string\n /** The empty state's link to the databases (where data is created or imported). */\n openDatabases: string\n /** A panel over workspace data (documents, threads\u2026) while no workspace is open. */\n noWorkspace: string\n}\n\nexport const DEFAULT_DASHBOARD_PANEL_LABELS: Partial<DashboardPanelLabels> = {\n unknownSource: (id) => `This panel reads \u201C${id}\u201D, which is not available here.`,\n openDatabases: 'Open databases',\n noWorkspace: 'Open a workspace to see this.',\n}\n\nexport interface DashboardPanelProps {\n panel: PanelSpec\n /** Buttons in the panel's corner (a dashboard being edited). */\n actions?: ReactNode\n /** Don't read data (an editor showing the panel's frame only). */\n enabled?: boolean\n /** `plain`: no card around it (a chart placed in a page). */\n variant?: 'card' | 'plain'\n /** Fit the box it is given (a page's tile): see `PanelView`'s `fit`. */\n fit?: boolean\n formatters?: UnitFormatters\n labels?: Partial<DashboardPanelLabels>\n className?: string\n testId?: string\n}\n\nconst DRAWN = new Set(['bar', 'line', 'area', 'pie', 'donut'])\n\nfunction kindOf(panel: PanelSpec): 'metric' | 'chart' | 'table' {\n return panel.chart.type === 'metric' ? 'metric' : panel.chart.type === 'table' ? 'table' : 'chart'\n}\n\nfunction SourcePanel({\n source,\n panel,\n actions,\n enabled,\n variant,\n fit,\n formatters,\n labels,\n className,\n testId,\n}: DashboardPanelProps & { source: DataSource; labels: Partial<DashboardPanelLabels> }) {\n const environment = useBlocksEnvironment()\n const { chart } = panel\n // A drawn chart fetches its drawing code while its data loads, not after.\n const drawn = DRAWN.has(chart.type) && enabled !== false\n useEffect(() => {\n if (drawn) preloadChartRenderer()\n }, [drawn])\n const { dataset, fields, isLoading, error } = usePanelDataset(\n source,\n panel.source.params,\n chart,\n { enabled }\n )\n const body = useMemo((): PanelBody | undefined => {\n if (!dataset) return undefined\n const other = labels.other\n if (chart.type === 'metric') {\n const valueField = dataset.fields.find((f) => f.id === 'value')\n // Nothing matched: a count or a sum of nothing is 0; an average of nothing has no value.\n const op = chart.aggregate ?? 'count'\n return {\n kind: 'metric',\n value: metricValueOf(dataset) ?? (op === 'count' || op === 'sum' ? 0 : null),\n format: formatterOf(valueField, formatters),\n }\n }\n if (DRAWN.has(chart.type)) {\n return {\n kind: 'chart',\n model: chartModelOf({ ...chart, type: chart.type as DrawnChartType }, dataset, {\n fields,\n formatters,\n otherLabel: other,\n }),\n }\n }\n if (chart.x) {\n return {\n kind: 'groups',\n model: chartModelOf({ ...chart, type: 'bar' }, dataset, {\n fields,\n formatters,\n otherLabel: other,\n }),\n }\n }\n const shown = chart.columns?.length\n ? chart.columns.flatMap((id) => dataset.fields.filter((f) => f.id === id))\n : dataset.fields\n return { kind: 'records', fields: shown, rows: dataset.rows }\n }, [dataset, chart, fields, formatters, labels.other])\n\n const state = error\n ? 'error'\n : !dataset\n ? isLoading\n ? 'loading'\n : 'empty'\n : chart.type !== 'metric' && dataset.rows.length === 0\n ? 'empty'\n : 'ready'\n\n const emptyAction =\n source.id === 'database' && environment.openDatabases ? (\n <Button variant=\"outline\" size=\"sm\" onClick={() => environment.openDatabases?.()}>\n {labels.openDatabases}\n </Button>\n ) : undefined\n\n return (\n <PanelView\n kind={kindOf(panel)}\n title={panel.title}\n description={panel.description}\n state={state}\n body={body}\n errorDetail={error instanceof Error ? error.message : undefined}\n emptyAction={emptyAction}\n actions={actions}\n variant={variant}\n fit={fit}\n formatters={formatters}\n labels={labels}\n className={className}\n testId={testId}\n />\n )\n}\n\nexport function DashboardPanel({\n formatters = PANEL_FORMATTERS,\n labels,\n ...props\n}: DashboardPanelProps) {\n const registry = useDataSources()\n const l = { ...DEFAULT_DASHBOARD_PANEL_LABELS, ...labels }\n const source = registry.get(props.panel.source.id)\n const workspaceId = useArbiSessionState((s) => s.workspaceId)\n const scope =\n typeof source?.scope === 'function'\n ? source.scope(props.panel.source.params ?? {})\n : source?.scope\n if (scope === 'workspace' && !workspaceId) {\n return (\n <PanelView\n kind={kindOf(props.panel)}\n title={props.panel.title}\n state=\"empty\"\n actions={props.actions}\n labels={{ ...l, empty: l.noWorkspace ?? l.empty }}\n variant={props.variant}\n fit={props.fit}\n className={props.className}\n testId={props.testId}\n />\n )\n }\n if (!source) {\n return (\n <PanelView\n kind={kindOf(props.panel)}\n title={props.panel.title}\n state=\"error\"\n errorDetail={l.unknownSource?.(props.panel.source.id)}\n actions={props.actions}\n labels={l}\n fit={props.fit}\n className={props.className}\n testId={props.testId}\n />\n )\n }\n // Keyed by source: a source's hooks differ from another's, so a new source mounts afresh.\n return (\n <SourcePanel key={source.id} source={source} formatters={formatters} labels={l} {...props} />\n )\n}\n"],
5
+ "mappings": ";AAoJM;AA/IN,SAAS,WAAW,eAA+B;AACnD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP,SAAS,cAAc;AACvB,SAAS,4BAA4B;AACrC,SAAS,mBAAmB;AAC5B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP,SAAS,4BAA4B;AACrC,SAAS,iBAAuD;AAGzD,MAAM,mBAAmC;AAAA,EAC9C,GAAG;AAAA,EACH,KAAK,CAAC,MAAM,UAAU,CAAC;AAAA,EACvB,OAAO,CAAC,MAAM,YAAY,CAAC;AAC7B;AAWO,MAAM,iCAAgE;AAAA,EAC3E,eAAe,CAAC,OAAO,0BAAqB,EAAE;AAAA,EAC9C,eAAe;AAAA,EACf,aAAa;AACf;AAkBA,MAAM,QAAQ,oBAAI,IAAI,CAAC,OAAO,QAAQ,QAAQ,OAAO,OAAO,CAAC;AAE7D,SAAS,OAAO,OAAgD;AAC9D,SAAO,MAAM,MAAM,SAAS,WAAW,WAAW,MAAM,MAAM,SAAS,UAAU,UAAU;AAC7F;AAEA,SAAS,YAAY;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAwF;AACtF,QAAM,cAAc,qBAAqB;AACzC,QAAM,EAAE,MAAM,IAAI;AAElB,QAAM,QAAQ,MAAM,IAAI,MAAM,IAAI,KAAK,YAAY;AACnD,YAAU,MAAM;AACd,QAAI,MAAO,sBAAqB;AAAA,EAClC,GAA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AAI,CAAC,QAAQ;AACX,WACE;AAAA,MAAC;AAAA;AAAA,QACC,MAAM,OAAO,MAAM,KAAK;AAAA,QACxB,OAAO,MAAM,MAAM;AAAA,QACnB,OAAM;AAAA,QACN,aAAa,EAAE,gBAAgB,MAAM,MAAM,OAAO,EAAE;AAAA,QACpD,SAAS,MAAM;AAAA,QACf,QAAQ;AAAA,QACR,KAAK,MAAM;AAAA,QACX,WAAW,MAAM;AAAA,QACjB,QAAQ,MAAM;AAAA;AAAA,IAChB;AAAA,EAEJ;AAEA,SACE,oBAAC,eAA4B,QAAgB,YAAwB,QAAQ,GAAI,GAAG,SAAlE,OAAO,EAAkE;AAE/F;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,3 @@
1
1
  export { DashboardPanel, DEFAULT_DASHBOARD_PANEL_LABELS, PANEL_FORMATTERS, type DashboardPanelLabels, type DashboardPanelProps, } from './DashboardPanel';
2
2
  export { DEFAULT_PANEL_EDITOR_LABELS, PanelEditor, type PanelEditorLabels, type PanelEditorProps, } from './PanelEditor';
3
- export { DASHBOARD_TEMPLATES, OVERVIEW_DASHBOARD, newPanel, newPanelId, usagePanels, type UsageMeasure, type UsagePanelParams, } from './templates';
3
+ export { DASHBOARD_TEMPLATES, OVERVIEW_DASHBOARD, newPanel, newPanelId, templatesFor, usagePanels, type PageTemplate, type UsageMeasure, type UsagePanelParams, } from './templates';
@@ -13,6 +13,7 @@ import {
13
13
  OVERVIEW_DASHBOARD,
14
14
  newPanel,
15
15
  newPanelId,
16
+ templatesFor,
16
17
  usagePanels
17
18
  } from "./templates.js";
18
19
  export {
@@ -25,6 +26,7 @@ export {
25
26
  PanelEditor,
26
27
  newPanel,
27
28
  newPanelId,
29
+ templatesFor,
28
30
  usagePanels
29
31
  };
30
32
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/connection/dashboards/index.ts"],
4
- "sourcesContent": ["export {\n DashboardPanel,\n DEFAULT_DASHBOARD_PANEL_LABELS,\n PANEL_FORMATTERS,\n type DashboardPanelLabels,\n type DashboardPanelProps,\n} from './DashboardPanel'\nexport {\n DEFAULT_PANEL_EDITOR_LABELS,\n PanelEditor,\n type PanelEditorLabels,\n type PanelEditorProps,\n} from './PanelEditor'\nexport {\n DASHBOARD_TEMPLATES,\n OVERVIEW_DASHBOARD,\n newPanel,\n newPanelId,\n usagePanels,\n type UsageMeasure,\n type UsagePanelParams,\n} from './templates'\n"],
5
- "mappings": ";AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;",
4
+ "sourcesContent": ["export {\n DashboardPanel,\n DEFAULT_DASHBOARD_PANEL_LABELS,\n PANEL_FORMATTERS,\n type DashboardPanelLabels,\n type DashboardPanelProps,\n} from './DashboardPanel'\nexport {\n DEFAULT_PANEL_EDITOR_LABELS,\n PanelEditor,\n type PanelEditorLabels,\n type PanelEditorProps,\n} from './PanelEditor'\nexport {\n DASHBOARD_TEMPLATES,\n OVERVIEW_DASHBOARD,\n newPanel,\n newPanelId,\n templatesFor,\n usagePanels,\n type PageTemplate,\n type UsageMeasure,\n type UsagePanelParams,\n} from './templates'\n"],
5
+ "mappings": ";AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAIK;",
6
6
  "names": []
7
7
  }
@@ -4,7 +4,12 @@
4
4
  * over the built-in sources and their default words. A site passes its own
5
5
  * (`ConnectedPagesPage templates`), in its words.
6
6
  */
7
- import { type UsageBreakdownKey, type DashboardSpec, type PanelSpec } from '@arbidocs/react';
7
+ import { type UsageBreakdownKey, type DashboardSpec, type PageSpec, type PanelSpec } from '@arbidocs/react';
8
+ /**
9
+ * A starting point for a new page: a dashboard of Analytics panels (laid out in order), or a whole
10
+ * page of blocks as it is (the workspace dashboard's live blocks).
11
+ */
12
+ export type PageTemplate = DashboardSpec | PageSpec;
8
13
  /** A fresh panel id. */
9
14
  export declare function newPanelId(): string;
10
15
  /** A new panel: a bar chart of the documents by type, ready to be changed. */
@@ -35,11 +40,11 @@ export declare function usagePanels(params?: UsagePanelParams): {
35
40
  };
36
41
  export declare const OVERVIEW_DASHBOARD: DashboardSpec;
37
42
  /**
38
- * The templates a host's features allow: one with a panel over the workflows source only while
39
- * the `workflows` feature is on.
43
+ * The templates a host's features allow: one that shows the workflows only while the `workflows`
44
+ * feature is on.
40
45
  */
41
- export declare function templatesFor(templates: readonly DashboardSpec[], features: {
46
+ export declare function templatesFor<T extends PageTemplate>(templates: readonly T[], features: {
42
47
  workflows: boolean;
43
- }): readonly DashboardSpec[];
48
+ }): readonly T[];
44
49
  /** The default templates under "New dashboard", in order (`templatesFor` narrows them). */
45
50
  export declare const DASHBOARD_TEMPLATES: readonly DashboardSpec[];
@@ -322,8 +322,14 @@ const ACTIVITY_DASHBOARD = {
322
322
  )
323
323
  ]
324
324
  };
325
+ function showsWorkflows(template) {
326
+ if ("panels" in template) return template.panels.some((p) => p.source.id === "workflows");
327
+ return template.blocks.some(
328
+ (b) => b.kind === "chart" || b.kind === "metric" ? b.config.source.id === "workflows" : b.kind === "carousel" && b.config.source === "workflows"
329
+ );
330
+ }
325
331
  function templatesFor(templates, features) {
326
- return features.workflows ? templates : templates.filter((t) => !t.panels.some((p) => p.source.id === "workflows"));
332
+ return features.workflows ? templates : templates.filter((t) => !showsWorkflows(t));
327
333
  }
328
334
  const DASHBOARD_TEMPLATES = [
329
335
  OVERVIEW_DASHBOARD,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/connection/dashboards/templates.ts"],
4
- "sourcesContent": ["/**\n * The starting points a new dashboard is offered by default (`DASHBOARD_TEMPLATES`): an overview,\n * then one dashboard per area (documents, tags and facts, workflows, AI usage, recent activity),\n * over the built-in sources and their default words. A site passes its own\n * (`ConnectedPagesPage templates`), in its words.\n */\nimport {\n DEFAULT_ACTIVITY_SOURCE_LABELS,\n type DataSourceParams,\n type UsageBreakdownKey,\n DEFAULT_DOCUMENTS_SOURCE_LABELS,\n DEFAULT_WORKFLOWS_SOURCE_LABELS,\n type ChartSpec,\n type DashboardSpec,\n type PanelSpec,\n} from '@arbidocs/react'\n\n/** A fresh panel id. */\nexport function newPanelId(): string {\n return `pnl-${Math.random().toString(36).slice(2, 10)}`\n}\n\n/** A new panel: a bar chart of the documents by type, ready to be changed. */\nexport function newPanel(): PanelSpec {\n return {\n id: newPanelId(),\n title: 'New panel',\n source: { id: 'documents' },\n chart: { type: 'bar', x: 'type' },\n width: 6,\n }\n}\n\n/** A panel of `source` (with its parameters), `width` columns wide. */\nconst panel = (\n id: string,\n title: string,\n source: string,\n chart: ChartSpec,\n width = 6,\n params?: DataSourceParams\n): PanelSpec => ({\n id,\n title,\n source: params ? { id: source, params } : { id: source },\n chart,\n width,\n})\n\n/** One figure, a quarter of the row by default. */\nconst metric = (\n id: string,\n title: string,\n source: string,\n chart: Omit<ChartSpec, 'type'> = {},\n width = 3,\n params?: DataSourceParams\n): PanelSpec => panel(id, title, source, { type: 'metric', ...chart }, width, params)\n\n/** What the AI usage panels read: one project or every project the user owns; this month or the last. */\nexport interface UsagePanelParams {\n project?: string\n period?: 'current' | 'previous'\n}\n\n/** What a usage breakdown panel measures. */\nexport type UsageMeasure = 'spend' | 'tokens'\n\n/**\n * Most entries a breakdown shows: every one in practice (a project's people, workspaces, models or\n * features), so none is silently left out.\n */\nconst EVERY_ENTRY = 1000\n\n/**\n * The AI usage panels, over the `usage` and `usage-breakdown` sources: the one set the AI usage\n * dashboard and a project's own usage view (`ProjectUsageContent`) both show, so the two cannot\n * drift. `params` scopes them to a project and a period. The totals are the server's\n * (`usage-breakdown` by `total`), so they match the quota and the invoice.\n */\nexport function usagePanels(params: UsagePanelParams = {}) {\n const p: Record<string, string> = {}\n if (params.project) p.project = params.project\n if (params.period === 'previous') p.period = '1'\n const bound = Object.keys(p).length ? p : undefined\n const totals = { ...p, by: 'total' }\n const month = params.period === 'previous' ? 'last month' : 'this month'\n const total = (id: string, title: string, y: string) =>\n metric(id, title, 'usage-breakdown', { aggregate: 'sum', y }, 4, totals)\n return {\n spend: total('ai-spend', `AI credits ${month}`, 'spend'),\n tokens: total('ai-tokens', 'Tokens', 'tokens'),\n requests: total('ai-requests', 'Requests', 'requests'),\n spendByDay: panel(\n 'spend-by-day',\n 'AI credits by day',\n 'usage',\n { type: 'line', x: 'day', bucket: 'day', y: 'spend', aggregate: 'sum' },\n 12,\n bound\n ),\n spendByModel: panel(\n 'usage-by-model',\n 'AI credits by model',\n 'usage',\n {\n type: 'bar',\n x: 'day',\n bucket: 'day',\n series: 'model',\n y: 'spend',\n aggregate: 'sum',\n stacked: true,\n },\n 6,\n bound\n ),\n tokensByModel: panel(\n 'tokens-by-model',\n 'Tokens by model',\n 'usage',\n { type: 'bar', x: 'model', y: 'tokens', aggregate: 'sum', limit: 6 },\n 6,\n bound\n ),\n spendByProject: panel(\n 'spend-by-project',\n 'AI credits by project',\n 'usage',\n { type: 'bar', x: 'project', y: 'spend', aggregate: 'sum' },\n 12,\n bound\n ),\n /** The period's usage by user, workspace, model or feature, in \u00A3 or tokens, every entry. */\n breakdown: (by: UsageBreakdownKey, measure: UsageMeasure = 'spend', width = 6): PanelSpec =>\n panel(\n `${measure === 'tokens' ? 'tokens' : 'usage'}-by-${by}-total`,\n `${measure === 'tokens' ? 'Tokens' : 'AI credits'} by ${by}`,\n 'usage-breakdown',\n { type: 'bar', x: 'name', y: measure, aggregate: 'sum', limit: EVERY_ENTRY },\n width,\n { ...p, by }\n ),\n }\n}\n\nconst USAGE = usagePanels()\n\nconst FAILED_DOCUMENT = DEFAULT_DOCUMENTS_SOURCE_LABELS.statuses.failed\nconst FAILED_RUN = DEFAULT_WORKFLOWS_SOURCE_LABELS.results.failed\nconst WORKFLOW_RUN = DEFAULT_ACTIVITY_SOURCE_LABELS.kinds.workflow_run\n\nconst DOCUMENTS_BY_TYPE = panel('documents-by-type', 'Documents by type', 'documents', {\n type: 'bar',\n x: 'type',\n limit: 8,\n})\nconst DOCUMENTS_BY_STATUS = panel('documents-by-status', 'Documents by status', 'documents', {\n type: 'donut',\n x: 'status',\n})\nconst WORKFLOW_RUNS_BY_DAY = panel(\n 'workflow-runs-by-day',\n 'Workflow runs by day',\n 'activity',\n {\n type: 'bar',\n x: 'when',\n bucket: 'day',\n series: 'status',\n stacked: true,\n filters: [{ field: 'kind', op: 'eq', value: WORKFLOW_RUN }],\n },\n 12\n)\n\nexport const OVERVIEW_DASHBOARD: DashboardSpec = {\n version: 1,\n title: 'Overview',\n description: 'Documents, threads, facts and AI usage at a glance.',\n panels: [\n metric('documents', 'Documents', 'documents'),\n metric('threads', 'Threads', 'conversations'),\n metric('facts', 'Facts', 'facts'),\n { ...USAGE.spend, id: 'ai-usage', width: 3 },\n panel('threads-over-time', 'Threads started', 'conversations', {\n type: 'line',\n x: 'created',\n bucket: 'month',\n }),\n USAGE.spendByModel,\n DOCUMENTS_BY_TYPE,\n DOCUMENTS_BY_STATUS,\n panel(\n 'due',\n 'Due dates',\n 'conversations',\n {\n type: 'table',\n columns: ['title', 'due', 'status', 'owner'],\n filters: [{ field: 'due', op: 'not_empty' }],\n orderBy: { field: 'due' },\n },\n 12\n ),\n ],\n}\n\nconst DOCUMENTS_DASHBOARD: DashboardSpec = {\n version: 1,\n title: 'Documents',\n description: 'What the workspace holds: status, type, folders, who added what, and when.',\n panels: [\n metric('documents', 'Documents', 'documents'),\n metric('pages', 'Pages', 'documents', { aggregate: 'sum', y: 'pages' }),\n metric('size', 'Stored', 'documents', { aggregate: 'sum', y: 'size' }),\n metric('failed', 'Failed to process', 'documents', {\n filters: [{ field: 'status', op: 'eq', value: FAILED_DOCUMENT }],\n }),\n DOCUMENTS_BY_STATUS,\n DOCUMENTS_BY_TYPE,\n panel('documents-added', 'Documents added', 'documents', {\n type: 'line',\n x: 'created',\n bucket: 'month',\n }),\n panel('documents-by-folder', 'Documents by folder', 'documents', {\n type: 'bar',\n x: 'folder',\n limit: 10,\n }),\n panel('documents-by-person', 'Added by', 'documents', { type: 'bar', x: 'createdBy' }),\n panel('documents-by-kind', 'Kinds of document', 'documents', {\n type: 'donut',\n x: 'nature',\n limit: 8,\n }),\n panel(\n 'latest-documents',\n 'Latest documents',\n 'documents',\n {\n type: 'table',\n columns: ['name', 'type', 'status', 'createdBy', 'created'],\n orderBy: { field: 'created', direction: 'desc' },\n limit: 10,\n },\n 12\n ),\n ],\n}\n\nconst TAGS_FACTS_DASHBOARD: DashboardSpec = {\n version: 1,\n title: 'Tags and facts',\n description: 'How the workspace is organised: its tags and what carries them, and its facts.',\n panels: [\n metric('tags', 'Tags', 'tags'),\n metric('facts', 'Facts', 'facts'),\n metric('confirmed-facts', 'Confirmed facts', 'facts', {\n filters: [{ field: 'confirmed', op: 'eq', value: true }],\n }),\n metric('dated-facts', 'Dated facts', 'facts', {\n filters: [{ field: 'date', op: 'not_empty' }],\n }),\n panel('most-used-tags', 'Most used tags', 'tags', {\n type: 'bar',\n x: 'name',\n y: 'documents',\n aggregate: 'sum',\n limit: 10,\n // Tags on no document yet are not \"used\": none at all shows the empty state.\n filters: [{ field: 'documents', op: 'gt', value: 0 }],\n }),\n panel('tags-by-kind', 'Tags by kind', 'tags', { type: 'donut', x: 'kind' }),\n panel('facts-by-tag', 'Facts by tag', 'facts', { type: 'bar', x: 'tags', limit: 10 }),\n panel('facts-added', 'Facts added', 'facts', { type: 'line', x: 'created', bucket: 'month' }),\n panel(\n 'latest-facts',\n 'Latest facts',\n 'facts',\n {\n type: 'table',\n columns: ['text', 'tags', 'date', 'createdBy'],\n orderBy: { field: 'created', direction: 'desc' },\n limit: 10,\n },\n 12\n ),\n ],\n}\n\nconst WORKFLOWS_DASHBOARD: DashboardSpec = {\n version: 1,\n title: 'Workflows',\n description: 'Your workflows: what starts them, how their runs end, and what runs next.',\n panels: [\n metric('workflows', 'Workflows', 'workflows', {}, 4),\n metric(\n 'workflows-on',\n 'Switched on',\n 'workflows',\n {\n filters: [{ field: 'active', op: 'eq', value: true }],\n },\n 4\n ),\n metric(\n 'workflows-failed',\n 'Last run failed',\n 'workflows',\n {\n filters: [{ field: 'lastResult', op: 'eq', value: FAILED_RUN }],\n },\n 4\n ),\n panel('workflows-by-result', 'Last run result', 'workflows', {\n type: 'donut',\n x: 'lastResult',\n }),\n panel('workflows-by-trigger', 'What starts them', 'workflows', { type: 'bar', x: 'trigger' }),\n WORKFLOW_RUNS_BY_DAY,\n panel(\n 'next-runs',\n 'Next runs',\n 'workflows',\n {\n type: 'table',\n columns: ['name', 'trigger', 'nextRun', 'lastResult'],\n filters: [{ field: 'nextRun', op: 'not_empty' }],\n orderBy: { field: 'nextRun' },\n limit: 10,\n },\n 12\n ),\n ],\n}\n\nconst AI_USAGE_DASHBOARD: DashboardSpec = {\n version: 1,\n title: 'AI usage',\n description:\n 'What the AI has done and cost this period, by day, model, project, user and workspace.',\n panels: [\n USAGE.spend,\n USAGE.tokens,\n USAGE.requests,\n USAGE.spendByDay,\n USAGE.spendByModel,\n USAGE.tokensByModel,\n USAGE.breakdown('user'),\n USAGE.breakdown('workspace'),\n USAGE.spendByProject,\n ],\n}\n\nconst ACTIVITY_DASHBOARD: DashboardSpec = {\n version: 1,\n title: 'Recent activity',\n description: 'The latest activity in the workspace: who did what, where, and when.',\n panels: [\n panel(\n 'activity-by-day',\n 'Activity by day',\n 'activity',\n { type: 'bar', x: 'when', bucket: 'day', series: 'area', stacked: true },\n 12\n ),\n panel('activity-by-area', 'Activity by area', 'activity', { type: 'donut', x: 'area' }),\n panel('activity-by-person', 'Activity by person', 'activity', {\n type: 'bar',\n x: 'person',\n limit: 10,\n }),\n WORKFLOW_RUNS_BY_DAY,\n panel(\n 'latest-activity',\n 'Latest activity',\n 'activity',\n {\n type: 'table',\n columns: ['when', 'person', 'kind', 'item', 'status'],\n orderBy: { field: 'when', direction: 'desc' },\n limit: 15,\n },\n 12\n ),\n ],\n}\n\n/**\n * The templates a host's features allow: one with a panel over the workflows source only while\n * the `workflows` feature is on.\n */\nexport function templatesFor(\n templates: readonly DashboardSpec[],\n features: { workflows: boolean }\n): readonly DashboardSpec[] {\n return features.workflows\n ? templates\n : templates.filter((t) => !t.panels.some((p) => p.source.id === 'workflows'))\n}\n\n/** The default templates under \"New dashboard\", in order (`templatesFor` narrows them). */\nexport const DASHBOARD_TEMPLATES: readonly DashboardSpec[] = [\n OVERVIEW_DASHBOARD,\n DOCUMENTS_DASHBOARD,\n TAGS_FACTS_DASHBOARD,\n WORKFLOWS_DASHBOARD,\n AI_USAGE_DASHBOARD,\n ACTIVITY_DASHBOARD,\n]\n"],
5
- "mappings": ";AAMA;AAAA,EACE;AAAA,EAGA;AAAA,EACA;AAAA,OAIK;AAGA,SAAS,aAAqB;AACnC,SAAO,OAAO,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,MAAM,GAAG,EAAE,CAAC;AACvD;AAGO,SAAS,WAAsB;AACpC,SAAO;AAAA,IACL,IAAI,WAAW;AAAA,IACf,OAAO;AAAA,IACP,QAAQ,EAAE,IAAI,YAAY;AAAA,IAC1B,OAAO,EAAE,MAAM,OAAO,GAAG,OAAO;AAAA,IAChC,OAAO;AAAA,EACT;AACF;AAGA,MAAM,QAAQ,CACZ,IACA,OACA,QACA,OACA,QAAQ,GACR,YACe;AAAA,EACf;AAAA,EACA;AAAA,EACA,QAAQ,SAAS,EAAE,IAAI,QAAQ,OAAO,IAAI,EAAE,IAAI,OAAO;AAAA,EACvD;AAAA,EACA;AACF;AAGA,MAAM,SAAS,CACb,IACA,OACA,QACA,QAAiC,CAAC,GAClC,QAAQ,GACR,WACc,MAAM,IAAI,OAAO,QAAQ,EAAE,MAAM,UAAU,GAAG,MAAM,GAAG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;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM,UAAU,MAAM;AAAA,IACtB,MAAM,UAAU,WAAW;AAAA,IAC3B,MAAM;AAAA,EACR;AACF;AAEA,MAAM,qBAAoC;AAAA,EACxC,SAAS;AAAA,EACT,OAAO;AAAA,EACP,aAAa;AAAA,EACb,QAAQ;AAAA,IACN;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA,EAAE,MAAM,OAAO,GAAG,QAAQ,QAAQ,OAAO,QAAQ,QAAQ,SAAS,KAAK;AAAA,MACvE;AAAA,IACF;AAAA,IACA,MAAM,oBAAoB,oBAAoB,YAAY,EAAE,MAAM,SAAS,GAAG,OAAO,CAAC;AAAA,IACtF,MAAM,sBAAsB,sBAAsB,YAAY;AAAA,MAC5D,MAAM;AAAA,MACN,GAAG;AAAA,MACH,OAAO;AAAA,IACT,CAAC;AAAA,IACD;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,QACE,MAAM;AAAA,QACN,SAAS,CAAC,QAAQ,UAAU,QAAQ,QAAQ,QAAQ;AAAA,QACpD,SAAS,EAAE,OAAO,QAAQ,WAAW,OAAO;AAAA,QAC5C,OAAO;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;AAMO,SAAS,aACd,WACA,UAC0B;AAC1B,SAAO,SAAS,YACZ,YACA,UAAU,OAAO,CAAC,MAAM,CAAC,EAAE,OAAO,KAAK,CAAC,MAAM,EAAE,OAAO,OAAO,WAAW,CAAC;AAChF;AAGO,MAAM,sBAAgD;AAAA,EAC3D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;",
4
+ "sourcesContent": ["/**\n * The starting points a new dashboard is offered by default (`DASHBOARD_TEMPLATES`): an overview,\n * then one dashboard per area (documents, tags and facts, workflows, AI usage, recent activity),\n * over the built-in sources and their default words. A site passes its own\n * (`ConnectedPagesPage templates`), in its words.\n */\nimport {\n DEFAULT_ACTIVITY_SOURCE_LABELS,\n type DataSourceParams,\n type UsageBreakdownKey,\n DEFAULT_DOCUMENTS_SOURCE_LABELS,\n DEFAULT_WORKFLOWS_SOURCE_LABELS,\n type ChartSpec,\n type DashboardSpec,\n type PageSpec,\n type PanelSpec,\n} from '@arbidocs/react'\n\n/**\n * A starting point for a new page: a dashboard of Analytics panels (laid out in order), or a whole\n * page of blocks as it is (the workspace dashboard's live blocks).\n */\nexport type PageTemplate = DashboardSpec | PageSpec\n\n/** A fresh panel id. */\nexport function newPanelId(): string {\n return `pnl-${Math.random().toString(36).slice(2, 10)}`\n}\n\n/** A new panel: a bar chart of the documents by type, ready to be changed. */\nexport function newPanel(): PanelSpec {\n return {\n id: newPanelId(),\n title: 'New panel',\n source: { id: 'documents' },\n chart: { type: 'bar', x: 'type' },\n width: 6,\n }\n}\n\n/** A panel of `source` (with its parameters), `width` columns wide. */\nconst panel = (\n id: string,\n title: string,\n source: string,\n chart: ChartSpec,\n width = 6,\n params?: DataSourceParams\n): PanelSpec => ({\n id,\n title,\n source: params ? { id: source, params } : { id: source },\n chart,\n width,\n})\n\n/** One figure, a quarter of the row by default. */\nconst metric = (\n id: string,\n title: string,\n source: string,\n chart: Omit<ChartSpec, 'type'> = {},\n width = 3,\n params?: DataSourceParams\n): PanelSpec => panel(id, title, source, { type: 'metric', ...chart }, width, params)\n\n/** What the AI usage panels read: one project or every project the user owns; this month or the last. */\nexport interface UsagePanelParams {\n project?: string\n period?: 'current' | 'previous'\n}\n\n/** What a usage breakdown panel measures. */\nexport type UsageMeasure = 'spend' | 'tokens'\n\n/**\n * Most entries a breakdown shows: every one in practice (a project's people, workspaces, models or\n * features), so none is silently left out.\n */\nconst EVERY_ENTRY = 1000\n\n/**\n * The AI usage panels, over the `usage` and `usage-breakdown` sources: the one set the AI usage\n * dashboard and a project's own usage view (`ProjectUsageContent`) both show, so the two cannot\n * drift. `params` scopes them to a project and a period. The totals are the server's\n * (`usage-breakdown` by `total`), so they match the quota and the invoice.\n */\nexport function usagePanels(params: UsagePanelParams = {}) {\n const p: Record<string, string> = {}\n if (params.project) p.project = params.project\n if (params.period === 'previous') p.period = '1'\n const bound = Object.keys(p).length ? p : undefined\n const totals = { ...p, by: 'total' }\n const month = params.period === 'previous' ? 'last month' : 'this month'\n const total = (id: string, title: string, y: string) =>\n metric(id, title, 'usage-breakdown', { aggregate: 'sum', y }, 4, totals)\n return {\n spend: total('ai-spend', `AI credits ${month}`, 'spend'),\n tokens: total('ai-tokens', 'Tokens', 'tokens'),\n requests: total('ai-requests', 'Requests', 'requests'),\n spendByDay: panel(\n 'spend-by-day',\n 'AI credits by day',\n 'usage',\n { type: 'line', x: 'day', bucket: 'day', y: 'spend', aggregate: 'sum' },\n 12,\n bound\n ),\n spendByModel: panel(\n 'usage-by-model',\n 'AI credits by model',\n 'usage',\n {\n type: 'bar',\n x: 'day',\n bucket: 'day',\n series: 'model',\n y: 'spend',\n aggregate: 'sum',\n stacked: true,\n },\n 6,\n bound\n ),\n tokensByModel: panel(\n 'tokens-by-model',\n 'Tokens by model',\n 'usage',\n { type: 'bar', x: 'model', y: 'tokens', aggregate: 'sum', limit: 6 },\n 6,\n bound\n ),\n spendByProject: panel(\n 'spend-by-project',\n 'AI credits by project',\n 'usage',\n { type: 'bar', x: 'project', y: 'spend', aggregate: 'sum' },\n 12,\n bound\n ),\n /** The period's usage by user, workspace, model or feature, in \u00A3 or tokens, every entry. */\n breakdown: (by: UsageBreakdownKey, measure: UsageMeasure = 'spend', width = 6): PanelSpec =>\n panel(\n `${measure === 'tokens' ? 'tokens' : 'usage'}-by-${by}-total`,\n `${measure === 'tokens' ? 'Tokens' : 'AI credits'} by ${by}`,\n 'usage-breakdown',\n { type: 'bar', x: 'name', y: measure, aggregate: 'sum', limit: EVERY_ENTRY },\n width,\n { ...p, by }\n ),\n }\n}\n\nconst USAGE = usagePanels()\n\nconst FAILED_DOCUMENT = DEFAULT_DOCUMENTS_SOURCE_LABELS.statuses.failed\nconst FAILED_RUN = DEFAULT_WORKFLOWS_SOURCE_LABELS.results.failed\nconst WORKFLOW_RUN = DEFAULT_ACTIVITY_SOURCE_LABELS.kinds.workflow_run\n\nconst DOCUMENTS_BY_TYPE = panel('documents-by-type', 'Documents by type', 'documents', {\n type: 'bar',\n x: 'type',\n limit: 8,\n})\nconst DOCUMENTS_BY_STATUS = panel('documents-by-status', 'Documents by status', 'documents', {\n type: 'donut',\n x: 'status',\n})\nconst WORKFLOW_RUNS_BY_DAY = panel(\n 'workflow-runs-by-day',\n 'Workflow runs by day',\n 'activity',\n {\n type: 'bar',\n x: 'when',\n bucket: 'day',\n series: 'status',\n stacked: true,\n filters: [{ field: 'kind', op: 'eq', value: WORKFLOW_RUN }],\n },\n 12\n)\n\nexport const OVERVIEW_DASHBOARD: DashboardSpec = {\n version: 1,\n title: 'Overview',\n description: 'Documents, threads, facts and AI usage at a glance.',\n panels: [\n metric('documents', 'Documents', 'documents'),\n metric('threads', 'Threads', 'conversations'),\n metric('facts', 'Facts', 'facts'),\n { ...USAGE.spend, id: 'ai-usage', width: 3 },\n panel('threads-over-time', 'Threads started', 'conversations', {\n type: 'line',\n x: 'created',\n bucket: 'month',\n }),\n USAGE.spendByModel,\n DOCUMENTS_BY_TYPE,\n DOCUMENTS_BY_STATUS,\n panel(\n 'due',\n 'Due dates',\n 'conversations',\n {\n type: 'table',\n columns: ['title', 'due', 'status', 'owner'],\n filters: [{ field: 'due', op: 'not_empty' }],\n orderBy: { field: 'due' },\n },\n 12\n ),\n ],\n}\n\nconst DOCUMENTS_DASHBOARD: DashboardSpec = {\n version: 1,\n title: 'Documents',\n description: 'What the workspace holds: status, type, folders, who added what, and when.',\n panels: [\n metric('documents', 'Documents', 'documents'),\n metric('pages', 'Pages', 'documents', { aggregate: 'sum', y: 'pages' }),\n metric('size', 'Stored', 'documents', { aggregate: 'sum', y: 'size' }),\n metric('failed', 'Failed to process', 'documents', {\n filters: [{ field: 'status', op: 'eq', value: FAILED_DOCUMENT }],\n }),\n DOCUMENTS_BY_STATUS,\n DOCUMENTS_BY_TYPE,\n panel('documents-added', 'Documents added', 'documents', {\n type: 'line',\n x: 'created',\n bucket: 'month',\n }),\n panel('documents-by-folder', 'Documents by folder', 'documents', {\n type: 'bar',\n x: 'folder',\n limit: 10,\n }),\n panel('documents-by-person', 'Added by', 'documents', { type: 'bar', x: 'createdBy' }),\n panel('documents-by-kind', 'Kinds of document', 'documents', {\n type: 'donut',\n x: 'nature',\n limit: 8,\n }),\n panel(\n 'latest-documents',\n 'Latest documents',\n 'documents',\n {\n type: 'table',\n columns: ['name', 'type', 'status', 'createdBy', 'created'],\n orderBy: { field: 'created', direction: 'desc' },\n limit: 10,\n },\n 12\n ),\n ],\n}\n\nconst TAGS_FACTS_DASHBOARD: DashboardSpec = {\n version: 1,\n title: 'Tags and facts',\n description: 'How the workspace is organised: its tags and what carries them, and its facts.',\n panels: [\n metric('tags', 'Tags', 'tags'),\n metric('facts', 'Facts', 'facts'),\n metric('confirmed-facts', 'Confirmed facts', 'facts', {\n filters: [{ field: 'confirmed', op: 'eq', value: true }],\n }),\n metric('dated-facts', 'Dated facts', 'facts', {\n filters: [{ field: 'date', op: 'not_empty' }],\n }),\n panel('most-used-tags', 'Most used tags', 'tags', {\n type: 'bar',\n x: 'name',\n y: 'documents',\n aggregate: 'sum',\n limit: 10,\n // Tags on no document yet are not \"used\": none at all shows the empty state.\n filters: [{ field: 'documents', op: 'gt', value: 0 }],\n }),\n panel('tags-by-kind', 'Tags by kind', 'tags', { type: 'donut', x: 'kind' }),\n panel('facts-by-tag', 'Facts by tag', 'facts', { type: 'bar', x: 'tags', limit: 10 }),\n panel('facts-added', 'Facts added', 'facts', { type: 'line', x: 'created', bucket: 'month' }),\n panel(\n 'latest-facts',\n 'Latest facts',\n 'facts',\n {\n type: 'table',\n columns: ['text', 'tags', 'date', 'createdBy'],\n orderBy: { field: 'created', direction: 'desc' },\n limit: 10,\n },\n 12\n ),\n ],\n}\n\nconst WORKFLOWS_DASHBOARD: DashboardSpec = {\n version: 1,\n title: 'Workflows',\n description: 'Your workflows: what starts them, how their runs end, and what runs next.',\n panels: [\n metric('workflows', 'Workflows', 'workflows', {}, 4),\n metric(\n 'workflows-on',\n 'Switched on',\n 'workflows',\n {\n filters: [{ field: 'active', op: 'eq', value: true }],\n },\n 4\n ),\n metric(\n 'workflows-failed',\n 'Last run failed',\n 'workflows',\n {\n filters: [{ field: 'lastResult', op: 'eq', value: FAILED_RUN }],\n },\n 4\n ),\n panel('workflows-by-result', 'Last run result', 'workflows', {\n type: 'donut',\n x: 'lastResult',\n }),\n panel('workflows-by-trigger', 'What starts them', 'workflows', { type: 'bar', x: 'trigger' }),\n WORKFLOW_RUNS_BY_DAY,\n panel(\n 'next-runs',\n 'Next runs',\n 'workflows',\n {\n type: 'table',\n columns: ['name', 'trigger', 'nextRun', 'lastResult'],\n filters: [{ field: 'nextRun', op: 'not_empty' }],\n orderBy: { field: 'nextRun' },\n limit: 10,\n },\n 12\n ),\n ],\n}\n\nconst AI_USAGE_DASHBOARD: DashboardSpec = {\n version: 1,\n title: 'AI usage',\n description:\n 'What the AI has done and cost this period, by day, model, project, user and workspace.',\n panels: [\n USAGE.spend,\n USAGE.tokens,\n USAGE.requests,\n USAGE.spendByDay,\n USAGE.spendByModel,\n USAGE.tokensByModel,\n USAGE.breakdown('user'),\n USAGE.breakdown('workspace'),\n USAGE.spendByProject,\n ],\n}\n\nconst ACTIVITY_DASHBOARD: DashboardSpec = {\n version: 1,\n title: 'Recent activity',\n description: 'The latest activity in the workspace: who did what, where, and when.',\n panels: [\n panel(\n 'activity-by-day',\n 'Activity by day',\n 'activity',\n { type: 'bar', x: 'when', bucket: 'day', series: 'area', stacked: true },\n 12\n ),\n panel('activity-by-area', 'Activity by area', 'activity', { type: 'donut', x: 'area' }),\n panel('activity-by-person', 'Activity by person', 'activity', {\n type: 'bar',\n x: 'person',\n limit: 10,\n }),\n WORKFLOW_RUNS_BY_DAY,\n panel(\n 'latest-activity',\n 'Latest activity',\n 'activity',\n {\n type: 'table',\n columns: ['when', 'person', 'kind', 'item', 'status'],\n orderBy: { field: 'when', direction: 'desc' },\n limit: 15,\n },\n 12\n ),\n ],\n}\n\n/** Does a template show the workflows (a panel over their source, or a carousel of them)? */\nfunction showsWorkflows(template: PageTemplate): boolean {\n if ('panels' in template) return template.panels.some((p) => p.source.id === 'workflows')\n return template.blocks.some((b) =>\n b.kind === 'chart' || b.kind === 'metric'\n ? b.config.source.id === 'workflows'\n : b.kind === 'carousel' && b.config.source === 'workflows'\n )\n}\n\n/**\n * The templates a host's features allow: one that shows the workflows only while the `workflows`\n * feature is on.\n */\nexport function templatesFor<T extends PageTemplate>(\n templates: readonly T[],\n features: { workflows: boolean }\n): readonly T[] {\n return features.workflows ? templates : templates.filter((t) => !showsWorkflows(t))\n}\n\n/** The default templates under \"New dashboard\", in order (`templatesFor` narrows them). */\nexport const DASHBOARD_TEMPLATES: readonly DashboardSpec[] = [\n OVERVIEW_DASHBOARD,\n DOCUMENTS_DASHBOARD,\n TAGS_FACTS_DASHBOARD,\n WORKFLOWS_DASHBOARD,\n AI_USAGE_DASHBOARD,\n ACTIVITY_DASHBOARD,\n]\n"],
5
+ "mappings": ";AAMA;AAAA,EACE;AAAA,EAGA;AAAA,EACA;AAAA,OAKK;AASA,SAAS,aAAqB;AACnC,SAAO,OAAO,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,MAAM,GAAG,EAAE,CAAC;AACvD;AAGO,SAAS,WAAsB;AACpC,SAAO;AAAA,IACL,IAAI,WAAW;AAAA,IACf,OAAO;AAAA,IACP,QAAQ,EAAE,IAAI,YAAY;AAAA,IAC1B,OAAO,EAAE,MAAM,OAAO,GAAG,OAAO;AAAA,IAChC,OAAO;AAAA,EACT;AACF;AAGA,MAAM,QAAQ,CACZ,IACA,OACA,QACA,OACA,QAAQ,GACR,YACe;AAAA,EACf;AAAA,EACA;AAAA,EACA,QAAQ,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AAW,EAAE,SAAS,WAC7B,EAAE,OAAO,OAAO,OAAO,cACvB,EAAE,SAAS,cAAc,EAAE,OAAO,WAAW;AAAA,EACnD;AACF;AAMO,SAAS,aACd,WACA,UACc;AACd,SAAO,SAAS,YAAY,YAAY,UAAU,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;AACpF;AAGO,MAAM,sBAAgD;AAAA,EAC3D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * `ConnectedAgendaBlock`: the viewer's next calendar events ("Schedule call" above them), each
3
+ * opening in the calendar: the workspace home's agenda as a page block. It reads the viewer's own
4
+ * calendar, so on a shared page every member sees theirs.
5
+ */
6
+ import type { AgendaBlockConfig } from '@arbidocs/react';
7
+ export interface ConnectedAgendaBlockProps {
8
+ config: AgendaBlockConfig;
9
+ /** Merged over the agenda's own frame (a bordered box): a page's card passes `border-0 p-0`. */
10
+ className?: string;
11
+ testId?: string;
12
+ }
13
+ export declare function ConnectedAgendaBlock({ config, className, testId }: ConnectedAgendaBlockProps): import("react").JSX.Element;
@@ -0,0 +1,19 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { DashboardAgenda } from "./DashboardAgenda.js";
4
+ import { LiveBlockRoot } from "./LiveBlockRoot.js";
5
+ function ConnectedAgendaBlock({ config, className, testId }) {
6
+ return /* @__PURE__ */ jsx(LiveBlockRoot, { kind: "agenda", children: /* @__PURE__ */ jsx(
7
+ DashboardAgenda,
8
+ {
9
+ days: config.days,
10
+ limit: config.limit,
11
+ className,
12
+ testId
13
+ }
14
+ ) });
15
+ }
16
+ export {
17
+ ConnectedAgendaBlock
18
+ };
19
+ //# sourceMappingURL=ConnectedAgendaBlock.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/connection/live-blocks/ConnectedAgendaBlock.tsx"],
4
+ "sourcesContent": ["/**\n * `ConnectedAgendaBlock`: the viewer's next calendar events (\"Schedule call\" above them), each\n * opening in the calendar: the workspace home's agenda as a page block. It reads the viewer's own\n * calendar, so on a shared page every member sees theirs.\n */\nimport type { AgendaBlockConfig } from '@arbidocs/react'\nimport { DashboardAgenda } from './DashboardAgenda'\nimport { LiveBlockRoot } from './LiveBlockRoot'\n\nexport interface ConnectedAgendaBlockProps {\n config: AgendaBlockConfig\n /** Merged over the agenda's own frame (a bordered box): a page's card passes `border-0 p-0`. */\n className?: string\n testId?: string\n}\n\nexport function ConnectedAgendaBlock({ config, className, testId }: ConnectedAgendaBlockProps) {\n return (\n <LiveBlockRoot kind=\"agenda\">\n <DashboardAgenda\n days={config.days}\n limit={config.limit}\n className={className}\n testId={testId}\n />\n </LiveBlockRoot>\n )\n}\n"],
5
+ "mappings": ";AAmBM;AAbN,SAAS,uBAAuB;AAChC,SAAS,qBAAqB;AASvB,SAAS,qBAAqB,EAAE,QAAQ,WAAW,OAAO,GAA8B;AAC7F,SACE,oBAAC,iBAAc,MAAK,UAClB;AAAA,IAAC;AAAA;AAAA,MACC,MAAM,OAAO;AAAA,MACb,OAAO,OAAO;AAAA,MACd;AAAA,MACA;AAAA;AAAA,EACF,GACF;AAEJ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,7 @@
1
+ import { type CarouselBlockConfig } from '@arbidocs/react';
2
+ export interface ConnectedCarouselBlockProps {
3
+ config: CarouselBlockConfig;
4
+ /** Root test id; cards are `${testId}-card-<id>`, the empty state `${testId}-empty-action`. */
5
+ testId?: string;
6
+ }
7
+ export declare function ConnectedCarouselBlock({ config, testId }: ConnectedCarouselBlockProps): import("react").JSX.Element;