@stackone/malachite 2.8.0 → 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 {
@@ -2449,7 +2451,7 @@ export declare interface TabItem {
2449
2451
  disabled?: boolean;
2450
2452
  }
2451
2453
 
2452
- 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;
2453
2455
 
2454
2456
  export declare type TableColumnDefinition<T = Record<string, unknown>> = {
2455
2457
  title: string | default_2.ReactNode;
@@ -2505,7 +2507,8 @@ declare type TableProps<T = Record<string, unknown>> = {
2505
2507
  onClickRow?: (record: T, index: number) => void;
2506
2508
  /** Row the master-detail view is showing, resolved against `rowKey`. Controlled, so
2507
2509
  * selection can change without a row click and the highlight follows. Unlike
2508
- * `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`. */
2509
2512
  selectedRowKey?: default_2.Key;
2510
2513
  /** Whether a selection change scrolls the row into view. Default true.
2511
2514
  *
@@ -2536,6 +2539,10 @@ declare type TableProps<T = Record<string, unknown>> = {
2536
2539
  scrollX?: boolean;
2537
2540
  rowSection?: (record: T) => string;
2538
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>;
2539
2546
  /** Windowed rendering for large datasets (detached variant only), powered by
2540
2547
  * TanStack Virtual: only rows near the viewport stay mounted; spacers keep the
2541
2548
  * scrollbar reflecting the full list. The table body becomes the scroll
@@ -2581,6 +2588,9 @@ export declare type TableSize = 'small' | 'medium' | 'large';
2581
2588
 
2582
2589
  export declare type TableType = 'default' | 'compact' | 'bordered';
2583
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
+
2584
2594
  export declare const Tabs: default_2.FC<TabsProps>;
2585
2595
 
2586
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-Cs1OOumK.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.8.0",
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",