@ai-matrx/design-system 0.18.9 → 0.18.10

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 (58) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/content-transfer.cjs +163 -202
  3. package/dist/content-transfer.cjs.map +1 -1
  4. package/dist/content-transfer.css +43 -30
  5. package/dist/content-transfer.d.cts +4 -0
  6. package/dist/content-transfer.d.ts +4 -0
  7. package/dist/content-transfer.js +225 -264
  8. package/dist/content-transfer.js.map +1 -1
  9. package/dist/data-table/copy-helpers.d.cts +1 -1
  10. package/dist/data-table/copy-helpers.d.ts +1 -1
  11. package/dist/data-table/data-row-inspector.cjs +163 -202
  12. package/dist/data-table/data-row-inspector.cjs.map +1 -1
  13. package/dist/data-table/data-row-inspector.js +245 -284
  14. package/dist/data-table/data-row-inspector.js.map +1 -1
  15. package/dist/data-table/data-row-window.cjs +163 -202
  16. package/dist/data-table/data-row-window.cjs.map +1 -1
  17. package/dist/data-table/data-row-window.js +245 -284
  18. package/dist/data-table/data-row-window.js.map +1 -1
  19. package/dist/data-table/filter-engine.d.cts +1 -1
  20. package/dist/data-table/filter-engine.d.ts +1 -1
  21. package/dist/data-table/host.cjs.map +1 -1
  22. package/dist/data-table/host.d.cts +2 -0
  23. package/dist/data-table/host.d.ts +2 -0
  24. package/dist/data-table/host.js.map +1 -1
  25. package/dist/data-table/index.cjs +1192 -732
  26. package/dist/data-table/index.cjs.map +1 -1
  27. package/dist/data-table/index.d.cts +24 -3
  28. package/dist/data-table/index.d.ts +24 -3
  29. package/dist/data-table/index.js +1264 -804
  30. package/dist/data-table/index.js.map +1 -1
  31. package/dist/data-table/infer-filter.d.cts +1 -1
  32. package/dist/data-table/infer-filter.d.ts +1 -1
  33. package/dist/data-table/layered-filters.d.cts +1 -1
  34. package/dist/data-table/layered-filters.d.ts +1 -1
  35. package/dist/data-table/pagination.cjs +5 -5
  36. package/dist/data-table/pagination.cjs.map +1 -1
  37. package/dist/data-table/pagination.js +5 -5
  38. package/dist/data-table/pagination.js.map +1 -1
  39. package/dist/data-table/query-control.d.cts +1 -1
  40. package/dist/data-table/query-control.d.ts +1 -1
  41. package/dist/data-table/types.cjs.map +1 -1
  42. package/dist/data-table/types.d.cts +1 -1
  43. package/dist/data-table/types.d.ts +1 -1
  44. package/dist/data-table/url-state.d.cts +1 -1
  45. package/dist/data-table/url-state.d.ts +1 -1
  46. package/dist/data-table/uuid-cell.cjs.map +1 -1
  47. package/dist/data-table/uuid-cell.js.map +1 -1
  48. package/dist/data-table/xlsx.d.cts +1 -1
  49. package/dist/data-table/xlsx.d.ts +1 -1
  50. package/dist/index.cjs +5 -5
  51. package/dist/index.cjs.map +1 -1
  52. package/dist/index.js +5 -5
  53. package/dist/index.js.map +1 -1
  54. package/dist/styles.css +4 -0
  55. package/dist/tokens.css +2 -0
  56. package/dist/{types-cH8oLqUx.d.ts → types-C2xN6W_q.d.ts} +46 -3
  57. package/dist/{types-0CNCWvdK.d.cts → types-D_tpuk6m.d.cts} +46 -3
  58. package/package.json +1 -1
package/dist/styles.css CHANGED
@@ -912,6 +912,10 @@
912
912
  min-width: 0;
913
913
  }
914
914
 
915
+ [data-matrx-table] {
916
+ padding-bottom: var(--matrx-table-bottom-space, 12px);
917
+ }
918
+
915
919
  [data-matrx-table-scroll],
916
920
  [data-matrx-table-cards-scroll] {
917
921
  min-width: 0;
package/dist/tokens.css CHANGED
@@ -73,6 +73,8 @@
73
73
  --border: 240 6% 90%;
74
74
  --input: 240 6% 90%;
75
75
  --ring: 240 5% 65%;
76
+ /* Shared table terminal breathing room; a host may override per layout. */
77
+ --matrx-table-bottom-space: 12px;
76
78
 
77
79
  /* Input elevation — consumed by the `.shadow-input` rule in styles.css
78
80
  and by the Tailwind `shadow-input` utility on Tailwind hosts. */
@@ -466,9 +466,46 @@ interface MatrxDataTableToolbar {
466
466
  facets?: ToolbarFacet[];
467
467
  /** Left-side extra nodes (after search / facets). */
468
468
  leading?: ReactNode;
469
- /** Right-side actions (create, refresh, …). */
469
+ /**
470
+ * Standard host refresh affordance. The package owns its placement, busy
471
+ * state, and accessible tooltip; the host remains the sole data owner.
472
+ */
473
+ refresh?: {
474
+ onRefresh: () => void | Promise<void>;
475
+ label?: string;
476
+ };
477
+ /**
478
+ * Standard create affordance. The host owns authorization and the actual
479
+ * create flow; disabledReason is exposed through the shared tooltip.
480
+ */
481
+ add?: {
482
+ onAdd: () => void | Promise<void>;
483
+ disabled?: boolean;
484
+ disabledReason?: string;
485
+ };
486
+ /** Right-side domain actions, rendered after standard table controls. */
470
487
  actions?: ReactNode;
471
488
  }
489
+ /** Query fields safe to persist in a named table view. */
490
+ type TableViewQuery = Omit<MatrxDataTableQueryState, "page">;
491
+ /** Portable, persistence-neutral table state saved by a host adapter. */
492
+ interface TableViewSnapshot {
493
+ __kind: "matrx-table-view";
494
+ version: 1;
495
+ /** Page/cursor/selection/loaded rows are deliberately never saved. */
496
+ query: TableViewQuery;
497
+ columns: {
498
+ order: string[];
499
+ hidden: string[];
500
+ };
501
+ }
502
+ /** Host port for durable named views. The host owns actor, tenancy and CRUD. */
503
+ interface TableSavedViewsProps {
504
+ tableId: string;
505
+ snapshot: TableViewSnapshot;
506
+ defaultSnapshot: TableViewSnapshot;
507
+ onApply: (snapshot: TableViewSnapshot) => void;
508
+ }
472
509
  /** Optional deferred-apply copy for column filter popovers. */
473
510
  interface MatrxDataTableFilterUi {
474
511
  /** Enables the Include/Exclude control. Default false for remote-safe filters. */
@@ -684,6 +721,8 @@ interface MatrxDataTableSelectionConfig<T> {
684
721
  }
685
722
  /** Table-owned state and actions exposed to an opt-in phone card renderer. */
686
723
  interface MatrxDataTableMobileCardControls {
724
+ /** Render a declared column with the same editable/draft/link behavior as the grid. */
725
+ renderCell: (columnId: string) => ReactNode;
687
726
  /** Whether this row is in the canonical selection set. */
688
727
  selected: boolean;
689
728
  /** Whether the consumer allows this row to be selected. */
@@ -699,6 +738,10 @@ interface MatrxDataTableMobileCardControls {
699
738
  interface MatrxDataTableProps<T> {
700
739
  data: T[];
701
740
  columns: MatrxColumnDef<T>[];
741
+ /** Stable persistence identity for host-installed named views. */
742
+ tableId?: string;
743
+ /** Declared reset state for the host Saved Views control. */
744
+ defaultViewSnapshot?: TableViewSnapshot;
702
745
  /** Optional URL/source-owned column order and visibility. */
703
746
  columnState?: {
704
747
  order: string[];
@@ -708,7 +751,7 @@ interface MatrxDataTableProps<T> {
708
751
  hidden: string[];
709
752
  }) => void;
710
753
  };
711
- /** Enables package-owned drag reordering in table headers. */
754
+ /** Enables package-owned drag reordering in table headers. Default true. */
712
755
  reorderableColumns?: boolean;
713
756
  columnManager?: {
714
757
  open: boolean;
@@ -826,4 +869,4 @@ interface MatrxDataTableProps<T> {
826
869
  onRowOpen?: (row: T) => void;
827
870
  }
828
871
 
829
- export { type AnyOfColumnSearch as A, LAYERED_FILTER_OPERATOR_LABELS as B, type ColumnFiltersState as C, type LayeredFilterField as D, type LayeredFilterOperator as E, columnFiltersToLayeredRules as F, completeLayeredFilterRules as G, decodeLayeredFilterRules as H, encodeLayeredFilterRules as I, isCompleteLayeredFilterRule as J, isLayeredFilterOperator as K, type LayeredFilterRule as L, type MatrxColumnDef as M, layeredFilterMatchesValue as N, layeredFilterNeedsValue as O, layeredFilterRuleSummary as P, operatorsForLayeredField as Q, type SortState as S, type TableSearchMatchMode as T, type ColumnFilterValue as a, type MatrxDataTableProps as b, type CellEditType as c, type CellEditsMap as d, type ColumnFilterKind as e, type MatrxDataTableCopyConfig as f, type MatrxDataTableDetailConfig as g, type MatrxDataTableEditConfig as h, type MatrxDataTableEmptyState as i, type MatrxDataTableFilterUi as j, type MatrxDataTableHierarchyConfig as k, type MatrxDataTableHierarchyMove as l, type MatrxDataTableMobileCardControls as m, type MatrxDataTableQueryControl as n, type MatrxDataTableQueryState as o, type MatrxDataTableRecordControls as p, type MatrxDataTableSelectionConfig as q, type MatrxDataTableSourceProcessing as r, type MatrxDataTableToolbar as s, type MatrxDataTableUrlStateConfig as t, type MatrxDataTableWindowConfig as u, type MatrxTablePagination as v, type SortDirection as w, type TextFilterMode as x, type ToolbarFacet as y, LAYERED_FILTER_OPERATORS as z };
872
+ export { type AnyOfColumnSearch as A, type TextFilterMode as B, type ColumnFiltersState as C, type ToolbarFacet as D, LAYERED_FILTER_OPERATORS as E, LAYERED_FILTER_OPERATOR_LABELS as F, type LayeredFilterField as G, type LayeredFilterOperator as H, columnFiltersToLayeredRules as I, completeLayeredFilterRules as J, decodeLayeredFilterRules as K, type LayeredFilterRule as L, type MatrxColumnDef as M, encodeLayeredFilterRules as N, isCompleteLayeredFilterRule as O, isLayeredFilterOperator as P, layeredFilterMatchesValue as Q, layeredFilterNeedsValue as R, type SortState as S, type TableSearchMatchMode as T, layeredFilterRuleSummary as U, operatorsForLayeredField as V, type ColumnFilterValue as a, type MatrxDataTableProps as b, type TableViewSnapshot as c, type CellEditType as d, type CellEditsMap as e, type ColumnFilterKind as f, type MatrxDataTableCopyConfig as g, type MatrxDataTableDetailConfig as h, type MatrxDataTableEditConfig as i, type MatrxDataTableEmptyState as j, type MatrxDataTableFilterUi as k, type MatrxDataTableHierarchyConfig as l, type MatrxDataTableHierarchyMove as m, type MatrxDataTableMobileCardControls as n, type MatrxDataTableQueryControl as o, type MatrxDataTableQueryState as p, type MatrxDataTableRecordControls as q, type MatrxDataTableSelectionConfig as r, type MatrxDataTableSourceProcessing as s, type MatrxDataTableToolbar as t, type MatrxDataTableUrlStateConfig as u, type MatrxDataTableWindowConfig as v, type MatrxTablePagination as w, type SortDirection as x, type TableSavedViewsProps as y, type TableViewQuery as z };
@@ -466,9 +466,46 @@ interface MatrxDataTableToolbar {
466
466
  facets?: ToolbarFacet[];
467
467
  /** Left-side extra nodes (after search / facets). */
468
468
  leading?: ReactNode;
469
- /** Right-side actions (create, refresh, …). */
469
+ /**
470
+ * Standard host refresh affordance. The package owns its placement, busy
471
+ * state, and accessible tooltip; the host remains the sole data owner.
472
+ */
473
+ refresh?: {
474
+ onRefresh: () => void | Promise<void>;
475
+ label?: string;
476
+ };
477
+ /**
478
+ * Standard create affordance. The host owns authorization and the actual
479
+ * create flow; disabledReason is exposed through the shared tooltip.
480
+ */
481
+ add?: {
482
+ onAdd: () => void | Promise<void>;
483
+ disabled?: boolean;
484
+ disabledReason?: string;
485
+ };
486
+ /** Right-side domain actions, rendered after standard table controls. */
470
487
  actions?: ReactNode;
471
488
  }
489
+ /** Query fields safe to persist in a named table view. */
490
+ type TableViewQuery = Omit<MatrxDataTableQueryState, "page">;
491
+ /** Portable, persistence-neutral table state saved by a host adapter. */
492
+ interface TableViewSnapshot {
493
+ __kind: "matrx-table-view";
494
+ version: 1;
495
+ /** Page/cursor/selection/loaded rows are deliberately never saved. */
496
+ query: TableViewQuery;
497
+ columns: {
498
+ order: string[];
499
+ hidden: string[];
500
+ };
501
+ }
502
+ /** Host port for durable named views. The host owns actor, tenancy and CRUD. */
503
+ interface TableSavedViewsProps {
504
+ tableId: string;
505
+ snapshot: TableViewSnapshot;
506
+ defaultSnapshot: TableViewSnapshot;
507
+ onApply: (snapshot: TableViewSnapshot) => void;
508
+ }
472
509
  /** Optional deferred-apply copy for column filter popovers. */
473
510
  interface MatrxDataTableFilterUi {
474
511
  /** Enables the Include/Exclude control. Default false for remote-safe filters. */
@@ -684,6 +721,8 @@ interface MatrxDataTableSelectionConfig<T> {
684
721
  }
685
722
  /** Table-owned state and actions exposed to an opt-in phone card renderer. */
686
723
  interface MatrxDataTableMobileCardControls {
724
+ /** Render a declared column with the same editable/draft/link behavior as the grid. */
725
+ renderCell: (columnId: string) => ReactNode;
687
726
  /** Whether this row is in the canonical selection set. */
688
727
  selected: boolean;
689
728
  /** Whether the consumer allows this row to be selected. */
@@ -699,6 +738,10 @@ interface MatrxDataTableMobileCardControls {
699
738
  interface MatrxDataTableProps<T> {
700
739
  data: T[];
701
740
  columns: MatrxColumnDef<T>[];
741
+ /** Stable persistence identity for host-installed named views. */
742
+ tableId?: string;
743
+ /** Declared reset state for the host Saved Views control. */
744
+ defaultViewSnapshot?: TableViewSnapshot;
702
745
  /** Optional URL/source-owned column order and visibility. */
703
746
  columnState?: {
704
747
  order: string[];
@@ -708,7 +751,7 @@ interface MatrxDataTableProps<T> {
708
751
  hidden: string[];
709
752
  }) => void;
710
753
  };
711
- /** Enables package-owned drag reordering in table headers. */
754
+ /** Enables package-owned drag reordering in table headers. Default true. */
712
755
  reorderableColumns?: boolean;
713
756
  columnManager?: {
714
757
  open: boolean;
@@ -826,4 +869,4 @@ interface MatrxDataTableProps<T> {
826
869
  onRowOpen?: (row: T) => void;
827
870
  }
828
871
 
829
- export { type AnyOfColumnSearch as A, LAYERED_FILTER_OPERATOR_LABELS as B, type ColumnFiltersState as C, type LayeredFilterField as D, type LayeredFilterOperator as E, columnFiltersToLayeredRules as F, completeLayeredFilterRules as G, decodeLayeredFilterRules as H, encodeLayeredFilterRules as I, isCompleteLayeredFilterRule as J, isLayeredFilterOperator as K, type LayeredFilterRule as L, type MatrxColumnDef as M, layeredFilterMatchesValue as N, layeredFilterNeedsValue as O, layeredFilterRuleSummary as P, operatorsForLayeredField as Q, type SortState as S, type TableSearchMatchMode as T, type ColumnFilterValue as a, type MatrxDataTableProps as b, type CellEditType as c, type CellEditsMap as d, type ColumnFilterKind as e, type MatrxDataTableCopyConfig as f, type MatrxDataTableDetailConfig as g, type MatrxDataTableEditConfig as h, type MatrxDataTableEmptyState as i, type MatrxDataTableFilterUi as j, type MatrxDataTableHierarchyConfig as k, type MatrxDataTableHierarchyMove as l, type MatrxDataTableMobileCardControls as m, type MatrxDataTableQueryControl as n, type MatrxDataTableQueryState as o, type MatrxDataTableRecordControls as p, type MatrxDataTableSelectionConfig as q, type MatrxDataTableSourceProcessing as r, type MatrxDataTableToolbar as s, type MatrxDataTableUrlStateConfig as t, type MatrxDataTableWindowConfig as u, type MatrxTablePagination as v, type SortDirection as w, type TextFilterMode as x, type ToolbarFacet as y, LAYERED_FILTER_OPERATORS as z };
872
+ export { type AnyOfColumnSearch as A, type TextFilterMode as B, type ColumnFiltersState as C, type ToolbarFacet as D, LAYERED_FILTER_OPERATORS as E, LAYERED_FILTER_OPERATOR_LABELS as F, type LayeredFilterField as G, type LayeredFilterOperator as H, columnFiltersToLayeredRules as I, completeLayeredFilterRules as J, decodeLayeredFilterRules as K, type LayeredFilterRule as L, type MatrxColumnDef as M, encodeLayeredFilterRules as N, isCompleteLayeredFilterRule as O, isLayeredFilterOperator as P, layeredFilterMatchesValue as Q, layeredFilterNeedsValue as R, type SortState as S, type TableSearchMatchMode as T, layeredFilterRuleSummary as U, operatorsForLayeredField as V, type ColumnFilterValue as a, type MatrxDataTableProps as b, type TableViewSnapshot as c, type CellEditType as d, type CellEditsMap as e, type ColumnFilterKind as f, type MatrxDataTableCopyConfig as g, type MatrxDataTableDetailConfig as h, type MatrxDataTableEditConfig as i, type MatrxDataTableEmptyState as j, type MatrxDataTableFilterUi as k, type MatrxDataTableHierarchyConfig as l, type MatrxDataTableHierarchyMove as m, type MatrxDataTableMobileCardControls as n, type MatrxDataTableQueryControl as o, type MatrxDataTableQueryState as p, type MatrxDataTableRecordControls as q, type MatrxDataTableSelectionConfig as r, type MatrxDataTableSourceProcessing as s, type MatrxDataTableToolbar as t, type MatrxDataTableUrlStateConfig as u, type MatrxDataTableWindowConfig as v, type MatrxTablePagination as w, type SortDirection as x, type TableSavedViewsProps as y, type TableViewQuery as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-matrx/design-system",
3
- "version": "0.18.9",
3
+ "version": "0.18.10",
4
4
  "description": "AI Matrx semantic React primitives shared across Vite, Next.js, desktop, and customer-built applications.",
5
5
  "type": "module",
6
6
  "license": "MIT",