@crewlethq/ui 0.55.0 → 0.57.0

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 (315) hide show
  1. package/README.md +97 -4
  2. package/dist/Accordion/index.js +2 -2
  3. package/dist/AgentHandoffPanel/index.js +14 -9
  4. package/dist/AppShell/AppShell.d.ts +84 -1
  5. package/dist/AppShell/ResizeHandle.d.ts +74 -0
  6. package/dist/AppShell/index.d.ts +7 -2
  7. package/dist/AppShell/index.js +6 -4
  8. package/dist/AppShell/regions.d.ts +36 -0
  9. package/dist/AppShell/storedWidth.d.ts +47 -0
  10. package/dist/{AppShell-5LPXYUV3.css → AppShell-ZVCJRGXH.css} +172 -1
  11. package/dist/ArrangeFrame/index.js +2 -2
  12. package/dist/ArrangeList/index.js +5 -5
  13. package/dist/ArtifactBar/ArtifactBar.d.ts +13 -2
  14. package/dist/ArtifactBar/index.js +9 -8
  15. package/dist/{ArtifactBar-UMZCTARR.css → ArtifactBar-LEBMR35Y.css} +19 -1
  16. package/dist/ArtifactCard/index.js +6 -6
  17. package/dist/ArtifactNameCell/ArtifactNameCell.d.ts +7 -1
  18. package/dist/ArtifactNameCell/index.js +1 -1
  19. package/dist/ArtifactPanel/ArtifactPanel.d.ts +11 -17
  20. package/dist/ArtifactPanel/index.d.ts +3 -0
  21. package/dist/ArtifactPanel/index.js +8 -2
  22. package/dist/ArtifactPanel-TN4FFK2F.css +43 -0
  23. package/dist/AvatarPicker/index.js +9 -8
  24. package/dist/Button/index.js +2 -1
  25. package/dist/{Button-UWKBTKYD.css → Button-VXJ7M5XF.css} +9 -32
  26. package/dist/Canvas/index.js +5 -4
  27. package/dist/CanvasBoard/index.js +7 -6
  28. package/dist/CanvasToolbar/index.js +6 -5
  29. package/dist/ChangeList/ChangeList.d.ts +114 -0
  30. package/dist/ChangeList/index.d.ts +3 -0
  31. package/dist/ChangeList/index.js +10 -0
  32. package/dist/ChangeList-CB2DLR5S.css +151 -0
  33. package/dist/ChatThread/ChatThread.d.ts +53 -0
  34. package/dist/ChatThread/index.d.ts +3 -0
  35. package/dist/ChatThread/index.js +6 -0
  36. package/dist/ChatThread-52KMDXHB.css +58 -0
  37. package/dist/Checkbox/index.js +4 -4
  38. package/dist/CodeBlock/index.js +5 -4
  39. package/dist/ColorField/index.js +4 -4
  40. package/dist/ColorSwatch/index.js +5 -4
  41. package/dist/Combobox/index.js +5 -5
  42. package/dist/CommandPalette/index.js +9 -8
  43. package/dist/CommentThread/index.js +9 -7
  44. package/dist/Composer/Composer.d.ts +39 -2
  45. package/dist/Composer/index.js +5 -4
  46. package/dist/Composer-JSGTOW3F.css +192 -0
  47. package/dist/ConfirmField/index.js +4 -4
  48. package/dist/ConflictNote/index.js +3 -2
  49. package/dist/ContrastHelp/index.js +2 -2
  50. package/dist/Copyable/index.js +4 -3
  51. package/dist/DataGrid/driving.d.ts +48 -0
  52. package/dist/DataGrid/index.d.ts +2 -0
  53. package/dist/DataGrid/index.js +8 -7
  54. package/dist/DataTable/index.js +10 -9
  55. package/dist/DataView/index.js +14 -13
  56. package/dist/DatasetSource/index.js +2 -2
  57. package/dist/DateTimePicker/index.js +4 -3
  58. package/dist/DiffList/DiffList.d.ts +12 -3
  59. package/dist/DiffList/index.d.ts +1 -1
  60. package/dist/DiffList/index.js +1 -1
  61. package/dist/{DiffList-3EX64AAE.css → DiffList-GE6YBRLJ.css} +53 -0
  62. package/dist/Disclosure/anatomy.d.ts +14 -1
  63. package/dist/Disclosure/index.js +2 -2
  64. package/dist/{Disclosure-P4FH3C35.css → Disclosure-FVMA4RW2.css} +36 -0
  65. package/dist/DocTabsEditor/index.js +8 -7
  66. package/dist/DownloadButton/DownloadButton.d.ts +21 -4
  67. package/dist/DownloadButton/index.d.ts +1 -1
  68. package/dist/DownloadButton/index.js +4 -3
  69. package/dist/EditingStatus/index.js +2 -2
  70. package/dist/{Editor-GNKMX3VF.js → Editor-S4HARQ7V.js} +8 -7
  71. package/dist/EntityList/EntityList.d.ts +37 -0
  72. package/dist/EntityList/index.d.ts +3 -0
  73. package/dist/EntityList/index.js +10 -0
  74. package/dist/EntityList-XIICECVC.css +55 -0
  75. package/dist/ErrorBoundary/index.js +3 -2
  76. package/dist/FileDrop/index.js +3 -2
  77. package/dist/FollowBanner/index.js +3 -2
  78. package/dist/HuePicker/index.js +8 -7
  79. package/dist/IconButton/IconButton.d.ts +6 -1
  80. package/dist/IconButton/index.js +1 -1
  81. package/dist/{IconButton-K24JQHLF.css → IconButton-6WA7UEBJ.css} +44 -21
  82. package/dist/IconTile/IconTile.d.ts +8 -2
  83. package/dist/IconTile/index.js +1 -1
  84. package/dist/{IconTile-4GNWTLAW.css → IconTile-G52XZVR4.css} +3 -0
  85. package/dist/InlineEditor/index.js +6 -5
  86. package/dist/Input/index.js +3 -3
  87. package/dist/LinkInterstitial/index.js +6 -5
  88. package/dist/ListInput/index.js +7 -6
  89. package/dist/LogoSlot/index.js +4 -3
  90. package/dist/MarkdownEditor/index.js +8 -7
  91. package/dist/Menu/index.js +4 -3
  92. package/dist/MergeConflicts/index.js +8 -7
  93. package/dist/MessageBubble/MessageBubble.d.ts +34 -0
  94. package/dist/MessageBubble/index.d.ts +3 -0
  95. package/dist/MessageBubble/index.js +2 -0
  96. package/dist/MessageBubble-GKO6X3QG.css +71 -0
  97. package/dist/Modal/index.js +5 -4
  98. package/dist/OpenInAppCard/OpenInAppCard.d.ts +44 -0
  99. package/dist/OpenInAppCard/index.d.ts +3 -0
  100. package/dist/OpenInAppCard/index.js +15 -0
  101. package/dist/OpenInAppCard-CKHCK7DO.css +24 -0
  102. package/dist/OrgTable/index.js +3 -3
  103. package/dist/PeekRail/PeekHost.d.ts +90 -0
  104. package/dist/PeekRail/PeekRail.d.ts +83 -0
  105. package/dist/PeekRail/activation.d.ts +30 -0
  106. package/dist/PeekRail/index.d.ts +8 -0
  107. package/dist/PeekRail/index.js +8 -0
  108. package/dist/PeekRail-4L5YUQMW.css +95 -0
  109. package/dist/PeopleRail/index.js +4 -3
  110. package/dist/PinTile/index.js +2 -2
  111. package/dist/PresenterView/index.js +5 -4
  112. package/dist/PrincipalPicker/index.js +6 -6
  113. package/dist/ProposalCard/ProposalCard.d.ts +183 -0
  114. package/dist/ProposalCard/index.d.ts +3 -0
  115. package/dist/ProposalCard/index.js +17 -0
  116. package/dist/ProposalCard-23575F4C.css +29 -0
  117. package/dist/ReceiptStrip/ReceiptStrip.d.ts +78 -0
  118. package/dist/ReceiptStrip/index.d.ts +3 -0
  119. package/dist/ReceiptStrip/index.js +5 -0
  120. package/dist/ReceiptStrip-IIRKRTBG.css +93 -0
  121. package/dist/RefusalCard/RefusalCard.d.ts +34 -0
  122. package/dist/RefusalCard/index.d.ts +3 -0
  123. package/dist/RefusalCard/index.js +10 -0
  124. package/dist/RefusalCard-UM67F5HB.css +8 -0
  125. package/dist/RelativeTime/clock.d.ts +0 -6
  126. package/dist/RelativeTime/index.js +1 -1
  127. package/dist/ResizeHandle-2UNSZ4ZQ.css +59 -0
  128. package/dist/ResultTableCard/ResultTableCard.d.ts +64 -0
  129. package/dist/ResultTableCard/index.d.ts +3 -0
  130. package/dist/ResultTableCard/index.js +16 -0
  131. package/dist/ResultTableCard-HZRUDNTX.css +40 -0
  132. package/dist/ReviewList/index.js +2 -2
  133. package/dist/RichEditor/index.js +3 -2
  134. package/dist/RunChip/RunChip.d.ts +53 -0
  135. package/dist/RunChip/index.d.ts +3 -0
  136. package/dist/RunChip/index.js +10 -0
  137. package/dist/RunChip-I2S4VZ3R.css +43 -0
  138. package/dist/SandboxedFrame/index.js +3 -2
  139. package/dist/SegmentedControl/index.js +7 -6
  140. package/dist/SelectionBar/index.js +4 -3
  141. package/dist/SendButton/SendButton.d.ts +38 -0
  142. package/dist/SendButton/index.d.ts +2 -0
  143. package/dist/SendButton/index.js +4 -0
  144. package/dist/SetupWizard/index.js +6 -5
  145. package/dist/ShareDialog/index.js +8 -7
  146. package/dist/SheetColumnEditor/index.js +13 -12
  147. package/dist/SheetGrid/index.js +7 -6
  148. package/dist/SidePanel/SidePanel.d.ts +137 -0
  149. package/dist/SidePanel/SidePanelBase.d.ts +59 -0
  150. package/dist/SidePanel/index.d.ts +5 -0
  151. package/dist/SidePanel/index.js +11 -0
  152. package/dist/SidePanel-ERBUIELD.css +235 -0
  153. package/dist/SlideCompare/index.js +3 -2
  154. package/dist/SlideFilmstrip/index.js +7 -6
  155. package/dist/SlideNav/index.js +2 -2
  156. package/dist/Spinner/Spinner.d.ts +35 -0
  157. package/dist/Spinner/index.d.ts +3 -0
  158. package/dist/Spinner/index.js +2 -0
  159. package/dist/Spinner-XZ2TVYE5.css +46 -0
  160. package/dist/StatusCard/StatusCard.d.ts +59 -0
  161. package/dist/StatusCard/index.d.ts +3 -0
  162. package/dist/StatusCard/index.js +9 -0
  163. package/dist/StatusCard-6RPEE6UU.css +62 -0
  164. package/dist/StepList-A4YVU4JI.css +119 -0
  165. package/dist/Stepper/StepList.d.ts +72 -0
  166. package/dist/Stepper/index.d.ts +3 -0
  167. package/dist/Stepper/index.js +2 -1
  168. package/dist/SuggestionRow/SuggestionRow.d.ts +45 -0
  169. package/dist/SuggestionRow/index.d.ts +3 -0
  170. package/dist/SuggestionRow/index.js +3 -0
  171. package/dist/SuggestionRow-OKBGNHSS.css +102 -0
  172. package/dist/Switcher/index.js +9 -8
  173. package/dist/Table/Table.d.ts +23 -2
  174. package/dist/Table/index.d.ts +1 -1
  175. package/dist/Table/index.js +1 -1
  176. package/dist/{Table-TGCS4C3F.css → Table-RUYMMWXT.css} +49 -0
  177. package/dist/TableCells/index.js +2 -2
  178. package/dist/Tabs/index.js +6 -5
  179. package/dist/TagsInput/index.js +4 -4
  180. package/dist/ThemeGallery/index.js +2 -2
  181. package/dist/ThemeSwitcher/index.js +8 -7
  182. package/dist/ThemeToggle/index.js +2 -2
  183. package/dist/TimeRangePicker/TimeRangePicker.d.ts +121 -0
  184. package/dist/TimeRangePicker/index.d.ts +2 -0
  185. package/dist/TimeRangePicker/index.js +23 -0
  186. package/dist/TimeWindowPicker/index.js +8 -7
  187. package/dist/Toaster/Toaster.d.ts +27 -3
  188. package/dist/Toaster/index.d.ts +2 -2
  189. package/dist/Toaster/index.js +1 -1
  190. package/dist/{Toaster-C6BQ7L6I.css → Toaster-MX7TBMC3.css} +32 -11
  191. package/dist/TreeCanvas/index.js +6 -5
  192. package/dist/TreeGrid/index.js +2 -2
  193. package/dist/VersionCompare/index.js +9 -8
  194. package/dist/VersionTimeline/index.js +4 -3
  195. package/dist/WidgetFrame/index.js +2 -2
  196. package/dist/{chunk-KHKZPZHO.js → chunk-272Y3YMV.js} +3 -3
  197. package/dist/{chunk-LACA4JGC.js → chunk-2BQYODY3.js} +1 -1
  198. package/dist/{chunk-CCPOLCZL.js → chunk-2TTFDRR3.js} +2 -2
  199. package/dist/{chunk-4BJK7FE5.js → chunk-3EYSYEXP.js} +1 -1
  200. package/dist/chunk-3LI4TRUR.js +22 -0
  201. package/dist/{chunk-ATCHK6LC.js → chunk-3NQS6KYG.js} +1 -1
  202. package/dist/{chunk-V2N3BMOT.js → chunk-45KMH3E3.js} +11 -4
  203. package/dist/{chunk-ZMBPEHYH.js → chunk-4CBGIRVU.js} +1 -1
  204. package/dist/{chunk-DFW5PDU5.js → chunk-4OINEWR4.js} +1 -1
  205. package/dist/{chunk-5XKI4ITH.js → chunk-56P72ZBE.js} +4 -4
  206. package/dist/{chunk-J24Q4HTD.js → chunk-5NT6OIPP.js} +13 -3
  207. package/dist/{chunk-O2KT7HBD.js → chunk-5OMV75GE.js} +3 -3
  208. package/dist/{chunk-6RMZH7P7.js → chunk-672GLRBU.js} +2 -2
  209. package/dist/{chunk-MFXN46NN.js → chunk-67F2AM4R.js} +3 -3
  210. package/dist/{chunk-NQCY44B3.js → chunk-67MW366X.js} +2 -2
  211. package/dist/{chunk-URV6MGWT.js → chunk-6KLK7E76.js} +2 -2
  212. package/dist/{chunk-ZFM5L7M4.js → chunk-6NJW5KSX.js} +2 -2
  213. package/dist/{chunk-A4GFEMVI.js → chunk-6T6V5565.js} +1 -1
  214. package/dist/{chunk-THDGBD6Y.js → chunk-AKFHMLEX.js} +1 -1
  215. package/dist/{chunk-CNGHOTHV.js → chunk-AWSFK2IK.js} +2 -2
  216. package/dist/{chunk-HQJ24WPM.js → chunk-AZ5BKSGV.js} +1 -1
  217. package/dist/chunk-BLPT6GHV.js +31 -0
  218. package/dist/chunk-C3FX7ZSU.js +30 -0
  219. package/dist/{chunk-LDGQIDIZ.js → chunk-CGT4R7LW.js} +64 -2
  220. package/dist/chunk-CIYHSTIF.js +182 -0
  221. package/dist/chunk-CZNG3V6L.js +55 -0
  222. package/dist/{chunk-DM4JG4M5.js → chunk-D5OSP3KI.js} +3 -3
  223. package/dist/{chunk-BTHQFWMG.js → chunk-DOPPU6TZ.js} +4 -4
  224. package/dist/{chunk-AC22RZKC.js → chunk-DRT4L4WC.js} +17 -5
  225. package/dist/chunk-EA23JG6R.js +9 -0
  226. package/dist/{chunk-WHL3XZCK.js → chunk-EBG3V4MK.js} +6 -6
  227. package/dist/{chunk-5JDHMDMQ.js → chunk-EDNZHW4K.js} +57 -7
  228. package/dist/{chunk-E6HXFFWO.js → chunk-EGL24VY5.js} +2 -2
  229. package/dist/{chunk-7SHAFLEX.js → chunk-ES4HR34Y.js} +2 -2
  230. package/dist/chunk-EVWTLFKI.js +102 -0
  231. package/dist/chunk-FA44M2YT.js +25 -0
  232. package/dist/{chunk-LKBZV5IT.js → chunk-FLTMDSC3.js} +1 -1
  233. package/dist/{chunk-XANKR3EP.js → chunk-FXQLNETQ.js} +2 -2
  234. package/dist/{chunk-G22NPQG4.js → chunk-GCASX3FD.js} +4 -4
  235. package/dist/{chunk-OGXHZHRX.js → chunk-GG4QZWMQ.js} +2 -2
  236. package/dist/{chunk-XP7EXNKF.js → chunk-GPW4M4OI.js} +2 -2
  237. package/dist/chunk-GZMEWWXW.js +78 -0
  238. package/dist/{chunk-OG6CL3EB.js → chunk-HD4QJ2SI.js} +3 -2
  239. package/dist/{chunk-SYY26XBX.js → chunk-HGCDJOEF.js} +2 -2
  240. package/dist/chunk-HGYHWWA5.js +54 -0
  241. package/dist/{chunk-ZS63CFDO.js → chunk-HL4CPLEK.js} +7 -7
  242. package/dist/{chunk-BEHFTRMZ.js → chunk-HNK43Z3P.js} +23 -5
  243. package/dist/{chunk-UO7JZVCO.js → chunk-HVEDVKXL.js} +1 -1
  244. package/dist/{chunk-FS4IH7VB.js → chunk-I7VG6RQE.js} +2 -2
  245. package/dist/{chunk-3RCHEFIL.js → chunk-ICJRP6QW.js} +2 -2
  246. package/dist/{chunk-YRIZAIU6.js → chunk-IDQBSMMZ.js} +2 -2
  247. package/dist/chunk-JILNCBBS.js +27 -0
  248. package/dist/{chunk-W5GM452Z.js → chunk-JJ3NOBJ6.js} +5 -5
  249. package/dist/chunk-JLRXCKTS.js +97 -0
  250. package/dist/{chunk-OJCVVCAZ.js → chunk-JMMS2PQU.js} +1 -1
  251. package/dist/{chunk-IVAR7NRW.js → chunk-JS2TRHBF.js} +3 -3
  252. package/dist/{chunk-3CZ7XAVY.js → chunk-KS7YIJ4S.js} +10 -6
  253. package/dist/{chunk-MU5KH3JF.js → chunk-LQ6AGUDL.js} +2 -2
  254. package/dist/chunk-LXYSWQNE.js +214 -0
  255. package/dist/chunk-LZXY6IMO.js +68 -0
  256. package/dist/{chunk-EKLEYNGR.js → chunk-MYX4XABB.js} +3 -3
  257. package/dist/{chunk-PM3JVNRY.js → chunk-N3ISZVLK.js} +1 -1
  258. package/dist/chunk-NEHSV55H.js +119 -0
  259. package/dist/{chunk-LLHO4FJK.js → chunk-NHJQXDHA.js} +1 -1
  260. package/dist/{chunk-F6CKQX5D.js → chunk-NK3D66PB.js} +2 -2
  261. package/dist/{chunk-RHPBTE3F.js → chunk-NQGZRMUG.js} +1 -1
  262. package/dist/chunk-NVZCANJ5.js +3 -0
  263. package/dist/{chunk-RRO7UEYU.js → chunk-OHBXOEP3.js} +1 -1
  264. package/dist/{chunk-USVUSO3S.js → chunk-OHG7762N.js} +1 -1
  265. package/dist/{chunk-OBUQVGEG.js → chunk-OJ2QULVH.js} +1 -1
  266. package/dist/{chunk-ITTECHM4.js → chunk-OOZ5AGPS.js} +5 -5
  267. package/dist/{chunk-BZXY2L2D.js → chunk-OYAXKHVW.js} +1 -1
  268. package/dist/{chunk-WQQ5T5SA.js → chunk-OZIBNFLO.js} +1 -1
  269. package/dist/{chunk-DFK5EQTU.js → chunk-PDTEPN4D.js} +1 -1
  270. package/dist/chunk-PIYJNCN7.js +124 -0
  271. package/dist/{chunk-ZVV2VERB.js → chunk-Q6R6EUQ4.js} +3 -3
  272. package/dist/chunk-QYEOGGVS.js +161 -0
  273. package/dist/{chunk-NWGGH2LN.js → chunk-QZ4B72FP.js} +3 -3
  274. package/dist/chunk-RV2FGESF.js +98 -0
  275. package/dist/{chunk-TQ3C3Q7V.js → chunk-S5C64PTT.js} +1 -1
  276. package/dist/chunk-SDSBVVLL.js +45 -0
  277. package/dist/{chunk-ZNOXQACX.js → chunk-T4D7RZNI.js} +2 -2
  278. package/dist/{chunk-TDVPYBNL.js → chunk-TA72CURM.js} +1 -1
  279. package/dist/{chunk-WXOYHVWG.js → chunk-TD3UHDFY.js} +4 -4
  280. package/dist/{chunk-H7FUQCQY.js → chunk-TDQZ4LB5.js} +8 -6
  281. package/dist/chunk-TFGCNBWP.js +64 -0
  282. package/dist/{chunk-TMM32U7D.js → chunk-TKS7FTTO.js} +2 -2
  283. package/dist/{chunk-NKHS2RQ2.js → chunk-U5PJSGHG.js} +1 -1
  284. package/dist/{chunk-7CGPPAYR.js → chunk-UV4LOQ3E.js} +1 -1
  285. package/dist/{chunk-ON2E46DX.js → chunk-VRNUKH2W.js} +1 -1
  286. package/dist/{chunk-XX2VQE55.js → chunk-WBRC3MNE.js} +1 -1
  287. package/dist/{chunk-NTZQN7OR.js → chunk-WBTCOFMZ.js} +2 -2
  288. package/dist/chunk-WDIVALLP.js +51 -0
  289. package/dist/{chunk-QMIWMLFI.js → chunk-WOW5SCEK.js} +1 -1
  290. package/dist/chunk-XODESBSR.js +250 -0
  291. package/dist/{chunk-EJWPYEG4.js → chunk-XRZGGB6I.js} +1 -1
  292. package/dist/{chunk-34C7NYIQ.js → chunk-Y73BQL74.js} +1 -1
  293. package/dist/{chunk-KIRQZG3G.js → chunk-YCGZK2E4.js} +1 -1
  294. package/dist/{chunk-5TK3C6RG.js → chunk-YCZ2FBKA.js} +1 -1
  295. package/dist/{chunk-TV2QW6GX.js → chunk-YEURM24I.js} +3 -3
  296. package/dist/{chunk-34ANLQW2.js → chunk-YGC7BFX2.js} +211 -9
  297. package/dist/{chunk-IW55G7XG.js → chunk-YNRKVY7X.js} +11 -1
  298. package/dist/{chunk-LFHCXZO5.js → chunk-Z3GDMNMU.js} +3 -3
  299. package/dist/{chunk-LQPU5O3B.js → chunk-Z7PJF6F3.js} +3 -3
  300. package/dist/{chunk-HDHL773Z.js → chunk-ZH4MJM73.js} +1 -1
  301. package/dist/generated/index.d.ts +17 -0
  302. package/dist/generated/index.js +140 -121
  303. package/dist/index.js +140 -121
  304. package/dist/styles.css +1887 -218
  305. package/dist/utils/index.js +1 -1
  306. package/dist/utils/useDownload.d.ts +6 -0
  307. package/package.json +3 -3
  308. package/dist/ArtifactPanel-KKUUIPEU.css +0 -159
  309. package/dist/Composer-TXULCPPV.css +0 -99
  310. package/dist/chunk-4E5MWUUJ.js +0 -48
  311. package/dist/chunk-FZVJDJFN.js +0 -54
  312. package/dist/chunk-IXJHTFXG.js +0 -17
  313. package/dist/chunk-NBDN5JZV.js +0 -123
  314. package/dist/{chunk-UTESMBPL.js → chunk-ESUZ27TS.js} +1 -1
  315. /package/dist/{chunk-55MPFB2U.js → chunk-EWTPXRRM.js} +0 -0
@@ -0,0 +1,250 @@
1
+ import { HeadingLevelProvider } from './chunk-PQADV6P6.js';
2
+ import { useAppShellAside, ResizeHandle } from './chunk-PIYJNCN7.js';
3
+ import { useModalLayer } from './chunk-H5XTJ7GJ.js';
4
+ import { IconButton } from './chunk-2BQYODY3.js';
5
+ import { cx } from './chunk-ODEQTPFM.js';
6
+ import { createContext, useId, useRef, useContext, useLayoutEffect, useEffect, useMemo } from 'react';
7
+ import { MinimizeGlyph, MaximizeGlyph, XGlyph } from '@crewlethq/icons/glyphs';
8
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
9
+
10
+ var SidePanelFrameContext = createContext(null);
11
+ function part(name, alias) {
12
+ return cx(`crewlet-side-panel__${name}`, alias && `${alias}__${name}`);
13
+ }
14
+ function SidePanelBase({
15
+ alias,
16
+ title,
17
+ icon,
18
+ onClose,
19
+ closeLabel,
20
+ actions,
21
+ footer,
22
+ flush = false,
23
+ initialFocus = "heading",
24
+ ringHeading = false,
25
+ hideTitle = false,
26
+ expanded = false,
27
+ onExpandedChange,
28
+ expandLabel = "Expand",
29
+ collapseLabel = "Collapse",
30
+ width,
31
+ minWidth = 0,
32
+ maxWidth,
33
+ defaultWidth,
34
+ onWidthChange,
35
+ onWidthCommit,
36
+ resizable = false,
37
+ resizeLabel,
38
+ className,
39
+ children
40
+ }) {
41
+ const titleId = useId();
42
+ const panelId = useId();
43
+ const root = useRef(null);
44
+ const heading = useRef(null);
45
+ const before = useRef(null);
46
+ const start = useRef(initialFocus);
47
+ const inShell = useAppShellAside() !== null;
48
+ const frame = useContext(SidePanelFrameContext);
49
+ const shape = frame?.shape ?? null;
50
+ const modal = !inShell && shape === "sheet";
51
+ const role = inShell ? void 0 : modal ? "dialog" : "complementary";
52
+ useLayoutEffect(() => {
53
+ const panel = root.current;
54
+ before.current = document.activeElement;
55
+ const target = start.current;
56
+ if (target === "heading") heading.current?.focus({ preventScroll: true });
57
+ else if (target !== "none") target.current?.focus({ preventScroll: true });
58
+ return () => {
59
+ const back = before.current;
60
+ if (panel?.contains(document.activeElement) && back instanceof HTMLElement && back.isConnected) {
61
+ back.focus({ preventScroll: true });
62
+ }
63
+ };
64
+ }, []);
65
+ const close = useRef(onClose);
66
+ close.current = onClose;
67
+ useEffect(() => {
68
+ const panel = root.current;
69
+ if (!panel) return void 0;
70
+ const doc = panel.ownerDocument;
71
+ const onKeyDown = (event) => {
72
+ if (event.key !== "Escape" || event.defaultPrevented || event.isComposing) return;
73
+ if (!(event.target instanceof Node) || !panel.contains(event.target)) return;
74
+ event.preventDefault();
75
+ close.current();
76
+ };
77
+ doc.addEventListener("keydown", onKeyDown);
78
+ return () => doc.removeEventListener("keydown", onKeyDown);
79
+ }, []);
80
+ const sized = !inShell && !expanded && width !== void 0;
81
+ const grip = resizable && !inShell && !expanded && (shape === null || shape === "column") && width !== void 0 && onWidthChange;
82
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
83
+ /* @__PURE__ */ jsxs(
84
+ "div",
85
+ {
86
+ ref: root,
87
+ id: panelId,
88
+ className: cx("crewlet-side-panel", inShell && "crewlet-side-panel--fill", alias, className),
89
+ role,
90
+ "aria-modal": modal || void 0,
91
+ "aria-labelledby": inShell ? void 0 : titleId,
92
+ "data-expanded": expanded || void 0,
93
+ style: sized ? { ["--crewlet-side-panel-width"]: `${width}px` } : void 0,
94
+ children: [
95
+ grip ? /* @__PURE__ */ jsx(
96
+ ResizeHandle,
97
+ {
98
+ label: resizeLabel ?? `Resize ${title}`,
99
+ value: width,
100
+ min: minWidth,
101
+ max: maxWidth ?? width,
102
+ defaultValue: defaultWidth,
103
+ onValueChange: onWidthChange,
104
+ onValueCommit: onWidthCommit,
105
+ controls: panelId,
106
+ edge: "left"
107
+ }
108
+ ) : null,
109
+ /* @__PURE__ */ jsxs("div", { className: part("head", alias), children: [
110
+ icon ? /* @__PURE__ */ jsx("span", { className: part("icon", alias), "aria-hidden": true, children: icon }) : null,
111
+ /* @__PURE__ */ jsx(
112
+ "h2",
113
+ {
114
+ ref: heading,
115
+ id: titleId,
116
+ className: cx(
117
+ part("title", alias),
118
+ !ringHeading && "crewlet-side-panel__title--quiet",
119
+ hideTitle && "crewlet-side-panel__title--hidden"
120
+ ),
121
+ tabIndex: -1,
122
+ children: title
123
+ }
124
+ ),
125
+ /* @__PURE__ */ jsxs("span", { className: part("actions", alias), children: [
126
+ actions,
127
+ onExpandedChange ? /* @__PURE__ */ jsx(
128
+ IconButton,
129
+ {
130
+ label: expanded ? collapseLabel : expandLabel,
131
+ icon: expanded ? /* @__PURE__ */ jsx(MinimizeGlyph, { size: "sm" }) : /* @__PURE__ */ jsx(MaximizeGlyph, { size: "sm" }),
132
+ size: "sm",
133
+ variant: "ghost",
134
+ onClick: () => onExpandedChange(!expanded)
135
+ }
136
+ ) : null,
137
+ /* @__PURE__ */ jsx(IconButton, { label: closeLabel, icon: /* @__PURE__ */ jsx(XGlyph, { size: "sm" }), size: "sm", variant: "ghost", onClick: onClose })
138
+ ] })
139
+ ] }),
140
+ /* @__PURE__ */ jsx("div", { className: cx(part("body", alias), flush && "crewlet-side-panel__body--flush"), children: /* @__PURE__ */ jsx(HeadingLevelProvider, { level: 3, children }) }),
141
+ footer ? /* @__PURE__ */ jsx("div", { className: part("foot", alias), children: footer }) : null
142
+ ]
143
+ }
144
+ ),
145
+ modal ? /* @__PURE__ */ jsx(SheetLayer, { panel: root, onClose }) : null
146
+ ] });
147
+ }
148
+ function SheetLayer({ panel, onClose }) {
149
+ const layer = useModalLayer({ onClose });
150
+ const { panelRef } = layer;
151
+ useLayoutEffect(() => {
152
+ panelRef(panel.current);
153
+ return () => panelRef(null);
154
+ }, [panelRef, panel]);
155
+ return null;
156
+ }
157
+ var SIDE_PANEL_WIDTH = 420;
158
+ var SIDE_PANEL_MIN_WIDTH = 360;
159
+ var SIDE_PANEL_MAX_WIDTH = 640;
160
+ var SIDE_PANEL_LABELS = {
161
+ close: (title) => `Close ${title}`,
162
+ resize: (title) => `Resize ${title}`
163
+ };
164
+ function SidePanel({
165
+ title,
166
+ icon,
167
+ hideTitle,
168
+ onClose,
169
+ actions,
170
+ footer,
171
+ flush,
172
+ width,
173
+ minWidth = SIDE_PANEL_MIN_WIDTH,
174
+ maxWidth = SIDE_PANEL_MAX_WIDTH,
175
+ defaultWidth = SIDE_PANEL_WIDTH,
176
+ onWidthChange,
177
+ onWidthCommit,
178
+ resizable,
179
+ initialFocus,
180
+ labels,
181
+ className,
182
+ children
183
+ }) {
184
+ const words = { ...SIDE_PANEL_LABELS, ...labels };
185
+ return /* @__PURE__ */ jsx(
186
+ SidePanelBase,
187
+ {
188
+ title,
189
+ icon,
190
+ hideTitle,
191
+ onClose,
192
+ closeLabel: words.close(title),
193
+ resizeLabel: words.resize(title),
194
+ actions,
195
+ footer,
196
+ flush,
197
+ width: width ?? (resizable ? defaultWidth : void 0),
198
+ minWidth,
199
+ maxWidth,
200
+ defaultWidth,
201
+ onWidthChange,
202
+ onWidthCommit,
203
+ resizable,
204
+ initialFocus,
205
+ className,
206
+ children
207
+ }
208
+ );
209
+ }
210
+ function SidePanelFrameBase({
211
+ alias,
212
+ panel,
213
+ shape,
214
+ reserve,
215
+ expanded = false,
216
+ bodyRef,
217
+ bodyClassName,
218
+ bodyLabel,
219
+ className,
220
+ children
221
+ }) {
222
+ const context = useMemo(() => ({ shape: shape ?? null }), [shape]);
223
+ return /* @__PURE__ */ jsx(SidePanelFrameContext.Provider, { value: context, children: /* @__PURE__ */ jsxs(
224
+ "div",
225
+ {
226
+ className: cx("crewlet-side-panel-frame", alias, className),
227
+ "data-shape": shape ?? "auto",
228
+ "data-panel": panel ? expanded ? "expanded" : "open" : void 0,
229
+ style: reserve === void 0 ? void 0 : { ["--crewlet-side-panel-reserve"]: `${reserve}px` },
230
+ children: [
231
+ /* @__PURE__ */ jsx(
232
+ "div",
233
+ {
234
+ ref: bodyRef,
235
+ className: cx("crewlet-side-panel-frame__body", alias && `${alias}__body`, bodyClassName),
236
+ role: bodyLabel ? "region" : void 0,
237
+ "aria-label": bodyLabel,
238
+ children
239
+ }
240
+ ),
241
+ panel
242
+ ]
243
+ }
244
+ ) });
245
+ }
246
+ function SidePanelFrame(props) {
247
+ return /* @__PURE__ */ jsx(SidePanelFrameBase, { ...props });
248
+ }
249
+
250
+ export { SIDE_PANEL_LABELS, SIDE_PANEL_MAX_WIDTH, SIDE_PANEL_MIN_WIDTH, SIDE_PANEL_WIDTH, SidePanel, SidePanelBase, SidePanelFrame, SidePanelFrameBase };
@@ -1,4 +1,4 @@
1
- import { toISO, useNow, formatRelative } from './chunk-3CZ7XAVY.js';
1
+ import { toISO, useNow, formatRelative } from './chunk-KS7YIJ4S.js';
2
2
  import { cx } from './chunk-ODEQTPFM.js';
3
3
  import './EditingStatus-YU7EGM6Y.css';
4
4
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
@@ -1,5 +1,5 @@
1
1
  import { Callout } from './chunk-BPCY7ZID.js';
2
- import { Button } from './chunk-OG6CL3EB.js';
2
+ import { Button } from './chunk-HD4QJ2SI.js';
3
3
  import { isComposing } from './chunk-H5XTJ7GJ.js';
4
4
  import { cx } from './chunk-ODEQTPFM.js';
5
5
  import { useEffect } from 'react';
@@ -1,6 +1,6 @@
1
1
  import { ContrastLevelTag } from './chunk-WW7TU6HE.js';
2
2
  import { Popover } from './chunk-KHJIEPZV.js';
3
- import { IconButton } from './chunk-LACA4JGC.js';
3
+ import { IconButton } from './chunk-2BQYODY3.js';
4
4
  import { cx } from './chunk-ODEQTPFM.js';
5
5
  import './ContrastHelp-MZCAW5WQ.css';
6
6
  import { InfoGlyph } from '@crewlethq/icons/glyphs';
@@ -1,5 +1,5 @@
1
1
  import { useTreeState, useMeasuredSizes, layoutForest, treeAncestors, useLayoutAnchor, treeExpandable, layoutConnectors, treeItemAction, treeStep, treePosInSet, treeSetSize, treeLevel, placeGroups } from './chunk-MY374UUD.js';
2
- import { CANVAS_COMPOSE_CONTEXT, CANVAS_FIT_MAX_ZOOM, Canvas } from './chunk-TV2QW6GX.js';
2
+ import { CANVAS_COMPOSE_CONTEXT, CANVAS_FIT_MAX_ZOOM, Canvas } from './chunk-YEURM24I.js';
3
3
  import { focusables } from './chunk-H5XTJ7GJ.js';
4
4
  import { cx } from './chunk-ODEQTPFM.js';
5
5
  import './TreeCanvas-QA3PDFTK.css';
@@ -1,9 +1,9 @@
1
1
  import { LayerNodeBridge } from './chunk-LM3ISVJA.js';
2
2
  import { Tooltip } from './chunk-I33UIUZD.js';
3
- import { LAYER_REPOSITION_EVENT, LayerHost } from './chunk-OMV5W53A.js';
4
3
  import { Kbd } from './chunk-SMBKXWML.js';
5
- import { Button } from './chunk-OG6CL3EB.js';
6
- import { IconButton } from './chunk-LACA4JGC.js';
4
+ import { Button } from './chunk-HD4QJ2SI.js';
5
+ import { LAYER_REPOSITION_EVENT, LayerHost } from './chunk-OMV5W53A.js';
6
+ import { IconButton } from './chunk-2BQYODY3.js';
7
7
  import { returnFocus } from './chunk-NUZHC6MM.js';
8
8
  import { VisuallyHidden } from './chunk-BZFWDIV6.js';
9
9
  import { cx } from './chunk-ODEQTPFM.js';
@@ -1,12 +1,15 @@
1
1
  import { useMediaMatch } from './chunk-RTPQDNW3.js';
2
- import { Menu } from './chunk-TMM32U7D.js';
2
+ import { Menu } from './chunk-TKS7FTTO.js';
3
+ import { PeekContext, AsideContext, ResizeHandle, clampSize } from './chunk-PIYJNCN7.js';
3
4
  import { HIT_AREA_CLASS } from './chunk-2YTOOH3A.js';
4
- import { useModalLayer, focusables } from './chunk-H5XTJ7GJ.js';
5
- import { IconButton } from './chunk-LACA4JGC.js';
5
+ import { focusables, useModalLayer, isComposing, layerCount } from './chunk-H5XTJ7GJ.js';
6
+ import { IconButton } from './chunk-2BQYODY3.js';
7
+ import { returnFocus } from './chunk-NUZHC6MM.js';
6
8
  import { VisuallyHidden } from './chunk-BZFWDIV6.js';
7
9
  import { cx } from './chunk-ODEQTPFM.js';
8
10
  import './HitArea-QUOS6ZDJ.css';
9
- import './AppShell-5LPXYUV3.css';
11
+ import './AppShell-ZVCJRGXH.css';
12
+ import './ResizeHandle-2UNSZ4ZQ.css';
10
13
  import { createContext, forwardRef, useContext, useId, useState, useRef, useCallback, useEffect, useLayoutEffect } from 'react';
11
14
  import { breakpoint } from '@crewlethq/tokens';
12
15
  import { ChevronUpGlyph, ChevronsUpDownGlyph, ChevronRightGlyph, MenuGlyph } from '@crewlethq/icons/glyphs';
@@ -76,6 +79,7 @@ function AccountRow({
76
79
  actions ? /* @__PURE__ */ jsx("div", { className: "crewlet-account-row__actions", children: actions }) : null
77
80
  ] });
78
81
  }
82
+ var APP_SHELL_ASIDE_WIDTH = 420;
79
83
  var NARROW = `(width < ${breakpoint.shell})`;
80
84
  var AppShellContext = createContext(null);
81
85
  function useAppShell() {
@@ -94,11 +98,23 @@ function AppShell({
94
98
  navigationKey,
95
99
  toggleLabel = "Sections",
96
100
  skipLabel = "Skip to content",
101
+ aside,
102
+ asideWidth = APP_SHELL_ASIDE_WIDTH,
103
+ asideReserve,
104
+ asideLabel,
105
+ asideShape = "column",
106
+ asideModal = true,
107
+ onAsideClose,
108
+ asideResize,
109
+ peek,
110
+ peekShape = "column",
97
111
  className,
98
112
  style,
99
113
  children,
100
114
  ...rest
101
115
  }) {
116
+ const hasAside = aside !== void 0 && aside !== null && aside !== false;
117
+ const hasPeek = peek !== void 0 && peek !== null && peek !== false;
102
118
  const generatedId = useId();
103
119
  const railId = `${generatedId}-rail`;
104
120
  const main = mainId ?? `${generatedId}-main`;
@@ -132,6 +148,25 @@ function AppShell({
132
148
  observer.observe(scroller);
133
149
  return () => observer.disconnect();
134
150
  }, [scroller]);
151
+ const root = useRef(null);
152
+ const sheet = useRef(null);
153
+ const asideColumn = hasAside && asideShape === "column";
154
+ const [occupied, setOccupied] = useState(null);
155
+ useLayoutEffect(() => {
156
+ const frame = root.current;
157
+ const page = sheet.current;
158
+ if (!asideColumn || !frame || !page) {
159
+ setOccupied(null);
160
+ return void 0;
161
+ }
162
+ const measure = () => setOccupied(Math.max(0, Math.round(frame.getBoundingClientRect().right - page.getBoundingClientRect().right)));
163
+ measure();
164
+ if (typeof ResizeObserver === "undefined") return void 0;
165
+ const observer = new ResizeObserver(measure);
166
+ observer.observe(page);
167
+ observer.observe(frame);
168
+ return () => observer.disconnect();
169
+ }, [asideColumn]);
135
170
  const shell = {
136
171
  narrow,
137
172
  drawerOpen,
@@ -147,6 +182,7 @@ function AppShell({
147
182
  "div",
148
183
  {
149
184
  ...rest,
185
+ ref: root,
150
186
  className: cx(
151
187
  "crewlet-app-shell",
152
188
  fill && "crewlet-app-shell--fill",
@@ -155,10 +191,21 @@ function AppShell({
155
191
  !shell.hasRail && "crewlet-app-shell--no-rail",
156
192
  className
157
193
  ),
194
+ "data-aside": hasAside ? asideShape : void 0,
195
+ "data-peek": hasPeek ? peekShape : void 0,
158
196
  style: {
159
197
  ...style,
160
198
  ["--crewlet-app-shell-gutter"]: `${gutter}px`,
161
- ...drawerZ === null ? null : { ["--crewlet-app-shell-drawer-z"]: String(drawerZ) }
199
+ ...drawerZ === null ? null : { ["--crewlet-app-shell-drawer-z"]: String(drawerZ) },
200
+ // The aside's width is published on the ROOT, because two things
201
+ // read it from opposite sides: the grid track that sizes the column
202
+ // is declared here, and the overlay that sizes itself is a
203
+ // descendant. A custom property inherits downward only.
204
+ ...hasAside ? {
205
+ ["--crewlet-app-shell-aside"]: `${asideWidth}px`,
206
+ ...asideReserve === void 0 ? null : { ["--crewlet-app-shell-aside-reserve"]: `${asideReserve}px` }
207
+ } : null,
208
+ ...occupied === null ? null : { ["--crewlet-app-shell-aside-occupied"]: `${occupied}px` }
162
209
  },
163
210
  children: [
164
211
  /* @__PURE__ */ jsx(
@@ -187,16 +234,134 @@ function AppShell({
187
234
  children: sidebar
188
235
  }
189
236
  ) : null,
190
- /* @__PURE__ */ jsxs("div", { className: "crewlet-app-shell__sheet", children: [
237
+ /* @__PURE__ */ jsxs("div", { ref: sheet, className: "crewlet-app-shell__sheet", children: [
191
238
  topbar,
192
239
  banner ? /* @__PURE__ */ jsx("div", { className: "crewlet-app-shell__banner", children: banner }) : null,
193
- /* @__PURE__ */ jsx("main", { id: main, ref: setMain, className: "crewlet-app-shell__main", tabIndex: -1, children: /* @__PURE__ */ jsx("div", { className: "crewlet-app-shell__content", children }) }),
240
+ /* @__PURE__ */ jsxs("div", { className: "crewlet-app-shell__body", children: [
241
+ /* @__PURE__ */ jsx("main", { id: main, ref: setMain, className: "crewlet-app-shell__main", tabIndex: -1, children: /* @__PURE__ */ jsx("div", { className: "crewlet-app-shell__content", children }) }),
242
+ hasPeek ? /* @__PURE__ */ jsx(PeekContext.Provider, { value: { shape: peekShape }, children: peek }) : null
243
+ ] }),
194
244
  footer
195
- ] })
245
+ ] }),
246
+ hasAside ? /* @__PURE__ */ jsx(
247
+ ShellAside,
248
+ {
249
+ shape: asideShape,
250
+ modal: asideShape === "sheet" || asideShape === "overlay" && asideModal,
251
+ label: asideLabel,
252
+ width: asideWidth,
253
+ resize: asideResize,
254
+ onClose: onAsideClose,
255
+ children: aside
256
+ }
257
+ ) : null
196
258
  ]
197
259
  }
198
260
  ) });
199
261
  }
262
+ function ShellAside({ shape, modal, label, width, resize, onClose, children }) {
263
+ const region = useRef(null);
264
+ const surfaceId = useId();
265
+ useLooseOverlay(region, shape === "overlay" && !modal, onClose);
266
+ const [z, setZ] = useState(null);
267
+ return /* @__PURE__ */ jsxs(AsideContext.Provider, { value: { shape }, children: [
268
+ /* @__PURE__ */ jsxs(
269
+ "div",
270
+ {
271
+ ref: region,
272
+ className: "crewlet-app-shell__aside",
273
+ "data-shape": shape,
274
+ role: modal ? "dialog" : "complementary",
275
+ "aria-modal": modal || void 0,
276
+ "aria-label": label,
277
+ tabIndex: modal || shape === "overlay" ? -1 : void 0,
278
+ "data-modal": modal ? "true" : "false",
279
+ style: modal && z !== null ? { zIndex: z + 1 } : void 0,
280
+ children: [
281
+ shape === "column" && resize ? /* @__PURE__ */ jsx(
282
+ ResizeHandle,
283
+ {
284
+ label: resize.label,
285
+ value: width,
286
+ min: resize.min,
287
+ max: resize.max,
288
+ defaultValue: resize.defaultValue,
289
+ onValueChange: resize.onChange,
290
+ onValueCommit: resize.onCommit,
291
+ controls: surfaceId,
292
+ edge: "left"
293
+ }
294
+ ) : null,
295
+ /* @__PURE__ */ jsx("div", { id: surfaceId, className: "crewlet-app-shell__aside-sheet", children })
296
+ ]
297
+ }
298
+ ),
299
+ modal ? /* @__PURE__ */ jsx(AsideVeil, { region, onClose, onZIndex: setZ }) : null
300
+ ] });
301
+ }
302
+ function useLooseOverlay(region, active, onClose) {
303
+ const [opener] = useState(() => typeof document === "undefined" ? null : document.activeElement);
304
+ const loose = useRef(active);
305
+ loose.current = active;
306
+ const close = useRef(onClose);
307
+ close.current = onClose;
308
+ useEffect(() => {
309
+ const panel = region.current;
310
+ if (!loose.current || !panel || panel.contains(document.activeElement)) return;
311
+ (focusables(panel)[0] ?? panel).focus();
312
+ }, [region]);
313
+ useLayoutEffect(() => {
314
+ const panel = region.current;
315
+ return () => {
316
+ if (!loose.current || !panel?.contains(document.activeElement)) return;
317
+ if (opener instanceof HTMLElement && opener.isConnected && opener !== document.body) returnFocus(opener);
318
+ };
319
+ }, [region, opener]);
320
+ useEffect(() => {
321
+ const panel = region.current;
322
+ if (!active || !panel) return void 0;
323
+ const doc = panel.ownerDocument;
324
+ const onKeyDown = (event) => {
325
+ if (event.key !== "Escape" || event.defaultPrevented || isComposing(event)) return;
326
+ if (!(event.target instanceof Node) || !panel.contains(event.target)) return;
327
+ if (layerCount() > 0 || !close.current) return;
328
+ event.preventDefault();
329
+ close.current();
330
+ };
331
+ doc.addEventListener("keydown", onKeyDown);
332
+ return () => doc.removeEventListener("keydown", onKeyDown);
333
+ }, [active, region]);
334
+ }
335
+ function AsideVeil({
336
+ region,
337
+ onClose,
338
+ onZIndex
339
+ }) {
340
+ const layer = useModalLayer({
341
+ onClose: () => onClose?.(),
342
+ // A modal that nothing can close keeps Escape and its veil from doing
343
+ // anything rather than pretending to: the host gave no way to close it.
344
+ dismissable: onClose !== void 0
345
+ });
346
+ const { panelRef, zIndex } = layer;
347
+ useEffect(() => {
348
+ onZIndex(zIndex);
349
+ return () => onZIndex(null);
350
+ }, [onZIndex, zIndex]);
351
+ useLayoutEffect(() => {
352
+ panelRef(region.current);
353
+ return () => panelRef(null);
354
+ }, [panelRef, region]);
355
+ return /* @__PURE__ */ jsx(
356
+ "div",
357
+ {
358
+ className: "crewlet-app-shell__veil crewlet-app-shell__aside-veil",
359
+ ref: layer.veilRef,
360
+ role: "presentation",
361
+ style: { zIndex }
362
+ }
363
+ );
364
+ }
200
365
  function ShellDrawer({
201
366
  rail,
202
367
  onClose,
@@ -395,5 +560,42 @@ AppShell.RailStatus = AppShellRailStatus;
395
560
  AppShell.Topbar = AppShellTopbar;
396
561
  AppShell.Toggle = AppShellToggle;
397
562
  AppShell.AccountRow = AccountRow;
563
+ AppShell.ResizeHandle = ResizeHandle;
564
+ function defaultStorage() {
565
+ try {
566
+ return typeof window === "undefined" ? null : window.localStorage;
567
+ } catch {
568
+ return null;
569
+ }
570
+ }
571
+ function readStoredWidth(storage, key, min, max) {
572
+ if (!storage) return null;
573
+ try {
574
+ const stored = storage.getItem(key);
575
+ if (stored === null || stored.trim() === "") return null;
576
+ const value = Number(stored);
577
+ return Number.isFinite(value) && value >= min && value <= max ? Math.round(value) : null;
578
+ } catch {
579
+ return null;
580
+ }
581
+ }
582
+ function useStoredWidth({ key, min, max, storage }) {
583
+ const [store] = useState(() => storage === void 0 ? defaultStorage() : storage);
584
+ const [width, setStored] = useState(() => readStoredWidth(store, key, min, max));
585
+ const setWidth = useCallback((px) => setStored(clampSize(px, min, max)), [min, max]);
586
+ const commitWidth = useCallback(
587
+ (px) => {
588
+ const next = clampSize(px, min, max);
589
+ setStored(next);
590
+ if (!store) return;
591
+ try {
592
+ store.setItem(key, String(next));
593
+ } catch {
594
+ }
595
+ },
596
+ [key, min, max, store]
597
+ );
598
+ return { width, setWidth, commitWidth };
599
+ }
398
600
 
399
- export { AccountRow, AppShell, AppShellRail, AppShellRailRow, AppShellRailStatus, AppShellToggle, AppShellTopbar, useAppShell };
601
+ export { APP_SHELL_ASIDE_WIDTH, AccountRow, AppShell, AppShellRail, AppShellRailRow, AppShellRailStatus, AppShellToggle, AppShellTopbar, readStoredWidth, useAppShell, useStoredWidth };
@@ -9,8 +9,18 @@ function useDownload(options = {}) {
9
9
  (text, filename, mime = DEFAULT_MIME) => run(() => downloadText(typeof text === "function" ? text() : text, filename, mime).started),
10
10
  [run]
11
11
  );
12
+ const downloadFile = useCallback(
13
+ (file, filename) => run(async () => {
14
+ try {
15
+ return downloadBlob(await file(), filename).started;
16
+ } catch {
17
+ return false;
18
+ }
19
+ }),
20
+ [run]
21
+ );
12
22
  const state = outcome.state === "done" ? "started" : outcome.state;
13
- return { state, attempt: outcome.attempt, download };
23
+ return { state, attempt: outcome.attempt, download, downloadFile };
14
24
  }
15
25
  function downloadText(text, filename, mime = DEFAULT_MIME) {
16
26
  if (typeof Blob === "undefined") return { started: false, name: safeFilename(filename) };
@@ -1,6 +1,6 @@
1
1
  import { VisuallyHidden } from './chunk-BZFWDIV6.js';
2
2
  import { cx } from './chunk-ODEQTPFM.js';
3
- import './DiffList-3EX64AAE.css';
3
+ import './DiffList-GE6YBRLJ.css';
4
4
  import { DiffGlyph, MinusGlyph, PlusGlyph, ArrowRightGlyph } from '@crewlethq/icons/glyphs';
5
5
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
6
6
 
@@ -15,7 +15,7 @@ var GLYPHS = {
15
15
  removed: MinusGlyph,
16
16
  changed: DiffGlyph
17
17
  };
18
- function DiffList({ rows, emptyMessage, labels: overrides, className }) {
18
+ function DiffList({ rows, emptyMessage, layout = "columns", labels: overrides, className }) {
19
19
  const labels = overrides ? { ...DIFF_LIST_LABELS, ...overrides } : DIFF_LIST_LABELS;
20
20
  if (rows.length === 0 && emptyMessage != null) {
21
21
  return /* @__PURE__ */ jsx("p", { className: "crewlet-diff-list__empty", children: emptyMessage });
@@ -25,7 +25,7 @@ function DiffList({ rows, emptyMessage, labels: overrides, className }) {
25
25
  // list role with them, so "12 differences" would never be read. The
26
26
  // redundant-role rule is silenced for that reason, not obeyed.
27
27
  // eslint-disable-next-line jsx-a11y/no-redundant-roles
28
- /* @__PURE__ */ jsx("ul", { role: "list", className: cx("crewlet-diff-list", className), children: rows.map((row, index) => {
28
+ /* @__PURE__ */ jsx("ul", { role: "list", className: cx("crewlet-diff-list", layout !== "columns" && `crewlet-diff-list--${layout}`, className), children: rows.map((row, index) => {
29
29
  const Glyph = GLYPHS[row.kind];
30
30
  return /* @__PURE__ */ jsxs(
31
31
  "li",
@@ -1,9 +1,9 @@
1
- import { Modal } from './chunk-NWGGH2LN.js';
1
+ import { Modal } from './chunk-QZ4B72FP.js';
2
2
  import { useListbox, useHighlightRest } from './chunk-7KHM2FZH.js';
3
- import { HIT_AREA_CLASS } from './chunk-2YTOOH3A.js';
4
3
  import { Kbd } from './chunk-SMBKXWML.js';
5
- import { Input } from './chunk-XANKR3EP.js';
4
+ import { Input } from './chunk-FXQLNETQ.js';
6
5
  import { Count } from './chunk-BHHIIK3M.js';
6
+ import { HIT_AREA_CLASS } from './chunk-2YTOOH3A.js';
7
7
  import { isComposing } from './chunk-H5XTJ7GJ.js';
8
8
  import { VisuallyHidden } from './chunk-BZFWDIV6.js';
9
9
  import { cx } from './chunk-ODEQTPFM.js';
@@ -1,5 +1,5 @@
1
- import { ConfirmModal } from './chunk-NWGGH2LN.js';
2
1
  import { InlineCode } from './chunk-5CLW2CXT.js';
2
+ import { ConfirmModal } from './chunk-QZ4B72FP.js';
3
3
  import { Callout } from './chunk-BPCY7ZID.js';
4
4
  import './LinkInterstitial-ET4MSVSV.css';
5
5
  import { jsx, jsxs } from 'react/jsx-runtime';