@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.
- package/CHANGELOG.md +34 -0
- package/dist/content-transfer/alchemy.svg +1 -1
- package/dist/content-transfer/icon.cjs +3 -1
- package/dist/content-transfer/icon.cjs.map +1 -1
- package/dist/content-transfer/icon.d.cts +3 -2
- package/dist/content-transfer/icon.d.ts +3 -2
- package/dist/content-transfer/icon.js +3 -1
- package/dist/content-transfer/icon.js.map +1 -1
- package/dist/content-transfer.cjs +442 -447
- package/dist/content-transfer.cjs.map +1 -1
- package/dist/content-transfer.css +130 -54
- package/dist/content-transfer.d.cts +5 -1
- package/dist/content-transfer.d.ts +5 -1
- package/dist/content-transfer.js +467 -472
- package/dist/content-transfer.js.map +1 -1
- package/dist/data-table/copy-helpers.d.cts +1 -1
- package/dist/data-table/copy-helpers.d.ts +1 -1
- package/dist/data-table/copy-types.cjs.map +1 -1
- package/dist/data-table/copy-types.d.cts +1 -1
- package/dist/data-table/copy-types.d.ts +1 -1
- package/dist/data-table/data-row-inspector.cjs +444 -446
- package/dist/data-table/data-row-inspector.cjs.map +1 -1
- package/dist/data-table/data-row-inspector.js +489 -491
- package/dist/data-table/data-row-inspector.js.map +1 -1
- package/dist/data-table/data-row-window.cjs +444 -446
- package/dist/data-table/data-row-window.cjs.map +1 -1
- package/dist/data-table/data-row-window.js +489 -491
- package/dist/data-table/data-row-window.js.map +1 -1
- package/dist/data-table/filter-engine.d.cts +1 -1
- package/dist/data-table/filter-engine.d.ts +1 -1
- package/dist/data-table/host.cjs.map +1 -1
- package/dist/data-table/host.d.cts +17 -1
- package/dist/data-table/host.d.ts +17 -1
- package/dist/data-table/host.js.map +1 -1
- package/dist/data-table/index.cjs +1524 -1011
- package/dist/data-table/index.cjs.map +1 -1
- package/dist/data-table/index.d.cts +25 -4
- package/dist/data-table/index.d.ts +25 -4
- package/dist/data-table/index.js +1560 -1047
- package/dist/data-table/index.js.map +1 -1
- package/dist/data-table/infer-filter.d.cts +1 -1
- package/dist/data-table/infer-filter.d.ts +1 -1
- package/dist/data-table/layered-filters.d.cts +1 -1
- package/dist/data-table/layered-filters.d.ts +1 -1
- package/dist/data-table/pagination.cjs +5 -5
- package/dist/data-table/pagination.cjs.map +1 -1
- package/dist/data-table/pagination.js +5 -5
- package/dist/data-table/pagination.js.map +1 -1
- package/dist/data-table/query-control.d.cts +1 -1
- package/dist/data-table/query-control.d.ts +1 -1
- package/dist/data-table/types.cjs.map +1 -1
- package/dist/data-table/types.d.cts +1 -1
- package/dist/data-table/types.d.ts +1 -1
- package/dist/data-table/url-state.d.cts +1 -1
- package/dist/data-table/url-state.d.ts +1 -1
- package/dist/data-table/uuid-cell.cjs.map +1 -1
- package/dist/data-table/uuid-cell.js.map +1 -1
- package/dist/data-table/xlsx.d.cts +1 -1
- package/dist/data-table/xlsx.d.ts +1 -1
- package/dist/index.cjs +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/styles.css +4 -0
- package/dist/tokens.css +2 -0
- package/dist/{types-cH8oLqUx.d.ts → types-BuDKVpeF.d.ts} +47 -3
- package/dist/{types-0CNCWvdK.d.cts → types-Dqcb7jXO.d.cts} +47 -3
- package/package.json +2 -2
package/dist/styles.css
CHANGED
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
|
-
/**
|
|
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,
|
|
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
|
-
/**
|
|
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,
|
|
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.
|
|
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",
|