@adecore/ui 0.53.3 → 0.54.1

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 (184) hide show
  1. package/dist/Banner.d.ts +1 -1
  2. package/dist/ButtonGroup.js +1 -1
  3. package/dist/Checkbox.js +1 -1
  4. package/dist/ChoiceCards.d.ts +1 -1
  5. package/dist/ChoiceCards.js +2 -2
  6. package/dist/CloseButton.js +1 -1
  7. package/dist/ColorSwatch.d.ts +1 -1
  8. package/dist/ColorSwatch.js +1 -1
  9. package/dist/ColorWheelPicker.js +1 -1
  10. package/dist/CopyButton.js +1 -1
  11. package/dist/DockShell.js +1 -1
  12. package/dist/EmptyState.d.ts +1 -1
  13. package/dist/EmptyState.js +1 -1
  14. package/dist/ErrorBoundary.js +122 -112
  15. package/dist/Field.d.ts +1 -1
  16. package/dist/Field.js +2 -2
  17. package/dist/FileIcon.d.ts +1 -1
  18. package/dist/FileIcon.js +44 -36
  19. package/dist/Icon.d.ts +1 -1
  20. package/dist/IconButton.d.ts +3 -3
  21. package/dist/IconButton.js +2 -2
  22. package/dist/IconPicker.js +35 -32
  23. package/dist/Input.d.ts +1 -1
  24. package/dist/ListRow.js +1 -1
  25. package/dist/MiddleTruncate.js +2 -2
  26. package/dist/PanelEmpty.d.ts +1 -1
  27. package/dist/PanelHeader.d.ts +1 -1
  28. package/dist/PanelHeader.js +1 -1
  29. package/dist/ProjectSwitcher.js +1 -1
  30. package/dist/PromptDialog.d.ts +1 -1
  31. package/dist/ScrollArea.d.ts +12 -0
  32. package/dist/ScrollArea.js +144 -0
  33. package/dist/SectionLabel.js +1 -1
  34. package/dist/SegmentBar.js +1 -1
  35. package/dist/Segmented.d.ts +1 -1
  36. package/dist/Select.d.ts +1 -1
  37. package/dist/Select.js +22 -16
  38. package/dist/SelectSearch.js +49 -33
  39. package/dist/ShortcutHints.js +1 -1
  40. package/dist/Slider.js +2 -2
  41. package/dist/SlidingColumn.js +1 -1
  42. package/dist/SplitButton.js +1 -1
  43. package/dist/Surface.js +1 -1
  44. package/dist/Switch.js +1 -1
  45. package/dist/TextMenu.js +2 -2
  46. package/dist/Toasts.js +2 -2
  47. package/dist/Tooltip.d.ts +1 -1
  48. package/dist/Tooltip.js +1 -1
  49. package/dist/UIProvider.d.ts +1 -1
  50. package/dist/Waveform.js +1 -1
  51. package/dist/Wipe.js +2 -2
  52. package/dist/combobox/parts.d.ts +3 -3
  53. package/dist/combobox/parts.js +53 -32
  54. package/dist/command-palette/parts.d.ts +1 -1
  55. package/dist/command-palette/parts.js +22 -7
  56. package/dist/command-palette/virtual.js +4 -4
  57. package/dist/dialog/parts.d.ts +1 -1
  58. package/dist/dialog/parts.js +2 -2
  59. package/dist/file-icon.d.ts +2 -0
  60. package/dist/file-icon.js +12 -0
  61. package/dist/file-tree/parts.d.ts +2 -2
  62. package/dist/file-tree/parts.js +3 -3
  63. package/dist/file-tree/use-file-tree-shift.d.ts +1 -1
  64. package/dist/file-tree/use-file-tree-shift.js +1 -1
  65. package/dist/index.d.ts +2 -0
  66. package/dist/index.js +2 -0
  67. package/dist/key-value-list/parts.js +1 -1
  68. package/dist/menu/parts.d.ts +3 -3
  69. package/dist/menu/parts.js +46 -30
  70. package/dist/popover/parts.d.ts +3 -3
  71. package/dist/popover/parts.js +110 -71
  72. package/dist/project-switcher-row.js +1 -1
  73. package/dist/scrollbar-geometry.d.ts +15 -0
  74. package/dist/scrollbar-geometry.js +48 -0
  75. package/dist/settings/MasterDetail.js +40 -30
  76. package/dist/settings/SettingsDialog.d.ts +1 -1
  77. package/dist/settings/SettingsDialog.js +27 -11
  78. package/dist/settings/SettingsRow.d.ts +1 -1
  79. package/dist/settings/SettingsRow.js +1 -1
  80. package/dist/settings/SettingsSection.d.ts +1 -1
  81. package/dist/tabs/parts.d.ts +1 -1
  82. package/dist/tabs/parts.js +3 -3
  83. package/dist/testing/dedupe.js +1 -1
  84. package/dist/theme.css +91 -1
  85. package/dist/tree/parts.js +2 -2
  86. package/dist/useOverlayScrollbars.d.ts +7 -0
  87. package/dist/useOverlayScrollbars.js +281 -0
  88. package/dist/workspace/PaneBar.js +2 -2
  89. package/dist/workspace/SplitView.d.ts +1 -1
  90. package/dist/workspace/SplitView.js +4 -4
  91. package/dist/workspace/TabStrip.d.ts +1 -1
  92. package/dist/workspace/TabStrip.js +2 -2
  93. package/dist/workspace/Workspace.d.ts +1 -1
  94. package/dist/workspace/Workspace.js +2 -2
  95. package/dist/workspace/WorkspaceRail.js +1 -1
  96. package/dist/workspace/WorkspaceTopRow.js +1 -1
  97. package/package.json +1 -1
  98. package/src/AccentSwatches.tsx +1 -1
  99. package/src/Banner.tsx +1 -1
  100. package/src/Button.tsx +1 -1
  101. package/src/ButtonGroup.tsx +1 -1
  102. package/src/Checkbox.tsx +2 -2
  103. package/src/ChoiceCards.tsx +3 -3
  104. package/src/CloseButton.tsx +2 -2
  105. package/src/ColorSwatch.tsx +2 -2
  106. package/src/ColorWheelPicker.tsx +1 -1
  107. package/src/ColumnResizeHandle.tsx +1 -1
  108. package/src/CopyButton.tsx +1 -1
  109. package/src/DockShell.tsx +1 -1
  110. package/src/EmptyState.tsx +2 -2
  111. package/src/ErrorBoundary.tsx +4 -3
  112. package/src/Field.tsx +2 -2
  113. package/src/FileIcon.tsx +15 -6
  114. package/src/Icon.tsx +2 -2
  115. package/src/IconButton.tsx +3 -3
  116. package/src/IconPicker.tsx +7 -6
  117. package/src/Input.tsx +2 -2
  118. package/src/Kbd.tsx +1 -1
  119. package/src/ListRow.tsx +1 -1
  120. package/src/Meter.tsx +1 -1
  121. package/src/MiddleTruncate.tsx +2 -2
  122. package/src/PanelEmpty.tsx +2 -2
  123. package/src/PanelHeader.tsx +2 -2
  124. package/src/Pill.tsx +1 -1
  125. package/src/ProjectSwitcher.tsx +2 -2
  126. package/src/PromptDialog.tsx +1 -1
  127. package/src/RelativeTime.tsx +1 -1
  128. package/src/ScrollArea.tsx +47 -0
  129. package/src/SectionLabel.tsx +1 -1
  130. package/src/SegmentBar.tsx +1 -1
  131. package/src/Segmented.tsx +1 -1
  132. package/src/Select.tsx +6 -2
  133. package/src/SelectSearch.tsx +19 -12
  134. package/src/Separator.tsx +1 -1
  135. package/src/ShortcutHints.tsx +1 -1
  136. package/src/Skeleton.tsx +1 -1
  137. package/src/Slider.tsx +2 -2
  138. package/src/SlidingColumn.tsx +1 -1
  139. package/src/Spinner.tsx +1 -1
  140. package/src/SplitButton.tsx +1 -1
  141. package/src/Stepper.tsx +1 -1
  142. package/src/Surface.tsx +1 -1
  143. package/src/Switch.tsx +2 -2
  144. package/src/TextMenu.tsx +2 -2
  145. package/src/Tile.tsx +1 -1
  146. package/src/Toasts.tsx +2 -2
  147. package/src/Tooltip.tsx +2 -2
  148. package/src/UIProvider.tsx +1 -1
  149. package/src/Waveform.tsx +1 -1
  150. package/src/Wipe.tsx +2 -2
  151. package/src/ZoomControls.tsx +1 -1
  152. package/src/combobox/parts.tsx +9 -4
  153. package/src/command-palette/parts.tsx +25 -19
  154. package/src/command-palette/virtual.tsx +4 -4
  155. package/src/dialog/parts.tsx +2 -2
  156. package/src/file-icon.ts +15 -0
  157. package/src/file-tree/parts.tsx +6 -6
  158. package/src/file-tree/use-empty-lines.ts +1 -1
  159. package/src/file-tree/use-file-tree-shift.tsx +2 -2
  160. package/src/file-tree/use-slots.ts +2 -2
  161. package/src/index.ts +2 -0
  162. package/src/key-value-list/parts.tsx +1 -1
  163. package/src/menu/parts.tsx +11 -6
  164. package/src/popover/parts.tsx +13 -5
  165. package/src/project-switcher-row.tsx +2 -2
  166. package/src/scrollbar-geometry.ts +67 -0
  167. package/src/select-shared.ts +1 -1
  168. package/src/settings/DetailHeader.tsx +1 -1
  169. package/src/settings/MasterDetail.tsx +9 -6
  170. package/src/settings/SettingsDialog.tsx +16 -9
  171. package/src/settings/SettingsRow.tsx +1 -1
  172. package/src/settings/SettingsSection.tsx +1 -1
  173. package/src/tabs/parts.tsx +4 -4
  174. package/src/testing/dedupe.ts +1 -1
  175. package/src/theme.css +91 -1
  176. package/src/tree/parts.tsx +2 -2
  177. package/src/useOverlayScrollbars.tsx +263 -0
  178. package/src/workspace/DropPreview.tsx +1 -1
  179. package/src/workspace/PaneBar.tsx +2 -2
  180. package/src/workspace/SplitView.tsx +5 -5
  181. package/src/workspace/TabStrip.tsx +3 -3
  182. package/src/workspace/Workspace.tsx +2 -2
  183. package/src/workspace/WorkspaceRail.tsx +1 -1
  184. package/src/workspace/WorkspaceTopRow.tsx +1 -1
package/dist/Banner.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import type { ReactNode, Ref } from 'react';
2
1
  import type { LucideIcon } from 'lucide-react';
2
+ import type { ReactNode, Ref } from 'react';
3
3
  export type BannerTone = 'attention' | 'error' | 'neutral';
4
4
  export interface BannerProps {
5
5
  icon: LucideIcon;
@@ -1,6 +1,6 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import clsx from 'clsx';
3
2
  import { useRender } from '@base-ui/react/use-render';
3
+ import clsx from 'clsx';
4
4
  /* Icon buttons that belong together sit 1px apart; groups keep the wider gap of their container. */
5
5
  export function ButtonGroup(t0) {
6
6
  const $ = _c(14);
package/dist/Checkbox.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
+ import { Checkbox as BaseCheckbox } from '@base-ui/react/checkbox';
2
3
  import clsx from 'clsx';
3
4
  import { Check, Minus } from 'lucide-react';
4
- import { Checkbox as BaseCheckbox } from '@base-ui/react/checkbox';
5
5
  import { Icon } from "./Icon.js";
6
6
  /* Picked or not, as one item out of a list or an option that waits for a Save button. */
7
7
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -1,5 +1,5 @@
1
- import { type ReactNode, type Ref } from 'react';
2
1
  import type { LucideIcon } from 'lucide-react';
2
+ import { type ReactNode, type Ref } from 'react';
3
3
  export interface Choice<Value extends string | number> {
4
4
  value: Value;
5
5
  title: string;
@@ -1,8 +1,8 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { Fragment, useId } from 'react';
3
- import clsx from 'clsx';
4
2
  import { Radio } from '@base-ui/react/radio';
5
3
  import { RadioGroup } from '@base-ui/react/radio-group';
4
+ import clsx from 'clsx';
5
+ import { Fragment, useId } from 'react';
6
6
  import { Icon } from "./Icon.js";
7
7
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
8
  function ChoiceCard(t0) {
@@ -1,6 +1,6 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { X } from 'lucide-react';
3
2
  import { Dialog } from '@base-ui/react/dialog';
3
+ import { X } from 'lucide-react';
4
4
  import { IconButton } from "./IconButton.js";
5
5
  /* The close button in the header of every panel and dialog. In a dialog it is that dialog's own close part. */
6
6
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -1,5 +1,5 @@
1
- import type { ComponentProps } from 'react';
2
1
  import { useRender } from '@base-ui/react/use-render';
2
+ import type { ComponentProps } from 'react';
3
3
  declare const PICKED_RING: {
4
4
  readonly surface: 'ring-2 ring-accent ring-offset-2 ring-offset-surface';
5
5
  readonly popup: 'ring-2 ring-accent ring-offset-1 ring-offset-surface-raised';
@@ -1,7 +1,7 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
+ import { useRender } from '@base-ui/react/use-render';
2
3
  import clsx from 'clsx';
3
4
  import { Check } from 'lucide-react';
4
- import { useRender } from '@base-ui/react/use-render';
5
5
  import { Icon } from "./Icon.js";
6
6
  /* `focus-ring` for the swatch that is a menu item rather than a button, which the keyboard reaches all the same. */
7
7
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -1,6 +1,6 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { useEffect, useId, useRef, useState } from 'react';
3
2
  import { ChevronDown } from 'lucide-react';
3
+ import { useEffect, useId, useRef, useState } from 'react';
4
4
  import { ColorSwatch } from "./ColorSwatch.js";
5
5
  import { Icon } from "./Icon.js";
6
6
  import { PopoverPopup, PopoverRoot, PopoverTrigger } from "./popover/parts.js";
@@ -1,7 +1,7 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
+ import { Check, Copy } from 'lucide-react';
2
3
  import { useEffect, useState } from 'react';
3
4
  import { useTranslation } from 'react-i18next';
4
- import { Check, Copy } from 'lucide-react';
5
5
  import { Button } from "./Button.js";
6
6
  import { copyText } from './clipboard.js';
7
7
  import { Icon } from "./Icon.js";
package/dist/DockShell.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { useEffect, useRef, useState } from 'react';
3
2
  import clsx from 'clsx';
3
+ import { useEffect, useRef, useState } from 'react';
4
4
  import { Surface } from "./Surface.js";
5
5
  /* How close to the bottom of the window the pointer has to come before a hidden dock slides back. */
6
6
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -1,5 +1,5 @@
1
- import { type ReactElement, type ReactNode, type Ref } from 'react';
2
1
  import type { LucideIcon } from 'lucide-react';
2
+ import { type ReactElement, type ReactNode, type Ref } from 'react';
3
3
  export interface EmptyStateProps {
4
4
  icon?: LucideIcon | ReactElement<{
5
5
  size?: number;
@@ -1,6 +1,6 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { cloneElement, isValidElement } from 'react';
3
2
  import clsx from 'clsx';
3
+ import { cloneElement, isValidElement } from 'react';
4
4
  import { Icon } from "./Icon.js";
5
5
  import { Spinner } from "./Spinner.js";
6
6
  // One size in a panel, a card and a dialog alike, so no caller picks its own.
@@ -1,13 +1,14 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { Component } from 'react';
3
2
  import clsx from 'clsx';
4
3
  import { RotateCw, TriangleAlert } from 'lucide-react';
4
+ import { Component } from 'react';
5
5
  import { useTranslation } from 'react-i18next';
6
6
  import { Button } from "./Button.js";
7
7
  import { ButtonGroup } from "./ButtonGroup.js";
8
8
  import { CopyButton } from "./CopyButton.js";
9
9
  import { errorMessageOf, errorReport, shouldReset } from './error-boundary.js';
10
10
  import { Icon } from "./Icon.js";
11
+ import { ScrollArea } from "./ScrollArea.js";
11
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
12
13
  const CLEAR = {
13
14
  error: null,
@@ -16,7 +17,7 @@ const CLEAR = {
16
17
  };
17
18
  /* A function component, so the words come from the i18next instance the app renders with. */
18
19
  function ErrorFallback(t0) {
19
- const $ = _c(46);
20
+ const $ = _c(48);
20
21
  const {
21
22
  label,
22
23
  error,
@@ -29,101 +30,108 @@ function ErrorFallback(t0) {
29
30
  const {
30
31
  t
31
32
  } = useTranslation("ui");
32
- const t1 = compact ? "p-3" : "p-6";
33
- let t2;
34
- if ($[0] !== className || $[1] !== t1) {
35
- t2 = clsx("grid place-items-center overflow-auto bg-surface", t1, className);
33
+ let t1;
34
+ if ($[0] !== className) {
35
+ t1 = clsx("bg-surface", className);
36
36
  $[0] = className;
37
37
  $[1] = t1;
38
- $[2] = t2;
39
38
  } else {
40
- t2 = $[2];
39
+ t1 = $[1];
41
40
  }
42
- const t3 = compact ? "gap-1" : "gap-2";
43
- let t4;
44
- if ($[3] !== t3) {
45
- t4 = clsx("flex max-w-[360px] flex-col items-center text-center", t3);
41
+ const t2 = compact ? "p-3" : "p-6";
42
+ let t3;
43
+ if ($[2] !== t2) {
44
+ t3 = clsx("grid place-items-center", t2);
45
+ $[2] = t2;
46
46
  $[3] = t3;
47
- $[4] = t4;
48
47
  } else {
49
- t4 = $[4];
48
+ t3 = $[3];
50
49
  }
50
+ const t4 = compact ? "gap-1" : "gap-2";
51
51
  let t5;
52
- if ($[5] !== compact) {
53
- t5 = !compact && /*#__PURE__*/_jsx(Icon, {
52
+ if ($[4] !== t4) {
53
+ t5 = clsx("flex max-w-[360px] flex-col items-center text-center", t4);
54
+ $[4] = t4;
55
+ $[5] = t5;
56
+ } else {
57
+ t5 = $[5];
58
+ }
59
+ let t6;
60
+ if ($[6] !== compact) {
61
+ t6 = !compact && /*#__PURE__*/_jsx(Icon, {
54
62
  icon: TriangleAlert,
55
63
  size: 20,
56
64
  className: "text-status-error"
57
65
  });
58
- $[5] = compact;
59
- $[6] = t5;
66
+ $[6] = compact;
67
+ $[7] = t6;
60
68
  } else {
61
- t5 = $[6];
69
+ t6 = $[7];
62
70
  }
63
- let t6;
64
- if ($[7] !== label) {
65
- t6 = /*#__PURE__*/_jsx("p", {
71
+ let t7;
72
+ if ($[8] !== label) {
73
+ t7 = /*#__PURE__*/_jsx("p", {
66
74
  className: "text-sm font-medium text-text",
67
75
  children: label
68
76
  });
69
- $[7] = label;
70
- $[8] = t6;
77
+ $[8] = label;
78
+ $[9] = t7;
71
79
  } else {
72
- t6 = $[8];
80
+ t7 = $[9];
73
81
  }
74
- let t7;
75
- if ($[9] !== error) {
76
- t7 = errorMessageOf(error);
77
- $[9] = error;
78
- $[10] = t7;
82
+ let t8;
83
+ if ($[10] !== error) {
84
+ t8 = errorMessageOf(error);
85
+ $[10] = error;
86
+ $[11] = t8;
79
87
  } else {
80
- t7 = $[10];
88
+ t8 = $[11];
81
89
  }
82
- let t8;
83
- if ($[11] !== t7) {
84
- t8 = /*#__PURE__*/_jsx("p", {
90
+ let t9;
91
+ if ($[12] !== t8) {
92
+ t9 = /*#__PURE__*/_jsx("p", {
85
93
  className: "line-clamp-4 text-xs break-words text-text-muted",
86
- children: t7
94
+ children: t8
87
95
  });
88
- $[11] = t7;
89
96
  $[12] = t8;
90
- } else {
91
- t8 = $[12];
92
- }
93
- const t9 = compact ? "mt-1" : "mt-2";
94
- let t10;
95
- if ($[13] !== t9) {
96
- t10 = clsx("flex items-center gap-2", t9);
97
97
  $[13] = t9;
98
- $[14] = t10;
99
98
  } else {
100
- t10 = $[14];
99
+ t9 = $[13];
101
100
  }
101
+ const t10 = compact ? "mt-1" : "mt-2";
102
102
  let t11;
103
- if ($[15] !== t) {
104
- t11 = t("action.retry");
105
- $[15] = t;
106
- $[16] = t11;
103
+ if ($[14] !== t10) {
104
+ t11 = clsx("flex items-center gap-2", t10);
105
+ $[14] = t10;
106
+ $[15] = t11;
107
107
  } else {
108
- t11 = $[16];
108
+ t11 = $[15];
109
109
  }
110
110
  let t12;
111
- if ($[17] !== onRetry || $[18] !== t11) {
112
- t12 = /*#__PURE__*/_jsx(Button, {
111
+ if ($[16] !== t) {
112
+ t12 = t("action.retry");
113
+ $[16] = t;
114
+ $[17] = t12;
115
+ } else {
116
+ t12 = $[17];
117
+ }
118
+ let t13;
119
+ if ($[18] !== onRetry || $[19] !== t12) {
120
+ t13 = /*#__PURE__*/_jsx(Button, {
113
121
  variant: "secondary",
114
122
  size: "sm",
115
123
  onClick: onRetry,
116
- children: t11
124
+ children: t12
117
125
  });
118
- $[17] = onRetry;
119
- $[18] = t11;
126
+ $[18] = onRetry;
120
127
  $[19] = t12;
128
+ $[20] = t13;
121
129
  } else {
122
- t12 = $[19];
130
+ t13 = $[20];
123
131
  }
124
- let t13;
125
- if ($[20] !== reload || $[21] !== t) {
126
- t13 = reload && /*#__PURE__*/_jsxs(Button, {
132
+ let t14;
133
+ if ($[21] !== reload || $[22] !== t) {
134
+ t14 = reload && /*#__PURE__*/_jsxs(Button, {
127
135
  variant: "secondary",
128
136
  size: "sm",
129
137
  onClick: _temp,
@@ -132,88 +140,90 @@ function ErrorFallback(t0) {
132
140
  size: 14
133
141
  }), t("action.reload")]
134
142
  });
135
- $[20] = reload;
136
- $[21] = t;
137
- $[22] = t13;
143
+ $[21] = reload;
144
+ $[22] = t;
145
+ $[23] = t14;
138
146
  } else {
139
- t13 = $[22];
140
- }
141
- let t14;
142
- if ($[23] !== componentStack || $[24] !== error || $[25] !== label) {
143
- t14 = errorReport(label, error, componentStack);
144
- $[23] = componentStack;
145
- $[24] = error;
146
- $[25] = label;
147
- $[26] = t14;
148
- } else {
149
- t14 = $[26];
147
+ t14 = $[23];
150
148
  }
151
149
  let t15;
152
- if ($[27] !== t) {
153
- t15 = t("action.copyError");
154
- $[27] = t;
155
- $[28] = t15;
150
+ if ($[24] !== componentStack || $[25] !== error || $[26] !== label) {
151
+ t15 = errorReport(label, error, componentStack);
152
+ $[24] = componentStack;
153
+ $[25] = error;
154
+ $[26] = label;
155
+ $[27] = t15;
156
156
  } else {
157
- t15 = $[28];
157
+ t15 = $[27];
158
158
  }
159
159
  let t16;
160
- if ($[29] !== t14 || $[30] !== t15) {
161
- t16 = /*#__PURE__*/_jsx(ButtonGroup, {
160
+ if ($[28] !== t) {
161
+ t16 = t("action.copyError");
162
+ $[28] = t;
163
+ $[29] = t16;
164
+ } else {
165
+ t16 = $[29];
166
+ }
167
+ let t17;
168
+ if ($[30] !== t15 || $[31] !== t16) {
169
+ t17 = /*#__PURE__*/_jsx(ButtonGroup, {
162
170
  children: /*#__PURE__*/_jsx(CopyButton, {
163
- text: t14,
164
- label: t15,
171
+ text: t15,
172
+ label: t16,
165
173
  size: "sm"
166
174
  })
167
175
  });
168
- $[29] = t14;
169
176
  $[30] = t15;
170
177
  $[31] = t16;
178
+ $[32] = t17;
171
179
  } else {
172
- t16 = $[31];
180
+ t17 = $[32];
173
181
  }
174
- let t17;
175
- if ($[32] !== t10 || $[33] !== t12 || $[34] !== t13 || $[35] !== t16) {
176
- t17 = /*#__PURE__*/_jsxs("div", {
177
- className: t10,
178
- children: [t12, t13, t16]
182
+ let t18;
183
+ if ($[33] !== t11 || $[34] !== t13 || $[35] !== t14 || $[36] !== t17) {
184
+ t18 = /*#__PURE__*/_jsxs("div", {
185
+ className: t11,
186
+ children: [t13, t14, t17]
179
187
  });
180
- $[32] = t10;
181
- $[33] = t12;
188
+ $[33] = t11;
182
189
  $[34] = t13;
183
- $[35] = t16;
190
+ $[35] = t14;
184
191
  $[36] = t17;
192
+ $[37] = t18;
185
193
  } else {
186
- t17 = $[36];
194
+ t18 = $[37];
187
195
  }
188
- let t18;
189
- if ($[37] !== t17 || $[38] !== t4 || $[39] !== t5 || $[40] !== t6 || $[41] !== t8) {
190
- t18 = /*#__PURE__*/_jsxs("div", {
191
- className: t4,
192
- children: [t5, t6, t8, t17]
196
+ let t19;
197
+ if ($[38] !== t18 || $[39] !== t5 || $[40] !== t6 || $[41] !== t7 || $[42] !== t9) {
198
+ t19 = /*#__PURE__*/_jsxs("div", {
199
+ className: t5,
200
+ children: [t6, t7, t9, t18]
193
201
  });
194
- $[37] = t17;
195
- $[38] = t4;
202
+ $[38] = t18;
196
203
  $[39] = t5;
197
204
  $[40] = t6;
198
- $[41] = t8;
199
- $[42] = t18;
205
+ $[41] = t7;
206
+ $[42] = t9;
207
+ $[43] = t19;
200
208
  } else {
201
- t18 = $[42];
209
+ t19 = $[43];
202
210
  }
203
- let t19;
204
- if ($[43] !== t18 || $[44] !== t2) {
205
- t19 = /*#__PURE__*/_jsx("div", {
211
+ let t20;
212
+ if ($[44] !== t1 || $[45] !== t19 || $[46] !== t3) {
213
+ t20 = /*#__PURE__*/_jsx(ScrollArea, {
206
214
  role: "alert",
207
- className: t2,
208
- children: t18
215
+ className: t1,
216
+ viewportClassName: t3,
217
+ children: t19
209
218
  });
210
- $[43] = t18;
211
- $[44] = t2;
219
+ $[44] = t1;
212
220
  $[45] = t19;
221
+ $[46] = t3;
222
+ $[47] = t20;
213
223
  } else {
214
- t19 = $[45];
224
+ t20 = $[47];
215
225
  }
216
- return t19;
226
+ return t20;
217
227
  }
218
228
  /* Without one React unmounts the whole tree, and whatever lives in it (an embedded page, a running terminal) goes down with it. */
219
229
  function _temp() {
package/dist/Field.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { type ReactNode, type Ref } from 'react';
2
1
  import { useRender } from '@base-ui/react/use-render';
2
+ import { type ReactNode, type Ref } from 'react';
3
3
  export type FieldHintProps = useRender.ComponentProps<'p'>;
4
4
  export declare function FieldHint({ render, className, ref, ...props }: FieldHintProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
5
5
  export type FormErrorProps = useRender.ComponentProps<'p'>;
package/dist/Field.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { useId } from 'react';
3
- import clsx from 'clsx';
4
2
  import { useRender } from '@base-ui/react/use-render';
3
+ import clsx from 'clsx';
4
+ import { useId } from 'react';
5
5
  import { FieldContext } from './field-context.js';
6
6
  import { SectionLabel } from "./SectionLabel.js";
7
7
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -3,6 +3,6 @@ export interface FileIconProps {
3
3
  path: string;
4
4
  size?: number;
5
5
  className?: string;
6
- ref?: Ref<SVGSVGElement>;
6
+ ref?: Ref<SVGSVGElement | HTMLImageElement>;
7
7
  }
8
8
  export declare function FileIcon({ path, size, className, ref }: FileIconProps): import("react").JSX.Element;
package/dist/FileIcon.js CHANGED
@@ -1,14 +1,14 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { useInsertionEffect } from 'react';
3
2
  import clsx from 'clsx';
4
- import { fileIconFor, fileIconOverrideFor, mountFileIconSprite } from './file-icon.js';
3
+ import { useInsertionEffect, useSyncExternalStore } from 'react';
4
+ import { fileIconFor, fileIconOverrideFor, fileIconOverrideVersion, mountFileIconSprite, subscribeFileIconOverride } from './file-icon.js';
5
5
  /*
6
6
  * The one place the library steps outside Lucide. The glyphs are Seti's, and so are their colors: a
7
7
  * TypeScript blue is the mark of the file type, not a theme choice. Decorative like every other icon here.
8
8
  */
9
9
  import { jsx as _jsx } from "react/jsx-runtime";
10
10
  export function FileIcon(t0) {
11
- const $ = _c(20);
11
+ const $ = _c(22);
12
12
  const {
13
13
  path,
14
14
  size: t1,
@@ -24,71 +24,75 @@ export function FileIcon(t0) {
24
24
  t2 = $[0];
25
25
  }
26
26
  useInsertionEffect(mountFileIconSprite, t2);
27
+ const version = useSyncExternalStore(subscribeFileIconOverride, fileIconOverrideVersion, fileIconOverrideVersion);
27
28
  let t3;
28
- if ($[1] !== path) {
29
- t3 = fileIconOverrideFor(path);
29
+ if ($[1] !== path || $[2] !== version) {
30
+ t3 = overrideFor(path, version);
30
31
  $[1] = path;
31
- $[2] = t3;
32
+ $[2] = version;
33
+ $[3] = t3;
32
34
  } else {
33
- t3 = $[2];
35
+ t3 = $[3];
34
36
  }
35
37
  const own = t3;
36
38
  if (own !== null) {
37
39
  let t4;
38
- if ($[3] !== className) {
40
+ if ($[4] !== className) {
39
41
  t4 = clsx("file-icon", className);
40
- $[3] = className;
41
- $[4] = t4;
42
+ $[4] = className;
43
+ $[5] = t4;
42
44
  } else {
43
- t4 = $[4];
45
+ t4 = $[5];
44
46
  }
45
47
  let t5;
46
- if ($[5] !== own || $[6] !== size || $[7] !== t4) {
48
+ if ($[6] !== own || $[7] !== ref || $[8] !== size || $[9] !== t4) {
47
49
  t5 = /*#__PURE__*/_jsx("img", {
50
+ ref: ref,
48
51
  src: own,
49
52
  alt: "",
50
53
  width: size,
51
54
  height: size,
52
55
  className: t4
53
56
  });
54
- $[5] = own;
55
- $[6] = size;
56
- $[7] = t4;
57
- $[8] = t5;
57
+ $[6] = own;
58
+ $[7] = ref;
59
+ $[8] = size;
60
+ $[9] = t4;
61
+ $[10] = t5;
58
62
  } else {
59
- t5 = $[8];
63
+ t5 = $[10];
60
64
  }
61
65
  return t5;
62
66
  }
63
67
  let t4;
64
- if ($[9] !== className) {
68
+ if ($[11] !== className) {
65
69
  t4 = clsx("file-icon", className);
66
- $[9] = className;
67
- $[10] = t4;
70
+ $[11] = className;
71
+ $[12] = t4;
68
72
  } else {
69
- t4 = $[10];
73
+ t4 = $[12];
70
74
  }
71
75
  let t5;
72
- if ($[11] !== path) {
76
+ if ($[13] !== path) {
73
77
  t5 = fileIconFor(path);
74
- $[11] = path;
75
- $[12] = t5;
78
+ $[13] = path;
79
+ $[14] = t5;
76
80
  } else {
77
- t5 = $[12];
81
+ t5 = $[14];
78
82
  }
79
83
  const t6 = `#${t5}`;
80
84
  let t7;
81
- if ($[13] !== t6) {
85
+ if ($[15] !== t6) {
82
86
  t7 = /*#__PURE__*/_jsx("use", {
83
87
  href: t6
84
88
  });
85
- $[13] = t6;
86
- $[14] = t7;
89
+ $[15] = t6;
90
+ $[16] = t7;
87
91
  } else {
88
- t7 = $[14];
92
+ t7 = $[16];
89
93
  }
90
94
  let t8;
91
- if ($[15] !== ref || $[16] !== size || $[17] !== t4 || $[18] !== t7) {
95
+ if ($[17] !== ref || $[18] !== size || $[19] !== t4 || $[20] !== t7) {
92
96
  t8 = /*#__PURE__*/_jsx("svg", {
93
97
  ref: ref,
94
98
  className: t4,
@@ -98,13 +102,17 @@ export function FileIcon(t0) {
98
102
  "aria-hidden": true,
99
103
  children: t7
100
104
  });
101
- $[15] = ref;
102
- $[16] = size;
103
- $[17] = t4;
104
- $[18] = t7;
105
- $[19] = t8;
105
+ $[17] = ref;
106
+ $[18] = size;
107
+ $[19] = t4;
108
+ $[20] = t7;
109
+ $[21] = t8;
106
110
  } else {
107
- t8 = $[19];
111
+ t8 = $[21];
108
112
  }
109
113
  return t8;
114
+ }
115
+ /* Takes the version so the compiler caches the result on it as well as on the path. */
116
+ function overrideFor(path, _version) {
117
+ return fileIconOverrideFor(path);
110
118
  }
package/dist/Icon.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import type { Ref } from 'react';
2
1
  import type { LucideIcon } from 'lucide-react';
2
+ import type { Ref } from 'react';
3
3
  export interface IconProps {
4
4
  icon: LucideIcon;
5
5
  size?: number;
@@ -1,9 +1,9 @@
1
- import type { ComponentProps, ReactNode } from 'react';
2
- import type { LucideIcon } from 'lucide-react';
3
1
  import { useRender } from '@base-ui/react/use-render';
2
+ import type { LucideIcon } from 'lucide-react';
3
+ import type { ComponentProps, ReactNode } from 'react';
4
+ import { type IconButtonSize } from './icon-button-size.ts';
4
5
  import type { Shortcut } from './shortcut.ts';
5
6
  import { type TooltipSide } from './Tooltip.tsx';
6
- import { type IconButtonSize } from './icon-button-size.ts';
7
7
  export type { IconButtonSize };
8
8
  export interface IconButtonProps extends Omit<ComponentProps<'button'>, 'children'> {
9
9
  icon?: LucideIcon;
@@ -1,10 +1,10 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import clsx from 'clsx';
3
2
  import { useRender } from '@base-ui/react/use-render';
3
+ import clsx from 'clsx';
4
+ import { ICON_BUTTON_CLASS, ICON_BUTTON_ICON_SIZE } from './icon-button-size.js';
4
5
  import { Icon } from "./Icon.js";
5
6
  import { Spinner } from "./Spinner.js";
6
7
  import { Tooltip } from "./Tooltip.js";
7
- import { ICON_BUTTON_CLASS, ICON_BUTTON_ICON_SIZE } from './icon-button-size.js';
8
8
  /* The one place the icon inside an icon button is sized. */
9
9
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
10
10
  export function IconButton(t0) {