@dxos/react-ui 0.8.4-main.40e3dcdf1b → 0.8.4-main.422d1c7879

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 (250) hide show
  1. package/dist/lib/browser/{chunk-2FKSMWNY.mjs → chunk-OCVRIJCH.mjs} +79 -5
  2. package/dist/lib/browser/chunk-OCVRIJCH.mjs.map +7 -0
  3. package/dist/lib/browser/index.mjs +905 -700
  4. package/dist/lib/browser/index.mjs.map +4 -4
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/browser/testing/index.mjs +30 -18
  7. package/dist/lib/browser/testing/index.mjs.map +3 -3
  8. package/dist/lib/node-esm/{chunk-ZNBLTSHI.mjs → chunk-QUD5P3RU.mjs} +79 -5
  9. package/dist/lib/node-esm/chunk-QUD5P3RU.mjs.map +7 -0
  10. package/dist/lib/node-esm/index.mjs +905 -700
  11. package/dist/lib/node-esm/index.mjs.map +4 -4
  12. package/dist/lib/node-esm/meta.json +1 -1
  13. package/dist/lib/node-esm/testing/index.mjs +30 -18
  14. package/dist/lib/node-esm/testing/index.mjs.map +3 -3
  15. package/dist/types/src/components/Avatars/Avatar.d.ts +1 -1
  16. package/dist/types/src/components/Avatars/Avatar.d.ts.map +1 -1
  17. package/dist/types/src/components/Avatars/Avatar.stories.d.ts.map +1 -1
  18. package/dist/types/src/components/Avatars/AvatarGroup.stories.d.ts.map +1 -1
  19. package/dist/types/src/components/Breadcrumb/Breadcrumb.stories.d.ts.map +1 -1
  20. package/dist/types/src/components/Button/Button.d.ts +2 -2
  21. package/dist/types/src/components/Button/Button.d.ts.map +1 -1
  22. package/dist/types/src/components/Button/Button.stories.d.ts.map +1 -1
  23. package/dist/types/src/components/Button/IconButton.d.ts.map +1 -1
  24. package/dist/types/src/components/Button/IconButton.stories.d.ts +3 -0
  25. package/dist/types/src/components/Button/IconButton.stories.d.ts.map +1 -1
  26. package/dist/types/src/components/Button/Toggle.d.ts +2 -2
  27. package/dist/types/src/components/Button/Toggle.d.ts.map +1 -1
  28. package/dist/types/src/components/Button/Toggle.stories.d.ts.map +1 -1
  29. package/dist/types/src/components/Button/ToggleGroup.d.ts +6 -6
  30. package/dist/types/src/components/Button/ToggleGroup.d.ts.map +1 -1
  31. package/dist/types/src/components/Button/ToggleGroup.stories.d.ts.map +1 -1
  32. package/dist/types/src/components/Card/Card.d.ts +69 -49
  33. package/dist/types/src/components/Card/Card.d.ts.map +1 -1
  34. package/dist/types/src/components/Card/Card.stories.d.ts +2 -2
  35. package/dist/types/src/components/Card/Card.stories.d.ts.map +1 -1
  36. package/dist/types/src/components/Clipboard/CopyButton.d.ts.map +1 -1
  37. package/dist/types/src/components/Clipboard/index.d.ts +10 -1
  38. package/dist/types/src/components/Clipboard/index.d.ts.map +1 -1
  39. package/dist/types/src/components/Dialog/AlertDialog.d.ts +39 -28
  40. package/dist/types/src/components/Dialog/AlertDialog.d.ts.map +1 -1
  41. package/dist/types/src/components/Dialog/AlertDialog.stories.d.ts.map +1 -1
  42. package/dist/types/src/components/Dialog/Dialog.d.ts +44 -27
  43. package/dist/types/src/components/Dialog/Dialog.d.ts.map +1 -1
  44. package/dist/types/src/components/Dialog/Dialog.stories.d.ts +3 -2
  45. package/dist/types/src/components/Dialog/Dialog.stories.d.ts.map +1 -1
  46. package/dist/types/src/components/ErrorFallback/ErrorFallback.stories.d.ts.map +1 -1
  47. package/dist/types/src/components/ErrorFallback/ErrorStack.d.ts +14 -3
  48. package/dist/types/src/components/ErrorFallback/ErrorStack.d.ts.map +1 -1
  49. package/dist/types/src/components/Focus/Focus.d.ts +36 -0
  50. package/dist/types/src/components/Focus/Focus.d.ts.map +1 -0
  51. package/dist/types/src/components/Focus/Focus.stories.d.ts +9 -0
  52. package/dist/types/src/components/Focus/Focus.stories.d.ts.map +1 -0
  53. package/dist/types/src/components/Focus/index.d.ts +2 -0
  54. package/dist/types/src/components/Focus/index.d.ts.map +1 -0
  55. package/dist/types/src/components/Icon/Icon.d.ts +3 -0
  56. package/dist/types/src/components/Icon/Icon.d.ts.map +1 -1
  57. package/dist/types/src/components/Icon/Icon.stories.d.ts +11 -3
  58. package/dist/types/src/components/Icon/Icon.stories.d.ts.map +1 -1
  59. package/dist/types/src/components/Image/Image.d.ts +2 -1
  60. package/dist/types/src/components/Image/Image.d.ts.map +1 -1
  61. package/dist/types/src/components/Image/Image.stories.d.ts +2 -1
  62. package/dist/types/src/components/Image/Image.stories.d.ts.map +1 -1
  63. package/dist/types/src/components/Input/Input.d.ts +2 -2
  64. package/dist/types/src/components/Input/Input.d.ts.map +1 -1
  65. package/dist/types/src/components/Input/Input.stories.d.ts +3 -3
  66. package/dist/types/src/components/Input/Input.stories.d.ts.map +1 -1
  67. package/dist/types/src/components/Link/Link.stories.d.ts.map +1 -1
  68. package/dist/types/src/components/List/List.d.ts +5 -3
  69. package/dist/types/src/components/List/List.d.ts.map +1 -1
  70. package/dist/types/src/components/List/List.stories.d.ts +3 -1
  71. package/dist/types/src/components/List/List.stories.d.ts.map +1 -1
  72. package/dist/types/src/components/List/Tree.d.ts.map +1 -1
  73. package/dist/types/src/components/List/Tree.stories.d.ts.map +1 -1
  74. package/dist/types/src/components/List/Treegrid.d.ts +5 -9
  75. package/dist/types/src/components/List/Treegrid.d.ts.map +1 -1
  76. package/dist/types/src/components/List/Treegrid.stories.d.ts.map +1 -1
  77. package/dist/types/src/components/Main/Main.d.ts.map +1 -1
  78. package/dist/types/src/components/Main/Main.stories.d.ts.map +1 -1
  79. package/dist/types/src/components/Menu/ContextMenu.stories.d.ts.map +1 -1
  80. package/dist/types/src/components/Menu/DropdownMenu.d.ts +51 -50
  81. package/dist/types/src/components/Menu/DropdownMenu.d.ts.map +1 -1
  82. package/dist/types/src/components/Menu/DropdownMenu.stories.d.ts +14 -1
  83. package/dist/types/src/components/Menu/DropdownMenu.stories.d.ts.map +1 -1
  84. package/dist/types/src/components/Message/Message.d.ts.map +1 -1
  85. package/dist/types/src/components/Message/Message.stories.d.ts +2 -2
  86. package/dist/types/src/components/Message/Message.stories.d.ts.map +1 -1
  87. package/dist/types/src/components/Popover/Popover.d.ts +31 -23
  88. package/dist/types/src/components/Popover/Popover.d.ts.map +1 -1
  89. package/dist/types/src/components/Popover/Popover.stories.d.ts.map +1 -1
  90. package/dist/types/src/components/ScrollArea/ScrollArea.d.ts +12 -9
  91. package/dist/types/src/components/ScrollArea/ScrollArea.d.ts.map +1 -1
  92. package/dist/types/src/components/ScrollArea/ScrollArea.stories.d.ts +18 -5
  93. package/dist/types/src/components/ScrollArea/ScrollArea.stories.d.ts.map +1 -1
  94. package/dist/types/src/components/ScrollContainer/ScrollContainer.d.ts +34 -13
  95. package/dist/types/src/components/ScrollContainer/ScrollContainer.d.ts.map +1 -1
  96. package/dist/types/src/components/ScrollContainer/ScrollContainer.stories.d.ts +5 -6
  97. package/dist/types/src/components/ScrollContainer/ScrollContainer.stories.d.ts.map +1 -1
  98. package/dist/types/src/components/Select/Select.stories.d.ts +2 -2
  99. package/dist/types/src/components/Select/Select.stories.d.ts.map +1 -1
  100. package/dist/types/src/components/Separator/Separator.d.ts +3 -3
  101. package/dist/types/src/components/Separator/Separator.d.ts.map +1 -1
  102. package/dist/types/src/components/Skeleton/Skeleton.stories.d.ts.map +1 -1
  103. package/dist/types/src/components/Splitter/Splitter.d.ts +19 -17
  104. package/dist/types/src/components/Splitter/Splitter.d.ts.map +1 -1
  105. package/dist/types/src/components/Splitter/Splitter.stories.d.ts.map +1 -1
  106. package/dist/types/src/components/Status/Status.d.ts +3 -4
  107. package/dist/types/src/components/Status/Status.d.ts.map +1 -1
  108. package/dist/types/src/components/Status/Status.stories.d.ts.map +1 -1
  109. package/dist/types/src/components/Tag/Tag.stories.d.ts.map +1 -1
  110. package/dist/types/src/components/ThemeProvider/ThemeProvider.d.ts +1 -1
  111. package/dist/types/src/components/ThemeProvider/ThemeProvider.d.ts.map +1 -1
  112. package/dist/types/src/components/ThemeProvider/ThemeProvider.stories.d.ts +1 -1
  113. package/dist/types/src/components/ThemeProvider/ThemeProvider.stories.d.ts.map +1 -1
  114. package/dist/types/src/components/Toast/Toast.d.ts +15 -15
  115. package/dist/types/src/components/Toast/Toast.d.ts.map +1 -1
  116. package/dist/types/src/components/Toast/Toast.stories.d.ts.map +1 -1
  117. package/dist/types/src/components/Toolbar/Toolbar.d.ts +8 -16
  118. package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +1 -1
  119. package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts.map +1 -1
  120. package/dist/types/src/components/Tooltip/Tooltip.d.ts +9 -9
  121. package/dist/types/src/components/Tooltip/Tooltip.d.ts.map +1 -1
  122. package/dist/types/src/components/Tooltip/Tooltip.stories.d.ts +2 -2
  123. package/dist/types/src/components/Tooltip/Tooltip.stories.d.ts.map +1 -1
  124. package/dist/types/src/components/index.d.ts +1 -0
  125. package/dist/types/src/components/index.d.ts.map +1 -1
  126. package/dist/types/src/exemplars/generics.stories.d.ts +6 -5
  127. package/dist/types/src/exemplars/generics.stories.d.ts.map +1 -1
  128. package/dist/types/src/exemplars/slot.stories.d.ts +1 -0
  129. package/dist/types/src/exemplars/slot.stories.d.ts.map +1 -1
  130. package/dist/types/src/hooks/index.d.ts +1 -0
  131. package/dist/types/src/hooks/index.d.ts.map +1 -1
  132. package/dist/types/src/hooks/useDensityContext.d.ts +1 -1
  133. package/dist/types/src/hooks/useDensityContext.d.ts.map +1 -1
  134. package/dist/types/src/playground/Custom.stories.d.ts.map +1 -1
  135. package/dist/types/src/primitives/Column/Column.d.ts +21 -14
  136. package/dist/types/src/primitives/Column/Column.d.ts.map +1 -1
  137. package/dist/types/src/primitives/Column/Column.stories.d.ts +19 -0
  138. package/dist/types/src/primitives/Column/Column.stories.d.ts.map +1 -1
  139. package/dist/types/src/primitives/Container/Container.d.ts +4 -5
  140. package/dist/types/src/primitives/Container/Container.d.ts.map +1 -1
  141. package/dist/types/src/primitives/Container/Container.stories.d.ts.map +1 -1
  142. package/dist/types/src/primitives/Flex/Flex.d.ts +5 -7
  143. package/dist/types/src/primitives/Flex/Flex.d.ts.map +1 -1
  144. package/dist/types/src/primitives/Flex/Flex.stories.d.ts.map +1 -1
  145. package/dist/types/src/primitives/Grid/Grid.d.ts +3 -8
  146. package/dist/types/src/primitives/Grid/Grid.d.ts.map +1 -1
  147. package/dist/types/src/primitives/Grid/Grid.stories.d.ts.map +1 -1
  148. package/dist/types/src/primitives/Panel/Panel.d.ts +24 -15
  149. package/dist/types/src/primitives/Panel/Panel.d.ts.map +1 -1
  150. package/dist/types/src/primitives/Panel/Panel.stories.d.ts.map +1 -1
  151. package/dist/types/src/testing/Loading.d.ts.map +1 -1
  152. package/dist/types/src/testing/decorators/withTheme.d.ts +1 -1
  153. package/dist/types/src/testing/decorators/withTheme.d.ts.map +1 -1
  154. package/dist/types/src/translations.d.ts +3 -3
  155. package/dist/types/src/util/usePx.d.ts.map +1 -1
  156. package/dist/types/tsconfig.tsbuildinfo +1 -1
  157. package/package.json +18 -24
  158. package/src/components/Avatars/Avatar.stories.tsx +2 -3
  159. package/src/components/Avatars/Avatar.tsx +1 -2
  160. package/src/components/Avatars/AvatarGroup.stories.tsx +0 -1
  161. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +1 -2
  162. package/src/components/Button/Button.stories.tsx +0 -1
  163. package/src/components/Button/Button.tsx +5 -13
  164. package/src/components/Button/IconButton.stories.tsx +6 -4
  165. package/src/components/Button/IconButton.tsx +1 -3
  166. package/src/components/Button/Toggle.stories.tsx +0 -1
  167. package/src/components/Button/Toggle.tsx +4 -4
  168. package/src/components/Button/ToggleGroup.stories.tsx +0 -1
  169. package/src/components/Button/ToggleGroup.tsx +12 -16
  170. package/src/components/Card/Card.stories.tsx +12 -12
  171. package/src/components/Card/Card.tsx +266 -108
  172. package/src/components/Clipboard/CopyButton.tsx +3 -4
  173. package/src/components/Dialog/AlertDialog.stories.tsx +5 -6
  174. package/src/components/Dialog/AlertDialog.tsx +67 -126
  175. package/src/components/Dialog/Dialog.stories.tsx +64 -9
  176. package/src/components/Dialog/Dialog.tsx +84 -88
  177. package/src/components/ErrorFallback/ErrorFallback.stories.tsx +3 -8
  178. package/src/components/ErrorFallback/ErrorStack.tsx +36 -2
  179. package/src/components/Focus/AUDIT.md +43 -0
  180. package/src/components/Focus/Focus.stories.tsx +230 -0
  181. package/src/components/Focus/Focus.tsx +201 -0
  182. package/src/components/Focus/index.ts +5 -0
  183. package/src/components/Icon/Icon.stories.tsx +43 -13
  184. package/src/components/Icon/Icon.tsx +5 -1
  185. package/src/components/Image/Image.stories.tsx +3 -3
  186. package/src/components/Image/Image.tsx +16 -3
  187. package/src/components/Input/Input.stories.tsx +3 -4
  188. package/src/components/Input/Input.tsx +7 -7
  189. package/src/components/Link/Link.stories.tsx +0 -1
  190. package/src/components/List/List.stories.tsx +0 -1
  191. package/src/components/List/List.tsx +6 -5
  192. package/src/components/List/Tree.stories.tsx +1 -2
  193. package/src/components/List/Tree.tsx +0 -1
  194. package/src/components/List/Treegrid.stories.tsx +26 -27
  195. package/src/components/List/Treegrid.tsx +14 -14
  196. package/src/components/Main/Main.stories.tsx +0 -1
  197. package/src/components/Main/Main.tsx +1 -2
  198. package/src/components/Menu/ContextMenu.stories.tsx +0 -1
  199. package/src/components/Menu/DropdownMenu.stories.tsx +0 -1
  200. package/src/components/Menu/DropdownMenu.tsx +48 -42
  201. package/src/components/Message/Message.stories.tsx +6 -7
  202. package/src/components/Message/Message.tsx +1 -5
  203. package/src/components/Popover/Popover.stories.tsx +4 -5
  204. package/src/components/Popover/Popover.tsx +42 -42
  205. package/src/components/ScrollArea/ScrollArea.stories.tsx +93 -30
  206. package/src/components/ScrollArea/ScrollArea.tsx +39 -23
  207. package/src/components/ScrollContainer/ScrollContainer.stories.tsx +20 -18
  208. package/src/components/ScrollContainer/ScrollContainer.tsx +200 -91
  209. package/src/components/Select/Select.stories.tsx +5 -6
  210. package/src/components/Separator/Separator.tsx +4 -7
  211. package/src/components/Skeleton/Skeleton.stories.tsx +0 -1
  212. package/src/components/Splitter/Splitter.stories.tsx +29 -29
  213. package/src/components/Splitter/Splitter.tsx +35 -34
  214. package/src/components/Status/Status.stories.tsx +0 -1
  215. package/src/components/Status/Status.tsx +8 -5
  216. package/src/components/Tag/Tag.stories.tsx +0 -1
  217. package/src/components/ThemeProvider/ThemeProvider.stories.tsx +0 -1
  218. package/src/components/ThemeProvider/ThemeProvider.tsx +5 -4
  219. package/src/components/Toast/Toast.stories.tsx +0 -1
  220. package/src/components/Toast/Toast.tsx +16 -31
  221. package/src/components/Toolbar/Toolbar.stories.tsx +0 -1
  222. package/src/components/Toolbar/Toolbar.tsx +19 -34
  223. package/src/components/Tooltip/Tooltip.stories.tsx +6 -7
  224. package/src/components/Tooltip/Tooltip.tsx +15 -16
  225. package/src/components/index.ts +1 -0
  226. package/src/exemplars/generics.stories.tsx +7 -15
  227. package/src/exemplars/slot.stories.tsx +67 -57
  228. package/src/exemplars/tabster.stories.tsx +1 -1
  229. package/src/exemplars/virtualizer.stories.tsx +4 -4
  230. package/src/hooks/index.ts +1 -0
  231. package/src/hooks/useDensityContext.ts +2 -2
  232. package/src/playground/Custom.stories.tsx +6 -9
  233. package/src/primitives/Column/AUDIT.md +148 -0
  234. package/src/primitives/Column/Column.stories.tsx +122 -19
  235. package/src/primitives/Column/Column.tsx +73 -42
  236. package/src/primitives/Container/Container.stories.tsx +0 -1
  237. package/src/primitives/Container/Container.tsx +5 -8
  238. package/src/primitives/Flex/Flex.stories.tsx +0 -1
  239. package/src/primitives/Flex/Flex.tsx +10 -12
  240. package/src/primitives/Grid/Grid.stories.tsx +0 -1
  241. package/src/primitives/Grid/Grid.tsx +4 -9
  242. package/src/primitives/Panel/Panel.stories.tsx +9 -8
  243. package/src/primitives/Panel/Panel.tsx +64 -63
  244. package/src/testing/Loading.tsx +25 -4
  245. package/src/testing/decorators/withLayout.tsx +6 -6
  246. package/src/testing/decorators/withTheme.tsx +10 -7
  247. package/src/translations.ts +3 -3
  248. package/src/util/usePx.ts +1 -0
  249. package/dist/lib/browser/chunk-2FKSMWNY.mjs.map +0 -7
  250. package/dist/lib/node-esm/chunk-ZNBLTSHI.mjs.map +0 -7
@@ -3,6 +3,7 @@ import {
3
3
  DensityProvider,
4
4
  ElevationContext,
5
5
  ElevationProvider,
6
+ ErrorStack,
6
7
  ThemeContext,
7
8
  ThemeProvider,
8
9
  Tooltip,
@@ -10,12 +11,13 @@ import {
10
11
  createTooltipScope,
11
12
  hasIosKeyboard,
12
13
  initialSafeArea,
14
+ parseCaptureOwnerStack,
13
15
  useElevationContext,
14
16
  useSafeArea,
15
17
  useThemeContext,
16
18
  useTooltipContext,
17
19
  useTranslation
18
- } from "./chunk-2FKSMWNY.mjs";
20
+ } from "./chunk-OCVRIJCH.mjs";
19
21
 
20
22
  // src/index.ts
21
23
  import { Trans } from "react-i18next";
@@ -27,9 +29,9 @@ import { isLabel, toLocalizedString } from "@dxos/ui-types";
27
29
 
28
30
  // src/hooks/useDensityContext.ts
29
31
  import { useContext } from "react";
30
- var useDensityContext = (propsDensity) => {
32
+ var useDensityContext = (densityProp) => {
31
33
  const { density } = useContext(DensityContext);
32
- return propsDensity ?? density;
34
+ return densityProp ?? density;
33
35
  };
34
36
 
35
37
  // src/hooks/useIconHref.ts
@@ -40,6 +42,26 @@ var useIconHref = (icon) => {
40
42
  return icon ? `${url}#${icon}` : void 0;
41
43
  };
42
44
 
45
+ // src/hooks/useSafeCollisionPadding.ts
46
+ import { useMemo } from "react";
47
+ var propIsNumber = (prop) => Number.isFinite(prop);
48
+ var propsIsRecord = (prop) => !!(prop && typeof prop === "object");
49
+ var safePadding = (propsPadding, safePadding2, side) => {
50
+ return (propIsNumber(safePadding2[side]) ? safePadding2[side] : 0) + (propIsNumber(propsPadding) ? propsPadding : propsIsRecord(propsPadding) ? propsPadding[side] ?? 0 : 0);
51
+ };
52
+ var useSafeCollisionPadding = (collisionPadding) => {
53
+ const { safeAreaPadding } = useThemeContext();
54
+ return useMemo(() => ({
55
+ top: safePadding(collisionPadding, safeAreaPadding, "top"),
56
+ right: safePadding(collisionPadding, safeAreaPadding, "right"),
57
+ bottom: safePadding(collisionPadding, safeAreaPadding, "bottom"),
58
+ left: safePadding(collisionPadding, safeAreaPadding, "left")
59
+ }), [
60
+ collisionPadding,
61
+ safeAreaPadding
62
+ ]);
63
+ };
64
+
43
65
  // src/hooks/useTranslationsContext.ts
44
66
  import { useContext as useContext2 } from "react";
45
67
  var useTranslationsContext = () => useContext2(TranslationsContext);
@@ -64,7 +86,7 @@ var useVisualViewport = (deps) => {
64
86
  };
65
87
 
66
88
  // src/util/usePx.ts
67
- import { useCallback as useCallback2, useEffect, useMemo, useState as useState2 } from "react";
89
+ import { useCallback as useCallback2, useEffect, useMemo as useMemo2, useState as useState2 } from "react";
68
90
  var getDocumentElementFontSize = () => parseFloat(getComputedStyle(document.documentElement).fontSize);
69
91
  var usePx = (rem) => {
70
92
  const [fontSize, setFontSize] = useState2(() => {
@@ -100,17 +122,17 @@ var usePx = (rem) => {
100
122
  }
101
123
  };
102
124
  }, []);
103
- return useMemo(() => rem * fontSize, [
125
+ return useMemo2(() => rem * fontSize, [
104
126
  fontSize
105
127
  ]);
106
128
  };
107
129
 
108
130
  // src/components/Avatars/Avatar.tsx
109
- import "@dxos/lit-ui/dx-avatar.pcss";
110
131
  import { createContext } from "@radix-ui/react-context";
111
132
  import { Primitive } from "@radix-ui/react-primitive";
112
133
  import { Slot } from "@radix-ui/react-slot";
113
134
  import React, { forwardRef } from "react";
135
+ import "@dxos/lit-ui/dx-avatar.pcss";
114
136
  import { DxAvatar } from "@dxos/lit-ui/react";
115
137
  import { useId } from "@dxos/react-hooks";
116
138
  import { mx } from "@dxos/ui-theme";
@@ -176,7 +198,7 @@ import React4, { forwardRef as forwardRef4 } from "react";
176
198
 
177
199
  // src/components/Icon/Icon.tsx
178
200
  import React2, { forwardRef as forwardRef2, memo } from "react";
179
- var Icon = /* @__PURE__ */ memo(/* @__PURE__ */ forwardRef2(({ icon, classNames, size = 4, ...props }, forwardedRef) => {
201
+ var Icon = /* @__PURE__ */ memo(/* @__PURE__ */ forwardRef2(({ icon, classNames, size, ...props }, forwardedRef) => {
180
202
  const { tx } = useThemeContext();
181
203
  const href = useIconHref(icon);
182
204
  return /* @__PURE__ */ React2.createElement("svg", {
@@ -284,11 +306,11 @@ var BUTTON_NAME = "Button";
284
306
  var [ButtonGroupProvider, useButtonGroupContext] = createContext2(BUTTON_GROUP_NAME, {
285
307
  inGroup: false
286
308
  });
287
- var Button = /* @__PURE__ */ memo2(/* @__PURE__ */ forwardRef5(({ classNames, children, density: propsDensity, elevation: propsElevation, variant = "default", asChild, ...props }, ref) => {
309
+ var Button = /* @__PURE__ */ memo2(/* @__PURE__ */ forwardRef5(({ classNames, children, density: densityProp, elevation: elevationProp, variant = "default", asChild, ...props }, ref) => {
288
310
  const { inGroup } = useButtonGroupContext(BUTTON_NAME);
289
311
  const { tx } = useThemeContext();
290
- const elevation = useElevationContext(propsElevation);
291
- const density = useDensityContext(propsDensity);
312
+ const elevation = useElevationContext(elevationProp);
313
+ const density = useDensityContext(densityProp);
292
314
  const Comp = asChild ? Slot4 : Primitive4.button;
293
315
  return /* @__PURE__ */ React5.createElement(Comp, {
294
316
  ref,
@@ -351,7 +373,7 @@ var IconOnlyButton = /* @__PURE__ */ forwardRef6(({ noTooltip, tooltipSide, ...p
351
373
  ref: forwardedRef
352
374
  }));
353
375
  });
354
- var LabelledIconButton = /* @__PURE__ */ forwardRef6(({ size = 5, icon, iconOnly, iconEnd, iconClassNames, label, caretDown, noTooltip: _, classNames, ...props }, forwardedRef) => {
376
+ var LabelledIconButton = /* @__PURE__ */ forwardRef6(({ size, icon, iconOnly, iconEnd, iconClassNames, label, caretDown, noTooltip: _, classNames, ...props }, forwardedRef) => {
355
377
  const { tx } = useThemeContext();
356
378
  return /* @__PURE__ */ React6.createElement(Button, {
357
379
  ...props,
@@ -376,10 +398,10 @@ var LabelledIconButton = /* @__PURE__ */ forwardRef6(({ size = 5, icon, iconOnly
376
398
  });
377
399
 
378
400
  // src/components/Button/Toggle.tsx
379
- import { Toggle as TogglePrimitive } from "@radix-ui/react-toggle";
401
+ import * as TogglePrimitive from "@radix-ui/react-toggle";
380
402
  import React7, { forwardRef as forwardRef7 } from "react";
381
403
  var Toggle = /* @__PURE__ */ forwardRef7(({ defaultPressed, pressed, onPressedChange, ...props }, forwardedRef) => {
382
- return /* @__PURE__ */ React7.createElement(TogglePrimitive, {
404
+ return /* @__PURE__ */ React7.createElement(TogglePrimitive.Root, {
383
405
  defaultPressed,
384
406
  pressed,
385
407
  onPressedChange,
@@ -391,10 +413,10 @@ var Toggle = /* @__PURE__ */ forwardRef7(({ defaultPressed, pressed, onPressedCh
391
413
  });
392
414
 
393
415
  // src/components/Button/ToggleGroup.tsx
394
- import { ToggleGroupItem as ToggleGroupItemPrimitive, ToggleGroup as ToggleGroupPrimitive } from "@radix-ui/react-toggle-group";
416
+ import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
395
417
  import React8, { forwardRef as forwardRef8 } from "react";
396
418
  var ToggleGroup = /* @__PURE__ */ forwardRef8(({ classNames, children, ...props }, forwardedRef) => {
397
- return /* @__PURE__ */ React8.createElement(ToggleGroupPrimitive, {
419
+ return /* @__PURE__ */ React8.createElement(ToggleGroupPrimitive.Root, {
398
420
  ...props,
399
421
  asChild: true
400
422
  }, /* @__PURE__ */ React8.createElement(ButtonGroup, {
@@ -404,7 +426,7 @@ var ToggleGroup = /* @__PURE__ */ forwardRef8(({ classNames, children, ...props
404
426
  }));
405
427
  });
406
428
  var ToggleGroupItem = /* @__PURE__ */ forwardRef8(({ variant, elevation, density, classNames, children, ...props }, forwardedRef) => {
407
- return /* @__PURE__ */ React8.createElement(ToggleGroupItemPrimitive, {
429
+ return /* @__PURE__ */ React8.createElement(ToggleGroupPrimitive.Item, {
408
430
  ...props,
409
431
  asChild: true
410
432
  }, /* @__PURE__ */ React8.createElement(Button, {
@@ -417,7 +439,7 @@ var ToggleGroupItem = /* @__PURE__ */ forwardRef8(({ variant, elevation, density
417
439
  }));
418
440
  });
419
441
  var ToggleGroupIconItem = /* @__PURE__ */ forwardRef8(({ variant, label, icon, size, elevation, density, classNames, ...props }, forwardedRef) => {
420
- return /* @__PURE__ */ React8.createElement(ToggleGroupItemPrimitive, {
442
+ return /* @__PURE__ */ React8.createElement(ToggleGroupPrimitive.Item, {
421
443
  ...props,
422
444
  asChild: true
423
445
  }, /* @__PURE__ */ React8.createElement(IconButton, {
@@ -433,24 +455,25 @@ var ToggleGroupIconItem = /* @__PURE__ */ forwardRef8(({ variant, label, icon, s
433
455
  });
434
456
 
435
457
  // src/components/Card/Card.tsx
436
- import { Primitive as Primitive11 } from "@radix-ui/react-primitive";
437
- import { Slot as Slot11 } from "@radix-ui/react-slot";
438
- import React19, { createContext as createContext3, forwardRef as forwardRef18, useContext as useContext3 } from "react";
439
- import { composableProps as composableProps7, mx as mx6 } from "@dxos/ui-theme";
458
+ import { Primitive as Primitive12 } from "@radix-ui/react-primitive";
459
+ import { Slot as Slot12 } from "@radix-ui/react-slot";
460
+ import DOMPurify from "dompurify";
461
+ import React19, { createContext as createContext3, forwardRef as forwardRef13, useContext as useContext3, useMemo as useMemo4 } from "react";
462
+ import { composable as composable3, composableProps as composableProps7, iconSize, mx as mx6, slottable as slottable6 } from "@dxos/ui-theme";
440
463
 
441
464
  // src/primitives/Column/Column.tsx
442
465
  import { Primitive as Primitive5 } from "@radix-ui/react-primitive";
443
466
  import { Slot as Slot5 } from "@radix-ui/react-slot";
444
- import React9, { forwardRef as forwardRef9 } from "react";
445
- import { composableProps } from "@dxos/ui-theme";
467
+ import React9 from "react";
468
+ import { composableProps, slottable } from "@dxos/ui-theme";
446
469
  var COLUMN_ROOT_NAME = "Column.Root";
447
470
  var gutterSizes = {
471
+ xs: "var(--dx-gutter-xs)",
448
472
  sm: "var(--dx-gutter-sm)",
449
473
  md: "var(--dx-gutter-md)",
450
- lg: "var(--dx-gutter-lg)",
451
- rail: "var(--dx-rail-item)"
474
+ lg: "var(--dx-gutter-lg)"
452
475
  };
453
- var Root = /* @__PURE__ */ forwardRef9(({ children, asChild, role, gutter = "md", ...props }, forwardedRef) => {
476
+ var ColumnRoot = slottable(({ children, asChild, role, gutter = "md", ...props }, forwardedRef) => {
454
477
  const { className, ...rest } = composableProps(props);
455
478
  const Comp = asChild ? Slot5 : Primitive5.div;
456
479
  const { tx } = useThemeContext();
@@ -460,6 +483,7 @@ var Root = /* @__PURE__ */ forwardRef9(({ children, asChild, role, gutter = "md"
460
483
  role: role ?? "none",
461
484
  style: {
462
485
  "--gutter": gutterSize,
486
+ "--dx-col": "2 / span 1",
463
487
  gridTemplateColumns: [
464
488
  gutterSize,
465
489
  "minmax(0,1fr)",
@@ -472,9 +496,9 @@ var Root = /* @__PURE__ */ forwardRef9(({ children, asChild, role, gutter = "md"
472
496
  ref: forwardedRef
473
497
  }, children);
474
498
  });
475
- Root.displayName = COLUMN_ROOT_NAME;
499
+ ColumnRoot.displayName = COLUMN_ROOT_NAME;
476
500
  var COLUMN_ROW_NAME = "Column.Row";
477
- var Row = /* @__PURE__ */ forwardRef9(({ children, asChild, role, ...props }, forwardedRef) => {
501
+ var ColumnRow = slottable(({ children, asChild, role, ...props }, forwardedRef) => {
478
502
  const { className, ...rest } = composableProps(props);
479
503
  const Comp = asChild ? Slot5 : Primitive5.div;
480
504
  const { tx } = useThemeContext();
@@ -485,37 +509,45 @@ var Row = /* @__PURE__ */ forwardRef9(({ children, asChild, role, ...props }, fo
485
509
  ref: forwardedRef
486
510
  }, children);
487
511
  });
488
- Row.displayName = COLUMN_ROW_NAME;
489
- var COLUMN_SEGMENT_NAME = "Column.Segment";
490
- var Segment = /* @__PURE__ */ forwardRef9(({ children, asChild, role, ...props }, forwardedRef) => {
512
+ ColumnRow.displayName = COLUMN_ROW_NAME;
513
+ var COLUMN_BLEED_NAME = "Column.Bleed";
514
+ var ColumnBleed = slottable(({ children, asChild, ...props }, forwardedRef) => {
515
+ const { tx } = useThemeContext();
491
516
  const { className, ...rest } = composableProps(props);
492
517
  const Comp = asChild ? Slot5 : Primitive5.div;
518
+ return /* @__PURE__ */ React9.createElement(Comp, {
519
+ ...rest,
520
+ className: tx("column.bleed", {}, className),
521
+ ref: forwardedRef
522
+ }, children);
523
+ });
524
+ ColumnBleed.displayName = COLUMN_BLEED_NAME;
525
+ var COLUMN_CENTER_NAME = "Column.Center";
526
+ var ColumnCenter = slottable(({ children, asChild, ...props }, forwardedRef) => {
493
527
  const { tx } = useThemeContext();
528
+ const { className, ...rest } = composableProps(props);
529
+ const Comp = asChild ? Slot5 : Primitive5.div;
494
530
  return /* @__PURE__ */ React9.createElement(Comp, {
495
531
  ...rest,
496
- role: role ?? "none",
497
- className: tx("column.segment", {}, className),
532
+ className: tx("column.center", {}, className),
498
533
  ref: forwardedRef
499
- }, asChild ? children : /* @__PURE__ */ React9.createElement("div", {
500
- className: "contents"
501
- }, children));
534
+ }, children);
502
535
  });
503
- Segment.displayName = COLUMN_SEGMENT_NAME;
536
+ ColumnCenter.displayName = COLUMN_CENTER_NAME;
504
537
  var Column = {
505
- Root,
506
- Row,
507
- Segment
538
+ Root: ColumnRoot,
539
+ Row: ColumnRow,
540
+ Bleed: ColumnBleed,
541
+ Center: ColumnCenter
508
542
  };
509
543
 
510
544
  // src/primitives/Container/Container.tsx
511
- import React10, { forwardRef as forwardRef10 } from "react";
512
- import { composableProps as composableProps2, mx as mx2 } from "@dxos/ui-theme";
513
- import { Slot as Slot6 } from "@radix-ui/react-slot";
514
545
  import { Primitive as Primitive6 } from "@radix-ui/react-primitive";
515
- var Container = /* @__PURE__ */ forwardRef10(({ children, asChild, ...props }, forwardedRef) => {
516
- const { className, ...rest } = composableProps2(props, {
517
- role: "none"
518
- });
546
+ import { Slot as Slot6 } from "@radix-ui/react-slot";
547
+ import React10 from "react";
548
+ import { composableProps as composableProps2, mx as mx2, slottable as slottable2 } from "@dxos/ui-theme";
549
+ var Container = slottable2(({ children, asChild, ...props }, forwardedRef) => {
550
+ const { className, ...rest } = composableProps2(props);
519
551
  const Comp = asChild ? Slot6 : Primitive6.div;
520
552
  return /* @__PURE__ */ React10.createElement(Comp, {
521
553
  ...rest,
@@ -525,22 +557,24 @@ var Container = /* @__PURE__ */ forwardRef10(({ children, asChild, ...props }, f
525
557
  });
526
558
 
527
559
  // src/primitives/Flex/Flex.tsx
528
- import React11, { forwardRef as forwardRef11 } from "react";
529
- import { composableProps as composableProps3, mx as mx3 } from "@dxos/ui-theme";
530
- var Flex = /* @__PURE__ */ forwardRef11(({ children, role, column, grow, ...props }, forwardedRef) => {
560
+ import { Primitive as Primitive7 } from "@radix-ui/react-primitive";
561
+ import { Slot as Slot7 } from "@radix-ui/react-slot";
562
+ import React11 from "react";
563
+ import { composableProps as composableProps3, mx as mx3, slottable as slottable3 } from "@dxos/ui-theme";
564
+ var Flex = slottable3(({ children, asChild, column, grow, ...props }, forwardedRef) => {
531
565
  const { className, ...rest } = composableProps3(props);
532
- return /* @__PURE__ */ React11.createElement("div", {
566
+ const Comp = asChild ? Slot7 : Primitive7.div;
567
+ return /* @__PURE__ */ React11.createElement(Comp, {
533
568
  ref: forwardedRef,
534
569
  ...rest,
535
- role: role ?? "none",
536
570
  className: mx3("flex", column && "flex-col", grow && "flex-1 overflow-hidden", className)
537
571
  }, children);
538
572
  });
539
573
 
540
574
  // src/primitives/Grid/Grid.tsx
541
- import React12, { forwardRef as forwardRef12 } from "react";
542
- import { composableProps as composableProps4, mx as mx4 } from "@dxos/ui-theme";
543
- var Grid = /* @__PURE__ */ forwardRef12(({ children, style, role, cols, rows, grow = true, ...props }, forwardedRef) => {
575
+ import React12 from "react";
576
+ import { composable, composableProps as composableProps4, mx as mx4 } from "@dxos/ui-theme";
577
+ var Grid = composable(({ children, style, role, cols, rows, grow = true, ...props }, forwardedRef) => {
544
578
  const { className, ...rest } = composableProps4(props);
545
579
  return /* @__PURE__ */ React12.createElement("div", {
546
580
  ref: forwardedRef,
@@ -556,15 +590,15 @@ var Grid = /* @__PURE__ */ forwardRef12(({ children, style, role, cols, rows, gr
556
590
  });
557
591
 
558
592
  // src/primitives/Panel/Panel.tsx
559
- import { Primitive as Primitive7 } from "@radix-ui/react-primitive";
560
- import { Slot as Slot7 } from "@radix-ui/react-slot";
561
- import React13, { forwardRef as forwardRef13 } from "react";
562
- import { composableProps as composableProps5 } from "@dxos/ui-theme";
593
+ import { Primitive as Primitive8 } from "@radix-ui/react-primitive";
594
+ import { Slot as Slot8 } from "@radix-ui/react-slot";
595
+ import React13 from "react";
596
+ import { composableProps as composableProps5, slottable as slottable4 } from "@dxos/ui-theme";
563
597
  var GRID_TEMPLATE_ROWS = "auto 1fr auto";
564
598
  var GRID_TEMPLATE_AREAS = '"toolbar" "content" "statusbar"';
565
- var Root2 = /* @__PURE__ */ forwardRef13(({ children, asChild, role, style, ...props }, forwardedRef) => {
599
+ var PanelRoot = slottable4(({ children, asChild, role, style, ...props }, forwardedRef) => {
566
600
  const { className, ...rest } = composableProps5(props);
567
- const Comp = asChild ? Slot7 : Primitive7.div;
601
+ const Comp = asChild ? Slot8 : Primitive8.div;
568
602
  const { tx } = useThemeContext();
569
603
  return /* @__PURE__ */ React13.createElement(Comp, {
570
604
  ...rest,
@@ -578,22 +612,24 @@ var Root2 = /* @__PURE__ */ forwardRef13(({ children, asChild, role, style, ...p
578
612
  ref: forwardedRef
579
613
  }, children);
580
614
  });
581
- Root2.displayName = "Panel.Root";
582
- var Toolbar = /* @__PURE__ */ forwardRef13(({ children, asChild, ...props }, forwardedRef) => {
615
+ PanelRoot.displayName = "Panel.Root";
616
+ var PanelToolbar = slottable4(({ children, asChild, size, ...props }, forwardedRef) => {
583
617
  const { className, ...rest } = composableProps5(props);
584
- const Comp = asChild ? Slot7 : Primitive7.div;
618
+ const Comp = asChild ? Slot8 : Primitive8.div;
585
619
  const { tx } = useThemeContext();
586
620
  return /* @__PURE__ */ React13.createElement(Comp, {
587
621
  ...rest,
588
622
  "data-slot": "toolbar",
589
- className: tx("panel.toolbar", {}, className),
623
+ className: tx("panel.toolbar", {
624
+ size
625
+ }, className),
590
626
  ref: forwardedRef
591
627
  }, children);
592
628
  });
593
- Toolbar.displayName = "Panel.Toolbar";
594
- var Content = /* @__PURE__ */ forwardRef13(({ children, asChild, ...props }, forwardedRef) => {
629
+ PanelToolbar.displayName = "Panel.Toolbar";
630
+ var PanelContent = slottable4(({ children, asChild, ...props }, forwardedRef) => {
595
631
  const { className, ...rest } = composableProps5(props);
596
- const Comp = asChild ? Slot7 : Primitive7.div;
632
+ const Comp = asChild ? Slot8 : Primitive8.div;
597
633
  const { tx } = useThemeContext();
598
634
  return /* @__PURE__ */ React13.createElement(Comp, {
599
635
  ...rest,
@@ -602,31 +638,33 @@ var Content = /* @__PURE__ */ forwardRef13(({ children, asChild, ...props }, for
602
638
  ref: forwardedRef
603
639
  }, children);
604
640
  });
605
- Content.displayName = "Panel.Content";
606
- var Statusbar = /* @__PURE__ */ forwardRef13(({ children, asChild, ...props }, forwardedRef) => {
641
+ PanelContent.displayName = "Panel.Content";
642
+ var PanelStatusbar = slottable4(({ children, asChild, size, ...props }, forwardedRef) => {
607
643
  const { className, ...rest } = composableProps5(props);
608
- const Comp = asChild ? Slot7 : Primitive7.div;
644
+ const Comp = asChild ? Slot8 : Primitive8.div;
609
645
  const { tx } = useThemeContext();
610
646
  return /* @__PURE__ */ React13.createElement(Comp, {
611
647
  ...rest,
612
648
  "data-slot": "statusbar",
613
- className: tx("panel.statusbar", {}, className),
649
+ className: tx("panel.statusbar", {
650
+ size
651
+ }, className),
614
652
  ref: forwardedRef
615
653
  }, children);
616
654
  });
617
- Statusbar.displayName = "Panel.Statusbar";
655
+ PanelStatusbar.displayName = "Panel.Statusbar";
618
656
  var Panel = {
619
- Root: Root2,
620
- Toolbar,
621
- Content,
622
- Statusbar
657
+ Root: PanelRoot,
658
+ Toolbar: PanelToolbar,
659
+ Content: PanelContent,
660
+ Statusbar: PanelStatusbar
623
661
  };
624
662
 
625
663
  // src/components/Image/Image.tsx
626
664
  import React14, { useCallback as useCallback3, useRef, useState as useState3 } from "react";
627
665
  import { mx as mx5 } from "@dxos/ui-theme";
628
666
  var cache = /* @__PURE__ */ new Map();
629
- var Image = ({ classNames, src, alt = "", crossOrigin = "anonymous", sampleSize = 64, contrast = 0.9 }) => {
667
+ var Image = ({ classNames, src, alt = "", fit = "contain", crossOrigin = "anonymous", sampleSize = 64, contrast = 0.9 }) => {
630
668
  const [crossOriginState, setCrossOriginState] = useState3(crossOrigin);
631
669
  const [dominantColor, setDominantColor] = useState3(void 0);
632
670
  const [imageLoaded, setImageLoaded] = useState3(false);
@@ -665,7 +703,13 @@ var Image = ({ classNames, src, alt = "", crossOrigin = "anonymous", sampleSize
665
703
  src
666
704
  ]);
667
705
  return /* @__PURE__ */ React14.createElement("div", {
668
- className: mx5(`relative flex w-full justify-center overflow-hidden transition-all duration-700`, classNames),
706
+ // `isolate` (`isolation: isolate`) creates a new stacking context so
707
+ // the inner <img>'s `z-10` stays scoped to this wrapper. Without it
708
+ // the z-10 leaks into the parent's stacking context and elevates the
709
+ // image above any pseudo-element rings (e.g. Focus.Item's
710
+ // `dx-ring-pseudo` `::after`) painted on ancestors — most visibly,
711
+ // the focus ring on a Card containing a Card.Poster.
712
+ className: mx5(`relative flex w-full justify-center overflow-hidden transition-all duration-700 isolate`, classNames),
669
713
  style: {
670
714
  backgroundColor: dominantColor
671
715
  }
@@ -688,7 +732,7 @@ var Image = ({ classNames, src, alt = "", crossOrigin = "anonymous", sampleSize
688
732
  crossOrigin: crossOriginState,
689
733
  onError: handleImageError,
690
734
  onLoad: handleImageLoad,
691
- className: "z-10 object-contain transition-opacity duration-500",
735
+ className: mx5("z-10 transition-opacity duration-500", fit === "cover" ? "w-full h-full object-cover" : "object-contain"),
692
736
  style: {
693
737
  opacity: imageLoaded ? 1 : 0
694
738
  }
@@ -768,12 +812,12 @@ var isTransparent = (pixels, sampleSize, threshold = 0.5) => {
768
812
  };
769
813
 
770
814
  // src/components/Toolbar/Toolbar.tsx
771
- import { Primitive as Primitive10 } from "@radix-ui/react-primitive";
772
- import { Slot as Slot10 } from "@radix-ui/react-slot";
815
+ import { Primitive as Primitive11 } from "@radix-ui/react-primitive";
816
+ import { Slot as Slot11 } from "@radix-ui/react-slot";
773
817
  import * as ToolbarPrimitive from "@radix-ui/react-toolbar";
774
- import React18, { Fragment, forwardRef as forwardRef17 } from "react";
818
+ import React18, { forwardRef as forwardRef12 } from "react";
775
819
  import { useTranslation as useTranslation2 } from "react-i18next";
776
- import { composableProps as composableProps6 } from "@dxos/ui-theme";
820
+ import { composable as composable2, composableProps as composableProps6, slottable as slottable5 } from "@dxos/ui-theme";
777
821
 
778
822
  // src/translations.ts
779
823
  var translationKey = "@dxos/react-ui";
@@ -781,9 +825,9 @@ var translations = [
781
825
  {
782
826
  "en-US": {
783
827
  [translationKey]: {
784
- "toolbar menu label": "Action menu",
785
- "toolbar drag handle label": "Drag to rearrange",
786
- "toolbar close label": "Close"
828
+ "toolbar-menu.label": "Action menu",
829
+ "toolbar-drag-handle.label": "Drag to rearrange",
830
+ "toolbar-close.label": "Close"
787
831
  }
788
832
  }
789
833
  }
@@ -791,35 +835,13 @@ var translations = [
791
835
 
792
836
  // src/components/Menu/ContextMenu.tsx
793
837
  import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
794
- import { Primitive as Primitive8 } from "@radix-ui/react-primitive";
795
- import { Slot as Slot8 } from "@radix-ui/react-slot";
796
- import React15, { forwardRef as forwardRef14 } from "react";
797
-
798
- // src/hooks/useSafeCollisionPadding.ts
799
- import { useMemo as useMemo2 } from "react";
800
- var propIsNumber = (prop) => Number.isFinite(prop);
801
- var propsIsRecord = (prop) => !!(prop && typeof prop === "object");
802
- var safePadding = (propsPadding, safePadding2, side) => {
803
- return (propIsNumber(safePadding2[side]) ? safePadding2[side] : 0) + (propIsNumber(propsPadding) ? propsPadding : propsIsRecord(propsPadding) ? propsPadding[side] ?? 0 : 0);
804
- };
805
- var useSafeCollisionPadding = (collisionPadding) => {
806
- const { safeAreaPadding } = useThemeContext();
807
- return useMemo2(() => ({
808
- top: safePadding(collisionPadding, safeAreaPadding, "top"),
809
- right: safePadding(collisionPadding, safeAreaPadding, "right"),
810
- bottom: safePadding(collisionPadding, safeAreaPadding, "bottom"),
811
- left: safePadding(collisionPadding, safeAreaPadding, "left")
812
- }), [
813
- collisionPadding,
814
- safeAreaPadding
815
- ]);
816
- };
817
-
818
- // src/components/Menu/ContextMenu.tsx
838
+ import { Primitive as Primitive9 } from "@radix-ui/react-primitive";
839
+ import { Slot as Slot9 } from "@radix-ui/react-slot";
840
+ import React15, { forwardRef as forwardRef9 } from "react";
819
841
  var ContextMenuRoot = ContextMenuPrimitive.ContextMenu;
820
842
  var ContextMenuTrigger = ContextMenuPrimitive.Trigger;
821
843
  var ContextMenuPortal = ContextMenuPrimitive.Portal;
822
- var ContextMenuContent = /* @__PURE__ */ forwardRef14(({ classNames, children, collisionPadding = 8, ...props }, forwardedRef) => {
844
+ var ContextMenuContent = /* @__PURE__ */ forwardRef9(({ classNames, children, collisionPadding = 8, ...props }, forwardedRef) => {
823
845
  const { tx } = useThemeContext();
824
846
  const elevation = useElevationContext();
825
847
  const safeCollisionPadding = useSafeCollisionPadding(collisionPadding);
@@ -833,16 +855,16 @@ var ContextMenuContent = /* @__PURE__ */ forwardRef14(({ classNames, children, c
833
855
  ref: forwardedRef
834
856
  }, children);
835
857
  });
836
- var ContextMenuViewport = /* @__PURE__ */ forwardRef14(({ classNames, asChild, children, ...props }, forwardedRef) => {
858
+ var ContextMenuViewport = /* @__PURE__ */ forwardRef9(({ classNames, asChild, children, ...props }, forwardedRef) => {
837
859
  const { tx } = useThemeContext();
838
- const Comp = asChild ? Slot8 : Primitive8.div;
860
+ const Comp = asChild ? Slot9 : Primitive9.div;
839
861
  return /* @__PURE__ */ React15.createElement(Comp, {
840
862
  ...props,
841
863
  className: tx("menu.viewport", {}, classNames),
842
864
  ref: forwardedRef
843
865
  }, children);
844
866
  });
845
- var ContextMenuArrow = /* @__PURE__ */ forwardRef14(({ classNames, ...props }, forwardedRef) => {
867
+ var ContextMenuArrow = /* @__PURE__ */ forwardRef9(({ classNames, ...props }, forwardedRef) => {
846
868
  const { tx } = useThemeContext();
847
869
  return /* @__PURE__ */ React15.createElement(ContextMenuPrimitive.Arrow, {
848
870
  ...props,
@@ -852,7 +874,7 @@ var ContextMenuArrow = /* @__PURE__ */ forwardRef14(({ classNames, ...props }, f
852
874
  });
853
875
  var ContextMenuGroup = ContextMenuPrimitive.Group;
854
876
  var ContextMenuItemIndicator = ContextMenuPrimitive.ItemIndicator;
855
- var ContextMenuItem = /* @__PURE__ */ forwardRef14(({ classNames, ...props }, forwardedRef) => {
877
+ var ContextMenuItem = /* @__PURE__ */ forwardRef9(({ classNames, ...props }, forwardedRef) => {
856
878
  const { tx } = useThemeContext();
857
879
  return /* @__PURE__ */ React15.createElement(ContextMenuPrimitive.Item, {
858
880
  ...props,
@@ -860,7 +882,7 @@ var ContextMenuItem = /* @__PURE__ */ forwardRef14(({ classNames, ...props }, fo
860
882
  ref: forwardedRef
861
883
  });
862
884
  });
863
- var ContextMenuCheckboxItem = /* @__PURE__ */ forwardRef14(({ classNames, ...props }, forwardedRef) => {
885
+ var ContextMenuCheckboxItem = /* @__PURE__ */ forwardRef9(({ classNames, ...props }, forwardedRef) => {
864
886
  const { tx } = useThemeContext();
865
887
  return /* @__PURE__ */ React15.createElement(ContextMenuPrimitive.CheckboxItem, {
866
888
  ...props,
@@ -868,7 +890,7 @@ var ContextMenuCheckboxItem = /* @__PURE__ */ forwardRef14(({ classNames, ...pro
868
890
  ref: forwardedRef
869
891
  });
870
892
  });
871
- var ContextMenuSeparator = /* @__PURE__ */ forwardRef14(({ classNames, ...props }, forwardedRef) => {
893
+ var ContextMenuSeparator = /* @__PURE__ */ forwardRef9(({ classNames, ...props }, forwardedRef) => {
872
894
  const { tx } = useThemeContext();
873
895
  return /* @__PURE__ */ React15.createElement(ContextMenuPrimitive.Separator, {
874
896
  ...props,
@@ -876,7 +898,7 @@ var ContextMenuSeparator = /* @__PURE__ */ forwardRef14(({ classNames, ...props
876
898
  ref: forwardedRef
877
899
  });
878
900
  });
879
- var ContextMenuGroupLabel = /* @__PURE__ */ forwardRef14(({ classNames, ...props }, forwardedRef) => {
901
+ var ContextMenuGroupLabel = /* @__PURE__ */ forwardRef9(({ classNames, ...props }, forwardedRef) => {
880
902
  const { tx } = useThemeContext();
881
903
  return /* @__PURE__ */ React15.createElement(ContextMenuPrimitive.Label, {
882
904
  ...props,
@@ -906,18 +928,17 @@ import { createContextScope } from "@radix-ui/react-context";
906
928
  import { useId as useId2 } from "@radix-ui/react-id";
907
929
  import * as MenuPrimitive from "@radix-ui/react-menu";
908
930
  import { createMenuScope } from "@radix-ui/react-menu";
909
- import { Primitive as Primitive9 } from "@radix-ui/react-primitive";
910
- import { Slot as Slot9 } from "@radix-ui/react-slot";
931
+ import { Primitive as Primitive10 } from "@radix-ui/react-primitive";
932
+ import { Slot as Slot10 } from "@radix-ui/react-slot";
911
933
  import { useControllableState } from "@radix-ui/react-use-controllable-state";
912
- import React16, { forwardRef as forwardRef15, useCallback as useCallback4, useEffect as useEffect2, useMemo as useMemo3, useRef as useRef2 } from "react";
934
+ import React16, { forwardRef as forwardRef10, useCallback as useCallback4, useEffect as useEffect2, useMemo as useMemo3, useRef as useRef2 } from "react";
913
935
  var DROPDOWN_MENU_NAME = "DropdownMenu";
914
936
  var [createDropdownMenuContext, createDropdownMenuScope] = createContextScope(DROPDOWN_MENU_NAME, [
915
937
  createMenuScope
916
938
  ]);
917
939
  var useMenuScope = createMenuScope();
918
940
  var [DropdownMenuProvider, useDropdownMenuContext] = createDropdownMenuContext(DROPDOWN_MENU_NAME);
919
- var DropdownMenuRoot = (props) => {
920
- const { __scopeDropdownMenu, children, dir, open: openProp, defaultOpen, onOpenChange, modal = true } = props;
941
+ var DropdownMenuRoot = ({ __scopeDropdownMenu, children, dir, modal = true, open: openProp, defaultOpen, onOpenChange }) => {
921
942
  const menuScope = useMenuScope(__scopeDropdownMenu);
922
943
  const triggerRef = useRef2(null);
923
944
  const [open = false, setOpen] = useControllableState({
@@ -938,22 +959,22 @@ var DropdownMenuRoot = (props) => {
938
959
  modal
939
960
  }, /* @__PURE__ */ React16.createElement(MenuPrimitive.Root, {
940
961
  ...menuScope,
941
- open,
942
- onOpenChange: setOpen,
943
962
  dir,
944
- modal
963
+ modal,
964
+ open,
965
+ onOpenChange: setOpen
945
966
  }, children));
946
967
  };
947
968
  DropdownMenuRoot.displayName = DROPDOWN_MENU_NAME;
948
969
  var TRIGGER_NAME = "DropdownMenuTrigger";
949
- var DropdownMenuTrigger = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
970
+ var DropdownMenuTrigger = /* @__PURE__ */ forwardRef10((props, forwardedRef) => {
950
971
  const { __scopeDropdownMenu, disabled = false, ...triggerProps } = props;
951
972
  const context = useDropdownMenuContext(TRIGGER_NAME, __scopeDropdownMenu);
952
973
  const menuScope = useMenuScope(__scopeDropdownMenu);
953
974
  return /* @__PURE__ */ React16.createElement(MenuPrimitive.Anchor, {
954
975
  asChild: true,
955
976
  ...menuScope
956
- }, /* @__PURE__ */ React16.createElement(Primitive9.button, {
977
+ }, /* @__PURE__ */ React16.createElement(Primitive10.button, {
957
978
  type: "button",
958
979
  id: context.triggerId,
959
980
  "aria-haspopup": "menu",
@@ -1023,9 +1044,9 @@ var DropdownMenuPortal = (props) => {
1023
1044
  });
1024
1045
  };
1025
1046
  DropdownMenuPortal.displayName = PORTAL_NAME;
1026
- var DropdownMenuViewport = /* @__PURE__ */ forwardRef15(({ classNames, asChild, children, ...props }, forwardedRef) => {
1047
+ var DropdownMenuViewport = /* @__PURE__ */ forwardRef10(({ classNames, asChild, children, ...props }, forwardedRef) => {
1027
1048
  const { tx } = useThemeContext();
1028
- const Comp = asChild ? Slot9 : Primitive9.div;
1049
+ const Comp = asChild ? Slot10 : Primitive10.div;
1029
1050
  return /* @__PURE__ */ React16.createElement(Comp, {
1030
1051
  ...props,
1031
1052
  className: tx("menu.viewport", {}, classNames),
@@ -1033,7 +1054,7 @@ var DropdownMenuViewport = /* @__PURE__ */ forwardRef15(({ classNames, asChild,
1033
1054
  }, children);
1034
1055
  });
1035
1056
  var CONTENT_NAME = "DropdownMenuContent";
1036
- var DropdownMenuContent = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
1057
+ var DropdownMenuContent = /* @__PURE__ */ forwardRef10((props, forwardedRef) => {
1037
1058
  const { __scopeDropdownMenu, classNames, collisionPadding = 8, collisionBoundary, ...contentProps } = props;
1038
1059
  const { tx } = useThemeContext();
1039
1060
  const context = useDropdownMenuContext(CONTENT_NAME, __scopeDropdownMenu);
@@ -1099,7 +1120,7 @@ var DropdownMenuContent = /* @__PURE__ */ forwardRef15((props, forwardedRef) =>
1099
1120
  });
1100
1121
  DropdownMenuContent.displayName = CONTENT_NAME;
1101
1122
  var GROUP_NAME = "DropdownMenuGroup";
1102
- var DropdownMenuGroup = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
1123
+ var DropdownMenuGroup = /* @__PURE__ */ forwardRef10((props, forwardedRef) => {
1103
1124
  const { __scopeDropdownMenu, ...groupProps } = props;
1104
1125
  const menuScope = useMenuScope(__scopeDropdownMenu);
1105
1126
  return /* @__PURE__ */ React16.createElement(MenuPrimitive.Group, {
@@ -1110,7 +1131,7 @@ var DropdownMenuGroup = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
1110
1131
  });
1111
1132
  DropdownMenuGroup.displayName = GROUP_NAME;
1112
1133
  var LABEL_NAME = "DropdownMenuLabel";
1113
- var DropdownMenuGroupLabel = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
1134
+ var DropdownMenuGroupLabel = /* @__PURE__ */ forwardRef10((props, forwardedRef) => {
1114
1135
  const { __scopeDropdownMenu, classNames, ...labelProps } = props;
1115
1136
  const menuScope = useMenuScope(__scopeDropdownMenu);
1116
1137
  const { tx } = useThemeContext();
@@ -1123,7 +1144,7 @@ var DropdownMenuGroupLabel = /* @__PURE__ */ forwardRef15((props, forwardedRef)
1123
1144
  });
1124
1145
  DropdownMenuGroupLabel.displayName = LABEL_NAME;
1125
1146
  var ITEM_NAME = "DropdownMenuItem";
1126
- var DropdownMenuItem = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
1147
+ var DropdownMenuItem = /* @__PURE__ */ forwardRef10((props, forwardedRef) => {
1127
1148
  const { __scopeDropdownMenu, classNames, ...itemProps } = props;
1128
1149
  const menuScope = useMenuScope(__scopeDropdownMenu);
1129
1150
  const { tx } = useThemeContext();
@@ -1136,7 +1157,7 @@ var DropdownMenuItem = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
1136
1157
  });
1137
1158
  DropdownMenuItem.displayName = ITEM_NAME;
1138
1159
  var CHECKBOX_ITEM_NAME = "DropdownMenuCheckboxItem";
1139
- var DropdownMenuCheckboxItem = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
1160
+ var DropdownMenuCheckboxItem = /* @__PURE__ */ forwardRef10((props, forwardedRef) => {
1140
1161
  const { __scopeDropdownMenu, classNames, ...checkboxItemProps } = props;
1141
1162
  const menuScope = useMenuScope(__scopeDropdownMenu);
1142
1163
  const { tx } = useThemeContext();
@@ -1149,7 +1170,7 @@ var DropdownMenuCheckboxItem = /* @__PURE__ */ forwardRef15((props, forwardedRef
1149
1170
  });
1150
1171
  DropdownMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;
1151
1172
  var RADIO_GROUP_NAME = "DropdownMenuRadioGroup";
1152
- var DropdownMenuRadioGroup = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
1173
+ var DropdownMenuRadioGroup = /* @__PURE__ */ forwardRef10((props, forwardedRef) => {
1153
1174
  const { __scopeDropdownMenu, ...radioGroupProps } = props;
1154
1175
  const menuScope = useMenuScope(__scopeDropdownMenu);
1155
1176
  return /* @__PURE__ */ React16.createElement(MenuPrimitive.RadioGroup, {
@@ -1160,7 +1181,7 @@ var DropdownMenuRadioGroup = /* @__PURE__ */ forwardRef15((props, forwardedRef)
1160
1181
  });
1161
1182
  DropdownMenuRadioGroup.displayName = RADIO_GROUP_NAME;
1162
1183
  var RADIO_ITEM_NAME = "DropdownMenuRadioItem";
1163
- var DropdownMenuRadioItem = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
1184
+ var DropdownMenuRadioItem = /* @__PURE__ */ forwardRef10((props, forwardedRef) => {
1164
1185
  const { __scopeDropdownMenu, classNames, ...itemProps } = props;
1165
1186
  const menuScope = useMenuScope(__scopeDropdownMenu);
1166
1187
  const { tx } = useThemeContext();
@@ -1173,7 +1194,7 @@ var DropdownMenuRadioItem = /* @__PURE__ */ forwardRef15((props, forwardedRef) =
1173
1194
  });
1174
1195
  DropdownMenuRadioItem.displayName = RADIO_ITEM_NAME;
1175
1196
  var INDICATOR_NAME = "DropdownMenuItemIndicator";
1176
- var DropdownMenuItemIndicator = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
1197
+ var DropdownMenuItemIndicator = /* @__PURE__ */ forwardRef10((props, forwardedRef) => {
1177
1198
  const { __scopeDropdownMenu, ...itemIndicatorProps } = props;
1178
1199
  const menuScope = useMenuScope(__scopeDropdownMenu);
1179
1200
  return /* @__PURE__ */ React16.createElement(MenuPrimitive.ItemIndicator, {
@@ -1184,7 +1205,7 @@ var DropdownMenuItemIndicator = /* @__PURE__ */ forwardRef15((props, forwardedRe
1184
1205
  });
1185
1206
  DropdownMenuItemIndicator.displayName = INDICATOR_NAME;
1186
1207
  var SEPARATOR_NAME = "DropdownMenuSeparator";
1187
- var DropdownMenuSeparator = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
1208
+ var DropdownMenuSeparator = /* @__PURE__ */ forwardRef10((props, forwardedRef) => {
1188
1209
  const { __scopeDropdownMenu, classNames, ...separatorProps } = props;
1189
1210
  const menuScope = useMenuScope(__scopeDropdownMenu);
1190
1211
  const { tx } = useThemeContext();
@@ -1197,7 +1218,7 @@ var DropdownMenuSeparator = /* @__PURE__ */ forwardRef15((props, forwardedRef) =
1197
1218
  });
1198
1219
  DropdownMenuSeparator.displayName = SEPARATOR_NAME;
1199
1220
  var ARROW_NAME = "DropdownMenuArrow";
1200
- var DropdownMenuArrow = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
1221
+ var DropdownMenuArrow = /* @__PURE__ */ forwardRef10((props, forwardedRef) => {
1201
1222
  const { __scopeDropdownMenu, classNames, ...arrowProps } = props;
1202
1223
  const menuScope = useMenuScope(__scopeDropdownMenu);
1203
1224
  const { tx } = useThemeContext();
@@ -1224,7 +1245,7 @@ var DropdownMenuSub = (props) => {
1224
1245
  }, children);
1225
1246
  };
1226
1247
  var SUB_TRIGGER_NAME = "DropdownMenuSubTrigger";
1227
- var DropdownMenuSubTrigger = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
1248
+ var DropdownMenuSubTrigger = /* @__PURE__ */ forwardRef10((props, forwardedRef) => {
1228
1249
  const { __scopeDropdownMenu, ...subTriggerProps } = props;
1229
1250
  const menuScope = useMenuScope(__scopeDropdownMenu);
1230
1251
  return /* @__PURE__ */ React16.createElement(MenuPrimitive.SubTrigger, {
@@ -1235,7 +1256,7 @@ var DropdownMenuSubTrigger = /* @__PURE__ */ forwardRef15((props, forwardedRef)
1235
1256
  });
1236
1257
  DropdownMenuSubTrigger.displayName = SUB_TRIGGER_NAME;
1237
1258
  var SUB_CONTENT_NAME = "DropdownMenuSubContent";
1238
- var DropdownMenuSubContent = /* @__PURE__ */ forwardRef15((props, forwardedRef) => {
1259
+ var DropdownMenuSubContent = /* @__PURE__ */ forwardRef10((props, forwardedRef) => {
1239
1260
  const { __scopeDropdownMenu, ...subContentProps } = props;
1240
1261
  const menuScope = useMenuScope(__scopeDropdownMenu);
1241
1262
  return /* @__PURE__ */ React16.createElement(MenuPrimitive.SubContent, {
@@ -1279,13 +1300,13 @@ var DropdownMenu = {
1279
1300
  var useDropdownMenuMenuScope = useMenuScope;
1280
1301
 
1281
1302
  // src/components/Separator/Separator.tsx
1282
- import { Separator as SeparatorPrimitive } from "@radix-ui/react-separator";
1283
- import React17, { forwardRef as forwardRef16 } from "react";
1284
- var Separator3 = /* @__PURE__ */ forwardRef16(({ classNames, orientation = "horizontal", subdued, ...props }, forwardedRef) => {
1303
+ import * as SeparatorPrimitive from "@radix-ui/react-separator";
1304
+ import React17, { forwardRef as forwardRef11 } from "react";
1305
+ var Separator3 = /* @__PURE__ */ forwardRef11(({ classNames, orientation = "horizontal", subdued, ...props }, forwardedRef) => {
1285
1306
  const { tx } = useThemeContext();
1286
- return /* @__PURE__ */ React17.createElement(SeparatorPrimitive, {
1287
- orientation,
1307
+ return /* @__PURE__ */ React17.createElement(SeparatorPrimitive.Root, {
1288
1308
  ...props,
1309
+ orientation,
1289
1310
  className: tx("separator.root", {
1290
1311
  orientation,
1291
1312
  subdued
@@ -1295,18 +1316,14 @@ var Separator3 = /* @__PURE__ */ forwardRef16(({ classNames, orientation = "hori
1295
1316
  });
1296
1317
 
1297
1318
  // src/components/Toolbar/Toolbar.tsx
1298
- var ToolbarRoot = /* @__PURE__ */ forwardRef17(({ children, density, disabled, layoutManaged, textBlockWidth: textBlockWidthProp, orientation, ...props }, forwardedRef) => {
1299
- const { className, dir: _, ...rest } = composableProps6(props);
1319
+ var ToolbarRoot = composable2(({ children, density, disabled, layoutManaged, orientation, ...props }, forwardedRef) => {
1320
+ const { className, role, ...rest } = composableProps6(props);
1300
1321
  const { tx } = useThemeContext();
1301
- const InnerRoot = textBlockWidthProp ? "div" : Fragment;
1302
- const innerRootProps = textBlockWidthProp ? {
1303
- role: "none",
1304
- className: tx("toolbar.inner", {
1305
- layoutManaged
1306
- }, className)
1307
- } : {};
1308
1322
  return /* @__PURE__ */ React18.createElement(ToolbarPrimitive.Root, {
1309
1323
  ...rest,
1324
+ ...role !== "none" && {
1325
+ role
1326
+ },
1310
1327
  orientation,
1311
1328
  "data-arrow-keys": orientation === "vertical" ? "up down" : "left right",
1312
1329
  className: tx("toolbar.root", {
@@ -1315,11 +1332,11 @@ var ToolbarRoot = /* @__PURE__ */ forwardRef17(({ children, density, disabled, l
1315
1332
  layoutManaged
1316
1333
  }, className),
1317
1334
  ref: forwardedRef
1318
- }, /* @__PURE__ */ React18.createElement(InnerRoot, innerRootProps, children));
1335
+ }, children);
1319
1336
  });
1320
- var ToolbarText = /* @__PURE__ */ forwardRef17(({ children, asChild, ...props }, forwardedRef) => {
1337
+ var ToolbarText = slottable5(({ children, asChild, ...props }, forwardedRef) => {
1321
1338
  const { className, ...rest } = composableProps6(props);
1322
- const Comp = asChild ? Slot10 : Primitive10.div;
1339
+ const Comp = asChild ? Slot11 : Primitive11.div;
1323
1340
  const { tx } = useThemeContext();
1324
1341
  return /* @__PURE__ */ React18.createElement(Comp, {
1325
1342
  ...rest,
@@ -1327,7 +1344,7 @@ var ToolbarText = /* @__PURE__ */ forwardRef17(({ children, asChild, ...props },
1327
1344
  ref: forwardedRef
1328
1345
  }, children);
1329
1346
  });
1330
- var ToolbarButton = /* @__PURE__ */ forwardRef17((props, forwardedRef) => {
1347
+ var ToolbarButton = /* @__PURE__ */ forwardRef12((props, forwardedRef) => {
1331
1348
  return /* @__PURE__ */ React18.createElement(ToolbarPrimitive.Button, {
1332
1349
  asChild: true
1333
1350
  }, /* @__PURE__ */ React18.createElement(Button, {
@@ -1335,7 +1352,7 @@ var ToolbarButton = /* @__PURE__ */ forwardRef17((props, forwardedRef) => {
1335
1352
  ref: forwardedRef
1336
1353
  }));
1337
1354
  });
1338
- var ToolbarIconButton = /* @__PURE__ */ forwardRef17((props, forwardedRef) => {
1355
+ var ToolbarIconButton = /* @__PURE__ */ forwardRef12((props, forwardedRef) => {
1339
1356
  return /* @__PURE__ */ React18.createElement(ToolbarPrimitive.Button, {
1340
1357
  asChild: true
1341
1358
  }, /* @__PURE__ */ React18.createElement(IconButton, {
@@ -1344,7 +1361,7 @@ var ToolbarIconButton = /* @__PURE__ */ forwardRef17((props, forwardedRef) => {
1344
1361
  ref: forwardedRef
1345
1362
  }));
1346
1363
  });
1347
- var ToolbarToggle = /* @__PURE__ */ forwardRef17((props, forwardedRef) => {
1364
+ var ToolbarToggle = /* @__PURE__ */ forwardRef12((props, forwardedRef) => {
1348
1365
  return /* @__PURE__ */ React18.createElement(ToolbarPrimitive.Button, {
1349
1366
  asChild: true
1350
1367
  }, /* @__PURE__ */ React18.createElement(Toggle, {
@@ -1352,7 +1369,7 @@ var ToolbarToggle = /* @__PURE__ */ forwardRef17((props, forwardedRef) => {
1352
1369
  ref: forwardedRef
1353
1370
  }));
1354
1371
  });
1355
- var ToolbarLink = /* @__PURE__ */ forwardRef17((props, forwardedRef) => {
1372
+ var ToolbarLink = /* @__PURE__ */ forwardRef12((props, forwardedRef) => {
1356
1373
  return /* @__PURE__ */ React18.createElement(ToolbarPrimitive.Link, {
1357
1374
  asChild: true
1358
1375
  }, /* @__PURE__ */ React18.createElement(Link, {
@@ -1360,7 +1377,7 @@ var ToolbarLink = /* @__PURE__ */ forwardRef17((props, forwardedRef) => {
1360
1377
  ref: forwardedRef
1361
1378
  }));
1362
1379
  });
1363
- var ToolbarToggleGroup2 = /* @__PURE__ */ forwardRef17(({ classNames, children, elevation, ...props }, forwardedRef) => {
1380
+ var ToolbarToggleGroup2 = /* @__PURE__ */ forwardRef12(({ classNames, children, elevation, ...props }, forwardedRef) => {
1364
1381
  return /* @__PURE__ */ React18.createElement(ToolbarPrimitive.ToolbarToggleGroup, {
1365
1382
  ...props,
1366
1383
  asChild: true
@@ -1371,7 +1388,7 @@ var ToolbarToggleGroup2 = /* @__PURE__ */ forwardRef17(({ classNames, children,
1371
1388
  ref: forwardedRef
1372
1389
  }));
1373
1390
  });
1374
- var ToolbarToggleGroupItem = /* @__PURE__ */ forwardRef17(({ variant, density, elevation, classNames, children, ...props }, forwardedRef) => {
1391
+ var ToolbarToggleGroupItem = /* @__PURE__ */ forwardRef12(({ variant, density, elevation, classNames, children, ...props }, forwardedRef) => {
1375
1392
  return /* @__PURE__ */ React18.createElement(ToolbarPrimitive.ToolbarToggleItem, {
1376
1393
  ...props,
1377
1394
  asChild: true
@@ -1384,7 +1401,7 @@ var ToolbarToggleGroupItem = /* @__PURE__ */ forwardRef17(({ variant, density, e
1384
1401
  ref: forwardedRef
1385
1402
  }));
1386
1403
  });
1387
- var ToolbarToggleGroupIconItem = /* @__PURE__ */ forwardRef17(({ variant, density, elevation, classNames, icon, label, iconOnly, ...props }, forwardedRef) => {
1404
+ var ToolbarToggleGroupIconItem = /* @__PURE__ */ forwardRef12(({ variant, density, elevation, classNames, icon, label, iconOnly, ...props }, forwardedRef) => {
1388
1405
  return /* @__PURE__ */ React18.createElement(ToolbarPrimitive.ToolbarToggleItem, {
1389
1406
  ...props,
1390
1407
  asChild: true
@@ -1399,10 +1416,11 @@ var ToolbarToggleGroupIconItem = /* @__PURE__ */ forwardRef17(({ variant, densit
1399
1416
  ref: forwardedRef
1400
1417
  }));
1401
1418
  });
1402
- var ToolbarSeparator = /* @__PURE__ */ forwardRef17(({ variant = "gap", ...props }, forwardedRef) => {
1419
+ var ToolbarSeparator = /* @__PURE__ */ forwardRef12(({ variant = "gap", ...props }, forwardedRef) => {
1403
1420
  return variant === "line" ? /* @__PURE__ */ React18.createElement(ToolbarPrimitive.Separator, {
1404
1421
  asChild: true
1405
1422
  }, /* @__PURE__ */ React18.createElement(Separator3, {
1423
+ orientation: "vertical",
1406
1424
  ...props,
1407
1425
  ref: forwardedRef
1408
1426
  })) : /* @__PURE__ */ React18.createElement(ToolbarPrimitive.Separator, {
@@ -1410,30 +1428,29 @@ var ToolbarSeparator = /* @__PURE__ */ forwardRef17(({ variant = "gap", ...props
1410
1428
  ref: forwardedRef
1411
1429
  });
1412
1430
  });
1413
- var ToolbarDragHandle = /* @__PURE__ */ forwardRef17(({ testId = "drag-handle", label }, forwardedRef) => {
1431
+ var ToolbarDragHandle = /* @__PURE__ */ forwardRef12(({ testId = "drag-handle", label }, forwardedRef) => {
1414
1432
  const { t } = useTranslation2(translationKey);
1415
1433
  return /* @__PURE__ */ React18.createElement(ToolbarIconButton, {
1416
1434
  "data-testid": testId,
1435
+ tabIndex: -1,
1417
1436
  noTooltip: true,
1418
1437
  iconOnly: true,
1419
1438
  icon: "ph--dots-six-vertical--regular",
1420
1439
  variant: "ghost",
1421
- label: label ?? t("toolbar drag handle label"),
1422
- classNames: "cursor-pointer",
1423
- size: 5,
1440
+ label: label ?? t("toolbar-drag-handle.label"),
1441
+ classNames: "dx-focus-ring-none cursor-pointer",
1424
1442
  disabled: !forwardedRef,
1425
1443
  ref: forwardedRef
1426
1444
  });
1427
1445
  });
1428
- var ToolbarCloseIconButton = /* @__PURE__ */ forwardRef17(({ onClick, label }, forwardedRef) => {
1446
+ var ToolbarCloseIconButton = /* @__PURE__ */ forwardRef12(({ onClick, label }, forwardedRef) => {
1429
1447
  const { t } = useTranslation2(translationKey);
1430
1448
  return /* @__PURE__ */ React18.createElement(ToolbarIconButton, {
1431
1449
  iconOnly: true,
1432
1450
  icon: "ph--x--regular",
1433
1451
  variant: "ghost",
1434
- label: label ?? t("toolbar close label"),
1452
+ label: label ?? t("toolbar-close.label"),
1435
1453
  classNames: "cursor-pointer",
1436
- size: 5,
1437
1454
  onClick,
1438
1455
  ref: forwardedRef
1439
1456
  });
@@ -1447,13 +1464,13 @@ var ToolbarMenu = ({ context, items }) => {
1447
1464
  iconOnly: true,
1448
1465
  variant: "ghost",
1449
1466
  icon: "ph--dots-three-vertical--regular",
1450
- label: t("toolbar menu label")
1467
+ label: t("toolbar-menu.label")
1451
1468
  })), (items?.length ?? 0) > 0 && /* @__PURE__ */ React18.createElement(DropdownMenu.Portal, null, /* @__PURE__ */ React18.createElement(DropdownMenu.Content, null, /* @__PURE__ */ React18.createElement(DropdownMenu.Viewport, null, items?.map(({ label, onClick: onSelect }, index) => /* @__PURE__ */ React18.createElement(DropdownMenu.Item, {
1452
1469
  key: index,
1453
1470
  onSelect: () => onSelect(context)
1454
1471
  }, label))), /* @__PURE__ */ React18.createElement(DropdownMenu.Arrow, null))));
1455
1472
  };
1456
- var Toolbar2 = {
1473
+ var Toolbar = {
1457
1474
  Root: ToolbarRoot,
1458
1475
  Text: ToolbarText,
1459
1476
  Button: ToolbarButton,
@@ -1471,9 +1488,10 @@ var Toolbar2 = {
1471
1488
 
1472
1489
  // src/components/Card/Card.tsx
1473
1490
  var CardContext = /* @__PURE__ */ createContext3({});
1474
- var CardRoot = /* @__PURE__ */ forwardRef18(({ children, id, asChild, role, border = true, fullWidth, ...props }, forwardedRef) => {
1491
+ var CARD_ROOT_NAME = "Card.Root";
1492
+ var CardRoot = slottable6(({ children, id, asChild, role, border = true, fullWidth, density, ...props }, forwardedRef) => {
1475
1493
  const { className, ...rest } = composableProps7(props);
1476
- const Comp = asChild ? Slot11 : Primitive11.div;
1494
+ const Comp = asChild ? Slot12 : Primitive12.div;
1477
1495
  const { tx } = useThemeContext();
1478
1496
  return /* @__PURE__ */ React19.createElement(Comp, {
1479
1497
  ...rest,
@@ -1487,68 +1505,124 @@ var CardRoot = /* @__PURE__ */ forwardRef18(({ children, id, asChild, role, bord
1487
1505
  }, className),
1488
1506
  ref: forwardedRef
1489
1507
  }, /* @__PURE__ */ React19.createElement(Column.Root, {
1490
- gutter: "rail"
1508
+ gutter: density === "coarse" ? "lg" : "md"
1491
1509
  }, children));
1492
1510
  });
1493
- var CardToolbar = /* @__PURE__ */ forwardRef18(({ children, classNames, density = "fine", ...props }, forwardedRef) => {
1511
+ CardRoot.displayName = CARD_ROOT_NAME;
1512
+ var CARD_TOOLBAR_NAME = "Card.Toolbar";
1513
+ var CardToolbar = composable3(({ children, classNames, ...props }, forwardedRef) => {
1494
1514
  const { tx } = useThemeContext();
1495
- return /* @__PURE__ */ React19.createElement(Toolbar2.Root, {
1515
+ return /* @__PURE__ */ React19.createElement(Toolbar.Root, {
1496
1516
  ...props,
1517
+ style: iconSize(5),
1497
1518
  classNames: [
1498
- tx("card.toolbar", {
1499
- coarse: density !== "fine"
1500
- }),
1519
+ tx("card.toolbar", {}),
1501
1520
  classNames
1502
1521
  ],
1503
1522
  ref: forwardedRef
1504
1523
  }, children);
1505
1524
  });
1506
- var CardMenu = ({ context, items }) => {
1525
+ CardToolbar.displayName = CARD_TOOLBAR_NAME;
1526
+ var CARD_DRAG_HANDLE_NAME = "Card.DragHandle";
1527
+ var CardDragHandle = /* @__PURE__ */ forwardRef13((props, forwardedRef) => {
1528
+ return /* @__PURE__ */ React19.createElement(CardIconBlock, {
1529
+ padding: true
1530
+ }, /* @__PURE__ */ React19.createElement(Toolbar.DragHandle, {
1531
+ ...props,
1532
+ ref: forwardedRef
1533
+ }));
1534
+ });
1535
+ CardDragHandle.displayName = CARD_DRAG_HANDLE_NAME;
1536
+ var CARD_CLOSE_ICON_BUTTON_NAME = "Card.CloseIconButton";
1537
+ var CloseIconButton = /* @__PURE__ */ forwardRef13((props, forwardedRef) => {
1538
+ return /* @__PURE__ */ React19.createElement(CardIconBlock, {
1539
+ padding: true
1540
+ }, /* @__PURE__ */ React19.createElement(Toolbar.CloseIconButton, {
1541
+ ...props,
1542
+ ref: forwardedRef
1543
+ }));
1544
+ });
1545
+ CloseIconButton.displayName = CARD_CLOSE_ICON_BUTTON_NAME;
1546
+ var CARD_MENU_NAME = "Card.Menu";
1547
+ var CardMenu = ({ context, items, ...props }) => {
1507
1548
  const { menuItems } = useContext3(CardContext) ?? {};
1508
1549
  const combinedItems = [
1509
1550
  ...items ?? [],
1510
1551
  ...menuItems ?? []
1511
1552
  ];
1512
- return /* @__PURE__ */ React19.createElement(Toolbar2.Menu, {
1553
+ return /* @__PURE__ */ React19.createElement(CardIconBlock, {
1554
+ padding: true
1555
+ }, /* @__PURE__ */ React19.createElement(Toolbar.Menu, {
1556
+ ...props,
1513
1557
  context,
1514
1558
  items: combinedItems
1515
- });
1559
+ }));
1516
1560
  };
1517
- var CardTitle = /* @__PURE__ */ forwardRef18(({ children, asChild, role, ...props }, forwardedRef) => {
1518
- const { className, ...rest } = composableProps7(props);
1519
- const Comp = asChild ? Slot11 : Primitive11.div;
1561
+ CardMenu.displayName = CARD_MENU_NAME;
1562
+ var CARD_ICON_NAME = "Card.Icon";
1563
+ var CardIcon = (props) => {
1564
+ return /* @__PURE__ */ React19.createElement(CardIconBlock, null, /* @__PURE__ */ React19.createElement(Icon, props));
1565
+ };
1566
+ CardIcon.displayName = CARD_ICON_NAME;
1567
+ var CARD_ICON_BLOCK_NAME = "Card.IconBlock";
1568
+ var CardIconBlock = /* @__PURE__ */ forwardRef13(({ classNames, children, padding, ...props }, forwardedRef) => {
1520
1569
  const { tx } = useThemeContext();
1570
+ return /* @__PURE__ */ React19.createElement("div", {
1571
+ ...props,
1572
+ role: "none",
1573
+ className: tx("card.icon-block", {
1574
+ padding
1575
+ }, classNames),
1576
+ ref: forwardedRef
1577
+ }, children);
1578
+ });
1579
+ CardIconBlock.displayName = CARD_ICON_BLOCK_NAME;
1580
+ var CARD_TITLE_NAME = "Card.Title";
1581
+ var CardTitle = slottable6(({ children, asChild, ...props }, forwardedRef) => {
1582
+ const { tx } = useThemeContext();
1583
+ const { className, ...rest } = composableProps7(props, {
1584
+ role: "heading"
1585
+ });
1586
+ const Comp = asChild ? Slot12 : Primitive12.div;
1521
1587
  return /* @__PURE__ */ React19.createElement(Comp, {
1522
1588
  ...rest,
1523
- role: role ?? "heading",
1524
1589
  className: tx("card.title", {}, className),
1525
1590
  ref: forwardedRef
1526
1591
  }, children);
1527
1592
  });
1528
- var CardContent = /* @__PURE__ */ forwardRef18(({ children, role, ...props }, forwardedRef) => {
1593
+ CardTitle.displayName = CARD_TITLE_NAME;
1594
+ var CARD_CONTENT_NAME = "Card.Content";
1595
+ var CardContent = slottable6(({ children, asChild, ...props }, forwardedRef) => {
1596
+ const { className, ...rest } = composableProps7(props);
1597
+ const Comp = asChild ? Slot12 : Primitive12.div;
1529
1598
  const { tx } = useThemeContext();
1530
- return /* @__PURE__ */ React19.createElement("div", {
1531
- ...props,
1532
- role: role ?? "none",
1533
- className: tx("card.content", {}),
1599
+ return /* @__PURE__ */ React19.createElement(Comp, {
1600
+ ...rest,
1601
+ className: tx("card.content", {}, className),
1534
1602
  ref: forwardedRef
1535
1603
  }, children);
1536
1604
  });
1537
- var CardRow = /* @__PURE__ */ forwardRef18(({ children, role, icon, ...props }, forwardedRef) => {
1605
+ CardContent.displayName = CARD_CONTENT_NAME;
1606
+ var CARD_ROW_NAME = "Card.Row";
1607
+ var CardRow = slottable6(({ children, asChild, icon, ...props }, forwardedRef) => {
1538
1608
  const { className, ...rest } = composableProps7(props);
1539
- return /* @__PURE__ */ React19.createElement(Column.Row, {
1609
+ const Comp = asChild ? Slot12 : Primitive12.div;
1610
+ const { tx } = useThemeContext();
1611
+ return /* @__PURE__ */ React19.createElement(Comp, {
1540
1612
  ...rest,
1541
- role: role ?? "none",
1542
- classNames: className,
1613
+ className: tx("card.row", {}, className),
1543
1614
  ref: forwardedRef
1544
1615
  }, icon && /* @__PURE__ */ React19.createElement(CardIcon, {
1545
1616
  classNames: "text-subdued",
1546
- icon
1547
- }) || /* @__PURE__ */ React19.createElement("div", null), children, /* @__PURE__ */ React19.createElement("div", null));
1617
+ icon,
1618
+ size: 4
1619
+ }) || /* @__PURE__ */ React19.createElement("div", null), children);
1548
1620
  });
1549
- var CardSection = /* @__PURE__ */ forwardRef18(({ children, asChild, role, ...props }, forwardedRef) => {
1621
+ CardRow.displayName = CARD_ROW_NAME;
1622
+ var CARD_SECTION_NAME = "Card.Section";
1623
+ var CardSection = slottable6(({ children, asChild, role, ...props }, forwardedRef) => {
1550
1624
  const { className, ...rest } = composableProps7(props);
1551
- const Comp = asChild ? Slot11 : Primitive11.div;
1625
+ const Comp = asChild ? Slot12 : Primitive12.div;
1552
1626
  return /* @__PURE__ */ React19.createElement(Comp, {
1553
1627
  ...rest,
1554
1628
  role: role ?? "none",
@@ -1556,9 +1630,11 @@ var CardSection = /* @__PURE__ */ forwardRef18(({ children, asChild, role, ...pr
1556
1630
  ref: forwardedRef
1557
1631
  }, children);
1558
1632
  });
1559
- var CardHeading = /* @__PURE__ */ forwardRef18(({ children, asChild, role, variant = "default", ...props }, forwardedRef) => {
1633
+ CardSection.displayName = CARD_SECTION_NAME;
1634
+ var CARD_HEADING_NAME = "Card.Heading";
1635
+ var CardHeading = slottable6(({ children, asChild, role, variant = "default", ...props }, forwardedRef) => {
1560
1636
  const { className, ...rest } = composableProps7(props);
1561
- const Comp = asChild ? Slot11 : Primitive11.div;
1637
+ const Comp = asChild ? Slot12 : Primitive12.div;
1562
1638
  const { tx } = useThemeContext();
1563
1639
  return /* @__PURE__ */ React19.createElement(Comp, {
1564
1640
  ...rest,
@@ -1569,9 +1645,11 @@ var CardHeading = /* @__PURE__ */ forwardRef18(({ children, asChild, role, varia
1569
1645
  ref: forwardedRef
1570
1646
  }, children);
1571
1647
  });
1572
- var CardText = /* @__PURE__ */ forwardRef18(({ children, asChild, role, truncate, variant = "default", ...props }, forwardedRef) => {
1648
+ CardHeading.displayName = CARD_HEADING_NAME;
1649
+ var CARD_TEXT_NAME = "Card.Text";
1650
+ var CardText = slottable6(({ children, asChild, role, truncate, variant = "default", ...props }, forwardedRef) => {
1573
1651
  const { className, ...rest } = composableProps7(props);
1574
- const Comp = asChild ? Slot11 : Primitive11.div;
1652
+ const Comp = asChild ? Slot12 : Primitive12.div;
1575
1653
  const { tx } = useThemeContext();
1576
1654
  return /* @__PURE__ */ React19.createElement(Comp, {
1577
1655
  ...rest,
@@ -1587,13 +1665,34 @@ var CardText = /* @__PURE__ */ forwardRef18(({ children, asChild, role, truncate
1587
1665
  })
1588
1666
  }, children));
1589
1667
  });
1668
+ CardText.displayName = CARD_TEXT_NAME;
1669
+ var CARD_HTML_NAME = "Card.Html";
1670
+ var CardHtml = ({ html, variant = "default", ...props }) => {
1671
+ const { tx } = useThemeContext();
1672
+ const sanitized = useMemo4(() => DOMPurify.sanitize(html), [
1673
+ html
1674
+ ]);
1675
+ return /* @__PURE__ */ React19.createElement("div", {
1676
+ ...props,
1677
+ role: "none",
1678
+ className: tx("card.text", {
1679
+ variant
1680
+ }),
1681
+ // eslint-disable-next-line react/no-danger
1682
+ dangerouslySetInnerHTML: {
1683
+ __html: sanitized
1684
+ }
1685
+ });
1686
+ };
1687
+ CardHtml.displayName = CARD_HTML_NAME;
1688
+ var CARD_POSTER_NAME = "Card.Poster";
1590
1689
  var CardPoster = (props) => {
1591
1690
  const { tx } = useThemeContext();
1592
1691
  const aspect = props.aspect === "auto" ? "aspect-auto" : "aspect-video";
1593
1692
  if (props.image) {
1594
1693
  return /* @__PURE__ */ React19.createElement("div", {
1595
1694
  role: "none",
1596
- className: "col-span-full mb-1"
1695
+ className: "col-span-full"
1597
1696
  }, /* @__PURE__ */ React19.createElement(Image, {
1598
1697
  classNames: [
1599
1698
  tx("card.poster", {}),
@@ -1601,7 +1700,8 @@ var CardPoster = (props) => {
1601
1700
  props.classNames
1602
1701
  ],
1603
1702
  src: props.image,
1604
- alt: props.alt
1703
+ alt: props.alt,
1704
+ fit: props.fit
1605
1705
  }));
1606
1706
  }
1607
1707
  if (props.icon) {
@@ -1618,6 +1718,8 @@ var CardPoster = (props) => {
1618
1718
  }));
1619
1719
  }
1620
1720
  };
1721
+ CardPoster.displayName = CARD_POSTER_NAME;
1722
+ var CARD_ACTION_NAME = "Card.Action";
1621
1723
  var CardAction = ({ icon, actionIcon = "ph--arrow-right--regular", label, onClick }) => {
1622
1724
  const { tx } = useThemeContext();
1623
1725
  return /* @__PURE__ */ React19.createElement(Button, {
@@ -1626,13 +1728,17 @@ var CardAction = ({ icon, actionIcon = "ph--arrow-right--regular", label, onClic
1626
1728
  onClick
1627
1729
  }, icon ? /* @__PURE__ */ React19.createElement(CardIcon, {
1628
1730
  classNames: "text-subdued",
1629
- icon
1731
+ icon,
1732
+ size: 4
1630
1733
  }) : /* @__PURE__ */ React19.createElement("div", null), /* @__PURE__ */ React19.createElement("span", {
1631
1734
  className: tx("card.action-label", {}, !actionIcon ? "col-span-2" : void 0)
1632
1735
  }, label), actionIcon && /* @__PURE__ */ React19.createElement(CardIcon, {
1633
- icon: actionIcon
1736
+ icon: actionIcon,
1737
+ size: 4
1634
1738
  }));
1635
1739
  };
1740
+ CardAction.displayName = CARD_ACTION_NAME;
1741
+ var CARD_LINK_NAME = "Card.Link";
1636
1742
  var CardLink = ({ label, href }) => {
1637
1743
  const { tx } = useThemeContext();
1638
1744
  return /* @__PURE__ */ React19.createElement("a", {
@@ -1651,42 +1757,27 @@ var CardLink = ({ label, href }) => {
1651
1757
  icon: "ph--arrow-square-out--regular"
1652
1758
  }));
1653
1759
  };
1654
- var CardIcon = ({ toolbar, ...props }) => {
1655
- return /* @__PURE__ */ React19.createElement(CardIconBlock, null, /* @__PURE__ */ React19.createElement(Icon, {
1656
- ...props,
1657
- size: toolbar ? 5 : 4
1658
- }));
1659
- };
1660
- var CardIconBlock = ({ classNames, children, role, ...props }) => {
1661
- const { tx } = useThemeContext();
1662
- return /* @__PURE__ */ React19.createElement("div", {
1663
- ...props,
1664
- role: role ?? "none",
1665
- className: tx("card.icon-block", {}, classNames)
1666
- }, children);
1667
- };
1760
+ CardLink.displayName = CARD_LINK_NAME;
1668
1761
  var Card = {
1669
1762
  Root: CardRoot,
1670
1763
  // Toolbar
1671
1764
  Toolbar: CardToolbar,
1672
- ToolbarIconButton: Toolbar2.IconButton,
1673
- ToolbarSeparator: Toolbar2.Separator,
1674
- DragHandle: /* @__PURE__ */ forwardRef18((props, ref) => /* @__PURE__ */ React19.createElement(Toolbar2.DragHandle, {
1675
- testId: "card-drag-handle",
1676
- ...props,
1677
- ref
1678
- })),
1679
- CloseIconButton: Toolbar2.CloseIconButton,
1680
- Title: CardTitle,
1765
+ ToolbarIconButton: Toolbar.IconButton,
1766
+ ToolbarSeparator: Toolbar.Separator,
1767
+ // Toolbar blocks
1768
+ IconBlock: CardIconBlock,
1769
+ DragHandle: CardDragHandle,
1770
+ CloseIconButton,
1681
1771
  Menu: CardMenu,
1682
1772
  Icon: CardIcon,
1683
- IconBlock: CardIconBlock,
1773
+ Title: CardTitle,
1684
1774
  // Content
1685
1775
  Content: CardContent,
1686
1776
  Row: CardRow,
1687
1777
  Section: CardSection,
1688
1778
  Heading: CardHeading,
1689
1779
  Text: CardText,
1780
+ Html: CardHtml,
1690
1781
  Poster: CardPoster,
1691
1782
  Action: CardAction,
1692
1783
  Link: CardLink
@@ -1735,7 +1826,7 @@ var CopyButton = ({ classNames, value, size = 5, ...props }) => {
1735
1826
  className: mx7("flex gap-1 items-center", isCopied && inactiveLabelStyles)
1736
1827
  }, /* @__PURE__ */ React21.createElement("span", {
1737
1828
  className: "px-1"
1738
- }, t("copy label")), /* @__PURE__ */ React21.createElement(Icon, {
1829
+ }, t("copy.label")), /* @__PURE__ */ React21.createElement(Icon, {
1739
1830
  icon: "ph--copy--regular",
1740
1831
  size
1741
1832
  })), /* @__PURE__ */ React21.createElement("div", {
@@ -1743,7 +1834,7 @@ var CopyButton = ({ classNames, value, size = 5, ...props }) => {
1743
1834
  className: mx7("flex gap-1 items-center", !isCopied && inactiveLabelStyles)
1744
1835
  }, /* @__PURE__ */ React21.createElement("span", {
1745
1836
  className: "px-1"
1746
- }, t("copy success label")), /* @__PURE__ */ React21.createElement(Icon, {
1837
+ }, t("copy-success.label")), /* @__PURE__ */ React21.createElement(Icon, {
1747
1838
  icon: "ph--check--regular",
1748
1839
  size
1749
1840
  })));
@@ -1752,7 +1843,7 @@ var CopyButtonIconOnly = ({ __scopeTooltip, value, classNames, size, variant, ..
1752
1843
  const { t } = useTranslation(osTranslations);
1753
1844
  const { textValue, setTextValue } = useClipboard();
1754
1845
  const isCopied = textValue === value;
1755
- const label = isCopied ? t("copy success label") : props.label ?? t("copy label");
1846
+ const label = isCopied ? t("copy-success.label") : props.label ?? t("copy.label");
1756
1847
  const { onOpen } = useTooltipContext("CopyButton", __scopeTooltip);
1757
1848
  return /* @__PURE__ */ React21.createElement(IconButton, {
1758
1849
  iconOnly: true,
@@ -1778,20 +1869,27 @@ var Clipboard = {
1778
1869
 
1779
1870
  // src/components/Dialog/Dialog.tsx
1780
1871
  import { createContext as createContext5 } from "@radix-ui/react-context";
1781
- import { DialogClose as DialogClosePrimitive, DialogContent as DialogContentPrimitive, DialogDescription as DialogDescriptionPrimitive, DialogOverlay as DialogOverlayPrimitive, DialogPortal as DialogPortalPrimitive, Root as DialogRootPrimitive, DialogTitle as DialogTitlePrimitive, DialogTrigger as DialogTriggerPrimitive } from "@radix-ui/react-dialog";
1782
- import React22, { forwardRef as forwardRef19 } from "react";
1872
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
1873
+ import { Primitive as Primitive13 } from "@radix-ui/react-primitive";
1874
+ import { Slot as Slot13 } from "@radix-ui/react-slot";
1875
+ import React22, { forwardRef as forwardRef14 } from "react";
1783
1876
  import { useTranslation as useTranslation3 } from "react-i18next";
1784
- import { osTranslations as osTranslations2 } from "@dxos/ui-theme";
1877
+ import { composableProps as composableProps8, osTranslations as osTranslations2, slottable as slottable7 } from "@dxos/ui-theme";
1785
1878
  var DialogRoot = (props) => /* @__PURE__ */ React22.createElement(ElevationProvider, {
1786
1879
  elevation: "dialog"
1787
- }, /* @__PURE__ */ React22.createElement(DialogRootPrimitive, props));
1788
- var DialogTrigger = DialogTriggerPrimitive;
1789
- var DialogPortal = DialogPortalPrimitive;
1880
+ }, /* @__PURE__ */ React22.createElement(DialogPrimitive.Root, {
1881
+ // NOTE: Radix warning unless set to undefined.
1882
+ // https://www.radix-ui.com/primitives/docs/components/dialog#description
1883
+ "aria-describedby": void 0,
1884
+ ...props
1885
+ }));
1886
+ var DialogTrigger = DialogPrimitive.Trigger;
1887
+ var DialogPortal = DialogPrimitive.Portal;
1790
1888
  var DIALOG_OVERLAY_NAME = "DialogOverlay";
1791
1889
  var [OverlayLayoutProvider, useOverlayLayoutContext] = createContext5(DIALOG_OVERLAY_NAME, {});
1792
- var DialogOverlay = /* @__PURE__ */ forwardRef19(({ classNames, children, blockAlign, ...props }, forwardedRef) => {
1890
+ var DialogOverlay = /* @__PURE__ */ forwardRef14(({ classNames, children, blockAlign, ...props }, forwardedRef) => {
1793
1891
  const { tx } = useThemeContext();
1794
- return /* @__PURE__ */ React22.createElement(DialogOverlayPrimitive, {
1892
+ return /* @__PURE__ */ React22.createElement(DialogPrimitive.Overlay, {
1795
1893
  ...props,
1796
1894
  "data-block-align": blockAlign,
1797
1895
  className: tx("dialog.overlay", {}, classNames),
@@ -1802,64 +1900,60 @@ var DialogOverlay = /* @__PURE__ */ forwardRef19(({ classNames, children, blockA
1802
1900
  });
1803
1901
  DialogOverlay.displayName = DIALOG_OVERLAY_NAME;
1804
1902
  var DIALOG_CONTENT_NAME = "DialogContent";
1805
- var DialogContent = /* @__PURE__ */ forwardRef19(({ classNames, children, size = "md", inOverlayLayout: propsInOverlayLayout, ...props }, forwardedRef) => {
1903
+ var DialogContent = /* @__PURE__ */ forwardRef14(({ classNames, children, size = "md", inOverlayLayout: propsInOverlayLayout, ...props }, forwardedRef) => {
1806
1904
  const { tx } = useThemeContext();
1807
1905
  const { inOverlayLayout } = useOverlayLayoutContext(DIALOG_CONTENT_NAME);
1808
- return /* @__PURE__ */ React22.createElement(DialogContentPrimitive, {
1906
+ return /* @__PURE__ */ React22.createElement(DialogPrimitive.Content, {
1809
1907
  ...props,
1810
1908
  // NOTE: Radix warning unless set to undefined.
1811
1909
  // https://www.radix-ui.com/primitives/docs/components/dialog#description
1812
1910
  "aria-describedby": void 0,
1813
1911
  className: tx("dialog.content", {
1814
- inOverlayLayout: propsInOverlayLayout || inOverlayLayout,
1815
- size
1912
+ size,
1913
+ inOverlayLayout: propsInOverlayLayout || inOverlayLayout
1816
1914
  }, classNames),
1817
1915
  ref: forwardedRef
1818
- }, /* @__PURE__ */ React22.createElement(Column.Root, null, children));
1916
+ }, /* @__PURE__ */ React22.createElement(Column.Root, {
1917
+ classNames: "dx-expander",
1918
+ gutter: "sm"
1919
+ }, children));
1819
1920
  });
1820
1921
  DialogContent.displayName = DIALOG_CONTENT_NAME;
1821
- var DialogHeader = /* @__PURE__ */ forwardRef19(({ classNames, srOnly, ...props }, forwardedRef) => {
1922
+ var DialogHeader = slottable7(({ children, asChild, ...props }, forwardedRef) => {
1923
+ const { className, ...rest } = composableProps8(props);
1924
+ const Comp = asChild ? Slot13 : Primitive13.div;
1822
1925
  const { tx } = useThemeContext();
1823
- return /* @__PURE__ */ React22.createElement(Column.Segment, {
1824
- asChild: true
1825
- }, /* @__PURE__ */ React22.createElement("div", {
1826
- role: "heading",
1827
- ...props,
1828
- className: tx("dialog.header", {
1829
- srOnly
1830
- }, [
1831
- classNames
1832
- ]),
1926
+ return /* @__PURE__ */ React22.createElement(Comp, {
1927
+ ...rest,
1928
+ className: tx("dialog.header", {}, className),
1833
1929
  ref: forwardedRef
1834
- }));
1930
+ }, children);
1835
1931
  });
1836
- var DialogCloseIconButton = /* @__PURE__ */ forwardRef19(({ label, ...props }, forwardedRef) => {
1932
+ var DialogCloseIconButton = /* @__PURE__ */ forwardRef14(({ label, ...props }, forwardedRef) => {
1837
1933
  const { t } = useTranslation3(osTranslations2);
1838
1934
  return /* @__PURE__ */ React22.createElement(IconButton, {
1839
1935
  ...props,
1840
- label: label ?? t("close dialog label"),
1936
+ label: label ?? t("close-dialog.label"),
1841
1937
  icon: "ph--x--regular",
1842
1938
  iconOnly: true,
1843
1939
  size: 4,
1844
- density: "fine",
1845
1940
  variant: "ghost",
1846
1941
  ref: forwardedRef
1847
1942
  });
1848
1943
  });
1849
- var DialogBody = /* @__PURE__ */ forwardRef19(({ children, ...props }, forwardedRef) => {
1944
+ var DialogBody = slottable7(({ children, asChild, ...props }, forwardedRef) => {
1945
+ const { className, ...rest } = composableProps8(props);
1946
+ const Comp = asChild ? Slot13 : Primitive13.div;
1850
1947
  const { tx } = useThemeContext();
1851
- return /* @__PURE__ */ React22.createElement(Column.Segment, {
1852
- asChild: true
1853
- }, /* @__PURE__ */ React22.createElement("div", {
1854
- role: "none",
1855
- ...props,
1856
- className: tx("dialog.body"),
1948
+ return /* @__PURE__ */ React22.createElement(Comp, {
1949
+ ...rest,
1950
+ className: tx("dialog.body", {}, className),
1857
1951
  ref: forwardedRef
1858
- }, children));
1952
+ }, children);
1859
1953
  });
1860
- var DialogTitle = /* @__PURE__ */ forwardRef19(({ classNames, srOnly, ...props }, forwardedRef) => {
1954
+ var DialogTitle = /* @__PURE__ */ forwardRef14(({ classNames, srOnly, ...props }, forwardedRef) => {
1861
1955
  const { tx } = useThemeContext();
1862
- return /* @__PURE__ */ React22.createElement(DialogTitlePrimitive, {
1956
+ return /* @__PURE__ */ React22.createElement(DialogPrimitive.Title, {
1863
1957
  ...props,
1864
1958
  className: tx("dialog.title", {
1865
1959
  srOnly
@@ -1867,9 +1961,9 @@ var DialogTitle = /* @__PURE__ */ forwardRef19(({ classNames, srOnly, ...props }
1867
1961
  ref: forwardedRef
1868
1962
  });
1869
1963
  });
1870
- var DialogDescription = /* @__PURE__ */ forwardRef19(({ classNames, srOnly, ...props }, forwardedRef) => {
1964
+ var DialogDescription = /* @__PURE__ */ forwardRef14(({ classNames, srOnly, ...props }, forwardedRef) => {
1871
1965
  const { tx } = useThemeContext();
1872
- return /* @__PURE__ */ React22.createElement(DialogDescriptionPrimitive, {
1966
+ return /* @__PURE__ */ React22.createElement(DialogPrimitive.Description, {
1873
1967
  ...props,
1874
1968
  className: tx("dialog.description", {
1875
1969
  srOnly
@@ -1877,17 +1971,17 @@ var DialogDescription = /* @__PURE__ */ forwardRef19(({ classNames, srOnly, ...p
1877
1971
  ref: forwardedRef
1878
1972
  });
1879
1973
  });
1880
- var DialogActionBar = /* @__PURE__ */ forwardRef19(({ children, classNames, ...props }, forwardedRef) => {
1974
+ var DialogActionBar = slottable7(({ children, asChild, ...props }, forwardedRef) => {
1975
+ const { className: classNames, ...rest } = composableProps8(props);
1976
+ const Comp = asChild ? Slot13 : Primitive13.div;
1881
1977
  const { tx } = useThemeContext();
1882
- return /* @__PURE__ */ React22.createElement(Column.Segment, {
1883
- asChild: true
1884
- }, /* @__PURE__ */ React22.createElement("div", {
1885
- ...props,
1978
+ return /* @__PURE__ */ React22.createElement(Comp, {
1979
+ ...rest,
1886
1980
  className: tx("dialog.actionbar", {}, classNames),
1887
1981
  ref: forwardedRef
1888
- }, children));
1982
+ }, children);
1889
1983
  });
1890
- var DialogClose = DialogClosePrimitive;
1984
+ var DialogClose = DialogPrimitive.Close;
1891
1985
  var Dialog = {
1892
1986
  Root: DialogRoot,
1893
1987
  Trigger: DialogTrigger,
@@ -1904,109 +1998,86 @@ var Dialog = {
1904
1998
  };
1905
1999
 
1906
2000
  // src/components/Dialog/AlertDialog.tsx
1907
- import { AlertDialogAction as AlertDialogActionPrimitive, AlertDialogCancel as AlertDialogCancelPrimitive, AlertDialogContent as AlertDialogContentPrimitive, AlertDialogDescription as AlertDialogDescriptionPrimitive, AlertDialogOverlay as AlertDialogOverlayPrimitive, AlertDialogPortal as AlertDialogPortalPrimitive, Root as AlertDialogRootPrimitive, AlertDialogTitle as AlertDialogTitlePrimitive, AlertDialogTrigger as AlertDialogTriggerPrimitive } from "@radix-ui/react-alert-dialog";
2001
+ import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
1908
2002
  import { createContext as createContext6 } from "@radix-ui/react-context";
1909
- import React23, { forwardRef as forwardRef20 } from "react";
2003
+ import React23, { forwardRef as forwardRef15 } from "react";
1910
2004
  var AlertDialogRoot = (props) => /* @__PURE__ */ React23.createElement(ElevationProvider, {
1911
2005
  elevation: "dialog"
1912
- }, /* @__PURE__ */ React23.createElement(AlertDialogRootPrimitive, props));
1913
- var AlertDialogTrigger = AlertDialogTriggerPrimitive;
1914
- var AlertDialogPortal = AlertDialogPortalPrimitive;
1915
- var AlertDialogCancel = AlertDialogCancelPrimitive;
1916
- var AlertDialogAction = AlertDialogActionPrimitive;
1917
- var AlertDialogTitle = /* @__PURE__ */ forwardRef20(({ classNames, srOnly, ...props }, forwardedRef) => {
1918
- const { tx } = useThemeContext();
1919
- return /* @__PURE__ */ React23.createElement(AlertDialogTitlePrimitive, {
1920
- ...props,
1921
- className: tx("dialog.title", {
1922
- srOnly
1923
- }, classNames),
1924
- ref: forwardedRef
1925
- });
1926
- });
1927
- var AlertDialogDescription = /* @__PURE__ */ forwardRef20(({ classNames, srOnly, ...props }, forwardedRef) => {
1928
- const { tx } = useThemeContext();
1929
- return /* @__PURE__ */ React23.createElement(AlertDialogDescriptionPrimitive, {
1930
- ...props,
1931
- className: tx("dialog.description", {
1932
- srOnly
1933
- }, classNames),
1934
- ref: forwardedRef
1935
- });
1936
- });
2006
+ }, /* @__PURE__ */ React23.createElement(AlertDialogPrimitive.Root, props));
2007
+ var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
2008
+ var AlertDialogPortal = AlertDialogPrimitive.Portal;
2009
+ var AlertDialogCancel = AlertDialogPrimitive.Cancel;
2010
+ var AlertDialogAction = AlertDialogPrimitive.Action;
1937
2011
  var ALERT_DIALOG_OVERLAY_NAME = "AlertDialogOverlay";
1938
2012
  var ALERT_DIALOG_CONTENT_NAME = "AlertDialogContent";
1939
- var ALERT_DIALOG_BODY_NAME = "AlertDialogBody";
1940
- var ALERT_DIALOG_ACTIONBAR_NAME = "AlertDialogActionBar";
1941
2013
  var [OverlayLayoutProvider2, useOverlayLayoutContext2] = createContext6(ALERT_DIALOG_OVERLAY_NAME, {
1942
2014
  inOverlayLayout: false
1943
2015
  });
1944
- var AlertDialogOverlay = /* @__PURE__ */ forwardRef20(({ classNames, children, blockAlign, ...props }, forwardedRef) => {
2016
+ var AlertDialogOverlay = /* @__PURE__ */ forwardRef15(({ classNames, children, blockAlign, ...props }, forwardedRef) => {
1945
2017
  const { tx } = useThemeContext();
1946
- return /* @__PURE__ */ React23.createElement(AlertDialogOverlayPrimitive, {
2018
+ return /* @__PURE__ */ React23.createElement(AlertDialogPrimitive.Overlay, {
1947
2019
  ...props,
1948
2020
  "data-block-align": blockAlign,
1949
- className: tx(
1950
- "dialog.overlay",
1951
- {},
1952
- classNames,
1953
- // TODO(burdon): Move to dialog.ts.
1954
- "data-[h-align=start]:justify-center",
1955
- "data-[h-align=start]:items-start",
1956
- "data-[h-align=center]:place-content-center"
1957
- ),
2021
+ className: tx("dialog.overlay", {}, classNames),
1958
2022
  ref: forwardedRef
1959
2023
  }, /* @__PURE__ */ React23.createElement(OverlayLayoutProvider2, {
1960
2024
  inOverlayLayout: true
1961
2025
  }, children));
1962
2026
  });
1963
2027
  AlertDialogOverlay.displayName = ALERT_DIALOG_OVERLAY_NAME;
1964
- var AlertDialogContent = /* @__PURE__ */ forwardRef20(({ classNames, children, size = "md", ...props }, forwardedRef) => {
2028
+ var AlertDialogContent = /* @__PURE__ */ forwardRef15(({ classNames, children, size = "md", ...props }, forwardedRef) => {
1965
2029
  const { tx } = useThemeContext();
1966
2030
  const { inOverlayLayout } = useOverlayLayoutContext2(ALERT_DIALOG_CONTENT_NAME);
1967
- return /* @__PURE__ */ React23.createElement(AlertDialogContentPrimitive, {
2031
+ return /* @__PURE__ */ React23.createElement(AlertDialogPrimitive.Content, {
1968
2032
  ...props,
1969
2033
  className: tx("dialog.content", {
1970
2034
  inOverlayLayout,
1971
2035
  size
1972
2036
  }, classNames),
2037
+ // NOTE: Radix warning unless set to undefined.
2038
+ // https://www.radix-ui.com/primitives/docs/components/dialog#description
2039
+ "aria-describedby": void 0,
1973
2040
  ref: forwardedRef
1974
- }, /* @__PURE__ */ React23.createElement(Column.Root, null, children));
2041
+ }, /* @__PURE__ */ React23.createElement(Column.Root, {
2042
+ classNames: "dx-expander",
2043
+ gutter: "sm"
2044
+ }, children));
1975
2045
  });
1976
2046
  AlertDialogContent.displayName = ALERT_DIALOG_CONTENT_NAME;
1977
- var AlertDialogBody = /* @__PURE__ */ forwardRef20(({ children, ...props }, forwardedRef) => {
2047
+ var AlertDialogTitle = /* @__PURE__ */ forwardRef15(({ classNames, srOnly, ...props }, forwardedRef) => {
1978
2048
  const { tx } = useThemeContext();
1979
- return /* @__PURE__ */ React23.createElement(Column.Segment, {
1980
- asChild: true
1981
- }, /* @__PURE__ */ React23.createElement("div", {
1982
- role: "none",
2049
+ return /* @__PURE__ */ React23.createElement(AlertDialogPrimitive.Title, {
1983
2050
  ...props,
1984
- className: tx("dialog.body"),
2051
+ className: tx("dialog.title", {
2052
+ srOnly
2053
+ }, classNames),
1985
2054
  ref: forwardedRef
1986
- }, children));
2055
+ });
1987
2056
  });
1988
- AlertDialogBody.displayName = ALERT_DIALOG_BODY_NAME;
1989
- var AlertDialogActionBar = /* @__PURE__ */ forwardRef20(({ children, classNames, ...props }, forwardedRef) => {
2057
+ var AlertDialogDescription = /* @__PURE__ */ forwardRef15(({ classNames, srOnly, ...props }, forwardedRef) => {
1990
2058
  const { tx } = useThemeContext();
1991
- return /* @__PURE__ */ React23.createElement(Column.Segment, {
1992
- asChild: true
1993
- }, /* @__PURE__ */ React23.createElement("div", {
2059
+ return /* @__PURE__ */ React23.createElement(AlertDialogPrimitive.Description, {
1994
2060
  ...props,
1995
- className: tx("dialog.actionbar", {}, classNames),
2061
+ className: tx("dialog.description", {
2062
+ srOnly
2063
+ }, classNames),
1996
2064
  ref: forwardedRef
1997
- }, children));
2065
+ });
1998
2066
  });
1999
- AlertDialogActionBar.displayName = ALERT_DIALOG_ACTIONBAR_NAME;
2000
2067
  var AlertDialog = {
2001
2068
  Root: AlertDialogRoot,
2002
2069
  Trigger: AlertDialogTrigger,
2003
2070
  Portal: AlertDialogPortal,
2004
2071
  Overlay: AlertDialogOverlay,
2005
2072
  Content: AlertDialogContent,
2006
- Body: AlertDialogBody,
2073
+ // Shared with Dialog.
2074
+ Header: Dialog.Header,
2075
+ Body: Dialog.Body,
2007
2076
  Title: AlertDialogTitle,
2008
2077
  Description: AlertDialogDescription,
2009
- ActionBar: AlertDialogActionBar,
2078
+ ActionBar: Dialog.ActionBar,
2079
+ CloseIconButton: Dialog.CloseIconButton,
2080
+ // AlertDialog-specific dismissal.
2010
2081
  Cancel: AlertDialogCancel,
2011
2082
  Action: AlertDialogAction
2012
2083
  };
@@ -2015,94 +2086,43 @@ var AlertDialog = {
2015
2086
  import { ErrorBoundary } from "@dxos/react-error-boundary";
2016
2087
 
2017
2088
  // src/components/ErrorFallback/ErrorFallback.tsx
2018
- import React25 from "react";
2019
- import { safeStringify } from "@dxos/util";
2020
-
2021
- // src/components/ErrorFallback/ErrorStack.tsx
2022
- import ErrorStackParser from "error-stack-parser";
2023
2089
  import React24 from "react";
2024
- import { mx as mx8 } from "@dxos/ui-theme";
2025
- var ErrorStack = ({ error }) => {
2026
- const frames = ErrorStackParser.parse(error);
2027
- return /* @__PURE__ */ React24.createElement("div", {
2028
- className: "font-mono text-sm"
2029
- }, frames.map((frame, i) => {
2030
- const isLast = i === frames.length - 1;
2031
- const local = frame.fileName ? parseLocalFrame(frame.fileName, frame.lineNumber, frame.columnNumber) : void 0;
2032
- const name = frame.functionName ?? "<anonymous>";
2033
- return /* @__PURE__ */ React24.createElement("div", {
2034
- key: i,
2035
- className: mx8("grid grid-cols-[16px_1fr_auto_auto] items-stretch gap-x-2", local && "cursor-pointer hover:bg-hover-surface")
2036
- }, /* @__PURE__ */ React24.createElement("div", {
2037
- className: "relative"
2038
- }, /* @__PURE__ */ React24.createElement("div", {
2039
- className: mx8("absolute left-1/2 -translate-x-1/2 w-px bg-neutral-500", isLast ? "top-0 h-1/2" : "inset-y-0")
2040
- }), /* @__PURE__ */ React24.createElement("div", {
2041
- className: "absolute top-1/2 -translate-y-1/2 left-1/2 right-0 h-px bg-neutral-500"
2042
- })), local ? /* @__PURE__ */ React24.createElement("a", {
2043
- href: local.href,
2044
- className: "truncate self-center"
2045
- }, name) : /* @__PURE__ */ React24.createElement("span", {
2046
- className: "text-subdued truncate self-center"
2047
- }, name), /* @__PURE__ */ React24.createElement("span", {
2048
- className: "text-xs text-subdued truncate self-center"
2049
- }, local?.fileName ?? ""), /* @__PURE__ */ React24.createElement("span", {
2050
- className: "text-xs text-subdued text-right self-center"
2051
- }, local ? `${frame.lineNumber}:${frame.columnNumber}` : ""));
2052
- }));
2053
- };
2054
- var parseLocalFrame = (fileUrl, line, col) => {
2055
- try {
2056
- const { pathname } = new URL(fileUrl);
2057
- if (!pathname.startsWith("/@fs/")) {
2058
- return void 0;
2059
- }
2060
- const localPath = pathname.slice(4);
2061
- return {
2062
- href: `vscode://file/${localPath}:${line ?? 1}:${col ?? 1}`,
2063
- fileName: pathname.split("/").pop() ?? localPath
2064
- };
2065
- } catch {
2066
- return void 0;
2067
- }
2068
- };
2069
-
2070
- // src/components/ErrorFallback/ErrorFallback.tsx
2090
+ import { safeStringify } from "@dxos/util";
2071
2091
  var ErrorFallback = ({ children, error, title, data }) => {
2072
2092
  const isDev = true;
2073
2093
  const message = error instanceof Error ? error.message : String(error);
2074
- return /* @__PURE__ */ React25.createElement("div", {
2094
+ return /* @__PURE__ */ React24.createElement("div", {
2075
2095
  role: "alert",
2076
2096
  "data-testid": "error-boundary-fallback",
2077
2097
  className: "flex flex-col p-4 gap-4 overflow-auto"
2078
- }, /* @__PURE__ */ React25.createElement("h1", {
2098
+ }, /* @__PURE__ */ React24.createElement("h1", {
2079
2099
  className: "text-lg text-info-text"
2080
- }, title ?? "Runtime Error"), /* @__PURE__ */ React25.createElement("p", null, message), isDev && error instanceof Error && /* @__PURE__ */ React25.createElement(Section, {
2100
+ }, title ?? "Runtime Error"), /* @__PURE__ */ React24.createElement("p", null, message), isDev && error instanceof Error && /* @__PURE__ */ React24.createElement(Section, {
2081
2101
  title: "Stack",
2082
2102
  onClick: () => {
2083
2103
  const text = error instanceof Error ? error.stack ?? error.message : String(error);
2084
2104
  void navigator.clipboard.writeText(text);
2085
2105
  }
2086
- }, /* @__PURE__ */ React25.createElement(ErrorStack, {
2106
+ }, /* @__PURE__ */ React24.createElement(ErrorStack, {
2087
2107
  error
2088
- })), data && /* @__PURE__ */ React25.createElement(Section, {
2108
+ })), data && /* @__PURE__ */ React24.createElement(Section, {
2089
2109
  title: "Data",
2090
2110
  onClick: () => {
2091
2111
  void navigator.clipboard.writeText(JSON.stringify(data, void 0, 2));
2092
2112
  }
2093
- }, /* @__PURE__ */ React25.createElement("pre", {
2113
+ }, /* @__PURE__ */ React24.createElement("pre", {
2094
2114
  className: "overflow-x-auto text-xs"
2095
2115
  }, safeStringify(data, void 0, 2))), children);
2096
2116
  };
2097
2117
  var Section = ({ children, title, onClick }) => {
2098
- return /* @__PURE__ */ React25.createElement("div", {
2118
+ return /* @__PURE__ */ React24.createElement("div", {
2099
2119
  className: "flex flex-col gap-1"
2100
- }, onClick && /* @__PURE__ */ React25.createElement("button", {
2120
+ }, onClick && /* @__PURE__ */ React24.createElement("button", {
2101
2121
  type: "button",
2102
2122
  onClick,
2103
2123
  className: "flex items-center gap-1 text-xs text-subdued hover:text-primary-500 transition-colors",
2104
2124
  title: `Copy ${title}`
2105
- }, /* @__PURE__ */ React25.createElement("h2", {
2125
+ }, /* @__PURE__ */ React24.createElement("h2", {
2106
2126
  className: "text-xs uppercase text-subdued"
2107
2127
  }, title)), children);
2108
2128
  };
@@ -2135,13 +2155,122 @@ var generator = ({ error, delay }) => {
2135
2155
  return error?.() ?? new Error(`Error generated after ${delay}ms`);
2136
2156
  };
2137
2157
 
2158
+ // src/components/Focus/Focus.tsx
2159
+ import { useArrowNavigationGroup, useFocusableGroup, useMergedTabsterAttributes_unstable } from "@fluentui/react-tabster";
2160
+ import { useComposedRefs } from "@radix-ui/react-compose-refs";
2161
+ import { Primitive as Primitive14 } from "@radix-ui/react-primitive";
2162
+ 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";
2164
+ import { composableProps as composableProps9, slottable as slottable8 } from "@dxos/ui-theme";
2165
+ var FOCUS_STATE_ATTR = "focus-state";
2166
+ var FocusContext = /* @__PURE__ */ createContext7({});
2167
+ var useFocus = () => useContext5(FocusContext);
2168
+ var Group3 = slottable8(({ children, asChild, orientation = "vertical", border = false, ...props }, forwardedRef) => {
2169
+ const Comp = asChild ? Slot14 : Primitive14.div;
2170
+ const { tx } = useThemeContext();
2171
+ const rootRef = useRef3(null);
2172
+ const focusableGroupAttrs = useFocusableGroup({
2173
+ tabBehavior: "limited-trap-focus"
2174
+ });
2175
+ const arrowNavigationAttrs = useArrowNavigationGroup({
2176
+ axis: orientation,
2177
+ memorizeCurrent: true
2178
+ });
2179
+ 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) => {
2184
+ const related = event.relatedTarget;
2185
+ if (!related || !rootRef.current?.contains(related)) {
2186
+ setGroupHasFocus(false);
2187
+ }
2188
+ }, []);
2189
+ const { className, ...rest } = composableProps9(props);
2190
+ return /* @__PURE__ */ React25.createElement(FocusContext.Provider, {
2191
+ value: {
2192
+ setFocus: setState,
2193
+ groupHasFocus
2194
+ }
2195
+ }, /* @__PURE__ */ React25.createElement(Comp, {
2196
+ ...rest,
2197
+ tabIndex: 0,
2198
+ className: tx("focus.group", {
2199
+ border
2200
+ }, className),
2201
+ ...tabsterAttrs,
2202
+ ...state && {
2203
+ [`data-${FOCUS_STATE_ATTR}`]: state
2204
+ },
2205
+ onBlur: handleFocusOut,
2206
+ onFocus: handleFocusIn,
2207
+ ref: useComposedRefs(rootRef, forwardedRef)
2208
+ }, children));
2209
+ });
2210
+ var Item4 = slottable8(({ children, asChild, current, border = false, onCurrentChange, onClick, onFocus, onBlur, ...props }, forwardedRef) => {
2211
+ const Comp = asChild ? Slot14 : Primitive14.div;
2212
+ const { tx } = useThemeContext();
2213
+ const focusableGroupAttrs = useFocusableGroup({
2214
+ ignoreDefaultKeydown: {
2215
+ Enter: true
2216
+ }
2217
+ });
2218
+ const [focused, setFocused] = useState6(false);
2219
+ const handleClick = useCallback6((event) => {
2220
+ onCurrentChange?.();
2221
+ onClick?.(event);
2222
+ }, [
2223
+ onCurrentChange,
2224
+ onClick
2225
+ ]);
2226
+ const handleKeyDown = useCallback6((event) => {
2227
+ if (event.key === "Enter") {
2228
+ onCurrentChange?.();
2229
+ }
2230
+ }, [
2231
+ onCurrentChange
2232
+ ]);
2233
+ const handleFocus = useCallback6((event) => {
2234
+ setFocused(true);
2235
+ onFocus?.(event);
2236
+ }, [
2237
+ onFocus
2238
+ ]);
2239
+ const handleBlur = useCallback6((event) => {
2240
+ setFocused(false);
2241
+ onBlur?.(event);
2242
+ }, [
2243
+ onBlur
2244
+ ]);
2245
+ const isCurrent = current ?? focused;
2246
+ const { className, ...rest } = composableProps9(props);
2247
+ return /* @__PURE__ */ React25.createElement(Comp, {
2248
+ ...rest,
2249
+ tabIndex: 0,
2250
+ className: tx("focus.item", {
2251
+ border
2252
+ }, className),
2253
+ ...focusableGroupAttrs,
2254
+ "aria-current": isCurrent || void 0,
2255
+ onClick: handleClick,
2256
+ onKeyDown: handleKeyDown,
2257
+ onFocus: handleFocus,
2258
+ onBlur: handleBlur,
2259
+ ref: forwardedRef
2260
+ }, children);
2261
+ });
2262
+ var Focus = {
2263
+ Group: Group3,
2264
+ Item: Item4
2265
+ };
2266
+
2138
2267
  // src/components/Input/Input.tsx
2139
- import { Root as CheckboxPrimitive } from "@radix-ui/react-checkbox";
2268
+ import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
2140
2269
  import { useControllableState as useControllableState2 } from "@radix-ui/react-use-controllable-state";
2141
- import React26, { forwardRef as forwardRef21 } from "react";
2270
+ import React26, { forwardRef as forwardRef16 } from "react";
2142
2271
  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";
2143
- import { mx as mx9 } from "@dxos/ui-theme";
2144
- var Label3 = /* @__PURE__ */ forwardRef21(({ classNames, children, srOnly, ...props }, forwardedRef) => {
2272
+ import { mx as mx8 } from "@dxos/ui-theme";
2273
+ var Label3 = /* @__PURE__ */ forwardRef16(({ classNames, children, srOnly, ...props }, forwardedRef) => {
2145
2274
  const { tx } = useThemeContext();
2146
2275
  return /* @__PURE__ */ React26.createElement(LabelPrimitive, {
2147
2276
  ...props,
@@ -2151,7 +2280,7 @@ var Label3 = /* @__PURE__ */ forwardRef21(({ classNames, children, srOnly, ...pr
2151
2280
  ref: forwardedRef
2152
2281
  }, children);
2153
2282
  });
2154
- var Description = /* @__PURE__ */ forwardRef21(({ classNames, children, srOnly, ...props }, forwardedRef) => {
2283
+ var Description3 = /* @__PURE__ */ forwardRef16(({ classNames, children, srOnly, ...props }, forwardedRef) => {
2155
2284
  const { tx } = useThemeContext();
2156
2285
  return /* @__PURE__ */ React26.createElement(DescriptionPrimitive, {
2157
2286
  ...props,
@@ -2161,7 +2290,7 @@ var Description = /* @__PURE__ */ forwardRef21(({ classNames, children, srOnly,
2161
2290
  ref: forwardedRef
2162
2291
  }, children);
2163
2292
  });
2164
- var Validation = /* @__PURE__ */ forwardRef21(({ __inputScope, classNames, children, srOnly, ...props }, forwardedRef) => {
2293
+ var Validation = /* @__PURE__ */ forwardRef16(({ __inputScope, classNames, children, srOnly, ...props }, forwardedRef) => {
2165
2294
  const { tx } = useThemeContext();
2166
2295
  const { validationValence } = useInputContext(INPUT_NAME, __inputScope);
2167
2296
  return /* @__PURE__ */ React26.createElement(ValidationPrimitive, {
@@ -2173,7 +2302,7 @@ var Validation = /* @__PURE__ */ forwardRef21(({ __inputScope, classNames, child
2173
2302
  ref: forwardedRef
2174
2303
  }, children);
2175
2304
  });
2176
- var DescriptionAndValidation = /* @__PURE__ */ forwardRef21(({ classNames, children, srOnly, ...props }, forwardedRef) => {
2305
+ var DescriptionAndValidation = /* @__PURE__ */ forwardRef16(({ classNames, children, srOnly, ...props }, forwardedRef) => {
2177
2306
  const { tx } = useThemeContext();
2178
2307
  return /* @__PURE__ */ React26.createElement(DescriptionAndValidationPrimitive, {
2179
2308
  ...props,
@@ -2183,7 +2312,7 @@ var DescriptionAndValidation = /* @__PURE__ */ forwardRef21(({ classNames, child
2183
2312
  ref: forwardedRef
2184
2313
  }, children);
2185
2314
  });
2186
- var PinInput = /* @__PURE__ */ forwardRef21(({ classNames, density: propsDensity, elevation: propsElevation, ...props }, forwardedRef) => {
2315
+ var PinInput = /* @__PURE__ */ forwardRef16(({ classNames, density: propsDensity, elevation: propsElevation, ...props }, forwardedRef) => {
2187
2316
  const { hasIosKeyboard: hasIosKeyboard2 } = useThemeContext();
2188
2317
  const { tx } = useThemeContext();
2189
2318
  const density = useDensityContext(propsDensity);
@@ -2204,11 +2333,11 @@ var PinInput = /* @__PURE__ */ forwardRef21(({ classNames, density: propsDensity
2204
2333
  ref: forwardedRef
2205
2334
  });
2206
2335
  });
2207
- var TextInput = /* @__PURE__ */ forwardRef21(({ __inputScope, classNames, density: propsDensity, elevation: propsElevation, variant, noAutoFill, ...props }, forwardedRef) => {
2336
+ var TextInput = /* @__PURE__ */ forwardRef16(({ __inputScope, classNames, density: densityProp, elevation: elevationProp, variant, noAutoFill, ...props }, forwardedRef) => {
2208
2337
  const { hasIosKeyboard: hasIosKeyboard2 } = useThemeContext();
2209
2338
  const { tx } = useThemeContext();
2210
- const density = useDensityContext(propsDensity);
2211
- const elevation = useElevationContext(propsElevation);
2339
+ const density = useDensityContext(densityProp);
2340
+ const elevation = useElevationContext(elevationProp);
2212
2341
  const { validationValence } = useInputContext(INPUT_NAME, __inputScope);
2213
2342
  return /* @__PURE__ */ React26.createElement(TextInputPrimitive, {
2214
2343
  ...props,
@@ -2226,7 +2355,7 @@ var TextInput = /* @__PURE__ */ forwardRef21(({ __inputScope, classNames, densit
2226
2355
  ref: forwardedRef
2227
2356
  });
2228
2357
  });
2229
- var TextArea = /* @__PURE__ */ forwardRef21(({ __inputScope, classNames, density: propsDensity, elevation: propsElevation, variant, ...props }, forwardedRef) => {
2358
+ var TextArea = /* @__PURE__ */ forwardRef16(({ __inputScope, classNames, density: propsDensity, elevation: propsElevation, variant, ...props }, forwardedRef) => {
2230
2359
  const { hasIosKeyboard: hasIosKeyboard2 } = useThemeContext();
2231
2360
  const { tx } = useThemeContext();
2232
2361
  const density = useDensityContext(propsDensity);
@@ -2247,7 +2376,7 @@ var TextArea = /* @__PURE__ */ forwardRef21(({ __inputScope, classNames, density
2247
2376
  ref: forwardedRef
2248
2377
  });
2249
2378
  });
2250
- var Checkbox = /* @__PURE__ */ forwardRef21(({ __inputScope, classNames, checked: propsChecked, defaultChecked: propsDefaultChecked, onCheckedChange: propsOnCheckedChange, size, ...props }, forwardedRef) => {
2379
+ var Checkbox = /* @__PURE__ */ forwardRef16(({ __inputScope, classNames, checked: propsChecked, defaultChecked: propsDefaultChecked, onCheckedChange: propsOnCheckedChange, size, ...props }, forwardedRef) => {
2251
2380
  const [checked, onCheckedChange] = useControllableState2({
2252
2381
  prop: propsChecked,
2253
2382
  defaultProp: propsDefaultChecked,
@@ -2255,7 +2384,7 @@ var Checkbox = /* @__PURE__ */ forwardRef21(({ __inputScope, classNames, checked
2255
2384
  });
2256
2385
  const { id, validationValence, descriptionId, errorMessageId } = useInputContext(INPUT_NAME, __inputScope);
2257
2386
  const { tx } = useThemeContext();
2258
- return /* @__PURE__ */ React26.createElement(CheckboxPrimitive, {
2387
+ return /* @__PURE__ */ React26.createElement(CheckboxPrimitive.Root, {
2259
2388
  ...props,
2260
2389
  checked,
2261
2390
  onCheckedChange,
@@ -2277,7 +2406,7 @@ var Checkbox = /* @__PURE__ */ forwardRef21(({ __inputScope, classNames, checked
2277
2406
  })
2278
2407
  }));
2279
2408
  });
2280
- var Switch = /* @__PURE__ */ forwardRef21(({ __inputScope, classNames, checked: propsChecked, defaultChecked: propsDefaultChecked, onCheckedChange: propsOnCheckedChange, ...props }, forwardedRef) => {
2409
+ var Switch = /* @__PURE__ */ forwardRef16(({ __inputScope, classNames, checked: propsChecked, defaultChecked: propsDefaultChecked, onCheckedChange: propsOnCheckedChange, ...props }, forwardedRef) => {
2281
2410
  const [checked, onCheckedChange] = useControllableState2({
2282
2411
  prop: propsChecked,
2283
2412
  defaultProp: propsDefaultChecked ?? false,
@@ -2286,7 +2415,7 @@ var Switch = /* @__PURE__ */ forwardRef21(({ __inputScope, classNames, checked:
2286
2415
  const { id, validationValence, descriptionId, errorMessageId } = useInputContext(INPUT_NAME, __inputScope);
2287
2416
  return /* @__PURE__ */ React26.createElement("input", {
2288
2417
  type: "checkbox",
2289
- className: mx9("dx-checkbox--switch dx-focus-ring", classNames),
2418
+ className: mx8("dx-checkbox--switch dx-focus-ring", classNames),
2290
2419
  checked,
2291
2420
  onChange: (event) => {
2292
2421
  onCheckedChange(event.target.checked);
@@ -2309,16 +2438,17 @@ var Input = {
2309
2438
  Checkbox,
2310
2439
  Switch,
2311
2440
  Label: Label3,
2312
- Description,
2441
+ Description: Description3,
2313
2442
  Validation,
2314
2443
  DescriptionAndValidation
2315
2444
  };
2316
2445
 
2317
2446
  // src/components/List/List.tsx
2318
- import { Primitive as Primitive12 } from "@radix-ui/react-primitive";
2319
- import { Slot as Slot12 } from "@radix-ui/react-slot";
2320
- import React28, { forwardRef as forwardRef22 } from "react";
2447
+ import { Primitive as Primitive15 } from "@radix-ui/react-primitive";
2448
+ import { Slot as Slot15 } from "@radix-ui/react-slot";
2449
+ import React28, { forwardRef as forwardRef17 } from "react";
2321
2450
  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
+ import { composable as composable4, composableProps as composableProps10 } from "@dxos/ui-theme";
2322
2452
 
2323
2453
  // src/components/List/ListDropIndicator.tsx
2324
2454
  import React27 from "react";
@@ -2359,19 +2489,20 @@ var ListDropIndicator = ({ edge, gap = 0, lineInset = 0, terminalInset = lineIns
2359
2489
  };
2360
2490
 
2361
2491
  // src/components/List/List.tsx
2362
- var List = /* @__PURE__ */ forwardRef22(({ classNames, children, ...props }, forwardedRef) => {
2492
+ var List = composable4(({ children, ...props }, forwardedRef) => {
2363
2493
  const { tx } = useThemeContext();
2364
2494
  const density = useDensityContext(props.density);
2495
+ const { className, ...rest } = composableProps10(props);
2365
2496
  return /* @__PURE__ */ React28.createElement(DensityProvider, {
2366
2497
  density
2367
2498
  }, /* @__PURE__ */ React28.createElement(ListPrimitive, {
2368
- ...props,
2369
- className: tx("list.root", {}, classNames),
2499
+ ...rest,
2500
+ className: tx("list.root", {}, className),
2370
2501
  ref: forwardedRef
2371
2502
  }, children));
2372
2503
  });
2373
- var ListItemEndcap = /* @__PURE__ */ forwardRef22(({ children, classNames, asChild, ...props }, forwardedRef) => {
2374
- const Comp = asChild ? Slot12 : Primitive12.div;
2504
+ var ListItemEndcap = /* @__PURE__ */ forwardRef17(({ children, classNames, asChild, ...props }, forwardedRef) => {
2505
+ const Comp = asChild ? Slot15 : Primitive15.div;
2375
2506
  const density = useDensityContext();
2376
2507
  const { tx } = useThemeContext();
2377
2508
  return /* @__PURE__ */ React28.createElement(Comp, {
@@ -2396,7 +2527,7 @@ var MockListItemOpenTrigger = ({ classNames, ...props }) => {
2396
2527
  }, classNames)
2397
2528
  });
2398
2529
  };
2399
- var ListItemHeading = /* @__PURE__ */ forwardRef22(({ children, classNames, ...props }, forwardedRef) => {
2530
+ var ListItemHeading = /* @__PURE__ */ forwardRef17(({ children, classNames, ...props }, forwardedRef) => {
2400
2531
  const { tx } = useThemeContext();
2401
2532
  const density = useDensityContext();
2402
2533
  return /* @__PURE__ */ React28.createElement(ListPrimitiveItemHeading, {
@@ -2405,9 +2536,9 @@ var ListItemHeading = /* @__PURE__ */ forwardRef22(({ children, classNames, ...p
2405
2536
  density
2406
2537
  }, classNames),
2407
2538
  ref: forwardedRef
2408
- }, children);
2539
+ }, /* @__PURE__ */ React28.createElement("span", null, children));
2409
2540
  });
2410
- var ListItemOpenTrigger = /* @__PURE__ */ forwardRef22(({ __listItemScope, classNames, children, ...props }, forwardedRef) => {
2541
+ var ListItemOpenTrigger = /* @__PURE__ */ forwardRef17(({ __listItemScope, classNames, children, ...props }, forwardedRef) => {
2411
2542
  const { tx } = useThemeContext();
2412
2543
  const density = useDensityContext();
2413
2544
  const { open } = useListItemContext(LIST_ITEM_NAME, __listItemScope);
@@ -2423,7 +2554,7 @@ var ListItemOpenTrigger = /* @__PURE__ */ forwardRef22(({ __listItemScope, class
2423
2554
  classNames: tx("list.item.openTriggerIcon", {})
2424
2555
  }));
2425
2556
  });
2426
- var ListItemRoot = /* @__PURE__ */ forwardRef22(({ classNames, children, ...props }, forwardedRef) => {
2557
+ var ListItemRoot = /* @__PURE__ */ forwardRef17(({ classNames, children, ...props }, forwardedRef) => {
2427
2558
  const { tx } = useThemeContext();
2428
2559
  const density = useDensityContext();
2429
2560
  return /* @__PURE__ */ React28.createElement(ListPrimitiveItem, {
@@ -2446,7 +2577,7 @@ var ListItem = {
2446
2577
  };
2447
2578
 
2448
2579
  // src/components/List/Tree.tsx
2449
- import React30, { forwardRef as forwardRef23 } from "react";
2580
+ import React30, { forwardRef as forwardRef18 } from "react";
2450
2581
 
2451
2582
  // src/components/List/TreeDropIndicator.tsx
2452
2583
  import React29 from "react";
@@ -2494,13 +2625,13 @@ var TreeDropIndicator = ({ instruction, gap = 0 }) => {
2494
2625
  };
2495
2626
 
2496
2627
  // src/components/List/Tree.tsx
2497
- var TreeRoot = /* @__PURE__ */ forwardRef23((props, forwardedRef) => {
2628
+ var TreeRoot = /* @__PURE__ */ forwardRef18((props, forwardedRef) => {
2498
2629
  return /* @__PURE__ */ React30.createElement(List, {
2499
2630
  ...props,
2500
2631
  ref: forwardedRef
2501
2632
  });
2502
2633
  });
2503
- var TreeBranch = /* @__PURE__ */ forwardRef23(({ __listScope, ...props }, forwardedRef) => {
2634
+ var TreeBranch = /* @__PURE__ */ forwardRef18(({ __listScope, ...props }, forwardedRef) => {
2504
2635
  const { headingId } = useListItemContext(LIST_ITEM_NAME, __listScope);
2505
2636
  return /* @__PURE__ */ React30.createElement(List, {
2506
2637
  ...props,
@@ -2508,7 +2639,7 @@ var TreeBranch = /* @__PURE__ */ forwardRef23(({ __listScope, ...props }, forwar
2508
2639
  ref: forwardedRef
2509
2640
  });
2510
2641
  });
2511
- var TreeItemRoot = /* @__PURE__ */ forwardRef23((props, forwardedRef) => {
2642
+ var TreeItemRoot = /* @__PURE__ */ forwardRef18((props, forwardedRef) => {
2512
2643
  return /* @__PURE__ */ React30.createElement(ListItem.Root, {
2513
2644
  role: "treeitem",
2514
2645
  ...props,
@@ -2535,20 +2666,24 @@ var TreeItem = {
2535
2666
  // src/components/List/Treegrid.tsx
2536
2667
  import { useFocusFinders } from "@fluentui/react-tabster";
2537
2668
  import { createContextScope as createContextScope2 } from "@radix-ui/react-context";
2538
- import { Primitive as Primitive13 } from "@radix-ui/react-primitive";
2539
- import { Slot as Slot13 } from "@radix-ui/react-slot";
2669
+ import { Primitive as Primitive16 } from "@radix-ui/react-primitive";
2670
+ import { Slot as Slot16 } from "@radix-ui/react-slot";
2540
2671
  import { useControllableState as useControllableState3 } from "@radix-ui/react-use-controllable-state";
2541
- import React31, { forwardRef as forwardRef24, useCallback as useCallback6 } from "react";
2672
+ import React31, { forwardRef as forwardRef19, useCallback as useCallback7 } from "react";
2673
+ import { composable as composable5, composableProps as composableProps11 } from "@dxos/ui-theme";
2542
2674
  var TREEGRID_ROW_NAME = "TreegridRow";
2543
2675
  var [createTreegridRowContext, createTreegridRowScope] = createContextScope2(TREEGRID_ROW_NAME, []);
2544
2676
  var [TreegridRowProvider, useTreegridRowContext] = createTreegridRowContext(TREEGRID_ROW_NAME);
2545
- var PATH_SEPARATOR = "~";
2546
- var PARENT_OF_SEPARATOR = " ";
2547
- var TreegridRoot = /* @__PURE__ */ forwardRef24(({ asChild, classNames, children, style, gridTemplateColumns, ...props }, forwardedRef) => {
2677
+ var TREEGRID_PATH_SEPARATOR = "~";
2678
+ var TREEGRID_PARENT_OF_SEPARATOR = " ";
2679
+ var TreegridRoot = composable5(({ asChild, classNames, children, style, gridTemplateColumns, onKeyDown: onKeyDownProp, ...props }, forwardedRef) => {
2548
2680
  const { tx } = useThemeContext();
2549
- const Comp = asChild ? Slot13 : Primitive13.div;
2681
+ const { className, role: _role, ...rest } = composableProps11(props, {
2682
+ classNames
2683
+ });
2684
+ const Comp = asChild ? Slot16 : Primitive16.div;
2550
2685
  const { findFirstFocusable } = useFocusFinders();
2551
- const handleKeyDown = useCallback6((event) => {
2686
+ const handleKeyDown = useCallback7((event) => {
2552
2687
  switch (event.key) {
2553
2688
  case "ArrowDown":
2554
2689
  case "ArrowUp": {
@@ -2577,14 +2712,15 @@ var TreegridRoot = /* @__PURE__ */ forwardRef24(({ asChild, classNames, children
2577
2712
  break;
2578
2713
  }
2579
2714
  }
2580
- props.onKeyDown?.(event);
2715
+ onKeyDownProp?.(event);
2581
2716
  }, [
2582
- findFirstFocusable
2717
+ findFirstFocusable,
2718
+ onKeyDownProp
2583
2719
  ]);
2584
2720
  return /* @__PURE__ */ React31.createElement(Comp, {
2585
2721
  role: "treegrid",
2586
- ...props,
2587
- className: tx("treegrid.root", {}, classNames),
2722
+ ...rest,
2723
+ className: tx("treegrid.root", {}, className),
2588
2724
  style: {
2589
2725
  ...style,
2590
2726
  gridTemplateColumns
@@ -2593,10 +2729,10 @@ var TreegridRoot = /* @__PURE__ */ forwardRef24(({ asChild, classNames, children
2593
2729
  ref: forwardedRef
2594
2730
  }, children);
2595
2731
  });
2596
- var TreegridRow = /* @__PURE__ */ forwardRef24(({ __treegridRowScope, asChild, classNames, children, id, parentOf, open: propsOpen, defaultOpen, onOpenChange: propsOnOpenChange, ...props }, forwardedRef) => {
2732
+ var TreegridRow = /* @__PURE__ */ forwardRef19(({ __treegridRowScope, asChild, classNames, children, id, parentOf, open: propsOpen, defaultOpen, onOpenChange: propsOnOpenChange, ...props }, forwardedRef) => {
2597
2733
  const { tx } = useThemeContext();
2598
- const Comp = asChild ? Slot13 : Primitive13.div;
2599
- const pathParts = id.split(PATH_SEPARATOR);
2734
+ const Comp = asChild ? Slot16 : Primitive16.div;
2735
+ const pathParts = id.split(TREEGRID_PATH_SEPARATOR);
2600
2736
  const level = pathParts.length - 1;
2601
2737
  const [open, onOpenChange] = useControllableState3({
2602
2738
  prop: propsOpen,
@@ -2622,7 +2758,7 @@ var TreegridRow = /* @__PURE__ */ forwardRef24(({ __treegridRowScope, asChild, c
2622
2758
  ref: forwardedRef
2623
2759
  }, children));
2624
2760
  });
2625
- var TreegridCell = /* @__PURE__ */ forwardRef24(({ classNames, children, indent, ...props }, forwardedRef) => {
2761
+ var TreegridCell = /* @__PURE__ */ forwardRef19(({ classNames, children, indent, ...props }, forwardedRef) => {
2626
2762
  const { tx } = useThemeContext();
2627
2763
  return /* @__PURE__ */ React31.createElement("div", {
2628
2764
  role: "gridcell",
@@ -2636,28 +2772,24 @@ var TreegridCell = /* @__PURE__ */ forwardRef24(({ classNames, children, indent,
2636
2772
  var Treegrid = {
2637
2773
  Root: TreegridRoot,
2638
2774
  Row: TreegridRow,
2639
- Cell: TreegridCell,
2640
- PARENT_OF_SEPARATOR,
2641
- PATH_SEPARATOR,
2642
- createTreegridRowScope,
2643
- useTreegridRowContext
2775
+ Cell: TreegridCell
2644
2776
  };
2645
2777
 
2646
2778
  // src/components/Main/Main.tsx
2647
- import { useFocusableGroup } from "@fluentui/react-tabster";
2648
- import { createContext as createContext7 } from "@radix-ui/react-context";
2779
+ import { useFocusableGroup as useFocusableGroup2 } from "@fluentui/react-tabster";
2780
+ import { createContext as createContext8 } from "@radix-ui/react-context";
2649
2781
  import { DialogContent as DialogContent2, Root as DialogRoot2, DialogTitle as DialogTitle2 } from "@radix-ui/react-dialog";
2650
- import { Primitive as Primitive14 } from "@radix-ui/react-primitive";
2651
- import { Slot as Slot14 } from "@radix-ui/react-slot";
2782
+ import { Primitive as Primitive17 } from "@radix-ui/react-primitive";
2783
+ import { Slot as Slot17 } from "@radix-ui/react-slot";
2652
2784
  import { useControllableState as useControllableState4 } from "@radix-ui/react-use-controllable-state";
2653
- import React32, { forwardRef as forwardRef25, useCallback as useCallback8, useEffect as useEffect5, useRef as useRef3, useState as useState7 } from "react";
2785
+ import React32, { forwardRef as forwardRef20, useCallback as useCallback9, useEffect as useEffect5, useRef as useRef4, useState as useState8 } from "react";
2654
2786
  import { addEventListener } from "@dxos/async";
2655
2787
  import { log } from "@dxos/log";
2656
2788
  import { useForwardedRef, useMediaQuery } from "@dxos/react-hooks";
2657
2789
  import { osTranslations as osTranslations3 } from "@dxos/ui-theme";
2658
2790
 
2659
2791
  // src/components/Main/useSwipeToDismiss.ts
2660
- import { useCallback as useCallback7, useEffect as useEffect4, useState as useState6 } from "react";
2792
+ import { useCallback as useCallback8, useEffect as useEffect4, useState as useState7 } from "react";
2661
2793
  var useSwipeToDismiss = (ref, {
2662
2794
  onDismiss,
2663
2795
  dismissThreshold = 64,
@@ -2666,22 +2798,22 @@ var useSwipeToDismiss = (ref, {
2666
2798
  /* side = 'inline-start' */
2667
2799
  }) => {
2668
2800
  const $root = ref.current;
2669
- const [motionState, setMotionState] = useState6(0);
2670
- const [gestureStartX, setGestureStartX] = useState6(0);
2671
- const setIdle = useCallback7(() => {
2801
+ const [motionState, setMotionState] = useState7(0);
2802
+ const [gestureStartX, setGestureStartX] = useState7(0);
2803
+ const setIdle = useCallback8(() => {
2672
2804
  setMotionState(0);
2673
2805
  $root?.style.removeProperty("inset-inline-start");
2674
2806
  $root?.style.setProperty("transition-duration", "200ms");
2675
2807
  }, [
2676
2808
  $root
2677
2809
  ]);
2678
- const setFollowing = useCallback7(() => {
2810
+ const setFollowing = useCallback8(() => {
2679
2811
  setMotionState(2);
2680
2812
  $root?.style.setProperty("transition-duration", "0ms");
2681
2813
  }, [
2682
2814
  $root
2683
2815
  ]);
2684
- const handlePointerDown = useCallback7(({ screenX }) => {
2816
+ const handlePointerDown = useCallback8(({ screenX }) => {
2685
2817
  if (motionState === 0) {
2686
2818
  setMotionState(1);
2687
2819
  setGestureStartX(screenX);
@@ -2689,7 +2821,7 @@ var useSwipeToDismiss = (ref, {
2689
2821
  }, [
2690
2822
  motionState
2691
2823
  ]);
2692
- const handlePointerMove = useCallback7(({ screenX }) => {
2824
+ const handlePointerMove = useCallback8(({ screenX }) => {
2693
2825
  if ($root) {
2694
2826
  const delta = Math.min(screenX - gestureStartX, 0);
2695
2827
  switch (motionState) {
@@ -2713,7 +2845,7 @@ var useSwipeToDismiss = (ref, {
2713
2845
  motionState,
2714
2846
  gestureStartX
2715
2847
  ]);
2716
- const handlePointerUp = useCallback7(() => {
2848
+ const handlePointerUp = useCallback8(() => {
2717
2849
  setIdle();
2718
2850
  }, [
2719
2851
  setIdle
@@ -2759,7 +2891,7 @@ var handleOpenAutoFocus = (event) => {
2759
2891
  };
2760
2892
  var landmarkAttr = "data-main-landmark";
2761
2893
  var useLandmarkMover = (propsOnKeyDown, landmark) => {
2762
- const handleKeyDown = useCallback8((event) => {
2894
+ const handleKeyDown = useCallback9((event) => {
2763
2895
  const target = event.target;
2764
2896
  if (event.target === event.currentTarget && event.key === "Tab" && target.hasAttribute(landmarkAttr)) {
2765
2897
  event.preventDefault();
@@ -2773,7 +2905,7 @@ var useLandmarkMover = (propsOnKeyDown, landmark) => {
2773
2905
  }, [
2774
2906
  propsOnKeyDown
2775
2907
  ]);
2776
- const focusableGroupAttrs = useFocusableGroup({
2908
+ const focusableGroupAttrs = useFocusableGroup2({
2777
2909
  tabBehavior: "limited",
2778
2910
  ignoreDefaultKeydown: {
2779
2911
  Tab: true
@@ -2786,13 +2918,13 @@ var useLandmarkMover = (propsOnKeyDown, landmark) => {
2786
2918
  ...focusableGroupAttrs
2787
2919
  };
2788
2920
  };
2789
- var [MainProvider, useMainContext] = createContext7(MAIN_NAME, {
2921
+ var [MainProvider, useMainContext] = createContext8(MAIN_NAME, {
2790
2922
  resizing: false,
2791
2923
  navigationSidebarState: "closed",
2792
2924
  setNavigationSidebarState: (_nextState) => {
2793
2925
  log.warn("Not initialized", void 0, {
2794
2926
  F: __dxlog_file,
2795
- L: 111,
2927
+ L: 110,
2796
2928
  S: void 0,
2797
2929
  C: (f, a) => f(...a)
2798
2930
  });
@@ -2801,7 +2933,7 @@ var [MainProvider, useMainContext] = createContext7(MAIN_NAME, {
2801
2933
  setComplementarySidebarState: (_nextState) => {
2802
2934
  log.warn("Not initialized", void 0, {
2803
2935
  F: __dxlog_file,
2804
- L: 116,
2936
+ L: 115,
2805
2937
  S: void 0,
2806
2938
  C: (f, a) => f(...a)
2807
2939
  });
@@ -2812,22 +2944,22 @@ var useSidebars = (consumerName) => {
2812
2944
  return {
2813
2945
  navigationSidebarState,
2814
2946
  setNavigationSidebarState,
2815
- toggleNavigationSidebar: useCallback8(() => setNavigationSidebarState(navigationSidebarState === "expanded" ? "closed" : "expanded"), [
2947
+ toggleNavigationSidebar: useCallback9(() => setNavigationSidebarState(navigationSidebarState === "expanded" ? "closed" : "expanded"), [
2816
2948
  navigationSidebarState,
2817
2949
  setNavigationSidebarState
2818
2950
  ]),
2819
- openNavigationSidebar: useCallback8(() => setNavigationSidebarState("expanded"), []),
2820
- collapseNavigationSidebar: useCallback8(() => setNavigationSidebarState("collapsed"), []),
2821
- closeNavigationSidebar: useCallback8(() => setNavigationSidebarState("closed"), []),
2951
+ openNavigationSidebar: useCallback9(() => setNavigationSidebarState("expanded"), []),
2952
+ collapseNavigationSidebar: useCallback9(() => setNavigationSidebarState("collapsed"), []),
2953
+ closeNavigationSidebar: useCallback9(() => setNavigationSidebarState("closed"), []),
2822
2954
  complementarySidebarState,
2823
2955
  setComplementarySidebarState,
2824
- toggleComplementarySidebar: useCallback8(() => setComplementarySidebarState(complementarySidebarState === "expanded" ? "closed" : "expanded"), [
2956
+ toggleComplementarySidebar: useCallback9(() => setComplementarySidebarState(complementarySidebarState === "expanded" ? "closed" : "expanded"), [
2825
2957
  complementarySidebarState,
2826
2958
  setComplementarySidebarState
2827
2959
  ]),
2828
- openComplementarySidebar: useCallback8(() => setComplementarySidebarState("expanded"), []),
2829
- collapseComplementarySidebar: useCallback8(() => setComplementarySidebarState("collapsed"), []),
2830
- closeComplementarySidebar: useCallback8(() => setComplementarySidebarState("closed"), [])
2960
+ openComplementarySidebar: useCallback9(() => setComplementarySidebarState("expanded"), []),
2961
+ collapseComplementarySidebar: useCallback9(() => setComplementarySidebarState("collapsed"), []),
2962
+ closeComplementarySidebar: useCallback9(() => setComplementarySidebarState("closed"), [])
2831
2963
  };
2832
2964
  };
2833
2965
  var MainRoot = ({ navigationSidebarState: propsNavigationSidebarState, defaultNavigationSidebarState = "closed", onNavigationSidebarStateChange, complementarySidebarState: propsComplementarySidebarState, defaultComplementarySidebarState = "closed", onComplementarySidebarStateChange, children, ...props }) => {
@@ -2842,8 +2974,8 @@ var MainRoot = ({ navigationSidebarState: propsNavigationSidebarState, defaultNa
2842
2974
  defaultProp: defaultComplementarySidebarState,
2843
2975
  onChange: onComplementarySidebarStateChange
2844
2976
  });
2845
- const [resizing, setResizing] = useState7(false);
2846
- const resizeInterval = useRef3(null);
2977
+ const [resizing, setResizing] = useState8(false);
2978
+ const resizeInterval = useRef4(null);
2847
2979
  useEffect5(() => addEventListener(window, "resize", () => {
2848
2980
  setResizing(true);
2849
2981
  if (resizeInterval.current) {
@@ -2864,7 +2996,7 @@ var MainRoot = ({ navigationSidebarState: propsNavigationSidebarState, defaultNa
2864
2996
  }, children);
2865
2997
  };
2866
2998
  MainRoot.displayName = MAIN_ROOT_NAME;
2867
- var MainOverlay = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, forwardedRef) => {
2999
+ var MainOverlay = /* @__PURE__ */ forwardRef20(({ classNames, ...props }, forwardedRef) => {
2868
3000
  const [isLg] = useMediaQuery("lg");
2869
3001
  const { navigationSidebarState, setNavigationSidebarState, complementarySidebarState, setComplementarySidebarState } = useMainContext(MAIN_OVERLAY_NAME);
2870
3002
  const { tx } = useThemeContext();
@@ -2885,16 +3017,16 @@ var MainOverlay = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, forwar
2885
3017
  });
2886
3018
  });
2887
3019
  MainOverlay.displayName = MAIN_OVERLAY_NAME;
2888
- var MainSidebar = /* @__PURE__ */ forwardRef25(({ classNames, children, swipeToDismiss, onOpenAutoFocus, state, resizing, onStateChange, side, label, ...props }, forwardedRef) => {
3020
+ var MainSidebar = /* @__PURE__ */ forwardRef20(({ classNames, children, swipeToDismiss, onOpenAutoFocus, state, resizing, onStateChange, side, label, ...props }, forwardedRef) => {
2889
3021
  const [isLg] = useMediaQuery("lg");
2890
3022
  const { tx } = useThemeContext();
2891
3023
  const { t } = useTranslation(osTranslations3);
2892
3024
  const ref = useForwardedRef(forwardedRef);
2893
- const noopRef = useRef3(null);
3025
+ const noopRef = useRef4(null);
2894
3026
  useSwipeToDismiss(swipeToDismiss ? ref : noopRef, {
2895
3027
  onDismiss: () => onStateChange?.("closed")
2896
3028
  });
2897
- const handleKeyDown = useCallback8((event) => {
3029
+ const handleKeyDown = useCallback9((event) => {
2898
3030
  const focusGroupParent = event.target.closest("[data-tabster]");
2899
3031
  if (event.key === "Escape" && focusGroupParent) {
2900
3032
  event.preventDefault();
@@ -2905,14 +3037,14 @@ var MainSidebar = /* @__PURE__ */ forwardRef25(({ classNames, children, swipeToD
2905
3037
  }, [
2906
3038
  props.onKeyDown
2907
3039
  ]);
2908
- const Root9 = isLg ? Primitive14.div : DialogContent2;
3040
+ const Root14 = isLg ? Primitive17.div : DialogContent2;
2909
3041
  return /* @__PURE__ */ React32.createElement(DialogRoot2, {
2910
3042
  open: state !== "closed",
2911
3043
  "aria-label": toLocalizedString(label, t),
2912
3044
  modal: false
2913
3045
  }, !isLg && /* @__PURE__ */ React32.createElement(DialogTitle2, {
2914
3046
  className: "sr-only"
2915
- }, toLocalizedString(label, t)), /* @__PURE__ */ React32.createElement(Root9, {
3047
+ }, toLocalizedString(label, t)), /* @__PURE__ */ React32.createElement(Root14, {
2916
3048
  ...!isLg && {
2917
3049
  forceMount: true,
2918
3050
  tabIndex: -1,
@@ -2930,7 +3062,7 @@ var MainSidebar = /* @__PURE__ */ forwardRef25(({ classNames, children, swipeToD
2930
3062
  ref
2931
3063
  }, children));
2932
3064
  });
2933
- var MainNavigationSidebar = /* @__PURE__ */ forwardRef25((props, forwardedRef) => {
3065
+ var MainNavigationSidebar = /* @__PURE__ */ forwardRef20((props, forwardedRef) => {
2934
3066
  const { navigationSidebarState, setNavigationSidebarState, resizing } = useMainContext(NAVIGATION_SIDEBAR_NAME);
2935
3067
  const mover = useLandmarkMover(props.onKeyDown, "0");
2936
3068
  return /* @__PURE__ */ React32.createElement(MainSidebar, {
@@ -2944,7 +3076,7 @@ var MainNavigationSidebar = /* @__PURE__ */ forwardRef25((props, forwardedRef) =
2944
3076
  });
2945
3077
  });
2946
3078
  MainNavigationSidebar.displayName = NAVIGATION_SIDEBAR_NAME;
2947
- var MainComplementarySidebar = /* @__PURE__ */ forwardRef25((props, forwardedRef) => {
3079
+ var MainComplementarySidebar = /* @__PURE__ */ forwardRef20((props, forwardedRef) => {
2948
3080
  const { complementarySidebarState, setComplementarySidebarState, resizing } = useMainContext(COMPLEMENTARY_SIDEBAR_NAME);
2949
3081
  const mover = useLandmarkMover(props.onKeyDown, "2");
2950
3082
  return /* @__PURE__ */ React32.createElement(MainSidebar, {
@@ -2958,17 +3090,17 @@ var MainComplementarySidebar = /* @__PURE__ */ forwardRef25((props, forwardedRef
2958
3090
  });
2959
3091
  });
2960
3092
  MainComplementarySidebar.displayName = COMPLEMENTARY_SIDEBAR_NAME;
2961
- var MainContent = /* @__PURE__ */ forwardRef25(({ asChild, classNames, bounce, handlesFocus, children, role, ...props }, forwardedRef) => {
3093
+ var MainContent = /* @__PURE__ */ forwardRef20(({ asChild, classNames, bounce, handlesFocus, children, role, ...props }, forwardedRef) => {
2962
3094
  const { navigationSidebarState, complementarySidebarState } = useMainContext(MAIN_NAME);
2963
3095
  const { tx } = useThemeContext();
2964
- const Comp = asChild ? Slot14 : role ? Primitive14.div : "main";
3096
+ const Comp = asChild ? Slot17 : role ? Primitive17.div : "main";
2965
3097
  const mover = useLandmarkMover(props.onKeyDown, "1");
2966
3098
  return /* @__PURE__ */ React32.createElement(Comp, {
2967
- role,
2968
3099
  ...handlesFocus && {
2969
3100
  ...mover
2970
3101
  },
2971
3102
  ...props,
3103
+ role,
2972
3104
  "data-sidebar-left-state": navigationSidebarState,
2973
3105
  "data-sidebar-right-state": complementarySidebarState,
2974
3106
  "data-handles-focus": handlesFocus,
@@ -2989,10 +3121,10 @@ var Main = {
2989
3121
  };
2990
3122
 
2991
3123
  // src/components/Message/Message.tsx
2992
- import { createContext as createContext8 } from "@radix-ui/react-context";
2993
- import { Primitive as Primitive15 } from "@radix-ui/react-primitive";
2994
- import { Slot as Slot15 } from "@radix-ui/react-slot";
2995
- import React33, { forwardRef as forwardRef26 } from "react";
3124
+ import { createContext as createContext9 } from "@radix-ui/react-context";
3125
+ import { Primitive as Primitive18 } from "@radix-ui/react-primitive";
3126
+ import { Slot as Slot18 } from "@radix-ui/react-slot";
3127
+ import React33, { forwardRef as forwardRef21 } from "react";
2996
3128
  import { useId as useId3 } from "@dxos/react-hooks";
2997
3129
  var messageIcons = {
2998
3130
  success: "ph--check-circle--duotone",
@@ -3002,13 +3134,13 @@ var messageIcons = {
3002
3134
  neutral: "ph--info--duotone"
3003
3135
  };
3004
3136
  var MESSAGE_NAME = "Message";
3005
- var [MessageProvider, useMessageContext] = createContext8(MESSAGE_NAME);
3006
- var MessageRoot = /* @__PURE__ */ forwardRef26(({ asChild, valence = "neutral", elevation: propsElevation, classNames, titleId: propsTitleId, descriptionId: propsDescriptionId, children, ...props }, forwardedRef) => {
3137
+ var [MessageProvider, useMessageContext] = createContext9(MESSAGE_NAME);
3138
+ var MessageRoot = /* @__PURE__ */ forwardRef21(({ asChild, valence = "neutral", elevation: propsElevation, classNames, titleId: propsTitleId, descriptionId: propsDescriptionId, children, ...props }, forwardedRef) => {
3007
3139
  const { tx } = useThemeContext();
3008
3140
  const titleId = useId3("message__title", propsTitleId);
3009
3141
  const descriptionId = useId3("message__description", propsDescriptionId);
3010
3142
  const elevation = useElevationContext(propsElevation);
3011
- const Comp = asChild ? Slot15 : Primitive15.div;
3143
+ const Comp = asChild ? Slot18 : Primitive18.div;
3012
3144
  return /* @__PURE__ */ React33.createElement(MessageProvider, {
3013
3145
  titleId,
3014
3146
  descriptionId,
@@ -3027,10 +3159,10 @@ var MessageRoot = /* @__PURE__ */ forwardRef26(({ asChild, valence = "neutral",
3027
3159
  });
3028
3160
  MessageRoot.displayName = MESSAGE_NAME;
3029
3161
  var MESSAGE_TITLE_NAME = "MessageTitle";
3030
- var MessageTitle = /* @__PURE__ */ forwardRef26(({ asChild, classNames, children, icon: iconProp, ...props }, forwardedRef) => {
3162
+ var MessageTitle = /* @__PURE__ */ forwardRef21(({ asChild, classNames, children, icon: iconProp, ...props }, forwardedRef) => {
3031
3163
  const { tx } = useThemeContext();
3032
3164
  const { titleId, valence } = useMessageContext(MESSAGE_TITLE_NAME);
3033
- const Comp = asChild ? Slot15 : Primitive15.h2;
3165
+ const Comp = asChild ? Slot18 : Primitive18.h2;
3034
3166
  const icon = iconProp ?? messageIcons[valence];
3035
3167
  return /* @__PURE__ */ React33.createElement(Comp, {
3036
3168
  ...props,
@@ -3038,7 +3170,6 @@ var MessageTitle = /* @__PURE__ */ forwardRef26(({ asChild, classNames, children
3038
3170
  id: titleId,
3039
3171
  ref: forwardedRef
3040
3172
  }, !icon && valence === "neutral" ? /* @__PURE__ */ React33.createElement("div", null) : /* @__PURE__ */ React33.createElement(Icon, {
3041
- size: 5,
3042
3173
  icon,
3043
3174
  classNames: tx("message.icon", {
3044
3175
  valence
@@ -3049,10 +3180,10 @@ var MessageTitle = /* @__PURE__ */ forwardRef26(({ asChild, classNames, children
3049
3180
  });
3050
3181
  MessageTitle.displayName = MESSAGE_TITLE_NAME;
3051
3182
  var MESSAGE_CONTENT_NAME = "MessageContent";
3052
- var MessageContent = /* @__PURE__ */ forwardRef26(({ asChild, classNames, children, ...props }, forwardedRef) => {
3183
+ var MessageContent = /* @__PURE__ */ forwardRef21(({ asChild, classNames, children, ...props }, forwardedRef) => {
3053
3184
  const { tx } = useThemeContext();
3054
3185
  const { descriptionId } = useMessageContext(MESSAGE_CONTENT_NAME);
3055
- const Comp = asChild ? Slot15 : Primitive15.p;
3186
+ const Comp = asChild ? Slot18 : Primitive18.p;
3056
3187
  return /* @__PURE__ */ React33.createElement(Comp, {
3057
3188
  ...props,
3058
3189
  className: tx("message.content", {}, classNames),
@@ -3070,7 +3201,7 @@ var Callout = Message;
3070
3201
 
3071
3202
  // src/components/Popover/Popover.tsx
3072
3203
  import { composeEventHandlers as composeEventHandlers2 } from "@radix-ui/primitive";
3073
- import { useComposedRefs } from "@radix-ui/react-compose-refs";
3204
+ import { useComposedRefs as useComposedRefs2 } from "@radix-ui/react-compose-refs";
3074
3205
  import { createContextScope as createContextScope3 } from "@radix-ui/react-context";
3075
3206
  import { DismissableLayer } from "@radix-ui/react-dismissable-layer";
3076
3207
  import { useFocusGuards } from "@radix-ui/react-focus-guards";
@@ -3080,11 +3211,11 @@ import * as PopperPrimitive from "@radix-ui/react-popper";
3080
3211
  import { createPopperScope } from "@radix-ui/react-popper";
3081
3212
  import { Portal as PortalPrimitive } from "@radix-ui/react-portal";
3082
3213
  import { Presence } from "@radix-ui/react-presence";
3083
- import { Primitive as Primitive16 } from "@radix-ui/react-primitive";
3084
- import { Slot as Slot16 } from "@radix-ui/react-slot";
3214
+ import { Primitive as Primitive19 } from "@radix-ui/react-primitive";
3215
+ import { Slot as Slot19 } from "@radix-ui/react-slot";
3085
3216
  import { useControllableState as useControllableState5 } from "@radix-ui/react-use-controllable-state";
3086
3217
  import { hideOthers } from "aria-hidden";
3087
- import React34, { forwardRef as forwardRef27, useCallback as useCallback9, useEffect as useEffect6, useMemo as useMemo4, useRef as useRef4, useState as useState8 } from "react";
3218
+ import React34, { forwardRef as forwardRef22, useCallback as useCallback10, useEffect as useEffect6, useMemo as useMemo5, useRef as useRef5, useState as useState9 } from "react";
3088
3219
  import { RemoveScroll } from "react-remove-scroll";
3089
3220
  var POPOVER_NAME = "Popover";
3090
3221
  var [createPopoverContext, createPopoverScope] = createContextScope3(POPOVER_NAME, [
@@ -3095,8 +3226,8 @@ var [PopoverProvider, usePopoverContext] = createPopoverContext(POPOVER_NAME);
3095
3226
  var PopoverRoot = (props) => {
3096
3227
  const { __scopePopover, children, open: openProp, defaultOpen, onOpenChange, modal = false } = props;
3097
3228
  const popperScope = usePopperScope(__scopePopover);
3098
- const triggerRef = useRef4(null);
3099
- const [hasCustomAnchor, setHasCustomAnchor] = useState8(false);
3229
+ const triggerRef = useRef5(null);
3230
+ const [hasCustomAnchor, setHasCustomAnchor] = useState9(false);
3100
3231
  const [open = false, setOpen] = useControllableState5({
3101
3232
  prop: openProp,
3102
3233
  defaultProp: defaultOpen,
@@ -3108,18 +3239,18 @@ var PopoverRoot = (props) => {
3108
3239
  triggerRef,
3109
3240
  open,
3110
3241
  onOpenChange: setOpen,
3111
- onOpenToggle: useCallback9(() => setOpen((prevOpen) => !prevOpen), [
3242
+ onOpenToggle: useCallback10(() => setOpen((prevOpen) => !prevOpen), [
3112
3243
  setOpen
3113
3244
  ]),
3114
3245
  hasCustomAnchor,
3115
- onCustomAnchorAdd: useCallback9(() => setHasCustomAnchor(true), []),
3116
- onCustomAnchorRemove: useCallback9(() => setHasCustomAnchor(false), []),
3246
+ onCustomAnchorAdd: useCallback10(() => setHasCustomAnchor(true), []),
3247
+ onCustomAnchorRemove: useCallback10(() => setHasCustomAnchor(false), []),
3117
3248
  modal
3118
3249
  }, children));
3119
3250
  };
3120
3251
  PopoverRoot.displayName = POPOVER_NAME;
3121
3252
  var ANCHOR_NAME = "PopoverAnchor";
3122
- var PopoverAnchor = /* @__PURE__ */ forwardRef27((props, forwardedRef) => {
3253
+ var PopoverAnchor = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
3123
3254
  const { __scopePopover, ...anchorProps } = props;
3124
3255
  const context = usePopoverContext(ANCHOR_NAME, __scopePopover);
3125
3256
  const popperScope = usePopperScope(__scopePopover);
@@ -3139,12 +3270,12 @@ var PopoverAnchor = /* @__PURE__ */ forwardRef27((props, forwardedRef) => {
3139
3270
  });
3140
3271
  PopoverAnchor.displayName = ANCHOR_NAME;
3141
3272
  var TRIGGER_NAME2 = "PopoverTrigger";
3142
- var PopoverTrigger = /* @__PURE__ */ forwardRef27((props, forwardedRef) => {
3273
+ var PopoverTrigger = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
3143
3274
  const { __scopePopover, asChild, ...triggerProps } = props;
3144
3275
  const context = usePopoverContext(TRIGGER_NAME2, __scopePopover);
3145
3276
  const popperScope = usePopperScope(__scopePopover);
3146
- const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
3147
- const Comp = asChild ? Slot16 : Primitive16.button;
3277
+ const composedTriggerRef = useComposedRefs2(forwardedRef, context.triggerRef);
3278
+ const Comp = asChild ? Slot19 : Primitive19.button;
3148
3279
  const trigger = /* @__PURE__ */ React34.createElement(Comp, {
3149
3280
  type: "button",
3150
3281
  "aria-haspopup": "dialog",
@@ -3196,7 +3327,7 @@ var PopoverPortal = (props) => {
3196
3327
  };
3197
3328
  PopoverPortal.displayName = PORTAL_NAME2;
3198
3329
  var CONTENT_NAME2 = "PopoverContent";
3199
- var PopoverContent = /* @__PURE__ */ forwardRef27((props, forwardedRef) => {
3330
+ var PopoverContent = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
3200
3331
  const portalContext = usePortalContext(CONTENT_NAME2, props.__scopePopover);
3201
3332
  const { forceMount = portalContext.forceMount, ...contentProps } = props;
3202
3333
  const context = usePopoverContext(CONTENT_NAME2, props.__scopePopover);
@@ -3211,11 +3342,11 @@ var PopoverContent = /* @__PURE__ */ forwardRef27((props, forwardedRef) => {
3211
3342
  }));
3212
3343
  });
3213
3344
  PopoverContent.displayName = CONTENT_NAME2;
3214
- var PopoverContentModal = /* @__PURE__ */ forwardRef27((props, forwardedRef) => {
3345
+ var PopoverContentModal = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
3215
3346
  const context = usePopoverContext(CONTENT_NAME2, props.__scopePopover);
3216
- const contentRef = useRef4(null);
3217
- const composedRefs = useComposedRefs(forwardedRef, contentRef);
3218
- const isRightClickOutsideRef = useRef4(false);
3347
+ const contentRef = useRef5(null);
3348
+ const composedRefs = useComposedRefs2(forwardedRef, contentRef);
3349
+ const isRightClickOutsideRef = useRef5(false);
3219
3350
  useEffect6(() => {
3220
3351
  const content = contentRef.current;
3221
3352
  if (content) {
@@ -3223,7 +3354,7 @@ var PopoverContentModal = /* @__PURE__ */ forwardRef27((props, forwardedRef) =>
3223
3354
  }
3224
3355
  }, []);
3225
3356
  return /* @__PURE__ */ React34.createElement(RemoveScroll, {
3226
- as: Slot16,
3357
+ as: Slot19,
3227
3358
  allowPinchZoom: true
3228
3359
  }, /* @__PURE__ */ React34.createElement(PopoverContentImpl, {
3229
3360
  ...props,
@@ -3252,10 +3383,10 @@ var PopoverContentModal = /* @__PURE__ */ forwardRef27((props, forwardedRef) =>
3252
3383
  })
3253
3384
  }));
3254
3385
  });
3255
- var PopoverContentNonModal = /* @__PURE__ */ forwardRef27((props, forwardedRef) => {
3386
+ var PopoverContentNonModal = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
3256
3387
  const context = usePopoverContext(CONTENT_NAME2, props.__scopePopover);
3257
- const hasInteractedOutsideRef = useRef4(false);
3258
- const hasPointerDownOutsideRef = useRef4(false);
3388
+ const hasInteractedOutsideRef = useRef5(false);
3389
+ const hasPointerDownOutsideRef = useRef5(false);
3259
3390
  return /* @__PURE__ */ React34.createElement(PopoverContentImpl, {
3260
3391
  ...props,
3261
3392
  ref: forwardedRef,
@@ -3291,7 +3422,7 @@ var PopoverContentNonModal = /* @__PURE__ */ forwardRef27((props, forwardedRef)
3291
3422
  }
3292
3423
  });
3293
3424
  });
3294
- var PopoverContentImpl = /* @__PURE__ */ forwardRef27((props, forwardedRef) => {
3425
+ var PopoverContentImpl = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
3295
3426
  const { __scopePopover, trapFocus, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, collisionPadding = 8, collisionBoundary, classNames, ...contentProps } = props;
3296
3427
  const context = usePopoverContext(CONTENT_NAME2, __scopePopover);
3297
3428
  const popperScope = usePopperScope(__scopePopover);
@@ -3299,7 +3430,7 @@ var PopoverContentImpl = /* @__PURE__ */ forwardRef27((props, forwardedRef) => {
3299
3430
  const elevation = useElevationContext();
3300
3431
  const safeCollisionPadding = useSafeCollisionPadding(collisionPadding);
3301
3432
  useFocusGuards();
3302
- const computedCollisionBoundary = useMemo4(() => {
3433
+ const computedCollisionBoundary = useMemo5(() => {
3303
3434
  const closestBoundary = context.triggerRef.current?.closest("[data-popover-collision-boundary]");
3304
3435
  return closestBoundary ? Array.isArray(collisionBoundary) ? [
3305
3436
  closestBoundary,
@@ -3355,10 +3486,10 @@ var PopoverContentImpl = /* @__PURE__ */ forwardRef27((props, forwardedRef) => {
3355
3486
  })));
3356
3487
  });
3357
3488
  var CLOSE_NAME = "PopoverClose";
3358
- var PopoverClose = /* @__PURE__ */ forwardRef27((props, forwardedRef) => {
3489
+ var PopoverClose = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
3359
3490
  const { __scopePopover, ...closeProps } = props;
3360
3491
  const context = usePopoverContext(CLOSE_NAME, __scopePopover);
3361
- return /* @__PURE__ */ React34.createElement(Primitive16.button, {
3492
+ return /* @__PURE__ */ React34.createElement(Primitive19.button, {
3362
3493
  type: "button",
3363
3494
  ...closeProps,
3364
3495
  ref: forwardedRef,
@@ -3367,7 +3498,7 @@ var PopoverClose = /* @__PURE__ */ forwardRef27((props, forwardedRef) => {
3367
3498
  });
3368
3499
  PopoverClose.displayName = CLOSE_NAME;
3369
3500
  var ARROW_NAME2 = "PopoverArrow";
3370
- var PopoverArrow = /* @__PURE__ */ forwardRef27((props, forwardedRef) => {
3501
+ var PopoverArrow = /* @__PURE__ */ forwardRef22((props, forwardedRef) => {
3371
3502
  const { __scopePopover, classNames, ...arrowProps } = props;
3372
3503
  const popperScope = usePopperScope(__scopePopover);
3373
3504
  const { tx } = useThemeContext();
@@ -3379,9 +3510,9 @@ var PopoverArrow = /* @__PURE__ */ forwardRef27((props, forwardedRef) => {
3379
3510
  });
3380
3511
  });
3381
3512
  PopoverArrow.displayName = ARROW_NAME2;
3382
- var PopoverViewport = /* @__PURE__ */ forwardRef27(({ classNames, asChild, constrainInline = true, constrainBlock = true, children, ...props }, forwardedRef) => {
3513
+ var PopoverViewport = /* @__PURE__ */ forwardRef22(({ classNames, asChild, constrainInline = true, constrainBlock = true, children, ...props }, forwardedRef) => {
3383
3514
  const { tx } = useThemeContext();
3384
- const Comp = asChild ? Slot16 : Primitive16.div;
3515
+ const Comp = asChild ? Slot19 : Primitive19.div;
3385
3516
  return /* @__PURE__ */ React34.createElement(Comp, {
3386
3517
  ...props,
3387
3518
  className: tx("popover.viewport", {
@@ -3405,8 +3536,8 @@ var Popover = {
3405
3536
  };
3406
3537
 
3407
3538
  // src/components/Status/Status.tsx
3408
- import React35, { forwardRef as forwardRef28 } from "react";
3409
- var Status = /* @__PURE__ */ forwardRef28(({ classNames, children, progress = 0, indeterminate, variant, ...props }, forwardedRef) => {
3539
+ import React35, { forwardRef as forwardRef23 } from "react";
3540
+ var Status = /* @__PURE__ */ forwardRef23(({ classNames, children, progress = 0, indeterminate, variant, ...props }, forwardedRef) => {
3410
3541
  const { tx } = useThemeContext();
3411
3542
  return /* @__PURE__ */ React35.createElement("span", {
3412
3543
  role: "status",
@@ -3431,26 +3562,33 @@ var Status = /* @__PURE__ */ forwardRef28(({ classNames, children, progress = 0,
3431
3562
  });
3432
3563
 
3433
3564
  // src/components/ScrollArea/ScrollArea.tsx
3434
- import { createContext as createContext9 } from "@radix-ui/react-context";
3435
- import { Primitive as Primitive17 } from "@radix-ui/react-primitive";
3436
- import { Slot as Slot17 } from "@radix-ui/react-slot";
3437
- import React36, { forwardRef as forwardRef29 } from "react";
3438
- import { composableProps as composableProps8 } from "@dxos/ui-theme";
3565
+ import { createContext as createContext10 } from "@radix-ui/react-context";
3566
+ import { Primitive as Primitive20 } from "@radix-ui/react-primitive";
3567
+ import { Slot as Slot20 } from "@radix-ui/react-slot";
3568
+ import React36, { useMemo as useMemo6 } from "react";
3569
+ import { composableProps as composableProps12, scrollbar, slottable as slottable9 } from "@dxos/ui-theme";
3439
3570
  var SCROLLAREA_NAME = "ScrollArea";
3440
- var [ScrollAreaProvider, useScrollAreaContext] = createContext9(SCROLLAREA_NAME);
3571
+ var [ScrollAreaProvider, useScrollAreaContext] = createContext10(SCROLLAREA_NAME);
3441
3572
  var SCROLLAREA_ROOT_NAME = "ScrollArea.Root";
3442
- var ScrollAreaRoot = /* @__PURE__ */ forwardRef29(({ children, asChild, orientation = "vertical", autoHide = true, margin = false, padding = false, thin = false, snap = false, ...props }, forwardedRef) => {
3443
- const { className, ...rest } = composableProps8(props);
3444
- const Comp = asChild ? Slot17 : Primitive17.div;
3573
+ var ScrollAreaRoot = slottable9(({ children, asChild, orientation = "vertical", autoHide = true, centered = false, padding = false, thin = false, snap = false, ...props }, forwardedRef) => {
3445
3574
  const { tx } = useThemeContext();
3446
- const options = {
3575
+ const { className, ...rest } = composableProps12(props);
3576
+ const Comp = asChild ? Slot20 : Primitive20.div;
3577
+ const options = useMemo6(() => ({
3447
3578
  orientation,
3448
3579
  autoHide,
3449
- margin,
3580
+ centered,
3450
3581
  padding,
3451
3582
  thin,
3452
3583
  snap
3453
- };
3584
+ }), [
3585
+ orientation,
3586
+ autoHide,
3587
+ centered,
3588
+ padding,
3589
+ thin,
3590
+ snap
3591
+ ]);
3454
3592
  return /* @__PURE__ */ React36.createElement(ScrollAreaProvider, options, /* @__PURE__ */ React36.createElement(Comp, {
3455
3593
  ...rest,
3456
3594
  className: tx("scrollArea.root", options, className),
@@ -3459,12 +3597,21 @@ var ScrollAreaRoot = /* @__PURE__ */ forwardRef29(({ children, asChild, orientat
3459
3597
  });
3460
3598
  ScrollAreaRoot.displayName = SCROLLAREA_ROOT_NAME;
3461
3599
  var SCROLLAREA_VIEWPORT_NAME = "ScrollArea.Viewport";
3462
- var ScrollAreaViewport = /* @__PURE__ */ forwardRef29(({ classNames, children, ...props }, forwardedRef) => {
3600
+ var ScrollAreaViewport = slottable9(({ children, asChild, ...props }, forwardedRef) => {
3463
3601
  const { tx } = useThemeContext();
3464
3602
  const options = useScrollAreaContext(SCROLLAREA_VIEWPORT_NAME);
3465
- return /* @__PURE__ */ React36.createElement("div", {
3466
- ...props,
3467
- className: tx("scrollArea.viewport", options, classNames),
3603
+ const density = options.thin ? scrollbar.thin : scrollbar.coarse;
3604
+ const { className, ...rest } = composableProps12(props);
3605
+ const { style, ...restWithoutStyle } = rest;
3606
+ const Comp = asChild ? Slot20 : Primitive20.div;
3607
+ return /* @__PURE__ */ React36.createElement(Comp, {
3608
+ ...restWithoutStyle,
3609
+ style: {
3610
+ "--scroll-width": `${density.size}px`,
3611
+ "--scroll-padding": `${density.padding}px`,
3612
+ ...style
3613
+ },
3614
+ className: tx("scrollArea.viewport", options, className),
3468
3615
  ref: forwardedRef
3469
3616
  }, children);
3470
3617
  });
@@ -3475,47 +3622,52 @@ var ScrollArea = {
3475
3622
  };
3476
3623
 
3477
3624
  // src/components/ScrollContainer/ScrollContainer.tsx
3478
- import { createContext as createContext10 } from "@radix-ui/react-context";
3479
- import React37, { forwardRef as forwardRef30, useCallback as useCallback10, useEffect as useEffect7, useImperativeHandle, useMemo as useMemo5, useRef as useRef5, useState as useState9 } from "react";
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";
3480
3627
  import { addEventListener as addEventListener2, combine } from "@dxos/async";
3481
3628
  import { invariant } from "@dxos/invariant";
3482
- import { useForwardedRef as useForwardedRef2 } from "@dxos/react-hooks";
3483
- import { mx as mx10 } from "@dxos/ui-theme";
3629
+ import { useMergeRefs } from "@dxos/react-hooks";
3630
+ import { composable as composable6, composableProps as composableProps13, slottable as slottable10 } from "@dxos/ui-theme";
3631
+ import { mx as mx9 } from "@dxos/ui-theme";
3484
3632
  var __dxlog_file2 = "/__w/dxos/dxos/packages/ui/react-ui/src/components/ScrollContainer/ScrollContainer.tsx";
3485
3633
  var isBottom = (el) => {
3486
3634
  return !!(el && el.scrollHeight - el.scrollTop === el.clientHeight);
3487
3635
  };
3488
- var [ScrollContainerProvider, useScrollContainerContext] = createContext10("ScrollContainer");
3489
- var Root6 = /* @__PURE__ */ forwardRef30(({ children, classNames, pin, fade, behavior: behaviorProp = "smooth" }, forwardedRef) => {
3490
- const scrollerRef = useRef5(null);
3491
- const autoScrollRef = useRef5(false);
3492
- const [overflow, setOverflow] = useState9(false);
3493
- const [pinned, setPinned] = useState9(pin);
3494
- const timeoutRef = useRef5(void 0);
3495
- const scrollToBottom = useCallback10((behavior = behaviorProp) => {
3636
+ var [ScrollContainerProvider, useScrollContainerContext] = createContext11("ScrollContainer");
3637
+ var Root10 = /* @__PURE__ */ forwardRef24(({ children, pin, behavior: behaviorProp = "smooth" }, forwardedRef) => {
3638
+ const scrollerRef = useRef6(null);
3639
+ const autoScrollRef = useRef6(false);
3640
+ const [pinned, setPinned] = useState10(pin);
3641
+ const [overflow, setOverflow] = useState10(false);
3642
+ const timeoutRef = useRef6(void 0);
3643
+ const scrollToBottom = useCallback11((behavior = behaviorProp) => {
3496
3644
  if (scrollerRef.current) {
3497
- autoScrollRef.current = true;
3498
- scrollerRef.current.classList.add("scrollbar-none");
3499
- scrollerRef.current.scrollTo({
3500
- top: scrollerRef.current.scrollHeight,
3501
- behavior
3502
- });
3503
- clearTimeout(timeoutRef.current);
3504
3645
  if (behavior !== "instant") {
3646
+ autoScrollRef.current = true;
3647
+ scrollerRef.current.classList.add("scrollbar-none");
3648
+ clearTimeout(timeoutRef.current);
3505
3649
  timeoutRef.current = setTimeout(() => {
3506
3650
  scrollerRef.current?.classList.remove("scrollbar-none");
3507
3651
  autoScrollRef.current = false;
3508
3652
  }, 500);
3509
3653
  }
3654
+ scrollerRef.current.scrollTo({
3655
+ top: scrollerRef.current.scrollHeight,
3656
+ behavior
3657
+ });
3510
3658
  setPinned(true);
3511
3659
  }
3512
- }, []);
3513
- const controller = useMemo5(() => ({
3514
- viewport: scrollerRef.current,
3660
+ }, [
3661
+ behaviorProp
3662
+ ]);
3663
+ const controller = useMemo7(() => ({
3664
+ get viewport() {
3665
+ return scrollerRef.current;
3666
+ },
3515
3667
  scrollToTop: () => {
3516
3668
  invariant(scrollerRef.current, void 0, {
3517
3669
  F: __dxlog_file2,
3518
- L: 95,
3670
+ L: 108,
3519
3671
  S: void 0,
3520
3672
  A: [
3521
3673
  "scrollerRef.current",
@@ -3528,108 +3680,154 @@ var Root6 = /* @__PURE__ */ forwardRef30(({ children, classNames, pin, fade, beh
3528
3680
  });
3529
3681
  setPinned(false);
3530
3682
  },
3531
- scrollToBottom: () => {
3532
- scrollToBottom("smooth");
3683
+ scrollToBottom: (behavior = "smooth") => {
3684
+ scrollToBottom(behavior);
3533
3685
  }
3534
3686
  }), [
3535
- scrollToBottom,
3536
- scrollerRef.current
3687
+ scrollToBottom
3537
3688
  ]);
3538
3689
  useImperativeHandle(forwardedRef, () => controller, [
3539
3690
  controller
3540
3691
  ]);
3541
- useEffect7(() => {
3542
- if (!scrollerRef.current) {
3543
- return;
3544
- }
3545
- return combine(
3546
- // Check if user scrolls.
3547
- addEventListener2(scrollerRef.current, "wheel", () => {
3548
- setPinned(isBottom(scrollerRef.current));
3549
- }),
3550
- // Check if scrolls.
3551
- addEventListener2(scrollerRef.current, "scroll", () => {
3552
- setOverflow((scrollerRef.current?.scrollTop ?? 0) > 0);
3553
- })
3554
- );
3692
+ const setViewport = useCallback11((el) => {
3693
+ scrollerRef.current = el;
3555
3694
  }, []);
3556
3695
  return /* @__PURE__ */ React37.createElement(ScrollContainerProvider, {
3557
3696
  pinned,
3697
+ overflow,
3558
3698
  controller,
3559
- scrollToBottom
3560
- }, /* @__PURE__ */ React37.createElement("div", {
3561
- className: "relative grid dx-container overflow-hidden"
3562
- }, fade && /* @__PURE__ */ React37.createElement("div", {
3563
- role: "none",
3564
- "data-visible": overflow,
3565
- className: mx10(
3566
- // NOTE: Gradients may not be visible with dark reader extensions.
3567
- "z-10 absolute top-0 inset-x-0 h-24 w-full",
3568
- 'opacity-0 duration-200 transition-opacity data-[visible="true"]:opacity-100',
3569
- "bg-gradient-to-b from-(--surface-bg) to-transparent pointer-events-none"
3570
- )
3571
- }), /* @__PURE__ */ React37.createElement(ScrollArea.Root, {
3572
- classNames: mx10("min-h-0", classNames),
3573
- thin: true
3574
- }, /* @__PURE__ */ React37.createElement(ScrollArea.Viewport, {
3575
- ref: scrollerRef
3576
- }, children))));
3577
- });
3578
- Root6.displayName = "ScrollContainer.Root";
3699
+ setViewport,
3700
+ setPinned,
3701
+ setOverflow
3702
+ }, children);
3703
+ });
3704
+ Root10.displayName = "ScrollContainer.Root";
3705
+ var Content6 = composable6(({ children, thin, padding, centered, ...props }, forwardedRef) => {
3706
+ return /* @__PURE__ */ React37.createElement(ScrollArea.Root, {
3707
+ ...composableProps13(props, {
3708
+ classNames: "relative"
3709
+ }),
3710
+ thin,
3711
+ padding,
3712
+ centered,
3713
+ ref: forwardedRef
3714
+ }, children);
3715
+ });
3716
+ Content6.displayName = "ScrollContainer.Content";
3579
3717
  var VIEWPORT_NAME = "ScrollContainer.Viewport";
3580
- var Viewport = /* @__PURE__ */ forwardRef30(({ classNames, children, ...props }, forwardedRef) => {
3581
- const contentRef = useForwardedRef2(forwardedRef);
3582
- const { pinned, scrollToBottom } = useScrollContainerContext(VIEWPORT_NAME);
3718
+ var Viewport = slottable10(({ children, asChild, ...props }, forwardedRef) => {
3719
+ const scrollerRef = useRef6(null);
3720
+ const mergedRef = useMergeRefs([
3721
+ forwardedRef,
3722
+ scrollerRef
3723
+ ]);
3724
+ const { setViewport, setPinned, setOverflow } = useScrollContainerContext(VIEWPORT_NAME);
3583
3725
  useEffect7(() => {
3584
- if (!pinned || !contentRef.current) {
3726
+ const el = scrollerRef.current;
3727
+ if (!el) {
3585
3728
  return;
3586
3729
  }
3587
- scrollToBottom();
3588
- const resizeObserver = new ResizeObserver(() => scrollToBottom());
3589
- resizeObserver.observe(contentRef.current);
3590
- return () => resizeObserver.disconnect();
3730
+ setViewport(el);
3731
+ return combine(addEventListener2(el, "wheel", () => setPinned(isBottom(el))), addEventListener2(el, "scroll", () => setOverflow((el.scrollTop ?? 0) > 0)), () => setViewport(null));
3591
3732
  }, [
3592
- pinned,
3593
- scrollToBottom
3733
+ setViewport,
3734
+ setPinned,
3735
+ setOverflow
3594
3736
  ]);
3595
- return /* @__PURE__ */ React37.createElement("div", {
3596
- className: mx10("w-full", classNames),
3597
- ...props,
3598
- ref: contentRef
3599
- }, children);
3737
+ return /* @__PURE__ */ React37.createElement(React37.Fragment, null, /* @__PURE__ */ React37.createElement(ScrollArea.Viewport, {
3738
+ asChild,
3739
+ ...composableProps13(props),
3740
+ ref: mergedRef
3741
+ }, children), /* @__PURE__ */ React37.createElement(PinEffect, {
3742
+ scrollerRef
3743
+ }));
3600
3744
  });
3601
3745
  Viewport.displayName = VIEWPORT_NAME;
3746
+ var PIN_EFFECT_NAME = "ScrollContainer.PinEffect";
3747
+ var PinEffect = ({ scrollerRef }) => {
3748
+ const { pinned, controller } = useScrollContainerContext(PIN_EFFECT_NAME);
3749
+ useEffect7(() => {
3750
+ const viewport = scrollerRef.current;
3751
+ if (!pinned || !viewport) {
3752
+ return;
3753
+ }
3754
+ controller?.scrollToBottom("instant");
3755
+ const resizeObserver = new ResizeObserver(() => controller?.scrollToBottom("smooth"));
3756
+ Array.from(viewport.children).forEach((child) => {
3757
+ resizeObserver.observe(child);
3758
+ });
3759
+ const mutationObserver = new MutationObserver((mutations) => {
3760
+ mutations.forEach((mutation) => {
3761
+ mutation.addedNodes.forEach((node) => {
3762
+ if (node instanceof Element) {
3763
+ resizeObserver.observe(node);
3764
+ }
3765
+ });
3766
+ });
3767
+ controller?.scrollToBottom("smooth");
3768
+ });
3769
+ mutationObserver.observe(viewport, {
3770
+ childList: true
3771
+ });
3772
+ return () => {
3773
+ resizeObserver.disconnect();
3774
+ mutationObserver.disconnect();
3775
+ };
3776
+ }, [
3777
+ pinned,
3778
+ controller,
3779
+ scrollerRef
3780
+ ]);
3781
+ return null;
3782
+ };
3783
+ var FADE_NAME = "ScrollContainer.Fade";
3784
+ var Fade = () => {
3785
+ const { overflow } = useScrollContainerContext(FADE_NAME);
3786
+ return /* @__PURE__ */ React37.createElement("div", {
3787
+ role: "none",
3788
+ "data-visible": overflow,
3789
+ className: mx9(
3790
+ // NOTE: Gradients may not be visible with dark reader extensions.
3791
+ "z-10 absolute top-0 inset-x-0 h-24 w-full",
3792
+ 'opacity-0 duration-200 transition-opacity data-[visible="true"]:opacity-100',
3793
+ "bg-gradient-to-b from-(--surface-bg) to-transparent pointer-events-none"
3794
+ )
3795
+ });
3796
+ };
3797
+ Fade.displayName = FADE_NAME;
3602
3798
  var SCROLL_DOWN_BUTTON_NAME = "ScrollContainer.ScrollDownButton";
3603
3799
  var ScrollDownButton = ({ classNames }) => {
3604
- const { pinned, scrollToBottom } = useScrollContainerContext(SCROLL_DOWN_BUTTON_NAME);
3800
+ const { pinned, controller } = useScrollContainerContext(SCROLL_DOWN_BUTTON_NAME);
3605
3801
  return /* @__PURE__ */ React37.createElement("div", {
3606
3802
  role: "none",
3607
- className: mx10("absolute bottom-2 right-4 opacity-100 transition-opacity duration-300", pinned && "opacity-0", classNames)
3803
+ className: mx9("absolute bottom-2 right-4 opacity-100 transition-opacity duration-300", pinned && "opacity-0", classNames)
3608
3804
  }, /* @__PURE__ */ React37.createElement(IconButton, {
3609
3805
  variant: "primary",
3610
3806
  icon: "ph--arrow-down--regular",
3611
3807
  iconOnly: true,
3612
3808
  size: 4,
3613
3809
  label: "Scroll down",
3614
- onClick: () => scrollToBottom()
3810
+ onClick: () => controller?.scrollToBottom()
3615
3811
  }));
3616
3812
  };
3617
3813
  ScrollDownButton.displayName = SCROLL_DOWN_BUTTON_NAME;
3618
3814
  var ScrollContainer = {
3619
- Root: Root6,
3815
+ Root: Root10,
3816
+ Content: Content6,
3620
3817
  Viewport,
3818
+ Fade,
3621
3819
  ScrollDownButton
3622
3820
  };
3623
3821
 
3624
3822
  // src/components/Select/Select.tsx
3625
3823
  import * as SelectPrimitive from "@radix-ui/react-select";
3626
- import React38, { forwardRef as forwardRef31 } from "react";
3824
+ import React38, { forwardRef as forwardRef25 } from "react";
3627
3825
  var SelectRoot = SelectPrimitive.Root;
3628
3826
  var SelectTrigger = SelectPrimitive.Trigger;
3629
3827
  var SelectValue = SelectPrimitive.Value;
3630
3828
  var SelectIcon = SelectPrimitive.Icon;
3631
3829
  var SelectPortal = SelectPrimitive.Portal;
3632
- var SelectTriggerButton = /* @__PURE__ */ forwardRef31(({ children, placeholder, ...props }, forwardedRef) => {
3830
+ var SelectTriggerButton = /* @__PURE__ */ forwardRef25(({ children, placeholder, ...props }, forwardedRef) => {
3633
3831
  return /* @__PURE__ */ React38.createElement(SelectPrimitive.Trigger, {
3634
3832
  asChild: true,
3635
3833
  ref: forwardedRef
@@ -3644,7 +3842,7 @@ var SelectTriggerButton = /* @__PURE__ */ forwardRef31(({ children, placeholder,
3644
3842
  icon: "ph--caret-down--bold"
3645
3843
  }))));
3646
3844
  });
3647
- var SelectContent = /* @__PURE__ */ forwardRef31(({ classNames, children, collisionPadding = 8, ...props }, forwardedRef) => {
3845
+ var SelectContent = /* @__PURE__ */ forwardRef25(({ classNames, children, collisionPadding = 8, ...props }, forwardedRef) => {
3648
3846
  const { tx } = useThemeContext();
3649
3847
  const elevation = useElevationContext();
3650
3848
  const safeCollisionPadding = useSafeCollisionPadding(collisionPadding);
@@ -3659,7 +3857,7 @@ var SelectContent = /* @__PURE__ */ forwardRef31(({ classNames, children, collis
3659
3857
  ref: forwardedRef
3660
3858
  }, children);
3661
3859
  });
3662
- var SelectScrollUpButton2 = /* @__PURE__ */ forwardRef31(({ classNames, children, ...props }, forwardedRef) => {
3860
+ var SelectScrollUpButton2 = /* @__PURE__ */ forwardRef25(({ classNames, children, ...props }, forwardedRef) => {
3663
3861
  const { tx } = useThemeContext();
3664
3862
  return /* @__PURE__ */ React38.createElement(SelectPrimitive.SelectScrollUpButton, {
3665
3863
  ...props,
@@ -3670,7 +3868,7 @@ var SelectScrollUpButton2 = /* @__PURE__ */ forwardRef31(({ classNames, children
3670
3868
  icon: "ph--caret-up--bold"
3671
3869
  }));
3672
3870
  });
3673
- var SelectScrollDownButton2 = /* @__PURE__ */ forwardRef31(({ classNames, children, ...props }, forwardedRef) => {
3871
+ var SelectScrollDownButton2 = /* @__PURE__ */ forwardRef25(({ classNames, children, ...props }, forwardedRef) => {
3674
3872
  const { tx } = useThemeContext();
3675
3873
  return /* @__PURE__ */ React38.createElement(SelectPrimitive.SelectScrollDownButton, {
3676
3874
  ...props,
@@ -3681,7 +3879,7 @@ var SelectScrollDownButton2 = /* @__PURE__ */ forwardRef31(({ classNames, childr
3681
3879
  icon: "ph--caret-down--bold"
3682
3880
  }));
3683
3881
  });
3684
- var SelectViewport2 = /* @__PURE__ */ forwardRef31(({ classNames, children, ...props }, forwardedRef) => {
3882
+ var SelectViewport2 = /* @__PURE__ */ forwardRef25(({ classNames, children, ...props }, forwardedRef) => {
3685
3883
  const { tx } = useThemeContext();
3686
3884
  return /* @__PURE__ */ React38.createElement(SelectPrimitive.SelectViewport, {
3687
3885
  ...props,
@@ -3689,7 +3887,7 @@ var SelectViewport2 = /* @__PURE__ */ forwardRef31(({ classNames, children, ...p
3689
3887
  ref: forwardedRef
3690
3888
  }, children);
3691
3889
  });
3692
- var SelectItem = /* @__PURE__ */ forwardRef31(({ classNames, ...props }, forwardedRef) => {
3890
+ var SelectItem = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, forwardedRef) => {
3693
3891
  const { tx } = useThemeContext();
3694
3892
  return /* @__PURE__ */ React38.createElement(SelectPrimitive.Item, {
3695
3893
  ...props,
@@ -3698,7 +3896,7 @@ var SelectItem = /* @__PURE__ */ forwardRef31(({ classNames, ...props }, forward
3698
3896
  });
3699
3897
  });
3700
3898
  var SelectItemText = SelectPrimitive.ItemText;
3701
- var SelectItemIndicator = /* @__PURE__ */ forwardRef31(({ classNames, children, ...props }, forwardedRef) => {
3899
+ var SelectItemIndicator = /* @__PURE__ */ forwardRef25(({ classNames, children, ...props }, forwardedRef) => {
3702
3900
  const { tx } = useThemeContext();
3703
3901
  return /* @__PURE__ */ React38.createElement(SelectPrimitive.ItemIndicator, {
3704
3902
  ...props,
@@ -3706,7 +3904,7 @@ var SelectItemIndicator = /* @__PURE__ */ forwardRef31(({ classNames, children,
3706
3904
  ref: forwardedRef
3707
3905
  }, children);
3708
3906
  });
3709
- var SelectOption = /* @__PURE__ */ forwardRef31(({ children, classNames, ...props }, forwardedRef) => {
3907
+ var SelectOption = /* @__PURE__ */ forwardRef25(({ children, classNames, ...props }, forwardedRef) => {
3710
3908
  const { tx } = useThemeContext();
3711
3909
  return /* @__PURE__ */ React38.createElement(SelectPrimitive.Item, {
3712
3910
  ...props,
@@ -3720,7 +3918,7 @@ var SelectOption = /* @__PURE__ */ forwardRef31(({ children, classNames, ...prop
3720
3918
  });
3721
3919
  var SelectGroup = SelectPrimitive.Group;
3722
3920
  var SelectLabel = SelectPrimitive.Label;
3723
- var SelectSeparator = /* @__PURE__ */ forwardRef31(({ classNames, ...props }, forwardedRef) => {
3921
+ var SelectSeparator = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, forwardedRef) => {
3724
3922
  const { tx } = useThemeContext();
3725
3923
  return /* @__PURE__ */ React38.createElement(SelectPrimitive.Separator, {
3726
3924
  ...props,
@@ -3728,7 +3926,7 @@ var SelectSeparator = /* @__PURE__ */ forwardRef31(({ classNames, ...props }, fo
3728
3926
  ref: forwardedRef
3729
3927
  });
3730
3928
  });
3731
- var SelectArrow = /* @__PURE__ */ forwardRef31(({ classNames, ...props }, forwardedRef) => {
3929
+ var SelectArrow = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, forwardedRef) => {
3732
3930
  const { tx } = useThemeContext();
3733
3931
  return /* @__PURE__ */ React38.createElement(SelectPrimitive.Arrow, {
3734
3932
  ...props,
@@ -3758,8 +3956,8 @@ var Select = {
3758
3956
  };
3759
3957
 
3760
3958
  // src/components/Skeleton/Skeleton.tsx
3761
- import React39, { forwardRef as forwardRef32 } from "react";
3762
- var Skeleton = /* @__PURE__ */ forwardRef32(({ classNames, variant = "default", ...props }, forwardedRef) => {
3959
+ import React39, { forwardRef as forwardRef26 } from "react";
3960
+ var Skeleton = /* @__PURE__ */ forwardRef26(({ classNames, variant = "default", ...props }, forwardedRef) => {
3763
3961
  const { tx } = useThemeContext();
3764
3962
  return /* @__PURE__ */ React39.createElement("div", {
3765
3963
  ...props,
@@ -3772,47 +3970,47 @@ var Skeleton = /* @__PURE__ */ forwardRef32(({ classNames, variant = "default",
3772
3970
 
3773
3971
  // src/components/Splitter/Splitter.tsx
3774
3972
  import { createContextScope as createContextScope4 } from "@radix-ui/react-context";
3775
- import { Primitive as Primitive18 } from "@radix-ui/react-primitive";
3776
- import { Slot as Slot18 } from "@radix-ui/react-slot";
3777
- import React40, { forwardRef as forwardRef33 } from "react";
3778
- import { composableProps as composableProps9 } from "@dxos/ui-theme";
3973
+ import { Primitive as Primitive21 } from "@radix-ui/react-primitive";
3974
+ import { Slot as Slot21 } from "@radix-ui/react-slot";
3975
+ import React40 from "react";
3976
+ import { composableProps as composableProps14, slottable as slottable11 } from "@dxos/ui-theme";
3779
3977
  var SPLITTER_NAME = "Splitter";
3780
3978
  var [createSplitterContext, createSplitterScope] = createContextScope4(SPLITTER_NAME);
3781
3979
  var [SplitterProvider, useSplitterContext] = createSplitterContext(SPLITTER_NAME);
3782
3980
  var ROOT_NAME = "Splitter.Root";
3783
- var Root8 = /* @__PURE__ */ forwardRef33(({ __scopeSplitter, asChild, mode = "upper", ratio = 0.5, transition = 250, children, ...props }, forwardedRef) => {
3784
- const { className, ...rest } = composableProps9(props);
3785
- const Comp = asChild ? Slot18 : Primitive18.div;
3981
+ var Root12 = slottable11(({ asChild, mode = "top", ratio = 0.5, transition = 250, children, ...props }, forwardedRef) => {
3786
3982
  const { tx } = useThemeContext();
3983
+ const { __scopeSplitter, ...rest } = props;
3984
+ const { className, ...restProps } = composableProps14(rest);
3985
+ const Comp = asChild ? Slot21 : Primitive21.div;
3787
3986
  return /* @__PURE__ */ React40.createElement(SplitterProvider, {
3788
3987
  scope: __scopeSplitter,
3789
3988
  mode,
3790
3989
  ratio,
3791
3990
  transition
3792
3991
  }, /* @__PURE__ */ React40.createElement(Comp, {
3793
- role: "none",
3794
- ...rest,
3992
+ ...restProps,
3795
3993
  ref: forwardedRef,
3796
3994
  className: tx("splitter.root", {}, className)
3797
3995
  }, children));
3798
3996
  });
3799
- Root8.displayName = ROOT_NAME;
3997
+ Root12.displayName = ROOT_NAME;
3800
3998
  var PANEL_NAME = "Splitter.Panel";
3801
- var Panel2 = /* @__PURE__ */ forwardRef33(({ __scopeSplitter, asChild, children, position, style, ...props }, forwardedRef) => {
3802
- const { className, ...rest } = composableProps9(props);
3803
- const Comp = asChild ? Slot18 : Primitive18.div;
3804
- const { mode, ratio, transition } = useSplitterContext(PANEL_NAME, __scopeSplitter);
3999
+ var Panel2 = slottable11(({ classNames, asChild, children, position, style, ...props }, forwardedRef) => {
3805
4000
  const { tx } = useThemeContext();
3806
- const isUpper = position === "upper";
3807
- const top = isUpper ? "0%" : mode === "upper" ? "100%" : mode === "lower" ? "0%" : `${ratio * 100}%`;
3808
- const height = isUpper ? mode === "upper" ? "100%" : mode === "lower" ? "0%" : `${ratio * 100}%` : mode === "lower" ? "100%" : mode === "upper" ? "0%" : `${(1 - ratio) * 100}%`;
4001
+ const { __scopeSplitter, ...rest } = props;
4002
+ const Comp = asChild ? Slot21 : Primitive21.div;
4003
+ const { mode, ratio = 0.5, transition } = useSplitterContext(PANEL_NAME, __scopeSplitter);
4004
+ const { className, ...restProps } = composableProps14(rest);
4005
+ const isTopPanel = position === "top";
4006
+ const topOffset = isTopPanel ? "0%" : mode === "top" ? "100%" : mode === "bottom" ? "0%" : `${ratio * 100}%`;
4007
+ const height = isTopPanel ? mode === "top" ? "100%" : mode === "bottom" ? "0%" : `${ratio * 100}%` : mode === "bottom" ? "100%" : mode === "top" ? "0%" : `${(1 - ratio) * 100}%`;
3809
4008
  return /* @__PURE__ */ React40.createElement(Comp, {
3810
- role: "none",
3811
- ...rest,
4009
+ ...restProps,
3812
4010
  ref: forwardedRef,
3813
4011
  className: tx("splitter.panel", {}, className),
3814
4012
  style: {
3815
- top,
4013
+ top: topOffset,
3816
4014
  height,
3817
4015
  transition: `top ${transition}ms, height ${transition}ms ease-out`,
3818
4016
  ...style
@@ -3821,17 +4019,17 @@ var Panel2 = /* @__PURE__ */ forwardRef33(({ __scopeSplitter, asChild, children,
3821
4019
  });
3822
4020
  Panel2.displayName = PANEL_NAME;
3823
4021
  var Splitter = {
3824
- Root: Root8,
4022
+ Root: Root12,
3825
4023
  Panel: Panel2
3826
4024
  };
3827
4025
 
3828
4026
  // src/components/Tag/Tag.tsx
3829
- import { Primitive as Primitive19 } from "@radix-ui/react-primitive";
3830
- import { Slot as Slot19 } from "@radix-ui/react-slot";
3831
- import React41, { forwardRef as forwardRef34 } from "react";
3832
- var Tag = /* @__PURE__ */ forwardRef34(({ asChild, palette = "neutral", classNames, ...props }, forwardedRef) => {
4027
+ import { Primitive as Primitive22 } from "@radix-ui/react-primitive";
4028
+ import { Slot as Slot22 } from "@radix-ui/react-slot";
4029
+ import React41, { forwardRef as forwardRef27 } from "react";
4030
+ var Tag = /* @__PURE__ */ forwardRef27(({ asChild, palette = "neutral", classNames, ...props }, forwardedRef) => {
3833
4031
  const { tx } = useThemeContext();
3834
- const Comp = asChild ? Slot19 : Primitive19.span;
4032
+ const Comp = asChild ? Slot22 : Primitive22.span;
3835
4033
  return /* @__PURE__ */ React41.createElement(Comp, {
3836
4034
  ...props,
3837
4035
  className: tx("tag.root", {
@@ -3843,21 +4041,22 @@ var Tag = /* @__PURE__ */ forwardRef34(({ asChild, palette = "neutral", classNam
3843
4041
  });
3844
4042
 
3845
4043
  // src/components/Toast/Toast.tsx
3846
- import { Primitive as Primitive20 } from "@radix-ui/react-primitive";
3847
- import { Slot as Slot20 } from "@radix-ui/react-slot";
3848
- import { ToastAction as ToastActionPrimitive, ToastClose as ToastClosePrimitive, ToastDescription as ToastDescriptionPrimitive, ToastProvider as ToastProviderPrimitive, Root as ToastRootPrimitive, ToastTitle as ToastTitlePrimitive, ToastViewport as ToastViewportPrimitive } from "@radix-ui/react-toast";
3849
- import React42, { forwardRef as forwardRef35 } from "react";
3850
- var ToastProvider = ToastProviderPrimitive;
3851
- var ToastViewport = /* @__PURE__ */ forwardRef35(({ classNames, ...props }, forwardedRef) => {
4044
+ import { Primitive as Primitive23 } from "@radix-ui/react-primitive";
4045
+ import { Slot as Slot23 } from "@radix-ui/react-slot";
4046
+ import * as ToastPrimitive from "@radix-ui/react-toast";
4047
+ import React42, { forwardRef as forwardRef28 } from "react";
4048
+ var ToastProvider = ToastPrimitive.Provider;
4049
+ var ToastViewport = /* @__PURE__ */ forwardRef28(({ classNames, ...props }, forwardedRef) => {
3852
4050
  const { tx } = useThemeContext();
3853
- return /* @__PURE__ */ React42.createElement(ToastViewportPrimitive, {
4051
+ return /* @__PURE__ */ React42.createElement(ToastPrimitive.Viewport, {
4052
+ ...props,
3854
4053
  className: tx("toast.viewport", {}, classNames),
3855
4054
  ref: forwardedRef
3856
4055
  });
3857
4056
  });
3858
- var ToastRoot = /* @__PURE__ */ forwardRef35(({ classNames, children, ...props }, forwardedRef) => {
4057
+ var ToastRoot = /* @__PURE__ */ forwardRef28(({ classNames, children, ...props }, forwardedRef) => {
3859
4058
  const { tx } = useThemeContext();
3860
- return /* @__PURE__ */ React42.createElement(ToastRootPrimitive, {
4059
+ return /* @__PURE__ */ React42.createElement(ToastPrimitive.Root, {
3861
4060
  ...props,
3862
4061
  className: tx("toast.root", {}, classNames),
3863
4062
  ref: forwardedRef
@@ -3865,44 +4064,44 @@ var ToastRoot = /* @__PURE__ */ forwardRef35(({ classNames, children, ...props }
3865
4064
  elevation: "toast"
3866
4065
  }, children));
3867
4066
  });
3868
- var ToastBody = /* @__PURE__ */ forwardRef35(({ asChild, classNames, ...props }, forwardedRef) => {
4067
+ var ToastBody = /* @__PURE__ */ forwardRef28(({ asChild, classNames, ...props }, forwardedRef) => {
3869
4068
  const { tx } = useThemeContext();
3870
- const Comp = asChild ? Slot20 : Primitive20.div;
4069
+ const Comp = asChild ? Slot23 : Primitive23.div;
3871
4070
  return /* @__PURE__ */ React42.createElement(Comp, {
3872
4071
  ...props,
3873
4072
  className: tx("toast.body", {}, classNames),
3874
4073
  ref: forwardedRef
3875
4074
  });
3876
4075
  });
3877
- var ToastTitle = /* @__PURE__ */ forwardRef35(({ asChild, classNames, ...props }, forwardedRef) => {
4076
+ var ToastTitle = /* @__PURE__ */ forwardRef28(({ asChild, classNames, ...props }, forwardedRef) => {
3878
4077
  const { tx } = useThemeContext();
3879
- const Comp = asChild ? Slot20 : ToastTitlePrimitive;
4078
+ const Comp = asChild ? Slot23 : ToastPrimitive.Title;
3880
4079
  return /* @__PURE__ */ React42.createElement(Comp, {
3881
4080
  ...props,
3882
4081
  className: tx("toast.title", {}, classNames),
3883
4082
  ref: forwardedRef
3884
4083
  });
3885
4084
  });
3886
- var ToastDescription = /* @__PURE__ */ forwardRef35(({ asChild, classNames, ...props }, forwardedRef) => {
4085
+ var ToastDescription = /* @__PURE__ */ forwardRef28(({ asChild, classNames, ...props }, forwardedRef) => {
3887
4086
  const { tx } = useThemeContext();
3888
- const Comp = asChild ? Slot20 : ToastDescriptionPrimitive;
4087
+ const Comp = asChild ? Slot23 : ToastPrimitive.Description;
3889
4088
  return /* @__PURE__ */ React42.createElement(Comp, {
3890
4089
  ...props,
3891
4090
  className: tx("toast.description", {}, classNames),
3892
4091
  ref: forwardedRef
3893
4092
  });
3894
4093
  });
3895
- var ToastActions = /* @__PURE__ */ forwardRef35(({ asChild, classNames, ...props }, forwardedRef) => {
4094
+ var ToastActions = /* @__PURE__ */ forwardRef28(({ asChild, classNames, ...props }, forwardedRef) => {
3896
4095
  const { tx } = useThemeContext();
3897
- const Comp = asChild ? Slot20 : Primitive20.div;
4096
+ const Comp = asChild ? Slot23 : Primitive23.div;
3898
4097
  return /* @__PURE__ */ React42.createElement(Comp, {
3899
4098
  ...props,
3900
4099
  className: tx("toast.actions", {}, classNames),
3901
4100
  ref: forwardedRef
3902
4101
  });
3903
4102
  });
3904
- var ToastAction = ToastActionPrimitive;
3905
- var ToastClose = ToastClosePrimitive;
4103
+ var ToastAction = ToastPrimitive.Action;
4104
+ var ToastClose = ToastPrimitive.Close;
3906
4105
  var Toast = {
3907
4106
  Provider: ToastProvider,
3908
4107
  Viewport: ToastViewport,
@@ -3937,6 +4136,7 @@ export {
3937
4136
  ErrorFallback,
3938
4137
  ErrorStack,
3939
4138
  Flex,
4139
+ Focus,
3940
4140
  Grid,
3941
4141
  Icon,
3942
4142
  IconButton,
@@ -3958,6 +4158,8 @@ export {
3958
4158
  Skeleton,
3959
4159
  Splitter,
3960
4160
  Status,
4161
+ TREEGRID_PARENT_OF_SEPARATOR,
4162
+ TREEGRID_PATH_SEPARATOR,
3961
4163
  Tag,
3962
4164
  ThemeContext,
3963
4165
  ThemeProvider,
@@ -3967,7 +4169,7 @@ export {
3967
4169
  ToggleGroup,
3968
4170
  ToggleGroupIconItem,
3969
4171
  ToggleGroupItem,
3970
- Toolbar2 as Toolbar,
4172
+ Toolbar,
3971
4173
  Tooltip,
3972
4174
  Trans,
3973
4175
  Tree,
@@ -3981,6 +4183,7 @@ export {
3981
4183
  initialSafeArea,
3982
4184
  isLabel,
3983
4185
  messageIcons,
4186
+ parseCaptureOwnerStack,
3984
4187
  toLocalizedString,
3985
4188
  useAvatarContext,
3986
4189
  useButtonGroupContext,
@@ -3989,6 +4192,7 @@ export {
3989
4192
  useDropdownMenuContext,
3990
4193
  useDropdownMenuMenuScope,
3991
4194
  useElevationContext,
4195
+ useFocus,
3992
4196
  useIconHref,
3993
4197
  useLandmarkMover,
3994
4198
  useListContext,
@@ -3996,6 +4200,7 @@ export {
3996
4200
  useMainContext,
3997
4201
  usePx,
3998
4202
  useSafeArea,
4203
+ useSafeCollisionPadding,
3999
4204
  useScrollContainerContext,
4000
4205
  useSidebars,
4001
4206
  useThemeContext,