@ai-matrx/design-system 0.18.8 → 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.
- package/CHANGELOG.md +21 -0
- package/dist/content-transfer.cjs +163 -202
- package/dist/content-transfer.cjs.map +1 -1
- package/dist/content-transfer.css +43 -30
- package/dist/content-transfer.d.cts +4 -0
- package/dist/content-transfer.d.ts +4 -0
- package/dist/content-transfer.js +225 -264
- 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/data-row-inspector.cjs +163 -202
- package/dist/data-table/data-row-inspector.cjs.map +1 -1
- package/dist/data-table/data-row-inspector.js +245 -284
- package/dist/data-table/data-row-inspector.js.map +1 -1
- package/dist/data-table/data-row-window.cjs +163 -202
- package/dist/data-table/data-row-window.cjs.map +1 -1
- package/dist/data-table/data-row-window.js +245 -284
- 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 +2 -0
- package/dist/data-table/host.d.ts +2 -0
- package/dist/data-table/host.js.map +1 -1
- package/dist/data-table/index.cjs +1192 -751
- package/dist/data-table/index.cjs.map +1 -1
- package/dist/data-table/index.d.cts +24 -3
- package/dist/data-table/index.d.ts +24 -3
- package/dist/data-table/index.js +1264 -823
- 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 +8 -1
- package/dist/tokens.css +2 -0
- package/dist/{types-cH8oLqUx.d.ts → types-C2xN6W_q.d.ts} +46 -3
- package/dist/{types-0CNCWvdK.d.cts → types-D_tpuk6m.d.cts} +46 -3
- package/package.json +1 -1
package/dist/styles.css
CHANGED
|
@@ -912,11 +912,18 @@
|
|
|
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;
|
|
918
922
|
min-height: 0;
|
|
919
|
-
|
|
923
|
+
/* Keep horizontal gestures in a wide table, but let vertical wheel/touch
|
|
924
|
+
input chain natively to the page when this scroller has no remaining
|
|
925
|
+
vertical range. */
|
|
926
|
+
overscroll-behavior-x: contain;
|
|
920
927
|
}
|
|
921
928
|
|
|
922
929
|
[data-matrx-table-scroll] {
|
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
|
-
/**
|
|
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,
|
|
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
|
-
/**
|
|
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,
|
|
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