@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.
- package/CHANGELOG.md +54 -0
- package/README.md +32 -0
- package/dist/data-table/copy-helpers.cjs +149 -0
- package/dist/data-table/copy-helpers.cjs.map +1 -0
- package/dist/data-table/copy-helpers.d.cts +31 -0
- package/dist/data-table/copy-helpers.d.ts +31 -0
- package/dist/data-table/copy-helpers.js +127 -0
- package/dist/data-table/copy-helpers.js.map +1 -0
- package/dist/data-table/copy-types.cjs +19 -0
- package/dist/data-table/copy-types.cjs.map +1 -0
- package/dist/data-table/copy-types.d.cts +137 -0
- package/dist/data-table/copy-types.d.ts +137 -0
- package/dist/data-table/copy-types.js +1 -0
- package/dist/data-table/copy-types.js.map +1 -0
- package/dist/data-table/data-row-inspector.cjs +1016 -0
- package/dist/data-table/data-row-inspector.cjs.map +1 -0
- package/dist/data-table/data-row-inspector.d.cts +34 -0
- package/dist/data-table/data-row-inspector.d.ts +34 -0
- package/dist/data-table/data-row-inspector.js +988 -0
- package/dist/data-table/data-row-inspector.js.map +1 -0
- package/dist/data-table/data-row-window.cjs +1136 -0
- package/dist/data-table/data-row-window.cjs.map +1 -0
- package/dist/data-table/data-row-window.d.cts +29 -0
- package/dist/data-table/data-row-window.d.ts +29 -0
- package/dist/data-table/data-row-window.js +1110 -0
- package/dist/data-table/data-row-window.js.map +1 -0
- package/dist/data-table/filter-engine.cjs +314 -0
- package/dist/data-table/filter-engine.cjs.map +1 -0
- package/dist/data-table/filter-engine.d.cts +35 -0
- package/dist/data-table/filter-engine.d.ts +35 -0
- package/dist/data-table/filter-engine.js +292 -0
- package/dist/data-table/filter-engine.js.map +1 -0
- package/dist/data-table/host.cjs +40 -0
- package/dist/data-table/host.cjs.map +1 -0
- package/dist/data-table/host.d.cts +73 -0
- package/dist/data-table/host.d.ts +73 -0
- package/dist/data-table/host.js +20 -0
- package/dist/data-table/host.js.map +1 -0
- package/dist/data-table/index.cjs +7198 -0
- package/dist/data-table/index.cjs.map +1 -0
- package/dist/data-table/index.d.cts +27 -0
- package/dist/data-table/index.d.ts +27 -0
- package/dist/data-table/index.js +7202 -0
- package/dist/data-table/index.js.map +1 -0
- package/dist/data-table/infer-filter.cjs +111 -0
- package/dist/data-table/infer-filter.cjs.map +1 -0
- package/dist/data-table/infer-filter.d.cts +17 -0
- package/dist/data-table/infer-filter.d.ts +17 -0
- package/dist/data-table/infer-filter.js +89 -0
- package/dist/data-table/infer-filter.js.map +1 -0
- package/dist/data-table/layered-filters.cjs +249 -0
- package/dist/data-table/layered-filters.cjs.map +1 -0
- package/dist/data-table/layered-filters.d.cts +3 -0
- package/dist/data-table/layered-filters.d.ts +3 -0
- package/dist/data-table/layered-filters.js +229 -0
- package/dist/data-table/layered-filters.js.map +1 -0
- package/dist/data-table/pagination.cjs +595 -0
- package/dist/data-table/pagination.cjs.map +1 -0
- package/dist/data-table/pagination.d.cts +34 -0
- package/dist/data-table/pagination.d.ts +34 -0
- package/dist/data-table/pagination.js +563 -0
- package/dist/data-table/pagination.js.map +1 -0
- package/dist/data-table/query-control.cjs +126 -0
- package/dist/data-table/query-control.cjs.map +1 -0
- package/dist/data-table/query-control.d.cts +32 -0
- package/dist/data-table/query-control.d.ts +32 -0
- package/dist/data-table/query-control.js +104 -0
- package/dist/data-table/query-control.js.map +1 -0
- package/dist/data-table/scroll-pagination.cjs +222 -0
- package/dist/data-table/scroll-pagination.cjs.map +1 -0
- package/dist/data-table/scroll-pagination.d.cts +37 -0
- package/dist/data-table/scroll-pagination.d.ts +37 -0
- package/dist/data-table/scroll-pagination.js +202 -0
- package/dist/data-table/scroll-pagination.js.map +1 -0
- package/dist/data-table/types.cjs +19 -0
- package/dist/data-table/types.cjs.map +1 -0
- package/dist/data-table/types.d.cts +3 -0
- package/dist/data-table/types.d.ts +3 -0
- package/dist/data-table/types.js +1 -0
- package/dist/data-table/types.js.map +1 -0
- package/dist/data-table/url-state.cjs +201 -0
- package/dist/data-table/url-state.cjs.map +1 -0
- package/dist/data-table/url-state.d.cts +33 -0
- package/dist/data-table/url-state.d.ts +33 -0
- package/dist/data-table/url-state.js +184 -0
- package/dist/data-table/url-state.js.map +1 -0
- package/dist/data-table/uuid-cell.cjs +371 -0
- package/dist/data-table/uuid-cell.cjs.map +1 -0
- package/dist/data-table/uuid-cell.d.cts +31 -0
- package/dist/data-table/uuid-cell.d.ts +31 -0
- package/dist/data-table/uuid-cell.js +345 -0
- package/dist/data-table/uuid-cell.js.map +1 -0
- package/dist/data-table/xlsx.cjs +100 -0
- package/dist/data-table/xlsx.cjs.map +1 -0
- package/dist/data-table/xlsx.d.cts +16 -0
- package/dist/data-table/xlsx.d.ts +16 -0
- package/dist/data-table/xlsx.js +70 -0
- package/dist/data-table/xlsx.js.map +1 -0
- package/dist/index.cjs +9 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -5
- package/dist/index.js.map +1 -1
- package/dist/styles.css +22 -0
- package/dist/types-ClaxTaXq.d.ts +798 -0
- package/dist/types-XXbVB1sh.d.cts +798 -0
- 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":[]}
|