@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
@@ -0,0 +1,271 @@
1
+ "use client";
2
+ 'use strict';
3
+
4
+ var chunkSLCH5JRI_cjs = require('./chunk-SLCH5JRI.cjs');
5
+ var chunkYA6GXWC2_cjs = require('./chunk-YA6GXWC2.cjs');
6
+ var chunkPLIF5CUV_cjs = require('./chunk-PLIF5CUV.cjs');
7
+ var ui = require('@arbidocs/react/ui');
8
+ var jsxRuntime = require('react/jsx-runtime');
9
+
10
+ var DASHBOARD_QUIET_ACTION_CLASS = "h-8 gap-1.5 px-2 text-sm bg-transparent text-muted-foreground hover:bg-muted hover:text-foreground pointer-coarse:h-11";
11
+ function DashboardRoot({
12
+ testId,
13
+ className,
14
+ children
15
+ }) {
16
+ return /* @__PURE__ */ jsxRuntime.jsx(
17
+ "div",
18
+ {
19
+ "data-slot": "dashboard",
20
+ "data-testid": testId,
21
+ className: ui.cn("flex flex-col gap-6", className),
22
+ children
23
+ }
24
+ );
25
+ }
26
+ function DashboardBand({
27
+ kind,
28
+ children
29
+ }) {
30
+ return /* @__PURE__ */ jsxRuntime.jsx(
31
+ "div",
32
+ {
33
+ "data-slot": "dashboard-band",
34
+ "data-kind": kind,
35
+ className: kind === "start" ? "mt-2" : "mt-4 flex flex-col gap-3",
36
+ children
37
+ }
38
+ );
39
+ }
40
+ function DashboardColumns({ children }) {
41
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "dashboard-columns", className: "grid gap-8 @2xl:grid-cols-2", children });
42
+ }
43
+ function FactMark() {
44
+ return /* @__PURE__ */ jsxRuntime.jsx(
45
+ "span",
46
+ {
47
+ "data-slot": "fact-mark",
48
+ className: "mx-1 size-1.5 shrink-0 rounded-full bg-muted-foreground/40",
49
+ "aria-hidden": true
50
+ }
51
+ );
52
+ }
53
+ function DashboardAction({ emphasis, icon, label, onClick, testId }) {
54
+ return /* @__PURE__ */ jsxRuntime.jsxs(
55
+ ui.Button,
56
+ {
57
+ variant: emphasis === "primary" ? "default" : "ghost",
58
+ size: "sm",
59
+ className: emphasis === "primary" ? "h-8 gap-1.5 px-3 text-sm pointer-coarse:h-11" : DASHBOARD_QUIET_ACTION_CLASS,
60
+ onClick,
61
+ "data-testid": testId,
62
+ children: [
63
+ icon,
64
+ label
65
+ ]
66
+ }
67
+ );
68
+ }
69
+ function FactsStrip({
70
+ icon,
71
+ title,
72
+ count,
73
+ onOpen,
74
+ action,
75
+ groups,
76
+ empty,
77
+ loading = false,
78
+ className,
79
+ testId
80
+ }) {
81
+ const filled = groups.filter((g) => g.rows.length > 0);
82
+ return /* @__PURE__ */ jsxRuntime.jsxs(
83
+ "section",
84
+ {
85
+ className: ui.cn("flex min-w-0 flex-col gap-1", className),
86
+ "data-slot": "facts-strip",
87
+ "data-testid": testId,
88
+ children: [
89
+ /* @__PURE__ */ jsxRuntime.jsx(
90
+ chunkSLCH5JRI_cjs.SectionHeader,
91
+ {
92
+ icon,
93
+ title,
94
+ count,
95
+ onOpen,
96
+ openTestId: testId && `${testId}-open`,
97
+ action
98
+ }
99
+ ),
100
+ filled.length === 0 && loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkSLCH5JRI_cjs.LoadingRows, { testId: testId && `${testId}-loading` }) : filled.length === 0 ? empty && /* @__PURE__ */ jsxRuntime.jsx(
101
+ chunkSLCH5JRI_cjs.EmptyStrip,
102
+ {
103
+ icon: empty.icon,
104
+ label: empty.label,
105
+ description: empty.description,
106
+ onSelect: empty.onSelect,
107
+ testId: empty.testId
108
+ }
109
+ ) : filled.map((group) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
110
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-3 pb-1 pt-1 text-right text-xs text-muted-foreground", children: group.caption }),
111
+ /* @__PURE__ */ jsxRuntime.jsx("ul", { children: group.rows.map((row) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsxs(
112
+ "button",
113
+ {
114
+ type: "button",
115
+ onClick: row.onSelect,
116
+ disabled: !row.onSelect,
117
+ title: row.title,
118
+ className: "flex w-full min-w-0 items-center gap-3 rounded-md px-3 py-2 text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring [&:hover]:bg-muted pointer-coarse:min-h-11",
119
+ "data-testid": group.rowTestId ?? (testId && `${testId}-row`),
120
+ children: [
121
+ row.leading,
122
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1 truncate text-sm text-foreground", children: row.title }),
123
+ row.time && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-xs tabular-nums text-muted-foreground", children: row.time })
124
+ ]
125
+ }
126
+ ) }, row.id)) })
127
+ ] }, group.caption))
128
+ ]
129
+ }
130
+ );
131
+ }
132
+ function RecentList({
133
+ icon,
134
+ title,
135
+ count,
136
+ onOpen,
137
+ openHref,
138
+ action,
139
+ rows,
140
+ caption,
141
+ empty,
142
+ loading = false,
143
+ className,
144
+ testId
145
+ }) {
146
+ return /* @__PURE__ */ jsxRuntime.jsxs(
147
+ "section",
148
+ {
149
+ className: ui.cn("flex min-w-0 flex-col gap-1", className),
150
+ "data-slot": "recent-list",
151
+ "data-testid": testId,
152
+ children: [
153
+ /* @__PURE__ */ jsxRuntime.jsx(
154
+ chunkSLCH5JRI_cjs.SectionHeader,
155
+ {
156
+ icon,
157
+ title,
158
+ count,
159
+ onOpen,
160
+ openHref,
161
+ openTestId: testId && `${testId}-open`,
162
+ action
163
+ }
164
+ ),
165
+ rows.length === 0 && loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkSLCH5JRI_cjs.LoadingRows, { testId: testId && `${testId}-loading` }) : rows.length === 0 ? empty?.onSelect ? /* @__PURE__ */ jsxRuntime.jsx(
166
+ chunkSLCH5JRI_cjs.EmptyStrip,
167
+ {
168
+ icon: empty.icon,
169
+ label: empty.label,
170
+ description: empty.description,
171
+ onSelect: empty.onSelect,
172
+ testId: testId && `${testId}-empty-action`
173
+ }
174
+ ) : /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-1 py-3 text-sm text-muted-foreground", children: empty?.description ?? empty?.label }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
175
+ caption && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "sr-only", "data-testid": testId && `${testId}-caption`, children: caption }),
176
+ /* @__PURE__ */ jsxRuntime.jsx("ul", { children: rows.map((row) => /* @__PURE__ */ jsxRuntime.jsxs(
177
+ "li",
178
+ {
179
+ className: "relative flex items-center rounded-md transition-colors [&:hover]:bg-muted has-[:focus-visible]:bg-muted",
180
+ "data-slot": "recent-row",
181
+ children: [
182
+ /* @__PURE__ */ jsxRuntime.jsxs(
183
+ chunkYA6GXWC2_cjs.ActionLink,
184
+ {
185
+ href: row.href,
186
+ onSelect: row.onSelect,
187
+ title: row.title,
188
+ className: ui.cn(
189
+ "flex min-w-0 flex-1 items-start gap-3 rounded-md px-3 py-2 text-left focus-visible:outline-none",
190
+ row.onSelect && "cursor-pointer",
191
+ "pointer-coarse:min-h-11"
192
+ ),
193
+ "data-testid": testId && `${testId}-row`,
194
+ children: [
195
+ row.leading,
196
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
197
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-baseline gap-2", children: [
198
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1 truncate text-sm font-medium text-foreground", children: row.title }),
199
+ !row.trailing && row.time && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-xs tabular-nums text-muted-foreground", children: row.time })
200
+ ] }),
201
+ row.subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-0.5 truncate text-xs text-muted-foreground", children: row.subtitle })
202
+ ] })
203
+ ]
204
+ }
205
+ ),
206
+ row.trailing ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0 pr-3", children: row.trailing }) : null
207
+ ]
208
+ },
209
+ row.id
210
+ )) })
211
+ ] })
212
+ ]
213
+ }
214
+ );
215
+ }
216
+ function ActionMenuDialog({
217
+ open,
218
+ onOpenChange,
219
+ icon,
220
+ title,
221
+ description,
222
+ items,
223
+ onPick,
224
+ testId,
225
+ itemTestId
226
+ }) {
227
+ return /* @__PURE__ */ jsxRuntime.jsx(ui.Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(
228
+ ui.DialogContent,
229
+ {
230
+ presentation: "sheet",
231
+ className: "sm:max-w-lg",
232
+ "data-testid": chunkPLIF5CUV_cjs.testIdOr(testId, { testId: "action-menu-dialog" }),
233
+ children: [
234
+ /* @__PURE__ */ jsxRuntime.jsx(chunkSLCH5JRI_cjs.QuickActionDialogHeader, { icon, title, description }),
235
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 gap-3 pt-1", role: "menu", "aria-label": title, children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(
236
+ "button",
237
+ {
238
+ type: "button",
239
+ role: "menuitem",
240
+ onClick: () => onPick(item.id),
241
+ "data-testid": chunkPLIF5CUV_cjs.prefixedTestId(itemTestId, item.id, {
242
+ testId: `action-menu-item-${item.id}`
243
+ }),
244
+ className: ui.cn(
245
+ "flex min-h-32 flex-col items-center justify-center gap-2 rounded-lg border border-border bg-card p-3 text-center transition-colors",
246
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring [&:hover]:border-primary [&:hover]:bg-muted"
247
+ ),
248
+ children: [
249
+ item.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: item.icon }),
250
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-foreground", children: item.label }),
251
+ item.description && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children: item.description })
252
+ ]
253
+ },
254
+ item.id
255
+ )) })
256
+ ]
257
+ }
258
+ ) });
259
+ }
260
+
261
+ exports.ActionMenuDialog = ActionMenuDialog;
262
+ exports.DASHBOARD_QUIET_ACTION_CLASS = DASHBOARD_QUIET_ACTION_CLASS;
263
+ exports.DashboardAction = DashboardAction;
264
+ exports.DashboardBand = DashboardBand;
265
+ exports.DashboardColumns = DashboardColumns;
266
+ exports.DashboardRoot = DashboardRoot;
267
+ exports.FactMark = FactMark;
268
+ exports.FactsStrip = FactsStrip;
269
+ exports.RecentList = RecentList;
270
+ //# sourceMappingURL=chunk-SGYURQ23.cjs.map
271
+ //# sourceMappingURL=chunk-SGYURQ23.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/home/DashboardParts.tsx","../src/home/FactsStrip.tsx","../src/home/RecentList.tsx","../src/home/ActionMenuDialog.tsx"],"names":["jsx","cn","jsxs","Button","SectionHeader","LoadingRows","EmptyStrip","Fragment","ActionLink","Dialog","DialogContent","testIdOr","QuickActionDialogHeader","prefixedTestId"],"mappings":";;;;;;;;AAIO,IAAM,4BAAA,GACX;AAGK,SAAS,aAAA,CAAc;AAAA,EAC5B,MAAA;AAAA,EACA,SAAA;AAAA,EACA;AACF,CAAA,EAIG;AACD,EAAA,uBACEA,cAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,WAAA;AAAA,MACV,aAAA,EAAa,MAAA;AAAA,MACb,SAAA,EAAWC,KAAA,CAAG,qBAAA,EAAuB,SAAS,CAAA;AAAA,MAE7C;AAAA;AAAA,GACH;AAEJ;AAGO,SAAS,aAAA,CAAc;AAAA,EAC5B,IAAA;AAAA,EACA;AACF,CAAA,EAGG;AACD,EAAA,uBACED,cAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,gBAAA;AAAA,MACV,WAAA,EAAW,IAAA;AAAA,MACX,SAAA,EAAW,IAAA,KAAS,OAAA,GAAU,MAAA,GAAS,0BAAA;AAAA,MAEtC;AAAA;AAAA,GACH;AAEJ;AAGO,SAAS,gBAAA,CAAiB,EAAE,QAAA,EAAS,EAA4B;AACtE,EAAA,sCACG,KAAA,EAAA,EAAI,WAAA,EAAU,mBAAA,EAAoB,SAAA,EAAU,+BAC1C,QAAA,EACH,CAAA;AAEJ;AAGO,SAAS,QAAA,GAAW;AACzB,EAAA,uBACEA,cAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,WAAA;AAAA,MACV,SAAA,EAAU,4DAAA;AAAA,MACV,aAAA,EAAW;AAAA;AAAA,GACb;AAEJ;AAYO,SAAS,gBAAgB,EAAE,QAAA,EAAU,MAAM,KAAA,EAAO,OAAA,EAAS,QAAO,EAAyB;AAChG,EAAA,uBACEE,eAAA;AAAA,IAACC,SAAA;AAAA,IAAA;AAAA,MACC,OAAA,EAA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eAAAA;AAAA,UAAC,QAAA;AAAA,UAAA;AAAA,YAEC,IAAA,EAAK,QAAA;AAAA,YACL,IAAA,EAAK,UAAA;AAAA,YACL,OAAA,EAAS,MAAM,MAAA,CAAO,IAAA,CAAK,EAAE,CAAA;AAAA,YAC7B,aAAA,EAAaW,gCAAA,CAAe,UAAA,EAAY,IAAA,CAAK,EAAA,EAAI;AAAA,cAC/C,MAAA,EAAQ,CAAA,iBAAA,EAAoB,IAAA,CAAK,EAAE,CAAA;AAAA,aACpC,CAAA;AAAA,YACD,SAAA,EAAWZ,KAAAA;AAAA,cACT,oIAAA;AAAA,cACA;AAAA,aACF;AAAA,YAEC,QAAA,EAAA;AAAA,cAAA,IAAA,CAAK,wBAAQD,cAAAA,CAAC,UAAK,SAAA,EAAU,uBAAA,EAAyB,eAAK,IAAA,EAAK,CAAA;AAAA,8BACjEA,cAAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,qCAAA,EAAuC,eAAK,KAAA,EAAM,CAAA;AAAA,cACjE,IAAA,CAAK,+BACJA,cAAAA,CAAC,UAAK,SAAA,EAAU,+BAAA,EAAiC,eAAK,WAAA,EAAY;AAAA;AAAA,WAAA;AAAA,UAf/D,IAAA,CAAK;AAAA,SAkBb,CAAA,EACH;AAAA;AAAA;AAAA,GACF,EACF,CAAA;AAEJ","file":"chunk-SGYURQ23.cjs","sourcesContent":["import type { ReactNode } from 'react'\nimport { Button, cn } from '@arbidocs/react/ui'\n\n/** A section's quiet header action: ghost, small, still 44px on touch. */\nexport const DASHBOARD_QUIET_ACTION_CLASS =\n 'h-8 gap-1.5 px-2 text-sm bg-transparent text-muted-foreground hover:bg-muted hover:text-foreground pointer-coarse:h-11'\n\n/** Column of the workspace dashboard's bands. A container, so children can use `@2xl:` queries. */\nexport function DashboardRoot({\n testId,\n className,\n children,\n}: {\n testId?: string\n className?: string\n children: ReactNode\n}) {\n return (\n <div\n data-slot=\"dashboard\"\n data-testid={testId}\n className={cn('flex flex-col gap-6', className)}\n >\n {children}\n </div>\n )\n}\n\n/** A dashboard band: `start` is the tiles under the identity bar, `recent` the lists with an eyebrow. */\nexport function DashboardBand({\n kind,\n children,\n}: {\n kind: 'start' | 'recent'\n children: ReactNode\n}) {\n return (\n <div\n data-slot=\"dashboard-band\"\n data-kind={kind}\n className={kind === 'start' ? 'mt-2' : 'mt-4 flex flex-col gap-3'}\n >\n {children}\n </div>\n )\n}\n\n/** Two equal columns from the `@2xl` container width, one below it. */\nexport function DashboardColumns({ children }: { children: ReactNode }) {\n return (\n <div data-slot=\"dashboard-columns\" className=\"grid gap-8 @2xl:grid-cols-2\">\n {children}\n </div>\n )\n}\n\n/** A fact row's mark: a quiet dot. */\nexport function FactMark() {\n return (\n <span\n data-slot=\"fact-mark\"\n className=\"mx-1 size-1.5 shrink-0 rounded-full bg-muted-foreground/40\"\n aria-hidden\n />\n )\n}\n\nexport interface DashboardActionProps {\n /** `primary` is the page's one filled action; `quiet` the ghost header actions. */\n emphasis: 'primary' | 'quiet'\n icon: ReactNode\n label: string\n onClick: () => void\n testId?: string\n}\n\n/** Header action of a dashboard section (\"New chat\", \"New fact\"). */\nexport function DashboardAction({ emphasis, icon, label, onClick, testId }: DashboardActionProps) {\n return (\n <Button\n variant={emphasis === 'primary' ? 'default' : 'ghost'}\n size=\"sm\"\n className={\n emphasis === 'primary'\n ? 'h-8 gap-1.5 px-3 text-sm pointer-coarse:h-11'\n : DASHBOARD_QUIET_ACTION_CLASS\n }\n onClick={onClick}\n data-testid={testId}\n >\n {icon}\n {label}\n </Button>\n )\n}\n","import type { ReactNode } from 'react'\nimport type { LucideIcon } from 'lucide-react'\nimport { cn } from '@arbidocs/react/ui'\nimport { EmptyStrip, LoadingRows, SectionHeader } from './sections'\n\nexport interface FactsStripRow {\n id: string\n leading?: ReactNode\n title: string\n /** Right-aligned stamp: a date or a time. */\n time?: string\n onSelect?: () => void\n}\n\nexport interface FactsStripGroup {\n /** Captions the group (\"Upcoming\", \"Created\"); an empty group is not rendered. */\n caption: string\n rows: FactsStripRow[]\n /** Test id of every row in this group. Defaults to `${testId}-row`. */\n rowTestId?: string\n}\n\nexport interface FactsStripEmpty {\n icon: LucideIcon\n label: ReactNode\n description?: ReactNode\n onSelect?: () => void\n testId?: string\n}\n\nexport interface FactsStripProps {\n icon?: LucideIcon\n title: string\n count?: number\n onOpen?: () => void\n action?: ReactNode\n groups: FactsStripGroup[]\n empty?: FactsStripEmpty\n /** Still loading with nothing to show: placeholder rows instead of the empty state. */\n loading?: boolean\n className?: string\n /** Root test id; the title button gets `${testId}-open`. */\n testId?: string\n}\n\n/**\n * A glanceable band of captioned groups (facts: upcoming, recently created).\n * Not a third list page: callers hand it a few rows per group.\n */\nexport function FactsStrip({\n icon,\n title,\n count,\n onOpen,\n action,\n groups,\n empty,\n loading = false,\n className,\n testId,\n}: FactsStripProps) {\n const filled = groups.filter((g) => g.rows.length > 0)\n return (\n <section\n className={cn('flex min-w-0 flex-col gap-1', className)}\n data-slot=\"facts-strip\"\n data-testid={testId}\n >\n <SectionHeader\n icon={icon}\n title={title}\n count={count}\n onOpen={onOpen}\n openTestId={testId && `${testId}-open`}\n action={action}\n />\n {filled.length === 0 && loading ? (\n <LoadingRows testId={testId && `${testId}-loading`} />\n ) : filled.length === 0 ? (\n empty && (\n <EmptyStrip\n icon={empty.icon}\n label={empty.label}\n description={empty.description}\n onSelect={empty.onSelect}\n testId={empty.testId}\n />\n )\n ) : (\n filled.map((group) => (\n <div key={group.caption} className=\"min-w-0\">\n <p className=\"px-3 pb-1 pt-1 text-right text-xs text-muted-foreground\">\n {group.caption}\n </p>\n <ul>\n {group.rows.map((row) => (\n <li key={row.id}>\n <button\n type=\"button\"\n onClick={row.onSelect}\n disabled={!row.onSelect}\n title={row.title}\n className=\"flex w-full min-w-0 items-center gap-3 rounded-md px-3 py-2 text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring [&:hover]:bg-muted pointer-coarse:min-h-11\"\n data-testid={group.rowTestId ?? (testId && `${testId}-row`)}\n >\n {row.leading}\n <span className=\"min-w-0 flex-1 truncate text-sm text-foreground\">\n {row.title}\n </span>\n {row.time && (\n <span className=\"shrink-0 text-xs tabular-nums text-muted-foreground\">\n {row.time}\n </span>\n )}\n </button>\n </li>\n ))}\n </ul>\n </div>\n ))\n )}\n </section>\n )\n}\n","import type { ReactNode } from 'react'\nimport type { LucideIcon } from 'lucide-react'\nimport { cn } from '@arbidocs/react/ui'\nimport { ActionLink } from '../components/ActionLink'\nimport { EmptyStrip, LoadingRows, SectionHeader } from './sections'\n\n/** One listed item. Source-agnostic: a chat, a file. */\nexport interface RecentRow {\n id: string\n /** Bare entity mark (an icon carries its own identity; no tinted box). */\n leading?: ReactNode\n title: string\n subtitle?: string\n /** Pinned right on the title line, like a message time. Hidden when `trailing` is set. */\n time?: string\n onSelect?: () => void\n /** Real link target; `onSelect` still fires on a plain click (see `ActionLink`). */\n href?: string\n /** A control rendered beside the row, outside its button. */\n trailing?: ReactNode\n}\n\nexport interface RecentListEmpty {\n icon?: LucideIcon\n label: ReactNode\n description?: ReactNode\n /** Makes the empty strip an invitation button. */\n onSelect?: () => void\n}\n\nexport interface RecentListProps {\n icon?: LucideIcon\n title: string\n count?: number\n /** Opens the full list; makes the header title a button. */\n onOpen?: () => void\n /** Real link target of the header title (with `onOpen`, plain clicks call `onOpen`). */\n openHref?: string\n /** The section's one quiet header action. */\n action?: ReactNode\n rows: RecentRow[]\n /** Names the right-hand column (\"Added\", \"Messaged\"). */\n caption?: string\n /** What an empty section says. A plain muted line unless `onSelect` is set. */\n empty?: RecentListEmpty\n /** Still loading with nothing to show: placeholder rows instead of the empty state. */\n loading?: boolean\n className?: string\n /** Root test id; derived ids: `-open`, `-caption`, `-row`, `-empty-action`, `-loading`. */\n testId?: string\n}\n\n/**\n * A titled list of recent items (files, chats): plain rows under a quiet\n * header. An empty list is one tonal strip that invites the first item.\n */\nexport function RecentList({\n icon,\n title,\n count,\n onOpen,\n openHref,\n action,\n rows,\n caption,\n empty,\n loading = false,\n className,\n testId,\n}: RecentListProps) {\n return (\n <section\n className={cn('flex min-w-0 flex-col gap-1', className)}\n data-slot=\"recent-list\"\n data-testid={testId}\n >\n <SectionHeader\n icon={icon}\n title={title}\n count={count}\n onOpen={onOpen}\n openHref={openHref}\n openTestId={testId && `${testId}-open`}\n action={action}\n />\n {rows.length === 0 && loading ? (\n <LoadingRows testId={testId && `${testId}-loading`} />\n ) : rows.length === 0 ? (\n empty?.onSelect ? (\n <EmptyStrip\n icon={empty.icon}\n label={empty.label}\n description={empty.description}\n onSelect={empty.onSelect}\n testId={testId && `${testId}-empty-action`}\n />\n ) : (\n <p className=\"px-1 py-3 text-sm text-muted-foreground\">\n {empty?.description ?? empty?.label}\n </p>\n )\n ) : (\n <>\n {caption && (\n <p className=\"sr-only\" data-testid={testId && `${testId}-caption`}>\n {caption}\n </p>\n )}\n <ul>\n {rows.map((row) => (\n <li\n key={row.id}\n className=\"relative flex items-center rounded-md transition-colors [&:hover]:bg-muted has-[:focus-visible]:bg-muted\"\n data-slot=\"recent-row\"\n >\n <ActionLink\n href={row.href}\n onSelect={row.onSelect}\n title={row.title}\n className={cn(\n 'flex min-w-0 flex-1 items-start gap-3 rounded-md px-3 py-2 text-left focus-visible:outline-none',\n row.onSelect && 'cursor-pointer',\n 'pointer-coarse:min-h-11'\n )}\n data-testid={testId && `${testId}-row`}\n >\n {row.leading}\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex items-baseline gap-2\">\n <span className=\"min-w-0 flex-1 truncate text-sm font-medium text-foreground\">\n {row.title}\n </span>\n {!row.trailing && row.time && (\n <span className=\"shrink-0 text-xs tabular-nums text-muted-foreground\">\n {row.time}\n </span>\n )}\n </div>\n {row.subtitle && (\n <p className=\"mt-0.5 truncate text-xs text-muted-foreground\">\n {row.subtitle}\n </p>\n )}\n </div>\n </ActionLink>\n {row.trailing ? <div className=\"shrink-0 pr-3\">{row.trailing}</div> : null}\n </li>\n ))}\n </ul>\n </>\n )}\n </section>\n )\n}\n","import type { ReactNode } from 'react'\nimport { Dialog, DialogContent, cn } from '@arbidocs/react/ui'\nimport { prefixedTestId, testIdOr } from '../chat/test-id'\nimport { QuickActionDialogHeader } from './QuickActionDialogHeader'\n\nexport interface ActionMenuItem {\n id: string\n label: string\n description?: string\n icon?: ReactNode\n}\n\nexport interface ActionMenuDialogProps {\n open: boolean\n onOpenChange: (open: boolean) => void\n /** Header mark, sized by the caller at `size-5`. */\n icon?: ReactNode\n title: string\n description: string\n items: ActionMenuItem[]\n /** A choice was made; the host performs it (the dialog does not close itself). */\n onPick: (id: string) => void\n /** Dialog id; items are `<prefix>-<item id>` (default `action-menu-item-<id>`). */\n testId?: string\n itemTestId?: string\n}\n\n/**\n * A plain menu of one-click actions in a dialog: no form, no schema, nothing generative. Use it\n * for \"create new\" style choices; anything that asks questions belongs to a workflow or operation.\n */\nexport function ActionMenuDialog({\n open,\n onOpenChange,\n icon,\n title,\n description,\n items,\n onPick,\n testId,\n itemTestId,\n}: ActionMenuDialogProps) {\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogContent\n presentation=\"sheet\"\n className=\"sm:max-w-lg\"\n data-testid={testIdOr(testId, { testId: 'action-menu-dialog' })}\n >\n <QuickActionDialogHeader icon={icon} title={title} description={description} />\n <div className=\"grid grid-cols-2 gap-3 pt-1\" role=\"menu\" aria-label={title}>\n {items.map((item) => (\n <button\n key={item.id}\n type=\"button\"\n role=\"menuitem\"\n onClick={() => onPick(item.id)}\n data-testid={prefixedTestId(itemTestId, item.id, {\n testId: `action-menu-item-${item.id}`,\n })}\n className={cn(\n 'flex min-h-32 flex-col items-center justify-center gap-2 rounded-lg border border-border bg-card p-3 text-center transition-colors',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring [&:hover]:border-primary [&:hover]:bg-muted'\n )}\n >\n {item.icon && <span className=\"text-muted-foreground\">{item.icon}</span>}\n <span className=\"text-sm font-medium text-foreground\">{item.label}</span>\n {item.description && (\n <span className=\"text-xs text-muted-foreground\">{item.description}</span>\n )}\n </button>\n ))}\n </div>\n </DialogContent>\n </Dialog>\n )\n}\n"]}
@@ -422,6 +422,12 @@ function EmptyStrip({
422
422
  }
423
423
  );
424
424
  }
425
+ function LoadingRows({ rows = 3, testId }) {
426
+ return /* @__PURE__ */ jsxRuntime.jsx("ul", { "aria-busy": "true", "data-slot": "loading-rows", "data-testid": testId, children: Array.from({ length: rows }, (_, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-center gap-3 px-3 py-2", children: [
427
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "size-5 shrink-0 animate-pulse rounded bg-muted" }),
428
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "h-4 flex-1 animate-pulse rounded bg-muted" })
429
+ ] }, i)) });
430
+ }
425
431
 
426
432
  // src/lib/balanced-columns.ts
427
433
  function balancedColumns(count, width, minTile = 200, gap = 12) {
@@ -439,17 +445,24 @@ function balancedColumns(count, width, minTile = 200, gap = 12) {
439
445
  }
440
446
  return best;
441
447
  }
442
- function StartTiles({ items, caption, captionTestId, className, testId }) {
448
+ function StartTiles({
449
+ items,
450
+ layout = "grid",
451
+ caption,
452
+ captionTestId,
453
+ className,
454
+ testId
455
+ }) {
443
456
  const gridRef = react.useRef(null);
444
457
  const [columns, setColumns] = react.useState(null);
445
458
  const count = items.length;
446
459
  react.useEffect(() => {
447
460
  const grid = gridRef.current;
448
- if (!grid || count === 0) return;
461
+ if (!grid || count === 0 || layout === "carousel") return;
449
462
  const measure = () => setColumns(balancedColumns(count, grid.clientWidth));
450
463
  measure();
451
464
  return chunkPPCATBOY_cjs.observeResize(grid, measure);
452
- }, [count]);
465
+ }, [count, layout]);
453
466
  if (count === 0) return null;
454
467
  return /* @__PURE__ */ jsxRuntime.jsxs(
455
468
  "section",
@@ -459,7 +472,21 @@ function StartTiles({ items, caption, captionTestId, className, testId }) {
459
472
  "data-testid": testId,
460
473
  children: [
461
474
  caption && /* @__PURE__ */ jsxRuntime.jsx(SectionLabel, { testId: captionTestId, children: caption }),
462
- /* @__PURE__ */ jsxRuntime.jsx(
475
+ layout === "carousel" ? /* @__PURE__ */ jsxRuntime.jsx(
476
+ "div",
477
+ {
478
+ "data-slot": "start-tiles-carousel",
479
+ className: "-mx-1 flex snap-x snap-mandatory gap-3 overflow-x-auto px-1 pb-1",
480
+ children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
481
+ StartTileCard,
482
+ {
483
+ item,
484
+ className: "w-60 shrink-0 snap-start pointer-coarse:w-56"
485
+ },
486
+ item.id
487
+ ))
488
+ }
489
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
463
490
  "div",
464
491
  {
465
492
  ref: gridRef,
@@ -469,52 +496,54 @@ function StartTiles({ items, caption, captionTestId, className, testId }) {
469
496
  style: {
470
497
  gridTemplateColumns: columns === null ? "repeat(auto-fit, minmax(200px, 1fr))" : `repeat(${columns}, minmax(0, 1fr))`
471
498
  },
472
- children: items.map((item) => {
473
- const Icon = item.icon;
474
- return /* @__PURE__ */ jsxRuntime.jsxs(
475
- chunkYA6GXWC2_cjs.ActionLink,
476
- {
477
- href: item.href,
478
- onSelect: item.onSelect,
479
- disabled: item.disabled,
480
- title: item.disabled ? item.disabledReason : void 0,
481
- className: ui.cn(
482
- "flex h-full flex-col items-start gap-3 rounded-lg p-4 text-left",
483
- "border border-border bg-card shadow-xs transition-colors hover:border-ring/50 hover:bg-accent/40",
484
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
485
- "disabled:cursor-default disabled:opacity-55 disabled:hover:bg-card disabled:hover:border-border",
486
- "pointer-coarse:min-h-11"
487
- ),
488
- "data-slot": "start-tile",
489
- "data-testid": item.testId,
490
- children: [
491
- item.iconNode ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-ai-ink [&>svg]:size-5", "aria-hidden": "true", children: item.iconNode }) : Icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "size-5 shrink-0 text-ai-ink", "aria-hidden": "true" }),
492
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "min-w-0", children: [
493
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "block text-sm font-semibold text-foreground", children: item.title }),
494
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-1 block text-sm leading-snug text-muted-foreground", children: item.disabled && item.disabledReason ? item.disabledReason : item.description })
495
- ] })
496
- ]
497
- },
498
- item.id
499
- );
500
- })
499
+ children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsx(StartTileCard, { item }, item.id))
501
500
  }
502
501
  )
503
502
  ]
504
503
  }
505
504
  );
506
505
  }
506
+ function StartTileCard({ item, className }) {
507
+ const Icon = item.icon;
508
+ return /* @__PURE__ */ jsxRuntime.jsxs(
509
+ chunkYA6GXWC2_cjs.ActionLink,
510
+ {
511
+ href: item.href,
512
+ onSelect: item.onSelect,
513
+ disabled: item.disabled,
514
+ title: item.disabled ? item.disabledReason : void 0,
515
+ className: ui.cn(
516
+ "flex h-full flex-col items-start gap-3 rounded-lg p-4 text-left",
517
+ "border border-border bg-card shadow-xs transition-colors hover:border-ring/50 hover:bg-accent/40",
518
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
519
+ "disabled:cursor-default disabled:opacity-55 disabled:hover:bg-card disabled:hover:border-border",
520
+ "pointer-coarse:min-h-11",
521
+ className
522
+ ),
523
+ "data-slot": "start-tile",
524
+ "data-testid": item.testId,
525
+ children: [
526
+ item.iconNode ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-ai-ink [&>svg]:size-5", "aria-hidden": "true", children: item.iconNode }) : Icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "size-5 shrink-0 text-ai-ink", "aria-hidden": "true" }),
527
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "min-w-0", children: [
528
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "block text-sm font-semibold text-foreground", children: item.title }),
529
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-1 block text-sm leading-snug text-muted-foreground", children: item.disabled && item.disabledReason ? item.disabledReason : item.description })
530
+ ] })
531
+ ]
532
+ }
533
+ );
534
+ }
507
535
 
508
536
  exports.AddFilesFirst = AddFilesFirst;
509
537
  exports.DEFAULT_ADD_FILES_FIRST_LABELS = DEFAULT_ADD_FILES_FIRST_LABELS;
510
538
  exports.DEFAULT_SCOPE_PICKER_LABELS = DEFAULT_SCOPE_PICKER_LABELS;
511
539
  exports.EmptyStrip = EmptyStrip;
512
540
  exports.FoldSection = FoldSection;
541
+ exports.LoadingRows = LoadingRows;
513
542
  exports.QuickActionDialogHeader = QuickActionDialogHeader;
514
543
  exports.ScopePicker = ScopePicker;
515
544
  exports.SectionHeader = SectionHeader;
516
545
  exports.SectionLabel = SectionLabel;
517
546
  exports.StartTiles = StartTiles;
518
547
  exports.useScopeSelection = useScopeSelection;
519
- //# sourceMappingURL=chunk-A5SKK3CU.cjs.map
520
- //# sourceMappingURL=chunk-A5SKK3CU.cjs.map
548
+ //# sourceMappingURL=chunk-SLCH5JRI.cjs.map
549
+ //# sourceMappingURL=chunk-SLCH5JRI.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/home/FoldSection.tsx","../src/home/AddFilesFirst.tsx","../src/home/QuickActionDialogHeader.tsx","../src/lib/useScopeSelection.ts","../src/home/ScopePicker.tsx","../src/home/sections.tsx","../src/lib/balanced-columns.ts","../src/home/StartTiles.tsx"],"names":["jsxs","Collapsible","CollapsibleTrigger","jsx","ChevronDown","cn","CollapsibleContent","FolderPlus","DialogHeader","DialogTitle","DialogDescription","useMemo","formatCount","Minus","Check","useState","testIdOr","Fragment","prefixedTestId","FileCheck2","ActionLink","Plus","useRef","useEffect","observeResize"],"mappings":";;;;;;;;;;;AAsBO,SAAS,WAAA,CAAY;AAAA,EAC1B,KAAA;AAAA,EACA,KAAA,GAAQ,CAAA;AAAA,EACR,IAAA;AAAA,EACA,IAAA;AAAA,E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CAAK,QAAA,IAAY,IAAA,CAAK,cAAA,GAAiB,IAAA,CAAK,cAAA,GAAiB,IAAA,CAAK,WAAA,EACrE;AAAA,SAAA,EACF;AAAA;AAAA;AAAA,GACF;AAEJ","file":"chunk-SLCH5JRI.cjs","sourcesContent":["import type { ReactNode } from 'react'\nimport { ChevronDown } from 'lucide-react'\nimport { Collapsible, CollapsibleContent, CollapsibleTrigger, cn } from '@arbidocs/react/ui'\n\nexport interface FoldSectionProps {\n label: string\n /** Shown as plain muted text beside the name; omit or pass 0 to hide. */\n count?: number\n /** A word or two of state for sections a count cannot summarise (shown while shut). */\n hint?: string\n open: boolean\n onOpenChange: (open: boolean) => void\n /** Trigger test id; the caller owns the naming. */\n testId: string\n children: ReactNode\n}\n\n/**\n * One foldable block of a dialog. The chevron and the name are the whole hit\n * target (44px on touch), and the count keeps the selection readable while the\n * section is shut, so you need not re-open it to check.\n */\nexport function FoldSection({\n label,\n count = 0,\n hint,\n open,\n onOpenChange,\n testId,\n children,\n}: FoldSectionProps) {\n return (\n <Collapsible open={open} onOpenChange={onOpenChange} data-slot=\"fold-section\">\n <CollapsibleTrigger\n className=\"mb-1.5 flex w-full items-center gap-1.5 rounded-md text-sm font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring [&:hover]:text-muted-foreground pointer-coarse:min-h-11\"\n data-testid={testId}\n >\n <ChevronDown\n className={cn('size-4 shrink-0 transition-transform', !open && '-rotate-90')}\n />\n <span>{label}</span>\n {count > 0 && <span className=\"text-xs tabular-nums text-muted-foreground\">{count}</span>}\n {hint && !open && (\n <span className=\"min-w-0 truncate text-xs font-normal text-muted-foreground\">{hint}</span>\n )}\n </CollapsibleTrigger>\n <CollapsibleContent>{children}</CollapsibleContent>\n </Collapsible>\n )\n}\n","import type { ReactNode } from 'react'\nimport { FolderPlus } from 'lucide-react'\n\n/** Fixed strings of the empty-files state. */\nexport interface AddFilesFirstLabels {\n heading: string\n}\n\nexport const DEFAULT_ADD_FILES_FIRST_LABELS: AddFilesFirstLabels = {\n heading: 'Add files first',\n}\n\nexport interface AddFilesFirstProps {\n /** Why this action needs files, in the action's own words. */\n reason: string\n /** The host's own \"Add\" control. */\n action: ReactNode\n testId?: string\n labels?: Partial<AddFilesFirstLabels>\n}\n\n/**\n * What a quick-action dialog shows when the workspace has no files yet.\n *\n * Greying the action out says you cannot do it without saying how to get\n * there. Offering the same \"Add\" menu the Files view carries turns the dead\n * end into the first step: add files here, then run the action.\n */\nexport function AddFilesFirst({ reason, action, testId, labels }: AddFilesFirstProps) {\n const l = { ...DEFAULT_ADD_FILES_FIRST_LABELS, ...labels }\n return (\n <div\n className=\"flex flex-col items-center gap-3 rounded-lg border border-border bg-card shadow-xs px-4 py-8 text-center\"\n data-slot=\"add-files-first\"\n data-testid={testId}\n >\n <span className=\"flex size-11 items-center justify-center rounded-full bg-ai-soft text-ai-ink\">\n <FolderPlus className=\"size-5\" aria-hidden=\"true\" />\n </span>\n <div className=\"flex flex-col gap-1\">\n <p className=\"text-sm font-semibold text-foreground\">{l.heading}</p>\n <p className=\"text-xs leading-relaxed text-muted-foreground\">{reason}</p>\n </div>\n {action}\n </div>\n )\n}\n","import type { ReactNode } from 'react'\nimport { DialogDescription, DialogHeader, DialogTitle } from '@arbidocs/react/ui'\n\nexport interface QuickActionDialogHeaderProps {\n /** The tile's glyph, sized by the caller at `size-5`. */\n icon: ReactNode\n title: string\n /** One sentence on what the dialog does. Keep it to a line or two. */\n description: ReactNode\n /** Test id for the description, where a test asserts on the copy. */\n descriptionTestId?: string\n}\n\n/**\n * The header every \"Start\" quick-action dialog wears: the tile's own mark in\n * its disc, the action's name, and one line saying what the dialog will do.\n *\n * - The disc centres on the TITLE row, so it reads as the title's mark.\n * - The description keeps the title's left edge (`pl-13` = disc + gap), so the\n * header is one text column beside the mark rather than an L.\n * - `max-w-prose` + `text-pretty` cap the measure and stop two-word orphans.\n * - `pr-8` keeps the copy clear of the close button.\n */\nexport function QuickActionDialogHeader({\n icon,\n title,\n description,\n descriptionTestId,\n}: QuickActionDialogHeaderProps) {\n return (\n <DialogHeader className=\"space-y-0 text-left\" data-slot=\"quick-action-dialog-header\">\n <div className=\"flex items-center gap-3 pr-8\">\n <div className=\"flex size-10 shrink-0 items-center justify-center rounded-full bg-ai-soft text-ai-ink\">\n {icon}\n </div>\n <DialogTitle className=\"text-xl font-semibold leading-tight\">{title}</DialogTitle>\n </div>\n <DialogDescription\n className=\"mt-2 max-w-prose pl-13 pr-8 text-sm leading-relaxed text-pretty\"\n data-testid={descriptionTestId}\n >\n {description}\n </DialogDescription>\n </DialogHeader>\n )\n}\n","import { useMemo } from 'react'\n\n/** Which folders and labels a run is limited to. Empty = everything. */\nexport interface DocumentScope {\n /** Folder paths; `''` is the \"unfiled\" bucket. */\n folders: string[]\n /** Label (tag) ids. */\n labels: string[]\n}\n\nexport interface UseScopeSelectionOptions {\n /** Every folder path in the tree (not including the unfiled bucket). */\n folderPaths: string[]\n /** Whether the unfiled bucket is shown as a row. */\n hasUnfiled: boolean\n scope: DocumentScope\n onScopeChange: (scope: DocumentScope) => void\n}\n\n/**\n * Headless selection logic for a folder + label scope picker.\n *\n * Folders use hierarchical selection: ticking \"contracts\" also ticks\n * \"contracts/2024\", and unticking removes the whole subtree. \"All\" ticks every\n * row, which is NOT the same as an empty scope: empty means \"the whole\n * workspace, whatever lands in it later\", all-ticked means \"these folders, as\n * they are now\".\n */\nexport function useScopeSelection({\n folderPaths,\n hasUnfiled,\n scope,\n onScopeChange,\n}: UseScopeSelectionOptions) {\n const selectedFolders = useMemo(() => new Set(scope.folders), [scope.folders])\n const selectedLabels = useMemo(() => new Set(scope.labels), [scope.labels])\n\n /** Every row the folder list shows, \"unfiled\" included. */\n const allRowPaths = useMemo(\n () => [...(hasUnfiled ? [''] : []), ...folderPaths],\n [folderPaths, hasUnfiled]\n )\n const allSelected = allRowPaths.length > 0 && allRowPaths.every((p) => selectedFolders.has(p))\n const someSelected = selectedFolders.size > 0 && !allSelected\n\n const descendants = (path: string) => folderPaths.filter((p) => p.startsWith(path + '/'))\n\n const toggleFolder = (path: string) => {\n const next = new Set(selectedFolders)\n const family = [path, ...descendants(path)]\n if (next.has(path)) for (const p of family) next.delete(p)\n else for (const p of family) next.add(p)\n onScopeChange({ folders: [...next], labels: scope.labels })\n }\n\n const toggleAllFolders = () => {\n onScopeChange({ folders: allSelected ? [] : allRowPaths, labels: scope.labels })\n }\n\n const toggleLabel = (labelId: string) => {\n const next = new Set(selectedLabels)\n if (next.has(labelId)) next.delete(labelId)\n else next.add(labelId)\n onScopeChange({ folders: scope.folders, labels: [...next] })\n }\n\n return {\n selectedFolders,\n selectedLabels,\n allSelected,\n someSelected,\n hasSelection: scope.folders.length > 0 || scope.labels.length > 0,\n toggleFolder,\n toggleAllFolders,\n toggleLabel,\n }\n}\n","import { useMemo, useState } from 'react'\nimport { Check, FileCheck2, Minus } from 'lucide-react'\nimport { cn } from '@arbidocs/react/ui'\nimport { prefixedTestId, testIdOr } from '../chat/test-id'\nimport { useScopeSelection, type DocumentScope } from '../lib/useScopeSelection'\nimport { formatCount } from '../lib/format'\nimport { FoldSection } from './FoldSection'\n\n/**\n * Fixed strings of the picker. Passed as `uiLabels`: the `labels` prop is already the list of\n * document labels to scope by.\n */\nexport interface ScopePickerLabels {\n folders: string\n /** The Labels section heading. */\n labelsHeading: string\n all: string\n unfiled: string\n noFoldersYet: string\n noLabelsYet: string\n filesToInclude: string\n /** \"3 of 10 files\". */\n matchedOfTotal: (matched: number, total: number) => string\n selectedSuffix: string\n folderCount: (count: number) => string\n labelCount: (count: number) => string\n left: (count: number) => string\n /** \"All 10 files\". */\n allFiles: (total: number) => string\n includedSuffix: string\n}\n\nconst pluralize = (n: number, word: string) => `${n} ${word}${n !== 1 ? 's' : ''}`\n\nexport const DEFAULT_SCOPE_PICKER_LABELS: ScopePickerLabels = {\n folders: 'Folders',\n labelsHeading: 'Labels',\n all: 'All',\n unfiled: 'Unfiled',\n noFoldersYet: 'No folders yet',\n noLabelsYet: 'No labels yet — label files from the Files page to scope by them here.',\n filesToInclude: 'Files to include',\n matchedOfTotal: (matched, total) =>\n `${matched} of ${formatCount(total, { one: 'file', other: 'files' })}`,\n selectedSuffix: ' selected',\n folderCount: (count) => pluralize(count, 'folder'),\n labelCount: (count) => pluralize(count, 'label'),\n left: (count) => `${count} left`,\n allFiles: (total) => `All ${pluralize(total, 'file')}`,\n includedSuffix: ' in the workspace will be included',\n}\n\nexport interface ScopeFolder {\n /** Full path, e.g. `contracts/2024`. */\n path: string\n /** Last segment, shown. */\n label: string\n /** Documents under this folder. */\n count: number\n depth: number\n}\n\nexport interface ScopeLabel {\n id: string\n name: string\n /** Any CSS colour for the dot. */\n color: string\n /** Documents carrying this label. */\n count: number\n}\n\nexport interface ScopePickerProps {\n folders: ScopeFolder[]\n /** Documents with no folder; the \"Unfiled\" row is hidden at 0. */\n unfiledCount: number\n labels: ScopeLabel[]\n /** All documents the picker is scoping. */\n totalCount: number\n /** Documents the current scope matches (computed by the caller). */\n matchedCount: number\n scope: DocumentScope\n onScopeChange: (scope: DocumentScope) => void\n /** Reword the picker's fixed strings. */\n uiLabels?: Partial<ScopePickerLabels>\n /** Sub-element ids; defaults are the current ids. `labelChip` is a prefix (`<prefix>-<label id>`). */\n testIds?: Partial<\n Record<'foldersToggle' | 'labelsToggle' | 'noLabels' | 'labelChip' | 'summary', string>\n >\n}\n\ninterface FolderRowProps {\n label: string\n count: number\n depth: number\n isActive: boolean\n indeterminate?: boolean\n muted?: boolean\n onToggle: () => void\n}\n\n/** A checkbox row: the row is the checkbox (a nested real one would swallow the click). */\nfunction FolderRow({\n label,\n count,\n depth,\n isActive,\n indeterminate,\n muted,\n onToggle,\n}: FolderRowProps) {\n return (\n <button\n type=\"button\"\n onClick={onToggle}\n role=\"checkbox\"\n aria-checked={indeterminate ? 'mixed' : isActive}\n style={{ paddingLeft: `${4 + depth * 14}px` }}\n className={cn(\n 'flex w-full items-center gap-1 rounded-sm py-1 pr-2 text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring [&:hover]:bg-accent pointer-coarse:min-h-11',\n isActive && 'bg-primary/10',\n muted && !isActive && 'text-muted-foreground'\n )}\n data-slot=\"scope-folder-row\"\n >\n <span className=\"flex w-4 shrink-0 items-center justify-center\">\n <span\n className={cn(\n 'flex size-3.5 items-center justify-center rounded-[3px] border transition-colors',\n isActive || indeterminate\n ? 'border-primary bg-primary text-primary-foreground'\n : 'border-muted-foreground/40'\n )}\n >\n {indeterminate ? (\n <Minus className=\"size-2.5\" />\n ) : (\n isActive && <Check className=\"size-2.5\" />\n )}\n </span>\n </span>\n {label !== '' && (\n <span className={cn('min-w-0 truncate', isActive && 'font-semibold text-primary')}>\n {label}\n </span>\n )}\n <span className=\"ml-auto pl-2 text-sm font-semibold text-muted-foreground\">{count}</span>\n </button>\n )\n}\n\n/**\n * Pick a folder + label scope for a run over documents. Controlled: the caller\n * owns the scope and computes `matchedCount`, so the submit button lives with\n * the caller. Both sections start shut: the default (every file) is what most\n * runs want, and the summary states it plainly.\n */\nexport function ScopePicker({\n folders,\n unfiledCount,\n labels,\n totalCount,\n matchedCount,\n scope,\n onScopeChange,\n uiLabels,\n testIds,\n}: ScopePickerProps) {\n const l = { ...DEFAULT_SCOPE_PICKER_LABELS, ...uiLabels }\n const [foldersOpen, setFoldersOpen] = useState(false)\n const [labelsOpen, setLabelsOpen] = useState(false)\n\n const folderPaths = useMemo(() => folders.map((f) => f.path), [folders])\n const selection = useScopeSelection({\n folderPaths,\n hasUnfiled: unfiledCount > 0,\n scope,\n onScopeChange,\n })\n const hasRows = folders.length > 0 || unfiledCount > 0\n\n return (\n <div className=\"flex flex-col gap-4\" data-slot=\"scope-picker\">\n <FoldSection\n label={l.folders}\n count={scope.folders.length}\n open={foldersOpen}\n onOpenChange={setFoldersOpen}\n testId={testIdOr(testIds?.foldersToggle, { testId: 'scope-picker-folders-toggle' })}\n >\n <div className=\"max-h-[180px] overflow-y-auto rounded-md border border-border p-1\">\n {hasRows && (\n <>\n <FolderRow\n label={l.all}\n count={totalCount}\n depth={0}\n isActive={selection.allSelected}\n indeterminate={selection.someSelected}\n onToggle={selection.toggleAllFolders}\n />\n <div className=\"my-1 border-t border-border\" />\n </>\n )}\n {unfiledCount > 0 && (\n <>\n <FolderRow\n label={l.unfiled}\n count={unfiledCount}\n depth={0}\n isActive={selection.selectedFolders.has('')}\n muted\n onToggle={() => selection.toggleFolder('')}\n />\n {folders.length > 0 && <div className=\"my-1 border-t border-border\" />}\n </>\n )}\n {folders.map((folder) => (\n <FolderRow\n key={folder.path}\n label={folder.label}\n count={folder.count}\n depth={folder.depth}\n isActive={selection.selectedFolders.has(folder.path)}\n onToggle={() => selection.toggleFolder(folder.path)}\n />\n ))}\n {!hasRows && <p className=\"px-2 py-1 text-sm text-muted-foreground\">{l.noFoldersYet}</p>}\n </div>\n </FoldSection>\n\n {/* Always present, like Folders: a workspace with no labels yet reads as\n \"you have not labelled anything\", not \"this cannot scope by label\". */}\n <FoldSection\n label={l.labelsHeading}\n count={scope.labels.length}\n open={labelsOpen}\n onOpenChange={setLabelsOpen}\n testId={testIdOr(testIds?.labelsToggle, { testId: 'scope-picker-labels-toggle' })}\n >\n {labels.length === 0 ? (\n <p\n className=\"px-2 py-1 text-sm text-muted-foreground\"\n data-testid={testIdOr(testIds?.noLabels, { testId: 'scope-picker-no-labels' })}\n >\n {l.noLabelsYet}\n </p>\n ) : (\n <div className=\"flex flex-wrap gap-1.5\">\n {labels.map((label) => {\n const isActive = selection.selectedLabels.has(label.id)\n return (\n <button\n key={label.id}\n type=\"button\"\n onClick={() => selection.toggleLabel(label.id)}\n aria-pressed={isActive}\n data-testid={prefixedTestId(testIds?.labelChip, label.id, {\n testId: `scope-picker-label-chip-${label.id}`,\n })}\n className={cn(\n 'inline-flex items-center gap-1.5 rounded-md border px-2 py-1 text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring pointer-coarse:min-h-11',\n isActive\n ? 'border-primary/40 bg-primary/10 text-primary'\n : 'border-border [&:hover]:bg-accent [&:hover]:text-accent-foreground'\n )}\n >\n <span\n className=\"size-2.5 shrink-0 rounded-full\"\n style={{ backgroundColor: label.color }}\n />\n <span className=\"truncate\">{label.name}</span>\n <span className=\"shrink-0 text-xs text-muted-foreground\">({label.count})</span>\n {isActive && <Check className=\"size-3.5 shrink-0\" />}\n </button>\n )\n })}\n </div>\n )}\n </FoldSection>\n\n <div\n className=\"rounded-lg bg-muted p-3\"\n data-testid={testIdOr(testIds?.summary, { testId: 'scope-picker-summary' })}\n >\n <div className=\"mb-2 flex items-center gap-1.5 text-xs font-medium text-muted-foreground\">\n <FileCheck2 className=\"size-4\" />\n {l.filesToInclude}\n </div>\n {selection.hasSelection ? (\n <div className=\"text-sm text-muted-foreground\">\n <span className=\"text-base font-semibold text-foreground\">\n {l.matchedOfTotal(matchedCount, totalCount)}\n </span>\n {l.selectedSuffix}\n {scope.folders.length > 0 && <span> — {l.folderCount(scope.folders.length)}</span>}\n {scope.folders.length > 0 && scope.labels.length > 0 && <span>, </span>}\n {scope.labels.length > 0 && <span>{l.labelCount(scope.labels.length)}</span>}\n <span className=\"text-xs\">\n {' · '}\n {l.left(totalCount - matchedCount)}\n </span>\n </div>\n ) : (\n <div className=\"text-sm text-muted-foreground\">\n <span className=\"text-base font-semibold text-foreground\">\n {l.allFiles(totalCount)}\n </span>\n {l.includedSuffix}\n </div>\n )}\n </div>\n </div>\n )\n}\n","import type { ReactNode } from 'react'\nimport { Plus, type LucideIcon } from 'lucide-react'\nimport { cn } from '@arbidocs/react/ui'\nimport { ActionLink } from '../components/ActionLink'\n\n/** The small label that names a band of a page (\"Start\", \"Recent\"). */\nexport function SectionLabel({\n children,\n className,\n testId,\n}: {\n children: ReactNode\n className?: string\n testId?: string\n}) {\n return (\n <p\n className={cn(\n 'flex items-center gap-3 text-sm font-semibold text-foreground after:h-px after:flex-1 after:bg-border',\n className\n )}\n data-slot=\"section-label\"\n data-testid={testId}\n >\n {children}\n </p>\n )\n}\n\nexport interface SectionHeaderProps {\n icon?: LucideIcon\n title: string\n count?: number\n /** Makes the title a button (open the full list). Omit for a static title. */\n onOpen?: () => void\n /** Real link target of the title; `onOpen` still fires on a plain click. */\n openHref?: string\n /** Test id of the title button. */\n openTestId?: string\n /** The section's one quiet action, rendered at the trailing edge. */\n action?: ReactNode\n className?: string\n}\n\n/** Title + count + one quiet action: the head of a list section. */\nexport function SectionHeader({\n icon: Icon,\n title,\n count,\n onOpen,\n openHref,\n openTestId,\n action,\n className,\n}: SectionHeaderProps) {\n return (\n <div\n className={cn('flex items-center justify-between gap-2', className)}\n data-slot=\"section-header\"\n >\n <ActionLink\n href={openHref}\n onSelect={onOpen}\n disabled={!onOpen && !openHref}\n className=\"flex min-w-0 cursor-pointer items-center gap-2 rounded-md py-1.5 pr-2 text-left transition-colors hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-default disabled:hover:text-foreground pointer-coarse:min-h-11\"\n data-testid={openTestId}\n >\n {Icon && <Icon className=\"size-4 shrink-0 text-muted-foreground\" aria-hidden=\"true\" />}\n <span className=\"whitespace-nowrap text-sm font-semibold text-foreground\">{title}</span>\n {count !== undefined && (\n <span className=\"text-sm tabular-nums text-muted-foreground\">{count}</span>\n )}\n </ActionLink>\n {action && <div className=\"shrink-0\">{action}</div>}\n </div>\n )\n}\n\nexport interface EmptyStripProps {\n icon?: LucideIcon\n label: ReactNode\n description?: ReactNode\n onSelect?: () => void\n testId?: string\n}\n\n/** One tonal strip that stands in for an empty section: an invitation, not a void. */\nexport function EmptyStrip({\n icon: Icon = Plus,\n label,\n description,\n onSelect,\n testId,\n}: EmptyStripProps) {\n return (\n <button\n type=\"button\"\n onClick={onSelect}\n disabled={!onSelect}\n className=\"flex w-full items-center gap-3 rounded-lg px-4 py-3 text-left border border-border bg-card shadow-xs transition-colors hover:border-ring/50 hover:bg-accent/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-default disabled:hover:bg-card disabled:hover:border-border pointer-coarse:min-h-11\"\n data-slot=\"empty-strip\"\n data-testid={testId}\n >\n <Icon className=\"size-5 shrink-0 text-muted-foreground\" aria-hidden=\"true\" />\n <span className=\"min-w-0 flex-1\">\n <span className=\"block text-sm font-semibold text-foreground\">{label}</span>\n {description && (\n <span className=\"block text-sm leading-snug text-muted-foreground\">{description}</span>\n )}\n </span>\n </button>\n )\n}\n\n/** A section still loading: a few quiet placeholder rows, so it does not invite a first item yet. */\nexport function LoadingRows({ rows = 3, testId }: { rows?: number; testId?: string }) {\n return (\n <ul aria-busy=\"true\" data-slot=\"loading-rows\" data-testid={testId}>\n {Array.from({ length: rows }, (_, i) => (\n <li key={i} className=\"flex items-center gap-3 px-3 py-2\">\n <span className=\"size-5 shrink-0 animate-pulse rounded bg-muted\" />\n <span className=\"h-4 flex-1 animate-pulse rounded bg-muted\" />\n </li>\n ))}\n </ul>\n )\n}\n","/**\n * The column count for a grid of `count` equal tiles in `width` pixels, chosen so the last row is\n * never left with a lone orphan: of the counts that fit (each column at least `minTile` wide),\n * take the one that leaves the fewest empty cells in the last row, preferring more columns on a\n * tie (never fewer than two columns when two fit). Four tiles resolve to 2x2 where three would fit\n * and 4 across when there is room for four; six resolve to 3x2.\n */\nexport function balancedColumns(count: number, width: number, minTile = 200, gap = 12): number {\n if (count <= 1) return 1\n const fit = Math.max(1, Math.min(count, Math.floor((width + gap) / (minTile + gap))))\n if (fit < 2) return 1\n let best = 2\n let bestEmpty = Number.POSITIVE_INFINITY\n for (let columns = 2; columns <= fit; columns++) {\n const empty = (columns - (count % columns)) % columns\n if (empty < bestEmpty || (empty === bestEmpty && columns > best)) {\n best = columns\n bestEmpty = empty\n }\n }\n return best\n}\n","import { useEffect, useRef, useState, type ReactNode } from 'react'\nimport type { LucideIcon } from 'lucide-react'\nimport { cn } from '@arbidocs/react/ui'\nimport { ActionLink } from '../components/ActionLink'\nimport { balancedColumns } from '../lib/balanced-columns'\nimport { observeResize } from '../lib/observe-resize'\nimport { SectionLabel } from './sections'\n\n/** One \"start something\" tile: an AI-driven action, one click from underway. */\nexport interface StartTile {\n id: string\n /** A Lucide glyph; `iconNode` wins when both are given. */\n icon?: LucideIcon\n /** A ready-made mark (host icon maps), wearing the same AI ink. */\n iconNode?: ReactNode\n title: string\n description: string\n onSelect: () => void\n /** Real link target (ctrl-click / new tab, in-SPA through the host environment's `linkComponent`). `onSelect` still fires on a plain click. */\n href?: string\n /** Rendered non-interactive and dimmed; `disabledReason` replaces the description. */\n disabled?: boolean\n disabledReason?: string\n testId?: string\n}\n\nexport interface StartTilesProps {\n items: StartTile[]\n /**\n * `grid` (default): balanced columns that reflow by the band's width. `carousel`: one row of\n * fixed-width tiles that scrolls sideways (a page's carousel block).\n */\n layout?: 'grid' | 'carousel'\n /** Optional band label above the tiles (\"Start\"). */\n caption?: string\n captionTestId?: string\n className?: string\n testId?: string\n}\n\n/**\n * A band of tonal action tiles. The glyph wears the AI ink, because these are\n * the AI-driven starts. Nothing is hover-only: tiles are always rendered, hover\n * only nudges tone, and touch targets are at least 44px.\n */\nexport function StartTiles({\n items,\n layout = 'grid',\n caption,\n captionTestId,\n className,\n testId,\n}: StartTilesProps) {\n // The tiles reflow by their own container width (a docked tablet sidebar narrows it without\n // changing the viewport), choosing a column count that never leaves one tile alone on a row.\n const gridRef = useRef<HTMLDivElement>(null)\n const [columns, setColumns] = useState<number | null>(null)\n const count = items.length\n useEffect(() => {\n const grid = gridRef.current\n if (!grid || count === 0 || layout === 'carousel') return\n const measure = () => setColumns(balancedColumns(count, grid.clientWidth))\n measure()\n return observeResize(grid, measure)\n }, [count, layout])\n\n if (count === 0) return null\n return (\n <section\n className={cn('flex flex-col gap-3', className)}\n data-slot=\"start-tiles\"\n data-testid={testId}\n >\n {caption && <SectionLabel testId={captionTestId}>{caption}</SectionLabel>}\n {layout === 'carousel' ? (\n <div\n data-slot=\"start-tiles-carousel\"\n className=\"-mx-1 flex snap-x snap-mandatory gap-3 overflow-x-auto px-1 pb-1\"\n >\n {items.map((item) => (\n <StartTileCard\n key={item.id}\n item={item}\n className=\"w-60 shrink-0 snap-start pointer-coarse:w-56\"\n />\n ))}\n </div>\n ) : (\n <div\n ref={gridRef}\n data-slot=\"start-tiles-grid\"\n data-columns={columns ?? undefined}\n className=\"grid gap-3\"\n style={{\n gridTemplateColumns:\n columns === null\n ? 'repeat(auto-fit, minmax(200px, 1fr))'\n : `repeat(${columns}, minmax(0, 1fr))`,\n }}\n >\n {items.map((item) => (\n <StartTileCard key={item.id} item={item} />\n ))}\n </div>\n )}\n </section>\n )\n}\n\n/** One tile: the glyph in the AI ink, the title, and what it does (or why it cannot run now). */\nfunction StartTileCard({ item, className }: { item: StartTile; className?: string }) {\n const Icon = item.icon\n return (\n <ActionLink\n href={item.href}\n onSelect={item.onSelect}\n disabled={item.disabled}\n title={item.disabled ? item.disabledReason : undefined}\n className={cn(\n 'flex h-full flex-col items-start gap-3 rounded-lg p-4 text-left',\n 'border border-border bg-card shadow-xs transition-colors hover:border-ring/50 hover:bg-accent/40',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n 'disabled:cursor-default disabled:opacity-55 disabled:hover:bg-card disabled:hover:border-border',\n 'pointer-coarse:min-h-11',\n className\n )}\n data-slot=\"start-tile\"\n data-testid={item.testId}\n >\n {item.iconNode ? (\n <span className=\"shrink-0 text-ai-ink [&>svg]:size-5\" aria-hidden=\"true\">\n {item.iconNode}\n </span>\n ) : (\n Icon && <Icon className=\"size-5 shrink-0 text-ai-ink\" aria-hidden=\"true\" />\n )}\n <span className=\"min-w-0\">\n <span className=\"block text-sm font-semibold text-foreground\">{item.title}</span>\n <span className=\"mt-1 block text-sm leading-snug text-muted-foreground\">\n {item.disabled && item.disabledReason ? item.disabledReason : item.description}\n </span>\n </span>\n </ActionLink>\n )\n}\n"]}