@ai-matrx/design-system 0.18.9 → 0.18.12

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 (68) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/dist/content-transfer/alchemy.svg +1 -1
  3. package/dist/content-transfer/icon.cjs +3 -1
  4. package/dist/content-transfer/icon.cjs.map +1 -1
  5. package/dist/content-transfer/icon.d.cts +3 -2
  6. package/dist/content-transfer/icon.d.ts +3 -2
  7. package/dist/content-transfer/icon.js +3 -1
  8. package/dist/content-transfer/icon.js.map +1 -1
  9. package/dist/content-transfer.cjs +442 -447
  10. package/dist/content-transfer.cjs.map +1 -1
  11. package/dist/content-transfer.css +130 -54
  12. package/dist/content-transfer.d.cts +5 -1
  13. package/dist/content-transfer.d.ts +5 -1
  14. package/dist/content-transfer.js +467 -472
  15. package/dist/content-transfer.js.map +1 -1
  16. package/dist/data-table/copy-helpers.d.cts +1 -1
  17. package/dist/data-table/copy-helpers.d.ts +1 -1
  18. package/dist/data-table/copy-types.cjs.map +1 -1
  19. package/dist/data-table/copy-types.d.cts +1 -1
  20. package/dist/data-table/copy-types.d.ts +1 -1
  21. package/dist/data-table/data-row-inspector.cjs +444 -446
  22. package/dist/data-table/data-row-inspector.cjs.map +1 -1
  23. package/dist/data-table/data-row-inspector.js +489 -491
  24. package/dist/data-table/data-row-inspector.js.map +1 -1
  25. package/dist/data-table/data-row-window.cjs +444 -446
  26. package/dist/data-table/data-row-window.cjs.map +1 -1
  27. package/dist/data-table/data-row-window.js +489 -491
  28. package/dist/data-table/data-row-window.js.map +1 -1
  29. package/dist/data-table/filter-engine.d.cts +1 -1
  30. package/dist/data-table/filter-engine.d.ts +1 -1
  31. package/dist/data-table/host.cjs.map +1 -1
  32. package/dist/data-table/host.d.cts +17 -1
  33. package/dist/data-table/host.d.ts +17 -1
  34. package/dist/data-table/host.js.map +1 -1
  35. package/dist/data-table/index.cjs +1524 -1011
  36. package/dist/data-table/index.cjs.map +1 -1
  37. package/dist/data-table/index.d.cts +25 -4
  38. package/dist/data-table/index.d.ts +25 -4
  39. package/dist/data-table/index.js +1560 -1047
  40. package/dist/data-table/index.js.map +1 -1
  41. package/dist/data-table/infer-filter.d.cts +1 -1
  42. package/dist/data-table/infer-filter.d.ts +1 -1
  43. package/dist/data-table/layered-filters.d.cts +1 -1
  44. package/dist/data-table/layered-filters.d.ts +1 -1
  45. package/dist/data-table/pagination.cjs +5 -5
  46. package/dist/data-table/pagination.cjs.map +1 -1
  47. package/dist/data-table/pagination.js +5 -5
  48. package/dist/data-table/pagination.js.map +1 -1
  49. package/dist/data-table/query-control.d.cts +1 -1
  50. package/dist/data-table/query-control.d.ts +1 -1
  51. package/dist/data-table/types.cjs.map +1 -1
  52. package/dist/data-table/types.d.cts +1 -1
  53. package/dist/data-table/types.d.ts +1 -1
  54. package/dist/data-table/url-state.d.cts +1 -1
  55. package/dist/data-table/url-state.d.ts +1 -1
  56. package/dist/data-table/uuid-cell.cjs.map +1 -1
  57. package/dist/data-table/uuid-cell.js.map +1 -1
  58. package/dist/data-table/xlsx.d.cts +1 -1
  59. package/dist/data-table/xlsx.d.ts +1 -1
  60. package/dist/index.cjs +5 -5
  61. package/dist/index.cjs.map +1 -1
  62. package/dist/index.js +5 -5
  63. package/dist/index.js.map +1 -1
  64. package/dist/styles.css +4 -0
  65. package/dist/tokens.css +2 -0
  66. package/dist/{types-cH8oLqUx.d.ts → types-BuDKVpeF.d.ts} +47 -3
  67. package/dist/{types-0CNCWvdK.d.cts → types-Dqcb7jXO.d.cts} +47 -3
  68. package/package.json +2 -2
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,47 @@ 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, accessible tooltip, and glyphs (refresh arrows at rest, spinner
472
+ * only while busy); the host remains the sole data owner.
473
+ */
474
+ refresh?: {
475
+ onRefresh: () => void | Promise<void>;
476
+ label?: string;
477
+ };
478
+ /**
479
+ * Standard create affordance. The host owns authorization and the actual
480
+ * create flow; disabledReason is exposed through the shared tooltip.
481
+ */
482
+ add?: {
483
+ onAdd: () => void | Promise<void>;
484
+ disabled?: boolean;
485
+ disabledReason?: string;
486
+ };
487
+ /** Right-side domain actions, rendered after standard table controls. */
470
488
  actions?: ReactNode;
471
489
  }
490
+ /** Query fields safe to persist in a named table view. */
491
+ type TableViewQuery = Omit<MatrxDataTableQueryState, "page">;
492
+ /** Portable, persistence-neutral table state saved by a host adapter. */
493
+ interface TableViewSnapshot {
494
+ __kind: "matrx-table-view";
495
+ version: 1;
496
+ /** Page/cursor/selection/loaded rows are deliberately never saved. */
497
+ query: TableViewQuery;
498
+ columns: {
499
+ order: string[];
500
+ hidden: string[];
501
+ };
502
+ }
503
+ /** Host port for durable named views. The host owns actor, tenancy and CRUD. */
504
+ interface TableSavedViewsProps {
505
+ tableId: string;
506
+ snapshot: TableViewSnapshot;
507
+ defaultSnapshot: TableViewSnapshot;
508
+ onApply: (snapshot: TableViewSnapshot) => void;
509
+ }
472
510
  /** Optional deferred-apply copy for column filter popovers. */
473
511
  interface MatrxDataTableFilterUi {
474
512
  /** Enables the Include/Exclude control. Default false for remote-safe filters. */
@@ -684,6 +722,8 @@ interface MatrxDataTableSelectionConfig<T> {
684
722
  }
685
723
  /** Table-owned state and actions exposed to an opt-in phone card renderer. */
686
724
  interface MatrxDataTableMobileCardControls {
725
+ /** Render a declared column with the same editable/draft/link behavior as the grid. */
726
+ renderCell: (columnId: string) => ReactNode;
687
727
  /** Whether this row is in the canonical selection set. */
688
728
  selected: boolean;
689
729
  /** Whether the consumer allows this row to be selected. */
@@ -699,6 +739,10 @@ interface MatrxDataTableMobileCardControls {
699
739
  interface MatrxDataTableProps<T> {
700
740
  data: T[];
701
741
  columns: MatrxColumnDef<T>[];
742
+ /** Stable persistence identity for host-installed named views. */
743
+ tableId?: string;
744
+ /** Declared reset state for the host Saved Views control. */
745
+ defaultViewSnapshot?: TableViewSnapshot;
702
746
  /** Optional URL/source-owned column order and visibility. */
703
747
  columnState?: {
704
748
  order: string[];
@@ -708,7 +752,7 @@ interface MatrxDataTableProps<T> {
708
752
  hidden: string[];
709
753
  }) => void;
710
754
  };
711
- /** Enables package-owned drag reordering in table headers. */
755
+ /** Enables package-owned drag reordering in table headers. Default true. */
712
756
  reorderableColumns?: boolean;
713
757
  columnManager?: {
714
758
  open: boolean;
@@ -826,4 +870,4 @@ interface MatrxDataTableProps<T> {
826
870
  onRowOpen?: (row: T) => void;
827
871
  }
828
872
 
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 };
873
+ 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,47 @@ 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, accessible tooltip, and glyphs (refresh arrows at rest, spinner
472
+ * only while busy); the host remains the sole data owner.
473
+ */
474
+ refresh?: {
475
+ onRefresh: () => void | Promise<void>;
476
+ label?: string;
477
+ };
478
+ /**
479
+ * Standard create affordance. The host owns authorization and the actual
480
+ * create flow; disabledReason is exposed through the shared tooltip.
481
+ */
482
+ add?: {
483
+ onAdd: () => void | Promise<void>;
484
+ disabled?: boolean;
485
+ disabledReason?: string;
486
+ };
487
+ /** Right-side domain actions, rendered after standard table controls. */
470
488
  actions?: ReactNode;
471
489
  }
490
+ /** Query fields safe to persist in a named table view. */
491
+ type TableViewQuery = Omit<MatrxDataTableQueryState, "page">;
492
+ /** Portable, persistence-neutral table state saved by a host adapter. */
493
+ interface TableViewSnapshot {
494
+ __kind: "matrx-table-view";
495
+ version: 1;
496
+ /** Page/cursor/selection/loaded rows are deliberately never saved. */
497
+ query: TableViewQuery;
498
+ columns: {
499
+ order: string[];
500
+ hidden: string[];
501
+ };
502
+ }
503
+ /** Host port for durable named views. The host owns actor, tenancy and CRUD. */
504
+ interface TableSavedViewsProps {
505
+ tableId: string;
506
+ snapshot: TableViewSnapshot;
507
+ defaultSnapshot: TableViewSnapshot;
508
+ onApply: (snapshot: TableViewSnapshot) => void;
509
+ }
472
510
  /** Optional deferred-apply copy for column filter popovers. */
473
511
  interface MatrxDataTableFilterUi {
474
512
  /** Enables the Include/Exclude control. Default false for remote-safe filters. */
@@ -684,6 +722,8 @@ interface MatrxDataTableSelectionConfig<T> {
684
722
  }
685
723
  /** Table-owned state and actions exposed to an opt-in phone card renderer. */
686
724
  interface MatrxDataTableMobileCardControls {
725
+ /** Render a declared column with the same editable/draft/link behavior as the grid. */
726
+ renderCell: (columnId: string) => ReactNode;
687
727
  /** Whether this row is in the canonical selection set. */
688
728
  selected: boolean;
689
729
  /** Whether the consumer allows this row to be selected. */
@@ -699,6 +739,10 @@ interface MatrxDataTableMobileCardControls {
699
739
  interface MatrxDataTableProps<T> {
700
740
  data: T[];
701
741
  columns: MatrxColumnDef<T>[];
742
+ /** Stable persistence identity for host-installed named views. */
743
+ tableId?: string;
744
+ /** Declared reset state for the host Saved Views control. */
745
+ defaultViewSnapshot?: TableViewSnapshot;
702
746
  /** Optional URL/source-owned column order and visibility. */
703
747
  columnState?: {
704
748
  order: string[];
@@ -708,7 +752,7 @@ interface MatrxDataTableProps<T> {
708
752
  hidden: string[];
709
753
  }) => void;
710
754
  };
711
- /** Enables package-owned drag reordering in table headers. */
755
+ /** Enables package-owned drag reordering in table headers. Default true. */
712
756
  reorderableColumns?: boolean;
713
757
  columnManager?: {
714
758
  open: boolean;
@@ -826,4 +870,4 @@ interface MatrxDataTableProps<T> {
826
870
  onRowOpen?: (row: T) => void;
827
871
  }
828
872
 
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 };
873
+ 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.12",
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",
@@ -288,7 +288,7 @@
288
288
  "scripts": {
289
289
  "build": "tsup && node ./scripts/stamp-client-boundary.mjs",
290
290
  "clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
291
- "check:package": "pnpm build && publint && pnpm verify:tarball",
291
+ "check:package": "pnpm build && node ../scripts/check-exports-agreement.mjs && publint && pnpm verify:tarball",
292
292
  "typecheck": "tsc --noEmit",
293
293
  "test": "vitest run",
294
294
  "verify:tarball": "node ./scripts/verify-tarball.mjs",