@ai-matrx/alchemy 0.1.8 → 0.2.0

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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.0
4
+
5
+ Ships Portal as the default mark, Copy + Transform as an optional SVG/React variant, exact glass/transparent Tap Target controls, native AI-context copy and preparation recipes, and the Matrx destination workflow through /matrx.
6
+
7
+ ### Consumer action
8
+
9
+ Bind createMatrxTransferPorts to existing Matrx service/opening ports once at the authenticated application provider, then register createMatrxTransferActions with the shared capabilities. Pages supply only their source or mounted surface. Pass the capture identity when opening an assistant with initial text resources; never put captured source into the human composer or auto-run it.
10
+
3
11
  ## 0.1.8
4
12
 
5
13
  Automatic changed-only republish (docs/metadata drift since the last tag — see
package/README.md CHANGED
@@ -28,6 +28,21 @@ The transparent icon opens ordinary copy, Markdown, formatted HTML with plain-te
28
28
 
29
29
  Preparation supports editable drafts, detail presets, structural reductions, omissions and undo. Supplying table rows adds relevant spreadsheet formats; registered exporters and page actions retain the same captured-source boundary. An absent AI provider leaves manual preparation available without showing dead AI controls.
30
30
 
31
+ ## Portal and Tap Target
32
+
33
+ Portal is the default mark in every Matrx host. The trigger is the actual Tap Target primitive: 44px hit area, 28px visual pill and 14px glyph. Use `triggerVariant="glass"` in headers and `triggerVariant="transparent"` for content actions. `icon="copy-transform"` is an optional package variant; both marks ship as SVG assets. Future host marks extend this typed icon set rather than replacing the trigger or adding page CSS.
34
+
35
+ ```tsx
36
+ import { ContentTransferMenu } from "@ai-matrx/alchemy/react";
37
+
38
+ <ContentTransferMenu source={{ kind: "markdown", text: content }} />
39
+ <ContentTransferMenu source={{ kind: "text", text: title }} triggerVariant="glass" />
40
+ // Inside a mounted ContentTransferSurfaceProvider, no source prop is needed:
41
+ <ContentTransferMenu />
42
+ ```
43
+
44
+ Even a plain source has format copy/download, a source-labelled AI context envelope, manual editing, detail/character limits, and undo. The authenticated host adds six AI preparation recipes and the available Matrx destinations. Table sources add selection, filtering, sorting, column choice, row limits, CSV/TSV and Excel. A manually edited draft is the content sent to destinations; actions incompatible with its new shape disappear.
45
+
31
46
  ## Extend the shared menu
32
47
 
33
48
  The Copy/Download selector uses one format palette. Additional formats use the same tiles; quick copy, preparation, alternate context, and page operations use shared groups. Supply capabilities and descriptors rather than rendering another menu.
@@ -44,6 +59,10 @@ Labels and hints wrap within the shared geometry. Preserve stable IDs, eligibili
44
59
 
45
60
  `MatrxContentTransferProvider` from `@ai-matrx/alchemy/matrx/react` accepts the canonical transport, authenticated database read port, current organization getter and source application. It supplies the declared durable AI preparation job to descendant menus. The host supplies identity and its existing live-run renderer; the package owns preparation, cancellation, exact request recovery and provenance. Mount the provider at an identity boundary so changing user or organization cannot reuse another identity’s prepared run.
46
61
 
62
+ The `/matrx` entry also ships `createMatrxTransferPorts(bindings)` and `createMatrxTransferActions(ports)`. Bind existing Notes, Documents, Workbooks, task, attachment, Code and chat openers once. Register the returned actions through the provider's `capabilities.actions`. Menus inherit Save to Matrx and Continue with AI groups; no page callback or styling is necessary. `createMatrxTransferActions` also accepts a partial port set for hosts that expose fewer destinations. The package owns serialization, capture identity checks, saved-item receipts and retry deduplication.
63
+
64
+ Openers report that an editor was opened, not that the item was saved. Save-and-attach preserves the created note if the destination picker fails. New-chat/window handoffs attach captured content as a text resource, leave the human composer empty and never auto-run. Connected tools are selected through the existing assistant Chat Options picker; this is not an automatic MCP invocation.
65
+
47
66
  For an exact mounted declared surface, use `createSurfaceTransferHandle` from `/core` and `ContentTransferSurfaceProvider` from `/react`. Bind its scope getter and mounted predicate to that instance. Never look up a same-named surface globally. Standard Matrx tables include shared row and toolbar controls by default; `copy={false}` opts out. Custom tables can use the lower-level `ContentTransferMenu` source/table contract.
48
67
 
49
68
  ## Framework-neutral use
@@ -62,9 +81,9 @@ const artifact = serialize(createDraft(snapshot), "plain");
62
81
  |---|---|
63
82
  | `/core` (also package root) | Capture, projection, preparation, serializers, artifacts and transport. |
64
83
  | `/react` | `AlchemyMenu`, lower-level `ContentTransferMenu`, surface/provider bindings and React glyph. |
65
- | `/matrx` | Durable Matrx AI preparation adapter. |
84
+ | `/matrx` | Durable AI preparation and the standard Matrx destination catalog/workflow. |
66
85
  | `/matrx/react` | React bindings for that adapter. |
67
86
  | `/styles.css` | Self-contained menu and workspace styling. |
68
- | `/alchemy.svg` | The standalone glyph asset. |
87
+ | `/alchemy.svg`, `/portal.svg`, `/copy-transform.svg` | Packaged icon assets; Portal is default. |
69
88
 
70
- The registry installation canary requires the sibling kit, design-system and agents releases first. Each distribution release copies the canonical design-system stylesheet and SVG at build time.
89
+ The registry installation canary requires the sibling kit, design-system and agents releases first. Stylesheets import the canonical design-system styling; SVG assets are copied from their one source at build time.
package/dist/alchemy.svg CHANGED
@@ -1 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M9 3h6"/><path d="M10 3v6l-5.2 8.7A2 2 0 0 0 6.5 21h11a2 2 0 0 0 1.7-3.3L14 9V3"/><path d="M8 15h8"/></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M10 4H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h4M14 4h4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-4M8 12h8m-3-3 3 3-3 3"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M8 7V5a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v8M13 21H5a2 2 0 0 1-2-2V10a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v3m-5 4h11m-3-3 3 3-3 3"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M10 4H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h4M14 4h4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-4M8 12h8m-3-3 3 3-3 3"/></svg>
package/dist/styles.css CHANGED
@@ -1,485 +1 @@
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-palette {
40
- width: min(18rem, calc(100vw - 2rem));
41
- min-width: 0;
42
- padding: 0.4375rem;
43
- max-height: var(--radix-popover-content-available-height, 80dvh);
44
- }
45
- .matrx-alchemy-output {
46
- display: grid;
47
- gap: 0.375rem;
48
- padding: 0.375rem;
49
- border: 1px solid hsl(var(--border, 240 6% 90%));
50
- border-radius: 0.5rem;
51
- }
52
- .matrx-alchemy-output > h3 {
53
- margin: 0.125rem 0.125rem 0;
54
- color: hsl(var(--muted-foreground, 240 4% 46%));
55
- font-size: 0.6875rem;
56
- font-weight: 600;
57
- letter-spacing: 0.04em;
58
- text-transform: uppercase;
59
- }
60
- .matrx-alchemy-mode {
61
- display: flex;
62
- gap: 0.1875rem;
63
- margin-bottom: 0.375rem;
64
- padding: 0.1875rem;
65
- border-radius: 0.5rem;
66
- background: hsl(var(--muted, 240 5% 96%));
67
- }
68
- .matrx-alchemy-mode button {
69
- flex: 1;
70
- min-height: 2rem;
71
- border: 0;
72
- border-radius: 0.3125rem;
73
- background: transparent;
74
- color: inherit;
75
- font: inherit;
76
- font-size: 0.8125rem;
77
- cursor: pointer;
78
- }
79
- .matrx-alchemy-mode button[aria-pressed="true"] { background: hsl(var(--background, 0 0% 100%)); box-shadow: 0 1px 2px hsl(var(--foreground, 240 10% 4%) / 0.12); }
80
- .matrx-alchemy-palette-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.1875rem; }
81
- .matrx-alchemy-palette-tile { display: grid; place-items: center; gap: 0.375rem; min-width: 0; min-height: 4.25rem; padding: 0.5rem 0.25rem; border: 0; border-radius: 0.375rem; background: transparent; color: inherit; font: inherit; font-size: 0.75rem; line-height: 1.2; text-align: center; overflow-wrap: anywhere; cursor: pointer; }
82
- .matrx-alchemy-palette-glyph { width: 1.125rem; height: 1.125rem; color: hsl(var(--muted-foreground, 240 4% 46%)); flex: 0 0 auto; }
83
- .matrx-alchemy-palette-section { display: grid; gap: 0.125rem; margin-top: 0.375rem; padding-top: 0.375rem; border-top: 1px solid hsl(var(--border, 240 6% 90%)); }
84
- .matrx-alchemy-palette-section h3 { margin: 0.125rem 0.375rem; color: hsl(var(--muted-foreground, 240 4% 46%)); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
85
- .matrx-alchemy-palette-row { display: flex; align-items: center; gap: 0.5rem; width: 100%; min-height: 2rem; padding: 0.375rem 0.5rem; border: 0; border-radius: 0.3125rem; background: transparent; color: inherit; font: inherit; font-size: 0.8125rem; line-height: 1.25; text-align: left; overflow-wrap: anywhere; cursor: pointer; }
86
- .matrx-alchemy-palette-row > span { min-width: 0; }
87
- .matrx-alchemy-palette-row-ai { color: hsl(var(--primary, 262 43% 51%)); }
88
- .matrx-alchemy-palette :is(button:hover, button:focus-visible) { background: hsl(var(--accent, 240 5% 96%)); outline: none; }
89
- .matrx-alchemy-palette :is(button:focus-visible) { box-shadow: inset 0 0 0 2px hsl(var(--ring, 240 5% 65%)); }
90
- .matrx-alchemy-palette-status { margin: 0.25rem 0.375rem; color: hsl(var(--muted-foreground, 240 4% 46%)); font-size: 0.75rem; }
91
- .matrx-alchemy-notice,
92
- .matrx-alchemy-meta {
93
- font-size: 0.75rem;
94
- color: hsl(var(--muted-foreground, 240 4% 46%));
95
- }
96
- .matrx-alchemy-workspace {
97
- max-height: min(90dvh, 48rem);
98
- overflow: hidden;
99
- grid-template-rows: auto minmax(0, 1fr) auto;
100
- }
101
- .matrx-alchemy-workspace-grid {
102
- display: grid;
103
- grid-template-columns: minmax(0, 2fr) minmax(12rem, 1fr);
104
- gap: 1rem;
105
- min-height: 0;
106
- }
107
- .matrx-alchemy-workspace-body {
108
- min-height: 0;
109
- overflow: auto;
110
- overscroll-behavior: contain;
111
- padding: 0.25rem;
112
- }
113
- .matrx-alchemy-main {
114
- display: grid;
115
- align-content: start;
116
- gap: 0.75rem;
117
- min-width: 0;
118
- }
119
- .matrx-alchemy-toolbar {
120
- display: flex;
121
- flex-wrap: wrap;
122
- gap: 0.5rem;
123
- align-items: end;
124
- }
125
- .matrx-alchemy-toolbar label,
126
- .matrx-alchemy-preview-label,
127
- .matrx-alchemy-workspace aside label,
128
- .matrx-alchemy-options label {
129
- display: grid;
130
- gap: 0.25rem;
131
- font-size: 0.8125rem;
132
- }
133
- .matrx-alchemy-toolbar input,
134
- .matrx-alchemy-toolbar select,
135
- .matrx-alchemy-preview-label select,
136
- .matrx-alchemy-workspace aside textarea,
137
- .matrx-alchemy-options input {
138
- min-height: 2.25rem;
139
- border: 1px solid hsl(var(--border, 240 6% 90%));
140
- border-radius: 0.25rem;
141
- background: hsl(var(--background, 0 0% 100%));
142
- color: inherit;
143
- padding: 0.35rem 0.5rem;
144
- }
145
- .matrx-alchemy-options {
146
- display: grid;
147
- gap: 0.5rem;
148
- max-height: 13rem;
149
- overflow: auto;
150
- border: 1px solid hsl(var(--border, 240 6% 90%));
151
- border-radius: 0.375rem;
152
- padding: 0.625rem;
153
- }
154
- .matrx-alchemy-options > fieldset {
155
- display: grid;
156
- gap: 0.5rem;
157
- min-width: 0;
158
- margin: 0.625rem 0 0;
159
- padding: 0;
160
- border: 0;
161
- }
162
- .matrx-alchemy-options summary { cursor: pointer; }
163
- .matrx-alchemy-options legend {
164
- padding: 0 0.25rem;
165
- font-size: 0.8125rem;
166
- font-weight: 600;
167
- }
168
- .matrx-alchemy-column {
169
- display: grid;
170
- grid-template-columns: minmax(8rem, 1fr) minmax(8rem, 1fr);
171
- gap: 0.5rem;
172
- align-items: end;
173
- }
174
- .matrx-alchemy-row-list {
175
- display: grid;
176
- gap: 0.375rem;
177
- max-height: 9rem;
178
- overflow: auto;
179
- padding: 0.25rem;
180
- }
181
- .matrx-alchemy-row-list label {
182
- display: block;
183
- overflow: hidden;
184
- text-overflow: ellipsis;
185
- white-space: nowrap;
186
- }
187
- .matrx-alchemy-coverage {
188
- display: grid;
189
- gap: 0.25rem;
190
- font-size: 0.75rem;
191
- color: hsl(var(--muted-foreground, 240 4% 46%));
192
- }
193
- .matrx-alchemy-coverage details {
194
- max-height: 8rem;
195
- overflow: auto;
196
- }
197
- .matrx-alchemy-coverage ul {
198
- margin: 0.35rem 0 0;
199
- padding-left: 1.25rem;
200
- }
201
- .matrx-alchemy-preview {
202
- display: block;
203
- width: 100%;
204
- min-height: 16rem;
205
- padding: 0.75rem;
206
- border: 1px solid hsl(var(--border, 240 6% 90%));
207
- border-radius: 0.375rem;
208
- background: hsl(var(--muted, 240 5% 96%));
209
- color: inherit;
210
- font:
211
- 12px/1.45 ui-monospace,
212
- SFMono-Regular,
213
- Menlo,
214
- monospace;
215
- resize: vertical;
216
- }
217
- .matrx-alchemy-preview[aria-invalid="true"] {
218
- border-color: hsl(var(--destructive, 0 84% 60%));
219
- }
220
- .matrx-alchemy-workspace aside {
221
- display: grid;
222
- align-content: start;
223
- gap: 0.75rem;
224
- }
225
- .matrx-alchemy-workspace aside textarea {
226
- min-height: 8rem;
227
- resize: vertical;
228
- }
229
- .matrx-alchemy-decision {
230
- display: flex;
231
- flex-wrap: wrap;
232
- align-items: center;
233
- gap: 0.5rem;
234
- padding: 0.75rem;
235
- border: 1px solid hsl(var(--border, 240 6% 90%));
236
- border-radius: 0.375rem;
237
- background: hsl(var(--muted, 240 5% 96%));
238
- }
239
- .matrx-alchemy-decision p {
240
- flex: 1 1 16rem;
241
- margin: 0;
242
- }
243
- .matrx-alchemy-error {
244
- font-size: 0.8125rem;
245
- color: hsl(var(--destructive, 0 84% 60%));
246
- }
247
- @media (max-width: 640px) {
248
- .matrx-alchemy-workspace-grid {
249
- grid-template-columns: 1fr;
250
- }
251
- .matrx-alchemy-preview {
252
- min-height: 14rem;
253
- }
254
- .matrx-alchemy-column {
255
- grid-template-columns: 1fr;
256
- }
257
- }
258
-
259
- .matrx-alchemy-xs .matrx-alchemy-trigger {
260
- width: 1.75rem;
261
- height: 1.75rem;
262
- padding: 0.375rem;
263
- }
264
- .matrx-alchemy-xs .matrx-alchemy-trigger svg {
265
- width: 1rem;
266
- height: 1rem;
267
- }
268
- .matrx-alchemy-sm .matrx-alchemy-trigger {
269
- width: 2.25rem;
270
- height: 2.25rem;
271
- }
272
- @media (pointer: coarse) {
273
- .matrx-alchemy .matrx-alchemy-trigger {
274
- width: 2.75rem;
275
- height: 2.75rem;
276
- padding: 0.625rem;
277
- }
278
- .matrx-alchemy-workspace input,
279
- .matrx-alchemy-workspace select,
280
- .matrx-alchemy-workspace textarea {
281
- font-size: max(1rem, 1em);
282
- }
283
- }
284
-
285
- .matrx-alchemy-menu-icon {
286
- width: 1rem;
287
- height: 1rem;
288
- flex-shrink: 0;
289
- }
290
- .matrx-alchemy-menu-hint {
291
- display: block;
292
- color: hsl(var(--muted-foreground, 240 4% 46%));
293
- font-size: 0.75rem;
294
- }
295
-
296
- /* Primitive chrome is scoped here so a plain React consumer needs no Tailwind build. */
297
- .matrx-alchemy-menu,
298
- .matrx-alchemy-workspace {
299
- box-sizing: border-box;
300
- font-family: inherit;
301
- color: hsl(var(--foreground, 240 10% 4%));
302
- background: hsl(var(--background, 0 0% 100%));
303
- border: 1px solid hsl(var(--border, 240 6% 90%));
304
- border-radius: 0.5rem;
305
- box-shadow: 0 8px 28px hsl(var(--foreground, 240 10% 4%) / 0.12);
306
- }
307
- .matrx-alchemy-menu {
308
- z-index: 10001;
309
- padding: 0.4375rem;
310
- max-height: var(--radix-popover-content-available-height, 80dvh);
311
- overflow: auto;
312
- overscroll-behavior: contain;
313
- border-radius: 0.75rem;
314
- }
315
- @media (pointer: coarse) {
316
- .matrx-alchemy-palette :is(.matrx-alchemy-mode button, .matrx-alchemy-palette-row) { min-height: 2.75rem; }
317
- .matrx-alchemy-palette-tile { min-height: 4.5rem; }
318
- }
319
- .matrx-alchemy-workspace {
320
- position: fixed;
321
- z-index: 10001;
322
- inset: 0;
323
- margin: auto;
324
- translate: none;
325
- height: fit-content;
326
- width: min(48rem, calc(100vw - 2rem));
327
- max-width: calc(100vw - 2rem);
328
- padding: 1rem;
329
- display: grid;
330
- gap: 0.75rem;
331
- }
332
- [data-slot="dialog-overlay"]:has(+ .matrx-alchemy-workspace) {
333
- position: fixed;
334
- inset: 0;
335
- z-index: 10000;
336
- background: hsl(var(--foreground, 240 10% 4%) / 0.18);
337
- }
338
- .matrx-alchemy-workspace [data-slot="dialog-header"] {
339
- display: grid;
340
- gap: 0.375rem;
341
- padding-right: 2.25rem;
342
- }
343
- .matrx-alchemy-workspace [data-slot="dialog-title"] {
344
- margin: 0;
345
- font-size: 1.125rem;
346
- font-weight: 600;
347
- }
348
- .matrx-alchemy-workspace [data-slot="dialog-description"] {
349
- margin: 0;
350
- font-size: 0.875rem;
351
- color: hsl(var(--muted-foreground, 240 4% 46%));
352
- }
353
- .matrx-alchemy-workspace [data-slot="dialog-footer"] {
354
- display: flex;
355
- flex-direction: row;
356
- flex-wrap: wrap;
357
- justify-content: flex-end;
358
- gap: 0.5rem;
359
- align-items: center;
360
- }
361
- .matrx-alchemy-workspace-secondary,
362
- .matrx-alchemy-workspace-primary {
363
- display: inline-flex;
364
- align-items: center;
365
- justify-content: center;
366
- min-height: 2rem;
367
- padding: 0.375rem 0.75rem;
368
- border-radius: 0.375rem;
369
- cursor: pointer;
370
- font: inherit;
371
- font-size: 0.8125rem;
372
- }
373
- .matrx-alchemy-workspace-secondary {
374
- border: 1px solid hsl(var(--border, 240 6% 90%));
375
- background: hsl(var(--background, 0 0% 100%));
376
- color: hsl(var(--foreground, 240 10% 4%));
377
- }
378
- .matrx-alchemy-workspace-primary {
379
- border: 1px solid hsl(var(--primary, 262 43% 51%));
380
- background: hsl(var(--primary, 262 43% 51%));
381
- color: hsl(var(--primary-foreground, 0 0% 100%));
382
- }
383
- .matrx-alchemy-workspace :is(.matrx-alchemy-workspace-secondary, .matrx-alchemy-workspace-primary):disabled { opacity: 0.5; cursor: not-allowed; }
384
- .matrx-alchemy-workspace-secondary:hover { background: hsl(var(--accent, 240 5% 96%)); }
385
- .matrx-alchemy-workspace-primary:hover { filter: brightness(0.96); }
386
- .matrx-alchemy-configuration {
387
- width: min(40rem, calc(100vw - 2rem));
388
- max-height: min(90dvh, 42rem);
389
- overflow: hidden;
390
- }
391
- .matrx-alchemy-workspace button:focus-visible,
392
- .matrx-alchemy-workspace :is(input, textarea, select):focus-visible {
393
- outline: 2px solid hsl(var(--ring, 240 5% 65%));
394
- outline-offset: 2px;
395
- }
396
- .matrx-alchemy-workspace [data-slot="dialog-close"] {
397
- position: absolute;
398
- top: 0.5rem;
399
- right: 0.5rem;
400
- width: 2.5rem;
401
- height: 2.5rem;
402
- padding: 0.5rem;
403
- border: 0;
404
- background: transparent;
405
- }
406
- .matrx-alchemy-workspace [data-slot="dialog-close"] svg {
407
- width: 1rem;
408
- height: 1rem;
409
- }
410
- .matrx-alchemy-workspace [data-slot="dialog-close"] .sr-only {
411
- position: absolute;
412
- width: 1px;
413
- height: 1px;
414
- padding: 0;
415
- overflow: hidden;
416
- clip: rect(0, 0, 0, 0);
417
- white-space: nowrap;
418
- }
419
- @media (max-width: 767px) {
420
- .matrx-alchemy-workspace [data-slot="dialog-footer"] > .matrx-alchemy-meta {
421
- flex-basis: 100%;
422
- text-align: right;
423
- }
424
- .matrx-alchemy-workspace {
425
- inset: auto 0 0;
426
- width: 100%;
427
- max-width: 100%;
428
- max-height: 92dvh;
429
- padding: 1rem 1rem max(1rem, env(safe-area-inset-bottom));
430
- border-radius: 0.75rem 0.75rem 0 0;
431
- }
432
- }
433
-
434
- .matrx-alchemy-menu *, .matrx-alchemy-workspace * { box-sizing: border-box; }
435
- .matrx-alchemy-workspace-grid:not(:has(aside)) { grid-template-columns: minmax(0, 1fr); }
436
-
437
- /* Table toolbar matches the canonical tap-target 44 / 28 / 14 geometry.
438
- tap-target depends on design-system, so this primitive cannot import it. */
439
- .matrx-alchemy-toolbar-target .matrx-alchemy-trigger {
440
- position: relative;
441
- flex-shrink: 0;
442
- width: 2.75rem;
443
- height: 2.75rem;
444
- background: transparent;
445
- touch-action: manipulation;
446
- }
447
- .matrx-alchemy-toolbar-target .matrx-alchemy-trigger::before {
448
- content: "";
449
- position: absolute;
450
- width: 1.75rem;
451
- height: 1.75rem;
452
- border-radius: 9999px;
453
- transition: background-color 150ms ease, transform 100ms ease;
454
- }
455
- .matrx-alchemy-toolbar-target .matrx-alchemy-trigger:hover::before {
456
- background: hsl(var(--accent, 240 5% 96%));
457
- }
458
- .matrx-alchemy-toolbar-target .matrx-alchemy-trigger:active::before { transform: scale(0.92); }
459
- .matrx-alchemy-toolbar-target .matrx-alchemy-trigger svg {
460
- position: relative;
461
- width: 0.875rem;
462
- height: 0.875rem;
463
- }
464
-
465
- .matrx-alchemy-data-controls { max-height: none; }
466
- .matrx-alchemy-data-controls-body { display: grid; gap: 0.75rem; margin-top: 0.75rem; }
467
- .matrx-alchemy-preview-label { display: flex; align-items: center; gap: 0.5rem; }
468
- .matrx-alchemy-preview-label select { width: auto; min-width: 10rem; max-width: 100%; }
469
-
470
- /* Subset shaping uses the same dialog chrome without recursive transfer controls. */
471
- .matrx-alchemy-subset { width: min(48rem, calc(100vw - 2rem)); height: min(80dvh, 42rem); }
472
- .matrx-alchemy-subset-body { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 0.75rem; }
473
- .matrx-alchemy-subset-columns { max-height: 8rem; overflow: auto; margin: 0; padding: 0.25rem; border: 0; font-size: 0.8125rem; }
474
- .matrx-alchemy-subset-columns legend { font-weight: 500; }
475
- .matrx-alchemy-subset-table { min-height: 18rem; overflow: hidden; }
476
- .matrx-alchemy-subset-format { display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.8125rem; }
477
- .matrx-alchemy-subset-format select { min-height: 2rem; border: 1px solid hsl(var(--border)); border-radius: 0.375rem; background: hsl(var(--background)); color: inherit; padding: 0.25rem 0.5rem; }
478
- @media (max-width: 767px) { .matrx-alchemy-subset { width: 100%; } }
479
-
480
- .matrx-alchemy-feedback { position: fixed; z-index: 10002; bottom: max(1rem, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 0.75rem; width: max-content; max-width: calc(100vw - 2rem); padding: 0.5rem 0.75rem; border: 1px solid hsl(var(--border)); border-radius: 0.5rem; background: hsl(var(--background)); color: hsl(var(--foreground)); box-shadow: 0 4px 16px hsl(var(--foreground) / 0.12); font-size: 0.8125rem; }
481
- .matrx-alchemy-feedback button { flex-shrink: 0; width: 1.75rem; height: 1.75rem; border: 0; border-radius: 0.25rem; background: transparent; color: inherit; cursor: pointer; }
482
- .matrx-alchemy-feedback button:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: -2px; }
483
-
484
- /* Dialogs show their own result; an earlier page notice must not cover their actions. */
485
- body:has(.matrx-alchemy-workspace[data-state="open"]) > .matrx-alchemy-feedback { display: none; }
1
+ @import "@ai-matrx/design-system/styles.css";
@@ -0,0 +1 @@
1
+ @import "@ai-matrx/design-system/tap-target.css";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-matrx/alchemy",
3
- "version": "0.1.8",
3
+ "version": "0.2.0",
4
4
  "description": "Matrx Alchemy: the complete Matrx copy, prepare-for-AI, and export experience, with framework-neutral core, React menu, glyph, styles and Matrx integration.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -33,8 +33,9 @@
33
33
  "CHANGELOG.md"
34
34
  ],
35
35
  "matrxPublishInputs": [
36
- "../design-system/src/content-transfer.css",
37
- "../design-system/src/content-transfer/alchemy.svg"
36
+ "../design-system/src/content-transfer/alchemy.svg",
37
+ "../design-system/src/content-transfer/portal.svg",
38
+ "../design-system/src/content-transfer/copy-transform.svg"
38
39
  ],
39
40
  "exports": {
40
41
  ".": {
@@ -88,7 +89,10 @@
88
89
  }
89
90
  },
90
91
  "./styles.css": "./dist/styles.css",
92
+ "./tap-target.css": "./dist/tap-target.css",
91
93
  "./alchemy.svg": "./dist/alchemy.svg",
94
+ "./portal.svg": "./dist/portal.svg",
95
+ "./copy-transform.svg": "./dist/copy-transform.svg",
92
96
  "./package.json": "./package.json"
93
97
  },
94
98
  "peerDependencies": {