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