@crewlethq/ui 0.31.1 → 0.33.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 (278) hide show
  1. package/README.md +151 -5
  2. package/dist/AccessDeniedCard/AccessDeniedCard.d.ts +5 -0
  3. package/dist/AccessDeniedCard/index.js +1 -5
  4. package/dist/AccessDeniedCard-QVNDMT46.css +8 -0
  5. package/dist/AppShell/index.js +4 -4
  6. package/dist/{AppShell-GCM4TDVY.css → AppShell-JTSEOA57.css} +3 -1
  7. package/dist/ArrangeGroup/ArrangeGroup.d.ts +16 -1
  8. package/dist/ArrangeGroup/index.d.ts +1 -1
  9. package/dist/ArrangeGroup/index.js +1 -1
  10. package/dist/{ArrangeGroup-GY5YMP6E.css → ArrangeGroup-KRWWOJKR.css} +43 -0
  11. package/dist/ArrangeList/index.js +2 -2
  12. package/dist/ArtifactBar/index.js +12 -12
  13. package/dist/{ArtifactBar-MLMJHWY6.css → ArtifactBar-C462VD4C.css} +8 -3
  14. package/dist/ArtifactCard/ArtifactCard.d.ts +19 -1
  15. package/dist/ArtifactCard/index.d.ts +1 -1
  16. package/dist/ArtifactCard/index.js +4 -4
  17. package/dist/{ArtifactCard-EXVAEBV6.css → ArtifactCard-AS5Z4CVI.css} +17 -2
  18. package/dist/ArtifactCover/index.js +6 -6
  19. package/dist/ArtifactIcon/index.js +5 -5
  20. package/dist/ArtifactPanel/ArtifactPanel.d.ts +6 -2
  21. package/dist/ArtifactPanel/index.js +1 -1
  22. package/dist/{ArtifactPanel-YFXT5O77.css → ArtifactPanel-HW3SU7CP.css} +25 -7
  23. package/dist/Avatar/Avatar.d.ts +6 -4
  24. package/dist/Avatar/index.js +2 -2
  25. package/dist/AvatarPicker/index.js +8 -8
  26. package/dist/Callout/index.js +1 -1
  27. package/dist/{Callout-SXXK4B5R.css → Callout-ZAVG3P66.css} +46 -6
  28. package/dist/Canvas/Canvas.d.ts +81 -4
  29. package/dist/Canvas/ShortcutTip.d.ts +22 -0
  30. package/dist/Canvas/geometry.d.ts +13 -3
  31. package/dist/Canvas/index.d.ts +4 -2
  32. package/dist/Canvas/index.js +5 -3
  33. package/dist/{Canvas-YVXHMWLN.css → Canvas-VUG2HLZK.css} +62 -3
  34. package/dist/CanvasBoard/CanvasBoard.d.ts +110 -12
  35. package/dist/CanvasBoard/budget.d.ts +9 -3
  36. package/dist/CanvasBoard/index.d.ts +2 -2
  37. package/dist/CanvasBoard/index.js +9 -5
  38. package/dist/CanvasBoard-5NNSKY6A.css +462 -0
  39. package/dist/CanvasToolbar/CanvasToolbar.d.ts +48 -0
  40. package/dist/CanvasToolbar/index.d.ts +3 -0
  41. package/dist/CanvasToolbar/index.js +12 -0
  42. package/dist/CanvasToolbar-EM5EVZED.css +34 -0
  43. package/dist/ChangeMark/index.js +4 -4
  44. package/dist/CharacterPicker/index.js +2 -2
  45. package/dist/Charts/ActivityStrip.d.ts +16 -1
  46. package/dist/Charts/BarList.d.ts +6 -0
  47. package/dist/Charts/ChartEmpty.d.ts +33 -0
  48. package/dist/Charts/Legend.d.ts +6 -0
  49. package/dist/Charts/StackedBar.d.ts +4 -1
  50. package/dist/Charts/StackedColumns.d.ts +14 -3
  51. package/dist/Charts/TimeSeries.d.ts +11 -1
  52. package/dist/Charts/index.d.ts +2 -0
  53. package/dist/Charts/index.js +1 -1
  54. package/dist/{Charts-RY4JN5FC.css → Charts-MBJG72BS.css} +140 -16
  55. package/dist/Checkbox/index.js +1 -1
  56. package/dist/{Checkbox-5UORUG3F.css → Checkbox-ALWG3WV2.css} +11 -0
  57. package/dist/CommandPalette/index.js +3 -3
  58. package/dist/{CommandPalette-HBTNKHZQ.css → CommandPalette-7CFGVBND.css} +4 -0
  59. package/dist/CommentThread/index.js +5 -5
  60. package/dist/Container/index.js +1 -1
  61. package/dist/{Container-3TSKMGNI.css → Container-34BAKG7B.css} +3 -1
  62. package/dist/{DashboardCover-RMINBODB.css → DashboardCover-KYGYMRKW.css} +42 -9
  63. package/dist/DataTable/index.js +5 -5
  64. package/dist/{DataTable-WZK3V62B.css → DataTable-NL2YWAIA.css} +4 -1
  65. package/dist/DataView/index.js +9 -9
  66. package/dist/DateTimePicker/index.js +3 -3
  67. package/dist/DocTabsEditor/DocTabsEditor.d.ts +34 -21
  68. package/dist/DocTabsEditor/index.js +4 -1
  69. package/dist/DocTabsEditor-4M452LNS.css +189 -0
  70. package/dist/Document/Document.d.ts +18 -1
  71. package/dist/Document/index.d.ts +2 -2
  72. package/dist/Document/index.js +1 -1
  73. package/dist/{Document-G3YTZIUL.css → Document-JUGCSQ4L.css} +78 -5
  74. package/dist/EditingStatus/index.js +1 -1
  75. package/dist/{EditingStatus-L6THUAN7.css → EditingStatus-NNA2CKIL.css} +17 -4
  76. package/dist/{Editor-YZ7KG2RD.js → Editor-UUZ7XKCU.js} +5 -5
  77. package/dist/EntityChip/index.js +3 -3
  78. package/dist/FactList/index.js +3 -3
  79. package/dist/FollowBanner/index.js +3 -3
  80. package/dist/Fullscreen/index.d.ts +1 -0
  81. package/dist/Fullscreen/index.js +1 -1
  82. package/dist/Fullscreen/useIdle.d.ts +16 -0
  83. package/dist/HuePicker/index.js +3 -3
  84. package/dist/ImageUpload/index.js +3 -3
  85. package/dist/Layer/index.d.ts +1 -1
  86. package/dist/Layer/index.js +1 -1
  87. package/dist/Layer/place.d.ts +18 -0
  88. package/dist/LayersList/LayersList.d.ts +57 -0
  89. package/dist/LayersList/index.d.ts +3 -0
  90. package/dist/LayersList/index.js +3 -0
  91. package/dist/LayersList-NQZEIPZB.css +82 -0
  92. package/dist/LinkInterstitial/index.js +4 -4
  93. package/dist/ListInput/index.js +1 -1
  94. package/dist/Markdown/index.js +1 -1
  95. package/dist/MarkdownEditor/index.js +5 -5
  96. package/dist/MediaMatch/index.d.ts +1 -0
  97. package/dist/MediaMatch/index.js +1 -0
  98. package/dist/MediaMatch/useMediaMatch.d.ts +19 -0
  99. package/dist/Menu/index.js +2 -2
  100. package/dist/MergeConflicts/index.js +4 -4
  101. package/dist/Modal/index.js +2 -2
  102. package/dist/{Modal-XOSV6FAH.css → Modal-7MWRCWAI.css} +30 -0
  103. package/dist/Note/index.js +1 -1
  104. package/dist/{Note-ONSKKTOA.css → Note-WI5MLZOO.css} +13 -0
  105. package/dist/OrgLabel/index.js +3 -3
  106. package/dist/OrgNode/index.js +4 -4
  107. package/dist/OrgTable/index.js +7 -7
  108. package/dist/PeopleRail/index.js +3 -3
  109. package/dist/Popover/index.js +2 -2
  110. package/dist/PresenceStack/index.js +3 -3
  111. package/dist/{PresenceStack-QSXQJND5.css → PresenceStack-FJJQVH74.css} +11 -3
  112. package/dist/PresenterView/PresenterView.d.ts +3 -0
  113. package/dist/PresenterView/index.js +5 -3
  114. package/dist/PresenterView-T3EXIQ5S.css +147 -0
  115. package/dist/Principal/index.js +3 -3
  116. package/dist/PrincipalPicker/index.js +4 -4
  117. package/dist/RichEditor/index.js +5 -5
  118. package/dist/RichEditor/schema.d.ts +1 -1
  119. package/dist/RichEditorMarkdown/index.js +3 -3
  120. package/dist/SandboxedFrame/SandboxedFrame.d.ts +44 -2
  121. package/dist/SandboxedFrame/index.d.ts +2 -2
  122. package/dist/SandboxedFrame/index.js +3 -3
  123. package/dist/SandboxedFrame-P5NASXB7.css +72 -0
  124. package/dist/Section/index.js +1 -1
  125. package/dist/{Section-QR3ILQVK.css → Section-O5AHGSOG.css} +28 -5
  126. package/dist/SegmentedControl/index.js +3 -3
  127. package/dist/Select/index.js +2 -2
  128. package/dist/ShareDialog/ShareDialog.d.ts +10 -0
  129. package/dist/ShareDialog/index.js +9 -9
  130. package/dist/{ShareDialog-YZ4F37MW.css → ShareDialog-4QDCBWMH.css} +12 -0
  131. package/dist/SheetGrid/SheetGrid.d.ts +3 -1
  132. package/dist/SheetGrid/index.js +10 -10
  133. package/dist/{SheetGrid-J3TKKXZL.css → SheetGrid-AKPUCK67.css} +106 -7
  134. package/dist/SheetModel/fit.d.ts +34 -0
  135. package/dist/SheetModel/index.d.ts +1 -0
  136. package/dist/SheetModel/index.js +1 -1
  137. package/dist/Shortcut/index.js +1 -1
  138. package/dist/Skeleton/Skeleton.d.ts +2 -1
  139. package/dist/Skeleton/index.js +1 -1
  140. package/dist/SlideCompare/SlideCompare.d.ts +6 -1
  141. package/dist/SlideCompare/index.js +3 -3
  142. package/dist/{SlideCompare-MGM3U2ME.css → SlideCompare-HTCMPQFY.css} +36 -3
  143. package/dist/SlideFilmstrip/SlideFilmstrip.d.ts +14 -3
  144. package/dist/SlideFilmstrip/index.js +3 -3
  145. package/dist/{SlideFilmstrip-BCLNAHFX.css → SlideFilmstrip-5U6Z55GS.css} +63 -2
  146. package/dist/SlideGrid/index.js +3 -3
  147. package/dist/{SlideGrid-RT6QEQEE.css → SlideGrid-S4LTJ4UU.css} +9 -5
  148. package/dist/SlideNav/SlideNav.d.ts +49 -0
  149. package/dist/SlideNav/index.d.ts +3 -0
  150. package/dist/SlideNav/index.js +4 -0
  151. package/dist/SlideNav-BLFJF6AH.css +53 -0
  152. package/dist/SlideStage/SlideStage.d.ts +14 -1
  153. package/dist/SlideStage/index.js +2 -2
  154. package/dist/{SlideStage-KGRRALXR.css → SlideStage-S2FISF4C.css} +23 -0
  155. package/dist/StatCard/StatCard.d.ts +16 -1
  156. package/dist/StatCard/index.js +1 -1
  157. package/dist/{StatCard-KPAFD4E2.css → StatCard-4T7TMWMN.css} +40 -13
  158. package/dist/Switcher/index.js +6 -6
  159. package/dist/TableCells/index.js +3 -3
  160. package/dist/Tabs/Tabs.d.ts +21 -4
  161. package/dist/Tabs/index.js +1 -1
  162. package/dist/{Tabs-CJGO35BH.css → Tabs-MMZXV5EF.css} +9 -8
  163. package/dist/TagsInput/index.js +1 -1
  164. package/dist/ThemeSwitcher/index.js +4 -4
  165. package/dist/TimeWindowPicker/index.js +4 -4
  166. package/dist/Toaster/index.js +2 -2
  167. package/dist/{Toaster-EOOOTSJT.css → Toaster-C6BQ7L6I.css} +10 -1
  168. package/dist/Toolbar/index.js +1 -1
  169. package/dist/Tooltip/index.js +2 -2
  170. package/dist/TreeCanvas/index.js +6 -4
  171. package/dist/TreeGrid/index.js +3 -3
  172. package/dist/VersionCompare/index.js +4 -4
  173. package/dist/VersionTimeline/index.js +4 -4
  174. package/dist/WidgetFrame/WidgetFrame.d.ts +8 -1
  175. package/dist/WidgetFrame/index.js +2 -2
  176. package/dist/{WidgetFrame-LRZIL62O.css → WidgetFrame-BTFW3CRK.css} +49 -5
  177. package/dist/{chunk-OJ45PPCV.js → chunk-22UEIXZE.js} +127 -32
  178. package/dist/{chunk-UZ6MA2V6.js → chunk-2DHMVB5J.js} +2 -2
  179. package/dist/{chunk-WJDQ7XQA.js → chunk-2QEDJSJC.js} +1 -1
  180. package/dist/{chunk-2HIOJ4YZ.js → chunk-3EB2AV3H.js} +2 -3
  181. package/dist/{chunk-ODT5H4MN.js → chunk-3LYWD3BO.js} +2 -2
  182. package/dist/{chunk-FAQGGX2Z.js → chunk-3TFDQLW3.js} +1 -1
  183. package/dist/{chunk-VYDFB6PJ.js → chunk-3U7S6ZUN.js} +50 -17
  184. package/dist/{chunk-A4E5YLXO.js → chunk-4B6LSFDS.js} +1 -1
  185. package/dist/{chunk-S6VG5ZFZ.js → chunk-4IJS5CPF.js} +1 -1
  186. package/dist/{chunk-UAN5NE7M.js → chunk-5AQBPHZD.js} +1 -1
  187. package/dist/{chunk-QWOPX2MN.js → chunk-5FYPE5GL.js} +2 -3
  188. package/dist/{chunk-CJKMURZO.js → chunk-5SZGKSGL.js} +1 -1
  189. package/dist/chunk-6VOS2GMB.js +54 -0
  190. package/dist/{chunk-RODMM35O.js → chunk-7Q7WDXHG.js} +5 -5
  191. package/dist/{chunk-JI5AVQLA.js → chunk-7WHDPLVJ.js} +1 -1
  192. package/dist/{chunk-QH3AKP2N.js → chunk-AC22RZKC.js} +2 -2
  193. package/dist/{chunk-ZITJKF6Z.js → chunk-AYB6AYNH.js} +1 -1
  194. package/dist/{chunk-Y5NQ2LMS.js → chunk-BY4N65PM.js} +1 -1
  195. package/dist/{chunk-YFW4MTK4.js → chunk-C7DKX453.js} +1 -1
  196. package/dist/{chunk-RCQXUT5K.js → chunk-CCAXYHQS.js} +1 -1
  197. package/dist/{chunk-4KP4RC3O.js → chunk-CI3VPIJN.js} +1 -1
  198. package/dist/{chunk-7T42VQQT.js → chunk-CPEPST4S.js} +1 -1
  199. package/dist/{chunk-AAOH2P6Y.js → chunk-DFK5EQTU.js} +5 -3
  200. package/dist/{chunk-GOSQXEZU.js → chunk-DFZMYB5X.js} +16 -10
  201. package/dist/{chunk-TGYDROIB.js → chunk-EBCHVFCS.js} +4 -4
  202. package/dist/{chunk-YDBC4DNW.js → chunk-FWYHRU7M.js} +1 -1
  203. package/dist/{chunk-CT4EZF62.js → chunk-G4ZW7A2W.js} +125 -33
  204. package/dist/chunk-GLSOD5Z4.js +33 -0
  205. package/dist/{chunk-LIXSV5YI.js → chunk-GPHWCK7M.js} +1 -1
  206. package/dist/{chunk-UQHKFF2N.js → chunk-GPWJCP3U.js} +1 -1
  207. package/dist/{chunk-77DRMDXR.js → chunk-HG5VF3TZ.js} +192 -67
  208. package/dist/{chunk-4JUKWWUD.js → chunk-HH2GKAAE.js} +1 -1
  209. package/dist/{chunk-QVE4GJAT.js → chunk-HJO4WCH6.js} +1 -1
  210. package/dist/{chunk-I3BSQUKN.js → chunk-HUVG2FFT.js} +1 -1
  211. package/dist/{chunk-3C3BRIMY.js → chunk-ILAEBSLJ.js} +3 -3
  212. package/dist/{chunk-GR55WT4R.js → chunk-IYO2N5ZH.js} +2 -2
  213. package/dist/{chunk-RWA4H2TV.js → chunk-J6ON5SYE.js} +1 -1
  214. package/dist/{chunk-NHBP2XS5.js → chunk-J6ZSH3F5.js} +49 -1
  215. package/dist/{chunk-AMNN4WDX.js → chunk-JBUMD6DS.js} +2 -2
  216. package/dist/{chunk-BWRGFKJP.js → chunk-K3IJQNB7.js} +2 -3
  217. package/dist/{chunk-LFNUH4GY.js → chunk-K4VP6ZKE.js} +1 -1
  218. package/dist/{chunk-ZR5VN5IV.js → chunk-KD2IRYCT.js} +2 -2
  219. package/dist/{chunk-SKOYC2CF.js → chunk-KK5OYNAF.js} +2 -1
  220. package/dist/{chunk-UB7TJEKZ.js → chunk-KV3ODJXH.js} +6 -7
  221. package/dist/chunk-LL5AFXU7.js +96 -0
  222. package/dist/{chunk-VYOKRN2I.js → chunk-LM3ISVJA.js} +1 -1
  223. package/dist/{chunk-O63MWA4G.js → chunk-LV4APO72.js} +10 -3
  224. package/dist/{chunk-B4EBHPK3.js → chunk-M5KZX5JE.js} +9 -2
  225. package/dist/{chunk-JODJS7MR.js → chunk-MDNVHIB2.js} +276 -47
  226. package/dist/{chunk-VOX3YRFO.js → chunk-MTMKIUWF.js} +4 -4
  227. package/dist/{chunk-HVNTQ36V.js → chunk-O37AQNLK.js} +4 -4
  228. package/dist/{chunk-HMPFGIWM.js → chunk-OMV5W53A.js} +10 -1
  229. package/dist/chunk-ONL54WMH.js +55 -0
  230. package/dist/{chunk-AKEZ3G5V.js → chunk-ONQKKHON.js} +1 -1
  231. package/dist/{chunk-LZHLSQYK.js → chunk-OOWPSBIS.js} +2 -2
  232. package/dist/{chunk-JQLTG4KH.js → chunk-ORT5IKHP.js} +62 -51
  233. package/dist/{chunk-4KWOKX2B.js → chunk-OSKJZNBT.js} +1 -1
  234. package/dist/{chunk-EHQTPVV4.js → chunk-PLTCDSTU.js} +1 -1
  235. package/dist/{chunk-5OM447RW.js → chunk-PZKHBB7D.js} +1 -1
  236. package/dist/{chunk-VEB5ERRE.js → chunk-QWNVSR6G.js} +2 -2
  237. package/dist/{chunk-IG75YMUN.js → chunk-RTPQDNW3.js} +1 -1
  238. package/dist/{chunk-SVSCLHHI.js → chunk-SZZRIHGT.js} +1 -1
  239. package/dist/{chunk-EBNI36UQ.js → chunk-T46NR3WP.js} +3 -3
  240. package/dist/{chunk-FPS3JIPQ.js → chunk-TC7DJTXI.js} +1 -1
  241. package/dist/{chunk-W5J7R5EB.js → chunk-TEUQWOWZ.js} +1 -1
  242. package/dist/chunk-THROPJZC.js +115 -0
  243. package/dist/{chunk-IDBHX5SR.js → chunk-TRQCHF2F.js} +1 -1
  244. package/dist/{chunk-M3LUNN7F.js → chunk-TYKQ33CL.js} +13 -2
  245. package/dist/{chunk-VVRL27HM.js → chunk-ULPL26BU.js} +2 -2
  246. package/dist/{chunk-6AH2XJ3Q.js → chunk-UNXLTJU7.js} +3 -3
  247. package/dist/{chunk-FC4YTTFJ.js → chunk-UQGFHNDI.js} +2 -3
  248. package/dist/{chunk-EBJREOKS.js → chunk-UXXJDIYE.js} +4 -4
  249. package/dist/{chunk-5LUI3WQP.js → chunk-V43UVX4H.js} +1 -1
  250. package/dist/{chunk-W4XYY73O.js → chunk-VHZ3AXJD.js} +1 -1
  251. package/dist/{chunk-HJEVSQN6.js → chunk-VL6CUNSX.js} +11 -5
  252. package/dist/{chunk-XDTYBF2F.js → chunk-W5XCNEZC.js} +39 -1
  253. package/dist/{chunk-LDJ3J4TQ.js → chunk-WGD2HX2A.js} +1 -1
  254. package/dist/{chunk-FQCLKD7U.js → chunk-WKEPORNM.js} +1 -1
  255. package/dist/{chunk-I3KKZ2O3.js → chunk-XEGZHHRH.js} +45 -36
  256. package/dist/{chunk-IKB6HFGK.js → chunk-XO7PUL4F.js} +6 -4
  257. package/dist/chunk-XV32RKQZ.js +142 -0
  258. package/dist/{chunk-TBMDMXEX.js → chunk-YA3AWELW.js} +1 -1
  259. package/dist/{chunk-HVIX5ECM.js → chunk-YEVG2X5R.js} +1 -1
  260. package/dist/chunk-YZFLH463.js +215 -0
  261. package/dist/{chunk-P4BOXB6E.js → chunk-Z6GFMI2Z.js} +6 -7
  262. package/dist/{chunk-YEKYVJQR.js → chunk-ZNBLFCQS.js} +2 -2
  263. package/dist/generated/index.d.ts +4 -0
  264. package/dist/generated/index.js +107 -104
  265. package/dist/index.js +107 -104
  266. package/dist/styles.css +1648 -235
  267. package/package.json +3 -3
  268. package/dist/AccessDeniedCard-WXM5DBDZ.css +0 -8
  269. package/dist/CanvasBoard-ZLPDINSM.css +0 -236
  270. package/dist/DocTabsEditor-RCOWHX5J.css +0 -78
  271. package/dist/PresenterView-T2C6ZZ3N.css +0 -103
  272. package/dist/SandboxedFrame-L6HBQZCD.css +0 -50
  273. package/dist/chunk-ALMSY7RL.js +0 -74
  274. package/dist/chunk-LR5QTFOE.js +0 -105
  275. package/dist/chunk-OGAAHVF6.js +0 -107
  276. package/dist/chunk-UZ7ZUSLH.js +0 -179
  277. package/dist/utils/useMediaMatch.d.ts +0 -12
  278. /package/dist/{chunk-OC46246T.js → chunk-2JJIN6JN.js} +0 -0
@@ -1,6 +1,6 @@
1
1
  import { VisuallyHidden } from './chunk-BZFWDIV6.js';
2
2
  import { cx } from './chunk-ODEQTPFM.js';
3
- import './Charts-RY4JN5FC.css';
3
+ import './Charts-MBJG72BS.css';
4
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
5
  import { useState, useRef, useCallback, useId } from 'react';
6
6
 
@@ -29,7 +29,7 @@ function Legend({ items, className }) {
29
29
  /* @__PURE__ */ jsx(
30
30
  "span",
31
31
  {
32
- className: "crewlet-legend__swatch",
32
+ className: cx("crewlet-legend__swatch", item.shape === "line" && "crewlet-legend__swatch--line"),
33
33
  "aria-hidden": true,
34
34
  style: { "--crewlet-legend-swatch-color": item.color ?? dataColor(index) }
35
35
  }
@@ -39,6 +39,16 @@ function Legend({ items, className }) {
39
39
  ] }, item.id)) })
40
40
  );
41
41
  }
42
+ function ChartEmpty({ children, height, align = "center", className }) {
43
+ return /* @__PURE__ */ jsx(
44
+ "p",
45
+ {
46
+ className: cx("crewlet-chart-empty", align === "start" && "crewlet-chart-empty--start", className),
47
+ style: height === void 0 ? void 0 : { minHeight: height },
48
+ children
49
+ }
50
+ );
51
+ }
42
52
  function BarList({
43
53
  data,
44
54
  layout = "stacked",
@@ -52,14 +62,15 @@ function BarList({
52
62
  const shown = capped ? data.slice(0, limit) : data;
53
63
  const top = max ?? Math.max(1, ...data.map((datum) => datum.value));
54
64
  const remaining = capped ? Math.max(0, data.length - limit) : 0;
55
- if (!shown.length) return /* @__PURE__ */ jsx("p", { className: "crewlet-bar-list__empty", children: emptyLabel });
65
+ if (!shown.length)
66
+ return /* @__PURE__ */ jsx(ChartEmpty, { align: "start", className, children: emptyLabel });
56
67
  return (
57
68
  // A list, and said to be one: the markers are off, and WebKit drops the
58
69
  // list role with them. See Legend for the same note, including why the
59
70
  // redundant-role rule is silenced rather than obeyed.
60
71
  // eslint-disable-next-line jsx-a11y/no-redundant-roles
61
72
  /* @__PURE__ */ jsxs("ul", { role: "list", className: cx("crewlet-bar-list", `crewlet-bar-list--${layout}`, className), children: [
62
- shown.map((datum, index) => {
73
+ shown.map((datum) => {
63
74
  const width = top > 0 && datum.value > 0 ? Math.max(1, datum.value / top * 100) : 0;
64
75
  const parts = (datum.parts ?? []).map((part, at) => ({ ...part, color: part.color ?? dataColor(at) })).filter((part) => part.value > 0);
65
76
  const bar = width > 0 ? /* @__PURE__ */ jsx(
@@ -69,7 +80,7 @@ function BarList({
69
80
  "aria-hidden": true,
70
81
  style: parts.length > 0 ? { width: `${width}%` } : {
71
82
  width: `${width}%`,
72
- "--crewlet-bar-list-bar-color": datum.color ?? dataColor(index)
83
+ "--crewlet-bar-list-bar-color": datum.color ?? DATA_COLORS[0]
73
84
  },
74
85
  children: parts.map((part) => /* @__PURE__ */ jsx(
75
86
  "span",
@@ -226,7 +237,13 @@ function useChartHover(count) {
226
237
  plotProps: { tabIndex: 0, onKeyDown, onBlur, onPointerLeave }
227
238
  };
228
239
  }
229
- function StackedBar({ segments, summary, format = (value) => value.toLocaleString(), className }) {
240
+ function StackedBar({
241
+ segments,
242
+ summary,
243
+ format = (value) => value.toLocaleString(),
244
+ emptyLabel = "Nothing recorded in this window",
245
+ className
246
+ }) {
230
247
  const named = useId();
231
248
  const total = segments.reduce((sum, segment) => sum + Math.max(0, segment.value), 0);
232
249
  const drawn = segments.map((segment, index) => ({ ...segment, color: segment.color ?? dataColor(index) })).filter((segment) => segment.value > 0);
@@ -239,6 +256,7 @@ function StackedBar({ segments, summary, format = (value) => value.toLocaleStrin
239
256
  const hover = useChartHover(drawn.length);
240
257
  const active = hover.active == null ? null : drawn[hover.active];
241
258
  const edges = drawn.reduce((at, segment) => [...at, at[at.length - 1] + segment.value / total], [0]);
259
+ if (drawn.length === 0) return /* @__PURE__ */ jsx(ChartEmpty, { className, children: emptyLabel });
242
260
  return /* @__PURE__ */ jsxs("div", { className: cx("crewlet-stacked-bar", className), children: [
243
261
  /* @__PURE__ */ jsxs("div", { className: "crewlet-chart-frame", role: "group", "aria-labelledby": named, ...hover.plotProps, children: [
244
262
  /* @__PURE__ */ jsx("div", { className: "crewlet-stacked-bar__track", "aria-hidden": true, children: drawn.map((segment, index) => /* @__PURE__ */ jsx(
@@ -273,14 +291,30 @@ function StackedBar({ segments, summary, format = (value) => value.toLocaleStrin
273
291
  /* @__PURE__ */ jsx(VisuallyHidden, { id: named, children: sentence })
274
292
  ] });
275
293
  }
276
- function ActivityStrip({ buckets, label, summary, className }) {
294
+ function ActivityStrip({
295
+ buckets,
296
+ label,
297
+ summary,
298
+ reading,
299
+ emptyLabel = "Nothing recorded in this window",
300
+ className
301
+ }) {
302
+ const hover = useChartHover(buckets.length);
277
303
  const peak = Math.max(1, ...buckets.map((bucket) => bucket.v));
278
304
  const total = buckets.reduce((sum, bucket) => sum + bucket.v, 0);
279
- const sentence = summary ? summary({ peak, total, buckets: buckets.length }) : `${label}. ${total.toLocaleString()} in ${buckets.length} buckets, peak ${peak.toLocaleString()}.`;
280
- return /* @__PURE__ */ jsx("div", { className: cx("crewlet-activity-strip", className), role: "img", "aria-label": sentence, children: buckets.map((bucket) => /* @__PURE__ */ jsx(
305
+ const format = reading?.format ?? ((value) => value.toLocaleString());
306
+ const sentence = summary ? summary({ peak, total, buckets: buckets.length }) : `${label}. ${format(total)} in ${buckets.length} buckets, peak ${format(peak)}.`;
307
+ if (buckets.length === 0) return /* @__PURE__ */ jsx(ChartEmpty, { className, children: emptyLabel });
308
+ const active = reading && hover.active != null ? buckets[hover.active] : null;
309
+ const strip = /* @__PURE__ */ jsx("div", { className: cx("crewlet-activity-strip", className), role: "img", "aria-label": sentence, children: buckets.map((bucket, index) => /* @__PURE__ */ jsx(
281
310
  "span",
282
311
  {
283
- className: cx("crewlet-activity-strip__cell", bucket.v > 0 && "is-active"),
312
+ className: cx(
313
+ "crewlet-activity-strip__cell",
314
+ bucket.v > 0 && "is-active",
315
+ reading && hover.active === index && "is-read"
316
+ ),
317
+ onPointerEnter: reading ? () => hover.point(index) : void 0,
284
318
  style: {
285
319
  /*
286
320
  * A floor of a fifth, so a bucket with one event in it reads as a
@@ -292,6 +326,19 @@ function ActivityStrip({ buckets, label, summary, className }) {
292
326
  },
293
327
  bucket.t
294
328
  )) });
329
+ if (!reading) return strip;
330
+ return /* @__PURE__ */ jsxs("div", { className: "crewlet-chart-frame", role: "group", "aria-label": label, ...hover.plotProps, children: [
331
+ strip,
332
+ /* @__PURE__ */ jsx(
333
+ ChartTooltip,
334
+ {
335
+ open: active != null,
336
+ anchor: hover.active == null ? void 0 : { start: hover.active / buckets.length, end: (hover.active + 1) / buckets.length },
337
+ title: active == null ? void 0 : reading.formatTime(active.t),
338
+ rows: active == null ? [] : [{ id: "value", name: label, value: format(active.v) }]
339
+ }
340
+ )
341
+ ] });
295
342
  }
296
343
  function TimeSeries({
297
344
  series,
@@ -302,6 +349,8 @@ function TimeSeries({
302
349
  format = (value) => value.toLocaleString(),
303
350
  formatTime = (at) => new Date(at).toLocaleString(),
304
351
  summary,
352
+ legend = "below",
353
+ emptyLabel = "Nothing recorded in this window",
305
354
  className
306
355
  }) {
307
356
  const id = useId();
@@ -309,25 +358,35 @@ function TimeSeries({
309
358
  const plot = 120;
310
359
  const footer = 18;
311
360
  const head = 6;
312
- const span = Math.max(1, to - from);
361
+ const span = to - from;
313
362
  const peaks = series.map((one) => Math.max(0, ...one.points.map((point) => point.v)));
314
363
  const peak = Math.max(1, ...peaks);
315
- const x = (at) => (at - from) / span * width;
316
- const y = (value) => head + (1 - value / peak) * (plot - head - footer);
364
+ const low = Math.min(0, ...series.flatMap((one) => one.points.map((point) => point.v)));
365
+ const x = (at) => span > 0 ? (at - from) / span * width : width / 2;
366
+ const y = (value) => head + (peak - value) / (peak - low) * (plot - head - footer);
367
+ const zero = y(0);
317
368
  const instants = [...new Set(series.flatMap((one) => one.points.map((point) => point.t)))].sort((a, b) => a - b);
318
369
  const hover = useChartHover(instants.length);
319
370
  const reading = hover.active == null ? null : instants[hover.active];
320
371
  const onPointerMove = (event) => {
321
372
  const box = event.currentTarget.getBoundingClientRect();
322
373
  if (box.width <= 0 || instants.length === 0) return;
323
- const at = from + (event.clientX - box.left) / box.width * span;
374
+ const at = from + (event.clientX - box.left) / box.width * Math.max(1, span);
324
375
  let nearest = 0;
325
376
  for (let index = 1; index < instants.length; index += 1) {
326
377
  if (Math.abs(instants[index] - at) < Math.abs(instants[nearest] - at)) nearest = index;
327
378
  }
328
379
  hover.point(nearest);
329
380
  };
330
- const sentence = summary ? summary({ from, to, peak, series: series.map((one, index) => ({ name: one.name, peak: peaks[index] ?? 0 })) }) : `${label}. ${formatTime(from)} to ${formatTime(to)}, peak ${format(peak)}.`;
381
+ const sentence = summary ? summary({ from, to, peak, series: series.map((one, index) => ({ name: one.name, peak: peaks[index] ?? 0 })) }) : `${label}. ${formatTime(from)} to ${formatTime(to)}, peak ${format(peak)}${low < 0 ? `, low ${format(low)}` : ""}.`;
382
+ if (instants.length === 0) {
383
+ return /* @__PURE__ */ jsx(ChartEmpty, { height, className, children: emptyLabel });
384
+ }
385
+ const washed = series.length === 1;
386
+ const colorOf = (one, index) => one.color ?? dataColor(index);
387
+ const dots = series.flatMap(
388
+ (one, index) => one.points.filter((point) => one.points.length === 1 || point.t === reading).map((point) => ({ key: `${one.id}-${point.t}`, point, color: colorOf(one, index) }))
389
+ );
331
390
  return /* @__PURE__ */ jsxs("figure", { className: cx("crewlet-time-series", className), children: [
332
391
  /* @__PURE__ */ jsxs("div", { className: "crewlet-chart-frame", role: "group", "aria-label": label, ...hover.plotProps, children: [
333
392
  /* @__PURE__ */ jsxs(
@@ -341,32 +400,49 @@ function TimeSeries({
341
400
  "aria-label": sentence,
342
401
  onPointerMove,
343
402
  children: [
344
- [0.25, 0.5, 0.75].map((fraction) => /* @__PURE__ */ jsx(
403
+ [0.25, 0.5, 0.75, 1].map((fraction) => {
404
+ const at = y(low + (peak - low) * fraction);
405
+ return /* @__PURE__ */ jsx(
406
+ "line",
407
+ {
408
+ className: "crewlet-chart__grid-line",
409
+ x1: 0,
410
+ x2: width,
411
+ y1: at,
412
+ y2: at,
413
+ vectorEffect: "non-scaling-stroke"
414
+ },
415
+ fraction
416
+ );
417
+ }),
418
+ low < 0 ? /* @__PURE__ */ jsx(
345
419
  "line",
346
420
  {
347
421
  className: "crewlet-chart__grid-line",
348
422
  x1: 0,
349
423
  x2: width,
350
- y1: y(peak * fraction),
351
- y2: y(peak * fraction)
352
- },
353
- fraction
354
- )),
355
- /* @__PURE__ */ jsx("line", { className: "crewlet-chart__axis-line", x1: 0, x2: width, y1: plot - footer, y2: plot - footer }),
424
+ y1: plot - footer,
425
+ y2: plot - footer,
426
+ vectorEffect: "non-scaling-stroke"
427
+ }
428
+ ) : null,
429
+ /* @__PURE__ */ jsx("line", { className: "crewlet-chart__axis-line", x1: 0, x2: width, y1: zero, y2: zero, vectorEffect: "non-scaling-stroke" }),
356
430
  series.map((one, index) => {
357
- const color = one.color ?? dataColor(index);
431
+ const color = colorOf(one, index);
358
432
  const points = [...one.points].sort((a, b) => a.t - b.t);
359
- if (points.length === 0) return null;
433
+ if (points.length < 2) return null;
360
434
  const line = points.map((point) => `${x(point.t).toFixed(2)},${y(point.v).toFixed(2)}`).join(" ");
361
435
  const first = points[0];
362
436
  const last = points[points.length - 1];
363
- const area = `${x(first.t).toFixed(2)},${plot - footer} ${line} ${x(last.t).toFixed(2)},${plot - footer}`;
437
+ const area = `${x(first.t).toFixed(2)},${zero.toFixed(2)} ${line} ${x(last.t).toFixed(2)},${zero.toFixed(2)}`;
364
438
  return /* @__PURE__ */ jsxs("g", { children: [
365
- /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs("linearGradient", { id: `${id}-${index}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
366
- /* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: color, stopOpacity: "0.22" }),
367
- /* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: color, stopOpacity: "0" })
368
- ] }) }),
369
- /* @__PURE__ */ jsx("polygon", { points: area, fill: `url(#${id}-${index})` }),
439
+ washed ? /* @__PURE__ */ jsxs(Fragment, { children: [
440
+ /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs("linearGradient", { id: `${id}-${index}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
441
+ /* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: color, stopOpacity: "0.22" }),
442
+ /* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: color, stopOpacity: "0" })
443
+ ] }) }),
444
+ /* @__PURE__ */ jsx("polygon", { points: area, fill: `url(#${id}-${index})` })
445
+ ] }) : null,
370
446
  /* @__PURE__ */ jsx(
371
447
  "polyline",
372
448
  {
@@ -392,27 +468,51 @@ function TimeSeries({
392
468
  ]
393
469
  }
394
470
  ),
471
+ dots.map(({ key, point, color }) => /* @__PURE__ */ jsx(
472
+ "span",
473
+ {
474
+ className: "crewlet-time-series__dot",
475
+ "aria-hidden": true,
476
+ style: {
477
+ left: `${(x(point.t) / width * 100).toFixed(3)}%`,
478
+ top: `${(y(point.v) / plot * 100).toFixed(3)}%`,
479
+ "--crewlet-time-series-dot-color": color
480
+ }
481
+ },
482
+ key
483
+ )),
395
484
  /* @__PURE__ */ jsx(
396
485
  ChartTooltip,
397
486
  {
398
487
  open: reading != null,
399
- anchor: reading == null ? void 0 : { start: (reading - from) / span },
488
+ anchor: reading == null ? void 0 : { start: x(reading) / width },
400
489
  title: reading == null ? void 0 : formatTime(reading),
401
490
  rows: reading == null ? [] : series.flatMap((one, index) => {
402
491
  const point = one.points.find((candidate) => candidate.t === reading);
403
- return point ? [{ id: one.id, name: one.name, value: format(point.v), color: one.color ?? dataColor(index) }] : [];
492
+ return point ? [{ id: one.id, name: one.name, value: format(point.v), color: colorOf(one, index) }] : [];
404
493
  })
405
494
  }
406
495
  )
407
496
  ] }),
408
- /* @__PURE__ */ jsxs("figcaption", { className: "crewlet-time-series__scale", children: [
497
+ /* @__PURE__ */ jsxs("figcaption", { className: cx("crewlet-time-series__scale", span <= 0 && "crewlet-time-series__scale--instant"), children: [
409
498
  /* @__PURE__ */ jsx("span", { children: formatTime(from) }),
410
- /* @__PURE__ */ jsxs("span", { children: [
499
+ /* @__PURE__ */ jsxs("span", { className: "crewlet-time-series__range", children: [
411
500
  "peak ",
412
- format(peak)
501
+ format(peak),
502
+ low < 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
503
+ ", low ",
504
+ format(low)
505
+ ] }) : null
413
506
  ] }),
414
- /* @__PURE__ */ jsx("span", { children: formatTime(to) })
415
- ] })
507
+ span > 0 ? /* @__PURE__ */ jsx("span", { children: formatTime(to) }) : null
508
+ ] }),
509
+ legend === "below" && series.length > 0 ? /* @__PURE__ */ jsx(
510
+ Legend,
511
+ {
512
+ className: "crewlet-time-series__legend",
513
+ items: series.map((one, index) => ({ id: one.id, label: one.name, color: colorOf(one, index), shape: "line" }))
514
+ }
515
+ ) : null
416
516
  ] });
417
517
  }
418
518
  function Sparkline({
@@ -456,23 +556,39 @@ function StackedColumns({
456
556
  height = PLOT_HEIGHT,
457
557
  minHeight = PLOT_HEIGHT,
458
558
  format = (value) => COMPACT.format(value),
559
+ formatScale = format,
459
560
  formatTime = (at) => new Date(at).toLocaleDateString(),
561
+ emptyLabel = "Nothing recorded in this window",
460
562
  summary,
461
563
  className
462
564
  }) {
463
565
  const colored = series.map((one, index) => ({ ...one, color: one.color ?? dataColor(index) }));
464
566
  const shown = colored.filter((one) => !hidden.includes(one.id));
465
- const valueOf = (bucket, id) => Math.max(0, bucket.values[id] ?? 0);
466
- const totals = buckets.map((bucket) => shown.reduce((sum, one) => sum + valueOf(bucket, one.id), 0));
467
- const peak = Math.max(0, ...totals);
468
- const { top, step } = niceScale(peak);
469
- const intervals = Math.round(top / step);
567
+ const valueOf = (bucket, id) => bucket.values[id] ?? 0;
568
+ const sumOf = (bucket, sign) => shown.reduce((sum, one) => {
569
+ const value = valueOf(bucket, one.id);
570
+ return sign * value > 0 ? sum + value : sum;
571
+ }, 0);
572
+ const above = buckets.map((bucket) => sumOf(bucket, 1));
573
+ const below = buckets.map((bucket) => sumOf(bucket, -1));
574
+ const totals = buckets.map((_, index) => (above[index] ?? 0) + (below[index] ?? 0));
575
+ const peak = Math.max(0, ...above);
576
+ const trough = Math.min(0, ...below);
577
+ const { top, step } = niceScale(peak - trough);
578
+ const roof = trough < 0 ? Number((Math.ceil(peak / step - 1e-9) * step).toPrecision(12)) : top;
579
+ const floor = trough < 0 ? Number((Math.floor(trough / step + 1e-9) * step).toPrecision(12)) : 0;
580
+ const range = roof - floor;
581
+ const intervals = Math.round(range / step);
470
582
  const ticks = Array.from(
471
583
  { length: intervals + 1 },
472
- (_, index) => Number(((intervals - index) * step).toPrecision(12))
584
+ (_, index) => Number((roof - index * step).toPrecision(12))
473
585
  );
586
+ const zero = -floor / range * 100;
474
587
  const hover = useChartHover(buckets.length);
475
588
  const active = hover.active == null ? null : buckets[hover.active];
589
+ if (buckets.length === 0) {
590
+ return /* @__PURE__ */ jsx(ChartEmpty, { height: height === "fill" ? minHeight : height, className, children: emptyLabel });
591
+ }
476
592
  const first = buckets[0]?.t ?? null;
477
593
  const last = buckets[buckets.length - 1]?.t ?? null;
478
594
  const centre = Math.floor((buckets.length - 1) / 2);
@@ -514,7 +630,7 @@ function StackedColumns({
514
630
  hasHead ? /* @__PURE__ */ jsx("div", { className: "crewlet-stacked-columns__heading", children: head }) : null,
515
631
  legend === "head" ? key : null
516
632
  ] }) : null,
517
- /* @__PURE__ */ jsx("div", { className: "crewlet-stacked-columns__axis", "aria-hidden": true, style: { height: plotHeight }, children: ticks.map((tick) => /* @__PURE__ */ jsx("span", { className: "crewlet-stacked-columns__tick", children: format(tick) }, tick)) }),
633
+ /* @__PURE__ */ jsx("div", { className: "crewlet-stacked-columns__axis", "aria-hidden": true, style: { height: plotHeight }, children: ticks.map((tick) => /* @__PURE__ */ jsx("span", { className: "crewlet-stacked-columns__tick", children: formatScale(tick) }, tick)) }),
518
634
  /* @__PURE__ */ jsxs("div", { className: "crewlet-chart-frame", role: "group", "aria-label": label, ...hover.plotProps, children: [
519
635
  /* @__PURE__ */ jsxs(
520
636
  "div",
@@ -526,32 +642,41 @@ function StackedColumns({
526
642
  children: [
527
643
  /* @__PURE__ */ jsx("div", { className: "crewlet-stacked-columns__grid", "aria-hidden": true, children: ticks.map((tick) => /* @__PURE__ */ jsx("span", { className: "crewlet-stacked-columns__grid-line" }, tick)) }),
528
644
  buckets.map((bucket, index) => {
529
- const total = totals[index] ?? 0;
530
- const parts = shown.filter((one) => valueOf(bucket, one.id) > 0);
531
- return /* @__PURE__ */ jsx(
645
+ const stack = (sign, total) => {
646
+ const parts = shown.filter((one) => sign * valueOf(bucket, one.id) > 0);
647
+ if (parts.length === 0) return null;
648
+ return /* @__PURE__ */ jsx(
649
+ "div",
650
+ {
651
+ className: cx("crewlet-stacked-columns__column", sign < 0 && "crewlet-stacked-columns__column--below"),
652
+ style: {
653
+ height: `${(Math.abs(total) / range * 100).toFixed(3)}%`,
654
+ ...sign > 0 ? { bottom: `${zero.toFixed(3)}%` } : { top: `${(100 - zero).toFixed(3)}%` }
655
+ },
656
+ children: parts.map((one) => /* @__PURE__ */ jsx(
657
+ "span",
658
+ {
659
+ className: "crewlet-stacked-columns__segment",
660
+ "data-series": one.id,
661
+ style: {
662
+ flexGrow: Math.abs(valueOf(bucket, one.id)),
663
+ "--crewlet-stacked-columns-segment-color": one.color
664
+ }
665
+ },
666
+ one.id
667
+ ))
668
+ }
669
+ );
670
+ };
671
+ return /* @__PURE__ */ jsxs(
532
672
  "div",
533
673
  {
534
674
  className: cx("crewlet-stacked-columns__slot", hover.active === index && "is-active"),
535
675
  onPointerEnter: () => hover.point(index),
536
- children: /* @__PURE__ */ jsx(
537
- "div",
538
- {
539
- className: "crewlet-stacked-columns__column",
540
- style: { height: `${(total / top * 100).toFixed(3)}%` },
541
- children: parts.map((one) => /* @__PURE__ */ jsx(
542
- "span",
543
- {
544
- className: "crewlet-stacked-columns__segment",
545
- "data-series": one.id,
546
- style: {
547
- flexGrow: valueOf(bucket, one.id),
548
- "--crewlet-stacked-columns-segment-color": one.color
549
- }
550
- },
551
- one.id
552
- ))
553
- }
554
- )
676
+ children: [
677
+ stack(1, above[index] ?? 0),
678
+ stack(-1, below[index] ?? 0)
679
+ ]
555
680
  },
556
681
  bucket.t
557
682
  );
@@ -588,4 +713,4 @@ function StackedColumns({
588
713
  );
589
714
  }
590
715
 
591
- export { ActivityStrip, BarList, ChartTooltip, DATA_COLORS, DATA_COLOR_OTHER, Legend, Sparkline, StackedBar, StackedColumns, TimeSeries, dataColor, niceScale, useChartHover };
716
+ export { ActivityStrip, BarList, ChartEmpty, ChartTooltip, DATA_COLORS, DATA_COLOR_OTHER, Legend, Sparkline, StackedBar, StackedColumns, TimeSeries, dataColor, niceScale, useChartHover };
@@ -1,4 +1,4 @@
1
- import { ArtifactKindGlyph } from './chunk-GOSQXEZU.js';
1
+ import { ArtifactKindGlyph } from './chunk-DFZMYB5X.js';
2
2
  import { ShieldGlyph, ActivityGlyph, GaugeGlyph, PackageGlyph, FolderGlyph, ClockGlyph, DatabaseGlyph, Settings2Glyph, BookOpenGlyph, FlagGlyph, StarGlyph, WandSparklesGlyph, BugGlyph, TargetGlyph, ImageGlyph, CodeGlyph, CoinsGlyph, UserGlyph, UsersGlyph, ChartNoAxesGanttGlyph, SquareKanbanGlyph, ListChecksGlyph, ListGlyph, GlobeGlyph, CompassGlyph, FileTextGlyph, TableGlyph, CalendarGlyph, LayoutDashboardGlyph, ChartPieGlyph, ChartColumnGlyph } from '@crewlethq/icons/glyphs';
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
 
@@ -1,5 +1,5 @@
1
1
  import { cx } from './chunk-ODEQTPFM.js';
2
- import './Container-3TSKMGNI.css';
2
+ import './Container-34BAKG7B.css';
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
 
5
5
  var Container = ({
@@ -1,7 +1,7 @@
1
1
  import { HeadingLevelProvider } from './chunk-PQADV6P6.js';
2
2
  import { IconButton } from './chunk-4FQT6ZAY.js';
3
3
  import { cx } from './chunk-ODEQTPFM.js';
4
- import './ArtifactPanel-YFXT5O77.css';
4
+ import './ArtifactPanel-HW3SU7CP.css';
5
5
  import { useId, useRef, useLayoutEffect, useEffect } from 'react';
6
6
  import { MinimizeGlyph, MaximizeGlyph, XGlyph } from '@crewlethq/icons/glyphs';
7
7
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,6 +1,6 @@
1
- import { SlideStage } from './chunk-O63MWA4G.js';
1
+ import { SlideStage } from './chunk-LV4APO72.js';
2
2
  import { cx } from './chunk-ODEQTPFM.js';
3
- import './SlideGrid-RT6QEQEE.css';
3
+ import './SlideGrid-S4LTJ4UU.css';
4
4
  import { EyeOffGlyph } from '@crewlethq/icons/glyphs';
5
5
  import { jsx, jsxs } from 'react/jsx-runtime';
6
6
 
@@ -27,7 +27,7 @@ function SlideGrid({ sections, renderSlide, onOpen, current, className, labels }
27
27
  "data-hidden": slide.hidden ? "true" : void 0,
28
28
  onClick: () => onOpen(slide.id),
29
29
  children: [
30
- /* @__PURE__ */ jsx(SlideStage, { label: name, children: renderSlide(slide.id) }),
30
+ /* @__PURE__ */ jsx(SlideStage, { label: name, framed: true, children: renderSlide(slide.id) }),
31
31
  /* @__PURE__ */ jsxs("span", { className: "crewlet-slide-grid__caption", children: [
32
32
  /* @__PURE__ */ jsx("span", { className: "crewlet-slide-grid__number", children: n }),
33
33
  /* @__PURE__ */ jsx("span", { className: "crewlet-slide-grid__title", children: slide.title || text.untitled }),
@@ -1,6 +1,6 @@
1
1
  import { Composer } from './chunk-7DZDSSJS.js';
2
- import { Document } from './chunk-M3LUNN7F.js';
3
- import { PrincipalAvatar } from './chunk-4KP4RC3O.js';
2
+ import { Document } from './chunk-TYKQ33CL.js';
3
+ import { PrincipalAvatar } from './chunk-CI3VPIJN.js';
4
4
  import { toInstant, RelativeTime, formatExact, toISO } from './chunk-3CZ7XAVY.js';
5
5
  import { Count } from './chunk-BHHIIK3M.js';
6
6
  import { useHeadingLevel, headingTag } from './chunk-PQADV6P6.js';
@@ -1,4 +1,4 @@
1
- import { SegmentedControl } from './chunk-RCQXUT5K.js';
1
+ import { SegmentedControl } from './chunk-CCAXYHQS.js';
2
2
  import { Button } from './chunk-OG6CL3EB.js';
3
3
  import { cx } from './chunk-ODEQTPFM.js';
4
4
  import './MergeConflicts-O44ESH4T.css';
@@ -541,6 +541,54 @@ function drawnColumns(columns) {
541
541
  }
542
542
  var isTypingKey = (key2) => key2.key.length === 1 && !isMod(key2) && !key2.altKey;
543
543
 
544
+ // src/SheetModel/fit.ts
545
+ var SHEET_COLUMN_BOUNDS = {
546
+ text: [120, 280],
547
+ longtext: [160, 320],
548
+ number: [80, 180],
549
+ checkbox: [72, 180],
550
+ select: [104, 240],
551
+ // A multi-select draws its chips on one line and counts the rest, so its
552
+ // values do not size it: its default is its floor, and its header may widen it.
553
+ multiselect: [SHEET_COLUMN_WIDTHS.multiselect, 280],
554
+ status: [112, 260],
555
+ person: [120, 240],
556
+ date: [112, 180],
557
+ url: [160, 280],
558
+ rating: [104, 180]
559
+ };
560
+ var SHEET_FIT_SAMPLES = 8;
561
+ function fittedWidth(type, measured) {
562
+ if (!(measured > 0)) return SHEET_COLUMN_WIDTHS[type];
563
+ const [min, max] = SHEET_COLUMN_BOUNDS[type];
564
+ return Math.min(max, Math.max(min, Math.ceil(measured)));
565
+ }
566
+ function fitSamples(column, rows, context, limit = SHEET_FIT_SAMPLES) {
567
+ switch (column.type) {
568
+ case "select":
569
+ case "status":
570
+ return liveOptions(column).map((option) => option.id);
571
+ case "checkbox":
572
+ case "multiselect":
573
+ return [];
574
+ case "rating":
575
+ return [ratingMax(column)];
576
+ default: {
577
+ const longest = [];
578
+ for (const row of rows) {
579
+ const value = normalizeValue(column, row.values[column.field]);
580
+ if (isEmptyValue(value)) continue;
581
+ const length = displayText(column, value, context).length;
582
+ if (longest.length === limit && length <= longest[limit - 1].length) continue;
583
+ longest.push({ value, length });
584
+ longest.sort((a, b) => b.length - a.length);
585
+ if (longest.length > limit) longest.pop();
586
+ }
587
+ return longest.map((entry) => entry.value);
588
+ }
589
+ }
590
+ }
591
+
544
592
  // src/SheetModel/clipboard.ts
545
593
  function quote(field) {
546
594
  return /[\t\n\r"]/.test(field) ? `"${field.replaceAll('"', '""')}"` : field;
@@ -835,4 +883,4 @@ function cellSpeech(column, row, context) {
835
883
  return spokenText(column, normalizeValue(column, row.values[column.field]), context);
836
884
  }
837
885
 
838
- export { LONGTEXT_MAX_DEFAULT, RATING_MAX_CEILING, RATING_MAX_DEFAULT, SHEET_COLUMN_TYPES, SHEET_COLUMN_WIDTHS, SHEET_LABELS, SHEET_ROW_HEIGHT, SHEET_ROW_NUMBER_WIDTH, SheetPendingEdits, TEXT_MAX_DEFAULT, URL_MAX, cellDescription, cellKey, cellSpeech, changeText, changeTime, checkValue, columnOffsets, columnWidth, compareValues, displayText, drawnColumns, editText, editorSide, findOption, findPerson, flagText, hasPrevious, inRange, isEmptyValue, isMod, isMultiCell, isSheetColumnType, isTypingKey, liveOptions, moveFrom, nextSort, normalizeValue, optionHue, parseOptionList, parseTSV, parseText, planClear, planPaste, presenceByCell, presenceByColumn, presenceByRow, rangeOf, ratingMax, refusalText, rowName, sameValue, scrollToRow, sheetLabels, sortRows, spokenText, statusTone, textMax, toTSV, visibleRows };
886
+ export { LONGTEXT_MAX_DEFAULT, RATING_MAX_CEILING, RATING_MAX_DEFAULT, SHEET_COLUMN_BOUNDS, SHEET_COLUMN_TYPES, SHEET_COLUMN_WIDTHS, SHEET_FIT_SAMPLES, SHEET_LABELS, SHEET_ROW_HEIGHT, SHEET_ROW_NUMBER_WIDTH, SheetPendingEdits, TEXT_MAX_DEFAULT, URL_MAX, cellDescription, cellKey, cellSpeech, changeText, changeTime, checkValue, columnOffsets, columnWidth, compareValues, displayText, drawnColumns, editText, editorSide, findOption, findPerson, fitSamples, fittedWidth, flagText, hasPrevious, inRange, isEmptyValue, isMod, isMultiCell, isSheetColumnType, isTypingKey, liveOptions, moveFrom, nextSort, normalizeValue, optionHue, parseOptionList, parseTSV, parseText, planClear, planPaste, presenceByCell, presenceByColumn, presenceByRow, rangeOf, ratingMax, refusalText, rowName, sameValue, scrollToRow, sheetLabels, sortRows, spokenText, statusTone, textMax, toTSV, visibleRows };
@@ -1,6 +1,6 @@
1
- import { TreeGrid } from './chunk-VEB5ERRE.js';
1
+ import { TreeGrid } from './chunk-QWNVSR6G.js';
2
2
  import { createTreeModel, treeParent } from './chunk-MY374UUD.js';
3
- import { OrgLabel } from './chunk-AKEZ3G5V.js';
3
+ import { OrgLabel } from './chunk-ONQKKHON.js';
4
4
  import { AddPill } from './chunk-TROLVEZY.js';
5
5
  import { IconButton } from './chunk-4FQT6ZAY.js';
6
6
  import { cx } from './chunk-ODEQTPFM.js';
@@ -1,4 +1,4 @@
1
- import { useLayerContainer, viewportBounds, LAYER_GAP, outsideBounds, placePopup, LAYER_REPOSITION_EVENT } from './chunk-HMPFGIWM.js';
1
+ import { useLayerContainer, viewportBounds, LAYER_GAP, anchorGone, placePopup, LAYER_REPOSITION_EVENT } from './chunk-OMV5W53A.js';
2
2
  import { usePopupLayer, focusables } from './chunk-R25RGPUB.js';
3
3
  import { cx } from './chunk-ODEQTPFM.js';
4
4
  import './Popover-QCINR7WG.css';
@@ -68,14 +68,13 @@ function Popover({
68
68
  width: rect.width,
69
69
  height: rect.height
70
70
  };
71
- const whole = { x: 0, y: 0, width: host.width, height: host.height };
72
71
  const bounds = {
73
72
  x: LAYER_GAP,
74
73
  y: LAYER_GAP,
75
74
  width: host.width - 2 * LAYER_GAP,
76
75
  height: host.height - 2 * LAYER_GAP
77
76
  };
78
- if (outsideBounds(local, whole)) {
77
+ if (anchorGone(rect, host, inHost)) {
79
78
  close("anchor-gone");
80
79
  return;
81
80
  }
@@ -2,7 +2,7 @@ import { Link } from './chunk-FBSEJO2C.js';
2
2
  import { Tag } from './chunk-GFV4LJHH.js';
3
3
  import { RelativeTime } from './chunk-3CZ7XAVY.js';
4
4
  import { EmptyValue } from './chunk-EUCC37WY.js';
5
- import { Avatar } from './chunk-5OM447RW.js';
5
+ import { Avatar } from './chunk-PZKHBB7D.js';
6
6
  import { VisuallyHidden } from './chunk-BZFWDIV6.js';
7
7
  import { cx } from './chunk-ODEQTPFM.js';
8
8
  import './TableCells-3VN5N2M3.css';
@@ -1,6 +1,6 @@
1
- import { ConfirmModal } from './chunk-I3KKZ2O3.js';
2
1
  import { InlineCode } from './chunk-5CLW2CXT.js';
3
- import { Callout } from './chunk-SVSCLHHI.js';
2
+ import { ConfirmModal } from './chunk-XEGZHHRH.js';
3
+ import { Callout } from './chunk-SZZRIHGT.js';
4
4
  import './LinkInterstitial-ET4MSVSV.css';
5
5
  import { jsx, jsxs } from 'react/jsx-runtime';
6
6
 
@@ -257,12 +257,13 @@ var underOpens = (d) => String.raw`(?<!${NOT_WP})${d}(?!\s|$)`;
257
257
  var underCloses = (d) => String.raw`(?<!\s)${d}(?!${NOT_WP})`;
258
258
  var label = (name) => String.raw`(?<${name}>(?:\\[\s\S]|[^\]\\])*)`;
259
259
  var destination = (name, title) => String.raw`(?<${name}>(?:[^()\s]|\([^()\s]*\))*)(?:\s+"(?<${title}>[^"]*)")?\)`;
260
+ var linkLabel = (name) => String.raw`(?<${name}>(?:\\[\s\S]|!\[(?:\\[\s\S]|[^\]\\])*\]\((?:[^()\s]|\([^()\s]*\))*(?:\s+"[^"]*")?\)|[^\]\\])*)`;
260
261
  var ASCII_PUNCTUATION = String.raw`[!-\/:-@\[-\x60{-~]`;
261
262
  var INLINE_SOURCE = [
262
263
  String.raw`\\(?<esc>${ASCII_PUNCTUATION})`,
263
264
  String.raw`(?<tick>\x60+)(?<code>[\s\S]*?)\k<tick>`,
264
265
  String.raw`!\[` + label("alt") + String.raw`\]\(` + destination("src", "srcTitle"),
265
- String.raw`\[` + label("label") + String.raw`\]\(` + destination("href", "hrefTitle"),
266
+ String.raw`\[` + linkLabel("label") + String.raw`\]\(` + destination("href", "hrefTitle"),
266
267
  String.raw`<(?<auto>(?:https?:|mailto:)[^>\s]+)>`,
267
268
  // A strong run closes on a `**` no third asterisk follows, so `***both***`
268
269
  // is strong around emphasis rather than strong around `*both` and a stray.