@dxos/react-ui 0.8.4-main.cb12b3f963 → 0.8.4-main.d05539e30a

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 (82) hide show
  1. package/LICENSE +102 -5
  2. package/README.md +1 -1
  3. package/dist/lib/browser/chunk-A5QCIG5R.mjs +24 -0
  4. package/dist/lib/browser/chunk-A5QCIG5R.mjs.map +7 -0
  5. package/dist/lib/browser/{chunk-BDBC6H6V.mjs → chunk-LY5XDQR5.mjs} +6 -8
  6. package/dist/lib/browser/chunk-LY5XDQR5.mjs.map +7 -0
  7. package/dist/lib/browser/index.mjs +601 -287
  8. package/dist/lib/browser/index.mjs.map +4 -4
  9. package/dist/lib/browser/meta.json +1 -1
  10. package/dist/lib/browser/testing/index.mjs +1 -7
  11. package/dist/lib/browser/testing/index.mjs.map +3 -3
  12. package/dist/lib/browser/translations.mjs +4 -13
  13. package/dist/lib/browser/translations.mjs.map +4 -4
  14. package/dist/lib/node-esm/{chunk-3JSJK2ZY.mjs → chunk-NGKLIKP3.mjs} +6 -8
  15. package/dist/lib/node-esm/chunk-NGKLIKP3.mjs.map +7 -0
  16. package/dist/lib/node-esm/chunk-XCFLA74M.mjs +26 -0
  17. package/dist/lib/node-esm/chunk-XCFLA74M.mjs.map +7 -0
  18. package/dist/lib/node-esm/index.mjs +601 -287
  19. package/dist/lib/node-esm/index.mjs.map +4 -4
  20. package/dist/lib/node-esm/meta.json +1 -1
  21. package/dist/lib/node-esm/testing/index.mjs +1 -7
  22. package/dist/lib/node-esm/testing/index.mjs.map +3 -3
  23. package/dist/lib/node-esm/translations.mjs +4 -14
  24. package/dist/lib/node-esm/translations.mjs.map +4 -4
  25. package/dist/types/src/components/Card/Card.d.ts +2 -5
  26. package/dist/types/src/components/Card/Card.d.ts.map +1 -1
  27. package/dist/types/src/components/Carousel/Carousel.d.ts +106 -0
  28. package/dist/types/src/components/Carousel/Carousel.d.ts.map +1 -0
  29. package/dist/types/src/components/Carousel/index.d.ts +2 -0
  30. package/dist/types/src/components/Carousel/index.d.ts.map +1 -0
  31. package/dist/types/src/components/Icon/Icon.d.ts +1 -0
  32. package/dist/types/src/components/Icon/Icon.d.ts.map +1 -1
  33. package/dist/types/src/components/Link/Link.d.ts.map +1 -1
  34. package/dist/types/src/components/List/ListDropIndicator.d.ts.map +1 -1
  35. package/dist/types/src/components/MediaPlayer/MediaPlayer.d.ts +46 -0
  36. package/dist/types/src/components/MediaPlayer/MediaPlayer.d.ts.map +1 -0
  37. package/dist/types/src/components/MediaPlayer/MediaPlayer.stories.d.ts +16 -0
  38. package/dist/types/src/components/MediaPlayer/MediaPlayer.stories.d.ts.map +1 -0
  39. package/dist/types/src/components/MediaPlayer/index.d.ts +2 -0
  40. package/dist/types/src/components/MediaPlayer/index.d.ts.map +1 -0
  41. package/dist/types/src/components/ScrollArea/ScrollArea.stories.d.ts.map +1 -1
  42. package/dist/types/src/components/ScrollContainer/ScrollContainer.d.ts.map +1 -1
  43. package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +1 -1
  44. package/dist/types/src/components/Tooltip/Tooltip.d.ts +6 -6
  45. package/dist/types/src/components/Tooltip/Tooltip.d.ts.map +1 -1
  46. package/dist/types/src/components/index.d.ts +2 -0
  47. package/dist/types/src/components/index.d.ts.map +1 -1
  48. package/dist/types/src/exemplars/slot.stories.d.ts.map +1 -1
  49. package/dist/types/src/exemplars/virtualizer.stories.d.ts.map +1 -1
  50. package/dist/types/src/translations.d.ts +5 -0
  51. package/dist/types/src/translations.d.ts.map +1 -1
  52. package/dist/types/tsconfig.tsbuildinfo +1 -1
  53. package/package.json +18 -18
  54. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +1 -1
  55. package/src/components/Button/IconButton.stories.tsx +1 -1
  56. package/src/components/Card/Card.stories.tsx +3 -3
  57. package/src/components/Card/Card.tsx +24 -17
  58. package/src/components/Carousel/Carousel.tsx +379 -0
  59. package/src/components/Carousel/index.ts +5 -0
  60. package/src/components/Clipboard/CopyButton.tsx +2 -2
  61. package/src/components/Icon/Icon.tsx +10 -3
  62. package/src/components/Link/Link.tsx +10 -2
  63. package/src/components/List/List.stories.tsx +1 -1
  64. package/src/components/List/List.tsx +1 -1
  65. package/src/components/List/ListDropIndicator.tsx +0 -1
  66. package/src/components/List/Tree.stories.tsx +1 -1
  67. package/src/components/MediaPlayer/MediaPlayer.stories.tsx +50 -0
  68. package/src/components/MediaPlayer/MediaPlayer.tsx +153 -0
  69. package/src/components/MediaPlayer/index.ts +5 -0
  70. package/src/components/Message/Message.tsx +2 -2
  71. package/src/components/ScrollArea/ScrollArea.stories.tsx +1 -5
  72. package/src/components/ScrollContainer/ScrollContainer.tsx +1 -3
  73. package/src/components/Toolbar/Toolbar.tsx +2 -1
  74. package/src/components/Tooltip/Tooltip.stories.tsx +1 -1
  75. package/src/components/Tooltip/Tooltip.tsx +14 -13
  76. package/src/components/index.ts +2 -0
  77. package/src/exemplars/slot.stories.tsx +2 -4
  78. package/src/exemplars/virtualizer.stories.tsx +0 -1
  79. package/src/testing/decorators/withLayout.tsx +6 -16
  80. package/src/translations.ts +5 -0
  81. package/dist/lib/browser/chunk-BDBC6H6V.mjs.map +0 -7
  82. package/dist/lib/node-esm/chunk-3JSJK2ZY.mjs.map +0 -7
@@ -17,7 +17,10 @@ import {
17
17
  useThemeContext,
18
18
  useTooltipContext,
19
19
  useTranslation
20
- } from "./chunk-BDBC6H6V.mjs";
20
+ } from "./chunk-LY5XDQR5.mjs";
21
+ import {
22
+ translationKey
23
+ } from "./chunk-A5QCIG5R.mjs";
21
24
 
22
25
  // src/index.ts
23
26
  import { Trans } from "react-i18next";
@@ -197,12 +200,19 @@ import { Slot as Slot3 } from "@radix-ui/react-slot";
197
200
  import React4, { forwardRef as forwardRef4 } from "react";
198
201
 
199
202
  // src/components/Icon/Icon.tsx
200
- import React2, { forwardRef as forwardRef2, memo } from "react";
201
- var Icon = /* @__PURE__ */ memo(/* @__PURE__ */ forwardRef2(({ icon, classNames, size, ...props }, forwardedRef) => {
203
+ import React2, { forwardRef as forwardRef2, memo, useMemo as useMemo3 } from "react";
204
+ var Icon = /* @__PURE__ */ memo(/* @__PURE__ */ forwardRef2(({ classNames, icon, size, synchronized, style, ...props }, forwardedRef) => {
202
205
  const { tx } = useThemeContext();
206
+ const spinDelay = useMemo3(() => synchronized ? `${-(Date.now() % 1e3)}ms` : void 0, [
207
+ synchronized
208
+ ]);
203
209
  const href = useIconHref(icon);
204
210
  return /* @__PURE__ */ React2.createElement("svg", {
205
211
  ...props,
212
+ style: {
213
+ ...style,
214
+ animationDelay: spinDelay
215
+ },
206
216
  className: tx("icon.root", {
207
217
  size
208
218
  }, classNames),
@@ -216,11 +226,13 @@ var Icon = /* @__PURE__ */ memo(/* @__PURE__ */ forwardRef2(({ icon, classNames,
216
226
  import { Primitive as Primitive2 } from "@radix-ui/react-primitive";
217
227
  import { Slot as Slot2 } from "@radix-ui/react-slot";
218
228
  import React3, { forwardRef as forwardRef3 } from "react";
219
- var Link = /* @__PURE__ */ forwardRef3(({ asChild, variant, classNames, ...props }, forwardedRef) => {
229
+ var Link = /* @__PURE__ */ forwardRef3(({ classNames, asChild, variant, target = "_blank", rel = "noreferrer", ...props }, forwardedRef) => {
220
230
  const { tx } = useThemeContext();
221
231
  const Comp = asChild ? Slot2 : Primitive2.a;
222
232
  return /* @__PURE__ */ React3.createElement(Comp, {
223
233
  ...props,
234
+ target,
235
+ rel,
224
236
  className: tx("link.root", {
225
237
  variant
226
238
  }, classNames),
@@ -459,7 +471,7 @@ var ToggleGroupIconItem = /* @__PURE__ */ forwardRef8(({ variant, label, icon, s
459
471
  import { Primitive as Primitive12 } from "@radix-ui/react-primitive";
460
472
  import { Slot as Slot12 } from "@radix-ui/react-slot";
461
473
  import DOMPurify from "dompurify";
462
- import React19, { createContext as createContext3, forwardRef as forwardRef13, useContext as useContext3, useMemo as useMemo4 } from "react";
474
+ import React19, { createContext as createContext3, forwardRef as forwardRef13, useContext as useContext3, useMemo as useMemo5 } from "react";
463
475
  import { composable as composable3, composableProps as composableProps7, iconSize, mx as mx6, slottable as slottable6 } from "@dxos/ui-theme";
464
476
 
465
477
  // src/primitives/Column/Column.tsx
@@ -829,7 +841,7 @@ import * as ToolbarPrimitive from "@radix-ui/react-toolbar";
829
841
  import React18, { forwardRef as forwardRef12 } from "react";
830
842
  import { useTranslation as useTranslation2 } from "react-i18next";
831
843
  import { composable as composable2, composableProps as composableProps6, slottable as slottable5 } from "@dxos/ui-theme";
832
- import { translationKey } from "#translations";
844
+ import { translationKey as translationKey2 } from "#translations";
833
845
 
834
846
  // src/components/Menu/ContextMenu.tsx
835
847
  import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
@@ -929,7 +941,7 @@ import { createMenuScope } from "@radix-ui/react-menu";
929
941
  import { Primitive as Primitive10 } from "@radix-ui/react-primitive";
930
942
  import { Slot as Slot10 } from "@radix-ui/react-slot";
931
943
  import { useControllableState } from "@radix-ui/react-use-controllable-state";
932
- import React16, { forwardRef as forwardRef10, useCallback as useCallback4, useEffect as useEffect2, useMemo as useMemo3, useRef as useRef2 } from "react";
944
+ import React16, { forwardRef as forwardRef10, useCallback as useCallback4, useEffect as useEffect2, useMemo as useMemo4, useRef as useRef2 } from "react";
933
945
  var DROPDOWN_MENU_NAME = "DropdownMenu";
934
946
  var [createDropdownMenuContext, createDropdownMenuScope] = createContextScope(DROPDOWN_MENU_NAME, [
935
947
  createMenuScope
@@ -1060,7 +1072,7 @@ var DropdownMenuContent = /* @__PURE__ */ forwardRef10((props, forwardedRef) =>
1060
1072
  const menuScope = useMenuScope(__scopeDropdownMenu);
1061
1073
  const hasInteractedOutsideRef = useRef2(false);
1062
1074
  const safeCollisionPadding = useSafeCollisionPadding(collisionPadding);
1063
- const computedCollisionBoundary = useMemo3(() => {
1075
+ const computedCollisionBoundary = useMemo4(() => {
1064
1076
  const closestBoundary = context.triggerRef.current?.closest("[data-popover-collision-boundary]");
1065
1077
  return closestBoundary ? Array.isArray(collisionBoundary) ? [
1066
1078
  closestBoundary,
@@ -1399,7 +1411,7 @@ var ToolbarToggleGroupItem = /* @__PURE__ */ forwardRef12(({ variant, density, e
1399
1411
  ref: forwardedRef
1400
1412
  }));
1401
1413
  });
1402
- var ToolbarToggleGroupIconItem = /* @__PURE__ */ forwardRef12(({ variant, density, elevation, classNames, icon, label, iconOnly, ...props }, forwardedRef) => {
1414
+ var ToolbarToggleGroupIconItem = /* @__PURE__ */ forwardRef12(({ variant, density, elevation, classNames, icon, label, iconOnly, iconClassNames, ...props }, forwardedRef) => {
1403
1415
  return /* @__PURE__ */ React18.createElement(ToolbarPrimitive.ToolbarToggleItem, {
1404
1416
  ...props,
1405
1417
  asChild: true
@@ -1411,6 +1423,7 @@ var ToolbarToggleGroupIconItem = /* @__PURE__ */ forwardRef12(({ variant, densit
1411
1423
  icon,
1412
1424
  label,
1413
1425
  iconOnly,
1426
+ iconClassNames,
1414
1427
  ref: forwardedRef
1415
1428
  }));
1416
1429
  });
@@ -1427,7 +1440,7 @@ var ToolbarSeparator = /* @__PURE__ */ forwardRef12(({ variant = "gap", ...props
1427
1440
  });
1428
1441
  });
1429
1442
  var ToolbarDragHandle = /* @__PURE__ */ forwardRef12(({ testId = "drag-handle", label }, forwardedRef) => {
1430
- const { t } = useTranslation2(translationKey);
1443
+ const { t } = useTranslation2(translationKey2);
1431
1444
  return /* @__PURE__ */ React18.createElement(ToolbarIconButton, {
1432
1445
  "data-testid": testId,
1433
1446
  tabIndex: -1,
@@ -1442,7 +1455,7 @@ var ToolbarDragHandle = /* @__PURE__ */ forwardRef12(({ testId = "drag-handle",
1442
1455
  });
1443
1456
  });
1444
1457
  var ToolbarCloseIconButton = /* @__PURE__ */ forwardRef12(({ onClick, label }, forwardedRef) => {
1445
- const { t } = useTranslation2(translationKey);
1458
+ const { t } = useTranslation2(translationKey2);
1446
1459
  return /* @__PURE__ */ React18.createElement(ToolbarIconButton, {
1447
1460
  iconOnly: true,
1448
1461
  icon: "ph--x--regular",
@@ -1454,7 +1467,7 @@ var ToolbarCloseIconButton = /* @__PURE__ */ forwardRef12(({ onClick, label }, f
1454
1467
  });
1455
1468
  });
1456
1469
  var ToolbarMenu = ({ context, items }) => {
1457
- const { t } = useTranslation2(translationKey);
1470
+ const { t } = useTranslation2(translationKey2);
1458
1471
  return /* @__PURE__ */ React18.createElement(DropdownMenu.Root, null, /* @__PURE__ */ React18.createElement(DropdownMenu.Trigger, {
1459
1472
  disabled: !items?.length,
1460
1473
  asChild: true
@@ -1487,24 +1500,23 @@ var Toolbar = {
1487
1500
  // src/components/Card/Card.tsx
1488
1501
  var CardContext = /* @__PURE__ */ createContext3({});
1489
1502
  var CARD_ROOT_NAME = "Card.Root";
1490
- var CardRoot = slottable6(({ children, id, asChild, role, border = true, fullWidth, density, ...props }, forwardedRef) => {
1503
+ var CardRoot = composable3(({ children, id, role, border = true, fullWidth, density, ...props }, forwardedRef) => {
1491
1504
  const { className, ...rest } = composableProps7(props);
1492
- const Comp = asChild ? Slot12 : Primitive12.div;
1493
1505
  const { tx } = useThemeContext();
1494
- return /* @__PURE__ */ React19.createElement(Comp, {
1506
+ return /* @__PURE__ */ React19.createElement(Column.Root, {
1507
+ asChild: true,
1508
+ gutter: density === "coarse" ? "lg" : "md",
1509
+ classNames: tx("card.root", {
1510
+ border,
1511
+ fullWidth
1512
+ }, className),
1513
+ role: role ?? "group"
1514
+ }, /* @__PURE__ */ React19.createElement("div", {
1495
1515
  ...rest,
1496
1516
  ...id && {
1497
1517
  "data-object-id": id
1498
1518
  },
1499
- role: role ?? "group",
1500
- className: tx("card.root", {
1501
- border,
1502
- fullWidth
1503
- }, className),
1504
1519
  ref: forwardedRef
1505
- }, /* @__PURE__ */ React19.createElement(Column.Root, {
1506
- classNames: "overflow-hidden",
1507
- gutter: density === "coarse" ? "lg" : "md"
1508
1520
  }, children));
1509
1521
  });
1510
1522
  CardRoot.displayName = CARD_ROOT_NAME;
@@ -1568,7 +1580,6 @@ var CardIconBlock = /* @__PURE__ */ forwardRef13(({ classNames, children, paddin
1568
1580
  const { tx } = useThemeContext();
1569
1581
  return /* @__PURE__ */ React19.createElement("div", {
1570
1582
  ...props,
1571
- role: "none",
1572
1583
  className: tx("card.icon-block", {
1573
1584
  padding
1574
1585
  }, classNames),
@@ -1668,12 +1679,11 @@ CardText.displayName = CARD_TEXT_NAME;
1668
1679
  var CARD_HTML_NAME = "Card.Html";
1669
1680
  var CardHtml = ({ html, variant = "default", ...props }) => {
1670
1681
  const { tx } = useThemeContext();
1671
- const sanitized = useMemo4(() => DOMPurify.sanitize(html), [
1682
+ const sanitized = useMemo5(() => DOMPurify.sanitize(html), [
1672
1683
  html
1673
1684
  ]);
1674
1685
  return /* @__PURE__ */ React19.createElement("div", {
1675
1686
  ...props,
1676
- role: "none",
1677
1687
  className: tx("card.text", {
1678
1688
  variant
1679
1689
  }),
@@ -1690,7 +1700,6 @@ var CardPoster = (props) => {
1690
1700
  const aspect = props.aspect === "auto" ? "aspect-auto" : "aspect-video";
1691
1701
  if (props.image) {
1692
1702
  return /* @__PURE__ */ React19.createElement("div", {
1693
- role: "none",
1694
1703
  className: "col-span-full"
1695
1704
  }, /* @__PURE__ */ React19.createElement(Image, {
1696
1705
  classNames: [
@@ -1782,21 +1791,329 @@ var Card = {
1782
1791
  Link: CardLink
1783
1792
  };
1784
1793
 
1794
+ // src/components/Carousel/Carousel.tsx
1795
+ import { useArrowNavigationGroup } from "@fluentui/react-tabster";
1796
+ import React21, { createContext as createContext4, useCallback as useCallback5, useContext as useContext4, useEffect as useEffect3, useMemo as useMemo6, useState as useState4 } from "react";
1797
+ import { mx as mx8 } from "@dxos/ui-theme";
1798
+
1799
+ // src/components/MediaPlayer/MediaPlayer.tsx
1800
+ import React20 from "react";
1801
+ import { mx as mx7 } from "@dxos/ui-theme";
1802
+ var VIDEO_EXTENSIONS = [
1803
+ ".mp4",
1804
+ ".webm",
1805
+ ".ogv",
1806
+ ".mov",
1807
+ ".m4v"
1808
+ ];
1809
+ var AUDIO_EXTENSIONS = [
1810
+ ".mp3",
1811
+ ".wav",
1812
+ ".ogg",
1813
+ ".m4a",
1814
+ ".aac",
1815
+ ".flac"
1816
+ ];
1817
+ var DEFAULT_IFRAME_SANDBOX = "allow-scripts allow-same-origin allow-presentation";
1818
+ var detectMediaKind = (src) => {
1819
+ const pathname = src.split(/[?#]/, 1)[0];
1820
+ const lower = pathname.toLowerCase();
1821
+ if (VIDEO_EXTENSIONS.some((extension) => lower.endsWith(extension))) {
1822
+ return "video";
1823
+ }
1824
+ if (AUDIO_EXTENSIONS.some((extension) => lower.endsWith(extension))) {
1825
+ return "audio";
1826
+ }
1827
+ return void 0;
1828
+ };
1829
+ var isEmbedUrl = (src) => detectMediaKind(src) !== void 0;
1830
+ var LEGACY_IFRAME_PATH_PATTERN = /\/iframe(?:[/?#]|$)/i;
1831
+ var isLegacyIframeUrl = (src) => {
1832
+ const pathAndQuery = src.split("#", 1)[0];
1833
+ return LEGACY_IFRAME_PATH_PATTERN.test(pathAndQuery);
1834
+ };
1835
+ var MediaPlayer = ({ classNames, src, kind, controls = true, autoPlay = false, loop = false, muted = false, alt, crossOrigin = "anonymous", imgClassNames, mediaClassNames }) => {
1836
+ if (isEmbedUrl(src)) {
1837
+ const resolved = kind ?? detectMediaKind(src) ?? "video";
1838
+ if (resolved === "audio") {
1839
+ return /* @__PURE__ */ React20.createElement("audio", {
1840
+ className: mx7("w-full", classNames, mediaClassNames),
1841
+ src,
1842
+ controls,
1843
+ autoPlay,
1844
+ loop,
1845
+ muted,
1846
+ crossOrigin,
1847
+ "aria-label": alt
1848
+ });
1849
+ }
1850
+ return /* @__PURE__ */ React20.createElement("video", {
1851
+ className: mx7("aspect-video max-w-full max-h-full", classNames, mediaClassNames),
1852
+ src,
1853
+ controls,
1854
+ autoPlay,
1855
+ loop,
1856
+ muted,
1857
+ crossOrigin,
1858
+ "aria-label": alt
1859
+ });
1860
+ }
1861
+ if (isLegacyIframeUrl(src)) {
1862
+ return /* @__PURE__ */ React20.createElement("iframe", {
1863
+ src,
1864
+ title: alt ?? "Embedded media",
1865
+ loading: "lazy",
1866
+ className: mx7("border-none", classNames, mediaClassNames),
1867
+ sandbox: DEFAULT_IFRAME_SANDBOX,
1868
+ referrerPolicy: "no-referrer",
1869
+ allow: "accelerometer; gyroscope; autoplay; encrypted-media; picture-in-picture;",
1870
+ allowFullScreen: true
1871
+ });
1872
+ }
1873
+ return /* @__PURE__ */ React20.createElement("img", {
1874
+ src,
1875
+ alt: alt ?? "",
1876
+ loading: "lazy",
1877
+ className: mx7(classNames, imgClassNames),
1878
+ onError: (event) => {
1879
+ event.currentTarget.style.display = "none";
1880
+ }
1881
+ });
1882
+ };
1883
+
1884
+ // src/components/Carousel/Carousel.tsx
1885
+ var CarouselContext = /* @__PURE__ */ createContext4(null);
1886
+ var useCarousel = () => {
1887
+ const context = useContext4(CarouselContext);
1888
+ if (!context) {
1889
+ throw new Error("useCarousel must be used within Carousel.Root");
1890
+ }
1891
+ return context;
1892
+ };
1893
+ var CarouselRoot = ({ classNames, children, count, autorun = false, intervalMs = 5e3, defaultIndex = 0 }) => {
1894
+ const [index, setIndexState] = useState4(defaultIndex);
1895
+ const [autoAdvance, setAutoAdvance] = useState4(autorun);
1896
+ useEffect3(() => {
1897
+ if (index >= count) {
1898
+ setIndexState(0);
1899
+ }
1900
+ }, [
1901
+ count,
1902
+ index
1903
+ ]);
1904
+ useEffect3(() => {
1905
+ if (!autoAdvance || count <= 1 || intervalMs <= 0) {
1906
+ return;
1907
+ }
1908
+ const handle = setInterval(() => setIndexState((i) => (i + 1) % count), intervalMs);
1909
+ return () => clearInterval(handle);
1910
+ }, [
1911
+ autoAdvance,
1912
+ count,
1913
+ intervalMs
1914
+ ]);
1915
+ const setIndex = useCallback5((next2) => {
1916
+ setAutoAdvance(false);
1917
+ setIndexState(next2);
1918
+ }, []);
1919
+ const next = useCallback5(() => {
1920
+ setAutoAdvance(false);
1921
+ setIndexState((i) => (i + 1) % count);
1922
+ }, [
1923
+ count
1924
+ ]);
1925
+ const prev = useCallback5(() => {
1926
+ setAutoAdvance(false);
1927
+ setIndexState((i) => (i - 1 + count) % count);
1928
+ }, [
1929
+ count
1930
+ ]);
1931
+ const value = useMemo6(() => ({
1932
+ index,
1933
+ count,
1934
+ setIndex,
1935
+ next,
1936
+ prev
1937
+ }), [
1938
+ index,
1939
+ count,
1940
+ setIndex,
1941
+ next,
1942
+ prev
1943
+ ]);
1944
+ if (count === 0) {
1945
+ return null;
1946
+ }
1947
+ return /* @__PURE__ */ React21.createElement(CarouselContext.Provider, {
1948
+ value
1949
+ }, /* @__PURE__ */ React21.createElement("div", {
1950
+ className: mx8("w-full grid grid-cols-[min-content_1fr_min-content] grid-rows-[minmax(0,1fr)_auto] gap-4 items-center", classNames)
1951
+ }, children));
1952
+ };
1953
+ CarouselRoot.displayName = "Carousel.Root";
1954
+ var CarouselViewport = ({ children, classNames }) => {
1955
+ const { t } = useTranslation(translationKey);
1956
+ const { count, next, prev } = useCarousel();
1957
+ const handleKeyDown = useCallback5((event) => {
1958
+ if (count <= 1) {
1959
+ return;
1960
+ }
1961
+ if (event.key === "ArrowLeft") {
1962
+ event.preventDefault();
1963
+ prev();
1964
+ } else if (event.key === "ArrowRight") {
1965
+ event.preventDefault();
1966
+ next();
1967
+ }
1968
+ }, [
1969
+ count,
1970
+ next,
1971
+ prev
1972
+ ]);
1973
+ return /* @__PURE__ */ React21.createElement("div", {
1974
+ // TODO(burdon): Move to ui-theme.
1975
+ className: mx8("relative w-full aspect-video overflow-hidden", "focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-500", classNames),
1976
+ tabIndex: 0,
1977
+ role: "region",
1978
+ "aria-roledescription": "carousel",
1979
+ "aria-label": t("carousel-viewport.label"),
1980
+ onKeyDown: handleKeyDown
1981
+ }, children);
1982
+ };
1983
+ CarouselViewport.displayName = "Carousel.Viewport";
1984
+ var CarouselSlide = ({ index, classNames, src, kind, alt, imgClassNames, mediaClassNames, controls, autoPlay, loop, muted, crossOrigin }) => {
1985
+ const { index: active } = useCarousel();
1986
+ if (active !== index) {
1987
+ return null;
1988
+ }
1989
+ return /* @__PURE__ */ React21.createElement("div", {
1990
+ className: mx8("absolute inset-0 w-full h-full bg-baseSurface", classNames)
1991
+ }, /* @__PURE__ */ React21.createElement(MediaPlayer, {
1992
+ src,
1993
+ kind,
1994
+ alt,
1995
+ classNames: "w-full h-full",
1996
+ imgClassNames: mx8("object-cover", imgClassNames),
1997
+ mediaClassNames,
1998
+ controls,
1999
+ autoPlay,
2000
+ loop,
2001
+ muted,
2002
+ crossOrigin
2003
+ }));
2004
+ };
2005
+ CarouselSlide.displayName = "Carousel.Slide";
2006
+ var CarouselPrevious = ({ classNames }) => {
2007
+ const { t } = useTranslation(translationKey);
2008
+ const { count, prev } = useCarousel();
2009
+ if (count <= 1) {
2010
+ return /* @__PURE__ */ React21.createElement("div", null);
2011
+ }
2012
+ return /* @__PURE__ */ React21.createElement(IconButton, {
2013
+ classNames: mx8("self-center", classNames),
2014
+ square: true,
2015
+ variant: "ghost",
2016
+ icon: "ph--caret-left--regular",
2017
+ iconOnly: true,
2018
+ label: t("carousel-prev.label"),
2019
+ onClick: prev
2020
+ });
2021
+ };
2022
+ CarouselPrevious.displayName = "Carousel.Previous";
2023
+ var CarouselNext = ({ classNames }) => {
2024
+ const { t } = useTranslation(translationKey);
2025
+ const { count, next } = useCarousel();
2026
+ if (count <= 1) {
2027
+ return /* @__PURE__ */ React21.createElement("div", null);
2028
+ }
2029
+ return /* @__PURE__ */ React21.createElement(IconButton, {
2030
+ classNames: mx8("self-center", classNames),
2031
+ square: true,
2032
+ variant: "ghost",
2033
+ icon: "ph--caret-right--regular",
2034
+ iconOnly: true,
2035
+ label: t("carousel-next.label"),
2036
+ onClick: next
2037
+ });
2038
+ };
2039
+ CarouselNext.displayName = "Carousel.Next";
2040
+ var CarouselIndicators = ({ classNames }) => {
2041
+ const { t } = useTranslation(translationKey);
2042
+ const { count, index, setIndex } = useCarousel();
2043
+ const arrowNavigationAttrs = useArrowNavigationGroup({
2044
+ axis: "horizontal",
2045
+ memorizeCurrent: true
2046
+ });
2047
+ if (count <= 1) {
2048
+ return null;
2049
+ }
2050
+ return /* @__PURE__ */ React21.createElement("div", {
2051
+ className: "col-start-2 overflow-hidden"
2052
+ }, /* @__PURE__ */ React21.createElement("div", {
2053
+ ...arrowNavigationAttrs,
2054
+ className: mx8("flex items-center justify-center", classNames),
2055
+ role: "tablist",
2056
+ "aria-label": t("carousel-indicators.label")
2057
+ }, Array.from({
2058
+ length: count
2059
+ }).map((_, i) => /* @__PURE__ */ React21.createElement(IconButton, {
2060
+ key: i,
2061
+ role: "tab",
2062
+ "aria-selected": i === index,
2063
+ classNames: i === index ? "text-primary-500" : "text-description",
2064
+ icon: i === index ? "ph--circle--fill" : "ph--circle--regular",
2065
+ iconOnly: true,
2066
+ label: t("carousel-go-to.label", {
2067
+ index: i + 1
2068
+ }),
2069
+ onClick: () => setIndex(i),
2070
+ onFocus: () => setIndex(i),
2071
+ size: 3,
2072
+ variant: "ghost"
2073
+ }))));
2074
+ };
2075
+ CarouselIndicators.displayName = "Carousel.Indicators";
2076
+ var CarouselCaption = ({ children, classNames }) => {
2077
+ const { index } = useCarousel();
2078
+ const content = children(index);
2079
+ if (content == null || content === false || content === "") {
2080
+ return null;
2081
+ }
2082
+ return (
2083
+ // TODO(burdon): Move to ui-theme.
2084
+ /* @__PURE__ */ React21.createElement("div", {
2085
+ className: "col-start-2"
2086
+ }, /* @__PURE__ */ React21.createElement("p", {
2087
+ className: mx8("text-center text-description", classNames)
2088
+ }, content))
2089
+ );
2090
+ };
2091
+ CarouselCaption.displayName = "Carousel.Caption";
2092
+ var Carousel = {
2093
+ Root: CarouselRoot,
2094
+ Viewport: CarouselViewport,
2095
+ Slide: CarouselSlide,
2096
+ Previous: CarouselPrevious,
2097
+ Next: CarouselNext,
2098
+ Indicators: CarouselIndicators,
2099
+ Caption: CarouselCaption
2100
+ };
2101
+
1785
2102
  // src/components/Clipboard/ClipboardProvider.tsx
1786
- import React20, { createContext as createContext4, useCallback as useCallback5, useContext as useContext4, useState as useState4 } from "react";
1787
- var ClipboardContext = /* @__PURE__ */ createContext4({
2103
+ import React22, { createContext as createContext5, useCallback as useCallback6, useContext as useContext5, useState as useState5 } from "react";
2104
+ var ClipboardContext = /* @__PURE__ */ createContext5({
1788
2105
  textValue: "",
1789
2106
  setTextValue: async (_) => {
1790
2107
  }
1791
2108
  });
1792
- var useClipboard = () => useContext4(ClipboardContext);
2109
+ var useClipboard = () => useContext5(ClipboardContext);
1793
2110
  var ClipboardProvider = ({ children }) => {
1794
- const [textValue, setInternalTextValue] = useState4("");
1795
- const setTextValue = useCallback5(async (nextValue) => {
2111
+ const [textValue, setInternalTextValue] = useState5("");
2112
+ const setTextValue = useCallback6(async (nextValue) => {
1796
2113
  await navigator.clipboard.writeText(nextValue);
1797
2114
  return setInternalTextValue(nextValue);
1798
2115
  }, []);
1799
- return /* @__PURE__ */ React20.createElement(ClipboardContext.Provider, {
2116
+ return /* @__PURE__ */ React22.createElement(ClipboardContext.Provider, {
1800
2117
  value: {
1801
2118
  textValue,
1802
2119
  setTextValue
@@ -1805,14 +2122,14 @@ var ClipboardProvider = ({ children }) => {
1805
2122
  };
1806
2123
 
1807
2124
  // src/components/Clipboard/CopyButton.tsx
1808
- import React21 from "react";
1809
- import { mx as mx7, osTranslations } from "@dxos/ui-theme";
2125
+ import React23 from "react";
2126
+ import { mx as mx9, osTranslations } from "@dxos/ui-theme";
1810
2127
  var inactiveLabelStyles = "invisible h-px -mb-px overflow-hidden";
1811
2128
  var CopyButton = ({ classNames, value, size = 5, ...props }) => {
1812
2129
  const { t } = useTranslation(osTranslations);
1813
2130
  const { textValue, setTextValue } = useClipboard();
1814
2131
  const isCopied = textValue === value;
1815
- return /* @__PURE__ */ React21.createElement(Button, {
2132
+ return /* @__PURE__ */ React23.createElement(Button, {
1816
2133
  ...props,
1817
2134
  classNames: [
1818
2135
  "inline-flex flex-col justify-center",
@@ -1820,20 +2137,18 @@ var CopyButton = ({ classNames, value, size = 5, ...props }) => {
1820
2137
  ],
1821
2138
  onClick: () => setTextValue(value),
1822
2139
  "data-testid": "copy-invitation"
1823
- }, /* @__PURE__ */ React21.createElement("div", {
1824
- role: "none",
1825
- className: mx7("flex gap-1 items-center", isCopied && inactiveLabelStyles)
1826
- }, /* @__PURE__ */ React21.createElement("span", {
2140
+ }, /* @__PURE__ */ React23.createElement("div", {
2141
+ className: mx9("flex gap-1 items-center", isCopied && inactiveLabelStyles)
2142
+ }, /* @__PURE__ */ React23.createElement("span", {
1827
2143
  className: "px-1"
1828
- }, t("copy.label")), /* @__PURE__ */ React21.createElement(Icon, {
2144
+ }, t("copy.label")), /* @__PURE__ */ React23.createElement(Icon, {
1829
2145
  icon: "ph--copy--regular",
1830
2146
  size
1831
- })), /* @__PURE__ */ React21.createElement("div", {
1832
- role: "none",
1833
- className: mx7("flex gap-1 items-center", !isCopied && inactiveLabelStyles)
1834
- }, /* @__PURE__ */ React21.createElement("span", {
2147
+ })), /* @__PURE__ */ React23.createElement("div", {
2148
+ className: mx9("flex gap-1 items-center", !isCopied && inactiveLabelStyles)
2149
+ }, /* @__PURE__ */ React23.createElement("span", {
1835
2150
  className: "px-1"
1836
- }, t("copy-success.label")), /* @__PURE__ */ React21.createElement(Icon, {
2151
+ }, t("copy-success.label")), /* @__PURE__ */ React23.createElement(Icon, {
1837
2152
  icon: "ph--check--regular",
1838
2153
  size
1839
2154
  })));
@@ -1844,7 +2159,7 @@ var CopyButtonIconOnly = ({ __scopeTooltip, value, classNames, size, variant, ..
1844
2159
  const isCopied = textValue === value;
1845
2160
  const label = isCopied ? t("copy-success.label") : props.label ?? t("copy.label");
1846
2161
  const { onOpen } = useTooltipContext("CopyButton", __scopeTooltip);
1847
- return /* @__PURE__ */ React21.createElement(IconButton, {
2162
+ return /* @__PURE__ */ React23.createElement(IconButton, {
1848
2163
  iconOnly: true,
1849
2164
  label,
1850
2165
  icon: "ph--copy--regular",
@@ -1867,16 +2182,16 @@ var Clipboard = {
1867
2182
  };
1868
2183
 
1869
2184
  // src/components/Dialog/Dialog.tsx
1870
- import { createContext as createContext5 } from "@radix-ui/react-context";
2185
+ import { createContext as createContext6 } from "@radix-ui/react-context";
1871
2186
  import * as DialogPrimitive from "@radix-ui/react-dialog";
1872
2187
  import { Primitive as Primitive13 } from "@radix-ui/react-primitive";
1873
2188
  import { Slot as Slot13 } from "@radix-ui/react-slot";
1874
- import React22, { forwardRef as forwardRef14 } from "react";
2189
+ import React24, { forwardRef as forwardRef14 } from "react";
1875
2190
  import { useTranslation as useTranslation3 } from "react-i18next";
1876
2191
  import { composableProps as composableProps8, osTranslations as osTranslations2, slottable as slottable7 } from "@dxos/ui-theme";
1877
- var DialogRoot = (props) => /* @__PURE__ */ React22.createElement(ElevationProvider, {
2192
+ var DialogRoot = (props) => /* @__PURE__ */ React24.createElement(ElevationProvider, {
1878
2193
  elevation: "dialog"
1879
- }, /* @__PURE__ */ React22.createElement(DialogPrimitive.Root, {
2194
+ }, /* @__PURE__ */ React24.createElement(DialogPrimitive.Root, {
1880
2195
  // NOTE: Radix warning unless set to undefined.
1881
2196
  // https://www.radix-ui.com/primitives/docs/components/dialog#description
1882
2197
  "aria-describedby": void 0,
@@ -1885,15 +2200,15 @@ var DialogRoot = (props) => /* @__PURE__ */ React22.createElement(ElevationProvi
1885
2200
  var DialogTrigger = DialogPrimitive.Trigger;
1886
2201
  var DialogPortal = DialogPrimitive.Portal;
1887
2202
  var DIALOG_OVERLAY_NAME = "DialogOverlay";
1888
- var [OverlayLayoutProvider, useOverlayLayoutContext] = createContext5(DIALOG_OVERLAY_NAME, {});
2203
+ var [OverlayLayoutProvider, useOverlayLayoutContext] = createContext6(DIALOG_OVERLAY_NAME, {});
1889
2204
  var DialogOverlay = /* @__PURE__ */ forwardRef14(({ classNames, children, blockAlign, ...props }, forwardedRef) => {
1890
2205
  const { tx } = useThemeContext();
1891
- return /* @__PURE__ */ React22.createElement(DialogPrimitive.Overlay, {
2206
+ return /* @__PURE__ */ React24.createElement(DialogPrimitive.Overlay, {
1892
2207
  ...props,
1893
2208
  "data-block-align": blockAlign,
1894
2209
  className: tx("dialog.overlay", {}, classNames),
1895
2210
  ref: forwardedRef
1896
- }, /* @__PURE__ */ React22.createElement(OverlayLayoutProvider, {
2211
+ }, /* @__PURE__ */ React24.createElement(OverlayLayoutProvider, {
1897
2212
  inOverlayLayout: true
1898
2213
  }, children));
1899
2214
  });
@@ -1902,7 +2217,7 @@ var DIALOG_CONTENT_NAME = "DialogContent";
1902
2217
  var DialogContent = /* @__PURE__ */ forwardRef14(({ classNames, children, size = "md", inOverlayLayout: propsInOverlayLayout, ...props }, forwardedRef) => {
1903
2218
  const { tx } = useThemeContext();
1904
2219
  const { inOverlayLayout } = useOverlayLayoutContext(DIALOG_CONTENT_NAME);
1905
- return /* @__PURE__ */ React22.createElement(DialogPrimitive.Content, {
2220
+ return /* @__PURE__ */ React24.createElement(DialogPrimitive.Content, {
1906
2221
  ...props,
1907
2222
  // NOTE: Radix warning unless set to undefined.
1908
2223
  // https://www.radix-ui.com/primitives/docs/components/dialog#description
@@ -1912,7 +2227,7 @@ var DialogContent = /* @__PURE__ */ forwardRef14(({ classNames, children, size =
1912
2227
  inOverlayLayout: propsInOverlayLayout || inOverlayLayout
1913
2228
  }, classNames),
1914
2229
  ref: forwardedRef
1915
- }, /* @__PURE__ */ React22.createElement(Column.Root, {
2230
+ }, /* @__PURE__ */ React24.createElement(Column.Root, {
1916
2231
  classNames: "dx-expander",
1917
2232
  gutter: "sm"
1918
2233
  }, children));
@@ -1922,7 +2237,7 @@ var DialogHeader = slottable7(({ children, asChild, ...props }, forwardedRef) =>
1922
2237
  const { className, ...rest } = composableProps8(props);
1923
2238
  const Comp = asChild ? Slot13 : Primitive13.div;
1924
2239
  const { tx } = useThemeContext();
1925
- return /* @__PURE__ */ React22.createElement(Comp, {
2240
+ return /* @__PURE__ */ React24.createElement(Comp, {
1926
2241
  ...rest,
1927
2242
  className: tx("dialog.header", {}, className),
1928
2243
  ref: forwardedRef
@@ -1930,7 +2245,7 @@ var DialogHeader = slottable7(({ children, asChild, ...props }, forwardedRef) =>
1930
2245
  });
1931
2246
  var DialogCloseIconButton = /* @__PURE__ */ forwardRef14(({ label, ...props }, forwardedRef) => {
1932
2247
  const { t } = useTranslation3(osTranslations2);
1933
- return /* @__PURE__ */ React22.createElement(IconButton, {
2248
+ return /* @__PURE__ */ React24.createElement(IconButton, {
1934
2249
  ...props,
1935
2250
  label: label ?? t("close-dialog.label"),
1936
2251
  icon: "ph--x--regular",
@@ -1944,7 +2259,7 @@ var DialogBody = slottable7(({ children, asChild, ...props }, forwardedRef) => {
1944
2259
  const { className, ...rest } = composableProps8(props);
1945
2260
  const Comp = asChild ? Slot13 : Primitive13.div;
1946
2261
  const { tx } = useThemeContext();
1947
- return /* @__PURE__ */ React22.createElement(Comp, {
2262
+ return /* @__PURE__ */ React24.createElement(Comp, {
1948
2263
  ...rest,
1949
2264
  className: tx("dialog.body", {}, className),
1950
2265
  ref: forwardedRef
@@ -1952,7 +2267,7 @@ var DialogBody = slottable7(({ children, asChild, ...props }, forwardedRef) => {
1952
2267
  });
1953
2268
  var DialogTitle = /* @__PURE__ */ forwardRef14(({ classNames, srOnly, ...props }, forwardedRef) => {
1954
2269
  const { tx } = useThemeContext();
1955
- return /* @__PURE__ */ React22.createElement(DialogPrimitive.Title, {
2270
+ return /* @__PURE__ */ React24.createElement(DialogPrimitive.Title, {
1956
2271
  ...props,
1957
2272
  className: tx("dialog.title", {
1958
2273
  srOnly
@@ -1962,7 +2277,7 @@ var DialogTitle = /* @__PURE__ */ forwardRef14(({ classNames, srOnly, ...props }
1962
2277
  });
1963
2278
  var DialogDescription = /* @__PURE__ */ forwardRef14(({ classNames, srOnly, ...props }, forwardedRef) => {
1964
2279
  const { tx } = useThemeContext();
1965
- return /* @__PURE__ */ React22.createElement(DialogPrimitive.Description, {
2280
+ return /* @__PURE__ */ React24.createElement(DialogPrimitive.Description, {
1966
2281
  ...props,
1967
2282
  className: tx("dialog.description", {
1968
2283
  srOnly
@@ -1974,7 +2289,7 @@ var DialogActionBar = slottable7(({ children, asChild, ...props }, forwardedRef)
1974
2289
  const { className: classNames, ...rest } = composableProps8(props);
1975
2290
  const Comp = asChild ? Slot13 : Primitive13.div;
1976
2291
  const { tx } = useThemeContext();
1977
- return /* @__PURE__ */ React22.createElement(Comp, {
2292
+ return /* @__PURE__ */ React24.createElement(Comp, {
1978
2293
  ...rest,
1979
2294
  className: tx("dialog.actionbar", {}, classNames),
1980
2295
  ref: forwardedRef
@@ -1998,28 +2313,28 @@ var Dialog = {
1998
2313
 
1999
2314
  // src/components/Dialog/AlertDialog.tsx
2000
2315
  import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
2001
- import { createContext as createContext6 } from "@radix-ui/react-context";
2002
- import React23, { forwardRef as forwardRef15 } from "react";
2003
- var AlertDialogRoot = (props) => /* @__PURE__ */ React23.createElement(ElevationProvider, {
2316
+ import { createContext as createContext7 } from "@radix-ui/react-context";
2317
+ import React25, { forwardRef as forwardRef15 } from "react";
2318
+ var AlertDialogRoot = (props) => /* @__PURE__ */ React25.createElement(ElevationProvider, {
2004
2319
  elevation: "dialog"
2005
- }, /* @__PURE__ */ React23.createElement(AlertDialogPrimitive.Root, props));
2320
+ }, /* @__PURE__ */ React25.createElement(AlertDialogPrimitive.Root, props));
2006
2321
  var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
2007
2322
  var AlertDialogPortal = AlertDialogPrimitive.Portal;
2008
2323
  var AlertDialogCancel = AlertDialogPrimitive.Cancel;
2009
2324
  var AlertDialogAction = AlertDialogPrimitive.Action;
2010
2325
  var ALERT_DIALOG_OVERLAY_NAME = "AlertDialogOverlay";
2011
2326
  var ALERT_DIALOG_CONTENT_NAME = "AlertDialogContent";
2012
- var [OverlayLayoutProvider2, useOverlayLayoutContext2] = createContext6(ALERT_DIALOG_OVERLAY_NAME, {
2327
+ var [OverlayLayoutProvider2, useOverlayLayoutContext2] = createContext7(ALERT_DIALOG_OVERLAY_NAME, {
2013
2328
  inOverlayLayout: false
2014
2329
  });
2015
2330
  var AlertDialogOverlay = /* @__PURE__ */ forwardRef15(({ classNames, children, blockAlign, ...props }, forwardedRef) => {
2016
2331
  const { tx } = useThemeContext();
2017
- return /* @__PURE__ */ React23.createElement(AlertDialogPrimitive.Overlay, {
2332
+ return /* @__PURE__ */ React25.createElement(AlertDialogPrimitive.Overlay, {
2018
2333
  ...props,
2019
2334
  "data-block-align": blockAlign,
2020
2335
  className: tx("dialog.overlay", {}, classNames),
2021
2336
  ref: forwardedRef
2022
- }, /* @__PURE__ */ React23.createElement(OverlayLayoutProvider2, {
2337
+ }, /* @__PURE__ */ React25.createElement(OverlayLayoutProvider2, {
2023
2338
  inOverlayLayout: true
2024
2339
  }, children));
2025
2340
  });
@@ -2027,7 +2342,7 @@ AlertDialogOverlay.displayName = ALERT_DIALOG_OVERLAY_NAME;
2027
2342
  var AlertDialogContent = /* @__PURE__ */ forwardRef15(({ classNames, children, size = "md", ...props }, forwardedRef) => {
2028
2343
  const { tx } = useThemeContext();
2029
2344
  const { inOverlayLayout } = useOverlayLayoutContext2(ALERT_DIALOG_CONTENT_NAME);
2030
- return /* @__PURE__ */ React23.createElement(AlertDialogPrimitive.Content, {
2345
+ return /* @__PURE__ */ React25.createElement(AlertDialogPrimitive.Content, {
2031
2346
  ...props,
2032
2347
  className: tx("dialog.content", {
2033
2348
  inOverlayLayout,
@@ -2037,7 +2352,7 @@ var AlertDialogContent = /* @__PURE__ */ forwardRef15(({ classNames, children, s
2037
2352
  // https://www.radix-ui.com/primitives/docs/components/dialog#description
2038
2353
  "aria-describedby": void 0,
2039
2354
  ref: forwardedRef
2040
- }, /* @__PURE__ */ React23.createElement(Column.Root, {
2355
+ }, /* @__PURE__ */ React25.createElement(Column.Root, {
2041
2356
  classNames: "dx-expander",
2042
2357
  gutter: "sm"
2043
2358
  }, children));
@@ -2045,7 +2360,7 @@ var AlertDialogContent = /* @__PURE__ */ forwardRef15(({ classNames, children, s
2045
2360
  AlertDialogContent.displayName = ALERT_DIALOG_CONTENT_NAME;
2046
2361
  var AlertDialogTitle = /* @__PURE__ */ forwardRef15(({ classNames, srOnly, ...props }, forwardedRef) => {
2047
2362
  const { tx } = useThemeContext();
2048
- return /* @__PURE__ */ React23.createElement(AlertDialogPrimitive.Title, {
2363
+ return /* @__PURE__ */ React25.createElement(AlertDialogPrimitive.Title, {
2049
2364
  ...props,
2050
2365
  className: tx("dialog.title", {
2051
2366
  srOnly
@@ -2055,7 +2370,7 @@ var AlertDialogTitle = /* @__PURE__ */ forwardRef15(({ classNames, srOnly, ...pr
2055
2370
  });
2056
2371
  var AlertDialogDescription = /* @__PURE__ */ forwardRef15(({ classNames, srOnly, ...props }, forwardedRef) => {
2057
2372
  const { tx } = useThemeContext();
2058
- return /* @__PURE__ */ React23.createElement(AlertDialogPrimitive.Description, {
2373
+ return /* @__PURE__ */ React25.createElement(AlertDialogPrimitive.Description, {
2059
2374
  ...props,
2060
2375
  className: tx("dialog.description", {
2061
2376
  srOnly
@@ -2085,52 +2400,52 @@ var AlertDialog = {
2085
2400
  import { ErrorBoundary } from "@dxos/react-error-boundary";
2086
2401
 
2087
2402
  // src/components/ErrorFallback/ErrorFallback.tsx
2088
- import React24 from "react";
2403
+ import React26 from "react";
2089
2404
  import { safeStringify } from "@dxos/util";
2090
2405
  var ErrorFallback = ({ children, error, title, data }) => {
2091
2406
  const isDev = true;
2092
2407
  const message = error instanceof Error ? error.message : String(error);
2093
- return /* @__PURE__ */ React24.createElement("div", {
2408
+ return /* @__PURE__ */ React26.createElement("div", {
2094
2409
  role: "alert",
2095
2410
  "data-testid": "error-boundary-fallback",
2096
2411
  className: "flex flex-col p-4 gap-4 overflow-auto"
2097
- }, /* @__PURE__ */ React24.createElement("h1", {
2412
+ }, /* @__PURE__ */ React26.createElement("h1", {
2098
2413
  className: "text-lg text-info-text"
2099
- }, title ?? "Runtime Error"), /* @__PURE__ */ React24.createElement("p", null, message), isDev && error instanceof Error && /* @__PURE__ */ React24.createElement(Section, {
2414
+ }, title ?? "Runtime Error"), /* @__PURE__ */ React26.createElement("p", null, message), isDev && error instanceof Error && /* @__PURE__ */ React26.createElement(Section, {
2100
2415
  title: "Stack",
2101
2416
  onClick: () => {
2102
2417
  const text = error instanceof Error ? error.stack ?? error.message : String(error);
2103
2418
  void navigator.clipboard.writeText(text);
2104
2419
  }
2105
- }, /* @__PURE__ */ React24.createElement(ErrorStack, {
2420
+ }, /* @__PURE__ */ React26.createElement(ErrorStack, {
2106
2421
  error
2107
- })), data && /* @__PURE__ */ React24.createElement(Section, {
2422
+ })), data && /* @__PURE__ */ React26.createElement(Section, {
2108
2423
  title: "Data",
2109
2424
  onClick: () => {
2110
2425
  void navigator.clipboard.writeText(JSON.stringify(data, void 0, 2));
2111
2426
  }
2112
- }, /* @__PURE__ */ React24.createElement("pre", {
2427
+ }, /* @__PURE__ */ React26.createElement("pre", {
2113
2428
  className: "overflow-x-auto text-xs"
2114
2429
  }, safeStringify(data, void 0, 2))), children);
2115
2430
  };
2116
2431
  var Section = ({ children, title, onClick }) => {
2117
- return /* @__PURE__ */ React24.createElement("div", {
2432
+ return /* @__PURE__ */ React26.createElement("div", {
2118
2433
  className: "flex flex-col gap-1"
2119
- }, onClick && /* @__PURE__ */ React24.createElement("button", {
2434
+ }, onClick && /* @__PURE__ */ React26.createElement("button", {
2120
2435
  type: "button",
2121
2436
  onClick,
2122
2437
  className: "flex items-center gap-1 text-xs text-subdued hover:text-primary-500 transition-colors",
2123
2438
  title: `Copy ${title}`
2124
- }, /* @__PURE__ */ React24.createElement("h2", {
2439
+ }, /* @__PURE__ */ React26.createElement("h2", {
2125
2440
  className: "text-xs uppercase text-subdued"
2126
2441
  }, title)), children);
2127
2442
  };
2128
2443
 
2129
2444
  // src/components/ErrorFallback/ThrowError.tsx
2130
- import { useEffect as useEffect3, useState as useState5 } from "react";
2445
+ import { useEffect as useEffect4, useState as useState6 } from "react";
2131
2446
  var ThrowError = ({ delay = 1e3, ...props }) => {
2132
- const [error, setError] = useState5();
2133
- useEffect3(() => {
2447
+ const [error, setError] = useState6();
2448
+ useEffect4(() => {
2134
2449
  if (delay < 0) {
2135
2450
  return;
2136
2451
  }
@@ -2155,15 +2470,15 @@ var generator = ({ error, delay }) => {
2155
2470
  };
2156
2471
 
2157
2472
  // src/components/Focus/Focus.tsx
2158
- import { useArrowNavigationGroup, useFocusableGroup, useMergedTabsterAttributes_unstable } from "@fluentui/react-tabster";
2473
+ import { useArrowNavigationGroup as useArrowNavigationGroup2, useFocusableGroup, useMergedTabsterAttributes_unstable } from "@fluentui/react-tabster";
2159
2474
  import { useComposedRefs } from "@radix-ui/react-compose-refs";
2160
2475
  import { Primitive as Primitive14 } from "@radix-ui/react-primitive";
2161
2476
  import { Slot as Slot14 } from "@radix-ui/react-slot";
2162
- import React25, { createContext as createContext7, useCallback as useCallback6, useContext as useContext5, useRef as useRef3, useState as useState6 } from "react";
2477
+ import React27, { createContext as createContext8, useCallback as useCallback7, useContext as useContext6, useRef as useRef3, useState as useState7 } from "react";
2163
2478
  import { composableProps as composableProps9, slottable as slottable8 } from "@dxos/ui-theme";
2164
2479
  var FOCUS_STATE_ATTR = "focus-state";
2165
- var FocusContext = /* @__PURE__ */ createContext7({});
2166
- var useFocus = () => useContext5(FocusContext);
2480
+ var FocusContext = /* @__PURE__ */ createContext8({});
2481
+ var useFocus = () => useContext6(FocusContext);
2167
2482
  var Group3 = slottable8(({ children, asChild, orientation = "vertical", border = false, ...props }, forwardedRef) => {
2168
2483
  const Comp = asChild ? Slot14 : Primitive14.div;
2169
2484
  const { tx } = useThemeContext();
@@ -2171,27 +2486,27 @@ var Group3 = slottable8(({ children, asChild, orientation = "vertical", border =
2171
2486
  const focusableGroupAttrs = useFocusableGroup({
2172
2487
  tabBehavior: "limited-trap-focus"
2173
2488
  });
2174
- const arrowNavigationAttrs = useArrowNavigationGroup({
2489
+ const arrowNavigationAttrs = useArrowNavigationGroup2({
2175
2490
  axis: orientation,
2176
2491
  memorizeCurrent: true
2177
2492
  });
2178
2493
  const tabsterAttrs = useMergedTabsterAttributes_unstable(focusableGroupAttrs, arrowNavigationAttrs);
2179
- const [state, setState] = useState6();
2180
- const [groupHasFocus, setGroupHasFocus] = useState6(false);
2181
- const handleFocusIn = useCallback6(() => setGroupHasFocus(true), []);
2182
- const handleFocusOut = useCallback6((event) => {
2494
+ const [state, setState] = useState7();
2495
+ const [groupHasFocus, setGroupHasFocus] = useState7(false);
2496
+ const handleFocusIn = useCallback7(() => setGroupHasFocus(true), []);
2497
+ const handleFocusOut = useCallback7((event) => {
2183
2498
  const related = event.relatedTarget;
2184
2499
  if (!related || !rootRef.current?.contains(related)) {
2185
2500
  setGroupHasFocus(false);
2186
2501
  }
2187
2502
  }, []);
2188
2503
  const { className, ...rest } = composableProps9(props);
2189
- return /* @__PURE__ */ React25.createElement(FocusContext.Provider, {
2504
+ return /* @__PURE__ */ React27.createElement(FocusContext.Provider, {
2190
2505
  value: {
2191
2506
  setFocus: setState,
2192
2507
  groupHasFocus
2193
2508
  }
2194
- }, /* @__PURE__ */ React25.createElement(Comp, {
2509
+ }, /* @__PURE__ */ React27.createElement(Comp, {
2195
2510
  ...rest,
2196
2511
  tabIndex: 0,
2197
2512
  className: tx("focus.group", {
@@ -2214,28 +2529,28 @@ var Item4 = slottable8(({ children, asChild, current, border = false, onCurrentC
2214
2529
  Enter: true
2215
2530
  }
2216
2531
  });
2217
- const [focused, setFocused] = useState6(false);
2218
- const handleClick = useCallback6((event) => {
2532
+ const [focused, setFocused] = useState7(false);
2533
+ const handleClick = useCallback7((event) => {
2219
2534
  onCurrentChange?.();
2220
2535
  onClick?.(event);
2221
2536
  }, [
2222
2537
  onCurrentChange,
2223
2538
  onClick
2224
2539
  ]);
2225
- const handleKeyDown = useCallback6((event) => {
2540
+ const handleKeyDown = useCallback7((event) => {
2226
2541
  if (event.key === "Enter") {
2227
2542
  onCurrentChange?.();
2228
2543
  }
2229
2544
  }, [
2230
2545
  onCurrentChange
2231
2546
  ]);
2232
- const handleFocus = useCallback6((event) => {
2547
+ const handleFocus = useCallback7((event) => {
2233
2548
  setFocused(true);
2234
2549
  onFocus?.(event);
2235
2550
  }, [
2236
2551
  onFocus
2237
2552
  ]);
2238
- const handleBlur = useCallback6((event) => {
2553
+ const handleBlur = useCallback7((event) => {
2239
2554
  setFocused(false);
2240
2555
  onBlur?.(event);
2241
2556
  }, [
@@ -2243,7 +2558,7 @@ var Item4 = slottable8(({ children, asChild, current, border = false, onCurrentC
2243
2558
  ]);
2244
2559
  const isCurrent = current ?? focused;
2245
2560
  const { className, ...rest } = composableProps9(props);
2246
- return /* @__PURE__ */ React25.createElement(Comp, {
2561
+ return /* @__PURE__ */ React27.createElement(Comp, {
2247
2562
  ...rest,
2248
2563
  tabIndex: 0,
2249
2564
  className: tx("focus.item", {
@@ -2266,12 +2581,12 @@ var Focus = {
2266
2581
  // src/components/Input/Input.tsx
2267
2582
  import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
2268
2583
  import { useControllableState as useControllableState2 } from "@radix-ui/react-use-controllable-state";
2269
- import React26, { forwardRef as forwardRef16 } from "react";
2584
+ import React28, { forwardRef as forwardRef16 } from "react";
2270
2585
  import { DescriptionAndValidation as DescriptionAndValidationPrimitive, Description as DescriptionPrimitive, INPUT_NAME, InputRoot, Label as LabelPrimitive, PinInput as PinInputPrimitive, TextArea as TextAreaPrimitive, TextInput as TextInputPrimitive, Validation as ValidationPrimitive, useInputContext } from "@dxos/react-input";
2271
- import { mx as mx8 } from "@dxos/ui-theme";
2586
+ import { mx as mx10 } from "@dxos/ui-theme";
2272
2587
  var Label3 = /* @__PURE__ */ forwardRef16(({ classNames, children, srOnly, ...props }, forwardedRef) => {
2273
2588
  const { tx } = useThemeContext();
2274
- return /* @__PURE__ */ React26.createElement(LabelPrimitive, {
2589
+ return /* @__PURE__ */ React28.createElement(LabelPrimitive, {
2275
2590
  ...props,
2276
2591
  className: tx("input.label", {
2277
2592
  srOnly
@@ -2281,7 +2596,7 @@ var Label3 = /* @__PURE__ */ forwardRef16(({ classNames, children, srOnly, ...pr
2281
2596
  });
2282
2597
  var Description3 = /* @__PURE__ */ forwardRef16(({ classNames, children, srOnly, ...props }, forwardedRef) => {
2283
2598
  const { tx } = useThemeContext();
2284
- return /* @__PURE__ */ React26.createElement(DescriptionPrimitive, {
2599
+ return /* @__PURE__ */ React28.createElement(DescriptionPrimitive, {
2285
2600
  ...props,
2286
2601
  className: tx("input.description", {
2287
2602
  srOnly
@@ -2292,7 +2607,7 @@ var Description3 = /* @__PURE__ */ forwardRef16(({ classNames, children, srOnly,
2292
2607
  var Validation = /* @__PURE__ */ forwardRef16(({ __inputScope, classNames, children, srOnly, ...props }, forwardedRef) => {
2293
2608
  const { tx } = useThemeContext();
2294
2609
  const { validationValence } = useInputContext(INPUT_NAME, __inputScope);
2295
- return /* @__PURE__ */ React26.createElement(ValidationPrimitive, {
2610
+ return /* @__PURE__ */ React28.createElement(ValidationPrimitive, {
2296
2611
  ...props,
2297
2612
  className: tx("input.validation", {
2298
2613
  srOnly,
@@ -2303,7 +2618,7 @@ var Validation = /* @__PURE__ */ forwardRef16(({ __inputScope, classNames, child
2303
2618
  });
2304
2619
  var DescriptionAndValidation = /* @__PURE__ */ forwardRef16(({ classNames, children, srOnly, ...props }, forwardedRef) => {
2305
2620
  const { tx } = useThemeContext();
2306
- return /* @__PURE__ */ React26.createElement(DescriptionAndValidationPrimitive, {
2621
+ return /* @__PURE__ */ React28.createElement(DescriptionAndValidationPrimitive, {
2307
2622
  ...props,
2308
2623
  className: tx("input.descriptionAndValidation", {
2309
2624
  srOnly
@@ -2316,7 +2631,7 @@ var PinInput = /* @__PURE__ */ forwardRef16(({ classNames, density: propsDensity
2316
2631
  const { tx } = useThemeContext();
2317
2632
  const density = useDensityContext(propsDensity);
2318
2633
  const elevation = useElevationContext(propsElevation);
2319
- return /* @__PURE__ */ React26.createElement(PinInputPrimitive, {
2634
+ return /* @__PURE__ */ React28.createElement(PinInputPrimitive, {
2320
2635
  ...props,
2321
2636
  ...props.autoFocus && !hasIosKeyboard2 && {
2322
2637
  autoFocus: true
@@ -2338,7 +2653,7 @@ var TextInput = /* @__PURE__ */ forwardRef16(({ __inputScope, classNames, densit
2338
2653
  const density = useDensityContext(densityProp);
2339
2654
  const elevation = useElevationContext(elevationProp);
2340
2655
  const { validationValence } = useInputContext(INPUT_NAME, __inputScope);
2341
- return /* @__PURE__ */ React26.createElement(TextInputPrimitive, {
2656
+ return /* @__PURE__ */ React28.createElement(TextInputPrimitive, {
2342
2657
  ...props,
2343
2658
  "data-1p-ignore": noAutoFill,
2344
2659
  className: tx("input.input", {
@@ -2360,7 +2675,7 @@ var TextArea = /* @__PURE__ */ forwardRef16(({ __inputScope, classNames, density
2360
2675
  const density = useDensityContext(propsDensity);
2361
2676
  const elevation = useElevationContext(propsElevation);
2362
2677
  const { validationValence } = useInputContext(INPUT_NAME, __inputScope);
2363
- return /* @__PURE__ */ React26.createElement(TextAreaPrimitive, {
2678
+ return /* @__PURE__ */ React28.createElement(TextAreaPrimitive, {
2364
2679
  ...props,
2365
2680
  className: tx("input.textArea", {
2366
2681
  variant,
@@ -2383,7 +2698,7 @@ var Checkbox = /* @__PURE__ */ forwardRef16(({ __inputScope, classNames, checked
2383
2698
  });
2384
2699
  const { id, validationValence, descriptionId, errorMessageId } = useInputContext(INPUT_NAME, __inputScope);
2385
2700
  const { tx } = useThemeContext();
2386
- return /* @__PURE__ */ React26.createElement(CheckboxPrimitive.Root, {
2701
+ return /* @__PURE__ */ React28.createElement(CheckboxPrimitive.Root, {
2387
2702
  ...props,
2388
2703
  checked,
2389
2704
  onCheckedChange,
@@ -2397,7 +2712,7 @@ var Checkbox = /* @__PURE__ */ forwardRef16(({ __inputScope, classNames, checked
2397
2712
  size
2398
2713
  }, "shrink-0", classNames),
2399
2714
  ref: forwardedRef
2400
- }, /* @__PURE__ */ React26.createElement(Icon, {
2715
+ }, /* @__PURE__ */ React28.createElement(Icon, {
2401
2716
  icon: checked === "indeterminate" ? "ph--minus--regular" : "ph--check--regular",
2402
2717
  classNames: tx("input.checkboxIndicator", {
2403
2718
  size,
@@ -2412,9 +2727,9 @@ var Switch = /* @__PURE__ */ forwardRef16(({ __inputScope, classNames, checked:
2412
2727
  onChange: propsOnCheckedChange
2413
2728
  });
2414
2729
  const { id, validationValence, descriptionId, errorMessageId } = useInputContext(INPUT_NAME, __inputScope);
2415
- return /* @__PURE__ */ React26.createElement("input", {
2730
+ return /* @__PURE__ */ React28.createElement("input", {
2416
2731
  type: "checkbox",
2417
- className: mx8("dx-checkbox--switch dx-focus-ring", classNames),
2732
+ className: mx10("dx-checkbox--switch dx-focus-ring", classNames),
2418
2733
  checked,
2419
2734
  onChange: (event) => {
2420
2735
  onCheckedChange(event.target.checked);
@@ -2445,12 +2760,12 @@ var Input = {
2445
2760
  // src/components/List/List.tsx
2446
2761
  import { Primitive as Primitive15 } from "@radix-ui/react-primitive";
2447
2762
  import { Slot as Slot15 } from "@radix-ui/react-slot";
2448
- import React28, { forwardRef as forwardRef17 } from "react";
2763
+ import React30, { forwardRef as forwardRef17 } from "react";
2449
2764
  import { LIST_ITEM_NAME, LIST_NAME, ListItemCollapsibleContent, List as ListPrimitive, ListItem as ListPrimitiveItem, ListItemHeading as ListPrimitiveItemHeading, ListItemOpenTrigger as ListPrimitiveItemOpenTrigger, useListContext, useListItemContext } from "@dxos/react-list";
2450
2765
  import { composable as composable4, composableProps as composableProps10 } from "@dxos/ui-theme";
2451
2766
 
2452
2767
  // src/components/List/ListDropIndicator.tsx
2453
- import React27 from "react";
2768
+ import React29 from "react";
2454
2769
  var edgeToOrientationMap = {
2455
2770
  top: "horizontal",
2456
2771
  bottom: "horizontal",
@@ -2472,8 +2787,7 @@ var terminalSize = 8;
2472
2787
  var offsetToAlignTerminalWithLine = (strokeSize - terminalSize) / 2;
2473
2788
  var ListDropIndicator = ({ edge, gap = 0, lineInset = 0, terminalInset = lineInset - terminalSize }) => {
2474
2789
  const orientation = edgeToOrientationMap[edge];
2475
- return /* @__PURE__ */ React27.createElement("div", {
2476
- role: "none",
2790
+ return /* @__PURE__ */ React29.createElement("div", {
2477
2791
  style: {
2478
2792
  "--line-thickness": `${strokeSize}px`,
2479
2793
  "--line-offset": `calc(-0.5 * (${gap}px + ${strokeSize}px))`,
@@ -2492,9 +2806,9 @@ var List = composable4(({ children, ...props }, forwardedRef) => {
2492
2806
  const { tx } = useThemeContext();
2493
2807
  const density = useDensityContext(props.density);
2494
2808
  const { className, ...rest } = composableProps10(props);
2495
- return /* @__PURE__ */ React28.createElement(DensityProvider, {
2809
+ return /* @__PURE__ */ React30.createElement(DensityProvider, {
2496
2810
  density
2497
- }, /* @__PURE__ */ React28.createElement(ListPrimitive, {
2811
+ }, /* @__PURE__ */ React30.createElement(ListPrimitive, {
2498
2812
  ...rest,
2499
2813
  className: tx("list.root", {}, className),
2500
2814
  ref: forwardedRef
@@ -2504,7 +2818,7 @@ var ListItemEndcap = /* @__PURE__ */ forwardRef17(({ children, classNames, asChi
2504
2818
  const Comp = asChild ? Slot15 : Primitive15.div;
2505
2819
  const density = useDensityContext();
2506
2820
  const { tx } = useThemeContext();
2507
- return /* @__PURE__ */ React28.createElement(Comp, {
2821
+ return /* @__PURE__ */ React30.createElement(Comp, {
2508
2822
  ...!asChild && {
2509
2823
  role: "none"
2510
2824
  },
@@ -2518,8 +2832,7 @@ var ListItemEndcap = /* @__PURE__ */ forwardRef17(({ children, classNames, asChi
2518
2832
  var MockListItemOpenTrigger = ({ classNames, ...props }) => {
2519
2833
  const density = useDensityContext();
2520
2834
  const { tx } = useThemeContext();
2521
- return /* @__PURE__ */ React28.createElement("div", {
2522
- role: "none",
2835
+ return /* @__PURE__ */ React30.createElement("div", {
2523
2836
  ...props,
2524
2837
  className: tx("list.item.openTrigger", {
2525
2838
  density
@@ -2529,25 +2842,25 @@ var MockListItemOpenTrigger = ({ classNames, ...props }) => {
2529
2842
  var ListItemHeading = /* @__PURE__ */ forwardRef17(({ children, classNames, ...props }, forwardedRef) => {
2530
2843
  const { tx } = useThemeContext();
2531
2844
  const density = useDensityContext();
2532
- return /* @__PURE__ */ React28.createElement(ListPrimitiveItemHeading, {
2845
+ return /* @__PURE__ */ React30.createElement(ListPrimitiveItemHeading, {
2533
2846
  ...props,
2534
2847
  className: tx("list.item.heading", {
2535
2848
  density
2536
2849
  }, classNames),
2537
2850
  ref: forwardedRef
2538
- }, /* @__PURE__ */ React28.createElement("span", null, children));
2851
+ }, /* @__PURE__ */ React30.createElement("span", null, children));
2539
2852
  });
2540
2853
  var ListItemOpenTrigger = /* @__PURE__ */ forwardRef17(({ __listItemScope, classNames, children, ...props }, forwardedRef) => {
2541
2854
  const { tx } = useThemeContext();
2542
2855
  const density = useDensityContext();
2543
2856
  const { open } = useListItemContext(LIST_ITEM_NAME, __listItemScope);
2544
- return /* @__PURE__ */ React28.createElement(ListPrimitiveItemOpenTrigger, {
2857
+ return /* @__PURE__ */ React30.createElement(ListPrimitiveItemOpenTrigger, {
2545
2858
  ...props,
2546
2859
  className: tx("list.item.openTrigger", {
2547
2860
  density
2548
2861
  }, classNames),
2549
2862
  ref: forwardedRef
2550
- }, children || /* @__PURE__ */ React28.createElement(Icon, {
2863
+ }, children || /* @__PURE__ */ React30.createElement(Icon, {
2551
2864
  size: 3,
2552
2865
  icon: open ? "ph--caret-down--bold" : "ph--caret-right--bold",
2553
2866
  classNames: tx("list.item.openTriggerIcon", {})
@@ -2556,7 +2869,7 @@ var ListItemOpenTrigger = /* @__PURE__ */ forwardRef17(({ __listItemScope, class
2556
2869
  var ListItemRoot = /* @__PURE__ */ forwardRef17(({ classNames, children, ...props }, forwardedRef) => {
2557
2870
  const { tx } = useThemeContext();
2558
2871
  const density = useDensityContext();
2559
- return /* @__PURE__ */ React28.createElement(ListPrimitiveItem, {
2872
+ return /* @__PURE__ */ React30.createElement(ListPrimitiveItem, {
2560
2873
  ...props,
2561
2874
  className: tx("list.item.root", {
2562
2875
  density,
@@ -2576,10 +2889,10 @@ var ListItem = {
2576
2889
  };
2577
2890
 
2578
2891
  // src/components/List/Tree.tsx
2579
- import React30, { forwardRef as forwardRef18 } from "react";
2892
+ import React32, { forwardRef as forwardRef18 } from "react";
2580
2893
 
2581
2894
  // src/components/List/TreeDropIndicator.tsx
2582
- import React29 from "react";
2895
+ import React31 from "react";
2583
2896
  var edgeToOrientationMap2 = {
2584
2897
  "reorder-above": "sibling",
2585
2898
  "reorder-below": "sibling",
@@ -2609,7 +2922,7 @@ var TreeDropIndicator = ({ instruction, gap = 0 }) => {
2609
2922
  if (isBlocked) {
2610
2923
  return null;
2611
2924
  }
2612
- return /* @__PURE__ */ React29.createElement("div", {
2925
+ return /* @__PURE__ */ React31.createElement("div", {
2613
2926
  style: {
2614
2927
  "--line-thickness": `${strokeSize2}px`,
2615
2928
  "--line-offset": `${lineOffset}`,
@@ -2625,21 +2938,21 @@ var TreeDropIndicator = ({ instruction, gap = 0 }) => {
2625
2938
 
2626
2939
  // src/components/List/Tree.tsx
2627
2940
  var TreeRoot = /* @__PURE__ */ forwardRef18((props, forwardedRef) => {
2628
- return /* @__PURE__ */ React30.createElement(List, {
2941
+ return /* @__PURE__ */ React32.createElement(List, {
2629
2942
  ...props,
2630
2943
  ref: forwardedRef
2631
2944
  });
2632
2945
  });
2633
2946
  var TreeBranch = /* @__PURE__ */ forwardRef18(({ __listScope, ...props }, forwardedRef) => {
2634
2947
  const { headingId } = useListItemContext(LIST_ITEM_NAME, __listScope);
2635
- return /* @__PURE__ */ React30.createElement(List, {
2948
+ return /* @__PURE__ */ React32.createElement(List, {
2636
2949
  ...props,
2637
2950
  "aria-labelledby": headingId,
2638
2951
  ref: forwardedRef
2639
2952
  });
2640
2953
  });
2641
2954
  var TreeItemRoot = /* @__PURE__ */ forwardRef18((props, forwardedRef) => {
2642
- return /* @__PURE__ */ React30.createElement(ListItem.Root, {
2955
+ return /* @__PURE__ */ React32.createElement(ListItem.Root, {
2643
2956
  role: "treeitem",
2644
2957
  ...props,
2645
2958
  ref: forwardedRef
@@ -2668,7 +2981,7 @@ import { createContextScope as createContextScope2 } from "@radix-ui/react-conte
2668
2981
  import { Primitive as Primitive16 } from "@radix-ui/react-primitive";
2669
2982
  import { Slot as Slot16 } from "@radix-ui/react-slot";
2670
2983
  import { useControllableState as useControllableState3 } from "@radix-ui/react-use-controllable-state";
2671
- import React31, { forwardRef as forwardRef19, useCallback as useCallback7 } from "react";
2984
+ import React33, { forwardRef as forwardRef19, useCallback as useCallback8 } from "react";
2672
2985
  import { composable as composable5, composableProps as composableProps11 } from "@dxos/ui-theme";
2673
2986
  var TREEGRID_ROW_NAME = "TreegridRow";
2674
2987
  var [createTreegridRowContext, createTreegridRowScope] = createContextScope2(TREEGRID_ROW_NAME, []);
@@ -2682,7 +2995,7 @@ var TreegridRoot = composable5(({ asChild, classNames, children, style, gridTemp
2682
2995
  });
2683
2996
  const Comp = asChild ? Slot16 : Primitive16.div;
2684
2997
  const { findFirstFocusable } = useFocusFinders();
2685
- const handleKeyDown = useCallback7((event) => {
2998
+ const handleKeyDown = useCallback8((event) => {
2686
2999
  switch (event.key) {
2687
3000
  case "ArrowDown":
2688
3001
  case "ArrowUp": {
@@ -2716,7 +3029,7 @@ var TreegridRoot = composable5(({ asChild, classNames, children, style, gridTemp
2716
3029
  findFirstFocusable,
2717
3030
  onKeyDownProp
2718
3031
  ]);
2719
- return /* @__PURE__ */ React31.createElement(Comp, {
3032
+ return /* @__PURE__ */ React33.createElement(Comp, {
2720
3033
  role: "treegrid",
2721
3034
  ...rest,
2722
3035
  className: tx("treegrid.root", {}, className),
@@ -2738,11 +3051,11 @@ var TreegridRow = /* @__PURE__ */ forwardRef19(({ __treegridRowScope, asChild, c
2738
3051
  onChange: propsOnOpenChange,
2739
3052
  defaultProp: defaultOpen
2740
3053
  });
2741
- return /* @__PURE__ */ React31.createElement(TreegridRowProvider, {
3054
+ return /* @__PURE__ */ React33.createElement(TreegridRowProvider, {
2742
3055
  open,
2743
3056
  onOpenChange,
2744
3057
  scope: __treegridRowScope
2745
- }, /* @__PURE__ */ React31.createElement(Comp, {
3058
+ }, /* @__PURE__ */ React33.createElement(Comp, {
2746
3059
  role: "row",
2747
3060
  "aria-level": level,
2748
3061
  className: tx("treegrid.row", {
@@ -2759,7 +3072,7 @@ var TreegridRow = /* @__PURE__ */ forwardRef19(({ __treegridRowScope, asChild, c
2759
3072
  });
2760
3073
  var TreegridCell = /* @__PURE__ */ forwardRef19(({ classNames, children, indent, ...props }, forwardedRef) => {
2761
3074
  const { tx } = useThemeContext();
2762
- return /* @__PURE__ */ React31.createElement("div", {
3075
+ return /* @__PURE__ */ React33.createElement("div", {
2763
3076
  role: "gridcell",
2764
3077
  className: tx("treegrid.cell", {
2765
3078
  indent
@@ -2776,19 +3089,19 @@ var Treegrid = {
2776
3089
 
2777
3090
  // src/components/Main/Main.tsx
2778
3091
  import { useFocusableGroup as useFocusableGroup2 } from "@fluentui/react-tabster";
2779
- import { createContext as createContext8 } from "@radix-ui/react-context";
3092
+ import { createContext as createContext9 } from "@radix-ui/react-context";
2780
3093
  import { DialogContent as DialogContent2, Root as DialogRoot2, DialogTitle as DialogTitle2 } from "@radix-ui/react-dialog";
2781
3094
  import { Primitive as Primitive17 } from "@radix-ui/react-primitive";
2782
3095
  import { Slot as Slot17 } from "@radix-ui/react-slot";
2783
3096
  import { useControllableState as useControllableState4 } from "@radix-ui/react-use-controllable-state";
2784
- import React32, { forwardRef as forwardRef20, useCallback as useCallback9, useEffect as useEffect5, useRef as useRef4, useState as useState8 } from "react";
3097
+ import React34, { forwardRef as forwardRef20, useCallback as useCallback10, useEffect as useEffect6, useRef as useRef4, useState as useState9 } from "react";
2785
3098
  import { addEventListener } from "@dxos/async";
2786
3099
  import { log } from "@dxos/log";
2787
3100
  import { useForwardedRef, useMediaQuery } from "@dxos/react-hooks";
2788
3101
  import { osTranslations as osTranslations3 } from "@dxos/ui-theme";
2789
3102
 
2790
3103
  // src/components/Main/useSwipeToDismiss.ts
2791
- import { useCallback as useCallback8, useEffect as useEffect4, useState as useState7 } from "react";
3104
+ import { useCallback as useCallback9, useEffect as useEffect5, useState as useState8 } from "react";
2792
3105
  var useSwipeToDismiss = (ref, {
2793
3106
  onDismiss,
2794
3107
  dismissThreshold = 64,
@@ -2797,22 +3110,22 @@ var useSwipeToDismiss = (ref, {
2797
3110
  /* side = 'inline-start' */
2798
3111
  }) => {
2799
3112
  const $root = ref.current;
2800
- const [motionState, setMotionState] = useState7(0);
2801
- const [gestureStartX, setGestureStartX] = useState7(0);
2802
- const setIdle = useCallback8(() => {
3113
+ const [motionState, setMotionState] = useState8(0);
3114
+ const [gestureStartX, setGestureStartX] = useState8(0);
3115
+ const setIdle = useCallback9(() => {
2803
3116
  setMotionState(0);
2804
3117
  $root?.style.removeProperty("inset-inline-start");
2805
3118
  $root?.style.setProperty("transition-duration", "200ms");
2806
3119
  }, [
2807
3120
  $root
2808
3121
  ]);
2809
- const setFollowing = useCallback8(() => {
3122
+ const setFollowing = useCallback9(() => {
2810
3123
  setMotionState(2);
2811
3124
  $root?.style.setProperty("transition-duration", "0ms");
2812
3125
  }, [
2813
3126
  $root
2814
3127
  ]);
2815
- const handlePointerDown = useCallback8(({ screenX }) => {
3128
+ const handlePointerDown = useCallback9(({ screenX }) => {
2816
3129
  if (motionState === 0) {
2817
3130
  setMotionState(1);
2818
3131
  setGestureStartX(screenX);
@@ -2820,7 +3133,7 @@ var useSwipeToDismiss = (ref, {
2820
3133
  }, [
2821
3134
  motionState
2822
3135
  ]);
2823
- const handlePointerMove = useCallback8(({ screenX }) => {
3136
+ const handlePointerMove = useCallback9(({ screenX }) => {
2824
3137
  if ($root) {
2825
3138
  const delta = Math.min(screenX - gestureStartX, 0);
2826
3139
  switch (motionState) {
@@ -2844,12 +3157,12 @@ var useSwipeToDismiss = (ref, {
2844
3157
  motionState,
2845
3158
  gestureStartX
2846
3159
  ]);
2847
- const handlePointerUp = useCallback8(() => {
3160
+ const handlePointerUp = useCallback9(() => {
2848
3161
  setIdle();
2849
3162
  }, [
2850
3163
  setIdle
2851
3164
  ]);
2852
- useEffect4(() => {
3165
+ useEffect5(() => {
2853
3166
  $root?.addEventListener("pointerdown", handlePointerDown);
2854
3167
  return () => {
2855
3168
  $root?.removeEventListener("pointerdown", handlePointerDown);
@@ -2858,7 +3171,7 @@ var useSwipeToDismiss = (ref, {
2858
3171
  $root,
2859
3172
  handlePointerDown
2860
3173
  ]);
2861
- useEffect4(() => {
3174
+ useEffect5(() => {
2862
3175
  $root && document.documentElement.addEventListener("pointermove", handlePointerMove);
2863
3176
  return () => {
2864
3177
  document.documentElement.removeEventListener("pointermove", handlePointerMove);
@@ -2867,7 +3180,7 @@ var useSwipeToDismiss = (ref, {
2867
3180
  $root,
2868
3181
  handlePointerMove
2869
3182
  ]);
2870
- useEffect4(() => {
3183
+ useEffect5(() => {
2871
3184
  $root && document.documentElement.addEventListener("pointerup", handlePointerUp);
2872
3185
  return () => {
2873
3186
  document.documentElement.removeEventListener("pointerup", handlePointerUp);
@@ -2890,7 +3203,7 @@ var handleOpenAutoFocus = (event) => {
2890
3203
  };
2891
3204
  var landmarkAttr = "data-main-landmark";
2892
3205
  var useLandmarkMover = (propsOnKeyDown, landmark) => {
2893
- const handleKeyDown = useCallback9((event) => {
3206
+ const handleKeyDown = useCallback10((event) => {
2894
3207
  const target = event.target;
2895
3208
  if (event.target === event.currentTarget && event.key === "Tab" && target.hasAttribute(landmarkAttr)) {
2896
3209
  event.preventDefault();
@@ -2917,7 +3230,7 @@ var useLandmarkMover = (propsOnKeyDown, landmark) => {
2917
3230
  ...focusableGroupAttrs
2918
3231
  };
2919
3232
  };
2920
- var [MainProvider, useMainContext] = createContext8(MAIN_NAME, {
3233
+ var [MainProvider, useMainContext] = createContext9(MAIN_NAME, {
2921
3234
  resizing: false,
2922
3235
  navigationSidebarState: "closed",
2923
3236
  setNavigationSidebarState: (_nextState) => {
@@ -2933,22 +3246,22 @@ var useSidebars = (consumerName) => {
2933
3246
  return {
2934
3247
  navigationSidebarState,
2935
3248
  setNavigationSidebarState,
2936
- toggleNavigationSidebar: useCallback9(() => setNavigationSidebarState(navigationSidebarState === "expanded" ? "closed" : "expanded"), [
3249
+ toggleNavigationSidebar: useCallback10(() => setNavigationSidebarState(navigationSidebarState === "expanded" ? "closed" : "expanded"), [
2937
3250
  navigationSidebarState,
2938
3251
  setNavigationSidebarState
2939
3252
  ]),
2940
- openNavigationSidebar: useCallback9(() => setNavigationSidebarState("expanded"), []),
2941
- collapseNavigationSidebar: useCallback9(() => setNavigationSidebarState("collapsed"), []),
2942
- closeNavigationSidebar: useCallback9(() => setNavigationSidebarState("closed"), []),
3253
+ openNavigationSidebar: useCallback10(() => setNavigationSidebarState("expanded"), []),
3254
+ collapseNavigationSidebar: useCallback10(() => setNavigationSidebarState("collapsed"), []),
3255
+ closeNavigationSidebar: useCallback10(() => setNavigationSidebarState("closed"), []),
2943
3256
  complementarySidebarState,
2944
3257
  setComplementarySidebarState,
2945
- toggleComplementarySidebar: useCallback9(() => setComplementarySidebarState(complementarySidebarState === "expanded" ? "closed" : "expanded"), [
3258
+ toggleComplementarySidebar: useCallback10(() => setComplementarySidebarState(complementarySidebarState === "expanded" ? "closed" : "expanded"), [
2946
3259
  complementarySidebarState,
2947
3260
  setComplementarySidebarState
2948
3261
  ]),
2949
- openComplementarySidebar: useCallback9(() => setComplementarySidebarState("expanded"), []),
2950
- collapseComplementarySidebar: useCallback9(() => setComplementarySidebarState("collapsed"), []),
2951
- closeComplementarySidebar: useCallback9(() => setComplementarySidebarState("closed"), [])
3262
+ openComplementarySidebar: useCallback10(() => setComplementarySidebarState("expanded"), []),
3263
+ collapseComplementarySidebar: useCallback10(() => setComplementarySidebarState("collapsed"), []),
3264
+ closeComplementarySidebar: useCallback10(() => setComplementarySidebarState("closed"), [])
2952
3265
  };
2953
3266
  };
2954
3267
  var MainRoot = ({ navigationSidebarState: propsNavigationSidebarState, defaultNavigationSidebarState = "closed", onNavigationSidebarStateChange, complementarySidebarState: propsComplementarySidebarState, defaultComplementarySidebarState = "closed", onComplementarySidebarStateChange, children, ...props }) => {
@@ -2963,9 +3276,9 @@ var MainRoot = ({ navigationSidebarState: propsNavigationSidebarState, defaultNa
2963
3276
  defaultProp: defaultComplementarySidebarState,
2964
3277
  onChange: onComplementarySidebarStateChange
2965
3278
  });
2966
- const [resizing, setResizing] = useState8(false);
3279
+ const [resizing, setResizing] = useState9(false);
2967
3280
  const resizeInterval = useRef4(null);
2968
- useEffect5(() => addEventListener(window, "resize", () => {
3281
+ useEffect6(() => addEventListener(window, "resize", () => {
2969
3282
  setResizing(true);
2970
3283
  if (resizeInterval.current) {
2971
3284
  clearTimeout(resizeInterval.current);
@@ -2975,7 +3288,7 @@ var MainRoot = ({ navigationSidebarState: propsNavigationSidebarState, defaultNa
2975
3288
  resizeInterval.current = null;
2976
3289
  }, 3e3);
2977
3290
  }), []);
2978
- return /* @__PURE__ */ React32.createElement(MainProvider, {
3291
+ return /* @__PURE__ */ React34.createElement(MainProvider, {
2979
3292
  ...props,
2980
3293
  navigationSidebarState,
2981
3294
  setNavigationSidebarState,
@@ -2989,7 +3302,7 @@ var MainOverlay = /* @__PURE__ */ forwardRef20(({ classNames, ...props }, forwar
2989
3302
  const [isLg] = useMediaQuery("lg");
2990
3303
  const { navigationSidebarState, setNavigationSidebarState, complementarySidebarState, setComplementarySidebarState } = useMainContext(MAIN_OVERLAY_NAME);
2991
3304
  const { tx } = useThemeContext();
2992
- return /* @__PURE__ */ React32.createElement("div", {
3305
+ return /* @__PURE__ */ React34.createElement("div", {
2993
3306
  ...props,
2994
3307
  onClick: () => {
2995
3308
  setNavigationSidebarState("collapsed");
@@ -3015,7 +3328,7 @@ var MainSidebar = /* @__PURE__ */ forwardRef20(({ classNames, children, swipeToD
3015
3328
  useSwipeToDismiss(swipeToDismiss ? ref : noopRef, {
3016
3329
  onDismiss: () => onStateChange?.("closed")
3017
3330
  });
3018
- const handleKeyDown = useCallback9((event) => {
3331
+ const handleKeyDown = useCallback10((event) => {
3019
3332
  const focusGroupParent = event.target.closest("[data-tabster]");
3020
3333
  if (event.key === "Escape" && focusGroupParent) {
3021
3334
  event.preventDefault();
@@ -3027,13 +3340,13 @@ var MainSidebar = /* @__PURE__ */ forwardRef20(({ classNames, children, swipeToD
3027
3340
  props.onKeyDown
3028
3341
  ]);
3029
3342
  const Root14 = isLg ? Primitive17.div : DialogContent2;
3030
- return /* @__PURE__ */ React32.createElement(DialogRoot2, {
3343
+ return /* @__PURE__ */ React34.createElement(DialogRoot2, {
3031
3344
  open: state !== "closed",
3032
3345
  "aria-label": toLocalizedString(label, t),
3033
3346
  modal: false
3034
- }, !isLg && /* @__PURE__ */ React32.createElement(DialogTitle2, {
3347
+ }, !isLg && /* @__PURE__ */ React34.createElement(DialogTitle2, {
3035
3348
  className: "sr-only"
3036
- }, toLocalizedString(label, t)), /* @__PURE__ */ React32.createElement(Root14, {
3349
+ }, toLocalizedString(label, t)), /* @__PURE__ */ React34.createElement(Root14, {
3037
3350
  ...!isLg && {
3038
3351
  forceMount: true,
3039
3352
  tabIndex: -1,
@@ -3054,7 +3367,7 @@ var MainSidebar = /* @__PURE__ */ forwardRef20(({ classNames, children, swipeToD
3054
3367
  var MainNavigationSidebar = /* @__PURE__ */ forwardRef20((props, forwardedRef) => {
3055
3368
  const { navigationSidebarState, setNavigationSidebarState, resizing } = useMainContext(NAVIGATION_SIDEBAR_NAME);
3056
3369
  const mover = useLandmarkMover(props.onKeyDown, "0");
3057
- return /* @__PURE__ */ React32.createElement(MainSidebar, {
3370
+ return /* @__PURE__ */ React34.createElement(MainSidebar, {
3058
3371
  ...mover,
3059
3372
  ...props,
3060
3373
  state: navigationSidebarState,
@@ -3068,7 +3381,7 @@ MainNavigationSidebar.displayName = NAVIGATION_SIDEBAR_NAME;
3068
3381
  var MainComplementarySidebar = /* @__PURE__ */ forwardRef20((props, forwardedRef) => {
3069
3382
  const { complementarySidebarState, setComplementarySidebarState, resizing } = useMainContext(COMPLEMENTARY_SIDEBAR_NAME);
3070
3383
  const mover = useLandmarkMover(props.onKeyDown, "2");
3071
- return /* @__PURE__ */ React32.createElement(MainSidebar, {
3384
+ return /* @__PURE__ */ React34.createElement(MainSidebar, {
3072
3385
  ...mover,
3073
3386
  ...props,
3074
3387
  state: complementarySidebarState,
@@ -3084,7 +3397,7 @@ var MainContent = /* @__PURE__ */ forwardRef20(({ asChild, classNames, bounce, h
3084
3397
  const { tx } = useThemeContext();
3085
3398
  const Comp = asChild ? Slot17 : role ? Primitive17.div : "main";
3086
3399
  const mover = useLandmarkMover(props.onKeyDown, "1");
3087
- return /* @__PURE__ */ React32.createElement(Comp, {
3400
+ return /* @__PURE__ */ React34.createElement(Comp, {
3088
3401
  ...handlesFocus && {
3089
3402
  ...mover
3090
3403
  },
@@ -3110,13 +3423,13 @@ var Main = {
3110
3423
  };
3111
3424
 
3112
3425
  // src/components/Message/Message.tsx
3113
- import { createContext as createContext9 } from "@radix-ui/react-context";
3426
+ import { createContext as createContext10 } from "@radix-ui/react-context";
3114
3427
  import { Primitive as Primitive18 } from "@radix-ui/react-primitive";
3115
3428
  import { Slot as Slot18 } from "@radix-ui/react-slot";
3116
- import React33, { forwardRef as forwardRef21 } from "react";
3429
+ import React35, { forwardRef as forwardRef21 } from "react";
3117
3430
  import { useTranslation as useTranslation4 } from "react-i18next";
3118
3431
  import { useId as useId3 } from "@dxos/react-hooks";
3119
- import { translationKey as translationKey2 } from "#translations";
3432
+ import { translationKey as translationKey3 } from "#translations";
3120
3433
  var messageIcons = {
3121
3434
  success: "ph--check-circle--duotone",
3122
3435
  info: "ph--info--duotone",
@@ -3125,18 +3438,18 @@ var messageIcons = {
3125
3438
  neutral: "ph--info--duotone"
3126
3439
  };
3127
3440
  var MESSAGE_NAME = "Message";
3128
- var [MessageProvider, useMessageContext] = createContext9(MESSAGE_NAME);
3441
+ var [MessageProvider, useMessageContext] = createContext10(MESSAGE_NAME);
3129
3442
  var MessageRoot = /* @__PURE__ */ forwardRef21(({ asChild, valence = "neutral", elevation: propsElevation, classNames, titleId: propsTitleId, descriptionId: propsDescriptionId, children, ...props }, forwardedRef) => {
3130
3443
  const { tx } = useThemeContext();
3131
3444
  const titleId = useId3("message__title", propsTitleId);
3132
3445
  const descriptionId = useId3("message__description", propsDescriptionId);
3133
3446
  const elevation = useElevationContext(propsElevation);
3134
3447
  const Comp = asChild ? Slot18 : Primitive18.div;
3135
- return /* @__PURE__ */ React33.createElement(MessageProvider, {
3448
+ return /* @__PURE__ */ React35.createElement(MessageProvider, {
3136
3449
  titleId,
3137
3450
  descriptionId,
3138
3451
  valence
3139
- }, /* @__PURE__ */ React33.createElement(Comp, {
3452
+ }, /* @__PURE__ */ React35.createElement(Comp, {
3140
3453
  role: valence === "neutral" ? "paragraph" : "alert",
3141
3454
  ...props,
3142
3455
  className: tx("message.root", {
@@ -3151,25 +3464,23 @@ var MessageRoot = /* @__PURE__ */ forwardRef21(({ asChild, valence = "neutral",
3151
3464
  MessageRoot.displayName = MESSAGE_NAME;
3152
3465
  var MESSAGE_TITLE_NAME = "MessageTitle";
3153
3466
  var MessageTitle = /* @__PURE__ */ forwardRef21(({ classNames, children, icon: iconProp, onClose }, forwardedRef) => {
3154
- const { t } = useTranslation4(translationKey2);
3467
+ const { t } = useTranslation4(translationKey3);
3155
3468
  const { tx } = useThemeContext();
3156
3469
  const { titleId, valence } = useMessageContext(MESSAGE_TITLE_NAME);
3157
3470
  const icon = iconProp ?? messageIcons[valence];
3158
- return /* @__PURE__ */ React33.createElement("div", {
3159
- role: "none",
3471
+ return /* @__PURE__ */ React35.createElement("div", {
3160
3472
  className: tx("message.header", {}, classNames),
3161
3473
  id: titleId,
3162
3474
  ref: forwardedRef
3163
- }, icon && /* @__PURE__ */ React33.createElement("div", {
3164
- role: "none",
3475
+ }, icon && /* @__PURE__ */ React35.createElement("div", {
3165
3476
  className: tx("message.icon", {
3166
3477
  valence
3167
3478
  })
3168
- }, /* @__PURE__ */ React33.createElement(Icon, {
3479
+ }, /* @__PURE__ */ React35.createElement(Icon, {
3169
3480
  icon
3170
- })), /* @__PURE__ */ React33.createElement("h2", {
3481
+ })), /* @__PURE__ */ React35.createElement("h2", {
3171
3482
  className: tx("message.title", {}, classNames)
3172
- }, children), onClose && /* @__PURE__ */ React33.createElement(IconButton, {
3483
+ }, children), onClose && /* @__PURE__ */ React35.createElement(IconButton, {
3173
3484
  variant: "ghost",
3174
3485
  icon: "ph--x--regular",
3175
3486
  iconOnly: true,
@@ -3183,7 +3494,7 @@ var MessageContent = /* @__PURE__ */ forwardRef21(({ asChild, classNames, childr
3183
3494
  const { tx } = useThemeContext();
3184
3495
  const { descriptionId } = useMessageContext(MESSAGE_CONTENT_NAME);
3185
3496
  const Comp = asChild ? Slot18 : Primitive18.p;
3186
- return /* @__PURE__ */ React33.createElement(Comp, {
3497
+ return /* @__PURE__ */ React35.createElement(Comp, {
3187
3498
  ...props,
3188
3499
  className: tx("message.content", {}, classNames),
3189
3500
  id: descriptionId,
@@ -3214,7 +3525,7 @@ import { Primitive as Primitive19 } from "@radix-ui/react-primitive";
3214
3525
  import { Slot as Slot19 } from "@radix-ui/react-slot";
3215
3526
  import { useControllableState as useControllableState5 } from "@radix-ui/react-use-controllable-state";
3216
3527
  import { hideOthers } from "aria-hidden";
3217
- import React34, { forwardRef as forwardRef22, useCallback as useCallback10, useEffect as useEffect6, useMemo as useMemo5, useRef as useRef5, useState as useState9 } from "react";
3528
+ import React36, { forwardRef as forwardRef22, useCallback as useCallback11, useEffect as useEffect7, useMemo as useMemo7, useRef as useRef5, useState as useState10 } from "react";
3218
3529
  import { RemoveScroll } from "react-remove-scroll";
3219
3530
  var POPOVER_NAME = "Popover";
3220
3531
  var [createPopoverContext, createPopoverScope] = createContextScope3(POPOVER_NAME, [
@@ -3226,24 +3537,24 @@ var PopoverRoot = (props) => {
3226
3537
  const { __scopePopover, children, open: openProp, defaultOpen, onOpenChange, modal = false } = props;
3227
3538
  const popperScope = usePopperScope(__scopePopover);
3228
3539
  const triggerRef = useRef5(null);
3229
- const [hasCustomAnchor, setHasCustomAnchor] = useState9(false);
3540
+ const [hasCustomAnchor, setHasCustomAnchor] = useState10(false);
3230
3541
  const [open = false, setOpen] = useControllableState5({
3231
3542
  prop: openProp,
3232
3543
  defaultProp: defaultOpen,
3233
3544
  onChange: onOpenChange
3234
3545
  });
3235
- return /* @__PURE__ */ React34.createElement(PopperPrimitive.Root, popperScope, /* @__PURE__ */ React34.createElement(PopoverProvider, {
3546
+ return /* @__PURE__ */ React36.createElement(PopperPrimitive.Root, popperScope, /* @__PURE__ */ React36.createElement(PopoverProvider, {
3236
3547
  scope: __scopePopover,
3237
3548
  contentId: useId4(),
3238
3549
  triggerRef,
3239
3550
  open,
3240
3551
  onOpenChange: setOpen,
3241
- onOpenToggle: useCallback10(() => setOpen((prevOpen) => !prevOpen), [
3552
+ onOpenToggle: useCallback11(() => setOpen((prevOpen) => !prevOpen), [
3242
3553
  setOpen
3243
3554
  ]),
3244
3555
  hasCustomAnchor,
3245
- onCustomAnchorAdd: useCallback10(() => setHasCustomAnchor(true), []),
3246
- onCustomAnchorRemove: useCallback10(() => setHasCustomAnchor(false), []),
3556
+ onCustomAnchorAdd: useCallback11(() => setHasCustomAnchor(true), []),
3557
+ onCustomAnchorRemove: useCallback11(() => setHasCustomAnchor(false), []),
3247
3558
  modal
3248
3559
  }, children));
3249
3560
  };
@@ -3254,14 +3565,14 @@ var PopoverAnchor = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
3254
3565
  const context = usePopoverContext(ANCHOR_NAME, __scopePopover);
3255
3566
  const popperScope = usePopperScope(__scopePopover);
3256
3567
  const { onCustomAnchorAdd, onCustomAnchorRemove } = context;
3257
- useEffect6(() => {
3568
+ useEffect7(() => {
3258
3569
  onCustomAnchorAdd();
3259
3570
  return () => onCustomAnchorRemove();
3260
3571
  }, [
3261
3572
  onCustomAnchorAdd,
3262
3573
  onCustomAnchorRemove
3263
3574
  ]);
3264
- return /* @__PURE__ */ React34.createElement(PopperPrimitive.Anchor, {
3575
+ return /* @__PURE__ */ React36.createElement(PopperPrimitive.Anchor, {
3265
3576
  ...popperScope,
3266
3577
  ...anchorProps,
3267
3578
  ref: forwardedRef
@@ -3275,7 +3586,7 @@ var PopoverTrigger = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
3275
3586
  const popperScope = usePopperScope(__scopePopover);
3276
3587
  const composedTriggerRef = useComposedRefs2(forwardedRef, context.triggerRef);
3277
3588
  const Comp = asChild ? Slot19 : Primitive19.button;
3278
- const trigger = /* @__PURE__ */ React34.createElement(Comp, {
3589
+ const trigger = /* @__PURE__ */ React36.createElement(Comp, {
3279
3590
  type: "button",
3280
3591
  "aria-haspopup": "dialog",
3281
3592
  "aria-expanded": context.open,
@@ -3285,7 +3596,7 @@ var PopoverTrigger = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
3285
3596
  ref: composedTriggerRef,
3286
3597
  onClick: composeEventHandlers2(props.onClick, context.onOpenToggle)
3287
3598
  });
3288
- return context.hasCustomAnchor ? trigger : /* @__PURE__ */ React34.createElement(PopperPrimitive.Anchor, {
3599
+ return context.hasCustomAnchor ? trigger : /* @__PURE__ */ React36.createElement(PopperPrimitive.Anchor, {
3289
3600
  asChild: true,
3290
3601
  ...popperScope
3291
3602
  }, trigger);
@@ -3296,12 +3607,12 @@ var PopoverVirtualTrigger = (props) => {
3296
3607
  const { __scopePopover, virtualRef } = props;
3297
3608
  const context = usePopoverContext(VIRTUAL_TRIGGER_NAME2, __scopePopover);
3298
3609
  const popperScope = usePopperScope(__scopePopover);
3299
- useEffect6(() => {
3610
+ useEffect7(() => {
3300
3611
  if (virtualRef.current) {
3301
3612
  context.triggerRef.current = virtualRef.current;
3302
3613
  }
3303
3614
  });
3304
- return /* @__PURE__ */ React34.createElement(PopperPrimitive.Anchor, {
3615
+ return /* @__PURE__ */ React36.createElement(PopperPrimitive.Anchor, {
3305
3616
  ...popperScope,
3306
3617
  virtualRef
3307
3618
  });
@@ -3314,12 +3625,12 @@ var [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME2, {
3314
3625
  var PopoverPortal = (props) => {
3315
3626
  const { __scopePopover, forceMount, children, container } = props;
3316
3627
  const context = usePopoverContext(PORTAL_NAME2, __scopePopover);
3317
- return /* @__PURE__ */ React34.createElement(PortalProvider, {
3628
+ return /* @__PURE__ */ React36.createElement(PortalProvider, {
3318
3629
  scope: __scopePopover,
3319
3630
  forceMount
3320
- }, /* @__PURE__ */ React34.createElement(Presence, {
3631
+ }, /* @__PURE__ */ React36.createElement(Presence, {
3321
3632
  present: forceMount || context.open
3322
- }, /* @__PURE__ */ React34.createElement(PortalPrimitive, {
3633
+ }, /* @__PURE__ */ React36.createElement(PortalPrimitive, {
3323
3634
  asChild: true,
3324
3635
  container
3325
3636
  }, children)));
@@ -3330,12 +3641,12 @@ var PopoverContent = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
3330
3641
  const portalContext = usePortalContext(CONTENT_NAME2, props.__scopePopover);
3331
3642
  const { forceMount = portalContext.forceMount, ...contentProps } = props;
3332
3643
  const context = usePopoverContext(CONTENT_NAME2, props.__scopePopover);
3333
- return /* @__PURE__ */ React34.createElement(Presence, {
3644
+ return /* @__PURE__ */ React36.createElement(Presence, {
3334
3645
  present: forceMount || context.open
3335
- }, context.modal ? /* @__PURE__ */ React34.createElement(PopoverContentModal, {
3646
+ }, context.modal ? /* @__PURE__ */ React36.createElement(PopoverContentModal, {
3336
3647
  ...contentProps,
3337
3648
  ref: forwardedRef
3338
- }) : /* @__PURE__ */ React34.createElement(PopoverContentNonModal, {
3649
+ }) : /* @__PURE__ */ React36.createElement(PopoverContentNonModal, {
3339
3650
  ...contentProps,
3340
3651
  ref: forwardedRef
3341
3652
  }));
@@ -3346,16 +3657,16 @@ var PopoverContentModal = /* @__PURE__ */ forwardRef22((props, forwardedRef) =>
3346
3657
  const contentRef = useRef5(null);
3347
3658
  const composedRefs = useComposedRefs2(forwardedRef, contentRef);
3348
3659
  const isRightClickOutsideRef = useRef5(false);
3349
- useEffect6(() => {
3660
+ useEffect7(() => {
3350
3661
  const content = contentRef.current;
3351
3662
  if (content) {
3352
3663
  return hideOthers(content);
3353
3664
  }
3354
3665
  }, []);
3355
- return /* @__PURE__ */ React34.createElement(RemoveScroll, {
3666
+ return /* @__PURE__ */ React36.createElement(RemoveScroll, {
3356
3667
  as: Slot19,
3357
3668
  allowPinchZoom: true
3358
- }, /* @__PURE__ */ React34.createElement(PopoverContentImpl, {
3669
+ }, /* @__PURE__ */ React36.createElement(PopoverContentImpl, {
3359
3670
  ...props,
3360
3671
  ref: composedRefs,
3361
3672
  // Make sure we're not trapping once it's been closed (closed !== unmounted when animating out).
@@ -3386,7 +3697,7 @@ var PopoverContentNonModal = /* @__PURE__ */ forwardRef22((props, forwardedRef)
3386
3697
  const context = usePopoverContext(CONTENT_NAME2, props.__scopePopover);
3387
3698
  const hasInteractedOutsideRef = useRef5(false);
3388
3699
  const hasPointerDownOutsideRef = useRef5(false);
3389
- return /* @__PURE__ */ React34.createElement(PopoverContentImpl, {
3700
+ return /* @__PURE__ */ React36.createElement(PopoverContentImpl, {
3390
3701
  ...props,
3391
3702
  ref: forwardedRef,
3392
3703
  trapFocus: false,
@@ -3429,7 +3740,7 @@ var PopoverContentImpl = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
3429
3740
  const elevation = useElevationContext();
3430
3741
  const safeCollisionPadding = useSafeCollisionPadding(collisionPadding);
3431
3742
  useFocusGuards();
3432
- const computedCollisionBoundary = useMemo5(() => {
3743
+ const computedCollisionBoundary = useMemo7(() => {
3433
3744
  const closestBoundary = context.triggerRef.current?.closest("[data-popover-collision-boundary]");
3434
3745
  return closestBoundary ? Array.isArray(collisionBoundary) ? [
3435
3746
  closestBoundary,
@@ -3445,13 +3756,13 @@ var PopoverContentImpl = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
3445
3756
  collisionBoundary,
3446
3757
  context.triggerRef.current
3447
3758
  ]);
3448
- return /* @__PURE__ */ React34.createElement(FocusScope, {
3759
+ return /* @__PURE__ */ React36.createElement(FocusScope, {
3449
3760
  asChild: true,
3450
3761
  loop: true,
3451
3762
  trapped: trapFocus,
3452
3763
  onMountAutoFocus: onOpenAutoFocus,
3453
3764
  onUnmountAutoFocus: onCloseAutoFocus
3454
- }, /* @__PURE__ */ React34.createElement(DismissableLayer, {
3765
+ }, /* @__PURE__ */ React36.createElement(DismissableLayer, {
3455
3766
  asChild: true,
3456
3767
  disableOutsidePointerEvents,
3457
3768
  onInteractOutside,
@@ -3459,7 +3770,7 @@ var PopoverContentImpl = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
3459
3770
  onPointerDownOutside,
3460
3771
  onFocusOutside,
3461
3772
  onDismiss: () => context.onOpenChange(false)
3462
- }, /* @__PURE__ */ React34.createElement(PopperPrimitive.Content, {
3773
+ }, /* @__PURE__ */ React36.createElement(PopperPrimitive.Content, {
3463
3774
  "data-state": getState(context.open),
3464
3775
  role: "dialog",
3465
3776
  id: context.contentId,
@@ -3488,7 +3799,7 @@ var CLOSE_NAME = "PopoverClose";
3488
3799
  var PopoverClose = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
3489
3800
  const { __scopePopover, ...closeProps } = props;
3490
3801
  const context = usePopoverContext(CLOSE_NAME, __scopePopover);
3491
- return /* @__PURE__ */ React34.createElement(Primitive19.button, {
3802
+ return /* @__PURE__ */ React36.createElement(Primitive19.button, {
3492
3803
  type: "button",
3493
3804
  ...closeProps,
3494
3805
  ref: forwardedRef,
@@ -3501,7 +3812,7 @@ var PopoverArrow = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
3501
3812
  const { __scopePopover, classNames, ...arrowProps } = props;
3502
3813
  const popperScope = usePopperScope(__scopePopover);
3503
3814
  const { tx } = useThemeContext();
3504
- return /* @__PURE__ */ React34.createElement(PopperPrimitive.Arrow, {
3815
+ return /* @__PURE__ */ React36.createElement(PopperPrimitive.Arrow, {
3505
3816
  ...popperScope,
3506
3817
  ...arrowProps,
3507
3818
  className: tx("popover.arrow", {}, classNames),
@@ -3512,7 +3823,7 @@ PopoverArrow.displayName = ARROW_NAME2;
3512
3823
  var PopoverViewport = /* @__PURE__ */ forwardRef22(({ classNames, asChild, constrainInline = true, constrainBlock = true, children, ...props }, forwardedRef) => {
3513
3824
  const { tx } = useThemeContext();
3514
3825
  const Comp = asChild ? Slot19 : Primitive19.div;
3515
- return /* @__PURE__ */ React34.createElement(Comp, {
3826
+ return /* @__PURE__ */ React36.createElement(Comp, {
3516
3827
  ...props,
3517
3828
  className: tx("popover.viewport", {
3518
3829
  constrainInline,
@@ -3535,10 +3846,10 @@ var Popover = {
3535
3846
  };
3536
3847
 
3537
3848
  // src/components/Status/Status.tsx
3538
- import React35, { forwardRef as forwardRef23 } from "react";
3849
+ import React37, { forwardRef as forwardRef23 } from "react";
3539
3850
  var Status = /* @__PURE__ */ forwardRef23(({ classNames, children, progress = 0, indeterminate, variant, ...props }, forwardedRef) => {
3540
3851
  const { tx } = useThemeContext();
3541
- return /* @__PURE__ */ React35.createElement("span", {
3852
+ return /* @__PURE__ */ React37.createElement("span", {
3542
3853
  role: "status",
3543
3854
  ...props,
3544
3855
  className: tx("status.root", {
@@ -3546,7 +3857,7 @@ var Status = /* @__PURE__ */ forwardRef23(({ classNames, children, progress = 0,
3546
3857
  variant
3547
3858
  }, classNames),
3548
3859
  ref: forwardedRef
3549
- }, /* @__PURE__ */ React35.createElement("span", {
3860
+ }, /* @__PURE__ */ React37.createElement("span", {
3550
3861
  role: "none",
3551
3862
  className: tx("status.bar", {
3552
3863
  indeterminate,
@@ -3561,19 +3872,19 @@ var Status = /* @__PURE__ */ forwardRef23(({ classNames, children, progress = 0,
3561
3872
  });
3562
3873
 
3563
3874
  // src/components/ScrollArea/ScrollArea.tsx
3564
- import { createContext as createContext10 } from "@radix-ui/react-context";
3875
+ import { createContext as createContext11 } from "@radix-ui/react-context";
3565
3876
  import { Primitive as Primitive20 } from "@radix-ui/react-primitive";
3566
3877
  import { Slot as Slot20 } from "@radix-ui/react-slot";
3567
- import React36, { useMemo as useMemo6 } from "react";
3878
+ import React38, { useMemo as useMemo8 } from "react";
3568
3879
  import { composableProps as composableProps12, scrollbar, slottable as slottable9 } from "@dxos/ui-theme";
3569
3880
  var SCROLLAREA_NAME = "ScrollArea";
3570
- var [ScrollAreaProvider, useScrollAreaContext] = createContext10(SCROLLAREA_NAME);
3881
+ var [ScrollAreaProvider, useScrollAreaContext] = createContext11(SCROLLAREA_NAME);
3571
3882
  var SCROLLAREA_ROOT_NAME = "ScrollArea.Root";
3572
3883
  var ScrollAreaRoot = slottable9(({ children, asChild, orientation = "vertical", autoHide = true, centered = false, padding = false, thin = false, snap = false, ...props }, forwardedRef) => {
3573
3884
  const { tx } = useThemeContext();
3574
3885
  const { className, ...rest } = composableProps12(props);
3575
3886
  const Comp = asChild ? Slot20 : Primitive20.div;
3576
- const options = useMemo6(() => ({
3887
+ const options = useMemo8(() => ({
3577
3888
  orientation,
3578
3889
  autoHide,
3579
3890
  centered,
@@ -3588,7 +3899,7 @@ var ScrollAreaRoot = slottable9(({ children, asChild, orientation = "vertical",
3588
3899
  thin,
3589
3900
  snap
3590
3901
  ]);
3591
- return /* @__PURE__ */ React36.createElement(ScrollAreaProvider, options, /* @__PURE__ */ React36.createElement(Comp, {
3902
+ return /* @__PURE__ */ React38.createElement(ScrollAreaProvider, options, /* @__PURE__ */ React38.createElement(Comp, {
3592
3903
  ...rest,
3593
3904
  className: tx("scrollArea.root", options, className),
3594
3905
  ref: forwardedRef
@@ -3603,7 +3914,7 @@ var ScrollAreaViewport = slottable9(({ children, asChild, ...props }, forwardedR
3603
3914
  const { className, ...rest } = composableProps12(props);
3604
3915
  const { style, ...restWithoutStyle } = rest;
3605
3916
  const Comp = asChild ? Slot20 : Primitive20.div;
3606
- return /* @__PURE__ */ React36.createElement(Comp, {
3917
+ return /* @__PURE__ */ React38.createElement(Comp, {
3607
3918
  ...restWithoutStyle,
3608
3919
  style: {
3609
3920
  "--scroll-width": `${density.size}px`,
@@ -3621,25 +3932,25 @@ var ScrollArea = {
3621
3932
  };
3622
3933
 
3623
3934
  // src/components/ScrollContainer/ScrollContainer.tsx
3624
- import { createContext as createContext11 } from "@radix-ui/react-context";
3625
- import React37, { forwardRef as forwardRef24, useCallback as useCallback11, useEffect as useEffect7, useImperativeHandle, useMemo as useMemo7, useRef as useRef6, useState as useState10 } from "react";
3935
+ import { createContext as createContext12 } from "@radix-ui/react-context";
3936
+ import React39, { forwardRef as forwardRef24, useCallback as useCallback12, useEffect as useEffect8, useImperativeHandle, useMemo as useMemo9, useRef as useRef6, useState as useState11 } from "react";
3626
3937
  import { addEventListener as addEventListener2, combine } from "@dxos/async";
3627
3938
  import { invariant } from "@dxos/invariant";
3628
3939
  import { useMergeRefs } from "@dxos/react-hooks";
3629
3940
  import { composable as composable6, composableProps as composableProps13, slottable as slottable10 } from "@dxos/ui-theme";
3630
- import { mx as mx9 } from "@dxos/ui-theme";
3941
+ import { mx as mx11 } from "@dxos/ui-theme";
3631
3942
  var __dxlog_file2 = "/__w/dxos/dxos/packages/ui/react-ui/src/components/ScrollContainer/ScrollContainer.tsx";
3632
3943
  var isBottom = (el) => {
3633
3944
  return !!(el && el.scrollHeight - el.scrollTop === el.clientHeight);
3634
3945
  };
3635
- var [ScrollContainerProvider, useScrollContainerContext] = createContext11("ScrollContainer");
3946
+ var [ScrollContainerProvider, useScrollContainerContext] = createContext12("ScrollContainer");
3636
3947
  var Root10 = /* @__PURE__ */ forwardRef24(({ children, pin, behavior: behaviorProp = "smooth" }, forwardedRef) => {
3637
3948
  const scrollerRef = useRef6(null);
3638
3949
  const autoScrollRef = useRef6(false);
3639
- const [pinned, setPinned] = useState10(pin);
3640
- const [overflow, setOverflow] = useState10(false);
3950
+ const [pinned, setPinned] = useState11(pin);
3951
+ const [overflow, setOverflow] = useState11(false);
3641
3952
  const timeoutRef = useRef6(void 0);
3642
- const scrollToBottom = useCallback11((behavior = behaviorProp) => {
3953
+ const scrollToBottom = useCallback12((behavior = behaviorProp) => {
3643
3954
  if (scrollerRef.current) {
3644
3955
  if (behavior !== "instant") {
3645
3956
  autoScrollRef.current = true;
@@ -3659,7 +3970,7 @@ var Root10 = /* @__PURE__ */ forwardRef24(({ children, pin, behavior: behaviorPr
3659
3970
  }, [
3660
3971
  behaviorProp
3661
3972
  ]);
3662
- const controller = useMemo7(() => ({
3973
+ const controller = useMemo9(() => ({
3663
3974
  get viewport() {
3664
3975
  return scrollerRef.current;
3665
3976
  },
@@ -3680,10 +3991,10 @@ var Root10 = /* @__PURE__ */ forwardRef24(({ children, pin, behavior: behaviorPr
3680
3991
  useImperativeHandle(forwardedRef, () => controller, [
3681
3992
  controller
3682
3993
  ]);
3683
- const setViewport = useCallback11((el) => {
3994
+ const setViewport = useCallback12((el) => {
3684
3995
  scrollerRef.current = el;
3685
3996
  }, []);
3686
- return /* @__PURE__ */ React37.createElement(ScrollContainerProvider, {
3997
+ return /* @__PURE__ */ React39.createElement(ScrollContainerProvider, {
3687
3998
  pinned,
3688
3999
  overflow,
3689
4000
  controller,
@@ -3694,7 +4005,7 @@ var Root10 = /* @__PURE__ */ forwardRef24(({ children, pin, behavior: behaviorPr
3694
4005
  });
3695
4006
  Root10.displayName = "ScrollContainer.Root";
3696
4007
  var Content6 = composable6(({ children, thin, padding, centered, ...props }, forwardedRef) => {
3697
- return /* @__PURE__ */ React37.createElement(ScrollArea.Root, {
4008
+ return /* @__PURE__ */ React39.createElement(ScrollArea.Root, {
3698
4009
  ...composableProps13(props, {
3699
4010
  classNames: "relative"
3700
4011
  }),
@@ -3713,7 +4024,7 @@ var Viewport = slottable10(({ children, asChild, ...props }, forwardedRef) => {
3713
4024
  scrollerRef
3714
4025
  ]);
3715
4026
  const { setViewport, setPinned, setOverflow } = useScrollContainerContext(VIEWPORT_NAME);
3716
- useEffect7(() => {
4027
+ useEffect8(() => {
3717
4028
  const el = scrollerRef.current;
3718
4029
  if (!el) {
3719
4030
  return;
@@ -3725,11 +4036,11 @@ var Viewport = slottable10(({ children, asChild, ...props }, forwardedRef) => {
3725
4036
  setPinned,
3726
4037
  setOverflow
3727
4038
  ]);
3728
- return /* @__PURE__ */ React37.createElement(React37.Fragment, null, /* @__PURE__ */ React37.createElement(ScrollArea.Viewport, {
4039
+ return /* @__PURE__ */ React39.createElement(React39.Fragment, null, /* @__PURE__ */ React39.createElement(ScrollArea.Viewport, {
3729
4040
  asChild,
3730
4041
  ...composableProps13(props),
3731
4042
  ref: mergedRef
3732
- }, children), /* @__PURE__ */ React37.createElement(PinEffect, {
4043
+ }, children), /* @__PURE__ */ React39.createElement(PinEffect, {
3733
4044
  scrollerRef
3734
4045
  }));
3735
4046
  });
@@ -3737,7 +4048,7 @@ Viewport.displayName = VIEWPORT_NAME;
3737
4048
  var PIN_EFFECT_NAME = "ScrollContainer.PinEffect";
3738
4049
  var PinEffect = ({ scrollerRef }) => {
3739
4050
  const { pinned, controller } = useScrollContainerContext(PIN_EFFECT_NAME);
3740
- useEffect7(() => {
4051
+ useEffect8(() => {
3741
4052
  const viewport = scrollerRef.current;
3742
4053
  if (!pinned || !viewport) {
3743
4054
  return;
@@ -3774,14 +4085,13 @@ var PinEffect = ({ scrollerRef }) => {
3774
4085
  var FADE_NAME = "ScrollContainer.Fade";
3775
4086
  var Fade = () => {
3776
4087
  const { overflow } = useScrollContainerContext(FADE_NAME);
3777
- return /* @__PURE__ */ React37.createElement("div", {
3778
- role: "none",
4088
+ return /* @__PURE__ */ React39.createElement("div", {
3779
4089
  "data-visible": overflow,
3780
- className: mx9(
4090
+ className: mx11(
3781
4091
  // NOTE: Gradients may not be visible with dark reader extensions.
3782
4092
  "z-10 absolute top-0 inset-x-0 h-24 w-full",
3783
4093
  'opacity-0 duration-200 transition-opacity data-[visible="true"]:opacity-100',
3784
- "bg-gradient-to-b from-(--surface-bg) to-transparent pointer-events-none"
4094
+ "bg-gradient-to-b from-(--color-base-surface) to-transparent pointer-events-none"
3785
4095
  )
3786
4096
  });
3787
4097
  };
@@ -3789,10 +4099,9 @@ Fade.displayName = FADE_NAME;
3789
4099
  var SCROLL_DOWN_BUTTON_NAME = "ScrollContainer.ScrollDownButton";
3790
4100
  var ScrollDownButton = ({ classNames }) => {
3791
4101
  const { pinned, controller } = useScrollContainerContext(SCROLL_DOWN_BUTTON_NAME);
3792
- return /* @__PURE__ */ React37.createElement("div", {
3793
- role: "none",
3794
- className: mx9("absolute bottom-2 right-4 opacity-100 transition-opacity duration-300", pinned && "opacity-0", classNames)
3795
- }, /* @__PURE__ */ React37.createElement(IconButton, {
4102
+ return /* @__PURE__ */ React39.createElement("div", {
4103
+ className: mx11("absolute bottom-2 right-4 opacity-100 transition-opacity duration-300", pinned && "opacity-0", classNames)
4104
+ }, /* @__PURE__ */ React39.createElement(IconButton, {
3796
4105
  variant: "primary",
3797
4106
  icon: "ph--arrow-down--regular",
3798
4107
  iconOnly: true,
@@ -3812,23 +4121,23 @@ var ScrollContainer = {
3812
4121
 
3813
4122
  // src/components/Select/Select.tsx
3814
4123
  import * as SelectPrimitive from "@radix-ui/react-select";
3815
- import React38, { forwardRef as forwardRef25 } from "react";
4124
+ import React40, { forwardRef as forwardRef25 } from "react";
3816
4125
  var SelectRoot = SelectPrimitive.Root;
3817
4126
  var SelectTrigger = SelectPrimitive.Trigger;
3818
4127
  var SelectValue = SelectPrimitive.Value;
3819
4128
  var SelectIcon = SelectPrimitive.Icon;
3820
4129
  var SelectPortal = SelectPrimitive.Portal;
3821
4130
  var SelectTriggerButton = /* @__PURE__ */ forwardRef25(({ children, placeholder, ...props }, forwardedRef) => {
3822
- return /* @__PURE__ */ React38.createElement(SelectPrimitive.Trigger, {
4131
+ return /* @__PURE__ */ React40.createElement(SelectPrimitive.Trigger, {
3823
4132
  asChild: true,
3824
4133
  ref: forwardedRef
3825
- }, /* @__PURE__ */ React38.createElement(Button, props, /* @__PURE__ */ React38.createElement(SelectPrimitive.Value, {
4134
+ }, /* @__PURE__ */ React40.createElement(Button, props, /* @__PURE__ */ React40.createElement(SelectPrimitive.Value, {
3826
4135
  placeholder
3827
- }, children), /* @__PURE__ */ React38.createElement("span", {
4136
+ }, children), /* @__PURE__ */ React40.createElement("span", {
3828
4137
  className: "w-1 flex-1"
3829
- }), /* @__PURE__ */ React38.createElement(SelectPrimitive.Icon, {
4138
+ }), /* @__PURE__ */ React40.createElement(SelectPrimitive.Icon, {
3830
4139
  asChild: true
3831
- }, /* @__PURE__ */ React38.createElement(Icon, {
4140
+ }, /* @__PURE__ */ React40.createElement(Icon, {
3832
4141
  size: 3,
3833
4142
  icon: "ph--caret-down--bold"
3834
4143
  }))));
@@ -3837,7 +4146,7 @@ var SelectContent = /* @__PURE__ */ forwardRef25(({ classNames, children, collis
3837
4146
  const { tx } = useThemeContext();
3838
4147
  const elevation = useElevationContext();
3839
4148
  const safeCollisionPadding = useSafeCollisionPadding(collisionPadding);
3840
- return /* @__PURE__ */ React38.createElement(SelectPrimitive.Content, {
4149
+ return /* @__PURE__ */ React40.createElement(SelectPrimitive.Content, {
3841
4150
  ...props,
3842
4151
  "data-arrow-keys": "up down",
3843
4152
  collisionPadding: safeCollisionPadding,
@@ -3850,29 +4159,29 @@ var SelectContent = /* @__PURE__ */ forwardRef25(({ classNames, children, collis
3850
4159
  });
3851
4160
  var SelectScrollUpButton2 = /* @__PURE__ */ forwardRef25(({ classNames, children, ...props }, forwardedRef) => {
3852
4161
  const { tx } = useThemeContext();
3853
- return /* @__PURE__ */ React38.createElement(SelectPrimitive.SelectScrollUpButton, {
4162
+ return /* @__PURE__ */ React40.createElement(SelectPrimitive.SelectScrollUpButton, {
3854
4163
  ...props,
3855
4164
  className: tx("select.scrollButton", {}, classNames),
3856
4165
  ref: forwardedRef
3857
- }, children ?? /* @__PURE__ */ React38.createElement(Icon, {
4166
+ }, children ?? /* @__PURE__ */ React40.createElement(Icon, {
3858
4167
  size: 3,
3859
4168
  icon: "ph--caret-up--bold"
3860
4169
  }));
3861
4170
  });
3862
4171
  var SelectScrollDownButton2 = /* @__PURE__ */ forwardRef25(({ classNames, children, ...props }, forwardedRef) => {
3863
4172
  const { tx } = useThemeContext();
3864
- return /* @__PURE__ */ React38.createElement(SelectPrimitive.SelectScrollDownButton, {
4173
+ return /* @__PURE__ */ React40.createElement(SelectPrimitive.SelectScrollDownButton, {
3865
4174
  ...props,
3866
4175
  className: tx("select.scrollButton", {}, classNames),
3867
4176
  ref: forwardedRef
3868
- }, children ?? /* @__PURE__ */ React38.createElement(Icon, {
4177
+ }, children ?? /* @__PURE__ */ React40.createElement(Icon, {
3869
4178
  size: 3,
3870
4179
  icon: "ph--caret-down--bold"
3871
4180
  }));
3872
4181
  });
3873
4182
  var SelectViewport2 = /* @__PURE__ */ forwardRef25(({ classNames, children, ...props }, forwardedRef) => {
3874
4183
  const { tx } = useThemeContext();
3875
- return /* @__PURE__ */ React38.createElement(SelectPrimitive.SelectViewport, {
4184
+ return /* @__PURE__ */ React40.createElement(SelectPrimitive.SelectViewport, {
3876
4185
  ...props,
3877
4186
  className: tx("select.viewport", {}, classNames),
3878
4187
  ref: forwardedRef
@@ -3880,7 +4189,7 @@ var SelectViewport2 = /* @__PURE__ */ forwardRef25(({ classNames, children, ...p
3880
4189
  });
3881
4190
  var SelectItem = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, forwardedRef) => {
3882
4191
  const { tx } = useThemeContext();
3883
- return /* @__PURE__ */ React38.createElement(SelectPrimitive.Item, {
4192
+ return /* @__PURE__ */ React40.createElement(SelectPrimitive.Item, {
3884
4193
  ...props,
3885
4194
  className: tx("select.item", {}, classNames),
3886
4195
  ref: forwardedRef
@@ -3889,7 +4198,7 @@ var SelectItem = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, forward
3889
4198
  var SelectItemText = SelectPrimitive.ItemText;
3890
4199
  var SelectItemIndicator = /* @__PURE__ */ forwardRef25(({ classNames, children, ...props }, forwardedRef) => {
3891
4200
  const { tx } = useThemeContext();
3892
- return /* @__PURE__ */ React38.createElement(SelectPrimitive.ItemIndicator, {
4201
+ return /* @__PURE__ */ React40.createElement(SelectPrimitive.ItemIndicator, {
3893
4202
  ...props,
3894
4203
  className: tx("select.itemIndicator", {}, classNames),
3895
4204
  ref: forwardedRef
@@ -3897,13 +4206,13 @@ var SelectItemIndicator = /* @__PURE__ */ forwardRef25(({ classNames, children,
3897
4206
  });
3898
4207
  var SelectOption = /* @__PURE__ */ forwardRef25(({ children, classNames, ...props }, forwardedRef) => {
3899
4208
  const { tx } = useThemeContext();
3900
- return /* @__PURE__ */ React38.createElement(SelectPrimitive.Item, {
4209
+ return /* @__PURE__ */ React40.createElement(SelectPrimitive.Item, {
3901
4210
  ...props,
3902
4211
  className: tx("select.item", {}, classNames),
3903
4212
  ref: forwardedRef
3904
- }, /* @__PURE__ */ React38.createElement(SelectPrimitive.ItemText, null, children), /* @__PURE__ */ React38.createElement("span", {
4213
+ }, /* @__PURE__ */ React40.createElement(SelectPrimitive.ItemText, null, children), /* @__PURE__ */ React40.createElement("span", {
3905
4214
  className: "grow w-1"
3906
- }), /* @__PURE__ */ React38.createElement(Icon, {
4215
+ }), /* @__PURE__ */ React40.createElement(Icon, {
3907
4216
  icon: "ph--check--regular"
3908
4217
  }));
3909
4218
  });
@@ -3911,7 +4220,7 @@ var SelectGroup = SelectPrimitive.Group;
3911
4220
  var SelectLabel = SelectPrimitive.Label;
3912
4221
  var SelectSeparator = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, forwardedRef) => {
3913
4222
  const { tx } = useThemeContext();
3914
- return /* @__PURE__ */ React38.createElement(SelectPrimitive.Separator, {
4223
+ return /* @__PURE__ */ React40.createElement(SelectPrimitive.Separator, {
3915
4224
  ...props,
3916
4225
  className: tx("select.separator", {}, classNames),
3917
4226
  ref: forwardedRef
@@ -3919,7 +4228,7 @@ var SelectSeparator = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, fo
3919
4228
  });
3920
4229
  var SelectArrow = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, forwardedRef) => {
3921
4230
  const { tx } = useThemeContext();
3922
- return /* @__PURE__ */ React38.createElement(SelectPrimitive.Arrow, {
4231
+ return /* @__PURE__ */ React40.createElement(SelectPrimitive.Arrow, {
3923
4232
  ...props,
3924
4233
  className: tx("select.arrow", {}, classNames),
3925
4234
  ref: forwardedRef
@@ -3947,10 +4256,10 @@ var Select = {
3947
4256
  };
3948
4257
 
3949
4258
  // src/components/Skeleton/Skeleton.tsx
3950
- import React39, { forwardRef as forwardRef26 } from "react";
4259
+ import React41, { forwardRef as forwardRef26 } from "react";
3951
4260
  var Skeleton = /* @__PURE__ */ forwardRef26(({ classNames, variant = "default", ...props }, forwardedRef) => {
3952
4261
  const { tx } = useThemeContext();
3953
- return /* @__PURE__ */ React39.createElement("div", {
4262
+ return /* @__PURE__ */ React41.createElement("div", {
3954
4263
  ...props,
3955
4264
  className: tx("skeleton.root", {
3956
4265
  variant
@@ -3963,7 +4272,7 @@ var Skeleton = /* @__PURE__ */ forwardRef26(({ classNames, variant = "default",
3963
4272
  import { createContextScope as createContextScope4 } from "@radix-ui/react-context";
3964
4273
  import { Primitive as Primitive21 } from "@radix-ui/react-primitive";
3965
4274
  import { Slot as Slot21 } from "@radix-ui/react-slot";
3966
- import React40 from "react";
4275
+ import React42 from "react";
3967
4276
  import { composableProps as composableProps14, slottable as slottable11 } from "@dxos/ui-theme";
3968
4277
  var SPLITTER_NAME = "Splitter";
3969
4278
  var [createSplitterContext, createSplitterScope] = createContextScope4(SPLITTER_NAME);
@@ -3974,12 +4283,12 @@ var Root12 = slottable11(({ asChild, mode = "top", ratio = 0.5, transition = 250
3974
4283
  const { __scopeSplitter, ...rest } = props;
3975
4284
  const { className, ...restProps } = composableProps14(rest);
3976
4285
  const Comp = asChild ? Slot21 : Primitive21.div;
3977
- return /* @__PURE__ */ React40.createElement(SplitterProvider, {
4286
+ return /* @__PURE__ */ React42.createElement(SplitterProvider, {
3978
4287
  scope: __scopeSplitter,
3979
4288
  mode,
3980
4289
  ratio,
3981
4290
  transition
3982
- }, /* @__PURE__ */ React40.createElement(Comp, {
4291
+ }, /* @__PURE__ */ React42.createElement(Comp, {
3983
4292
  ...restProps,
3984
4293
  ref: forwardedRef,
3985
4294
  className: tx("splitter.root", {}, className)
@@ -3996,7 +4305,7 @@ var Panel2 = slottable11(({ classNames, asChild, children, position, style, ...p
3996
4305
  const isTopPanel = position === "top";
3997
4306
  const topOffset = isTopPanel ? "0%" : mode === "top" ? "100%" : mode === "bottom" ? "0%" : `${ratio * 100}%`;
3998
4307
  const height = isTopPanel ? mode === "top" ? "100%" : mode === "bottom" ? "0%" : `${ratio * 100}%` : mode === "bottom" ? "100%" : mode === "top" ? "0%" : `${(1 - ratio) * 100}%`;
3999
- return /* @__PURE__ */ React40.createElement(Comp, {
4308
+ return /* @__PURE__ */ React42.createElement(Comp, {
4000
4309
  ...restProps,
4001
4310
  ref: forwardedRef,
4002
4311
  className: tx("splitter.panel", {}, className),
@@ -4017,11 +4326,11 @@ var Splitter = {
4017
4326
  // src/components/Tag/Tag.tsx
4018
4327
  import { Primitive as Primitive22 } from "@radix-ui/react-primitive";
4019
4328
  import { Slot as Slot22 } from "@radix-ui/react-slot";
4020
- import React41, { forwardRef as forwardRef27 } from "react";
4329
+ import React43, { forwardRef as forwardRef27 } from "react";
4021
4330
  var Tag = /* @__PURE__ */ forwardRef27(({ asChild, palette = "neutral", classNames, ...props }, forwardedRef) => {
4022
4331
  const { tx } = useThemeContext();
4023
4332
  const Comp = asChild ? Slot22 : Primitive22.span;
4024
- return /* @__PURE__ */ React41.createElement(Comp, {
4333
+ return /* @__PURE__ */ React43.createElement(Comp, {
4025
4334
  ...props,
4026
4335
  className: tx("tag.root", {
4027
4336
  palette
@@ -4035,11 +4344,11 @@ var Tag = /* @__PURE__ */ forwardRef27(({ asChild, palette = "neutral", classNam
4035
4344
  import { Primitive as Primitive23 } from "@radix-ui/react-primitive";
4036
4345
  import { Slot as Slot23 } from "@radix-ui/react-slot";
4037
4346
  import * as ToastPrimitive from "@radix-ui/react-toast";
4038
- import React42, { forwardRef as forwardRef28 } from "react";
4347
+ import React44, { forwardRef as forwardRef28 } from "react";
4039
4348
  var ToastProvider = ToastPrimitive.Provider;
4040
4349
  var ToastViewport = /* @__PURE__ */ forwardRef28(({ classNames, ...props }, forwardedRef) => {
4041
4350
  const { tx } = useThemeContext();
4042
- return /* @__PURE__ */ React42.createElement(ToastPrimitive.Viewport, {
4351
+ return /* @__PURE__ */ React44.createElement(ToastPrimitive.Viewport, {
4043
4352
  ...props,
4044
4353
  className: tx("toast.viewport", {}, classNames),
4045
4354
  ref: forwardedRef
@@ -4047,18 +4356,18 @@ var ToastViewport = /* @__PURE__ */ forwardRef28(({ classNames, ...props }, forw
4047
4356
  });
4048
4357
  var ToastRoot = /* @__PURE__ */ forwardRef28(({ classNames, children, ...props }, forwardedRef) => {
4049
4358
  const { tx } = useThemeContext();
4050
- return /* @__PURE__ */ React42.createElement(ToastPrimitive.Root, {
4359
+ return /* @__PURE__ */ React44.createElement(ToastPrimitive.Root, {
4051
4360
  ...props,
4052
4361
  className: tx("toast.root", {}, classNames),
4053
4362
  ref: forwardedRef
4054
- }, /* @__PURE__ */ React42.createElement(ElevationProvider, {
4363
+ }, /* @__PURE__ */ React44.createElement(ElevationProvider, {
4055
4364
  elevation: "toast"
4056
4365
  }, children));
4057
4366
  });
4058
4367
  var ToastBody = /* @__PURE__ */ forwardRef28(({ asChild, classNames, ...props }, forwardedRef) => {
4059
4368
  const { tx } = useThemeContext();
4060
4369
  const Comp = asChild ? Slot23 : Primitive23.div;
4061
- return /* @__PURE__ */ React42.createElement(Comp, {
4370
+ return /* @__PURE__ */ React44.createElement(Comp, {
4062
4371
  ...props,
4063
4372
  className: tx("toast.body", {}, classNames),
4064
4373
  ref: forwardedRef
@@ -4067,7 +4376,7 @@ var ToastBody = /* @__PURE__ */ forwardRef28(({ asChild, classNames, ...props },
4067
4376
  var ToastTitle = /* @__PURE__ */ forwardRef28(({ asChild, classNames, ...props }, forwardedRef) => {
4068
4377
  const { tx } = useThemeContext();
4069
4378
  const Comp = asChild ? Slot23 : ToastPrimitive.Title;
4070
- return /* @__PURE__ */ React42.createElement(Comp, {
4379
+ return /* @__PURE__ */ React44.createElement(Comp, {
4071
4380
  ...props,
4072
4381
  className: tx("toast.title", {}, classNames),
4073
4382
  ref: forwardedRef
@@ -4076,7 +4385,7 @@ var ToastTitle = /* @__PURE__ */ forwardRef28(({ asChild, classNames, ...props }
4076
4385
  var ToastDescription = /* @__PURE__ */ forwardRef28(({ asChild, classNames, ...props }, forwardedRef) => {
4077
4386
  const { tx } = useThemeContext();
4078
4387
  const Comp = asChild ? Slot23 : ToastPrimitive.Description;
4079
- return /* @__PURE__ */ React42.createElement(Comp, {
4388
+ return /* @__PURE__ */ React44.createElement(Comp, {
4080
4389
  ...props,
4081
4390
  className: tx("toast.description", {}, classNames),
4082
4391
  ref: forwardedRef
@@ -4085,7 +4394,7 @@ var ToastDescription = /* @__PURE__ */ forwardRef28(({ asChild, classNames, ...p
4085
4394
  var ToastActions = /* @__PURE__ */ forwardRef28(({ asChild, classNames, ...props }, forwardedRef) => {
4086
4395
  const { tx } = useThemeContext();
4087
4396
  const Comp = asChild ? Slot23 : Primitive23.div;
4088
- return /* @__PURE__ */ React42.createElement(Comp, {
4397
+ return /* @__PURE__ */ React44.createElement(Comp, {
4089
4398
  ...props,
4090
4399
  className: tx("toast.actions", {}, classNames),
4091
4400
  ref: forwardedRef
@@ -4113,6 +4422,7 @@ export {
4113
4422
  ButtonGroup,
4114
4423
  Callout,
4115
4424
  Card,
4425
+ Carousel,
4116
4426
  Clipboard,
4117
4427
  Column,
4118
4428
  Container,
@@ -4139,6 +4449,7 @@ export {
4139
4449
  List,
4140
4450
  ListItem,
4141
4451
  Main,
4452
+ MediaPlayer,
4142
4453
  Message,
4143
4454
  Panel,
4144
4455
  Popover,
@@ -4170,14 +4481,17 @@ export {
4170
4481
  createPopoverScope,
4171
4482
  createSplitterScope,
4172
4483
  createTooltipScope,
4484
+ detectMediaKind,
4173
4485
  hasIosKeyboard,
4174
4486
  initialSafeArea,
4487
+ isEmbedUrl,
4175
4488
  isLabel,
4176
4489
  messageIcons,
4177
4490
  parseCaptureOwnerStack,
4178
4491
  toLocalizedString,
4179
4492
  useAvatarContext,
4180
4493
  useButtonGroupContext,
4494
+ useCarousel,
4181
4495
  useClipboard,
4182
4496
  useDensityContext,
4183
4497
  useDropdownMenuContext,