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