@adecore/ui 0.39.0 → 0.40.0

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 (207) hide show
  1. package/dist/AccentSwatches.js +2 -3
  2. package/dist/Banner.js +1 -6
  3. package/dist/ChoiceCards.js +0 -5
  4. package/dist/ColorSwatch.js +1 -4
  5. package/dist/ColorWheelPicker.js +3 -6
  6. package/dist/DockShell.js +3 -5
  7. package/dist/EmptyState.js +0 -1
  8. package/dist/ErrorBoundary.js +1 -5
  9. package/dist/Field.js +2 -6
  10. package/dist/FileIcon.js +2 -4
  11. package/dist/Icon.js +1 -2
  12. package/dist/IconButton.js +1 -1
  13. package/dist/IconPicker.js +3 -7
  14. package/dist/Input.js +1 -2
  15. package/dist/Kbd.js +1 -3
  16. package/dist/LazyBoundary.js +2 -3
  17. package/dist/Meter.js +0 -1
  18. package/dist/MiddleTruncate.js +2 -6
  19. package/dist/PanelEmpty.js +0 -1
  20. package/dist/PanelHeader.js +1 -4
  21. package/dist/Pill.js +1 -6
  22. package/dist/ProjectSwitcher.js +1 -1
  23. package/dist/PromptDialog.js +5 -8
  24. package/dist/RelativeTime.js +1 -1
  25. package/dist/SegmentBar.js +1 -2
  26. package/dist/Segmented.js +2 -5
  27. package/dist/Select.js +1 -4
  28. package/dist/ShortcutHints.js +2 -3
  29. package/dist/Slider.js +0 -1
  30. package/dist/SlidingColumn.js +2 -4
  31. package/dist/SplitButton.js +1 -5
  32. package/dist/TextMenu.js +1 -5
  33. package/dist/Tile.js +0 -4
  34. package/dist/Toasts.js +1 -9
  35. package/dist/Tooltip.js +1 -1
  36. package/dist/UIProvider.js +0 -5
  37. package/dist/Waveform.js +4 -2
  38. package/dist/Wipe.js +1 -6
  39. package/dist/ZoomControls.js +0 -1
  40. package/dist/clipboard.js +2 -5
  41. package/dist/combobox/parts.js +3 -9
  42. package/dist/command-palette/parts.js +5 -14
  43. package/dist/dialog/parts.js +5 -10
  44. package/dist/dialog-layer.js +2 -3
  45. package/dist/error-boundary.js +4 -20
  46. package/dist/file-icon.js +4 -9
  47. package/dist/file-tree/empty-lines.js +2 -8
  48. package/dist/file-tree/use-empty-lines.js +1 -5
  49. package/dist/file-tree/use-slots.js +6 -10
  50. package/dist/format/datetime.js +32 -29
  51. package/dist/format/duration.js +2 -10
  52. package/dist/format/locale.js +19 -39
  53. package/dist/format/number.js +9 -22
  54. package/dist/format/regions.js +4 -7
  55. package/dist/icon-picker.js +5 -14
  56. package/dist/key-value-list/parts.js +1 -5
  57. package/dist/lazy.js +4 -19
  58. package/dist/locales.js +2 -6
  59. package/dist/menu/parts.js +61 -133
  60. package/dist/middle-truncate.js +2 -3
  61. package/dist/placement.js +0 -1
  62. package/dist/popover/parts.js +1 -5
  63. package/dist/popup-layer.js +2 -4
  64. package/dist/prefetch.js +2 -5
  65. package/dist/selection.js +1 -5
  66. package/dist/settings/MasterDetail.js +1 -7
  67. package/dist/settings/SettingsDialog.js +1 -2
  68. package/dist/settings/SettingsRow.js +2 -5
  69. package/dist/settings/SettingsSection.js +1 -1
  70. package/dist/shortcut-hints.js +1 -5
  71. package/dist/shortcut.js +1 -2
  72. package/dist/tabs/overflow.js +1 -6
  73. package/dist/tabs/parts.js +69 -95
  74. package/dist/testing/dedupe.js +5 -7
  75. package/dist/tint.js +3 -5
  76. package/dist/toast-store.js +2 -10
  77. package/dist/tree/use-tree-shift.js +2 -6
  78. package/dist/useColumnResize.js +9 -10
  79. package/dist/useNow.js +2 -9
  80. package/dist/workspace/DropPreview.js +1 -5
  81. package/dist/workspace/preview.js +4 -9
  82. package/package.json +9 -9
  83. package/src/AccentSwatches.tsx +9 -3
  84. package/src/Banner.tsx +5 -11
  85. package/src/Button.tsx +4 -0
  86. package/src/Checkbox.tsx +3 -0
  87. package/src/ChoiceCards.tsx +12 -11
  88. package/src/CloseButton.tsx +1 -0
  89. package/src/ColorSwatch.tsx +7 -8
  90. package/src/ColorWheelPicker.tsx +28 -12
  91. package/src/ColumnResizeHandle.tsx +1 -0
  92. package/src/CopyButton.tsx +6 -0
  93. package/src/DisabledReason.tsx +1 -0
  94. package/src/DockShell.tsx +11 -10
  95. package/src/EmptyState.tsx +10 -6
  96. package/src/ErrorBoundary.tsx +13 -10
  97. package/src/Field.tsx +11 -13
  98. package/src/FileIcon.tsx +4 -4
  99. package/src/Icon.tsx +2 -4
  100. package/src/IconButton.tsx +14 -5
  101. package/src/IconPicker.tsx +30 -15
  102. package/src/Input.tsx +11 -9
  103. package/src/Kbd.tsx +8 -7
  104. package/src/LazyBoundary.tsx +3 -3
  105. package/src/Meter.tsx +7 -2
  106. package/src/MiddleTruncate.tsx +15 -6
  107. package/src/PanelEmpty.tsx +9 -7
  108. package/src/PanelHeader.tsx +2 -5
  109. package/src/Pill.tsx +7 -8
  110. package/src/ProjectSwitcher.tsx +16 -6
  111. package/src/PromptDialog.tsx +31 -26
  112. package/src/RelativeTime.tsx +6 -1
  113. package/src/SegmentBar.tsx +22 -11
  114. package/src/Segmented.tsx +16 -11
  115. package/src/Select.tsx +7 -4
  116. package/src/SelectSearch.tsx +3 -0
  117. package/src/ShortcutHints.tsx +24 -3
  118. package/src/Skeleton.tsx +1 -0
  119. package/src/Slider.tsx +4 -1
  120. package/src/SlidingColumn.tsx +18 -14
  121. package/src/Spinner.tsx +1 -0
  122. package/src/SplitButton.tsx +8 -8
  123. package/src/Stepper.tsx +6 -0
  124. package/src/Switch.tsx +2 -0
  125. package/src/TextMenu.tsx +2 -5
  126. package/src/Tile.tsx +2 -6
  127. package/src/Toasts.tsx +8 -12
  128. package/src/Tooltip.tsx +10 -5
  129. package/src/UIProvider.tsx +7 -7
  130. package/src/Waveform.tsx +41 -12
  131. package/src/Wipe.tsx +5 -6
  132. package/src/ZoomControls.tsx +5 -2
  133. package/src/clipboard.ts +4 -5
  134. package/src/combobox/parts.tsx +18 -14
  135. package/src/command-palette/context.ts +2 -0
  136. package/src/command-palette/index.parts.ts +1 -0
  137. package/src/command-palette/parts.tsx +20 -14
  138. package/src/command-palette/virtual.tsx +21 -0
  139. package/src/dialog/parts.tsx +10 -13
  140. package/src/dialog-layer.ts +5 -3
  141. package/src/error-boundary.ts +7 -20
  142. package/src/file-icon.ts +8 -9
  143. package/src/file-tree/empty-lines.ts +24 -8
  144. package/src/file-tree/helpers.ts +34 -0
  145. package/src/file-tree/highlight.ts +19 -0
  146. package/src/file-tree/index.parts.ts +1 -0
  147. package/src/file-tree/parts.tsx +41 -5
  148. package/src/file-tree/use-empty-lines.ts +22 -5
  149. package/src/file-tree/use-file-tree-shift.tsx +10 -0
  150. package/src/file-tree/use-file-tree.ts +2 -0
  151. package/src/file-tree/use-slots.ts +77 -12
  152. package/src/format/datetime.ts +42 -17
  153. package/src/format/duration.ts +28 -10
  154. package/src/format/index.ts +3 -0
  155. package/src/format/locale.ts +33 -42
  156. package/src/format/number.ts +21 -27
  157. package/src/format/regions.ts +4 -7
  158. package/src/icon-picker.ts +23 -16
  159. package/src/index.ts +8 -0
  160. package/src/key-value-list/parts.tsx +1 -5
  161. package/src/lazy-landings.ts +2 -0
  162. package/src/lazy.tsx +23 -19
  163. package/src/locales.ts +2 -6
  164. package/src/match.ts +14 -0
  165. package/src/menu/parts.tsx +30 -55
  166. package/src/middle-truncate.ts +12 -3
  167. package/src/modality.ts +4 -0
  168. package/src/placement.ts +2 -1
  169. package/src/platform.ts +2 -0
  170. package/src/popover/parts.tsx +3 -5
  171. package/src/popup-layer.ts +6 -4
  172. package/src/prefetch.ts +18 -5
  173. package/src/project-switcher-row.tsx +2 -0
  174. package/src/segmented-keys.ts +6 -0
  175. package/src/select-shared.ts +2 -0
  176. package/src/selection.ts +5 -5
  177. package/src/settings/ConfirmDialog.tsx +3 -0
  178. package/src/settings/MasterDetail.tsx +3 -9
  179. package/src/settings/SettingsDialog.tsx +27 -9
  180. package/src/settings/SettingsRow.tsx +16 -10
  181. package/src/settings/SettingsSection.tsx +10 -5
  182. package/src/settings/index.ts +3 -0
  183. package/src/settings/target.ts +1 -0
  184. package/src/shortcut-hints.ts +10 -5
  185. package/src/shortcut.ts +26 -6
  186. package/src/tabs/overflow.ts +8 -6
  187. package/src/tabs/parts.tsx +50 -26
  188. package/src/testing/dedupe.ts +27 -7
  189. package/src/testing/fake-source.ts +1 -0
  190. package/src/tint.ts +3 -5
  191. package/src/toast-store.ts +20 -14
  192. package/src/tree/parts.tsx +8 -0
  193. package/src/tree/shift.ts +6 -0
  194. package/src/tree/use-tree-shift.tsx +23 -7
  195. package/src/useAsyncAction.ts +8 -0
  196. package/src/useColumnResize.ts +24 -15
  197. package/src/useContentSize.ts +5 -0
  198. package/src/useMeasuredWidth.ts +1 -0
  199. package/src/useNow.ts +6 -11
  200. package/src/workspace/DropPreview.tsx +3 -5
  201. package/src/workspace/SplitView.tsx +109 -0
  202. package/src/workspace/TabStrip.tsx +42 -0
  203. package/src/workspace/Workspace.tsx +5 -0
  204. package/src/workspace/context.ts +1 -0
  205. package/src/workspace/geometry.ts +49 -0
  206. package/src/workspace/model.ts +72 -0
  207. package/src/workspace/preview.ts +15 -15
@@ -7,9 +7,8 @@ import { Icon } from "./Icon.js";
7
7
  import { MenuPopup, MenuRadioGroup, MenuRadioItem, MenuRoot, MenuTrigger } from "./menu/parts.js";
8
8
  import { Tooltip } from "./Tooltip.js";
9
9
  /*
10
- * An accent, a few colors at a time. A palette is more than a settings row can carry, so the list
11
- * behind them holds all of them, the featured ones included; the trigger wears the chosen color
12
- * itself whenever that color is not one of the few. A value that is no accent at all picks nothing.
10
+ * The list behind the featured swatches holds every accent, the featured ones included; its trigger
11
+ * wears the chosen color whenever that is not one of the few. A value that is no accent picks nothing.
13
12
  */
14
13
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
15
14
  export function AccentSwatches(t0) {
package/dist/Banner.js CHANGED
@@ -9,12 +9,7 @@ const TONE = {
9
9
  neutral: 'text-text-muted'
10
10
  };
11
11
  const OVERLAY = 'absolute inset-x-0 top-3 z-20';
12
- /*
13
- * The strip over a view: one line and the buttons that answer it. It is where anything that waits
14
- * for a person goes (a conflict, a failure, a request), because a corner toast is read after the fact
15
- * and a decision has to be where the eyes already are. One at a time: the slot is one row and the
16
- * caller picks what stands in it. Inline, it is a notice that belongs to the page it stands in.
17
- */
12
+ /* Where anything that waits for a person goes: a corner toast is read after the fact, and a decision has to be where the eyes already are. */
18
13
  export function Banner(t0) {
19
14
  const $ = _c(25);
20
15
  const {
@@ -108,11 +108,6 @@ function ChoiceCard(t0) {
108
108
  }
109
109
  return t12;
110
110
  }
111
- /*
112
- * One of a few options, each a card that says what it means, for a choice that deserves more than a
113
- * select: the cards stand side by side at the same width, one under the other or in a set number of
114
- * columns, and the arrow keys move between them.
115
- */
116
111
  export function ChoiceCards(t0) {
117
112
  const $ = _c(27);
118
113
  const {
@@ -11,10 +11,7 @@ const PICKED_RING = {
11
11
  surface: 'ring-2 ring-accent ring-offset-2 ring-offset-surface',
12
12
  popup: 'ring-2 ring-accent ring-offset-1 ring-offset-surface-raised'
13
13
  };
14
- /*
15
- * One color, drawn as the color itself. Its name belongs in a tooltip, so the circle carries a tick
16
- * alone when it is picked. Children replace the tick, such as the ellipsis of a "more colors" swatch.
17
- */
14
+ /* Its name belongs in a tooltip. Children replace the tick, such as the ellipsis of a "more colors" swatch. */
18
15
  export function ColorSwatch(t0) {
19
16
  const $ = _c(32);
20
17
  let children;
@@ -12,7 +12,7 @@ const MIN_RADIUS = 97;
12
12
  const MIN_GAP = 8;
13
13
  /* Room past the outer ring for the ring a picked swatch wears. */
14
14
  const EDGE = 7;
15
- /* Every swatch's top left corner in whole pixels, the rings evenly apart from the outer one to the middle, and the size of the wheel. */
15
+ /* Top left corners in whole pixels, the rings evenly apart from the outer one to the middle. */
16
16
  function layout(rings, center) {
17
17
  const outer = rings[0]?.length ?? 0;
18
18
  const radius = Math.max(MIN_RADIUS, outer > 1 ? Math.ceil((SWATCH_SIZE + MIN_GAP) / (2 * Math.sin(Math.PI / outer))) : 0);
@@ -41,11 +41,8 @@ const STEPS = {
41
41
  End: (_, count) => count - 1
42
42
  };
43
43
  /*
44
- * A color picked from a wheel behind a trigger that holds the one in use and lines up with a select.
45
- * While the wheel is open the swatch under the pointer or the focus is reported as a preview, so the
46
- * caller can show it in place; its name stands under the wheel, which is why a swatch carries no
47
- * tooltip. The wheel is one tab stop: the arrows walk it in its order and only Enter, Space or a click
48
- * picks. Every preview ends with null, after a pick as well as on closing without one or on going away while open.
44
+ * The looked-at swatch's name stands under the wheel, so a swatch carries no tooltip. Only Enter, Space
45
+ * or a click picks. Every preview ends with null: after a pick, on closing, or on going away while open.
49
46
  */
50
47
  export function ColorWheelPicker(t0) {
51
48
  const $ = _c(37);
package/dist/DockShell.js CHANGED
@@ -6,11 +6,9 @@ import { Surface } from "./Surface.js";
6
6
  import { jsx as _jsx } from "react/jsx-runtime";
7
7
  const REVEAL_ZONE = 120;
8
8
  /*
9
- * The floating bar at the bottom of a canvas-like view, and the one place that knows how to get out
10
- * of the way. With `autoHide` it waits below the edge until the pointer comes down to it, an open
11
- * menu keeps it up (it would take its own popup with it), and a keyboard reaches it by tabbing. The
12
- * buttons stay in the tab order while it is out of sight, so focus brings it back. Something that
13
- * moves with the dock marks itself `data-holds-dock`, so reaching for it does not hide the dock.
9
+ * An open menu keeps a hiding dock up, or it would take its own popup with it. The buttons stay in the
10
+ * tab order while out of sight, so focus brings it back. Something that moves with the dock marks itself
11
+ * `data-holds-dock`, so reaching for it does not hide the dock.
14
12
  */
15
13
  export function DockShell(t0) {
16
14
  const $ = _c(28);
@@ -6,7 +6,6 @@ import { Spinner } from "./Spinner.js";
6
6
  // One size in a panel, a card and a dialog alike, so no caller picks its own.
7
7
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
8
  const ICON_SIZE = 20;
9
- /* What a list, a canvas or a thread shows before it holds anything. */
10
9
  export function EmptyState(t0) {
11
10
  const $ = _c(18);
12
11
  const {
@@ -215,11 +215,7 @@ function ErrorFallback(t0) {
215
215
  }
216
216
  return t19;
217
217
  }
218
- /*
219
- * Keeps a render failure to the subtree it happened in. Without one React unmounts the whole tree,
220
- * and whatever lives in it (an embedded page, a running terminal) goes down with it. Key it so it
221
- * resets only while it holds an error: `resetKeys` for what the children draw from.
222
- */
218
+ /* Without one React unmounts the whole tree, and whatever lives in it (an embedded page, a running terminal) goes down with it. */
223
219
  function _temp() {
224
220
  return window.location.reload();
225
221
  }
package/dist/Field.js CHANGED
@@ -10,7 +10,6 @@ const ERROR = 'text-xs text-status-error';
10
10
  // Beside the control the label reads at the size of what is typed, on the middle of the control's first line however tall it grows.
11
11
  const LABEL_BESIDE = 'flex h-8 items-center self-start text-sm text-text-muted';
12
12
  const isShown = line => line !== undefined && line !== null && line !== '';
13
- /* The line under a field that says what goes in it. */
14
13
  export function FieldHint(t0) {
15
14
  const $ = _c(14);
16
15
  let className;
@@ -72,7 +71,7 @@ export function FieldHint(t0) {
72
71
  }
73
72
  return useRender(t3);
74
73
  }
75
- /* What went wrong in a dialog or a form. An alert, so a screen reader hears it arrive. */
74
+ /* An alert, so a screen reader hears it arrive. */
76
75
  export function FormError(t0) {
77
76
  const $ = _c(14);
78
77
  let className;
@@ -185,10 +184,7 @@ function FieldLabel(t0) {
185
184
  }
186
185
  return t1;
187
186
  }
188
- /*
189
- * A labelled control, or a labelled group, with an optional hint and error under it, stacked 6px apart.
190
- * Beside each other the label column is 112px, so the controls of every field in a form line up.
191
- */
187
+ /* Horizontal, the label column is 112px, so the controls of every field in a form line up. */
192
188
  export function Field(t0) {
193
189
  const $ = _c(47);
194
190
  const {
package/dist/FileIcon.js CHANGED
@@ -3,10 +3,8 @@ import { useInsertionEffect } from 'react';
3
3
  import clsx from 'clsx';
4
4
  import { fileIconFor, mountFileIconSprite } from './file-icon.js';
5
5
  /*
6
- * The icon a file gets in a file tree, drawn anywhere else the same file's name shows up. It is the
7
- * one place the library steps outside Lucide. The glyphs are Seti's, and so are their colors, because
8
- * a TypeScript blue or a Vue green is the mark of the file type, not a theme choice. Decorative like
9
- * every other icon here, so the name beside it does the reading.
6
+ * The one place the library steps outside Lucide. The glyphs are Seti's, and so are their colors: a
7
+ * TypeScript blue is the mark of the file type, not a theme choice. Decorative like every other icon here.
10
8
  */
11
9
  import { jsx as _jsx } from "react/jsx-runtime";
12
10
  export function FileIcon(t0) {
package/dist/Icon.js CHANGED
@@ -4,8 +4,7 @@ import clsx from 'clsx';
4
4
  // text of the same size a hair thinner keeps the glyph from outweighing the words beside it.
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
6
  const STROKE_WIDTH = 1.75;
7
- /* One Lucide icon, sized in pixels. Icons here are decorative. The name a screen reader reads
8
- sits on the button or the label next to it, so the glyph stays hidden. */
7
+ /* Decorative: the name a screen reader reads sits on the button or the label next to it. */
9
8
  export function Icon(t0) {
10
9
  const $ = _c(7);
11
10
  const {
@@ -5,7 +5,7 @@ import { Icon } from "./Icon.js";
5
5
  import { Spinner } from "./Spinner.js";
6
6
  import { Tooltip } from "./Tooltip.js";
7
7
  import { ICON_BUTTON_CLASS, ICON_BUTTON_ICON_SIZE } from './icon-button-size.js';
8
- /* Every button that is an icon and no word. A square, and the one place the icon inside it is sized. */
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) {
11
11
  const $ = _c(43);
@@ -17,7 +17,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
17
17
  const ROW_HEIGHT = 32;
18
18
  const HEADED_EXTRA = 32;
19
19
  const BARE_EXTRA = 10;
20
- /* A heading is stuck while its group runs past the top of the scroll area, and only then draws a line under it. */
20
+ /* Only a stuck heading draws a line under it. */
21
21
  const markStuckHeadings = area => {
22
22
  const top = area.scrollTop;
23
23
  for (const heading of area.querySelectorAll('[data-icon-heading]')) {
@@ -26,11 +26,7 @@ const markStuckHeadings = area => {
26
26
  heading.toggleAttribute('data-stuck', stuck);
27
27
  }
28
28
  };
29
- /*
30
- * The mark a thing wears, one of a set of Lucide icons, behind a trigger drawn like a field. The
31
- * popover holds a search over the grid. The grid is one tab stop: arrows move the focus and only
32
- * Enter, Space or a click chooses, since a caller may save every choice at once.
33
- */
29
+ /* The grid is one tab stop: arrows move the focus and only Enter, Space or a click chooses, since a caller may save every choice at once. */
34
30
  export function IconPicker(t0) {
35
31
  const $ = _c(76);
36
32
  const {
@@ -363,7 +359,7 @@ export function IconPicker(t0) {
363
359
  }
364
360
  return t32;
365
361
  }
366
- /* What the popover holds. It mounts on every open, so a search and the focus start over each time. */
362
+ /* It mounts on every open, so a search and the focus start over each time. */
367
363
  function _temp(section) {
368
364
  return section.icons;
369
365
  }
package/dist/Input.js CHANGED
@@ -2,7 +2,6 @@ import { c as _c } from "react/compiler-runtime";
2
2
  import clsx from 'clsx';
3
3
  import { fieldControlProps, useFieldControl } from './field-context.js';
4
4
  import { Icon } from "./Icon.js";
5
- /* The one text input: one border and one focus ring at the one height or the compact one. */
6
5
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
6
  export function Input(t0) {
8
7
  const $ = _c(42);
@@ -169,7 +168,7 @@ export function Input(t0) {
169
168
  }
170
169
  return t14;
171
170
  }
172
- /* A field of a few lines: a commit message, the body of a pull request, a note. At least 64px tall; `rows` makes it taller. */
171
+ /* At least 64px tall; `rows` makes it taller. */
173
172
  export function TextArea(t0) {
174
173
  const $ = _c(21);
175
174
  let className;
package/dist/Kbd.js CHANGED
@@ -5,14 +5,13 @@ import { formatShortcut, shortcutParts } from './shortcut.js';
5
5
  /* A shortcut chip on the surface it sits on: in a tooltip, in a palette's footer, in a line of help. */
6
6
  import { jsx as _jsx } from "react/jsx-runtime";
7
7
  const INLINE_KBD = 'rounded-sm bg-surface-sunken px-[5px] py-px font-sans text-xs/[inherit] text-text-muted';
8
- /* One key, drawn as a cap. A settings page prints a shortcut key by key, so a gesture can stand beside it. */
8
+ /* A settings page prints a shortcut key by key, so a gesture can stand beside it. */
9
9
  const KEY_CAP = 'inline-grid place-items-center rounded-md border border-b-2 border-border-strong bg-surface-hover bg-clip-padding font-sans text-text';
10
10
  /* `sm` fits inside a small field, as the hint of the key that focuses it. */
11
11
  const KEY_CAP_SIZES = {
12
12
  md: 'h-6 min-w-6 px-1.5 text-xs',
13
13
  sm: 'h-5 min-w-5 px-1 text-2xs'
14
14
  };
15
- /* A shortcut as this platform prints it: `⌘K` on macOS, `Ctrl+K` elsewhere. */
16
15
  export function Kbd(t0) {
17
16
  const $ = _c(10);
18
17
  const {
@@ -93,7 +92,6 @@ export function KeyCap(t0) {
93
92
  }
94
93
  return t4;
95
94
  }
96
- /* A shortcut as one cap per key, `⌘` and `K`, plus the pointer gesture it goes with. */
97
95
  export function Keys(t0) {
98
96
  const $ = _c(15);
99
97
  const {
@@ -1,9 +1,8 @@
1
1
  import { Suspense, useSyncExternalStore } from 'react';
2
2
  import { readLandings, subscribeLandings } from './lazy-landings.js';
3
3
  /*
4
- * `Suspense` for what `lazyNamed` loads. React holds content that comes in as a retry back until
5
- * 300 ms after its fallback showed; this boundary draws again as an ordinary update once a module
6
- * lands, so a chunk that takes 20 ms shows after 20 ms.
4
+ * React holds content that comes in as a retry back until 300 ms after its fallback showed; this
5
+ * boundary draws again as an ordinary update once a module lands, so a 20 ms chunk shows after 20 ms.
7
6
  */
8
7
  import { jsx as _jsx } from "react/jsx-runtime";
9
8
  export function LazyBoundary({
package/dist/Meter.js CHANGED
@@ -1,6 +1,5 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
2
  import clsx from 'clsx';
3
- /* A level against a scale: how full it is, and where a target or a limit sits on the same scale. */
4
3
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
4
  export function Meter(t0) {
6
5
  const $ = _c(25);
@@ -6,7 +6,7 @@ import { mergeRefs } from './merge-refs.js';
6
6
  import { Tooltip } from "./Tooltip.js";
7
7
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
8
8
  let canvas = null;
9
- /* How wide a text is drawn in the face of `element`, or null where the page cannot tell (no canvas). */
9
+ /* Null where the page has no canvas. */
10
10
  function textMeasure(element) {
11
11
  const view = element.ownerDocument.defaultView;
12
12
  canvas ??= element.ownerDocument.createElement('canvas');
@@ -24,11 +24,7 @@ function textMeasure(element) {
24
24
  function sameCut(first, second) {
25
25
  return first?.head === second?.head && first?.tail === second?.tail;
26
26
  }
27
- /*
28
- * A path or a branch name on one line that keeps its start and its end and cuts the middle. It asks
29
- * for the width of the whole text and measures what it gets. The part it cuts stays in the element
30
- * at no width, so selecting, copying and finding read the whole text.
31
- */
27
+ /* The part it cuts stays in the element at no width, so selecting, copying and finding read the whole text. */
32
28
  export function MiddleTruncate(t0) {
33
29
  const $ = _c(19);
34
30
  const {
@@ -1,7 +1,6 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
2
  import clsx from 'clsx';
3
3
  import { EmptyState } from "./EmptyState.js";
4
- /* What a panel or a card shows while it holds nothing: a sentence, one icon, at most one button. */
5
4
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
5
  export function PanelEmpty(t0) {
7
6
  const $ = _c(14);
@@ -2,10 +2,7 @@ import { c as _c } from "react/compiler-runtime";
2
2
  import clsx from 'clsx';
3
3
  import { useRender } from '@base-ui/react/use-render';
4
4
  import { SectionLabel } from "./SectionLabel.js";
5
- /*
6
- * The bar across the top of a side panel, as tall as a 48px toolbar beside it: the panel's name,
7
- * its own controls, and a close button last.
8
- */
5
+ /* As tall as a 48px toolbar beside it. */
9
6
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
10
7
  export function PanelHeader(t0) {
11
8
  const $ = _c(22);
package/dist/Pill.js CHANGED
@@ -1,10 +1,6 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
2
  import clsx from 'clsx';
3
- /*
4
- * What the label says about the thing it names, drawn as its ground. Every ground is an alpha over
5
- * whatever the pill stands on, the way a border is: in the dark theme it lifts a shade off the row
6
- * under it, in the light theme it sinks one. A solid sunken ground read as a hole on a dark row.
7
- */
3
+ /* Every ground is an alpha over whatever the pill stands on, the way a border is: a solid sunken ground read as a hole on a dark row. */
8
4
  import { jsxs as _jsxs } from "react/jsx-runtime";
9
5
  const TONES = {
10
6
  muted: 'bg-text/7 text-text-muted',
@@ -31,7 +27,6 @@ const PADDING = {
31
27
  sm: 'px-1'
32
28
  }
33
29
  };
34
- /* The small rounded label in a header, a sidebar row or a settings line: a count, a branch, a status. */
35
30
  export function Pill(t0) {
36
31
  const $ = _c(26);
37
32
  const {
@@ -130,7 +130,7 @@ export function ProjectSwitcher(t0) {
130
130
  }
131
131
  return t10;
132
132
  }
133
- /* The rows of the popup, apart from it so they render without an open menu. */
133
+ /* Apart from the popup, so the rows render without an open menu. */
134
134
  export function ProjectSwitcherGroups(t0) {
135
135
  const $ = _c(18);
136
136
  const {
@@ -7,12 +7,7 @@ import { Field, FormError } from "./Field.js";
7
7
  import { Icon } from "./Icon.js";
8
8
  import { Input, TextArea } from "./Input.js";
9
9
  import { useAsyncAction } from './useAsyncAction.js';
10
- /*
11
- * The one dialog a question is asked in: a name to type, or a warning to agree with. Every confirm
12
- * and every rename shares it, so none of them grows a layout of its own. It never closes itself,
13
- * because what a confirm leads to is the caller's business: an action that asks a second question
14
- * would be shut out by a close of its own.
15
- */
10
+ /* It never closes itself: an action that asks a second question would be shut out by a close of its own. */
16
11
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
17
12
  export function PromptDialog(t0) {
18
13
  const $ = _c(80);
@@ -74,8 +69,10 @@ export function PromptDialog(t0) {
74
69
  });
75
70
  step.clear();
76
71
  }
77
- const value = draft.value;
78
- const body = draft.body;
72
+ const {
73
+ value,
74
+ body
75
+ } = draft;
79
76
  const working = busy || step.busy;
80
77
  let t9;
81
78
  if ($[4] !== draft) {
@@ -5,7 +5,7 @@ import { useNow } from './useNow.js';
5
5
  /* The finest step of an age is a minute, so half of one keeps it at most thirty seconds behind. */
6
6
  import { jsx as _jsx } from "react/jsx-runtime";
7
7
  const TICK_MS = 30_000;
8
- /* A moment as its age, `3m ago`, counting on while it is on screen, with the exact time on hover and on keyboard focus. */
8
+ /* Counts on while it is on screen, with the exact time on hover and on keyboard focus. */
9
9
  export function RelativeTime({
10
10
  at,
11
11
  tooltip = true,
@@ -4,8 +4,7 @@ import clsx from 'clsx';
4
4
  import { mergeRefs } from './merge-refs.js';
5
5
  import { Tooltip } from "./Tooltip.js";
6
6
  import { useMeasuredWidth } from './useMeasuredWidth.js';
7
- /* A whole split into parts, each as wide as it lasts, so they compare at a glance. A part starts exactly at its
8
- place; the gap between two parts that touch comes out of the one before. */
7
+ /* A part starts exactly at its place; the gap between two parts that touch comes out of the one before. */
9
8
  import { jsx as _jsx } from "react/jsx-runtime";
10
9
  export function SegmentBar(t0) {
11
10
  const $ = _c(38);
package/dist/Segmented.js CHANGED
@@ -20,10 +20,7 @@ const SIZE = {
20
20
  icon: 12
21
21
  }
22
22
  };
23
- /*
24
- * One of a few options side by side in one sunken track, the picked one lifted out of it. A radio
25
- * group: one tab stop, and the arrows pick and focus the next option, around the ends.
26
- */
23
+ /* A radio group: one tab stop, and the arrows pick and focus the next option, around the ends. */
27
24
  export function Segmented(t0) {
28
25
  const $ = _c(38);
29
26
  const {
@@ -55,7 +52,7 @@ export function Segmented(t0) {
55
52
  const stop = t4;
56
53
  let t5;
57
54
  if ($[3] !== onValueChange || $[4] !== options) {
58
- t5 = function move(event, index) {
55
+ t5 = (event, index) => {
59
56
  const next = segmentedTarget(options, index, event.key);
60
57
  if (next === null) {
61
58
  return;
package/dist/Select.js CHANGED
@@ -68,10 +68,7 @@ function Row(t0) {
68
68
  }
69
69
  return t4;
70
70
  }
71
- /* The one select. A Base UI `Select` in the popup style the menus use, so a settings field and a
72
- picker in a toolbar read the same. Base UI brings the keyboard along (arrows,
73
- Home and End, typeahead, Enter, Escape), which a hand-rolled listbox would have to repeat.
74
- A long list can ask for a search field, which swaps in a combobox with the same trigger and rows. */
71
+ /* A long list can ask for a search field, which swaps in a combobox with the same trigger and rows. */
75
72
  export function Select(props) {
76
73
  const $ = _c(5);
77
74
  const {
@@ -45,9 +45,8 @@ const measureHints = apple => {
45
45
  return hints;
46
46
  };
47
47
  /*
48
- * Every visible button's shortcut, under the button, for as long as the modifier is held on its own.
49
- * Mounted once; the listener sits on the window in the capture phase so a terminal that keeps a key to
50
- * itself still takes the hints down. An embedded page (`<webview>`) has the keyboard to itself and shows none.
48
+ * The listener sits on the window in the capture phase so a terminal that keeps a key to itself still
49
+ * takes the hints down. An embedded page (`<webview>`) has the keyboard to itself and shows none.
51
50
  */
52
51
  export function ShortcutHints() {
53
52
  const $ = _c(10);
package/dist/Slider.js CHANGED
@@ -4,7 +4,6 @@ import clsx from 'clsx';
4
4
  import { Slider as BaseSlider } from '@base-ui/react/slider';
5
5
  import { formatFixed } from './format/number.js';
6
6
  import { placesOf } from './step-places.js';
7
- /* A number picked along a range: the label and the value on one line, the track under them. */
8
7
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
8
  export function Slider(t0) {
10
9
  const $ = _c(41);
@@ -8,10 +8,8 @@ import { useColumnResize } from './useColumnResize.js';
8
8
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
9
  const TRANSITION_MS = 200;
10
10
  /*
11
- * A panel that slides in and out along the right edge. The outer column is 0 wide and inert while
12
- * closed; the contents sit in an inner column of the stored width, so they do not reflow while it
13
- * moves, and they stay mounted until the slide is over, so a close plays out. The left edge is the
14
- * drag handle.
11
+ * The contents sit in an inner column of the stored width, so they do not reflow while the outer one
12
+ * moves, and stay mounted until the slide is over, so a close plays out.
15
13
  */
16
14
  export function SlidingColumn(t0) {
17
15
  const $ = _c(42);
@@ -7,11 +7,7 @@ import { Icon } from "./Icon.js";
7
7
  import { MenuPopup, MenuRoot, MenuTrigger } from "./menu/parts.js";
8
8
  import { mergeRefs } from './merge-refs.js';
9
9
  import { Tooltip } from "./Tooltip.js";
10
- /*
11
- * A primary action and a chevron that opens a menu of related ones, drawn as one button with a short
12
- * line between the halves. Each half is a button of its own, so each takes the focus, can be disabled
13
- * and carries its own hint; the menu hangs under the whole control.
14
- */
10
+ /* Each half is a button of its own, so each takes the focus, can be disabled and carries its own hint; the menu hangs under the whole control. */
15
11
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
16
12
  export function SplitButton(t0) {
17
13
  const $ = _c(56);
package/dist/TextMenu.js CHANGED
@@ -10,11 +10,7 @@ import { ContextMenuRoot, ContextMenuTrigger, MenuItem, MenuPopup, MenuSeparator
10
10
  import { isApplePlatform } from './platform.js';
11
11
  import { selectAllWithin, selectionWithin } from './selection.js';
12
12
  import { EDIT_SHORTCUTS, matchesShortcut } from './shortcut.js';
13
- /*
14
- * A block of text and the menu that belongs to it: Copy for what is selected inside it, Select all
15
- * for the whole of it, on Cmd+A as well. Anywhere text can be selected a right-click has to offer
16
- * to copy it, and an app that draws every menu itself offers nothing at all without one of these.
17
- */
13
+ /* An app that draws every menu itself offers no Copy on a right-click without one of these. */
18
14
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
19
15
  export function TextMenu(t0) {
20
16
  const $ = _c(40);
package/dist/Tile.js CHANGED
@@ -1,10 +1,6 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
2
  import clsx from 'clsx';
3
3
  import { Kbd } from "./Kbd.js";
4
- /*
5
- * One thing to start with, as a card that is a button: a start screen and the empty places of an app
6
- * use it, so a place to begin looks the same wherever it is offered.
7
- */
8
4
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
5
  export function Tile(t0) {
10
6
  const $ = _c(35);
package/dist/Toasts.js CHANGED
@@ -25,10 +25,7 @@ const TONE = {
25
25
  };
26
26
  /* The box is as tall as the title's own line, so what sits beside the title centers on that line. */
27
27
  const TITLE_LINE = 'flex h-(--text-sm--line-height) shrink-0 items-center';
28
- /*
29
- * How long the offer in a toast still stands, drawn from the timer that takes the toast away: the
30
- * ring starts as far along as that timer already is, so both end together. With motion off it stays full.
31
- */
28
+ /* Starts as far along as the timer that takes the toast away, so both end together. With motion off it stays full. */
32
29
  function TimerRing(t0) {
33
30
  const $ = _c(13);
34
31
  const {
@@ -342,11 +339,6 @@ function ToastCard(t0) {
342
339
  }
343
340
  return t13;
344
341
  }
345
- /*
346
- * Bottom right, over everything: what an action is doing while it runs and how it went when it is
347
- * over, and a deletion that can still be taken back. A success takes itself away after four seconds,
348
- * a deletion after eight, and a failure waits to be read.
349
- */
350
342
  function _temp(action) {
351
343
  return /*#__PURE__*/_jsx(ActionButton, {
352
344
  action: action
package/dist/Tooltip.js CHANGED
@@ -24,7 +24,7 @@ export function TooltipProvider(t0) {
24
24
  }
25
25
  return t1;
26
26
  }
27
- /* A hint on hover and on keyboard focus. Every hint in an app is one of these, never a `title`. */
27
+ /* Every hint in an app is one of these, never a `title`. */
28
28
  export function Tooltip(t0) {
29
29
  const $ = _c(26);
30
30
  const {
@@ -5,11 +5,6 @@ import { setFormatSource } from './format/locale.js';
5
5
  import { addUiResources } from './locales.js';
6
6
  import { startInputModality } from './modality.js';
7
7
  import { TooltipProvider } from "./Tooltip.js";
8
- /*
9
- * Everything the library needs from an app, once, around the whole tree: its words in the app's
10
- * i18next, the source of the formatters, the shared tooltip delay and the note of which input device
11
- * is in use. Mount it above the first component of the library.
12
- */
13
8
  import { jsx as _jsx } from "react/jsx-runtime";
14
9
  export function UIProvider(t0) {
15
10
  const $ = _c(7);
package/dist/Waveform.js CHANGED
@@ -36,7 +36,6 @@ const barsOf = (levels, duration, from, to, count) => {
36
36
  return Math.min(1, Math.max(SILENCE, level));
37
37
  });
38
38
  };
39
- /* The loudness of a piece of audio over time, played up to the playhead, where a press or a drag seeks. */
40
39
  export function Waveform(t0) {
41
40
  const $ = _c(93);
42
41
  const {
@@ -107,7 +106,10 @@ export function Waveform(t0) {
107
106
  positionOf = t14;
108
107
  let t15;
109
108
  if ($[36] !== positionOf) {
110
- t15 = time_0 => positionOf(time_0) >= 0 && positionOf(time_0) <= 1;
109
+ t15 = time_0 => {
110
+ const position = positionOf(time_0);
111
+ return position >= 0 && position <= 1;
112
+ };
111
113
  $[36] = positionOf;
112
114
  $[37] = t15;
113
115
  } else {
package/dist/Wipe.js CHANGED
@@ -6,12 +6,7 @@ import { Icon } from "./Icon.js";
6
6
  import { formatPercent } from './format/number.js';
7
7
  import { mergeRefs } from './merge-refs.js';
8
8
  import { splitAt, splitForKey } from './wipe-split.js';
9
- /*
10
- * Two versions of one picture in one frame: `before` left of the split and `after` right of it, with a
11
- * handle between them a person drags or moves with the arrow keys. It fills the positioned element it
12
- * sits in. The handle is a line with a round knob on it, or the plain line, which is dragged anywhere
13
- * along its height.
14
- */
9
+ /* It fills the positioned element it sits in. A plain line handle is dragged anywhere along its height. */
15
10
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
16
11
  export function Wipe(t0) {
17
12
  const $ = _c(54);
@@ -30,7 +30,6 @@ function MenuIcon(t0) {
30
30
  }
31
31
  return t1;
32
32
  }
33
- /* The zoom group of a dock: out, the readout with its presets, in, and fit everything. */
34
33
  export function ZoomControls(t0) {
35
34
  const $ = _c(80);
36
35
  const {
package/dist/clipboard.js CHANGED
@@ -1,8 +1,5 @@
1
- /*
2
- * The clipboard, as the app uses it. A browser hands text over only to a document that is focused
3
- * and allowed, and there is nothing a person can do about a refusal, so both sides stay quiet.
4
- */
5
- /* Resolves to whether the text got there, for a caller that tells the person; it never rejects. */
1
+ /* A browser hands text over only to a focused, allowed document, and a person can do nothing about a refusal, so both sides stay quiet. */
2
+ /* Never rejects. */
6
3
  export const copyText = async text => {
7
4
  try {
8
5
  if (!navigator.clipboard) {