@crewlethq/ui 0.82.0 → 0.84.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 (185) hide show
  1. package/README.md +63 -1
  2. package/dist/ActionCard/ActionCard.d.ts +7 -7
  3. package/dist/ActionCard/index.js +1 -1
  4. package/dist/ActionCard-YZKL3CKR.css +130 -0
  5. package/dist/AppShell/AccountRow.d.ts +6 -1
  6. package/dist/AppShell/AppShell.d.ts +25 -13
  7. package/dist/AppShell/index.d.ts +1 -1
  8. package/dist/AppShell/index.js +8 -5
  9. package/dist/AppShell/railMotion.d.ts +60 -0
  10. package/dist/AppShell/railShape.d.ts +5 -0
  11. package/dist/{AppShell-F7RID4P4.css → AppShell-NX5HCD4O.css} +251 -90
  12. package/dist/ArrangeList/index.js +3 -2
  13. package/dist/ArtifactBar/index.js +7 -5
  14. package/dist/ArtifactCard/index.js +3 -3
  15. package/dist/ArtifactKindIllustration/index.js +1 -1
  16. package/dist/{ArtifactKinds-3EH4KR3F.css → ArtifactKinds-27TE3KJL.css} +7 -7
  17. package/dist/ArtifactMakeRow/index.js +1 -1
  18. package/dist/ArtifactNameCell/index.js +1 -1
  19. package/dist/AuthLayout/index.js +3 -3
  20. package/dist/AvatarPicker/index.js +7 -6
  21. package/dist/BrandLockup/index.js +2 -2
  22. package/dist/BriefCard/index.js +2 -1
  23. package/dist/Canvas/index.js +4 -2
  24. package/dist/CanvasBoard/index.js +6 -4
  25. package/dist/CanvasToolbar/index.js +5 -3
  26. package/dist/CatalogTile/CatalogTile.d.ts +23 -5
  27. package/dist/CatalogTile/index.d.ts +1 -1
  28. package/dist/CatalogTile/index.js +2 -1
  29. package/dist/{CatalogTile-6VF36JWA.css → CatalogTile-TMOSGSV3.css} +4 -3
  30. package/dist/ChangeMark/index.js +4 -2
  31. package/dist/ChatThread/index.js +2 -2
  32. package/dist/CommandPalette/index.js +3 -2
  33. package/dist/CompactNav/CompactNav.d.ts +10 -6
  34. package/dist/CompactNav/index.js +2 -1
  35. package/dist/ContrastHelp/index.js +3 -2
  36. package/dist/DataGrid/index.js +2 -2
  37. package/dist/DataTable/index.js +4 -3
  38. package/dist/DataView/index.js +8 -7
  39. package/dist/DateTimePicker/index.js +3 -2
  40. package/dist/DeepWorkCard/index.js +2 -2
  41. package/dist/DirectoryList/index.js +1 -1
  42. package/dist/{DirectoryList-XZOWYOA3.css → DirectoryList-IXQIMNFS.css} +8 -1
  43. package/dist/DocTabsEditor/index.js +5 -3
  44. package/dist/DockColumn/DockColumn.d.ts +68 -0
  45. package/dist/DockColumn/index.d.ts +3 -0
  46. package/dist/DockColumn/index.js +6 -0
  47. package/dist/DockColumn-SMJCXHS4.css +61 -0
  48. package/dist/{Editor-7EQWP3RN.js → Editor-VGNB35NJ.js} +2 -1
  49. package/dist/EmojiPicker/index.js +5 -3
  50. package/dist/FactList/index.js +4 -2
  51. package/dist/HuePicker/index.js +5 -4
  52. package/dist/InboxList/InboxList.d.ts +28 -2
  53. package/dist/InboxList/index.d.ts +1 -1
  54. package/dist/InboxList/index.js +6 -1
  55. package/dist/{InboxList-OFGSX5IH.css → InboxList-X5Q5WWAI.css} +63 -2
  56. package/dist/LinkInterstitial/index.js +3 -2
  57. package/dist/ListDetail/ListDetail.d.ts +6 -0
  58. package/dist/ListDetail/index.js +1 -1
  59. package/dist/{ListDetail-N3L7PB46.css → ListDetail-JGESKTR7.css} +38 -0
  60. package/dist/ListInput/index.js +3 -2
  61. package/dist/MarkdownEditor/index.js +5 -4
  62. package/dist/MediaMatch/index.d.ts +1 -1
  63. package/dist/MediaMatch/index.js +1 -1
  64. package/dist/MediaMatch/useMediaMatch.d.ts +14 -0
  65. package/dist/Menu/index.js +2 -1
  66. package/dist/MergeConflicts/index.js +5 -4
  67. package/dist/MessageActions/index.js +6 -4
  68. package/dist/Modal/index.js +2 -1
  69. package/dist/OpenInAppCard/index.js +2 -2
  70. package/dist/Outline/index.js +2 -1
  71. package/dist/Popover/index.js +2 -1
  72. package/dist/Presence/index.d.ts +2 -0
  73. package/dist/Presence/index.js +4 -0
  74. package/dist/Presence/usePresence.d.ts +109 -0
  75. package/dist/ReactionBar/index.js +6 -4
  76. package/dist/ReadingPane/ReadingPane.d.ts +17 -1
  77. package/dist/ReadingPane/index.d.ts +1 -1
  78. package/dist/ReadingPane/index.js +2 -1
  79. package/dist/{ReadingPane-VLYOWMCM.css → ReadingPane-VFTRDPC5.css} +19 -0
  80. package/dist/RecordChip/index.js +3 -2
  81. package/dist/Reorder/index.js +2 -1
  82. package/dist/RichEditor/index.js +1 -1
  83. package/dist/SectionFrame/index.js +2 -2
  84. package/dist/SegmentedControl/index.js +4 -3
  85. package/dist/SetupWizard/index.js +2 -2
  86. package/dist/ShareDialog/index.js +5 -4
  87. package/dist/SheetColumnEditor/index.js +6 -5
  88. package/dist/SheetGrid/index.js +8 -6
  89. package/dist/SidebarNav/SidebarNav.d.ts +18 -2
  90. package/dist/SidebarNav/index.d.ts +1 -1
  91. package/dist/SidebarNav/index.js +1 -1
  92. package/dist/{SidebarNav-E7PZGGA6.css → SidebarNav-IKBKGXW4.css} +20 -0
  93. package/dist/SlideFilmstrip/index.js +5 -3
  94. package/dist/Switcher/index.js +5 -4
  95. package/dist/Tabs/index.js +3 -2
  96. package/dist/ThemeSwitcher/index.js +5 -4
  97. package/dist/TimeRangePicker/index.js +6 -5
  98. package/dist/TimeWindowPicker/index.js +3 -2
  99. package/dist/Tooltip/index.js +3 -1
  100. package/dist/TreeCanvas/index.js +6 -3
  101. package/dist/VersionCompare/index.js +5 -4
  102. package/dist/{chunk-KJR5X4II.js → chunk-22CU7V4J.js} +2 -2
  103. package/dist/{chunk-4RYELYWG.js → chunk-2SVQBQAD.js} +2 -2
  104. package/dist/{chunk-N2T7Y5KR.js → chunk-3AMWXJQX.js} +1 -1
  105. package/dist/{chunk-HQFOZJQ4.js → chunk-46FIBJCV.js} +4 -4
  106. package/dist/{chunk-LQRN2XZK.js → chunk-4DEKONVJ.js} +2 -2
  107. package/dist/chunk-5JPOFAVN.js +58 -0
  108. package/dist/{chunk-C7UHDM7Y.js → chunk-5V6GW6HK.js} +1 -1
  109. package/dist/{chunk-Q7N2ATMC.js → chunk-64JNKLLP.js} +57 -9
  110. package/dist/chunk-6C7GQOBV.js +10 -0
  111. package/dist/{chunk-YRNNUCQP.js → chunk-7BDBO2NP.js} +1 -1
  112. package/dist/{chunk-XGLMPPDW.js → chunk-7K6LVM5I.js} +1 -1
  113. package/dist/{chunk-FKAJBN6G.js → chunk-7M7WKYOV.js} +3 -3
  114. package/dist/{chunk-A5YKNRG6.js → chunk-7QCSISHM.js} +2 -1
  115. package/dist/{chunk-3QQIGMY3.js → chunk-7ZSEUO5Q.js} +6 -30
  116. package/dist/{chunk-57BFL323.js → chunk-ABRWL5FJ.js} +1 -1
  117. package/dist/{chunk-HFOTRZFU.js → chunk-AQNP3KQU.js} +2 -2
  118. package/dist/{chunk-GZVAZ3LL.js → chunk-AZYE7NR4.js} +1 -1
  119. package/dist/{chunk-6IOQWMYJ.js → chunk-BN5FEJL5.js} +1 -1
  120. package/dist/{chunk-25JQNHTC.js → chunk-BRK3HXGZ.js} +8 -2
  121. package/dist/{chunk-MPVMB2DV.js → chunk-BVML4UVB.js} +3 -2
  122. package/dist/{chunk-OAHRMR4U.js → chunk-C42XW5YP.js} +1 -1
  123. package/dist/{chunk-2H6YDUR5.js → chunk-C4JTX25K.js} +3 -3
  124. package/dist/{chunk-QE4OIE3Q.js → chunk-DJIWCW5Z.js} +6 -4
  125. package/dist/{chunk-HA2PL7PA.js → chunk-DRFOTWJE.js} +1 -1
  126. package/dist/{chunk-SM4P2SHB.js → chunk-EC6EUIAD.js} +7 -4
  127. package/dist/{chunk-QPHD4UUG.js → chunk-F6ZUM66S.js} +160 -25
  128. package/dist/{chunk-AMUXSJ2A.js → chunk-FPU7AA3X.js} +4 -15
  129. package/dist/{chunk-KLAVEJIO.js → chunk-GLKQHN7G.js} +1 -1
  130. package/dist/{chunk-MVMVMHYI.js → chunk-HDEKHP65.js} +1 -1
  131. package/dist/{chunk-XY4O2XMR.js → chunk-HKUZ2GYX.js} +4 -4
  132. package/dist/chunk-HTS5RJ7S.js +6 -0
  133. package/dist/{chunk-ZB3E2Z4Y.js → chunk-J5T5TDM2.js} +1 -1
  134. package/dist/{chunk-ISQANI6Q.js → chunk-JLOESTT2.js} +2 -1
  135. package/dist/{chunk-C75WZMXG.js → chunk-K6RWEQ6P.js} +1 -1
  136. package/dist/{chunk-GVPUCEWH.js → chunk-KXWJJWBD.js} +1 -1
  137. package/dist/chunk-L72URIHR.js +36 -0
  138. package/dist/{chunk-2TOGGCDM.js → chunk-LT44RL62.js} +2 -2
  139. package/dist/{chunk-C46DDVTK.js → chunk-LTD7KLOU.js} +1 -1
  140. package/dist/{chunk-HCUECVZ3.js → chunk-MVKUE4FI.js} +1 -1
  141. package/dist/{chunk-6YBBQAEM.js → chunk-MYAARF4Z.js} +1 -1
  142. package/dist/{chunk-SEKO6P3Y.js → chunk-NCUSI4ZU.js} +1 -1
  143. package/dist/{chunk-YBC2CYPD.js → chunk-O4VTQMEF.js} +1 -1
  144. package/dist/{chunk-HTBTAIH6.js → chunk-OM2LABPS.js} +2 -2
  145. package/dist/{chunk-T4IEESXN.js → chunk-ORONAXSF.js} +91 -25
  146. package/dist/chunk-PCAT2EFB.js +104 -0
  147. package/dist/{chunk-GP5TNTZH.js → chunk-QWRAWKB2.js} +53 -14
  148. package/dist/{chunk-TGCGLKD4.js → chunk-RBQRTGXX.js} +1 -1
  149. package/dist/{chunk-B3X4DHRB.js → chunk-RDIQB5ZE.js} +2 -2
  150. package/dist/{chunk-SRDNGGZE.js → chunk-RKIJAXQA.js} +1 -1
  151. package/dist/{chunk-T7WESRZF.js → chunk-RO5JU6SN.js} +2 -2
  152. package/dist/{chunk-IUWP2LSE.js → chunk-SGMWLUYQ.js} +2 -2
  153. package/dist/{chunk-LSOR77RZ.js → chunk-SHH7UD5U.js} +1 -1
  154. package/dist/{chunk-JV6JM6W6.js → chunk-SNQ7PH3D.js} +1 -1
  155. package/dist/{chunk-MPYRC3GO.js → chunk-SPNTUQBV.js} +2 -2
  156. package/dist/{chunk-YM77TZ7Q.js → chunk-T3S3D4FC.js} +1 -1
  157. package/dist/{chunk-YOJAGKTS.js → chunk-TGGYSQRD.js} +3 -4
  158. package/dist/{chunk-2KJCUCVE.js → chunk-TQKQRS2J.js} +2 -2
  159. package/dist/{chunk-ONNXUS5Y.js → chunk-VB3FVKNI.js} +1 -1
  160. package/dist/{chunk-JHQGNFN3.js → chunk-VONEKR3J.js} +2 -2
  161. package/dist/{chunk-P6F3PE4V.js → chunk-WANKINXG.js} +2 -2
  162. package/dist/{chunk-PXLS6JKL.js → chunk-WMO722J2.js} +1 -1
  163. package/dist/{chunk-SYVQXMLO.js → chunk-XRWHDW6F.js} +4 -4
  164. package/dist/{chunk-WT3B76MG.js → chunk-XTJHMP3W.js} +1 -1
  165. package/dist/{chunk-CF4M6N6A.js → chunk-XYSSFI5C.js} +1 -7
  166. package/dist/{chunk-RTPQDNW3.js → chunk-YJQXESOJ.js} +5 -1
  167. package/dist/{chunk-VGOWSOUA.js → chunk-YXKSUILG.js} +1 -1
  168. package/dist/{chunk-G6ZFSUIH.js → chunk-ZJVLGYE3.js} +2 -2
  169. package/dist/{chunk-BSAU7QRW.js → chunk-ZPTKAYJK.js} +1 -1
  170. package/dist/{chunk-XXDB6KPV.js → chunk-ZXXZESCD.js} +3 -4
  171. package/dist/generated/index.d.ts +2 -0
  172. package/dist/generated/index.js +108 -103
  173. package/dist/index.js +108 -103
  174. package/dist/styles.css +525 -134
  175. package/dist/utils/composedRef.d.ts +39 -0
  176. package/dist/utils/developing.d.ts +10 -0
  177. package/dist/utils/index.d.ts +2 -0
  178. package/dist/utils/index.js +3 -1
  179. package/dist/utils/tokenMs.d.ts +6 -0
  180. package/package.json +5 -5
  181. package/dist/ActionCard-47WSZ2O5.css +0 -110
  182. package/dist/{chunk-IYI6HWKN.js → chunk-CV2LU2T2.js} +1 -1
  183. package/dist/{chunk-FVZPSTL2.js → chunk-G4EHZHKM.js} +1 -1
  184. /package/dist/{chunk-FEJANUZK.js → chunk-KBSD476L.js} +0 -0
  185. /package/dist/{chunk-KLWWNV25.js → chunk-REEZQCML.js} +0 -0
@@ -1,7 +1,8 @@
1
- import { useMediaMatch } from './chunk-RTPQDNW3.js';
2
- import { useRailShape, RailShapeContext } from './chunk-ISQANI6Q.js';
3
- import { Tooltip } from './chunk-3QQIGMY3.js';
4
- import { Menu } from './chunk-YOJAGKTS.js';
1
+ import { releaseFocus, usePresence } from './chunk-PCAT2EFB.js';
2
+ import { useRailShape, RailShapeContext, RailLeavingContext } from './chunk-JLOESTT2.js';
3
+ import { useMediaMatch } from './chunk-YJQXESOJ.js';
4
+ import { Tooltip } from './chunk-7ZSEUO5Q.js';
5
+ import { Menu } from './chunk-TGGYSQRD.js';
5
6
  import { PeekContext, AsideContext, ResizeHandle, clampSize } from './chunk-PIYJNCN7.js';
6
7
  import { isApplePlatform, ariaKeyshortcuts, Kbd } from './chunk-CMAZZY2I.js';
7
8
  import { HIT_AREA_CLASS } from './chunk-2YTOOH3A.js';
@@ -11,7 +12,7 @@ import { IconButton } from './chunk-UAUP6XGK.js';
11
12
  import { VisuallyHidden } from './chunk-UT6CW3C7.js';
12
13
  import { cx } from './chunk-ODEQTPFM.js';
13
14
  import './HitArea-QUOS6ZDJ.css';
14
- import './AppShell-F7RID4P4.css';
15
+ import './AppShell-NX5HCD4O.css';
15
16
  import './ResizeHandle-2UNSZ4ZQ.css';
16
17
  import { createContext, forwardRef, useContext, useSyncExternalStore, useCallback, useId, useState, useRef, useEffect, useLayoutEffect } from 'react';
17
18
  import { breakpoint } from '@crewlethq/tokens';
@@ -183,6 +184,22 @@ function useScreenBelow(width) {
183
184
  const measured = useSyncExternalStore(store ? store.subscribe : noSubscription, read, () => null);
184
185
  return measured ?? window2;
185
186
  }
187
+ var RAIL_MOTION = {
188
+ transitions: ["width"],
189
+ animations: ["crewlet-app-shell-rail-unfold", "crewlet-app-shell-rail-settle"]
190
+ };
191
+ function useRailMotion(target, moves, rail) {
192
+ const [moved, setMoved] = useState(moves);
193
+ if (moved !== moves) setMoved(moves);
194
+ const instant = !moves || !moved;
195
+ const full = usePresence(target === "full", rail, { ...RAIL_MOTION, instant });
196
+ const compact = usePresence(target === "compact" && !full.leaving, rail, { ...RAIL_MOTION, instant });
197
+ let motion = null;
198
+ if (full.leaving) motion = "fold";
199
+ else if (full.entering) motion = full.returning ? "reverse" : "unfold";
200
+ else if (compact.entering) motion = "folded";
201
+ return { drawn: full.present ? "full" : "compact", motion, leaving: full.leaving };
202
+ }
186
203
  var APP_SHELL_ASIDE_WIDTH = 420;
187
204
  var NARROW = `(width < ${breakpoint.shell})`;
188
205
  var AppShellContext = createContext(null);
@@ -229,6 +246,7 @@ function AppShell({
229
246
  const narrow = useMediaMatch(NARROW);
230
247
  const [drawerOpen, setDrawerOpen] = useState(false);
231
248
  const [scroller, setScroller] = useState(null);
249
+ const [gauge, setGauge] = useState(null);
232
250
  const [drawerZ, setDrawerZ] = useState(null);
233
251
  const rail = useRef(null);
234
252
  const closeDrawer = useCallback(() => setDrawerOpen(false), []);
@@ -246,16 +264,30 @@ function AppShell({
246
264
  },
247
265
  [mainRef]
248
266
  );
267
+ const railMoving = useRef(false);
268
+ const heldMeasures = useRef(/* @__PURE__ */ new Set());
269
+ const unlessRailMoving = useCallback(
270
+ (measure) => () => {
271
+ if (railMoving.current) heldMeasures.current.add(measure);
272
+ else measure();
273
+ },
274
+ []
275
+ );
249
276
  const [gutter, setGutter] = useState(0);
250
277
  useLayoutEffect(() => {
251
- if (!scroller) return void 0;
252
- const measure = () => setGutter(Math.max(0, scroller.offsetWidth - scroller.clientWidth));
278
+ const ruler = gauge ?? scroller;
279
+ if (!ruler) return void 0;
280
+ const measure = () => setGutter(Math.max(0, ruler.offsetWidth - ruler.clientWidth));
253
281
  measure();
254
282
  if (typeof ResizeObserver === "undefined") return void 0;
255
- const observer = new ResizeObserver(measure);
256
- observer.observe(scroller);
257
- return () => observer.disconnect();
258
- }, [scroller]);
283
+ const observer = new ResizeObserver(unlessRailMoving(measure));
284
+ observer.observe(ruler);
285
+ const held = heldMeasures.current;
286
+ return () => {
287
+ observer.disconnect();
288
+ held.delete(measure);
289
+ };
290
+ }, [gauge, scroller, unlessRailMoving]);
259
291
  const root = useRef(null);
260
292
  const sheet = useRef(null);
261
293
  const asideColumn = hasAside && asideShape === "column";
@@ -270,11 +302,15 @@ function AppShell({
270
302
  const measure = () => setOccupied(Math.max(0, Math.round(frame.getBoundingClientRect().right - page.getBoundingClientRect().right)));
271
303
  measure();
272
304
  if (typeof ResizeObserver === "undefined") return void 0;
273
- const observer = new ResizeObserver(measure);
305
+ const observer = new ResizeObserver(unlessRailMoving(measure));
274
306
  observer.observe(page);
275
307
  observer.observe(frame);
276
- return () => observer.disconnect();
277
- }, [asideColumn]);
308
+ const held = heldMeasures.current;
309
+ return () => {
310
+ observer.disconnect();
311
+ held.delete(measure);
312
+ };
313
+ }, [asideColumn, unlessRailMoving]);
278
314
  const content = useRef(null);
279
315
  const [screenWidth] = useState(createScreenWidthStore);
280
316
  useLayoutEffect(() => {
@@ -283,16 +319,44 @@ function AppShell({
283
319
  const measure = () => screenWidth.set(contentInlineSize(column));
284
320
  measure();
285
321
  if (typeof ResizeObserver === "undefined") return void 0;
286
- const observer = new ResizeObserver(measure);
322
+ const observer = new ResizeObserver(unlessRailMoving(measure));
287
323
  observer.observe(column);
324
+ const held = heldMeasures.current;
288
325
  return () => {
289
326
  observer.disconnect();
327
+ held.delete(measure);
290
328
  screenWidth.set(null);
291
329
  };
292
- }, [screenWidth]);
330
+ }, [screenWidth, unlessRailMoving]);
293
331
  const hasRail = sidebar !== void 0 && sidebar !== null;
294
- const railShape = hasRail && railChoice === "compact" && !narrow ? "compact" : "full";
332
+ const railTarget = hasRail && railChoice === "compact" && !narrow ? "compact" : "full";
333
+ const { drawn: railShape, motion: railMotion, leaving: railLeaving } = useRailMotion(railTarget, hasRail && !narrow, rail);
295
334
  const foldable = hasRail && onRailChange !== void 0 && !narrow;
335
+ railMoving.current = railMotion !== null;
336
+ useLayoutEffect(() => {
337
+ if (railMotion !== null) return;
338
+ const held = [...heldMeasures.current];
339
+ heldMeasures.current.clear();
340
+ for (const measure of held) measure();
341
+ }, [railMotion]);
342
+ const refocusFolded = useRef(false);
343
+ useLayoutEffect(() => {
344
+ const aside2 = rail.current;
345
+ if (!aside2) return;
346
+ if (railLeaving) {
347
+ const held2 = aside2.ownerDocument.activeElement;
348
+ const leavingPart = held2 instanceof HTMLElement ? held2.closest("[inert]") : null;
349
+ if (!leavingPart || !aside2.contains(leavingPart)) return;
350
+ const live = focusables(aside2).find((element) => !element.closest("[inert]")) ?? null;
351
+ releaseFocus(leavingPart, live);
352
+ refocusFolded.current = live === null;
353
+ return;
354
+ }
355
+ if (!refocusFolded.current) return;
356
+ refocusFolded.current = false;
357
+ const held = aside2.ownerDocument.activeElement;
358
+ if (held === null || held === aside2.ownerDocument.body) focusables(aside2)[0]?.focus();
359
+ }, [railLeaving]);
296
360
  const shell = {
297
361
  narrow,
298
362
  drawerOpen,
@@ -323,6 +387,7 @@ function AppShell({
323
387
  "data-aside": hasAside ? asideShape : void 0,
324
388
  "data-peek": hasPeek ? peekShape : void 0,
325
389
  "data-rail": hasRail ? railShape : void 0,
390
+ "data-rail-motion": railMotion ?? void 0,
326
391
  style: {
327
392
  ...style,
328
393
  ["--crewlet-app-shell-gutter"]: `${gutter}px`,
@@ -362,14 +427,15 @@ function AppShell({
362
427
  "aria-modal": drawerOpen || void 0,
363
428
  "aria-label": drawerOpen ? toggleLabel : void 0,
364
429
  children: [
365
- foldable ? /* @__PURE__ */ jsx(RailFold, { rail: railShape, onRailChange, keys: railFoldKeys, labels: railFoldLabels, railId }) : null,
366
- /* @__PURE__ */ jsx(RailShapeContext.Provider, { value: railShape, children: sidebar })
430
+ foldable ? /* @__PURE__ */ jsx(RailFold, { rail: railTarget, onRailChange, keys: railFoldKeys, labels: railFoldLabels, railId }) : null,
431
+ /* @__PURE__ */ jsx(RailShapeContext.Provider, { value: railShape, children: /* @__PURE__ */ jsx(RailLeavingContext.Provider, { value: railLeaving, children: sidebar }) })
367
432
  ]
368
433
  }
369
434
  ) : null,
370
435
  /* @__PURE__ */ jsxs("div", { ref: sheet, className: "crewlet-app-shell__sheet", children: [
371
436
  topbar,
372
437
  banner ? /* @__PURE__ */ jsx("div", { className: "crewlet-app-shell__banner", children: banner }) : null,
438
+ fill === true ? /* @__PURE__ */ jsx("div", { className: "crewlet-app-shell__gauge", "aria-hidden": "true", children: /* @__PURE__ */ jsx("div", { ref: setGauge, className: "crewlet-app-shell__gauge-ruler" }) }) : null,
373
439
  /* @__PURE__ */ jsxs("div", { className: "crewlet-app-shell__body", children: [
374
440
  /* @__PURE__ */ jsx("main", { id: main, ref: setMain, className: "crewlet-app-shell__main", tabIndex: -1, children: /* @__PURE__ */ jsx("div", { ref: content, className: "crewlet-app-shell__content", children: /* @__PURE__ */ jsx(ScreenWidthContext.Provider, { value: screenWidth, children }) }) }),
375
441
  hasPeek ? /* @__PURE__ */ jsx(PeekContext.Provider, { value: { shape: peekShape }, children: peek }) : null
@@ -558,6 +624,7 @@ function RailFold({
558
624
  variant: "ghost",
559
625
  icon: compact ? /* @__PURE__ */ jsx(ChevronsRightGlyph, { size: "sm" }) : /* @__PURE__ */ jsx(ChevronsLeftGlyph, { size: "sm" }),
560
626
  "aria-controls": railId,
627
+ "aria-expanded": !compact,
561
628
  "aria-keyshortcuts": keys ? ariaKeyshortcuts(keys, apple) : void 0,
562
629
  onClick: () => onRailChange?.(compact ? "full" : "compact")
563
630
  }
@@ -567,20 +634,19 @@ function RailFold({
567
634
  }
568
635
  function AppShellRail({ header, search, status, footer, className, children }) {
569
636
  const compact = useRailShape() === "compact";
570
- const statusSlot = status ? /* @__PURE__ */ jsx("div", { className: "crewlet-app-shell__rail-status", children: status }) : null;
637
+ const leaving = useContext(RailLeavingContext) || void 0;
638
+ const statusSlot = status ? /* @__PURE__ */ jsx("div", { className: "crewlet-app-shell__rail-status", inert: leaving, children: status }) : null;
571
639
  return /* @__PURE__ */ jsxs("div", { className: cx("crewlet-app-shell__rail-inner", className), children: [
572
640
  header || status && !compact ? /* @__PURE__ */ jsxs("div", { className: "crewlet-app-shell__rail-head", children: [
573
641
  header,
574
642
  compact ? null : statusSlot
575
643
  ] }) : null,
576
- /* @__PURE__ */ jsxs("div", { className: "crewlet-app-shell__rail-body", children: [
644
+ compact ? statusSlot : null,
645
+ /* @__PURE__ */ jsxs("div", { className: "crewlet-app-shell__rail-body", inert: leaving, children: [
577
646
  search && !compact ? /* @__PURE__ */ jsx("div", { className: "crewlet-app-shell__rail-search", children: search }) : null,
578
647
  children
579
648
  ] }),
580
- footer || status && compact ? /* @__PURE__ */ jsxs("div", { className: "crewlet-app-shell__rail-foot", children: [
581
- compact ? statusSlot : null,
582
- footer
583
- ] }) : null
649
+ footer ? /* @__PURE__ */ jsx("div", { className: "crewlet-app-shell__rail-foot", inert: leaving, children: footer }) : null
584
650
  ] });
585
651
  }
586
652
  function countWords(count) {
@@ -0,0 +1,104 @@
1
+ import { useMediaMatch, REDUCED_MOTION_QUERY } from './chunk-YJQXESOJ.js';
2
+ import { tokenMs } from './chunk-HTS5RJ7S.js';
3
+ import { returnFocus } from './chunk-4ITETIGZ.js';
4
+ import { useState, useLayoutEffect } from 'react';
5
+ import { motion } from '@crewlethq/tokens';
6
+
7
+ var MOTION_MARGIN_MS = tokenMs(motion.duration.fast);
8
+ function transitionProperty(animation) {
9
+ const property = animation.transitionProperty;
10
+ return typeof property === "string" ? property : null;
11
+ }
12
+ function animationName(animation) {
13
+ const name = animation.animationName;
14
+ return typeof name === "string" ? name : null;
15
+ }
16
+ function targetOf(animation) {
17
+ const effect = animation.effect;
18
+ return effect && "target" in effect ? effect.target : null;
19
+ }
20
+ function runningMotion(element, owned = {}) {
21
+ if (typeof element.getAnimations !== "function") return [];
22
+ const names = owned.animations ?? [];
23
+ return element.getAnimations({ subtree: names.length > 0 }).filter((animation) => {
24
+ if (animation.playState !== "running") return false;
25
+ const end = animation.effect?.getComputedTiming().endTime;
26
+ if (typeof end !== "number" || !Number.isFinite(end)) return false;
27
+ const property = transitionProperty(animation);
28
+ if (property !== null) {
29
+ return targetOf(animation) === element && (owned.transitions?.includes(property) ?? true);
30
+ }
31
+ const name = animationName(animation);
32
+ return name !== null && names.includes(name);
33
+ });
34
+ }
35
+ function remainingMs(running) {
36
+ return Math.max(
37
+ 0,
38
+ ...running.map((animation) => {
39
+ const end = Number(animation.effect?.getComputedTiming().endTime ?? 0);
40
+ const now = typeof animation.currentTime === "number" ? animation.currentTime : 0;
41
+ return end - now;
42
+ })
43
+ );
44
+ }
45
+ function afterMotion(element, done, owned = {}) {
46
+ let live = true;
47
+ let bound;
48
+ const stop = () => {
49
+ live = false;
50
+ if (bound !== void 0) clearTimeout(bound);
51
+ };
52
+ const finish = () => {
53
+ if (!live) return;
54
+ stop();
55
+ done();
56
+ };
57
+ const wait = () => {
58
+ if (!live) return;
59
+ const running = element ? runningMotion(element, owned) : [];
60
+ if (running.length === 0) {
61
+ finish();
62
+ return;
63
+ }
64
+ if (bound !== void 0) clearTimeout(bound);
65
+ bound = setTimeout(finish, remainingMs(running) + MOTION_MARGIN_MS);
66
+ void Promise.allSettled(running.map((animation) => animation.finished)).then(wait);
67
+ };
68
+ wait();
69
+ return stop;
70
+ }
71
+ function releaseFocus(container, target) {
72
+ const held = container?.ownerDocument.activeElement;
73
+ if (!container || !(held instanceof HTMLElement) || !container.contains(held)) return;
74
+ if (target?.isConnected && !container.contains(target) && returnFocus(target)) return;
75
+ held.blur();
76
+ }
77
+ function usePresence(shown, motion, { transitions, animations, instant = false } = {}) {
78
+ const still = useMediaMatch(REDUCED_MOTION_QUERY) || instant;
79
+ const [state, setState] = useState({ shown, leaving: false, entering: false, returning: false });
80
+ let current = state;
81
+ if (state.shown !== shown) {
82
+ current = { shown, leaving: !shown && !still, entering: shown && !still, returning: shown && !still && state.leaving };
83
+ }
84
+ if (still && (current.leaving || current.entering)) current = { ...current, leaving: false, entering: false, returning: false };
85
+ if (current !== state) setState(current);
86
+ const { leaving, entering, returning } = current;
87
+ const moving = leaving || entering;
88
+ const ownTransitions = transitions?.join(" ");
89
+ const ownAnimations = animations?.join(" ");
90
+ useLayoutEffect(() => {
91
+ if (!moving) return void 0;
92
+ return afterMotion(
93
+ motion.current,
94
+ () => setState((now) => now.shown === shown ? { ...now, leaving: false, entering: false, returning: false } : now),
95
+ {
96
+ transitions: ownTransitions === void 0 ? void 0 : ownTransitions.split(" ").filter(Boolean),
97
+ animations: ownAnimations === void 0 ? void 0 : ownAnimations.split(" ").filter(Boolean)
98
+ }
99
+ );
100
+ }, [moving, shown, motion, ownTransitions, ownAnimations]);
101
+ return { present: shown || leaving, leaving, entering, returning };
102
+ }
103
+
104
+ export { afterMotion, releaseFocus, runningMotion, usePresence };
@@ -1,4 +1,5 @@
1
1
  import { LockedLabel } from './chunk-TEV5REGB.js';
2
+ import { tokenMs } from './chunk-HTS5RJ7S.js';
2
3
  import { LAYER_GAP, useLayerContainer, viewportBounds, anchorGone, LAYER_REPOSITION_EVENT } from './chunk-OMV5W53A.js';
3
4
  import { HIT_AREA_CLASS } from './chunk-2YTOOH3A.js';
4
5
  import { usePopupLayer } from './chunk-TUEM2XIW.js';
@@ -7,7 +8,7 @@ import { VisuallyHidden } from './chunk-UT6CW3C7.js';
7
8
  import { cx } from './chunk-ODEQTPFM.js';
8
9
  import './HitArea-QUOS6ZDJ.css';
9
10
  import './CompactNav-CU2AQXBC.css';
10
- import { useState, useRef, useId, useCallback, useLayoutEffect, useEffect } from 'react';
11
+ import { useState, useRef, useId, useCallback, useEffect, useLayoutEffect } from 'react';
11
12
  import { createPortal } from 'react-dom';
12
13
  import { motion } from '@crewlethq/tokens';
13
14
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -52,7 +53,7 @@ function CompactNavItem({
52
53
  }) {
53
54
  const figure = badge ?? count;
54
55
  const inside = /* @__PURE__ */ jsxs(Fragment, { children: [
55
- /* @__PURE__ */ jsx(Tile, { icon, figure, attention: badge !== void 0 }),
56
+ /* @__PURE__ */ jsx(Tile, { icon, figure, attention: calling(badge) }),
56
57
  /* @__PURE__ */ jsx(TileLabel, { label, figures: [count, badge].filter((f) => f !== void 0).map(figureWords).join(""), locked })
57
58
  ] });
58
59
  const shown = title ?? titleOf({ label, badge, count, locked });
@@ -110,8 +111,11 @@ function figureNumber(value) {
110
111
  if (!match) return null;
111
112
  return { n: Number(match[1].replaceAll(",", "")), more: match[2] === "+" };
112
113
  }
114
+ function calling(badge) {
115
+ return badge !== void 0 && badge.tone !== "quiet";
116
+ }
113
117
  function groupBadge(links) {
114
- const badges = links.flatMap((link) => link.badge ? [link.badge] : []);
118
+ const badges = links.flatMap((link) => calling(link.badge) ? [link.badge] : []);
115
119
  if (badges.length === 0) return void 0;
116
120
  if (badges.length === 1) return badges[0].value;
117
121
  const read = badges.map((badge) => figureNumber(badge.value));
@@ -126,11 +130,8 @@ function placeFlyout(tile, railEnd, size, bounds, lift = 0) {
126
130
  const left = Math.max(bounds.x, Math.min(railEnd + LAYER_GAP, maxLeft));
127
131
  return { left, top };
128
132
  }
129
- function ms(value) {
130
- return Number.parseFloat(value);
131
- }
132
- var OPEN_DELAY = ms(motion.duration.fast);
133
- var CLOSE_DELAY = ms(motion.duration.moderate);
133
+ var OPEN_DELAY = tokenMs(motion.duration.fast);
134
+ var CLOSE_DELAY = tokenMs(motion.duration.moderate);
134
135
  function CompactNavGroup({ label, icon, links, renderLink, className }) {
135
136
  const [open, setOpen] = useState(false);
136
137
  const [place, setPlace] = useState(null);
@@ -143,7 +144,7 @@ function CompactNavGroup({ label, icon, links, renderLink, className }) {
143
144
  const container = useLayerContainer();
144
145
  const current = links.some((link) => link.current);
145
146
  const badge = groupBadge(links);
146
- const spoken = links.filter((link) => link.badge).map((link) => `${link.label} ${String(link.badge.value)} ${link.badge.label}`).join(", ");
147
+ const spoken = links.filter((link) => calling(link.badge)).map((link) => `${link.label} ${String(link.badge.value)} ${link.badge.label}`).join(", ");
147
148
  const clear = useCallback(() => {
148
149
  if (timer.current !== void 0) clearTimeout(timer.current);
149
150
  timer.current = void 0;
@@ -156,14 +157,36 @@ function CompactNavGroup({ label, icon, links, renderLink, className }) {
156
157
  },
157
158
  [clear]
158
159
  );
160
+ const restHeld = useRef(null);
161
+ const releaseRest = useCallback(() => {
162
+ restHeld.current?.();
163
+ restHeld.current = null;
164
+ }, []);
165
+ const holdRest = useCallback(() => {
166
+ releaseRest();
167
+ const away = (event) => {
168
+ if (!tile.current?.contains(event.target)) releaseRest();
169
+ };
170
+ document.addEventListener("pointermove", away);
171
+ restHeld.current = () => document.removeEventListener("pointermove", away);
172
+ }, [releaseRest]);
173
+ useEffect(() => releaseRest, [releaseRest]);
174
+ const settling = useRef(null);
175
+ useEffect(
176
+ () => () => {
177
+ if (settling.current !== null) cancelAnimationFrame(settling.current);
178
+ },
179
+ []
180
+ );
159
181
  const show = useCallback(
160
182
  (by, first) => {
161
183
  clear();
184
+ releaseRest();
162
185
  opener.current = by;
163
186
  focusFirst.current = first;
164
187
  setOpen(true);
165
188
  },
166
- [clear]
189
+ [clear, releaseRest]
167
190
  );
168
191
  const popup = usePopupLayer({
169
192
  open,
@@ -256,7 +279,7 @@ function CompactNavGroup({ label, icon, links, renderLink, className }) {
256
279
  const onPointerEnter = (event) => {
257
280
  if (event.pointerType !== "mouse") return;
258
281
  clear();
259
- if (!open) timer.current = setTimeout(() => show("pointer", false), OPEN_DELAY);
282
+ if (!open && restHeld.current === null) timer.current = setTimeout(() => show("pointer", false), OPEN_DELAY);
260
283
  };
261
284
  const onPointerLeave = (event) => {
262
285
  if (event.pointerType !== "mouse") return;
@@ -265,7 +288,20 @@ function CompactNavGroup({ label, icon, links, renderLink, className }) {
265
288
  };
266
289
  const choose = (link) => (event) => {
267
290
  link.onClick?.(event);
268
- close(panel.current?.contains(document.activeElement) === true && event.detail === 0);
291
+ const held = panel.current?.contains(document.activeElement) === true;
292
+ holdRest();
293
+ if (link.href === void 0) {
294
+ close(held);
295
+ return;
296
+ }
297
+ close(false);
298
+ if (!held) return;
299
+ if (settling.current !== null) cancelAnimationFrame(settling.current);
300
+ settling.current = requestAnimationFrame(() => {
301
+ settling.current = null;
302
+ const now = tile.current?.ownerDocument.activeElement;
303
+ if (now === null || now === void 0 || now === tile.current?.ownerDocument.body) returnFocus(tile.current);
304
+ });
269
305
  };
270
306
  const flyout = open ? /* @__PURE__ */ jsxs(
271
307
  "div",
@@ -299,7 +335,7 @@ function CompactNavGroup({ label, icon, links, renderLink, className }) {
299
335
  figure ? /* @__PURE__ */ jsx(
300
336
  "span",
301
337
  {
302
- className: cx("crewlet-compact-nav__link-figure", link.badge && "crewlet-compact-nav__link-figure--badge"),
338
+ className: cx("crewlet-compact-nav__link-figure", calling(link.badge) && "crewlet-compact-nav__link-figure--badge"),
303
339
  "aria-hidden": true,
304
340
  children: figure.value
305
341
  }
@@ -362,7 +398,10 @@ function CompactNavGroup({ label, icon, links, renderLink, className }) {
362
398
  },
363
399
  onKeyDown: onTileKeyDown,
364
400
  onPointerEnter,
365
- onPointerLeave,
401
+ onPointerLeave: (event) => {
402
+ if (event.pointerType === "mouse") releaseRest();
403
+ onPointerLeave(event);
404
+ },
366
405
  children: [
367
406
  /* @__PURE__ */ jsx(Tile, { icon, figure: badge === void 0 ? void 0 : { value: badge, label: "" }, attention: true }),
368
407
  /* @__PURE__ */ jsx(TileLabel, { label, figures: spoken ? `, ${spoken}` : "", locked: void 0 })
@@ -1,5 +1,5 @@
1
1
  import { diffLines, diffStat, collapseDiff, DiffSummary, DiffView } from './chunk-AOFVXE6V.js';
2
- import { SegmentedControl } from './chunk-GZVAZ3LL.js';
2
+ import { SegmentedControl } from './chunk-AZYE7NR4.js';
3
3
  import { EmptyState } from './chunk-PPUR46MK.js';
4
4
  import { useHeadingLevel, headingTag, nextHeadingLevel, HeadingLevelProvider } from './chunk-PQADV6P6.js';
5
5
  import { cx } from './chunk-ODEQTPFM.js';
@@ -1,5 +1,5 @@
1
- import { useReorder } from './chunk-MPVMB2DV.js';
2
- import { Menu } from './chunk-YOJAGKTS.js';
1
+ import { useReorder } from './chunk-BVML4UVB.js';
2
+ import { Menu } from './chunk-TGGYSQRD.js';
3
3
  import { Input } from './chunk-O7N6W52M.js';
4
4
  import { IconButton } from './chunk-UAUP6XGK.js';
5
5
  import { VisuallyHidden } from './chunk-UT6CW3C7.js';
@@ -1,6 +1,6 @@
1
1
  import { useHeadingLevel, headingTag } from './chunk-PQADV6P6.js';
2
2
  import { cx } from './chunk-ODEQTPFM.js';
3
- import './DirectoryList-XZOWYOA3.css';
3
+ import './DirectoryList-IXQIMNFS.css';
4
4
  import { useId } from 'react';
5
5
  import { jsxs, jsx } from 'react/jsx-runtime';
6
6
 
@@ -1,6 +1,6 @@
1
1
  import { SlideStage } from './chunk-O6EV6GKI.js';
2
- import { useReorder } from './chunk-MPVMB2DV.js';
3
- import { Menu } from './chunk-YOJAGKTS.js';
2
+ import { useReorder } from './chunk-BVML4UVB.js';
3
+ import { Menu } from './chunk-TGGYSQRD.js';
4
4
  import { Kbd, isApplePlatform } from './chunk-CMAZZY2I.js';
5
5
  import { VisuallyHidden } from './chunk-UT6CW3C7.js';
6
6
  import { cx } from './chunk-ODEQTPFM.js';
@@ -1,9 +1,9 @@
1
1
  import { Select } from './chunk-3IWZVEXA.js';
2
2
  import { SHEET_LABELS, SHEET_COLUMN_TYPES, optionHue, retypeColumn } from './chunk-LFSIKGRQ.js';
3
- import { HueSwatch } from './chunk-LSOR77RZ.js';
3
+ import { HueSwatch } from './chunk-SHH7UD5U.js';
4
4
  import { NODE_HUES, NODE_HUE_NAMES } from './chunk-AYKXMIOR.js';
5
5
  import { Checkbox } from './chunk-YQ7Q52XU.js';
6
- import { Menu } from './chunk-YOJAGKTS.js';
6
+ import { Menu } from './chunk-TGGYSQRD.js';
7
7
  import { FormField, Input } from './chunk-O7N6W52M.js';
8
8
  import { Kbd } from './chunk-CMAZZY2I.js';
9
9
  import { Button } from './chunk-DGXZ635L.js';
@@ -1,5 +1,5 @@
1
1
  import { NODE_HUES, NODE_HUE_NAMES } from './chunk-AYKXMIOR.js';
2
- import { SegmentedControl } from './chunk-GZVAZ3LL.js';
2
+ import { SegmentedControl } from './chunk-AZYE7NR4.js';
3
3
  import { cx } from './chunk-ODEQTPFM.js';
4
4
  import { jsx } from 'react/jsx-runtime';
5
5
 
@@ -1,4 +1,4 @@
1
- import { Tooltip } from './chunk-3QQIGMY3.js';
1
+ import { Tooltip } from './chunk-7ZSEUO5Q.js';
2
2
  import { VisuallyHidden } from './chunk-UT6CW3C7.js';
3
3
  import { cx } from './chunk-ODEQTPFM.js';
4
4
  import './FactList-QEOHLHX3.css';
@@ -1,5 +1,5 @@
1
- import { Popover } from './chunk-SM4P2SHB.js';
2
- import { Tooltip } from './chunk-3QQIGMY3.js';
1
+ import { Popover } from './chunk-EC6EUIAD.js';
2
+ import { Tooltip } from './chunk-7ZSEUO5Q.js';
3
3
  import { Input } from './chunk-O7N6W52M.js';
4
4
  import { isComposing } from './chunk-TUEM2XIW.js';
5
5
  import './EmojiPicker-FMWYN2WX.css';
@@ -1,6 +1,6 @@
1
1
  import { Select } from './chunk-3IWZVEXA.js';
2
2
  import { today, shiftMonth, CalendarGrid, compareDays } from './chunk-EE3DJMSQ.js';
3
- import { Popover } from './chunk-SM4P2SHB.js';
3
+ import { Popover } from './chunk-EC6EUIAD.js';
4
4
  import { Input } from './chunk-O7N6W52M.js';
5
5
  import { Button } from './chunk-DGXZ635L.js';
6
6
  import { isComposing } from './chunk-TUEM2XIW.js';
@@ -1,3 +1,4 @@
1
+ import { useComposedRef } from './chunk-L72URIHR.js';
1
2
  import { Button } from './chunk-DGXZ635L.js';
2
3
  import { useLayerContainer, viewportBounds, LAYER_GAP, anchorGone, placePopup, LAYER_REPOSITION_EVENT } from './chunk-OMV5W53A.js';
3
4
  import { usePopupLayer } from './chunk-TUEM2XIW.js';
@@ -77,6 +78,7 @@ function Menu({
77
78
  open,
78
79
  onDismiss: (reason) => close(reason !== "outside")
79
80
  });
81
+ const sharedRef = useComposedRef(triggerRef, popup.insideRef);
80
82
  const entries = () => menu.current ? [...menu.current.querySelectorAll(ITEM_SELECTOR)] : [];
81
83
  useLayoutEffect(() => {
82
84
  if (!open) return;
@@ -262,10 +264,7 @@ function Menu({
262
264
  }
263
265
  ) : null;
264
266
  const shared = {
265
- ref: (el) => {
266
- triggerRef.current = el;
267
- popup.insideRef(el);
268
- },
267
+ ref: sharedRef,
269
268
  "aria-haspopup": "menu",
270
269
  "aria-expanded": open,
271
270
  "aria-controls": open ? menuId : void 0,
@@ -1,6 +1,6 @@
1
1
  import { Toolbar } from './chunk-NXFTCPF6.js';
2
- import { SegmentedControl } from './chunk-GZVAZ3LL.js';
3
- import { tabId } from './chunk-HCUECVZ3.js';
2
+ import { SegmentedControl } from './chunk-AZYE7NR4.js';
3
+ import { tabId } from './chunk-MVKUE4FI.js';
4
4
  import { IconButton } from './chunk-UAUP6XGK.js';
5
5
  import { cx } from './chunk-ODEQTPFM.js';
6
6
  import './MarkdownEditor-BLCJRGDC.css';
@@ -1,5 +1,5 @@
1
1
  import { changeText, sheetLabels } from './chunk-LFSIKGRQ.js';
2
- import { Tooltip } from './chunk-3QQIGMY3.js';
2
+ import { Tooltip } from './chunk-7ZSEUO5Q.js';
3
3
  import { cx } from './chunk-ODEQTPFM.js';
4
4
  import './ChangeMark-KFDGBF6G.css';
5
5
  import { jsx } from 'react/jsx-runtime';
@@ -1,4 +1,4 @@
1
- import { useMediaMatch } from './chunk-RTPQDNW3.js';
1
+ import { useMediaMatch, REDUCED_MOTION_QUERY } from './chunk-YJQXESOJ.js';
2
2
  import { Button } from './chunk-DGXZ635L.js';
3
3
  import { VisuallyHidden } from './chunk-UT6CW3C7.js';
4
4
  import { cx } from './chunk-ODEQTPFM.js';
@@ -16,7 +16,7 @@ var ChatThread = forwardRef(function ChatThread2({ label, busy = false, follow =
16
16
  const labels = overrides ? { ...CHAT_THREAD_LABELS, ...overrides } : CHAT_THREAD_LABELS;
17
17
  const scroller = useRef(null);
18
18
  const items = useRef(null);
19
- const reduced = useMediaMatch("(prefers-reduced-motion: reduce)");
19
+ const reduced = useMediaMatch(REDUCED_MOTION_QUERY);
20
20
  const count = Children.toArray(children).length;
21
21
  const atEnd = useRef(true);
22
22
  const jumping = useRef(false);
@@ -1,9 +1,9 @@
1
- import { Modal } from './chunk-XXDB6KPV.js';
1
+ import { Modal } from './chunk-ZXXZESCD.js';
2
2
  import { useClipboard } from './chunk-STJ7QBC3.js';
3
3
  import { EmptyValue } from './chunk-RE3FBGQQ.js';
4
4
  import { useCardHeaderSlot } from './chunk-AV2DXAEL.js';
5
5
  import { Checkbox } from './chunk-YQ7Q52XU.js';
6
- import { Menu } from './chunk-YOJAGKTS.js';
6
+ import { Menu } from './chunk-TGGYSQRD.js';
7
7
  import { Button } from './chunk-DGXZ635L.js';
8
8
  import { IconButton } from './chunk-UAUP6XGK.js';
9
9
  import { VisuallyHidden } from './chunk-UT6CW3C7.js';
@@ -1,5 +1,5 @@
1
1
  import { ContrastLevelTag } from './chunk-2ZSCHQOA.js';
2
- import { Popover } from './chunk-SM4P2SHB.js';
2
+ import { Popover } from './chunk-EC6EUIAD.js';
3
3
  import { IconButton } from './chunk-UAUP6XGK.js';
4
4
  import { cx } from './chunk-ODEQTPFM.js';
5
5
  import './ContrastHelp-MZCAW5WQ.css';
@@ -1,12 +1,12 @@
1
1
  import { PageHeader } from './chunk-FPDIHEM4.js';
2
2
  import { FilterPill } from './chunk-K4LZXSKZ.js';
3
- import { DateTimePicker } from './chunk-XGLMPPDW.js';
4
- import { DataTable } from './chunk-P6F3PE4V.js';
3
+ import { DateTimePicker } from './chunk-7K6LVM5I.js';
4
+ import { DataTable } from './chunk-WANKINXG.js';
5
5
  import { useListbox, useOptionKeys } from './chunk-YGRTX67J.js';
6
6
  import { Toolbar } from './chunk-NXFTCPF6.js';
7
- import { Popover } from './chunk-SM4P2SHB.js';
7
+ import { Popover } from './chunk-EC6EUIAD.js';
8
8
  import { RelativeTime } from './chunk-EJNJMHQG.js';
9
- import { Menu } from './chunk-YOJAGKTS.js';
9
+ import { Menu } from './chunk-TGGYSQRD.js';
10
10
  import { Input } from './chunk-O7N6W52M.js';
11
11
  import { Kbd } from './chunk-CMAZZY2I.js';
12
12
  import { Button } from './chunk-DGXZ635L.js';