@ai-matrx/alchemy 0.1.2 → 0.1.4
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 +16 -0
- package/README.md +15 -3
- package/dist/alchemy.svg +1 -1
- package/dist/styles.css +130 -54
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.4
|
|
4
|
+
|
|
5
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
6
|
+
`git diff npm/alchemy/v0.1.3..npm/alchemy/v0.1.4 -- apps/shared/alchemy`).
|
|
7
|
+
No source changes intended and no consumer action required.
|
|
8
|
+
|
|
9
|
+
## 0.1.3 — 2026-09-12
|
|
10
|
+
|
|
11
|
+
Refreshes the distribution with the compact Alchemy format palette, its
|
|
12
|
+
distinct action glyphs, native popover activation, and the design-system
|
|
13
|
+
0.18.10 table and narrow-viewport Select corrections.
|
|
14
|
+
|
|
15
|
+
### Consumer action
|
|
16
|
+
|
|
17
|
+
Update to 0.1.3. No host configuration changes are required.
|
|
18
|
+
|
|
3
19
|
## 0.1.2
|
|
4
20
|
|
|
5
21
|
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @ai-matrx/alchemy
|
|
2
2
|
|
|
3
|
-
Alchemy is Matrx’s content-to-AI toolkit. **Alchemy Menu** is its small, reusable copy, preparation and export control. This distribution ships the
|
|
3
|
+
Alchemy is Matrx’s content-to-AI toolkit. **Alchemy Menu** is its small, reusable copy, preparation and export control. This distribution ships the shared core, React controls, Matrx service adapter, CSS and SVG; it contains no parallel implementation.
|
|
4
4
|
|
|
5
5
|
## One menu, ready to use
|
|
6
6
|
|
|
@@ -28,11 +28,23 @@ 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
|
+
## Extend the shared menu
|
|
32
|
+
|
|
33
|
+
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.
|
|
34
|
+
|
|
35
|
+
- Use `human`, `json`, and `agent` getters for different representations of the same content.
|
|
36
|
+
- Use `export.sheetRows` and `export.sheetColumns` for a table; spreadsheet formats become available automatically.
|
|
37
|
+
- Use `export.items[].build` for a custom file's bytes, MIME type, extension, and optional filename. It appears in Download. An `onSelect` callback takes precedence over `build` and remains a page action.
|
|
38
|
+
- Use `aiVariants` for alternate sources, `aiCustom` for source settings, and `groomer` for per-section detail. They enter the same preparation workspace.
|
|
39
|
+
- Use the lower-level `ContentTransferMenu` and its capability provider for format adapters and projected page actions. `sourceFormats={false}` suppresses source formats in a file/action-only control; an action's `placement: "download"` places a genuine download in the palette.
|
|
40
|
+
|
|
41
|
+
Labels and hints wrap within the shared geometry. Preserve stable IDs, eligibility checks, capture boundaries, and honest outcomes. Do not add per-page Copy/Download lists, bypass the shared transport, or restyle the menu for a particular integration.
|
|
42
|
+
|
|
31
43
|
## Integrate Matrx services once
|
|
32
44
|
|
|
33
45
|
`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.
|
|
34
46
|
|
|
35
|
-
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
|
|
47
|
+
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.
|
|
36
48
|
|
|
37
49
|
## Framework-neutral use
|
|
38
50
|
|
|
@@ -55,4 +67,4 @@ const artifact = serialize(createDraft(snapshot), "plain");
|
|
|
55
67
|
| `/styles.css` | Self-contained menu and workspace styling. |
|
|
56
68
|
| `/alchemy.svg` | The standalone glyph asset. |
|
|
57
69
|
|
|
58
|
-
|
|
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.
|
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="
|
|
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>
|
package/dist/styles.css
CHANGED
|
@@ -36,14 +36,67 @@
|
|
|
36
36
|
min-width: 18rem;
|
|
37
37
|
max-width: min(24rem, calc(100vw - 2rem));
|
|
38
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: 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; }
|
|
39
91
|
.matrx-alchemy-notice,
|
|
40
92
|
.matrx-alchemy-meta {
|
|
41
93
|
font-size: 0.75rem;
|
|
42
94
|
color: hsl(var(--muted-foreground, 240 4% 46%));
|
|
43
95
|
}
|
|
44
96
|
.matrx-alchemy-workspace {
|
|
45
|
-
max-height: min(90dvh,
|
|
46
|
-
overflow:
|
|
97
|
+
max-height: min(90dvh, 48rem);
|
|
98
|
+
overflow: hidden;
|
|
99
|
+
grid-template-rows: auto minmax(0, 1fr) auto;
|
|
47
100
|
}
|
|
48
101
|
.matrx-alchemy-workspace-grid {
|
|
49
102
|
display: grid;
|
|
@@ -51,8 +104,15 @@
|
|
|
51
104
|
gap: 1rem;
|
|
52
105
|
min-height: 0;
|
|
53
106
|
}
|
|
107
|
+
.matrx-alchemy-workspace-body {
|
|
108
|
+
min-height: 0;
|
|
109
|
+
overflow: auto;
|
|
110
|
+
overscroll-behavior: contain;
|
|
111
|
+
padding-right: 0.125rem;
|
|
112
|
+
}
|
|
54
113
|
.matrx-alchemy-main {
|
|
55
114
|
display: grid;
|
|
115
|
+
align-content: start;
|
|
56
116
|
gap: 0.75rem;
|
|
57
117
|
min-width: 0;
|
|
58
118
|
}
|
|
@@ -91,6 +151,15 @@
|
|
|
91
151
|
border-radius: 0.375rem;
|
|
92
152
|
padding: 0.625rem;
|
|
93
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; }
|
|
94
163
|
.matrx-alchemy-options legend {
|
|
95
164
|
padding: 0 0.25rem;
|
|
96
165
|
font-size: 0.8125rem;
|
|
@@ -237,50 +306,24 @@
|
|
|
237
306
|
}
|
|
238
307
|
.matrx-alchemy-menu {
|
|
239
308
|
z-index: 10001;
|
|
240
|
-
padding: 0.
|
|
241
|
-
max-height: var(--radix-
|
|
309
|
+
padding: 0.4375rem;
|
|
310
|
+
max-height: var(--radix-popover-content-available-height, 80dvh);
|
|
242
311
|
overflow: auto;
|
|
243
312
|
overscroll-behavior: contain;
|
|
313
|
+
border-radius: 0.75rem;
|
|
244
314
|
}
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
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%));
|
|
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; }
|
|
273
318
|
}
|
|
274
319
|
.matrx-alchemy-workspace {
|
|
275
320
|
position: fixed;
|
|
276
321
|
z-index: 10001;
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
translate: -50% -50%;
|
|
283
|
-
width: min(64rem, calc(100vw - 2rem));
|
|
322
|
+
inset: 0;
|
|
323
|
+
margin: auto;
|
|
324
|
+
translate: none;
|
|
325
|
+
height: fit-content;
|
|
326
|
+
width: min(56rem, calc(100vw - 2rem));
|
|
284
327
|
max-width: calc(100vw - 2rem);
|
|
285
328
|
padding: 1.5rem;
|
|
286
329
|
display: grid;
|
|
@@ -314,27 +357,35 @@
|
|
|
314
357
|
gap: 0.5rem;
|
|
315
358
|
align-items: center;
|
|
316
359
|
}
|
|
317
|
-
.matrx-alchemy-workspace
|
|
360
|
+
.matrx-alchemy-workspace-secondary,
|
|
361
|
+
.matrx-alchemy-workspace-primary {
|
|
318
362
|
display: inline-flex;
|
|
319
363
|
align-items: center;
|
|
320
364
|
justify-content: center;
|
|
321
|
-
gap: 0.375rem;
|
|
322
365
|
min-height: 2rem;
|
|
323
366
|
padding: 0.375rem 0.75rem;
|
|
324
|
-
border: 1px solid hsl(var(--border, 240 6% 90%));
|
|
325
367
|
border-radius: 0.375rem;
|
|
326
|
-
|
|
327
|
-
color: inherit;
|
|
368
|
+
cursor: pointer;
|
|
328
369
|
font: inherit;
|
|
329
370
|
font-size: 0.8125rem;
|
|
330
|
-
cursor: pointer;
|
|
331
371
|
}
|
|
332
|
-
.matrx-alchemy-workspace
|
|
333
|
-
|
|
372
|
+
.matrx-alchemy-workspace-secondary {
|
|
373
|
+
border: 1px solid hsl(var(--border, 240 6% 90%));
|
|
374
|
+
background: hsl(var(--background, 0 0% 100%));
|
|
375
|
+
color: hsl(var(--foreground, 240 10% 4%));
|
|
334
376
|
}
|
|
335
|
-
.matrx-alchemy-workspace
|
|
336
|
-
|
|
337
|
-
|
|
377
|
+
.matrx-alchemy-workspace-primary {
|
|
378
|
+
border: 1px solid hsl(var(--primary, 262 43% 51%));
|
|
379
|
+
background: hsl(var(--primary, 262 43% 51%));
|
|
380
|
+
color: hsl(var(--primary-foreground, 0 0% 100%));
|
|
381
|
+
}
|
|
382
|
+
.matrx-alchemy-workspace :is(.matrx-alchemy-workspace-secondary, .matrx-alchemy-workspace-primary):disabled { opacity: 0.5; cursor: not-allowed; }
|
|
383
|
+
.matrx-alchemy-workspace-secondary:hover { background: hsl(var(--accent, 240 5% 96%)); }
|
|
384
|
+
.matrx-alchemy-workspace-primary:hover { filter: brightness(0.96); }
|
|
385
|
+
.matrx-alchemy-configuration {
|
|
386
|
+
width: min(40rem, calc(100vw - 2rem));
|
|
387
|
+
max-height: min(90dvh, 42rem);
|
|
388
|
+
overflow: hidden;
|
|
338
389
|
}
|
|
339
390
|
.matrx-alchemy-workspace button:focus-visible,
|
|
340
391
|
.matrx-alchemy-workspace :is(input, textarea, select):focus-visible {
|
|
@@ -366,10 +417,7 @@
|
|
|
366
417
|
}
|
|
367
418
|
@media (max-width: 767px) {
|
|
368
419
|
.matrx-alchemy-workspace {
|
|
369
|
-
|
|
370
|
-
bottom: 0;
|
|
371
|
-
left: 0;
|
|
372
|
-
translate: none;
|
|
420
|
+
inset: auto 0 0;
|
|
373
421
|
width: 100%;
|
|
374
422
|
max-width: 100%;
|
|
375
423
|
max-height: 92dvh;
|
|
@@ -380,3 +428,31 @@
|
|
|
380
428
|
|
|
381
429
|
.matrx-alchemy-menu *, .matrx-alchemy-workspace * { box-sizing: border-box; }
|
|
382
430
|
.matrx-alchemy-workspace-grid:not(:has(aside)) { grid-template-columns: minmax(0, 1fr); }
|
|
431
|
+
|
|
432
|
+
/* Table toolbar matches the canonical tap-target 44 / 28 / 14 geometry.
|
|
433
|
+
tap-target depends on design-system, so this primitive cannot import it. */
|
|
434
|
+
.matrx-alchemy-toolbar-target .matrx-alchemy-trigger {
|
|
435
|
+
position: relative;
|
|
436
|
+
flex-shrink: 0;
|
|
437
|
+
width: 2.75rem;
|
|
438
|
+
height: 2.75rem;
|
|
439
|
+
background: transparent;
|
|
440
|
+
touch-action: manipulation;
|
|
441
|
+
}
|
|
442
|
+
.matrx-alchemy-toolbar-target .matrx-alchemy-trigger::before {
|
|
443
|
+
content: "";
|
|
444
|
+
position: absolute;
|
|
445
|
+
width: 1.75rem;
|
|
446
|
+
height: 1.75rem;
|
|
447
|
+
border-radius: 9999px;
|
|
448
|
+
transition: background-color 150ms ease, transform 100ms ease;
|
|
449
|
+
}
|
|
450
|
+
.matrx-alchemy-toolbar-target .matrx-alchemy-trigger:hover::before {
|
|
451
|
+
background: hsl(var(--accent, 240 5% 96%));
|
|
452
|
+
}
|
|
453
|
+
.matrx-alchemy-toolbar-target .matrx-alchemy-trigger:active::before { transform: scale(0.92); }
|
|
454
|
+
.matrx-alchemy-toolbar-target .matrx-alchemy-trigger svg {
|
|
455
|
+
position: relative;
|
|
456
|
+
width: 0.875rem;
|
|
457
|
+
height: 0.875rem;
|
|
458
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-matrx/alchemy",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
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",
|
|
@@ -124,14 +124,14 @@
|
|
|
124
124
|
"*.css"
|
|
125
125
|
],
|
|
126
126
|
"dependencies": {
|
|
127
|
+
"@ai-matrx/kit": "latest",
|
|
127
128
|
"@ai-matrx/design-system": "latest",
|
|
128
|
-
"@ai-matrx/agents": "latest"
|
|
129
|
-
"@ai-matrx/kit": "latest"
|
|
129
|
+
"@ai-matrx/agents": "latest"
|
|
130
130
|
},
|
|
131
131
|
"scripts": {
|
|
132
132
|
"build": "pnpm clean && tsup && node ./scripts/copy-assets.mjs && node ./scripts/assert-distribution-artifacts.mjs",
|
|
133
133
|
"clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
134
|
-
"check:package": "pnpm build && publint && pnpm verify:tarball",
|
|
134
|
+
"check:package": "pnpm build && node ../scripts/check-exports-agreement.mjs && publint && pnpm verify:tarball",
|
|
135
135
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
136
136
|
"test": "vitest run",
|
|
137
137
|
"verify:tarball": "node ./scripts/verify-tarball.mjs"
|