@tensor_1/react 2.10.0 → 2.12.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 (81) hide show
  1. package/README.md +10 -1
  2. package/dist/ChartCore-Bt1C84ty.d.cts +22 -0
  3. package/dist/chart-preset.cjs +168 -0
  4. package/dist/chart-preset.d.cts +9 -0
  5. package/dist/chart-preset.d.ts +9 -0
  6. package/dist/chart-preset.js +35 -0
  7. package/dist/chart.cjs +58 -41
  8. package/dist/chart.d.cts +6 -21
  9. package/dist/chart.d.ts +2 -1
  10. package/dist/components/Alert.js +7 -15
  11. package/dist/components/AppShell.d.ts +1 -3
  12. package/dist/components/AppShell.js +1 -3
  13. package/dist/components/Avatar.js +1 -2
  14. package/dist/components/Button.js +16 -32
  15. package/dist/components/Card.d.ts +1 -3
  16. package/dist/components/Card.js +2 -2
  17. package/dist/components/Chart.d.ts +6 -21
  18. package/dist/components/Chart.js +5 -85
  19. package/dist/components/ChartCore.d.ts +33 -0
  20. package/dist/components/ChartCore.js +100 -0
  21. package/dist/components/CommandPalette.d.ts +2 -4
  22. package/dist/components/CommandPalette.js +13 -66
  23. package/dist/components/Comments.d.ts +1 -5
  24. package/dist/components/Comments.js +1 -1
  25. package/dist/components/Composer.d.ts +1 -8
  26. package/dist/components/Composer.js +2 -7
  27. package/dist/components/DetailLayout.js +1 -1
  28. package/dist/components/Drawer.d.ts +4 -3
  29. package/dist/components/Drawer.js +4 -6
  30. package/dist/components/Field.js +3 -6
  31. package/dist/components/Inbox.d.ts +3 -13
  32. package/dist/components/Inbox.js +3 -62
  33. package/dist/components/Input.d.ts +2 -13
  34. package/dist/components/Input.js +5 -20
  35. package/dist/components/Kanban.d.ts +3 -15
  36. package/dist/components/Kanban.js +10 -42
  37. package/dist/components/Meter.d.ts +1 -3
  38. package/dist/components/Meter.js +1 -10
  39. package/dist/components/Modal.d.ts +5 -3
  40. package/dist/components/Modal.js +4 -6
  41. package/dist/components/NavFavourites.js +35 -119
  42. package/dist/components/PageHeader.d.ts +1 -3
  43. package/dist/components/PageHeader.js +2 -2
  44. package/dist/components/Peek.d.ts +4 -3
  45. package/dist/components/Peek.js +6 -9
  46. package/dist/components/Progress.d.ts +1 -3
  47. package/dist/components/Progress.js +3 -5
  48. package/dist/components/Radio.d.ts +1 -3
  49. package/dist/components/Radio.js +2 -6
  50. package/dist/components/Segmented.js +3 -2
  51. package/dist/components/Sidebar.js +2 -4
  52. package/dist/components/Spinner.d.ts +1 -3
  53. package/dist/components/Spinner.js +3 -3
  54. package/dist/components/Stat.js +1 -5
  55. package/dist/components/States.d.ts +1 -3
  56. package/dist/components/States.js +2 -8
  57. package/dist/components/Table.d.ts +2 -9
  58. package/dist/components/Table.js +8 -11
  59. package/dist/components/Tabs.d.ts +1 -13
  60. package/dist/components/Tabs.js +4 -78
  61. package/dist/components/Timeline.d.ts +3 -3
  62. package/dist/components/Timeline.js +3 -3
  63. package/dist/components/Toast.js +5 -42
  64. package/dist/components/Tooltip.d.ts +1 -3
  65. package/dist/components/Tooltip.js +5 -44
  66. package/dist/components/Tree.d.ts +0 -2
  67. package/dist/components/Tree.js +4 -26
  68. package/dist/hooks/useDialog.d.ts +1 -1
  69. package/dist/hooks/useDialog.js +2 -17
  70. package/dist/hooks/useTable.d.ts +0 -5
  71. package/dist/hooks/useTable.js +12 -27
  72. package/dist/hooks/useVirtualRows.d.ts +27 -0
  73. package/dist/hooks/useVirtualRows.js +50 -0
  74. package/dist/index.cjs +291 -760
  75. package/dist/index.d.cts +61 -127
  76. package/dist/index.d.ts +3 -2
  77. package/dist/index.js +4 -3
  78. package/dist/table-engine.js +8 -6
  79. package/dist/tree-model.d.ts +0 -4
  80. package/dist/tree-model.js +0 -8
  81. package/package.json +16 -2
package/dist/index.d.cts CHANGED
@@ -1,9 +1,9 @@
1
1
  import * as react from 'react';
2
- import { RefObject, ButtonHTMLAttributes, ReactNode, InputHTMLAttributes, AriaAttributes, TextareaHTMLAttributes, SelectHTMLAttributes, HTMLAttributes, AnchorHTMLAttributes, TdHTMLAttributes, TableHTMLAttributes, ThHTMLAttributes } from 'react';
2
+ import { RefObject, ButtonHTMLAttributes, ReactNode, InputHTMLAttributes, TextareaHTMLAttributes, SelectHTMLAttributes, CSSProperties, HTMLAttributes, AnchorHTMLAttributes, TdHTMLAttributes, TableHTMLAttributes, ThHTMLAttributes } from 'react';
3
3
 
4
4
  declare function cx(...args: (string | false | null | undefined | 0)[]): string;
5
5
 
6
- declare function useDialog(open: boolean, onClose?: () => void): React.RefObject<HTMLDialogElement>;
6
+ declare function useDialog(open: boolean): React.RefObject<HTMLDialogElement>;
7
7
 
8
8
  /**
9
9
  * uix table engine — framework-agnostic, dependency-free logic for data grids.
@@ -114,11 +114,6 @@ interface UseTableResult<T> {
114
114
  pinned: ReadonlySet<string>;
115
115
  /** header select-all tri-state over the current derived rows. */
116
116
  selectAll: SelectAllState;
117
- /**
118
- * Screen-reader status text reflecting the latest change — "Sorted by {field}, {dir}",
119
- * "{n} results" (filter/search), "{n} selected". Pass to `<TableWrap announcement>` (UIX-A11Y-2).
120
- */
121
- announcement: string;
122
117
  /** cycle a column's sort; pass additive (⇧-click) to keep it as a secondary key. */
123
118
  toggleSort: (field: string, additive?: boolean) => void;
124
119
  setSort: (keys: SortKey[]) => void;
@@ -145,6 +140,30 @@ interface UseTableResult<T> {
145
140
  */
146
141
  declare function useTable<T extends Row>(data: readonly T[], options?: UseTableOptions): UseTableResult<T>;
147
142
 
143
+ interface UseVirtualRowsOptions {
144
+ /** Fixed rendered row height in pixels. */
145
+ rowHeight: number;
146
+ /** Rows rendered beyond each viewport edge. Default: 6. */
147
+ overscan?: number;
148
+ /** Render all rows at or below this count. Default: 100. */
149
+ threshold?: number;
150
+ }
151
+ interface UseVirtualRowsResult<T> {
152
+ /** Attach to the scrolling TableWrap. */
153
+ containerRef: RefObject<HTMLDivElement>;
154
+ rows: readonly T[];
155
+ startIndex: number;
156
+ padTop: number;
157
+ padBottom: number;
158
+ totalHeight: number;
159
+ virtualized: boolean;
160
+ }
161
+ /**
162
+ * Owns scroll/resize observation and exposes the small visible row window.
163
+ * Consumers render padTop/padBottom spacer rows inside their existing tbody.
164
+ */
165
+ declare function useVirtualRows<T>(rows: readonly T[], { rowHeight, overscan, threshold }: UseVirtualRowsOptions): UseVirtualRowsResult<T>;
166
+
148
167
  /**
149
168
  * uix overlay positioning — framework-agnostic, dependency-free anchored placement.
150
169
  *
@@ -246,19 +265,8 @@ interface InputGroupProps {
246
265
  leadingIcon?: ReactNode;
247
266
  trailingIcon?: ReactNode;
248
267
  className?: string;
249
- /** Injected by `<Field>` when it wraps the group; forwarded onto the child control. */
250
- id?: string;
251
- 'aria-describedby'?: string;
252
- 'aria-invalid'?: AriaAttributes['aria-invalid'];
253
- 'aria-required'?: AriaAttributes['aria-required'];
254
268
  }
255
- /**
256
- * Icon-adorned wrapper for a child `<Input>`. The control is passed as `children`, so
257
- * `<Field>`'s injected `id`/`aria-*` land on this wrapper — they're forwarded onto the
258
- * single child element (the child's own props win) so label/message association survives
259
- * the extra div (UIX-A11Y-3).
260
- */
261
- declare function InputGroup({ children, leadingIcon, trailingIcon, className, id, 'aria-describedby': describedBy, 'aria-invalid': invalid, 'aria-required': required, }: InputGroupProps): react.JSX.Element;
269
+ declare function InputGroup({ children, leadingIcon, trailingIcon, className }: InputGroupProps): react.JSX.Element;
262
270
 
263
271
  interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
264
272
  invalid?: boolean;
@@ -283,10 +291,8 @@ declare const Radio: react.ForwardRefExoticComponent<RadioProps & react.RefAttri
283
291
  interface RadioGroupProps {
284
292
  children: ReactNode;
285
293
  className?: string;
286
- /** Group name; when set the group renders as fieldset/legend so it's announced with each radio. */
287
- label?: ReactNode;
288
294
  }
289
- declare function RadioGroup({ children, className, label }: RadioGroupProps): react.JSX.Element;
295
+ declare function RadioGroup({ children, className }: RadioGroupProps): react.JSX.Element;
290
296
 
291
297
  interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> {
292
298
  label?: ReactNode;
@@ -305,25 +311,28 @@ interface FieldProps {
305
311
  }
306
312
  declare function Field({ label, hint, error, success, required, children, className, htmlFor }: FieldProps): react.JSX.Element;
307
313
 
308
- interface ModalProps extends Omit<HTMLAttributes<HTMLDialogElement>, 'title'> {
314
+ interface ModalProps {
309
315
  open: boolean;
310
316
  onClose?: () => void;
311
317
  title?: ReactNode;
312
318
  children?: ReactNode;
313
319
  footer?: ReactNode;
320
+ className?: string;
321
+ style?: CSSProperties;
314
322
  }
315
- declare function Modal({ open, onClose, title, children, footer, className, ...rest }: ModalProps): react.JSX.Element;
323
+ declare function Modal({ open, onClose, title, children, footer, className, style }: ModalProps): react.JSX.Element;
316
324
 
317
- interface DrawerProps extends Omit<HTMLAttributes<HTMLDialogElement>, 'title'> {
325
+ interface DrawerProps {
318
326
  open: boolean;
319
327
  onClose?: () => void;
320
328
  title?: ReactNode;
321
329
  children?: ReactNode;
322
330
  footer?: ReactNode;
331
+ className?: string;
323
332
  }
324
- declare function Drawer({ open, onClose, title, children, footer, className, ...rest }: DrawerProps): react.JSX.Element;
333
+ declare function Drawer({ open, onClose, title, children, footer, className }: DrawerProps): react.JSX.Element;
325
334
 
326
- interface PeekProps extends Omit<HTMLAttributes<HTMLDialogElement>, 'title'> {
335
+ interface PeekProps {
327
336
  open: boolean;
328
337
  onClose?: () => void;
329
338
  title?: ReactNode;
@@ -332,25 +341,22 @@ interface PeekProps extends Omit<HTMLAttributes<HTMLDialogElement>, 'title'> {
332
341
  onNavPrev?: () => void;
333
342
  onNavNext?: () => void;
334
343
  hint?: string;
344
+ className?: string;
335
345
  }
336
- declare function Peek({ open, onClose, title, children, footer, onNavPrev, onNavNext, hint, className, onClick, ...rest }: PeekProps): react.JSX.Element;
346
+ declare function Peek({ open, onClose, title, children, footer, onNavPrev, onNavNext, hint, className }: PeekProps): react.JSX.Element;
337
347
 
338
348
  interface CardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
339
349
  title?: ReactNode;
340
- /** Element for the title — pick a real heading to slot the card into the page outline (UIX-A11Y-4). Default `div` keeps legacy rendering. */
341
- titleAs?: 'h2' | 'h3' | 'h4' | 'div';
342
350
  subtitle?: ReactNode;
343
351
  headerAction?: ReactNode;
344
352
  footer?: ReactNode;
345
353
  children?: ReactNode;
346
354
  }
347
- declare function Card({ title, titleAs: TitleTag, subtitle, headerAction, footer, children, className, ...props }: CardProps): react.JSX.Element;
355
+ declare function Card({ title, subtitle, headerAction, footer, children, className, ...props }: CardProps): react.JSX.Element;
348
356
 
349
357
  interface PageHeaderProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
350
358
  eyebrow?: ReactNode;
351
359
  title: ReactNode;
352
- /** Heading level for the title — drop to `h2` when the page already owns an `h1` (UIX-A11Y-4). */
353
- as?: 'h1' | 'h2';
354
360
  /** Supporting copy under the title. */
355
361
  subtitle?: ReactNode;
356
362
  /** Right-aligned action area (buttons, menus). */
@@ -360,7 +366,7 @@ interface PageHeaderProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
360
366
  * Page header — eyebrow / title / subtitle + actions row, over `.uix-page-header`.
361
367
  * The hairline + breathing room below come from the component CSS.
362
368
  */
363
- declare function PageHeader({ eyebrow, title, subtitle, actions, as: TitleTag, className, ...props }: PageHeaderProps): react.JSX.Element;
369
+ declare function PageHeader({ eyebrow, title, subtitle, actions, className, ...props }: PageHeaderProps): react.JSX.Element;
364
370
 
365
371
  interface DetailLayoutProps extends HTMLAttributes<HTMLDivElement> {
366
372
  /** The narrow trailing column (record meta, side panels). */
@@ -447,18 +453,6 @@ interface TabProps extends Omit<HTMLAttributes<HTMLButtonElement>, 'onChange'> {
447
453
  disabled?: boolean;
448
454
  }
449
455
  declare function Tab({ value, children, disabled, className, onClick, ...props }: TabProps): react.JSX.Element;
450
- interface TabPanelProps extends HTMLAttributes<HTMLDivElement> {
451
- /** The owning `<Tab>`'s value — the panel renders only while that tab is selected. */
452
- value: string;
453
- children?: ReactNode;
454
- }
455
- /**
456
- * The tabpanel paired with a `<Tab>` by `value` (UIX-A11Y-2): labelled by its tab,
457
- * `tabIndex 0` so Tab from the tablist lands in the content, rendered only while
458
- * selected. Place it as a direct child of `<Tabs>` — it is hoisted out of the tablist —
459
- * or anywhere the Tabs context reaches.
460
- */
461
- declare function TabPanel({ value, children, ...props }: TabPanelProps): react.JSX.Element | null;
462
456
 
463
457
  type ShellNav = 'full' | 'rail' | 'hidden';
464
458
  interface AppShellProps extends HTMLAttributes<HTMLDivElement> {
@@ -476,13 +470,11 @@ interface AppShellProps extends HTMLAttributes<HTMLDivElement> {
476
470
  onExitFocus?: () => void;
477
471
  /** Drop the content gutter so a genuinely wide table runs edge-to-edge. */
478
472
  mainBleed?: boolean;
479
- /** id given to `<main>` and targeted by the skip link. Override on collision (UIX-A11Y-2). */
480
- mainId?: string;
481
473
  sidebar?: ReactNode;
482
474
  topbar?: ReactNode;
483
475
  children?: ReactNode;
484
476
  }
485
- declare function AppShell({ nav, collapsed, focus, onExitFocus, mainBleed, mainId, sidebar, topbar, children, className, ...props }: AppShellProps): react.JSX.Element;
477
+ declare function AppShell({ nav, collapsed, focus, onExitFocus, mainBleed, sidebar, topbar, children, className, ...props }: AppShellProps): react.JSX.Element;
486
478
 
487
479
  interface SidebarProps extends HTMLAttributes<HTMLElement> {
488
480
  collapsed?: boolean;
@@ -616,10 +608,8 @@ declare function Alert({ tone, title, icon, children, className, ...props }: Ale
616
608
  interface SpinnerProps extends HTMLAttributes<HTMLSpanElement> {
617
609
  size?: 'md' | 'lg';
618
610
  accent?: boolean;
619
- /** Announced loading text (default "Loading…"). */
620
- label?: string;
621
611
  }
622
- declare function Spinner({ size, accent, label, className, ...props }: SpinnerProps): react.JSX.Element;
612
+ declare function Spinner({ size, accent, className, ...props }: SpinnerProps): react.JSX.Element;
623
613
 
624
614
  type ToastTone = 'success' | 'danger' | 'info';
625
615
  interface ToastProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
@@ -637,14 +627,9 @@ interface ToasterProps extends HTMLAttributes<HTMLDivElement> {
637
627
  declare function Toaster({ children, className, ...props }: ToasterProps): react.JSX.Element;
638
628
 
639
629
  interface TableWrapProps extends HTMLAttributes<HTMLDivElement> {
640
- /**
641
- * Polite live-region text for table state changes — "Sorted by …", "N results",
642
- * "N selected". Pass `useTable().announcement` straight through (UIX-A11Y-2).
643
- */
644
- announcement?: string;
645
630
  children?: ReactNode;
646
631
  }
647
- declare function TableWrap({ announcement, children, className, ...props }: TableWrapProps): react.JSX.Element;
632
+ declare const TableWrap: react.ForwardRefExoticComponent<TableWrapProps & react.RefAttributes<HTMLDivElement>>;
648
633
  type TableDensity = 'compact' | 'standard' | 'comfortable';
649
634
  type SortDirection = 'ascending' | 'descending' | 'none';
650
635
  interface TableProps extends TableHTMLAttributes<HTMLTableElement> {
@@ -693,11 +678,9 @@ interface RowActionProps extends ButtonHTMLAttributes<HTMLButtonElement> {
693
678
  declare function RowAction({ children, className, type, ...props }: RowActionProps): react.JSX.Element;
694
679
  interface ExpandToggleProps extends ButtonHTMLAttributes<HTMLButtonElement> {
695
680
  expanded?: boolean;
696
- /** id of the detail row this toggle controls → `aria-controls` (UIX-A11Y-2). */
697
- controls?: string;
698
681
  }
699
682
  /** Chevron button that expands/collapses an inline detail row. */
700
- declare function ExpandToggle({ expanded, controls, className, type, ...props }: ExpandToggleProps): react.JSX.Element;
683
+ declare function ExpandToggle({ expanded, className, type, ...props }: ExpandToggleProps): react.JSX.Element;
701
684
  /** Emphasised primary cell text. */
702
685
  declare function CellStrong({ children, className, ...props }: HTMLAttributes<HTMLSpanElement>): react.JSX.Element;
703
686
  /** Secondary line under a primary cell value (muted, meta size). */
@@ -739,10 +722,8 @@ interface ProgressProps extends HTMLAttributes<HTMLDivElement> {
739
722
  max?: number;
740
723
  /** Continuous slide animation when the amount of work is unknown. */
741
724
  indeterminate?: boolean;
742
- /** Accessible name — rendered as `aria-label` (an explicit `aria-label` prop wins). */
743
- label?: string;
744
725
  }
745
- declare function Progress({ value, max, indeterminate, label, className, ...props }: ProgressProps): react.JSX.Element;
726
+ declare function Progress({ value, max, indeterminate, className, ...props }: ProgressProps): react.JSX.Element;
746
727
 
747
728
  /** Fill color tone for the meter bar. Defaults to `success` (green). */
748
729
  type MeterTone = 'success' | 'warning' | 'danger' | 'attention' | 'overdue';
@@ -751,11 +732,9 @@ interface MeterProps extends HTMLAttributes<HTMLDivElement> {
751
732
  value?: number;
752
733
  /** Threshold tone applied via `data-tone` on the fill element. `success` is the implicit default (no attribute). */
753
734
  tone?: MeterTone;
754
- /** Accessible name — rendered as `aria-label` (an explicit `aria-label` prop wins). */
755
- label?: string;
756
735
  }
757
736
  /** Horizontal utilization / threshold bar backed by `.uix-meter`. */
758
- declare function Meter({ value, tone, label, className, ...props }: MeterProps): react.JSX.Element;
737
+ declare function Meter({ value, tone, className, ...props }: MeterProps): react.JSX.Element;
759
738
 
760
739
  interface StatTrend {
761
740
  direction: 'up' | 'down';
@@ -785,9 +764,7 @@ interface TooltipProps extends HTMLAttributes<HTMLSpanElement> {
785
764
  * Tooltip whose bubble renders in the top layer via the native Popover API, so it
786
765
  * escapes any `overflow: hidden/scroll` ancestor that would clip the old CSS-only
787
766
  * `[data-uix-tip]` tooltip (UIX-FIX-02). Positioned by the shared overlay engine
788
- * (flip/shift), shown on hover and keyboard focus, dismissed on blur or Escape
789
- * (document-level, per WCAG 1.4.13), and hoverable: the bubble stays open while
790
- * the pointer is over it (UIX-A11Y-1).
767
+ * (flip/shift), shown on hover and keyboard focus, dismissed on blur or Escape.
791
768
  */
792
769
  declare function Tooltip({ label, placement, className, children, ...props }: TooltipProps): react.JSX.Element;
793
770
 
@@ -821,11 +798,9 @@ declare function Skeleton({ variant, width, height, className, style, ...props }
821
798
  interface LoadingStateProps extends HTMLAttributes<HTMLDivElement> {
822
799
  /** Number of skeleton rows to render. */
823
800
  rows?: number;
824
- /** Announced loading text (default "Loading"). */
825
- label?: string;
826
801
  }
827
802
  /** A stack of skeleton rows for list/section loading. `role="status"`. */
828
- declare function LoadingState({ rows, label, className, ...props }: LoadingStateProps): react.JSX.Element;
803
+ declare function LoadingState({ rows, className, ...props }: LoadingStateProps): react.JSX.Element;
829
804
 
830
805
  interface LabelProps extends HTMLAttributes<HTMLSpanElement> {
831
806
  /** Any CSS color or a `--uix-chart-*` var; sets `--label-color`. */
@@ -865,11 +840,7 @@ declare function UserChip({ avatar, name, sub, className, children, ...props }:
865
840
  interface CommentsProps extends HTMLAttributes<HTMLDivElement> {
866
841
  children?: ReactNode;
867
842
  }
868
- /**
869
- * Comment thread container over `.uix-comments`. role="log" is an implicit polite
870
- * live region: comments appended after initial render are announced, the initial
871
- * list is not (UIX-A11Y-3). Pass `role` to override.
872
- */
843
+ /** Comment thread container over `.uix-comments`. */
873
844
  declare function Comments({ children, className, ...props }: CommentsProps): react.JSX.Element;
874
845
  interface CommentProps extends HTMLAttributes<HTMLDivElement> {
875
846
  /** Usually an `<Avatar />` (the grid reserves the leading column). */
@@ -883,8 +854,6 @@ declare function Comment({ avatar, author, meta, children, className, ...props }
883
854
 
884
855
  interface ComposerProps extends HTMLAttributes<HTMLDivElement> {
885
856
  children?: ReactNode;
886
- /** Accessible name for the child `<textarea>`; applied as its `aria-label`. */
887
- label?: string;
888
857
  }
889
858
  /**
890
859
  * Composer surface over `.uix-composer` — a single box that owns the
@@ -892,13 +861,8 @@ interface ComposerProps extends HTMLAttributes<HTMLDivElement> {
892
861
  * `<ComposerBar>` inside; the descendant `textarea` picks up the composer's
893
862
  * padding/typography automatically, so the input never reads as a second
894
863
  * nested box.
895
- *
896
- * A placeholder is not an accessible name, so the composer labels a bare child
897
- * `<textarea>` with `label` (default "Add a comment"); a textarea that brings its
898
- * own `aria-label`/`aria-labelledby` — or an `id` (likely tied to an external
899
- * `<label htmlFor>`) — is left untouched (UIX-A11Y-3).
900
864
  */
901
- declare function Composer({ children, className, label, ...props }: ComposerProps): react.JSX.Element;
865
+ declare function Composer({ children, className, ...props }: ComposerProps): react.JSX.Element;
902
866
  interface ComposerBarProps extends HTMLAttributes<HTMLDivElement> {
903
867
  children?: ReactNode;
904
868
  }
@@ -930,12 +894,12 @@ interface SegmentedOptionProps extends Omit<ButtonHTMLAttributes<HTMLButtonEleme
930
894
  */
931
895
  declare function SegmentedOption({ value, children, className, onClick, ...props }: SegmentedOptionProps): react.JSX.Element;
932
896
 
933
- interface TimelineProps extends HTMLAttributes<HTMLOListElement> {
897
+ interface TimelineProps extends HTMLAttributes<HTMLDivElement> {
934
898
  children?: ReactNode;
935
899
  }
936
- /** Activity timeline container over `.uix-timeline`. Ordered list so AT reads entry count + sequence (UIX-A11Y-4). */
900
+ /** Activity timeline container over `.uix-timeline`. */
937
901
  declare function Timeline({ children, className, ...props }: TimelineProps): react.JSX.Element;
938
- interface TimelineItemProps extends HTMLAttributes<HTMLLIElement> {
902
+ interface TimelineItemProps extends HTMLAttributes<HTMLDivElement> {
939
903
  /**
940
904
  * Custom rail node — an icon puck, an avatar, a tinted dot. Defaults to the
941
905
  * accent `.uix-timeline__node` dot. Supply this to make a heterogeneous feed
@@ -999,9 +963,7 @@ interface CommandPaletteProps extends HTMLAttributes<HTMLDivElement> {
999
963
  }
1000
964
  /**
1001
965
  * ⌘K command palette surface over `.uix-cmdk`. Presentational: mount it inside a
1002
- * Modal/Popover and wire search + keyboard selection in the consumer. The input is
1003
- * a combobox over the listbox of `CommandItem`s; spreads override every default, so
1004
- * consumers already passing their own roles/labels keep working.
966
+ * Modal/Popover and wire search + keyboard selection in the consumer.
1005
967
  */
1006
968
  declare function CommandPalette({ inputProps, children, className, ...props }: CommandPaletteProps): react.JSX.Element;
1007
969
  interface CommandGroupProps {
@@ -1018,27 +980,17 @@ interface CommandItemProps extends HTMLAttributes<HTMLDivElement> {
1018
980
  children?: ReactNode;
1019
981
  }
1020
982
  /** A single command row over `.uix-cmdk__item`. */
1021
- declare function CommandItem({ icon, shortcut, active, children, className, id, ...props }: CommandItemProps): react.JSX.Element;
983
+ declare function CommandItem({ icon, shortcut, active, children, className, ...props }: CommandItemProps): react.JSX.Element;
1022
984
 
1023
985
  interface InboxProps extends HTMLAttributes<HTMLDivElement> {
1024
- /**
1025
- * Which pane a narrow viewport (<700px) shows: 'list' (default, matches the old
1026
- * behaviour) or 'detail'. Consumers should render a Back control in the detail pane
1027
- * on narrow viewports to return to the list (UIX-A11Y-2).
1028
- */
1029
- view?: 'list' | 'detail';
1030
986
  children?: ReactNode;
1031
987
  }
1032
988
  /** Two-pane inbox master-detail container backed by `.uix-inbox`. Place `<InboxList>` and `<InboxDetail>` as children. */
1033
- declare function Inbox({ view, children, className, ...props }: InboxProps): react.JSX.Element;
989
+ declare function Inbox({ children, className, ...props }: InboxProps): react.JSX.Element;
1034
990
  interface InboxListProps extends HTMLAttributes<HTMLDivElement> {
1035
991
  children?: ReactNode;
1036
992
  }
1037
- /**
1038
- * Left-pane item list. Place `<InboxItem>` children here. A keyboard listbox
1039
- * (UIX-A11Y-2): the list is the single tab stop; ArrowUp/ArrowDown/Home/End move the
1040
- * active option via `aria-activedescendant`, Enter/Space click it.
1041
- */
993
+ /** Left-pane item list. Place `<InboxItem>` children here. */
1042
994
  declare function InboxList({ children, className, ...props }: InboxListProps): react.JSX.Element;
1043
995
  interface InboxItemProps extends HTMLAttributes<HTMLDivElement> {
1044
996
  /** Primary subject / title line. */
@@ -1054,7 +1006,7 @@ interface InboxItemProps extends HTMLAttributes<HTMLDivElement> {
1054
1006
  children?: ReactNode;
1055
1007
  }
1056
1008
  /** A single inbox row with subject, preview excerpt, optional leading slot, and unread/selected states. */
1057
- declare function InboxItem({ subject, preview, leading, unread, selected, children, className, id, ...props }: InboxItemProps): react.JSX.Element;
1009
+ declare function InboxItem({ subject, preview, leading, unread, selected, children, className, ...props }: InboxItemProps): react.JSX.Element;
1058
1010
  interface InboxDetailProps extends HTMLAttributes<HTMLDivElement> {
1059
1011
  children?: ReactNode;
1060
1012
  }
@@ -1062,39 +1014,25 @@ interface InboxDetailProps extends HTMLAttributes<HTMLDivElement> {
1062
1014
  declare function InboxDetail({ children, className, ...props }: InboxDetailProps): react.JSX.Element;
1063
1015
 
1064
1016
  interface KanbanProps extends HTMLAttributes<HTMLDivElement> {
1065
- /**
1066
- * Polite live-region text for keyboard moves (UIX-A11Y-2). `onMove` implementations
1067
- * should set it, e.g. "Card X moved to Doing, position 2 of 4".
1068
- */
1069
- announcement?: string;
1070
1017
  children?: ReactNode;
1071
1018
  }
1072
- declare function Kanban({ announcement, children, className, ...props }: KanbanProps): react.JSX.Element;
1019
+ declare function Kanban({ children, className, ...props }: KanbanProps): react.JSX.Element;
1073
1020
  interface KanbanColumnProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
1074
1021
  title?: ReactNode;
1075
1022
  count?: number;
1076
1023
  children?: ReactNode;
1077
1024
  }
1078
1025
  declare function KanbanColumn({ title, count, children, className, ...props }: KanbanColumnProps): react.JSX.Element;
1079
- type KanbanMoveDirection = 'up' | 'down' | 'left' | 'right';
1080
1026
  interface KanbanCardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
1081
1027
  title?: ReactNode;
1082
1028
  meta?: ReactNode;
1083
- /**
1084
- * Keyboard move contract (UIX-A11Y-2): when provided, Alt+Arrow on the focused card
1085
- * calls it — the same accelerator convention as NavFavourites row moves. Pair with
1086
- * the board-level `announcement` so SR users hear the result.
1087
- */
1088
- onMove?: (dir: KanbanMoveDirection) => void;
1089
1029
  children?: ReactNode;
1090
1030
  }
1091
- declare function KanbanCard({ title, meta, children, className, onMove, onKeyDown, ...props }: KanbanCardProps): react.JSX.Element;
1031
+ declare function KanbanCard({ title, meta, children, className, ...props }: KanbanCardProps): react.JSX.Element;
1092
1032
 
1093
1033
  interface TreeNodeData {
1094
1034
  id: string;
1095
1035
  label: ReactNode;
1096
- /** Plain-text label for keyboard typeahead when `label` is not a string (UIX-A11Y-2). */
1097
- typeaheadLabel?: string;
1098
1036
  icon?: ReactNode;
1099
1037
  children?: TreeNodeData[];
1100
1038
  }
@@ -1143,10 +1081,6 @@ declare function Tree({ nodes, expanded: controlledExpanded, defaultExpanded, se
1143
1081
  interface TreeLike<T> {
1144
1082
  id: string;
1145
1083
  children?: T[];
1146
- /** The display label — typeahead matches it only when it is a plain string (UIX-A11Y-2). */
1147
- label?: unknown;
1148
- /** Explicit typeahead text for nodes whose `label` is not a string (rich ReactNode labels). */
1149
- typeaheadLabel?: string;
1150
1084
  }
1151
1085
  interface FlatNode<T> {
1152
1086
  node: T;
@@ -1360,4 +1294,4 @@ interface StatusRowProps extends HTMLAttributes<HTMLDivElement> {
1360
1294
  /** Status row — indicator + name + trailing meta (`.uix-status-row`). */
1361
1295
  declare function StatusRow({ indicator, name, meta, className, ...props }: StatusRowProps): react.JSX.Element;
1362
1296
 
1363
- export { Alert, type AlertProps, type AlertTone, type Align, AppShell, type AppShellProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, BulkBar, type BulkBarProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, Card, type CardProps, CellStrong, CellSub, Checkbox, type CheckboxProps, type ColumnFilter, CommandGroup, type CommandGroupProps, CommandItem, type CommandItemProps, CommandPalette, type CommandPaletteProps, Comment, type CommentProps, Comments, type CommentsProps, Composer, ComposerBar, type ComposerBarProps, type ComposerProps, ContentList, ContentListItem, type ContentListItemProps, type ContentListProps, DescriptionItem, type DescriptionItemProps, DescriptionList, type DescriptionListItem, type DescriptionListProps, DetailLayout, type DetailLayoutProps, Drawer, type DrawerProps, EmptyState, type EmptyStateProps, ErrorState, type ErrorStateProps, EventRow, type EventRowProps, ExpandToggle, type ExpandToggleProps, FeaturedRundown, FeaturedRundownItem, type FeaturedRundownItemProps, type FeaturedRundownProps, FeaturedStage, type FeaturedStageProps, Field, type FieldProps, type FilterKind, type FilterOp, type FlatNode, Highlighted, type HighlightedProps, Inbox, InboxDetail, type InboxDetailProps, InboxItem, type InboxItemProps, InboxList, type InboxListProps, type InboxProps, Input, InputGroup, type InputGroupProps, type InputProps, Kanban, KanbanCard, type KanbanCardProps, KanbanColumn, type KanbanColumnProps, type KanbanMoveDirection, type KanbanProps, Label, type LabelProps, List, ListItem, type ListItemProps, type ListProps, LoadingState, type LoadingStateProps, Mark, type MarkProps, Meter, type MeterProps, type MeterTone, Modal, type ModalProps, type NavFavouriteItem, NavFavourites, type NavFavouritesLabels, type NavFavouritesProps, NavGroup, type NavGroupProps, NavItem, type NavItemProps, NewsLead, type NewsLeadProps, Note, type NoteProps, type NoteTone, NoticeQueue, type NoticeQueueProps, PageHeader, type PageHeaderProps, PageIntro, type PageIntroProps, Pagination, type PaginationProps, Peek, type PeekProps, type PillTone, type PillTreatment, type Placement, Popover, type PopoverProps, type PositionOptions, type PositionResult, type Primitive, Progress, type ProgressProps, Prose, type ProseProps, Radio, RadioGroup, type RadioGroupProps, type RadioProps, type Rect, ResourceGrid, type ResourceGridProps, type Row, RowAction, type RowActionProps, RowActions, type RowActionsProps, SectionHead, type SectionHeadProps, type Segment, Segmented, SegmentedOption, type SegmentedOptionProps, type SegmentedProps, Select, type SelectAllState, type SelectProps, type ShellNav, type Side, Sidebar, type SidebarProps, SidebarSection, type SidebarSectionProps, type Size, Skeleton, type SkeletonProps, type SortDir, type SortDirection, type SortKey, Spinner, type SpinnerProps, StarButton, type StarButtonProps, Stat, StatLine, type StatLineItem, type StatLineProps, type StatProps, type StatTrend, StatusPill, type StatusPillProps, StatusRow, type StatusRowProps, SubNavItem, type SubNavItemProps, Switch, type SwitchProps, Tab, TabPanel, type TabPanelProps, type TabProps, Table, type TableDensity, type TableProps, TableWrap, type TableWrapProps, Tabs, type TabsProps, Td, type TdProps, Textarea, type TextareaProps, Th, type ThProps, Timeline, TimelineItem, type TimelineItemProps, type TimelineProps, Toast, type ToastProps, type ToastTone, Toaster, type ToasterProps, Tooltip, type TooltipProps, Tr, type TrProps, Tree, type TreeLike, type TreeNavAction, type TreeNodeData, type TreeNodeProps, type TreeProps, type UseAnchoredPositionOptions, type UseTableOptions, type UseTableResult, UserChip, type UserChipProps, type ViewState, type VirtualWindow, applyFilters, clampWidth, computePosition, cx, flattenTree, highlightSegments, matchFilter, mergePinned, multiSort, nextSortDir, parseView, reorder, searchRows, selectAllState, serializeView, shouldVirtualize, toggleId, togglePage, toggleSort, treeNav, useAnchoredPosition, useDialog, useTable, virtualWindow };
1297
+ export { Alert, type AlertProps, type AlertTone, type Align, AppShell, type AppShellProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, BulkBar, type BulkBarProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, Card, type CardProps, CellStrong, CellSub, Checkbox, type CheckboxProps, type ColumnFilter, CommandGroup, type CommandGroupProps, CommandItem, type CommandItemProps, CommandPalette, type CommandPaletteProps, Comment, type CommentProps, Comments, type CommentsProps, Composer, ComposerBar, type ComposerBarProps, type ComposerProps, ContentList, ContentListItem, type ContentListItemProps, type ContentListProps, DescriptionItem, type DescriptionItemProps, DescriptionList, type DescriptionListItem, type DescriptionListProps, DetailLayout, type DetailLayoutProps, Drawer, type DrawerProps, EmptyState, type EmptyStateProps, ErrorState, type ErrorStateProps, EventRow, type EventRowProps, ExpandToggle, type ExpandToggleProps, FeaturedRundown, FeaturedRundownItem, type FeaturedRundownItemProps, type FeaturedRundownProps, FeaturedStage, type FeaturedStageProps, Field, type FieldProps, type FilterKind, type FilterOp, type FlatNode, Highlighted, type HighlightedProps, Inbox, InboxDetail, type InboxDetailProps, InboxItem, type InboxItemProps, InboxList, type InboxListProps, type InboxProps, Input, InputGroup, type InputGroupProps, type InputProps, Kanban, KanbanCard, type KanbanCardProps, KanbanColumn, type KanbanColumnProps, type KanbanProps, Label, type LabelProps, List, ListItem, type ListItemProps, type ListProps, LoadingState, type LoadingStateProps, Mark, type MarkProps, Meter, type MeterProps, type MeterTone, Modal, type ModalProps, type NavFavouriteItem, NavFavourites, type NavFavouritesLabels, type NavFavouritesProps, NavGroup, type NavGroupProps, NavItem, type NavItemProps, NewsLead, type NewsLeadProps, Note, type NoteProps, type NoteTone, NoticeQueue, type NoticeQueueProps, PageHeader, type PageHeaderProps, PageIntro, type PageIntroProps, Pagination, type PaginationProps, Peek, type PeekProps, type PillTone, type PillTreatment, type Placement, Popover, type PopoverProps, type PositionOptions, type PositionResult, type Primitive, Progress, type ProgressProps, Prose, type ProseProps, Radio, RadioGroup, type RadioGroupProps, type RadioProps, type Rect, ResourceGrid, type ResourceGridProps, type Row, RowAction, type RowActionProps, RowActions, type RowActionsProps, SectionHead, type SectionHeadProps, type Segment, Segmented, SegmentedOption, type SegmentedOptionProps, type SegmentedProps, Select, type SelectAllState, type SelectProps, type ShellNav, type Side, Sidebar, type SidebarProps, SidebarSection, type SidebarSectionProps, type Size, Skeleton, type SkeletonProps, type SortDir, type SortDirection, type SortKey, Spinner, type SpinnerProps, StarButton, type StarButtonProps, Stat, StatLine, type StatLineItem, type StatLineProps, type StatProps, type StatTrend, StatusPill, type StatusPillProps, StatusRow, type StatusRowProps, SubNavItem, type SubNavItemProps, Switch, type SwitchProps, Tab, type TabProps, Table, type TableDensity, type TableProps, TableWrap, type TableWrapProps, Tabs, type TabsProps, Td, type TdProps, Textarea, type TextareaProps, Th, type ThProps, Timeline, TimelineItem, type TimelineItemProps, type TimelineProps, Toast, type ToastProps, type ToastTone, Toaster, type ToasterProps, Tooltip, type TooltipProps, Tr, type TrProps, Tree, type TreeLike, type TreeNavAction, type TreeNodeData, type TreeNodeProps, type TreeProps, type UseAnchoredPositionOptions, type UseTableOptions, type UseTableResult, type UseVirtualRowsOptions, type UseVirtualRowsResult, UserChip, type UserChipProps, type ViewState, type VirtualWindow, applyFilters, clampWidth, computePosition, cx, flattenTree, highlightSegments, matchFilter, mergePinned, multiSort, nextSortDir, parseView, reorder, searchRows, selectAllState, serializeView, shouldVirtualize, toggleId, togglePage, toggleSort, treeNav, useAnchoredPosition, useDialog, useTable, useVirtualRows, virtualWindow };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export { cx } from './cx.js';
2
2
  export { useDialog } from './hooks/useDialog.js';
3
3
  export { UseTableOptions, UseTableResult, useTable } from './hooks/useTable.js';
4
+ export { UseVirtualRowsOptions, UseVirtualRowsResult, useVirtualRows } from './hooks/useVirtualRows.js';
4
5
  export { UseAnchoredPositionOptions, useAnchoredPosition } from './hooks/useAnchoredPosition.js';
5
6
  export { Align, Placement, PositionOptions, PositionResult, Rect, Side, Size, computePosition } from './overlay-position.js';
6
7
  export { Button, ButtonGroup, ButtonGroupProps, ButtonProps } from './components/Button.js';
@@ -19,7 +20,7 @@ export { PageHeader, PageHeaderProps } from './components/PageHeader.js';
19
20
  export { DetailLayout, DetailLayoutProps } from './components/DetailLayout.js';
20
21
  export { List, ListItem, ListItemProps, ListProps } from './components/List.js';
21
22
  export { DescriptionItem, DescriptionItemProps, DescriptionList, DescriptionListItem, DescriptionListProps } from './components/DescriptionList.js';
22
- export { Tab, TabPanel, TabPanelProps, TabProps, Tabs, TabsProps } from './components/Tabs.js';
23
+ export { Tab, TabProps, Tabs, TabsProps } from './components/Tabs.js';
23
24
  export { AppShell, AppShellProps, ShellNav } from './components/AppShell.js';
24
25
  export { NavGroup, NavGroupProps, NavItem, NavItemProps, Sidebar, SidebarProps, SidebarSection, SidebarSectionProps, SubNavItem, SubNavItemProps } from './components/Sidebar.js';
25
26
  export { StarButton, StarButtonProps } from './components/StarButton.js';
@@ -46,7 +47,7 @@ export { Note, NoteProps, NoteTone, Prose, ProseProps } from './components/Prose
46
47
  export { Popover, PopoverProps } from './components/Popover.js';
47
48
  export { CommandGroup, CommandGroupProps, CommandItem, CommandItemProps, CommandPalette, CommandPaletteProps } from './components/CommandPalette.js';
48
49
  export { Inbox, InboxDetail, InboxDetailProps, InboxItem, InboxItemProps, InboxList, InboxListProps, InboxProps } from './components/Inbox.js';
49
- export { Kanban, KanbanCard, KanbanCardProps, KanbanColumn, KanbanColumnProps, KanbanMoveDirection, KanbanProps } from './components/Kanban.js';
50
+ export { Kanban, KanbanCard, KanbanCardProps, KanbanColumn, KanbanColumnProps, KanbanProps } from './components/Kanban.js';
50
51
  export { Tree, TreeNodeData, TreeNodeProps, TreeProps } from './components/Tree.js';
51
52
  export { FlatNode, TreeLike, TreeNavAction, flattenTree, treeNav } from './tree-model.js';
52
53
  export { ContentList, ContentListItem, ContentListItemProps, ContentListProps, EventRow, EventRowProps, FeaturedRundown, FeaturedRundownItem, FeaturedRundownItemProps, FeaturedRundownProps, FeaturedStage, FeaturedStageProps, NewsLead, NewsLeadProps, NoticeQueue, NoticeQueueProps, PageIntro, PageIntroProps, ResourceGrid, ResourceGridProps, SectionHead, SectionHeadProps, StatLine, StatLineItem, StatLineProps, StatusRow, StatusRowProps } from './components/EditorialHome.js';
package/dist/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { cx } from "./cx.js";
2
2
  import { useDialog } from "./hooks/useDialog.js";
3
3
  import { useTable } from "./hooks/useTable.js";
4
+ import { useVirtualRows } from "./hooks/useVirtualRows.js";
4
5
  import { useAnchoredPosition } from "./hooks/useAnchoredPosition.js";
5
6
  import { computePosition } from "./overlay-position.js";
6
7
  import { Button, ButtonGroup } from "./components/Button.js";
@@ -19,7 +20,7 @@ import { PageHeader } from "./components/PageHeader.js";
19
20
  import { DetailLayout } from "./components/DetailLayout.js";
20
21
  import { List, ListItem } from "./components/List.js";
21
22
  import { DescriptionList, DescriptionItem } from "./components/DescriptionList.js";
22
- import { Tabs, Tab, TabPanel } from "./components/Tabs.js";
23
+ import { Tabs, Tab } from "./components/Tabs.js";
23
24
  import { AppShell } from "./components/AppShell.js";
24
25
  import { Sidebar, SidebarSection, NavItem, NavGroup, SubNavItem } from "./components/Sidebar.js";
25
26
  import { StarButton } from "./components/StarButton.js";
@@ -162,7 +163,6 @@ export {
162
163
  SubNavItem,
163
164
  Switch,
164
165
  Tab,
165
- TabPanel,
166
166
  Table,
167
167
  TableWrap,
168
168
  Tabs,
@@ -183,5 +183,6 @@ export {
183
183
  treeNav,
184
184
  useAnchoredPosition,
185
185
  useDialog,
186
- useTable
186
+ useTable,
187
+ useVirtualRows
187
188
  };
@@ -1,19 +1,20 @@
1
+ const stringCollator = new Intl.Collator(void 0, { numeric: true, sensitivity: "base" });
1
2
  function compare(a, b) {
2
3
  if (a == null && b == null) return 0;
3
4
  if (a == null) return -1;
4
5
  if (b == null) return 1;
5
6
  if (typeof a === "number" && typeof b === "number") return a - b;
6
- return String(a).localeCompare(String(b), void 0, { numeric: true, sensitivity: "base" });
7
+ return stringCollator.compare(String(a), String(b));
7
8
  }
8
9
  function multiSort(rows, keys) {
9
10
  if (!keys.length) return rows.slice();
10
- return rows.map((row, i) => ({ row, i })).sort((x, y) => {
11
+ return rows.slice().sort((a, b) => {
11
12
  for (const k of keys) {
12
- const c = compare(x.row[k.field], y.row[k.field]);
13
+ const c = compare(a[k.field], b[k.field]);
13
14
  if (c !== 0) return k.dir === "ascending" ? c : -c;
14
15
  }
15
- return x.i - y.i;
16
- }).map((w) => w.row);
16
+ return 0;
17
+ });
17
18
  }
18
19
  function nextSortDir(current) {
19
20
  if (current === "ascending") return "descending";
@@ -213,7 +214,8 @@ function toggleId(set, id) {
213
214
  return next;
214
215
  }
215
216
  function selectAllState(selected, pageIds) {
216
- const on = pageIds.filter((id) => selected.has(id)).length;
217
+ let on = 0;
218
+ for (const id of pageIds) if (selected.has(id)) on += 1;
217
219
  if (on === 0) return "none";
218
220
  return on === pageIds.length ? "all" : "some";
219
221
  }
@@ -11,10 +11,6 @@
11
11
  interface TreeLike<T> {
12
12
  id: string;
13
13
  children?: T[];
14
- /** The display label — typeahead matches it only when it is a plain string (UIX-A11Y-2). */
15
- label?: unknown;
16
- /** Explicit typeahead text for nodes whose `label` is not a string (rich ReactNode labels). */
17
- typeaheadLabel?: string;
18
14
  }
19
15
  interface FlatNode<T> {
20
16
  node: T;
@@ -40,14 +40,6 @@ function treeNav(flat, currentId, key) {
40
40
  case " ":
41
41
  return cur.hasChildren ? { toggleId: cur.node.id, selectId: cur.node.id } : { selectId: cur.node.id };
42
42
  default:
43
- if (key.length === 1) {
44
- const q = key.toLowerCase();
45
- for (let step = 1; step <= flat.length; step++) {
46
- const f = flat[(idx + step) % flat.length];
47
- const label = f.node.typeaheadLabel ?? (typeof f.node.label === "string" ? f.node.label : void 0);
48
- if (label != null && label.toLowerCase().startsWith(q)) return { focusId: f.node.id };
49
- }
50
- }
51
43
  return {};
52
44
  }
53
45
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tensor_1/react",
3
- "version": "2.10.0",
3
+ "version": "2.12.0",
4
4
  "description": "Thin React wrappers over the UIx v2 CSS component library.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -26,22 +26,36 @@
26
26
  "types": "./dist/chart.d.ts",
27
27
  "import": "./dist/chart.js",
28
28
  "require": "./dist/chart.cjs"
29
+ },
30
+ "./chart/preset": {
31
+ "types": "./dist/chart-preset.d.ts",
32
+ "import": "./dist/chart-preset.js",
33
+ "require": "./dist/chart-preset.cjs"
29
34
  }
30
35
  },
31
36
  "scripts": {
32
37
  "build": "tsup",
33
38
  "dev": "tsup --watch",
34
39
  "typecheck": "tsc --noEmit",
35
- "test": "node --test"
40
+ "test": "node --test",
41
+ "test:performance": "node scripts/table-performance.mjs",
42
+ "size": "node scripts/check-chart-preset-size.mjs"
36
43
  },
37
44
  "peerDependencies": {
45
+ "echarts": "^5.6.0",
38
46
  "react": "^18.0.0 || ^19.0.0",
39
47
  "react-dom": "^18.0.0 || ^19.0.0"
40
48
  },
49
+ "peerDependenciesMeta": {
50
+ "echarts": {
51
+ "optional": true
52
+ }
53
+ },
41
54
  "devDependencies": {
42
55
  "@types/react": "^18.0.0",
43
56
  "@types/react-dom": "^18.0.0",
44
57
  "echarts": "^5.6.0",
58
+ "esbuild": "^0.27.0",
45
59
  "tsup": "^8.0.0",
46
60
  "typescript": "^5.0.0"
47
61
  }