@ai-matrx/design-system 0.38.1 → 0.39.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 (34) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/data-table/copy-helpers.d.cts +2 -1
  3. package/dist/data-table/copy-helpers.d.ts +2 -1
  4. package/dist/data-table/filter-engine.d.cts +2 -1
  5. package/dist/data-table/filter-engine.d.ts +2 -1
  6. package/dist/data-table/host.d.cts +2 -1
  7. package/dist/data-table/host.d.ts +2 -1
  8. package/dist/data-table/index.cjs +39 -17
  9. package/dist/data-table/index.cjs.map +1 -1
  10. package/dist/data-table/index.d.cts +26 -3
  11. package/dist/data-table/index.d.ts +26 -3
  12. package/dist/data-table/index.js +39 -17
  13. package/dist/data-table/index.js.map +1 -1
  14. package/dist/data-table/infer-filter.d.cts +2 -1
  15. package/dist/data-table/infer-filter.d.ts +2 -1
  16. package/dist/data-table/layered-filters.d.cts +2 -1
  17. package/dist/data-table/layered-filters.d.ts +2 -1
  18. package/dist/data-table/query-control.d.cts +2 -1
  19. package/dist/data-table/query-control.d.ts +2 -1
  20. package/dist/data-table/table-style.cjs +332 -0
  21. package/dist/data-table/table-style.cjs.map +1 -0
  22. package/dist/data-table/table-style.d.cts +146 -0
  23. package/dist/data-table/table-style.d.ts +146 -0
  24. package/dist/data-table/table-style.js +312 -0
  25. package/dist/data-table/table-style.js.map +1 -0
  26. package/dist/data-table/types.d.cts +2 -1
  27. package/dist/data-table/types.d.ts +2 -1
  28. package/dist/data-table/url-state.d.cts +2 -1
  29. package/dist/data-table/url-state.d.ts +2 -1
  30. package/dist/data-table/xlsx.d.cts +2 -1
  31. package/dist/data-table/xlsx.d.ts +2 -1
  32. package/dist/{types-B8vwElPz.d.ts → types--rz-dVeQ.d.ts} +2 -146
  33. package/dist/{types-BuMHbFjs.d.cts → types-CZmM6ERA.d.cts} +2 -146
  34. package/package.json +11 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.39.0 — 2026-09-24
4
+
5
+ **`@ai-matrx/design-system/data-table/table-style` is its own server-safe entry.** The table-style
6
+ model (colour by a column, rules, manual highlights, the palette) is pure, but it shipped only inside
7
+ client-stamped entries, so a server could not read the palette and a portal's colours went missing
8
+ when rendered on the server (S6 PORTAL-BRANDING). It now builds like `./data-table/filter-engine`:
9
+ its own entry, the `"use client"` banner removed by `stamp-client-boundary.mjs`. Also in this
10
+ release: S4's row-selection helpers (`row-selection.ts`, `63906a23db`).
11
+
12
+ **Consumer action:** import the palette and model from `@ai-matrx/design-system/data-table/table-style`
13
+ on the server; drop any app-side copy of the palette.
14
+
3
15
  ## 0.38.1 — 2026-09-23
4
16
 
5
17
  **A default window-style Dialog sits with the layer that opened it.** In 0.38.0 every non-blocking dialog took the older `z-[900]` layer, which put a dialog opened from a menu, a popover or a host window BEHIND its opener (caught by matrx-frontend's nested-portal guard before adoption). A dialog that is a window because the caller said nothing about `modal` now sits at `z-[10000]`, as a blocking dialog always did; a caller that passes `modal={false}` explicitly keeps `z-[900]` (the coexistence contract below a host window manager). Two tests.
@@ -1,9 +1,10 @@
1
1
  import { AgentPayloadInput } from './copy-types.cjs';
2
- import { g as MatrxDataTableCopyConfig, M as MatrxColumnDef } from '../types-BuMHbFjs.cjs';
2
+ import { g as MatrxDataTableCopyConfig, M as MatrxColumnDef } from '../types-CZmM6ERA.cjs';
3
3
  import '../content-transfer.cjs';
4
4
  import 'react';
5
5
  import '@ai-matrx/kit/content-transfer';
6
6
  import '../content-transfer/icon.cjs';
7
+ import './table-style.cjs';
7
8
  import '../types-CJWU1Gae.cjs';
8
9
  import './grouping.cjs';
9
10
  import './fill.cjs';
@@ -1,9 +1,10 @@
1
1
  import { AgentPayloadInput } from './copy-types.js';
2
- import { g as MatrxDataTableCopyConfig, M as MatrxColumnDef } from '../types-B8vwElPz.js';
2
+ import { g as MatrxDataTableCopyConfig, M as MatrxColumnDef } from '../types--rz-dVeQ.js';
3
3
  import '../content-transfer.js';
4
4
  import 'react';
5
5
  import '@ai-matrx/kit/content-transfer';
6
6
  import '../content-transfer/icon.js';
7
+ import './table-style.js';
7
8
  import '../types-CJWU1Gae.js';
8
9
  import './grouping.js';
9
10
  import './fill.js';
@@ -1,9 +1,10 @@
1
- import { M as MatrxColumnDef, C as ColumnFiltersState, S as SortState, L as LayeredFilterRule, T as TableSearchMatchMode, a as ColumnFilterValue } from '../types-BuMHbFjs.cjs';
1
+ import { M as MatrxColumnDef, C as ColumnFiltersState, S as SortState, L as LayeredFilterRule, T as TableSearchMatchMode, a as ColumnFilterValue } from '../types-CZmM6ERA.cjs';
2
2
  import '../content-transfer.cjs';
3
3
  import 'react';
4
4
  import '@ai-matrx/kit/content-transfer';
5
5
  import '../content-transfer/icon.cjs';
6
6
  import './copy-types.cjs';
7
+ import './table-style.cjs';
7
8
  import '../types-CJWU1Gae.cjs';
8
9
  import './grouping.cjs';
9
10
  import './fill.cjs';
@@ -1,9 +1,10 @@
1
- import { M as MatrxColumnDef, C as ColumnFiltersState, S as SortState, L as LayeredFilterRule, T as TableSearchMatchMode, a as ColumnFilterValue } from '../types-B8vwElPz.js';
1
+ import { M as MatrxColumnDef, C as ColumnFiltersState, S as SortState, L as LayeredFilterRule, T as TableSearchMatchMode, a as ColumnFilterValue } from '../types--rz-dVeQ.js';
2
2
  import '../content-transfer.js';
3
3
  import 'react';
4
4
  import '@ai-matrx/kit/content-transfer';
5
5
  import '../content-transfer/icon.js';
6
6
  import './copy-types.js';
7
+ import './table-style.js';
7
8
  import '../types-CJWU1Gae.js';
8
9
  import './grouping.js';
9
10
  import './fill.js';
@@ -2,11 +2,12 @@ import * as React from 'react';
2
2
  import { ComponentType, ReactNode, MouseEventHandler } from 'react';
3
3
  import { CopyControlProps } from './copy-types.cjs';
4
4
  export { AgentPayloadInput, AiCustomSource, AiVariant, CopyExportConfig } from './copy-types.cjs';
5
- import { b as TableSavedViewsProps, c as MatrxDataTableDensity, d as MatrxDataTableRecordControls } from '../types-BuMHbFjs.cjs';
5
+ import { b as TableSavedViewsProps, c as MatrxDataTableDensity, d as MatrxDataTableRecordControls } from '../types-CZmM6ERA.cjs';
6
6
  import { MatrxTableMenuTarget, MatrxTableMenuPayload } from './menu-targets.cjs';
7
7
  import '../content-transfer.cjs';
8
8
  import '@ai-matrx/kit/content-transfer';
9
9
  import '../content-transfer/icon.cjs';
10
+ import './table-style.cjs';
10
11
  import '../types-CJWU1Gae.cjs';
11
12
  import './grouping.cjs';
12
13
  import './fill.cjs';
@@ -2,11 +2,12 @@ import * as React from 'react';
2
2
  import { ComponentType, ReactNode, MouseEventHandler } from 'react';
3
3
  import { CopyControlProps } from './copy-types.js';
4
4
  export { AgentPayloadInput, AiCustomSource, AiVariant, CopyExportConfig } from './copy-types.js';
5
- import { b as TableSavedViewsProps, c as MatrxDataTableDensity, d as MatrxDataTableRecordControls } from '../types-B8vwElPz.js';
5
+ import { b as TableSavedViewsProps, c as MatrxDataTableDensity, d as MatrxDataTableRecordControls } from '../types--rz-dVeQ.js';
6
6
  import { MatrxTableMenuTarget, MatrxTableMenuPayload } from './menu-targets.js';
7
7
  import '../content-transfer.js';
8
8
  import '@ai-matrx/kit/content-transfer';
9
9
  import '../content-transfer/icon.js';
10
+ import './table-style.js';
10
11
  import '../types-CJWU1Gae.js';
11
12
  import './grouping.js';
12
13
  import './fill.js';
@@ -140,6 +140,7 @@ __export(data_table_exports, {
140
140
  tableUrlParamPrefix: () => tableUrlParamPrefix,
141
141
  tileIndex: () => tileIndex,
142
142
  toggleGroupCollapsed: () => toggleGroupCollapsed,
143
+ toggleSelection: () => toggleSelection,
143
144
  undoEntryFor: () => undoEntryFor,
144
145
  useMatrxDataTableHost: () => useMatrxDataTableHost,
145
146
  useMatrxTableRowAlchemy: () => useMatrxTableRowAlchemy,
@@ -11896,6 +11897,33 @@ function LayeredRuleRow({
11896
11897
  );
11897
11898
  }
11898
11899
 
11900
+ // src/data-table/row-selection.ts
11901
+ function toggleSelection({
11902
+ order,
11903
+ idOf,
11904
+ selected,
11905
+ index,
11906
+ anchor,
11907
+ shiftKey,
11908
+ isSelectable
11909
+ }) {
11910
+ const next = new Set(selected);
11911
+ const clicked = order[index];
11912
+ if (clicked === void 0) return { next, anchor: anchor ?? index };
11913
+ const turningOn = !next.has(idOf(clicked));
11914
+ const from = shiftKey && anchor !== null ? Math.min(anchor, index) : index;
11915
+ const to = shiftKey && anchor !== null ? Math.max(anchor, index) : index;
11916
+ for (let i = from; i <= to; i += 1) {
11917
+ const target = order[i];
11918
+ if (target === void 0) continue;
11919
+ if (!(isSelectable?.(target) ?? true)) continue;
11920
+ const id = idOf(target);
11921
+ if (turningOn) next.add(id);
11922
+ else next.delete(id);
11923
+ }
11924
+ return { next, anchor: index };
11925
+ }
11926
+
11899
11927
  // src/data-table/infer-filter.ts
11900
11928
  var SELECT_CARDINALITY_CAP = 24;
11901
11929
  function resolveFilterKind(col, sampleRows) {
@@ -13958,23 +13986,17 @@ function MatrxDataTableCore({
13958
13986
  const setSelectedIds = (next) => selection?.onSelectedIdsChange([...next]);
13959
13987
  const toggleRowSelected = (index, shiftKey) => {
13960
13988
  if (!selection) return;
13961
- const row = paginated[index];
13962
- if (!row) return;
13963
- const id = getRowId(row);
13964
- const next = new Set(selectedIdSet);
13965
- const turningOn = !next.has(id);
13966
- const anchor = lastToggledIndex.current;
13967
- const from = shiftKey && anchor !== null ? Math.min(anchor, index) : index;
13968
- const to = shiftKey && anchor !== null ? Math.max(anchor, index) : index;
13969
- for (let i = from; i <= to; i += 1) {
13970
- const target = paginated[i];
13971
- if (!target) continue;
13972
- if (!(selection.isRowSelectable?.(target) ?? true)) continue;
13973
- const targetId = getRowId(target);
13974
- if (turningOn) next.add(targetId);
13975
- else next.delete(targetId);
13976
- }
13977
- lastToggledIndex.current = index;
13989
+ if (!paginated[index]) return;
13990
+ const { next, anchor } = toggleSelection({
13991
+ order: paginated,
13992
+ idOf: getRowId,
13993
+ selected: selectedIdSet,
13994
+ index,
13995
+ anchor: lastToggledIndex.current,
13996
+ shiftKey,
13997
+ isSelectable: selection.isRowSelectable
13998
+ });
13999
+ lastToggledIndex.current = anchor;
13978
14000
  setSelectedIds(next);
13979
14001
  };
13980
14002
  const toggleAllOnPage = () => {