@ai-matrx/design-system 0.14.3 → 0.15.2

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 (106) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/README.md +32 -0
  3. package/dist/data-table/copy-helpers.cjs +149 -0
  4. package/dist/data-table/copy-helpers.cjs.map +1 -0
  5. package/dist/data-table/copy-helpers.d.cts +31 -0
  6. package/dist/data-table/copy-helpers.d.ts +31 -0
  7. package/dist/data-table/copy-helpers.js +127 -0
  8. package/dist/data-table/copy-helpers.js.map +1 -0
  9. package/dist/data-table/copy-types.cjs +19 -0
  10. package/dist/data-table/copy-types.cjs.map +1 -0
  11. package/dist/data-table/copy-types.d.cts +137 -0
  12. package/dist/data-table/copy-types.d.ts +137 -0
  13. package/dist/data-table/copy-types.js +1 -0
  14. package/dist/data-table/copy-types.js.map +1 -0
  15. package/dist/data-table/data-row-inspector.cjs +1016 -0
  16. package/dist/data-table/data-row-inspector.cjs.map +1 -0
  17. package/dist/data-table/data-row-inspector.d.cts +34 -0
  18. package/dist/data-table/data-row-inspector.d.ts +34 -0
  19. package/dist/data-table/data-row-inspector.js +988 -0
  20. package/dist/data-table/data-row-inspector.js.map +1 -0
  21. package/dist/data-table/data-row-window.cjs +1136 -0
  22. package/dist/data-table/data-row-window.cjs.map +1 -0
  23. package/dist/data-table/data-row-window.d.cts +29 -0
  24. package/dist/data-table/data-row-window.d.ts +29 -0
  25. package/dist/data-table/data-row-window.js +1110 -0
  26. package/dist/data-table/data-row-window.js.map +1 -0
  27. package/dist/data-table/filter-engine.cjs +314 -0
  28. package/dist/data-table/filter-engine.cjs.map +1 -0
  29. package/dist/data-table/filter-engine.d.cts +35 -0
  30. package/dist/data-table/filter-engine.d.ts +35 -0
  31. package/dist/data-table/filter-engine.js +292 -0
  32. package/dist/data-table/filter-engine.js.map +1 -0
  33. package/dist/data-table/host.cjs +40 -0
  34. package/dist/data-table/host.cjs.map +1 -0
  35. package/dist/data-table/host.d.cts +73 -0
  36. package/dist/data-table/host.d.ts +73 -0
  37. package/dist/data-table/host.js +20 -0
  38. package/dist/data-table/host.js.map +1 -0
  39. package/dist/data-table/index.cjs +7198 -0
  40. package/dist/data-table/index.cjs.map +1 -0
  41. package/dist/data-table/index.d.cts +27 -0
  42. package/dist/data-table/index.d.ts +27 -0
  43. package/dist/data-table/index.js +7202 -0
  44. package/dist/data-table/index.js.map +1 -0
  45. package/dist/data-table/infer-filter.cjs +111 -0
  46. package/dist/data-table/infer-filter.cjs.map +1 -0
  47. package/dist/data-table/infer-filter.d.cts +17 -0
  48. package/dist/data-table/infer-filter.d.ts +17 -0
  49. package/dist/data-table/infer-filter.js +89 -0
  50. package/dist/data-table/infer-filter.js.map +1 -0
  51. package/dist/data-table/layered-filters.cjs +249 -0
  52. package/dist/data-table/layered-filters.cjs.map +1 -0
  53. package/dist/data-table/layered-filters.d.cts +3 -0
  54. package/dist/data-table/layered-filters.d.ts +3 -0
  55. package/dist/data-table/layered-filters.js +229 -0
  56. package/dist/data-table/layered-filters.js.map +1 -0
  57. package/dist/data-table/pagination.cjs +595 -0
  58. package/dist/data-table/pagination.cjs.map +1 -0
  59. package/dist/data-table/pagination.d.cts +34 -0
  60. package/dist/data-table/pagination.d.ts +34 -0
  61. package/dist/data-table/pagination.js +563 -0
  62. package/dist/data-table/pagination.js.map +1 -0
  63. package/dist/data-table/query-control.cjs +126 -0
  64. package/dist/data-table/query-control.cjs.map +1 -0
  65. package/dist/data-table/query-control.d.cts +32 -0
  66. package/dist/data-table/query-control.d.ts +32 -0
  67. package/dist/data-table/query-control.js +104 -0
  68. package/dist/data-table/query-control.js.map +1 -0
  69. package/dist/data-table/scroll-pagination.cjs +222 -0
  70. package/dist/data-table/scroll-pagination.cjs.map +1 -0
  71. package/dist/data-table/scroll-pagination.d.cts +37 -0
  72. package/dist/data-table/scroll-pagination.d.ts +37 -0
  73. package/dist/data-table/scroll-pagination.js +202 -0
  74. package/dist/data-table/scroll-pagination.js.map +1 -0
  75. package/dist/data-table/types.cjs +19 -0
  76. package/dist/data-table/types.cjs.map +1 -0
  77. package/dist/data-table/types.d.cts +3 -0
  78. package/dist/data-table/types.d.ts +3 -0
  79. package/dist/data-table/types.js +1 -0
  80. package/dist/data-table/types.js.map +1 -0
  81. package/dist/data-table/url-state.cjs +201 -0
  82. package/dist/data-table/url-state.cjs.map +1 -0
  83. package/dist/data-table/url-state.d.cts +33 -0
  84. package/dist/data-table/url-state.d.ts +33 -0
  85. package/dist/data-table/url-state.js +184 -0
  86. package/dist/data-table/url-state.js.map +1 -0
  87. package/dist/data-table/uuid-cell.cjs +371 -0
  88. package/dist/data-table/uuid-cell.cjs.map +1 -0
  89. package/dist/data-table/uuid-cell.d.cts +31 -0
  90. package/dist/data-table/uuid-cell.d.ts +31 -0
  91. package/dist/data-table/uuid-cell.js +345 -0
  92. package/dist/data-table/uuid-cell.js.map +1 -0
  93. package/dist/data-table/xlsx.cjs +100 -0
  94. package/dist/data-table/xlsx.cjs.map +1 -0
  95. package/dist/data-table/xlsx.d.cts +16 -0
  96. package/dist/data-table/xlsx.d.ts +16 -0
  97. package/dist/data-table/xlsx.js +70 -0
  98. package/dist/data-table/xlsx.js.map +1 -0
  99. package/dist/index.cjs +9 -5
  100. package/dist/index.cjs.map +1 -1
  101. package/dist/index.js +9 -5
  102. package/dist/index.js.map +1 -1
  103. package/dist/styles.css +22 -0
  104. package/dist/types-ClaxTaXq.d.ts +798 -0
  105. package/dist/types-XXbVB1sh.d.cts +798 -0
  106. package/package.json +164 -1
@@ -0,0 +1,137 @@
1
+ import { ComponentType, ReactNode } from 'react';
2
+
3
+ type CopyResolvable<T> = T | (() => T);
4
+ type CopyScalar = string | number | boolean | null | undefined;
5
+ interface AgentPayloadInput {
6
+ kind: string;
7
+ location: string;
8
+ description: string;
9
+ data: unknown;
10
+ summary?: string;
11
+ context?: Record<string, CopyScalar>;
12
+ attributes?: Record<string, CopyScalar>;
13
+ }
14
+ type AiIcon = ComponentType<{
15
+ className?: string;
16
+ }>;
17
+ interface AiVariant {
18
+ id: string;
19
+ label: string;
20
+ hint?: string;
21
+ icon?: AiIcon;
22
+ section?: "copy" | "ai";
23
+ ariaLabel?: string;
24
+ successMessage?: string;
25
+ build?: () => AgentPayloadInput | string | Promise<AgentPayloadInput | string>;
26
+ onSelect?: () => void;
27
+ modal?: (props: {
28
+ open: boolean;
29
+ onOpenChange: (open: boolean) => void;
30
+ }) => ReactNode;
31
+ }
32
+ type AiCustomOption = {
33
+ kind: "toggle";
34
+ key: string;
35
+ label: string;
36
+ hint?: string;
37
+ default: boolean;
38
+ } | {
39
+ kind: "preset";
40
+ key: string;
41
+ label: string;
42
+ options: {
43
+ label: string;
44
+ value: number;
45
+ }[];
46
+ default: number;
47
+ } | {
48
+ kind: "slider";
49
+ key: string;
50
+ label: string;
51
+ hint?: string;
52
+ stops: number[];
53
+ default: number;
54
+ formatValue: (value: number) => string;
55
+ } | {
56
+ kind: "number";
57
+ key: string;
58
+ label: string;
59
+ hint?: string;
60
+ min?: number;
61
+ step?: number;
62
+ presets?: {
63
+ label: string;
64
+ value: number;
65
+ }[];
66
+ default: number;
67
+ };
68
+ type AiOptionValues = Record<string, boolean | number>;
69
+ interface AiCustomSource {
70
+ label?: string;
71
+ hint?: string;
72
+ options: AiCustomOption[];
73
+ build: (options: AiOptionValues) => {
74
+ text: string;
75
+ meta?: Record<string, string | number | boolean | undefined>;
76
+ };
77
+ wrap: (text: string, options: AiOptionValues, meta?: Record<string, string | number | boolean | undefined>) => AgentPayloadInput;
78
+ dialogTitle?: string;
79
+ dialogDescription?: string;
80
+ }
81
+ interface ExportItem {
82
+ id: string;
83
+ label: string;
84
+ build?: () => {
85
+ content: BlobPart;
86
+ extension: string;
87
+ mime: string;
88
+ };
89
+ onSelect?: () => void | Promise<void>;
90
+ }
91
+ interface CopyExportConfig {
92
+ items: ExportItem[];
93
+ sheetRows?: () => Array<Record<string, unknown>>;
94
+ }
95
+ /** Exact portable table-copy API. Host adapters import this, never recreate it. */
96
+ interface CopyControlProps {
97
+ human?: CopyResolvable<string>;
98
+ agent?: CopyResolvable<AgentPayloadInput | string>;
99
+ json?: CopyResolvable<unknown>;
100
+ label: string;
101
+ size?: "xs" | "icon" | "sm";
102
+ /** Accepted for direct compatibility; package chrome has no application groomer engine. */
103
+ appearance?: "segmented" | "bare";
104
+ disabled?: boolean;
105
+ stopPropagation?: boolean;
106
+ className?: string;
107
+ /** Legacy source compatibility; controls are already grouped by default. */
108
+ grouped?: boolean;
109
+ aiVariants?: AiVariant[];
110
+ agentVariant?: {
111
+ id?: string;
112
+ label?: string;
113
+ hint?: string;
114
+ position?: "first" | "last";
115
+ };
116
+ aiCustom?: AiCustomSource;
117
+ export?: CopyExportConfig;
118
+ hide?: Array<"copy" | "ai" | "export">;
119
+ }
120
+ interface CopySubsetColumn<T> {
121
+ id: string;
122
+ header: string;
123
+ accessorKey?: keyof T & string;
124
+ accessorFn?: (row: T) => unknown;
125
+ hidden?: boolean;
126
+ }
127
+ interface CopySubsetSource<T> {
128
+ label: string;
129
+ location: string;
130
+ kind: string;
131
+ rows: T[];
132
+ columns: CopySubsetColumn<T>[];
133
+ getRowId: (row: T) => string;
134
+ serializer?: (rows: T[]) => AgentPayloadInput;
135
+ }
136
+
137
+ export type { AgentPayloadInput, AiCustomOption, AiCustomSource, AiIcon, AiOptionValues, AiVariant, CopyControlProps, CopyExportConfig, CopyResolvable, CopyScalar, CopySubsetColumn, CopySubsetSource, ExportItem };
@@ -0,0 +1,137 @@
1
+ import { ComponentType, ReactNode } from 'react';
2
+
3
+ type CopyResolvable<T> = T | (() => T);
4
+ type CopyScalar = string | number | boolean | null | undefined;
5
+ interface AgentPayloadInput {
6
+ kind: string;
7
+ location: string;
8
+ description: string;
9
+ data: unknown;
10
+ summary?: string;
11
+ context?: Record<string, CopyScalar>;
12
+ attributes?: Record<string, CopyScalar>;
13
+ }
14
+ type AiIcon = ComponentType<{
15
+ className?: string;
16
+ }>;
17
+ interface AiVariant {
18
+ id: string;
19
+ label: string;
20
+ hint?: string;
21
+ icon?: AiIcon;
22
+ section?: "copy" | "ai";
23
+ ariaLabel?: string;
24
+ successMessage?: string;
25
+ build?: () => AgentPayloadInput | string | Promise<AgentPayloadInput | string>;
26
+ onSelect?: () => void;
27
+ modal?: (props: {
28
+ open: boolean;
29
+ onOpenChange: (open: boolean) => void;
30
+ }) => ReactNode;
31
+ }
32
+ type AiCustomOption = {
33
+ kind: "toggle";
34
+ key: string;
35
+ label: string;
36
+ hint?: string;
37
+ default: boolean;
38
+ } | {
39
+ kind: "preset";
40
+ key: string;
41
+ label: string;
42
+ options: {
43
+ label: string;
44
+ value: number;
45
+ }[];
46
+ default: number;
47
+ } | {
48
+ kind: "slider";
49
+ key: string;
50
+ label: string;
51
+ hint?: string;
52
+ stops: number[];
53
+ default: number;
54
+ formatValue: (value: number) => string;
55
+ } | {
56
+ kind: "number";
57
+ key: string;
58
+ label: string;
59
+ hint?: string;
60
+ min?: number;
61
+ step?: number;
62
+ presets?: {
63
+ label: string;
64
+ value: number;
65
+ }[];
66
+ default: number;
67
+ };
68
+ type AiOptionValues = Record<string, boolean | number>;
69
+ interface AiCustomSource {
70
+ label?: string;
71
+ hint?: string;
72
+ options: AiCustomOption[];
73
+ build: (options: AiOptionValues) => {
74
+ text: string;
75
+ meta?: Record<string, string | number | boolean | undefined>;
76
+ };
77
+ wrap: (text: string, options: AiOptionValues, meta?: Record<string, string | number | boolean | undefined>) => AgentPayloadInput;
78
+ dialogTitle?: string;
79
+ dialogDescription?: string;
80
+ }
81
+ interface ExportItem {
82
+ id: string;
83
+ label: string;
84
+ build?: () => {
85
+ content: BlobPart;
86
+ extension: string;
87
+ mime: string;
88
+ };
89
+ onSelect?: () => void | Promise<void>;
90
+ }
91
+ interface CopyExportConfig {
92
+ items: ExportItem[];
93
+ sheetRows?: () => Array<Record<string, unknown>>;
94
+ }
95
+ /** Exact portable table-copy API. Host adapters import this, never recreate it. */
96
+ interface CopyControlProps {
97
+ human?: CopyResolvable<string>;
98
+ agent?: CopyResolvable<AgentPayloadInput | string>;
99
+ json?: CopyResolvable<unknown>;
100
+ label: string;
101
+ size?: "xs" | "icon" | "sm";
102
+ /** Accepted for direct compatibility; package chrome has no application groomer engine. */
103
+ appearance?: "segmented" | "bare";
104
+ disabled?: boolean;
105
+ stopPropagation?: boolean;
106
+ className?: string;
107
+ /** Legacy source compatibility; controls are already grouped by default. */
108
+ grouped?: boolean;
109
+ aiVariants?: AiVariant[];
110
+ agentVariant?: {
111
+ id?: string;
112
+ label?: string;
113
+ hint?: string;
114
+ position?: "first" | "last";
115
+ };
116
+ aiCustom?: AiCustomSource;
117
+ export?: CopyExportConfig;
118
+ hide?: Array<"copy" | "ai" | "export">;
119
+ }
120
+ interface CopySubsetColumn<T> {
121
+ id: string;
122
+ header: string;
123
+ accessorKey?: keyof T & string;
124
+ accessorFn?: (row: T) => unknown;
125
+ hidden?: boolean;
126
+ }
127
+ interface CopySubsetSource<T> {
128
+ label: string;
129
+ location: string;
130
+ kind: string;
131
+ rows: T[];
132
+ columns: CopySubsetColumn<T>[];
133
+ getRowId: (row: T) => string;
134
+ serializer?: (rows: T[]) => AgentPayloadInput;
135
+ }
136
+
137
+ export type { AgentPayloadInput, AiCustomOption, AiCustomSource, AiIcon, AiOptionValues, AiVariant, CopyControlProps, CopyExportConfig, CopyResolvable, CopyScalar, CopySubsetColumn, CopySubsetSource, ExportItem };
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=copy-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}