@stackone/malachite 2.7.2 → 2.9.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.
package/dist/index.d.ts CHANGED
@@ -451,6 +451,8 @@ declare interface CodeBlockProps {
451
451
  * as further grammars are registered in CodeBlockHighlighter.
452
452
  */
453
453
  language?: 'yaml' | 'cedar';
454
+ /** How much of a `json` tree starts collapsed: `true` all of it, a number below that depth. */
455
+ collapsed?: boolean | number;
454
456
  }
455
457
 
456
458
  export declare interface CodeTextProps {
@@ -514,8 +516,12 @@ export declare interface ConfirmationDialogProps {
514
516
  * consequence severe enough that a single click should not be able to cause it.
515
517
  */
516
518
  confirmPhrase?: string;
517
- /** Label above the type-to-confirm field. Default names the phrase. */
518
- confirmPhraseLabel?: string;
519
+ /** Label above the type-to-confirm field. `{ prefix, suffix }` makes the phrase copyable. */
520
+ confirmPhraseLabel?: PhraseLabel;
521
+ /** Names the copy control, e.g. `Copy profile name`. Default: `Copy`. */
522
+ confirmPhraseCopyLabel?: string;
523
+ /** Runs after the phrase reaches the clipboard, with what was copied. */
524
+ onPhraseCopied?: (phrase: string) => void;
519
525
  confirmPhrasePlaceholder?: string;
520
526
  confirmLabel?: string;
521
527
  cancelLabel?: string;
@@ -1038,6 +1044,7 @@ declare interface InputProps {
1038
1044
  id?: string;
1039
1045
  'aria-label'?: string;
1040
1046
  'aria-labelledby'?: string;
1047
+ 'aria-describedby'?: string;
1041
1048
  }
1042
1049
 
1043
1050
  declare type InputSize = 'small' | 'medium' | 'large';
@@ -1819,6 +1826,11 @@ export declare interface PartialMalachiteTheme {
1819
1826
  };
1820
1827
  }
1821
1828
 
1829
+ declare type PhraseLabel = string | {
1830
+ prefix: string;
1831
+ suffix?: string;
1832
+ };
1833
+
1822
1834
  export declare const PillButton: default_2.FC<PillButtonProps>;
1823
1835
 
1824
1836
  declare interface PillButtonProps {
@@ -2439,7 +2451,7 @@ export declare interface TabItem {
2439
2451
  disabled?: boolean;
2440
2452
  }
2441
2453
 
2442
- export declare const Table: <T = Record<string, unknown>>({ columns, data, loading, error, errorTitle, errorSubTitle, emptyTitle, emptySubTitle, bordered, showHeader, rowKey, scrollHeight, size, rowDensity, layout, headerVariant, rowClassName, rowVariant, onRow, onClickRow, selectedRowKey, scrollSelectedIntoView, rowSelection, pagination, className, style, stickyHeaderTop, scrollX, rowSection, renderSectionDivider, virtual, virtualRowHeightEstimate, virtualScrollElement, }: TableProps<T>) => JSX_2.Element;
2454
+ export declare const Table: <T = Record<string, unknown>>({ columns, data, loading, error, errorTitle, errorSubTitle, emptyTitle, emptySubTitle, bordered, showHeader, rowKey, scrollHeight, size, rowDensity, layout, headerVariant, rowClassName, rowVariant, onRow, onClickRow, selectedRowKey, scrollSelectedIntoView, rowSelection, pagination, className, style, stickyHeaderTop, scrollX, rowSection, renderSectionDivider, onVisibleOrderChange, virtual, virtualRowHeightEstimate, virtualScrollElement, }: TableProps<T>) => JSX_2.Element;
2443
2455
 
2444
2456
  export declare type TableColumnDefinition<T = Record<string, unknown>> = {
2445
2457
  title: string | default_2.ReactNode;
@@ -2495,7 +2507,8 @@ declare type TableProps<T = Record<string, unknown>> = {
2495
2507
  onClickRow?: (record: T, index: number) => void;
2496
2508
  /** Row the master-detail view is showing, resolved against `rowKey`. Controlled, so
2497
2509
  * selection can change without a row click and the highlight follows. Unlike
2498
- * `rowSelection` it paints no control — a tint, an accent bar and `aria-current`. */
2510
+ * `rowSelection` it paints no control — a tint, an accent bar and `aria-current`.
2511
+ * Follows its record through a sort only with a resolvable `rowKey`. */
2499
2512
  selectedRowKey?: default_2.Key;
2500
2513
  /** Whether a selection change scrolls the row into view. Default true.
2501
2514
  *
@@ -2526,6 +2539,10 @@ declare type TableProps<T = Record<string, unknown>> = {
2526
2539
  scrollX?: boolean;
2527
2540
  rowSection?: (record: T) => string;
2528
2541
  renderSectionDivider?: (sectionKey: string, records: T[]) => default_2.ReactNode;
2542
+ /** Reports the rows in render order — sorted and section-grouped, so not `data` order,
2543
+ * and always all of `data`. An equal-but-new array does not re-fire, so a host cannot loop.
2544
+ * Needs a `rowKey`, or records that keep their object identity across renders. */
2545
+ onVisibleOrderChange?: TableVisibleOrderHandler<T>;
2529
2546
  /** Windowed rendering for large datasets (detached variant only), powered by
2530
2547
  * TanStack Virtual: only rows near the viewport stay mounted; spacers keep the
2531
2548
  * scrollbar reflecting the full list. The table body becomes the scroll
@@ -2571,6 +2588,9 @@ export declare type TableSize = 'small' | 'medium' | 'large';
2571
2588
 
2572
2589
  export declare type TableType = 'default' | 'compact' | 'bordered';
2573
2590
 
2591
+ /** Receives the table's rows in render order — see `Table`'s `onVisibleOrderChange`. */
2592
+ export declare type TableVisibleOrderHandler<T = Record<string, unknown>> = (records: readonly T[]) => void;
2593
+
2574
2594
  export declare const Tabs: default_2.FC<TabsProps>;
2575
2595
 
2576
2596
  export declare interface TabsProps {
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A as s, c as o, d as t, e as i, f as r, g as n, B as l, h as p, i as d, j as c, k as m, l as S, m as T, n as u, o as g, p as h, q as C, r as F, s as B, t as y, D as w, u as f, v as x, w as A, F as L, x as b, y as P, z as k, E as v, G as D, H as M, I as z, J as I, K as R, L as N, M as G, N as H, O as V, P as E, Q as J, R as K, S as j, T as q, U as O, V as W, W as Q, X as U, Y as X, Z as Y, $ as Z, a0 as $, a1 as _, a2 as aa, a3 as ea, a4 as sa, a5 as oa, a6 as ta, a7 as ia, a8 as ra, a9 as na, aa as la, ab as pa, ac as da, ad as ca, ae as ma, af as Sa, ag as Ta, ah as ua, ai as ga, aj as ha, ak as Ca, al as Fa, am as Ba, an as ya, ao as wa, ap as fa, aq as xa, ar as Aa, as as La, at as ba, au as Pa, av as ka, aw as va, ax as Da, ay as Ma, az as za, aA as Ia, aB as Ra, aC as Na, aD as Ga, aE as Ha, aF as Va, aG as Ea, aH as Ja, aI as Ka, aJ as ja, aK as qa, aL as Oa, aM as Wa, aN as Qa } from "./index-CDk2KjAE.js";
1
+ import { A as s, c as o, d as t, e as i, f as r, g as n, B as l, h as p, i as d, j as c, k as m, l as S, m as T, n as u, o as g, p as h, q as C, r as F, s as B, t as y, D as w, u as f, v as x, w as A, F as L, x as b, y as P, z as k, E as v, G as D, H as M, I as z, J as I, K as R, L as N, M as G, N as H, O as V, P as E, Q as J, R as K, S as j, T as q, U as O, V as W, W as Q, X as U, Y as X, Z as Y, $ as Z, a0 as $, a1 as _, a2 as aa, a3 as ea, a4 as sa, a5 as oa, a6 as ta, a7 as ia, a8 as ra, a9 as na, aa as la, ab as pa, ac as da, ad as ca, ae as ma, af as Sa, ag as Ta, ah as ua, ai as ga, aj as ha, ak as Ca, al as Fa, am as Ba, an as ya, ao as wa, ap as fa, aq as xa, ar as Aa, as as La, at as ba, au as Pa, av as ka, aw as va, ax as Da, ay as Ma, az as za, aA as Ia, aB as Ra, aC as Na, aD as Ga, aE as Ha, aF as Va, aG as Ea, aH as Ja, aI as Ka, aJ as ja, aK as qa, aL as Oa, aM as Wa, aN as Qa } from "./index-DuWBmz-D.js";
2
2
  export {
3
3
  s as Accordion,
4
4
  o as ActionBar,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackone/malachite",
3
- "version": "2.7.2",
3
+ "version": "2.9.0",
4
4
  "description": "StackOne's themeable React component library — Shadow DOM isolated, scoped Tailwind, theme-token driven.",
5
5
  "license": "MIT",
6
6
  "author": "StackOne",