nish-ui 3.1.0 → 3.3.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 (107) hide show
  1. package/README.md +13 -6
  2. package/dist/base-tailwind.css +30 -15
  3. package/dist/base.css +30 -15
  4. package/dist/chart.js +2 -2
  5. package/dist/elements-all.js +78 -78
  6. package/dist/elements-charts.d.ts +1 -1
  7. package/dist/elements-charts.js +43 -42
  8. package/dist/elements-data.d.ts +10 -0
  9. package/dist/elements-data.js +4 -5
  10. package/dist/elements-forms.js +9 -9
  11. package/dist/elements.d.ts +1 -0
  12. package/dist/elements.js +4 -4
  13. package/dist/esm/chart-values.js +2 -1
  14. package/dist/esm/combobox-filter.js +6 -5
  15. package/dist/esm/command-filter.js +83 -0
  16. package/dist/esm/components/accordion.js +5 -3
  17. package/dist/esm/components/app-shell.js +9 -5
  18. package/dist/esm/components/breadcrumbs.js +8 -4
  19. package/dist/esm/components/calendar-base.js +33 -6
  20. package/dist/esm/components/calendar-classes.js +14 -2
  21. package/dist/esm/components/canvas/follow-caption.js +31 -21
  22. package/dist/esm/components/canvas/follow.js +5 -6
  23. package/dist/esm/components/canvas/minimap.js +3 -3
  24. package/dist/esm/components/canvas/system-canvas.js +3 -1
  25. package/dist/esm/components/canvas/view.js +0 -2
  26. package/dist/esm/components/carousel.js +2 -3
  27. package/dist/esm/components/charts.js +18 -7
  28. package/dist/esm/components/combobox.js +20 -9
  29. package/dist/esm/components/command.js +25 -63
  30. package/dist/esm/components/context-menu.js +2 -1
  31. package/dist/esm/components/data-classes.js +23 -8
  32. package/dist/esm/components/data.js +19 -10
  33. package/dist/esm/components/display.js +24 -15
  34. package/dist/esm/components/drawer.js +17 -4
  35. package/dist/esm/components/error-boundary.js +3 -3
  36. package/dist/esm/components/feedback.js +4 -4
  37. package/dist/esm/components/file-dropzone.js +39 -7
  38. package/dist/esm/components/filters.js +42 -1
  39. package/dist/esm/components/flow.js +12 -9
  40. package/dist/esm/components/forms-classes.js +3 -1
  41. package/dist/esm/components/forms.js +8 -6
  42. package/dist/esm/components/hooks.js +47 -13
  43. package/dist/esm/components/hover-card.js +2 -1
  44. package/dist/esm/components/inbox.js +9 -2
  45. package/dist/esm/components/latest.js +4 -2
  46. package/dist/esm/components/layout.js +7 -4
  47. package/dist/esm/components/menu.js +14 -1
  48. package/dist/esm/components/modal.js +17 -4
  49. package/dist/esm/components/multi-select.js +7 -7
  50. package/dist/esm/components/nav-classes.js +9 -0
  51. package/dist/esm/components/nav.js +32 -12
  52. package/dist/esm/components/navigate.js +1 -1
  53. package/dist/esm/components/overlay-dialog.js +35 -1
  54. package/dist/esm/components/pagination.js +1 -1
  55. package/dist/esm/components/primitives-classes.js +4 -4
  56. package/dist/esm/components/primitives.js +18 -5
  57. package/dist/esm/components/progress.js +2 -1
  58. package/dist/esm/components/radio-group.js +1 -1
  59. package/dist/esm/components/resource-classes.js +7 -3
  60. package/dist/esm/components/resource.js +17 -6
  61. package/dist/esm/components/segmented.js +2 -0
  62. package/dist/esm/components/separator.js +6 -1
  63. package/dist/esm/components/service-tokens.js +18 -7
  64. package/dist/esm/components/settings.js +21 -1
  65. package/dist/esm/components/slider.js +5 -1
  66. package/dist/esm/components/split.js +4 -2
  67. package/dist/esm/components/strings.js +17 -4
  68. package/dist/esm/components/table.js +15 -3
  69. package/dist/esm/components/tabs.js +3 -2
  70. package/dist/esm/components/tag-input.js +5 -1
  71. package/dist/esm/components/time-field.js +15 -7
  72. package/dist/esm/components/toast-card.js +5 -3
  73. package/dist/esm/components/toast-store.js +16 -4
  74. package/dist/esm/components/toast.js +4 -1
  75. package/dist/esm/components/tooltip.js +3 -2
  76. package/dist/esm/components/url-state.js +5 -2
  77. package/dist/esm/components/virtual-table.js +2 -2
  78. package/dist/esm/components/virtual.js +8 -4
  79. package/dist/esm/format.js +27 -4
  80. package/dist/esm/runtime.js +9 -2
  81. package/dist/esm/server/inbox/client.js +4 -0
  82. package/dist/esm/split-layout.js +2 -1
  83. package/dist/esm/theme.js +38 -15
  84. package/dist/esm/tokens.mjs +1 -1
  85. package/dist/format.d.ts +5 -3
  86. package/dist/format.js +36 -7
  87. package/dist/inbox-client.d.ts +6 -2
  88. package/dist/inbox-client.js +4 -1
  89. package/dist/index.d.ts +65 -30
  90. package/dist/nish-components.css +70 -23
  91. package/dist/nish-components.min.css +1 -1
  92. package/dist/nish.css +30 -15
  93. package/dist/nish.min.css +1 -1
  94. package/dist/node/vite.js +1 -1
  95. package/dist/server/hono.d.ts +10 -3
  96. package/dist/server/hono.js +108 -11
  97. package/dist/server/index.d.ts +21 -13
  98. package/dist/server/index.js +124 -29
  99. package/dist/service-tokens.d.ts +4 -4
  100. package/dist/{spa-7myD4xvA.d.ts → spa-FwS7yZ8p.d.ts} +36 -7
  101. package/dist/split-layout.js +2 -2
  102. package/dist/system-canvas.d.ts +11 -10
  103. package/dist/theme.d.ts +30 -2
  104. package/dist/theme.global.js +53 -21
  105. package/dist/theme.js +53 -20
  106. package/package.json +3 -2
  107. package/dist/tokens.js +0 -425
package/dist/format.js CHANGED
@@ -1,13 +1,20 @@
1
1
  // src/runtime.ts
2
- var version = true ? "3.1.0" : "dev";
2
+ var version = true ? "3.3.0" : "dev";
3
3
  var KEY = /* @__PURE__ */ Symbol.for("nish-ui.runtime.v1");
4
4
  function runtime() {
5
5
  const g = globalThis;
6
6
  return g[KEY] ??= { versions: /* @__PURE__ */ new Set(), slots: {} };
7
7
  }
8
+ function isDevelopment() {
9
+ try {
10
+ return process.env.NODE_ENV !== "production";
11
+ } catch {
12
+ return false;
13
+ }
14
+ }
8
15
  function register(rt) {
9
16
  rt.versions.add(version);
10
- if (rt.versions.size > 1 && !rt.warned && globalThis.process?.env?.NODE_ENV !== "production") {
17
+ if (rt.versions.size > 1 && !rt.warned && isDevelopment()) {
11
18
  rt.warned = true;
12
19
  console.warn(
13
20
  `nish-ui: two versions are loaded on this page (${[...rt.versions].join(", ")}). Overlays, toasts and theme state are shared, but mixing versions is unsupported.`
@@ -73,7 +80,24 @@ function nf(locale, min, max) {
73
80
  () => new Intl.NumberFormat(locale, { minimumFractionDigits: min, maximumFractionDigits: max })
74
81
  );
75
82
  }
76
- function dtf(locale, key, options, timeZone) {
83
+ var zoneOk = /* @__PURE__ */ new Map();
84
+ function safeZone(timeZone) {
85
+ if (!timeZone) return void 0;
86
+ let ok = zoneOk.get(timeZone);
87
+ if (ok === void 0) {
88
+ try {
89
+ new Intl.DateTimeFormat("en-US", { timeZone });
90
+ ok = true;
91
+ } catch {
92
+ ok = false;
93
+ }
94
+ if (zoneOk.size >= 64) zoneOk.clear();
95
+ zoneOk.set(timeZone, ok);
96
+ }
97
+ return ok ? timeZone : void 0;
98
+ }
99
+ function dtf(locale, key, options, zone2) {
100
+ const timeZone = safeZone(zone2);
77
101
  return cached(
78
102
  `d|${locale}|${key}|${timeZone ?? ""}`,
79
103
  () => new Intl.DateTimeFormat(locale, timeZone ? { ...options, timeZone } : options)
@@ -143,7 +167,7 @@ function money(v, o = {}) {
143
167
  }
144
168
  function signedMoney(v, o = {}) {
145
169
  if (!finite(v)) return DASH;
146
- if (Math.abs(v) < 5e-3) return "No change";
170
+ if (Math.abs(v) < 5e-3) return o.zero ?? "No change";
147
171
  return (v < 0 ? MINUS : "+") + moneyAbs(Math.abs(v), o, loc(o));
148
172
  }
149
173
  function pct(v, o = {}) {
@@ -181,7 +205,8 @@ function bytes(v, o = {}) {
181
205
  i++;
182
206
  }
183
207
  const text = i === 0 || abs >= 100 ? fixed(abs, 0, 0, locale) : fixed(abs, 0, 1, locale);
184
- return (v < 0 ? MINUS : "") + text + " " + BYTE_UNITS[i];
208
+ const zero = Number(text.replace(/[^0-9]/g, "")) === 0;
209
+ return (v < 0 && !zero ? MINUS : "") + text + " " + BYTE_UNITS[i];
185
210
  }
186
211
  var DURATION_PARTS = [
187
212
  [86400, "d", "day"],
@@ -258,7 +283,12 @@ function ago(t, o = {}) {
258
283
  if (abs < 45) return english ? "just now" : rtf(locale, long ? "long" : "narrow").format(0, "second");
259
284
  let pick = AGO_UNITS[0];
260
285
  for (const u of AGO_UNITS) if (abs >= u[0]) pick = u;
261
- const n = Math.max(1, Math.round(abs / pick[0]));
286
+ let n = Math.max(1, Math.round(abs / pick[0]));
287
+ const next = AGO_UNITS[AGO_UNITS.indexOf(pick) + 1];
288
+ if (next && (n * pick[0] >= next[0] || pick[1] === "month" && n >= 12)) {
289
+ pick = next;
290
+ n = Math.max(1, Math.round(abs / pick[0]));
291
+ }
262
292
  const past = diff < 0;
263
293
  if (!english) return rtf(locale, long ? "long" : "narrow").format(past ? -n : n, pick[1]);
264
294
  if (long) return rtf(locale, "long").format(past ? -n : n, pick[1]);
@@ -347,4 +377,3 @@ export {
347
377
  signedMoney,
348
378
  time
349
379
  };
350
- //# sourceMappingURL=format.js.map
@@ -57,7 +57,7 @@ interface InboxEventInput {
57
57
  kind: string;
58
58
  /** Headline, trimmed, 1-140 characters. Longer text is cut to 139 plus an ellipsis. */
59
59
  title: string;
60
- /** Details, trimmed, up to 2000 characters. Longer text is cut to 1999 plus an ellipsis; an empty string becomes undefined. */
60
+ /** Details, trimmed, up to 2000 characters. Longer text is cut to 1999 plus an ellipsis; an empty string becomes null. */
61
61
  body?: string;
62
62
  /** Link opened when the notification or item is tapped. http: or https:, up to 2000 characters. */
63
63
  url?: string;
@@ -69,7 +69,11 @@ interface InboxEventInput {
69
69
  resolve?: boolean;
70
70
  /** ISO 8601 time the event happened. Defaults to now; future times are clamped to now. */
71
71
  occurredAt?: string;
72
- /** Flat extra data, JSON-encoded at most 4096 bytes. */
72
+ /**
73
+ * Flat extra data, JSON-encoded at most 4096 bytes. Only data.actionToken (ACTION_TOKEN_FIELD) is private
74
+ * (stripped before the browser and /api/v1 see the item); every other key is visible in the inbox UI and API.
75
+ * /ingest trusts every local caller, so action routes must verify actionToken (actionTokenMatches) on every call.
76
+ */
73
77
  data?: InboxData;
74
78
  /** Up to 3 buttons shown on the item, ids unique. A repeat with the same dedupeKey replaces them. */
75
79
  actions?: Array<Omit<InboxAction, 'method'> & {
@@ -254,6 +254,10 @@ function createInboxClient(options) {
254
254
  }
255
255
  if (queue[0] === head) queue.shift();
256
256
  if (result.kind === "ok") sentSinceDown++;
257
+ else if (!loggedInvalid.has(result.error)) {
258
+ loggedInvalid.add(result.error);
259
+ log(`queued event dropped: ${result.error}`);
260
+ }
257
261
  }
258
262
  retryStep = 0;
259
263
  if (down) {
@@ -317,4 +321,3 @@ export {
317
321
  isInboxActionTarget,
318
322
  parseInboxEvent
319
323
  };
320
- //# sourceMappingURL=inbox-client.js.map
package/dist/index.d.ts CHANGED
@@ -11,9 +11,8 @@ declare const VERSION: string;
11
11
  /** href for user-supplied links: relative URLs, #fragments, http(s), mailto and tel pass;
12
12
  * anything else (javascript:, data:, vbscript:, file:) returns null. Trims leading and trailing
13
13
  * C0 controls and spaces and drops tabs and newlines the way the WHATWG URL parser does, then
14
- * reads the scheme from the very string that is returned. Other Unicode whitespace (NBSP, U+FEFF,
15
- * U+2028, U+3000) is not stripped by browsers, so it is kept, and a scheme hidden behind it is
16
- * not a scheme there either. */
14
+ * reads the scheme from the very string that is returned. A URL with leading or trailing
15
+ * non-C0 Unicode whitespace (NBSP, U+FEFF, U+2028, U+3000) is refused (null). */
17
16
  declare function safeUrl(href: string | null | undefined): string | null;
18
17
 
19
18
  type Scheme = 'dark' | 'light';
@@ -45,6 +44,8 @@ interface NishStrings {
45
44
  back: string;
46
45
  /** ContextMenu: the menu's accessible name when no menuLabel is given. */
47
46
  contextMenu: string;
47
+ /** CommandPalette: accessible name of the external-link mark on a row that opens in a new tab. */
48
+ opensInNewTab: string;
48
49
  /** VirtualTable: live-region message after the sort changes (dir null when cleared). */
49
50
  sortAnnounce: (header: string, dir: 'asc' | 'desc' | null) => string;
50
51
  /** Toast, Callout: dismiss button. */
@@ -55,6 +56,8 @@ interface NishStrings {
55
56
  copy: string;
56
57
  /** CopyButton: label after copying. */
57
58
  copied: string;
59
+ /** CopyButton: label when copying failed. */
60
+ copyFailed: string;
58
61
  /** AppHeader: hub pill title. */
59
62
  hubTitle: string;
60
63
  /** AppHeader: hub pill text. */
@@ -77,6 +80,8 @@ interface NishStrings {
77
80
  removeNamed: (name: string) => string;
78
81
  /** Combobox, CommandPalette: empty list. */
79
82
  noMatches: string;
83
+ /** Combobox, MultiSelect, CommandPalette: polite announcement of how many results are showing. */
84
+ resultsCount: (count: number) => string;
80
85
  /** Combobox, FilterBar, FilterSheet: clear button. */
81
86
  clear: string;
82
87
  /** Combobox: loading row. */
@@ -161,6 +166,8 @@ interface NishStrings {
161
166
  actions: string;
162
167
  /** ConnectionBanner: offline message. */
163
168
  offline: string;
169
+ /** ConnectionBanner: default message when the server probe fails. */
170
+ serverUnreachable: string;
164
171
  /** ResponsiveTable, AsyncPanel: empty state. */
165
172
  nothingHere: string;
166
173
  /** ResponsiveTable: skeleton label. */
@@ -173,6 +180,10 @@ interface NishStrings {
173
180
  noData: string;
174
181
  /** LineChart, BarChart: aria label of an empty chart. */
175
182
  noDataNamed: (label: string) => string;
183
+ /** RangeBar: default accessible name, with locale-formatted numbers (current is null when not set). */
184
+ rangeLabel: (low: string, high: string, current: string | null, min: string, max: string) => string;
185
+ /** LineChart: last row of the hidden data table when it was cut short. */
186
+ chartTruncated: (shown: number, total: number) => string;
176
187
  /** FilterBar, FilterSheet: title. */
177
188
  filters: string;
178
189
  /** FilterBar: clear all filters. */
@@ -185,6 +196,8 @@ interface NishStrings {
185
196
  newCount: (value: string | number) => string;
186
197
  /** BottomNav, NavRail, SectionNav: landmark. */
187
198
  sections: string;
199
+ /** SectionNav: default landmark name. */
200
+ onThisPage: string;
188
201
  /** MoreSheet: theme row. */
189
202
  theme: string;
190
203
  /** NavRail: sidebar landmark. */
@@ -277,6 +290,8 @@ interface NishStrings {
277
290
  followActivity: string;
278
291
  /** SystemCanvas legend: menu label. */
279
292
  canvasLines: string;
293
+ /** SystemCanvas: role description of the canvas region. */
294
+ canvasRole: string;
280
295
  /** ServiceTokens: title. */
281
296
  serviceTokens: string;
282
297
  /** ServiceTokens: intro text. */
@@ -295,6 +310,14 @@ interface NishStrings {
295
310
  tokenRevokeTitle: (name: string) => string;
296
311
  /** ServiceTokens: revoke failure with no message. */
297
312
  tokenRevokeFailed: string;
313
+ /** ServiceTokens: empty-list message. */
314
+ tokenEmpty: string;
315
+ /** ServiceTokens: body of the revoke confirm dialog. */
316
+ tokenRevokeBody: string;
317
+ /** ServiceTokens: created-at text on a row. */
318
+ tokenCreated: (when: string) => string;
319
+ /** ServiceTokens: source tag for a token that comes from the SERVICE_TOKENS environment variable. */
320
+ tokenFromEnv: string;
298
321
  /** Inbox: mark-handled action. */
299
322
  inboxMarkHandled: string;
300
323
  /** Inbox: snooze action. */
@@ -319,6 +342,8 @@ interface NishStrings {
319
342
  nextPage: string;
320
343
  /** Pagination: page button aria label. */
321
344
  pageLabel: (n: number) => string;
345
+ /** Pagination: compact text, for example "Page 3 of 10". */
346
+ pageOfCount: (page: number, count: number) => string;
322
347
  /** Pagination: nav landmark. */
323
348
  paginationLabel: string;
324
349
  /** Breadcrumbs: nav landmark. */
@@ -525,8 +550,10 @@ declare function mountScrollspy(nav: HTMLElement, o?: MountScrollspyOptions): ((
525
550
  * restored now. Updates the `.nish-checklist-progress` element before the list (or the
526
551
  * first one in its parent) to "{done} of {total}" and its `--p` meter. Without
527
552
  * `data-store` it still counts. Storage failures are ignored. Returns a function that
528
- * removes the listener. */
529
- declare function mountChecklist(list: HTMLElement): () => void;
553
+ * removes the listener. Pass `format` for another language than "{done} of {total}". */
554
+ declare function mountChecklist(list: HTMLElement, opts?: {
555
+ format?: (done: number, total: number) => string;
556
+ }): () => void;
530
557
  /** For pages without a framework: apply now and start syncing. */
531
558
  declare function initTheme(): ThemeName;
532
559
 
@@ -696,7 +723,7 @@ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
696
723
  size?: ButtonSize;
697
724
  /** Link variant only: skip the 44px touch hit area, for a link inside running text. */
698
725
  inline?: boolean;
699
- /** Shows a spinner, disables the button and sets aria-busy. */
726
+ /** Shows a spinner, blocks clicks and form submit, and sets aria-busy. The button stays focusable (aria-disabled, not the native disabled attribute), so keyboard focus survives the action. */
700
727
  loading?: boolean;
701
728
  /** Icon before the label (16px for md and lg, 12–14px for xs and sm). Replaced by the
702
729
  * spinner while loading. */
@@ -767,13 +794,15 @@ interface CardProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
767
794
  /** Renders a CardHeader first. On an unpadded card the header is divided (its own
768
795
  * padding and a bottom border). */
769
796
  title?: ReactNode;
797
+ /** The title's heading level; only with title. Default "h2". */
798
+ titleAs?: 'h2' | 'h3' | 'h4';
770
799
  /** The header's description; only with title. */
771
800
  description?: ReactNode;
772
801
  /** The header's end-aligned action slot; only with title. */
773
802
  action?: ReactNode;
774
803
  }
775
804
  /** The surface panel every widget, table and form sits in. */
776
- declare function Card({ as, padding, padded, interactive, variant, title, description, action, className, children, ref, ...rest }: CardProps): react.JSX.Element;
805
+ declare function Card({ as, padding, padded, interactive, variant, title, titleAs, description, action, className, children, ref, ...rest }: CardProps): react.JSX.Element;
777
806
  interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
778
807
  /** The badge element. */
779
808
  ref?: Ref<HTMLSpanElement>;
@@ -1915,7 +1944,7 @@ interface CopyButtonProps extends Omit<ComponentPropsWithoutRef<'button'>, 'onCo
1915
1944
  /** Shown for 1.5s after a copy and announced politely. Default: the provider's `copied` string. */
1916
1945
  copiedLabel?: string;
1917
1946
  /** Shown for 1.5s when neither the Clipboard API nor the textarea fallback worked, and
1918
- * announced politely. Default "Copy failed". */
1947
+ * announced politely. Default: the provider's `copyFailed` string ("Copy failed"). */
1919
1948
  failedLabel?: string;
1920
1949
  /** A square IconButton instead of a labelled Button. */
1921
1950
  iconOnly?: boolean;
@@ -2487,7 +2516,7 @@ interface VirtualTableProps<T> extends Omit<ComponentPropsWithoutRef<'div'>, 'ch
2487
2516
  onRowClick?: (row: T, index: number) => void;
2488
2517
  /** A 3px edge at the start of a row: ok, warn or loss. Say the status in a cell too. */
2489
2518
  rowTone?: (row: T) => 'ok' | 'warn' | 'loss' | undefined;
2490
- /** Shows skeleton rows instead of the data. */
2519
+ /** Shows a skeleton block (224px tall) instead of the data. */
2491
2520
  loading?: boolean;
2492
2521
  /** Shown when there are no rows. Default: the "nothingHere" string. */
2493
2522
  empty?: ReactNode;
@@ -2900,8 +2929,8 @@ interface SectionNavProps extends Omit<ComponentPropsWithoutRef<'nav'>, 'childre
2900
2929
  /** Write `#id` with history.replaceState on click (default true). Pass false in apps that
2901
2930
  * use hash routing. */
2902
2931
  updateHash?: boolean;
2903
- /** Accessible name. Default "On this page" (not "Sections", which the app navs use, so
2904
- * the two landmarks differ). Translate it per instance. */
2932
+ /** Accessible name. Default: the `onThisPage` string ("On this page", not "Sections", which the app
2933
+ * navs use, so the two landmarks differ). */
2905
2934
  label?: string;
2906
2935
  }
2907
2936
  /** A row of jump chips for a long page. The chip of the section being read is marked
@@ -3018,7 +3047,7 @@ interface ConnectionBannerProps extends Omit<ComponentPropsWithoutRef<'div'>, 'c
3018
3047
  healthUrl?: string;
3019
3048
  /** Base interval between probes. After failures it doubles up to 4x. Default 30000. */
3020
3049
  intervalMs?: number;
3021
- /** Shown when the probe fails. Default "Can't reach the server". */
3050
+ /** Shown when the probe fails. Default: the `serverUnreachable` string ("Can't reach the server"). */
3022
3051
  message?: string;
3023
3052
  /** Shown when the browser is offline. Default: the provider's `offline` string. */
3024
3053
  offlineMessage?: string;
@@ -3130,7 +3159,7 @@ interface RangeBarProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children'
3130
3159
  high: number;
3131
3160
  /** Marks a value (e.g. the current price) with a dot. */
3132
3161
  current?: number;
3133
- /** The accessible name. Default (English): "Range low to high, current x, within min to max". */
3162
+ /** The accessible name. Default: the `rangeLabel` string (English: "Range low to high, current x, within min to max"). */
3134
3163
  label?: string;
3135
3164
  /** The locale of the numbers in the default name. Default: the provider's locale, else en-US. */
3136
3165
  locale?: string;
@@ -3182,9 +3211,9 @@ interface CommandPaletteProps {
3182
3211
  placeholder?: string;
3183
3212
  /** Text shown when nothing matches. Default 'No results'. */
3184
3213
  emptyText?: string;
3185
- /** Screen-reader announcement of the result count. Default "3 results". */
3214
+ /** Screen-reader announcement of the result count. Default: the `resultsCount` string ("3 results"). */
3186
3215
  resultsLabel?: (count: number) => string;
3187
- /** Accessible name of the "opens in a new tab" mark on external rows. Default 'opens in a new tab'. */
3216
+ /** Accessible name of the "opens in a new tab" mark on external rows. Default: the `opensInNewTab` string ('opens in a new tab'). */
3188
3217
  externalLabel?: string;
3189
3218
  /** Open with Ctrl/Cmd+K, and with `/` when focus is not in a field (default true). */
3190
3219
  hotkey?: boolean;
@@ -3229,8 +3258,9 @@ declare function useNarrow(): boolean;
3229
3258
  /** The largest Tailwind breakpoint the viewport has reached: base, sm (640), md (768), lg (1024) or xl (1280). */
3230
3259
  declare function useBreakpoint(): Breakpoint;
3231
3260
  /**
3232
- * Sets document.title to "title · app" (or just the app, or just the title) and restores
3233
- * the previous title on unmount. An undefined title with no app leaves the title alone.
3261
+ * Sets document.title to "title · app" (or just the app, or just the title). With several
3262
+ * hooks mounted the innermost one that was given a title wins, and the original title comes
3263
+ * back when the last one unmounts. An undefined title with no app leaves the title alone.
3234
3264
  */
3235
3265
  declare function useDocumentTitle(title: string | undefined, o?: {
3236
3266
  app?: string;
@@ -3241,7 +3271,7 @@ declare function useNow(intervalMs?: number): number;
3241
3271
  * State kept in localStorage. JSON by default, the raw string with { raw: true }. Never
3242
3272
  * throws (private mode, quota and bad JSON fall back to the initial value) and follows
3243
3273
  * changes from other tabs (`storage` events) and from other hooks on the same key. The
3244
- * server and the first client render return `initial`.
3274
+ * server and the first client render return `initial`. `initial` is read once per key.
3245
3275
  */
3246
3276
  declare function useLocalStorage<T>(key: string, initial: T, o?: {
3247
3277
  raw?: boolean;
@@ -3434,7 +3464,7 @@ interface AppShellProps {
3434
3464
  hub?: AppHeaderHub | false;
3435
3465
  /** Every destination, in order. All show in the rail and the desktop header nav (or the sidebar); the BottomNav shows the first `primary` and puts the rest in a MoreSheet. Empty or left out, the shell has no nav at all (no tabs, rail, sidebar, BottomNav or sheet): the signed-out frame. */
3436
3466
  nav?: NavItem[];
3437
- /** How many items the BottomNav shows before "More". Default 4; when nav.length <= 5 all fit and there is no More. */
3467
+ /** How many items the BottomNav shows before "More". Default 4; when nav.length <= 5 all fit (with moreItems, 4 fit and the sixth cell is More). */
3438
3468
  primary?: number;
3439
3469
  /** Extra MoreSheet-only items (settings, sign out) shown after the overflow nav items. From md up they sit in a "More" menu in the header. Give them `onSelect`: the menu runs it, and only follows `href` (a full page load) when there is no `onSelect`. */
3440
3470
  moreItems?: NavItem[];
@@ -3629,7 +3659,7 @@ interface FilterBarProps extends Omit<ComponentPropsWithRef<'div'>, 'children'>
3629
3659
  children?: ReactNode;
3630
3660
  /** How many filters differ from their defaults: shown as a count on the Filters button. */
3631
3661
  activeCount?: number;
3632
- /** Shows "Clear" when activeCount > 0 (inline from md, in the sheet footer below md). */
3662
+ /** Shows "Clear filters" inline from md (or lg) when activeCount > 0; below the breakpoint the sheet footer always shows Clear, disabled while activeCount is 0. */
3633
3663
  onClear?: () => void;
3634
3664
  /** Right-aligned extras that stay visible at every width (a sort Select, a view toggle). */
3635
3665
  trailing?: ReactNode;
@@ -3644,7 +3674,10 @@ interface FilterBarProps extends Omit<ComponentPropsWithRef<'div'>, 'children'>
3644
3674
  className?: string;
3645
3675
  }
3646
3676
  /** The search and filter row of a list page. From md up the controls sit inline; below md
3647
- * they move into a bottom sheet behind a Filters button that shows how many are on. */
3677
+ * they move into a bottom sheet behind a Filters button that shows how many are on.
3678
+ *
3679
+ * On the server and the first client render the layout is chosen by CSS at the breakpoint, so
3680
+ * phones see the Filters button from the first paint, then the media query takes over. */
3648
3681
  declare function FilterBar({ search, children, activeCount, onClear, trailing, sticky, sheetTitle, sheetBelow, summary, className, ref, ...rest }: FilterBarProps): react.JSX.Element;
3649
3682
 
3650
3683
  /** Where useUrlState reads and writes the query string. */
@@ -3697,7 +3730,7 @@ interface SettingRowProps extends Omit<ComponentPropsWithRef<'div'>, 'children'>
3697
3730
  stacked?: boolean;
3698
3731
  /** Keep the control at the end of the label row at every width (Switch, Checkbox). */
3699
3732
  inline?: boolean;
3700
- /** Tighter row (44px tall, no side padding, label beside the control at every width).
3733
+ /** Tighter row (44px tall, label beside the control at every width). No side padding inside a compact SettingsSection; keeps px-4 in a normal section.
3701
3734
  * Default: on inside a compact SettingsSection. */
3702
3735
  compact?: boolean;
3703
3736
  /** A muted status after the control: "Saved", "Saving…", or an error (tone="error" → text-th-loss). */
@@ -3792,7 +3825,7 @@ interface ComboboxProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'
3792
3825
  clearLabel?: string;
3793
3826
  /** The loading row and its announcement. Default "Searching…" (NishProvider strings). */
3794
3827
  loadingText?: string;
3795
- /** The polite announcement of the result count. Default "3 results" / "1 result". */
3828
+ /** The polite announcement of the result count. Default: the `resultsCount` string ("3 results" / "1 result"). */
3796
3829
  resultsText?: (count: number) => string;
3797
3830
  className?: string;
3798
3831
  }
@@ -3911,7 +3944,7 @@ interface DatePickerProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange
3911
3944
  /** A date field: type the date in the reader's own numeric order (or ISO), or pick it from a
3912
3945
  * Calendar in a Popover. The value is a YYYY-MM-DD string, like a native date input. `ref`,
3913
3946
  * `id`, `aria-*`, `name` and `required` belong to the input; `className` and other attributes
3914
- * go to the wrapper. */
3947
+ * go to the wrapper. A typed 2-digit year means the year within 80 years before and 19 after this year (CLDR): in 2026, 99 is 1999 and 30 is 2030. */
3915
3948
  declare function DatePicker({ ref, value: valueProp, defaultValue, onValueChange, min: minProp, max: maxProp, isDateDisabled, locale, weekStartsOn, captionLayout, placeholder, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, 'aria-invalid': ariaInvalid, invalid, id, name, form, required, disabled, size, calendarLabel, className, ...rest }: DatePickerProps): react.JSX.Element;
3916
3949
 
3917
3950
  interface RangeCalendarProps extends CalendarSharedProps {
@@ -3983,7 +4016,7 @@ interface DateRangePickerProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onC
3983
4016
  /** A date range field: type both dates in the reader's own numeric order (or ISO), or pick them
3984
4017
  * from a RangeCalendar in a Popover. The value is { from, to } as YYYY-MM-DD strings. `ref`,
3985
4018
  * `id`, `aria-*`, `name` and `required` belong to the input; `className` and other attributes
3986
- * go to the wrapper. */
4019
+ * go to the wrapper. A typed 2-digit year means the year within 80 years before and 19 after this year (CLDR): in 2026, 99 is 1999 and 30 is 2030. */
3987
4020
  declare function DateRangePicker({ ref, value: valueProp, defaultValue, onValueChange, min: minProp, max: maxProp, isDateDisabled, allowDisabledInRange, locale, weekStartsOn, captionLayout, placeholder, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, 'aria-invalid': ariaInvalid, invalid, id, name, form, required, disabled, size, calendarLabel, className, ...rest }: DateRangePickerProps): react.JSX.Element;
3988
4021
 
3989
4022
  type HourCycle = 12 | 24;
@@ -4085,7 +4118,7 @@ interface MultiSelectProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChang
4085
4118
  loading?: boolean;
4086
4119
  /** The loading row and its announcement. Default "Searching…" (NishProvider strings). */
4087
4120
  loadingText?: string;
4088
- /** The polite announcement of the result count. Default "3 results" / "1 result". */
4121
+ /** The polite announcement of the result count. Default: the `resultsCount` string ("3 results" / "1 result"). */
4089
4122
  resultsText?: (count: number) => string;
4090
4123
  /** md (default) or sm. Both grow to 44px on touch screens. */
4091
4124
  size?: 'sm' | 'md';
@@ -4355,7 +4388,7 @@ type MediaThumbSize = 'sm' | 'md';
4355
4388
  interface MediaThumbProps extends Omit<ComponentPropsWithoutRef<'span'>, 'children'> {
4356
4389
  /** The image URL. Relative, http(s) URLs load; javascript:, data: and other schemes show the fallback. */
4357
4390
  src?: string;
4358
- /** wide: 16:9 (64x36, or 96x54 at md). round and square: 36px, or 48px at md. */
4391
+ /** wide: 16:9 (64x36 at sm; at md 72x41, or 96x54 from 420px wide). round and square: 36px, or 48px at md. */
4359
4392
  shape?: MediaThumbShape;
4360
4393
  /** sm for dense lists, md otherwise. */
4361
4394
  size?: MediaThumbSize;
@@ -4631,7 +4664,7 @@ interface PaginationProps extends Omit<ComponentPropsWithoutRef<'nav'>, 'onChang
4631
4664
  nextLabel?: string;
4632
4665
  /** Label of one page button. Default: `pageLabel` from the strings. */
4633
4666
  pageLabel?: (page: number) => string;
4634
- /** The compact text. Default: "Page 3 of 10" (English; pass your own for other languages). */
4667
+ /** The compact text. Default: the `pageOfCount` string ("Page 3 of 10"). */
4635
4668
  compactLabel?: (page: number, pageCount: number) => string;
4636
4669
  ref?: Ref<HTMLElement>;
4637
4670
  }
@@ -4663,9 +4696,11 @@ interface BreadcrumbsProps extends Omit<ComponentPropsWithoutRef<'nav'>, 'childr
4663
4696
  children?: ReactNode;
4664
4697
  /** Renders a crumb with a href as a router link: `(item, props) => <Link to={props.href} {...props} />`. */
4665
4698
  renderLink?: (item: BreadcrumbItem, props: BreadcrumbLinkProps) => ReactNode;
4699
+ /** Called instead of a full page load when a crumb inside the collapsed "…" menu is chosen (the menu rows are buttons, so renderLink cannot render them): `(href) => navigate(href)`. Without it the page navigates with location.assign. */
4700
+ onNavigate?: (href: string, item: BreadcrumbItem) => void;
4666
4701
  /** The separator between crumbs. Default: a chevron that mirrors in RTL. */
4667
4702
  separator?: ReactNode;
4668
- /** More crumbs than this collapse the middle ones into a "…" menu (default 4). */
4703
+ /** More crumbs than this collapse the middle ones into a "…" menu (default 4; values under 3 act as 3, so first, "…" and the current crumb always fit). */
4669
4704
  maxItems?: number;
4670
4705
  /** auto (default): collapse only under 640px of container width. always: whenever there are more than maxItems. never: show every crumb. */
4671
4706
  collapse?: 'auto' | 'always' | 'never';
@@ -4677,7 +4712,7 @@ interface BreadcrumbsProps extends Omit<ComponentPropsWithoutRef<'nav'>, 'childr
4677
4712
  }
4678
4713
  /** A trail of where the page sits: links, a chevron between them and aria-current="page" on the
4679
4714
  * last crumb. A long trail collapses its middle crumbs into a "…" menu on narrow containers. */
4680
- declare function Breadcrumbs({ items, children, renderLink, separator, maxItems, collapse, label, moreLabel, className, ref, ...rest }: BreadcrumbsProps): react.JSX.Element;
4715
+ declare function Breadcrumbs({ items, children, renderLink, onNavigate, separator, maxItems, collapse, label, moreLabel, className, ref, ...rest }: BreadcrumbsProps): react.JSX.Element;
4681
4716
 
4682
4717
  type AccordionHeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
4683
4718
  interface AccordionBase extends Omit<ComponentPropsWithoutRef<'div'>, 'defaultValue' | 'onChange'> {