@ai-matrx/design-system 0.17.4 → 0.18.1
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 +35 -0
- package/README.md +1 -0
- package/dist/content-transfer/alchemy.svg +1 -0
- package/dist/content-transfer/icon.cjs +28 -0
- package/dist/content-transfer/icon.cjs.map +1 -0
- package/dist/content-transfer/icon.d.cts +4 -0
- package/dist/content-transfer/icon.d.ts +4 -0
- package/dist/content-transfer/icon.js +8 -0
- package/dist/content-transfer/icon.js.map +1 -0
- package/dist/content-transfer.cjs +1978 -0
- package/dist/content-transfer.cjs.map +1 -0
- package/dist/content-transfer.css +382 -0
- package/dist/content-transfer.d.cts +208 -0
- package/dist/content-transfer.d.ts +208 -0
- package/dist/content-transfer.js +1974 -0
- package/dist/content-transfer.js.map +1 -0
- 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 +2 -0
- package/dist/data-table/copy-types.d.ts +2 -0
- package/dist/data-table/data-row-inspector.cjs +1603 -319
- package/dist/data-table/data-row-inspector.cjs.map +1 -1
- package/dist/data-table/data-row-inspector.js +1634 -324
- package/dist/data-table/data-row-inspector.js.map +1 -1
- package/dist/data-table/data-row-window.cjs +1531 -245
- package/dist/data-table/data-row-window.cjs.map +1 -1
- package/dist/data-table/data-row-window.js +1561 -249
- 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/index.cjs +2455 -1055
- package/dist/data-table/index.cjs.map +1 -1
- package/dist/data-table/index.d.cts +2 -2
- package/dist/data-table/index.d.ts +2 -2
- package/dist/data-table/index.js +2472 -1042
- 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/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/xlsx.d.cts +1 -1
- package/dist/data-table/xlsx.d.ts +1 -1
- package/dist/styles.css +2 -0
- package/dist/{types-pZ95iFk5.d.ts → types-BhSkeZQ_.d.ts} +14 -0
- package/dist/{types-4fmLG5AN.d.cts → types-CD4xGL5Z.d.cts} +14 -0
- package/package.json +25 -2
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
/* Structural Alchemy rules. Hosts own token values; Tailwind is never required. */
|
|
2
|
+
.matrx-alchemy {
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
gap: 0.375rem;
|
|
6
|
+
}
|
|
7
|
+
.matrx-alchemy-trigger {
|
|
8
|
+
display: inline-flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
width: 2rem;
|
|
12
|
+
height: 2rem;
|
|
13
|
+
padding: 0.375rem;
|
|
14
|
+
border: 0;
|
|
15
|
+
border-radius: 0.375rem;
|
|
16
|
+
background: transparent;
|
|
17
|
+
color: hsl(var(--foreground, 240 10% 4%));
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
}
|
|
20
|
+
.matrx-alchemy-trigger svg {
|
|
21
|
+
width: 1.125rem;
|
|
22
|
+
height: 1.125rem;
|
|
23
|
+
}
|
|
24
|
+
.matrx-alchemy-trigger:hover {
|
|
25
|
+
background: hsl(var(--accent, 240 5% 96%));
|
|
26
|
+
}
|
|
27
|
+
.matrx-alchemy-trigger:focus-visible {
|
|
28
|
+
outline: 2px solid hsl(var(--ring, 240 5% 65%));
|
|
29
|
+
outline-offset: 2px;
|
|
30
|
+
}
|
|
31
|
+
.matrx-alchemy-trigger:disabled {
|
|
32
|
+
opacity: 0.5;
|
|
33
|
+
cursor: not-allowed;
|
|
34
|
+
}
|
|
35
|
+
.matrx-alchemy-menu {
|
|
36
|
+
min-width: 18rem;
|
|
37
|
+
max-width: min(24rem, calc(100vw - 2rem));
|
|
38
|
+
}
|
|
39
|
+
.matrx-alchemy-notice,
|
|
40
|
+
.matrx-alchemy-meta {
|
|
41
|
+
font-size: 0.75rem;
|
|
42
|
+
color: hsl(var(--muted-foreground, 240 4% 46%));
|
|
43
|
+
}
|
|
44
|
+
.matrx-alchemy-workspace {
|
|
45
|
+
max-height: min(90dvh, 56rem);
|
|
46
|
+
overflow: auto;
|
|
47
|
+
}
|
|
48
|
+
.matrx-alchemy-workspace-grid {
|
|
49
|
+
display: grid;
|
|
50
|
+
grid-template-columns: minmax(0, 2fr) minmax(14rem, 1fr);
|
|
51
|
+
gap: 1rem;
|
|
52
|
+
min-height: 0;
|
|
53
|
+
}
|
|
54
|
+
.matrx-alchemy-main {
|
|
55
|
+
display: grid;
|
|
56
|
+
gap: 0.75rem;
|
|
57
|
+
min-width: 0;
|
|
58
|
+
}
|
|
59
|
+
.matrx-alchemy-toolbar {
|
|
60
|
+
display: flex;
|
|
61
|
+
flex-wrap: wrap;
|
|
62
|
+
gap: 0.5rem;
|
|
63
|
+
align-items: end;
|
|
64
|
+
}
|
|
65
|
+
.matrx-alchemy-toolbar label,
|
|
66
|
+
.matrx-alchemy-preview-label,
|
|
67
|
+
.matrx-alchemy-workspace aside label,
|
|
68
|
+
.matrx-alchemy-options label {
|
|
69
|
+
display: grid;
|
|
70
|
+
gap: 0.25rem;
|
|
71
|
+
font-size: 0.8125rem;
|
|
72
|
+
}
|
|
73
|
+
.matrx-alchemy-toolbar input,
|
|
74
|
+
.matrx-alchemy-toolbar select,
|
|
75
|
+
.matrx-alchemy-preview-label select,
|
|
76
|
+
.matrx-alchemy-workspace aside textarea,
|
|
77
|
+
.matrx-alchemy-options input {
|
|
78
|
+
min-height: 2.25rem;
|
|
79
|
+
border: 1px solid hsl(var(--border, 240 6% 90%));
|
|
80
|
+
border-radius: 0.25rem;
|
|
81
|
+
background: hsl(var(--background, 0 0% 100%));
|
|
82
|
+
color: inherit;
|
|
83
|
+
padding: 0.35rem 0.5rem;
|
|
84
|
+
}
|
|
85
|
+
.matrx-alchemy-options {
|
|
86
|
+
display: grid;
|
|
87
|
+
gap: 0.5rem;
|
|
88
|
+
max-height: 13rem;
|
|
89
|
+
overflow: auto;
|
|
90
|
+
border: 1px solid hsl(var(--border, 240 6% 90%));
|
|
91
|
+
border-radius: 0.375rem;
|
|
92
|
+
padding: 0.625rem;
|
|
93
|
+
}
|
|
94
|
+
.matrx-alchemy-options legend {
|
|
95
|
+
padding: 0 0.25rem;
|
|
96
|
+
font-size: 0.8125rem;
|
|
97
|
+
font-weight: 600;
|
|
98
|
+
}
|
|
99
|
+
.matrx-alchemy-column {
|
|
100
|
+
display: grid;
|
|
101
|
+
grid-template-columns: minmax(8rem, 1fr) minmax(8rem, 1fr);
|
|
102
|
+
gap: 0.5rem;
|
|
103
|
+
align-items: end;
|
|
104
|
+
}
|
|
105
|
+
.matrx-alchemy-row-list {
|
|
106
|
+
display: grid;
|
|
107
|
+
gap: 0.375rem;
|
|
108
|
+
max-height: 9rem;
|
|
109
|
+
overflow: auto;
|
|
110
|
+
padding: 0.25rem;
|
|
111
|
+
}
|
|
112
|
+
.matrx-alchemy-row-list label {
|
|
113
|
+
display: block;
|
|
114
|
+
overflow: hidden;
|
|
115
|
+
text-overflow: ellipsis;
|
|
116
|
+
white-space: nowrap;
|
|
117
|
+
}
|
|
118
|
+
.matrx-alchemy-coverage {
|
|
119
|
+
display: grid;
|
|
120
|
+
gap: 0.25rem;
|
|
121
|
+
font-size: 0.75rem;
|
|
122
|
+
color: hsl(var(--muted-foreground, 240 4% 46%));
|
|
123
|
+
}
|
|
124
|
+
.matrx-alchemy-coverage details {
|
|
125
|
+
max-height: 8rem;
|
|
126
|
+
overflow: auto;
|
|
127
|
+
}
|
|
128
|
+
.matrx-alchemy-coverage ul {
|
|
129
|
+
margin: 0.35rem 0 0;
|
|
130
|
+
padding-left: 1.25rem;
|
|
131
|
+
}
|
|
132
|
+
.matrx-alchemy-preview {
|
|
133
|
+
display: block;
|
|
134
|
+
width: 100%;
|
|
135
|
+
min-height: 20rem;
|
|
136
|
+
padding: 0.75rem;
|
|
137
|
+
border: 1px solid hsl(var(--border, 240 6% 90%));
|
|
138
|
+
border-radius: 0.375rem;
|
|
139
|
+
background: hsl(var(--muted, 240 5% 96%));
|
|
140
|
+
color: inherit;
|
|
141
|
+
font:
|
|
142
|
+
12px/1.45 ui-monospace,
|
|
143
|
+
SFMono-Regular,
|
|
144
|
+
Menlo,
|
|
145
|
+
monospace;
|
|
146
|
+
resize: vertical;
|
|
147
|
+
}
|
|
148
|
+
.matrx-alchemy-preview[aria-invalid="true"] {
|
|
149
|
+
border-color: hsl(var(--destructive, 0 84% 60%));
|
|
150
|
+
}
|
|
151
|
+
.matrx-alchemy-workspace aside {
|
|
152
|
+
display: grid;
|
|
153
|
+
align-content: start;
|
|
154
|
+
gap: 0.75rem;
|
|
155
|
+
}
|
|
156
|
+
.matrx-alchemy-workspace aside textarea {
|
|
157
|
+
min-height: 8rem;
|
|
158
|
+
resize: vertical;
|
|
159
|
+
}
|
|
160
|
+
.matrx-alchemy-decision {
|
|
161
|
+
display: flex;
|
|
162
|
+
flex-wrap: wrap;
|
|
163
|
+
align-items: center;
|
|
164
|
+
gap: 0.5rem;
|
|
165
|
+
padding: 0.75rem;
|
|
166
|
+
border: 1px solid hsl(var(--border, 240 6% 90%));
|
|
167
|
+
border-radius: 0.375rem;
|
|
168
|
+
background: hsl(var(--muted, 240 5% 96%));
|
|
169
|
+
}
|
|
170
|
+
.matrx-alchemy-decision p {
|
|
171
|
+
flex: 1 1 16rem;
|
|
172
|
+
margin: 0;
|
|
173
|
+
}
|
|
174
|
+
.matrx-alchemy-error {
|
|
175
|
+
font-size: 0.8125rem;
|
|
176
|
+
color: hsl(var(--destructive, 0 84% 60%));
|
|
177
|
+
}
|
|
178
|
+
@media (max-width: 640px) {
|
|
179
|
+
.matrx-alchemy-workspace-grid {
|
|
180
|
+
grid-template-columns: 1fr;
|
|
181
|
+
}
|
|
182
|
+
.matrx-alchemy-preview {
|
|
183
|
+
min-height: 14rem;
|
|
184
|
+
}
|
|
185
|
+
.matrx-alchemy-column {
|
|
186
|
+
grid-template-columns: 1fr;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.matrx-alchemy-xs .matrx-alchemy-trigger {
|
|
191
|
+
width: 1.75rem;
|
|
192
|
+
height: 1.75rem;
|
|
193
|
+
padding: 0.375rem;
|
|
194
|
+
}
|
|
195
|
+
.matrx-alchemy-xs .matrx-alchemy-trigger svg {
|
|
196
|
+
width: 1rem;
|
|
197
|
+
height: 1rem;
|
|
198
|
+
}
|
|
199
|
+
.matrx-alchemy-sm .matrx-alchemy-trigger {
|
|
200
|
+
width: 2.25rem;
|
|
201
|
+
height: 2.25rem;
|
|
202
|
+
}
|
|
203
|
+
@media (pointer: coarse) {
|
|
204
|
+
.matrx-alchemy .matrx-alchemy-trigger {
|
|
205
|
+
width: 2.75rem;
|
|
206
|
+
height: 2.75rem;
|
|
207
|
+
padding: 0.625rem;
|
|
208
|
+
}
|
|
209
|
+
.matrx-alchemy-workspace input,
|
|
210
|
+
.matrx-alchemy-workspace select,
|
|
211
|
+
.matrx-alchemy-workspace textarea {
|
|
212
|
+
font-size: max(1rem, 1em);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.matrx-alchemy-menu-icon {
|
|
217
|
+
width: 1rem;
|
|
218
|
+
height: 1rem;
|
|
219
|
+
flex-shrink: 0;
|
|
220
|
+
}
|
|
221
|
+
.matrx-alchemy-menu-hint {
|
|
222
|
+
display: block;
|
|
223
|
+
color: hsl(var(--muted-foreground, 240 4% 46%));
|
|
224
|
+
font-size: 0.75rem;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/* Primitive chrome is scoped here so a plain React consumer needs no Tailwind build. */
|
|
228
|
+
.matrx-alchemy-menu,
|
|
229
|
+
.matrx-alchemy-workspace {
|
|
230
|
+
box-sizing: border-box;
|
|
231
|
+
font-family: inherit;
|
|
232
|
+
color: hsl(var(--foreground, 240 10% 4%));
|
|
233
|
+
background: hsl(var(--background, 0 0% 100%));
|
|
234
|
+
border: 1px solid hsl(var(--border, 240 6% 90%));
|
|
235
|
+
border-radius: 0.5rem;
|
|
236
|
+
box-shadow: 0 8px 28px hsl(var(--foreground, 240 10% 4%) / 0.12);
|
|
237
|
+
}
|
|
238
|
+
.matrx-alchemy-menu {
|
|
239
|
+
z-index: 10001;
|
|
240
|
+
padding: 0.25rem;
|
|
241
|
+
max-height: var(--radix-dropdown-menu-content-available-height, 80dvh);
|
|
242
|
+
overflow: auto;
|
|
243
|
+
overscroll-behavior: contain;
|
|
244
|
+
}
|
|
245
|
+
.matrx-alchemy-menu [role="menuitem"] {
|
|
246
|
+
display: flex;
|
|
247
|
+
align-items: center;
|
|
248
|
+
gap: 0.5rem;
|
|
249
|
+
min-height: 2rem;
|
|
250
|
+
padding: 0.375rem 0.5rem;
|
|
251
|
+
border-radius: 0.25rem;
|
|
252
|
+
font-size: 0.875rem;
|
|
253
|
+
cursor: default;
|
|
254
|
+
outline: none;
|
|
255
|
+
user-select: none;
|
|
256
|
+
}
|
|
257
|
+
.matrx-alchemy-menu [role="menuitem"][data-highlighted] {
|
|
258
|
+
background: hsl(var(--accent, 240 5% 96%));
|
|
259
|
+
}
|
|
260
|
+
.matrx-alchemy-menu [data-disabled] {
|
|
261
|
+
opacity: 0.5;
|
|
262
|
+
pointer-events: none;
|
|
263
|
+
}
|
|
264
|
+
.matrx-alchemy-menu [data-slot="dropdown-menu-label"] {
|
|
265
|
+
padding: 0.375rem 0.5rem;
|
|
266
|
+
font-size: 0.75rem;
|
|
267
|
+
font-weight: 600;
|
|
268
|
+
}
|
|
269
|
+
.matrx-alchemy-menu [role="separator"] {
|
|
270
|
+
height: 1px;
|
|
271
|
+
margin: 0.25rem 0;
|
|
272
|
+
background: hsl(var(--border, 240 6% 90%));
|
|
273
|
+
}
|
|
274
|
+
.matrx-alchemy-workspace {
|
|
275
|
+
position: fixed;
|
|
276
|
+
z-index: 10001;
|
|
277
|
+
top: 50%;
|
|
278
|
+
left: 50%;
|
|
279
|
+
right: auto;
|
|
280
|
+
bottom: auto;
|
|
281
|
+
margin: 0;
|
|
282
|
+
translate: -50% -50%;
|
|
283
|
+
width: min(64rem, calc(100vw - 2rem));
|
|
284
|
+
max-width: calc(100vw - 2rem);
|
|
285
|
+
padding: 1.5rem;
|
|
286
|
+
display: grid;
|
|
287
|
+
gap: 1rem;
|
|
288
|
+
}
|
|
289
|
+
[data-slot="dialog-overlay"]:has(+ .matrx-alchemy-workspace) {
|
|
290
|
+
position: fixed;
|
|
291
|
+
inset: 0;
|
|
292
|
+
z-index: 10000;
|
|
293
|
+
background: hsl(var(--foreground, 240 10% 4%) / 0.18);
|
|
294
|
+
}
|
|
295
|
+
.matrx-alchemy-workspace [data-slot="dialog-header"] {
|
|
296
|
+
display: grid;
|
|
297
|
+
gap: 0.375rem;
|
|
298
|
+
padding-right: 2.25rem;
|
|
299
|
+
}
|
|
300
|
+
.matrx-alchemy-workspace [data-slot="dialog-title"] {
|
|
301
|
+
margin: 0;
|
|
302
|
+
font-size: 1.125rem;
|
|
303
|
+
font-weight: 600;
|
|
304
|
+
}
|
|
305
|
+
.matrx-alchemy-workspace [data-slot="dialog-description"] {
|
|
306
|
+
margin: 0;
|
|
307
|
+
font-size: 0.875rem;
|
|
308
|
+
color: hsl(var(--muted-foreground, 240 4% 46%));
|
|
309
|
+
}
|
|
310
|
+
.matrx-alchemy-workspace [data-slot="dialog-footer"] {
|
|
311
|
+
display: flex;
|
|
312
|
+
flex-wrap: wrap;
|
|
313
|
+
justify-content: flex-end;
|
|
314
|
+
gap: 0.5rem;
|
|
315
|
+
align-items: center;
|
|
316
|
+
}
|
|
317
|
+
.matrx-alchemy-workspace button {
|
|
318
|
+
display: inline-flex;
|
|
319
|
+
align-items: center;
|
|
320
|
+
justify-content: center;
|
|
321
|
+
gap: 0.375rem;
|
|
322
|
+
min-height: 2rem;
|
|
323
|
+
padding: 0.375rem 0.75rem;
|
|
324
|
+
border: 1px solid hsl(var(--border, 240 6% 90%));
|
|
325
|
+
border-radius: 0.375rem;
|
|
326
|
+
background: hsl(var(--background, 0 0% 100%));
|
|
327
|
+
color: inherit;
|
|
328
|
+
font: inherit;
|
|
329
|
+
font-size: 0.8125rem;
|
|
330
|
+
cursor: pointer;
|
|
331
|
+
}
|
|
332
|
+
.matrx-alchemy-workspace button:hover {
|
|
333
|
+
background: hsl(var(--accent, 240 5% 96%));
|
|
334
|
+
}
|
|
335
|
+
.matrx-alchemy-workspace button:disabled {
|
|
336
|
+
opacity: 0.5;
|
|
337
|
+
cursor: not-allowed;
|
|
338
|
+
}
|
|
339
|
+
.matrx-alchemy-workspace button:focus-visible,
|
|
340
|
+
.matrx-alchemy-workspace :is(input, textarea, select):focus-visible {
|
|
341
|
+
outline: 2px solid hsl(var(--ring, 240 5% 65%));
|
|
342
|
+
outline-offset: 2px;
|
|
343
|
+
}
|
|
344
|
+
.matrx-alchemy-workspace [data-slot="dialog-close"] {
|
|
345
|
+
position: absolute;
|
|
346
|
+
top: 0.5rem;
|
|
347
|
+
right: 0.5rem;
|
|
348
|
+
width: 2.5rem;
|
|
349
|
+
height: 2.5rem;
|
|
350
|
+
padding: 0.5rem;
|
|
351
|
+
border: 0;
|
|
352
|
+
background: transparent;
|
|
353
|
+
}
|
|
354
|
+
.matrx-alchemy-workspace [data-slot="dialog-close"] svg {
|
|
355
|
+
width: 1rem;
|
|
356
|
+
height: 1rem;
|
|
357
|
+
}
|
|
358
|
+
.matrx-alchemy-workspace [data-slot="dialog-close"] .sr-only {
|
|
359
|
+
position: absolute;
|
|
360
|
+
width: 1px;
|
|
361
|
+
height: 1px;
|
|
362
|
+
padding: 0;
|
|
363
|
+
overflow: hidden;
|
|
364
|
+
clip: rect(0, 0, 0, 0);
|
|
365
|
+
white-space: nowrap;
|
|
366
|
+
}
|
|
367
|
+
@media (max-width: 767px) {
|
|
368
|
+
.matrx-alchemy-workspace {
|
|
369
|
+
top: auto;
|
|
370
|
+
bottom: 0;
|
|
371
|
+
left: 0;
|
|
372
|
+
translate: none;
|
|
373
|
+
width: 100%;
|
|
374
|
+
max-width: 100%;
|
|
375
|
+
max-height: 92dvh;
|
|
376
|
+
padding: 1rem 1rem max(1rem, env(safe-area-inset-bottom));
|
|
377
|
+
border-radius: 0.75rem 0.75rem 0 0;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.matrx-alchemy-menu *, .matrx-alchemy-workspace * { box-sizing: border-box; }
|
|
382
|
+
.matrx-alchemy-workspace-grid:not(:has(aside)) { grid-template-columns: minmax(0, 1fr); }
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { AgentPayloadInput, TransferOutcome, TransferCapabilities, Transport, PageAction, TransferPreferenceOverrides, Source, Payload, ExportProjection, Section, SurfaceHandle, TransferScope } from '@ai-matrx/kit/content-transfer';
|
|
3
|
+
export { ALCHEMY_GLYPH_SVG } from './content-transfer/icon.cjs';
|
|
4
|
+
|
|
5
|
+
type AlchemyOptionValues = Record<string, boolean | number>;
|
|
6
|
+
type AlchemySourceOption = {
|
|
7
|
+
kind: "toggle";
|
|
8
|
+
key: string;
|
|
9
|
+
label: string;
|
|
10
|
+
hint?: string;
|
|
11
|
+
default: boolean;
|
|
12
|
+
} | {
|
|
13
|
+
kind: "preset";
|
|
14
|
+
key: string;
|
|
15
|
+
label: string;
|
|
16
|
+
options: {
|
|
17
|
+
label: string;
|
|
18
|
+
value: number;
|
|
19
|
+
}[];
|
|
20
|
+
default: number;
|
|
21
|
+
} | {
|
|
22
|
+
kind: "slider";
|
|
23
|
+
key: string;
|
|
24
|
+
label: string;
|
|
25
|
+
hint?: string;
|
|
26
|
+
stops: number[];
|
|
27
|
+
default: number;
|
|
28
|
+
formatValue: (value: number) => string;
|
|
29
|
+
} | {
|
|
30
|
+
kind: "number";
|
|
31
|
+
key: string;
|
|
32
|
+
label: string;
|
|
33
|
+
hint?: string;
|
|
34
|
+
min?: number;
|
|
35
|
+
step?: number;
|
|
36
|
+
presets?: {
|
|
37
|
+
label: string;
|
|
38
|
+
value: number;
|
|
39
|
+
}[];
|
|
40
|
+
default: number;
|
|
41
|
+
};
|
|
42
|
+
interface AlchemyCustomSource {
|
|
43
|
+
label?: string;
|
|
44
|
+
hint?: string;
|
|
45
|
+
options: AlchemySourceOption[];
|
|
46
|
+
build(values: AlchemyOptionValues): {
|
|
47
|
+
text: string;
|
|
48
|
+
meta?: Record<string, string | number | boolean | undefined>;
|
|
49
|
+
};
|
|
50
|
+
wrap(text: string, values: AlchemyOptionValues, meta?: Record<string, string | number | boolean | undefined>): AgentPayloadInput;
|
|
51
|
+
dialogTitle?: string;
|
|
52
|
+
dialogDescription?: string;
|
|
53
|
+
}
|
|
54
|
+
type AlchemyDetail = "full" | "compact" | "brief";
|
|
55
|
+
interface AlchemyGroomerSection {
|
|
56
|
+
id: string;
|
|
57
|
+
title: string;
|
|
58
|
+
description?: string;
|
|
59
|
+
cuttable?: boolean;
|
|
60
|
+
levelLabels?: Partial<Record<AlchemyDetail, string>>;
|
|
61
|
+
build(level: AlchemyDetail): unknown;
|
|
62
|
+
defaultSelection?: AlchemyDetail | "off";
|
|
63
|
+
}
|
|
64
|
+
interface AlchemyGroomerConfig {
|
|
65
|
+
label: string;
|
|
66
|
+
kind: string;
|
|
67
|
+
location: string;
|
|
68
|
+
description: string;
|
|
69
|
+
attributes?: AgentPayloadInput["attributes"];
|
|
70
|
+
context?: AgentPayloadInput["context"];
|
|
71
|
+
summary?: string;
|
|
72
|
+
sections: AlchemyGroomerSection[];
|
|
73
|
+
}
|
|
74
|
+
interface AlchemyCopyVariant {
|
|
75
|
+
id: string;
|
|
76
|
+
label: string;
|
|
77
|
+
hint?: string;
|
|
78
|
+
icon?: React.ComponentType<{
|
|
79
|
+
className?: string;
|
|
80
|
+
}>;
|
|
81
|
+
section?: "copy" | "ai";
|
|
82
|
+
ariaLabel?: string;
|
|
83
|
+
successMessage?: string;
|
|
84
|
+
build?: () => AgentPayloadInput | string | Promise<AgentPayloadInput | string>;
|
|
85
|
+
onSelect?: () => void | Promise<void>;
|
|
86
|
+
modal?: (props: {
|
|
87
|
+
open: boolean;
|
|
88
|
+
onOpenChange: (open: boolean) => void;
|
|
89
|
+
}) => React.ReactNode;
|
|
90
|
+
}
|
|
91
|
+
interface AlchemyExportItem {
|
|
92
|
+
id: string;
|
|
93
|
+
label: string;
|
|
94
|
+
build?: () => {
|
|
95
|
+
content: BlobPart;
|
|
96
|
+
extension: string;
|
|
97
|
+
mime: string;
|
|
98
|
+
};
|
|
99
|
+
onSelect?: () => void | Promise<void>;
|
|
100
|
+
}
|
|
101
|
+
type Resolvable<T> = T | (() => T);
|
|
102
|
+
interface MatrxCopyMenuProps {
|
|
103
|
+
label: string;
|
|
104
|
+
/** Stable record identity when this mounted control can switch between records. */
|
|
105
|
+
sourceId?: string;
|
|
106
|
+
human?: Resolvable<string>;
|
|
107
|
+
json?: Resolvable<unknown>;
|
|
108
|
+
agent?: Resolvable<AgentPayloadInput | string>;
|
|
109
|
+
aiVariants?: AlchemyCopyVariant[];
|
|
110
|
+
aiCustom?: AlchemyCustomSource;
|
|
111
|
+
groomer?: () => AlchemyGroomerConfig;
|
|
112
|
+
agentVariant?: {
|
|
113
|
+
id?: string;
|
|
114
|
+
label?: string;
|
|
115
|
+
hint?: string;
|
|
116
|
+
position?: "first" | "last";
|
|
117
|
+
};
|
|
118
|
+
export?: {
|
|
119
|
+
items: AlchemyExportItem[];
|
|
120
|
+
sheetRows?: () => Array<Record<string, unknown>>;
|
|
121
|
+
};
|
|
122
|
+
/** Host-owned authenticated destination, not a second export serializer. */
|
|
123
|
+
sendToSheet?: (rows: Array<Record<string, unknown>>, label: string) => Promise<TransferOutcome>;
|
|
124
|
+
hide?: Array<"copy" | "ai" | "export">;
|
|
125
|
+
disabled?: boolean;
|
|
126
|
+
className?: string;
|
|
127
|
+
stopPropagation?: boolean;
|
|
128
|
+
size?: "xs" | "icon" | "sm";
|
|
129
|
+
appearance?: "bare" | "segmented";
|
|
130
|
+
unified?: boolean;
|
|
131
|
+
grouped?: boolean;
|
|
132
|
+
}
|
|
133
|
+
/** Opinionated bridge for Matrx's existing content builders, with one transfer UI. */
|
|
134
|
+
declare function MatrxCopyMenu(props: MatrxCopyMenuProps): React.JSX.Element;
|
|
135
|
+
type AlchemyGroomerPreset = "everything" | "balanced" | "minimal";
|
|
136
|
+
declare const GROOMER_LEVELS: AlchemyDetail[];
|
|
137
|
+
declare function applyGroomerPreset(preset: AlchemyGroomerPreset, sections: AlchemyGroomerSection[]): Record<string, AlchemyDetail | "off">;
|
|
138
|
+
declare function defaultGroomerSelections(sections: AlchemyGroomerSection[]): Record<string, AlchemyDetail | "off">;
|
|
139
|
+
declare function buildGroomerPresetPayload(config: AlchemyGroomerConfig, preset: AlchemyGroomerPreset): AgentPayloadInput;
|
|
140
|
+
declare function groomerPresetVariants(getConfig: () => AlchemyGroomerConfig): AlchemyCopyVariant[];
|
|
141
|
+
|
|
142
|
+
declare function AlchemyGlyph(props: React.SVGAttributes<SVGSVGElement>): React.JSX.Element;
|
|
143
|
+
type ContentTransferCapabilities = TransferCapabilities & {
|
|
144
|
+
transport?: Transport;
|
|
145
|
+
actions?: PageAction[];
|
|
146
|
+
preferences?: TransferPreferenceOverrides;
|
|
147
|
+
onOutcome?: (outcome: TransferOutcome) => void;
|
|
148
|
+
};
|
|
149
|
+
declare function ContentTransferCapabilitiesProvider({ value, children }: {
|
|
150
|
+
value: ContentTransferCapabilities;
|
|
151
|
+
children: React.ReactNode;
|
|
152
|
+
}): React.JSX.Element;
|
|
153
|
+
declare const useContentTransferCapabilities: () => ContentTransferCapabilities;
|
|
154
|
+
declare function ContentTransferSurfaceProvider({ handle, children }: {
|
|
155
|
+
handle: SurfaceHandle;
|
|
156
|
+
children: React.ReactNode;
|
|
157
|
+
}): React.JSX.Element;
|
|
158
|
+
declare const useContentTransferSurface: () => SurfaceHandle | null;
|
|
159
|
+
type SerializableFormat = "plain" | "markdown" | "html" | "json" | "compact-json" | "csv" | "tsv";
|
|
160
|
+
interface TransferMenuPresentation {
|
|
161
|
+
hint?: string;
|
|
162
|
+
icon?: React.ComponentType<{
|
|
163
|
+
className?: string;
|
|
164
|
+
}>;
|
|
165
|
+
ariaLabel?: string;
|
|
166
|
+
}
|
|
167
|
+
interface TransferMenuVariant extends TransferMenuPresentation {
|
|
168
|
+
id: string;
|
|
169
|
+
label: string;
|
|
170
|
+
source: Source | Payload;
|
|
171
|
+
copyLabel?: string;
|
|
172
|
+
section?: "copy" | "ai";
|
|
173
|
+
successMessage?: string;
|
|
174
|
+
}
|
|
175
|
+
interface ContentTransferMenuProps {
|
|
176
|
+
source?: Payload | Source;
|
|
177
|
+
projection?: ExportProjection;
|
|
178
|
+
sections?: Section[];
|
|
179
|
+
preferences?: TransferPreferenceOverrides;
|
|
180
|
+
enabled?: boolean;
|
|
181
|
+
surface?: SurfaceHandle;
|
|
182
|
+
label?: string;
|
|
183
|
+
table?: {
|
|
184
|
+
availableScopes: TransferScope[];
|
|
185
|
+
initialScope: TransferScope;
|
|
186
|
+
};
|
|
187
|
+
/** A quick format may explicitly capture a different representation. */
|
|
188
|
+
formatSources?: Partial<Record<SerializableFormat, Source | Payload>>;
|
|
189
|
+
/** Named alternate sources open this same preparation workspace. */
|
|
190
|
+
variants?: readonly TransferMenuVariant[];
|
|
191
|
+
actions?: (PageAction & TransferMenuPresentation)[];
|
|
192
|
+
capabilities?: ContentTransferCapabilities;
|
|
193
|
+
disabled?: boolean;
|
|
194
|
+
className?: string;
|
|
195
|
+
stopPropagation?: boolean;
|
|
196
|
+
hide?: readonly ("copy" | "prepare" | "download")[];
|
|
197
|
+
controllerRef?: React.Ref<ContentTransferController>;
|
|
198
|
+
}
|
|
199
|
+
interface ContentTransferController {
|
|
200
|
+
focusTrigger(): void;
|
|
201
|
+
prepare(source: Source | Payload, options?: {
|
|
202
|
+
id?: string;
|
|
203
|
+
label?: string;
|
|
204
|
+
}): Promise<void>;
|
|
205
|
+
}
|
|
206
|
+
declare function ContentTransferMenu({ source, surface, label, projection, sections, preferences, table, formatSources, variants, actions, capabilities: local, disabled, enabled, className, stopPropagation, hide, controllerRef }: ContentTransferMenuProps): React.JSX.Element | null;
|
|
207
|
+
|
|
208
|
+
export { type AlchemyCopyVariant, type AlchemyCustomSource, type AlchemyDetail, type AlchemyExportItem, AlchemyGlyph, type AlchemyGroomerConfig, type AlchemyGroomerPreset, type AlchemyGroomerSection, type AlchemyOptionValues, type AlchemySourceOption, type ContentTransferCapabilities, ContentTransferCapabilitiesProvider, type ContentTransferController, ContentTransferMenu, type ContentTransferMenuProps, ContentTransferSurfaceProvider, GROOMER_LEVELS, MatrxCopyMenu, type MatrxCopyMenuProps, type SerializableFormat, type TransferMenuPresentation, type TransferMenuVariant, applyGroomerPreset, buildGroomerPresetPayload, defaultGroomerSelections, groomerPresetVariants, useContentTransferCapabilities, useContentTransferSurface };
|