@ai-matrx/design-system 0.20.2 → 0.20.6
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 +20 -0
- package/dist/content-transfer.cjs +35 -15
- package/dist/content-transfer.cjs.map +1 -1
- package/dist/content-transfer.css +10 -2
- package/dist/content-transfer.js +35 -15
- package/dist/content-transfer.js.map +1 -1
- package/dist/data-table/data-row-inspector.cjs +60 -14
- package/dist/data-table/data-row-inspector.cjs.map +1 -1
- package/dist/data-table/data-row-inspector.js +60 -14
- package/dist/data-table/data-row-inspector.js.map +1 -1
- package/dist/data-table/data-row-window.cjs +60 -14
- package/dist/data-table/data-row-window.cjs.map +1 -1
- package/dist/data-table/data-row-window.js +60 -14
- package/dist/data-table/data-row-window.js.map +1 -1
- package/dist/data-table/index.cjs +67 -46
- package/dist/data-table/index.cjs.map +1 -1
- package/dist/data-table/index.js +67 -46
- package/dist/data-table/index.js.map +1 -1
- package/dist/styles.css +1 -19
- package/package.json +1 -1
|
@@ -79,11 +79,13 @@
|
|
|
79
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
80
|
.matrx-alchemy-palette-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.1875rem; }
|
|
81
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-tile > span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: normal; }
|
|
82
83
|
.matrx-alchemy-palette-glyph { width: 1.125rem; height: 1.125rem; color: hsl(var(--muted-foreground, 240 4% 46%)); flex: 0 0 auto; }
|
|
83
84
|
.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
85
|
.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
86
|
.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 > span { min-width: 0; flex: 1; }
|
|
88
|
+
.matrx-alchemy-palette-row > :is(.matrx-alchemy-palette-glyph, .matrx-alchemy-menu-icon) { width: 1rem; height: 1rem; align-self: flex-start; margin-top: .125rem; }
|
|
87
89
|
.matrx-alchemy-palette-row-ai { color: hsl(var(--primary, 262 43% 51%)); }
|
|
88
90
|
.matrx-alchemy-palette :is(button:hover, button:focus-visible) { background: hsl(var(--accent, 240 5% 96%)); outline: none; }
|
|
89
91
|
.matrx-alchemy-palette :is(button:focus-visible) { box-shadow: inset 0 0 0 2px hsl(var(--ring, 240 5% 65%)); }
|
|
@@ -274,6 +276,8 @@
|
|
|
274
276
|
display: block;
|
|
275
277
|
color: hsl(var(--muted-foreground, 240 4% 46%));
|
|
276
278
|
font-size: 0.75rem;
|
|
279
|
+
line-height: 1.35;
|
|
280
|
+
margin-top: .125rem;
|
|
277
281
|
}
|
|
278
282
|
|
|
279
283
|
/* Primitive chrome is scoped here so a plain React consumer needs no Tailwind build. */
|
|
@@ -455,7 +459,7 @@ body:has(.matrx-alchemy-workspace[data-state="open"]) > .matrx-alchemy-feedback
|
|
|
455
459
|
.matrx-alchemy-palette-destinations > summary:focus-visible { outline: none; box-shadow: inset 0 0 0 2px hsl(var(--ring)); }
|
|
456
460
|
|
|
457
461
|
.matrx-alchemy-scope { display: grid; gap: .375rem; padding: .5rem; font-size: .75rem; }
|
|
458
|
-
.matrx-alchemy-scope select { width: 100%; min-width: 0; padding: .375rem; border: 1px solid hsl(var(--border)); border-radius: .375rem; color: inherit; background: hsl(var(--background)); }
|
|
462
|
+
.matrx-alchemy-scope select { font: inherit; font-size: .8125rem; line-height: 1.25; width: 100%; min-width: 0; padding: .375rem; border: 1px solid hsl(var(--border)); border-radius: .375rem; color: inherit; background: hsl(var(--background)); }
|
|
459
463
|
|
|
460
464
|
/* Email review shares the preparation chrome, including hosts without Tailwind. */
|
|
461
465
|
.matrx-alchemy-email-review { max-height: 85dvh; overflow: auto; }
|
|
@@ -463,3 +467,7 @@ body:has(.matrx-alchemy-workspace[data-state="open"]) > .matrx-alchemy-feedback
|
|
|
463
467
|
.matrx-alchemy-email-adjustments { font-size: .8125rem; overflow-wrap: anywhere; }
|
|
464
468
|
.matrx-alchemy-email-adjustments ul { margin: .5rem 0 0; padding-left: 1.25rem; }
|
|
465
469
|
@media (min-width: 768px) { .matrx-alchemy-email-review { width: min(32rem, calc(100vw - 2rem)); } }
|
|
470
|
+
|
|
471
|
+
.matrx-alchemy-disclosure { width: 1rem; height: 1rem; flex: 0 0 auto; color: hsl(var(--muted-foreground)); }
|
|
472
|
+
.matrx-alchemy-disclosure-meta { display: inline-flex; align-items: center; gap: .375rem; }
|
|
473
|
+
.matrx-alchemy-palette-destinations[open] > summary .matrx-alchemy-disclosure { transform: rotate(90deg); }
|
package/dist/content-transfer.js
CHANGED
|
@@ -1115,7 +1115,7 @@ var exportableColumns = (payload) => payload.columns.filter(
|
|
|
1115
1115
|
);
|
|
1116
1116
|
var tableSchemaFormat = {
|
|
1117
1117
|
id: "table-schema",
|
|
1118
|
-
label: "Schema
|
|
1118
|
+
label: "Schema",
|
|
1119
1119
|
supports: (payload) => payload.kind === "rows",
|
|
1120
1120
|
async build(draft, signal) {
|
|
1121
1121
|
if (signal.aborted) throw new DOMException("Cancelled", "AbortError");
|
|
@@ -1168,7 +1168,7 @@ function displayLabels(payload) {
|
|
|
1168
1168
|
}
|
|
1169
1169
|
var tableDataFormat = {
|
|
1170
1170
|
id: "table-data",
|
|
1171
|
-
label: "JSON
|
|
1171
|
+
label: "Table JSON",
|
|
1172
1172
|
supports: (payload) => payload.kind === "rows",
|
|
1173
1173
|
async build(draft, signal) {
|
|
1174
1174
|
if (signal.aborted) throw new DOMException("Cancelled", "AbortError");
|
|
@@ -1845,7 +1845,7 @@ function ContentTransferSurfaceProvider({ handle, children }) {
|
|
|
1845
1845
|
var useContentTransferSurface = () => React10.useContext(SurfaceContext);
|
|
1846
1846
|
function MenuPresentation({ label, hint, icon: Icon }) {
|
|
1847
1847
|
return /* @__PURE__ */ jsxs6(Fragment2, { children: [
|
|
1848
|
-
Icon ? /* @__PURE__ */ jsx11(Icon, { className: "matrx-alchemy-menu-icon" }) :
|
|
1848
|
+
Icon ? /* @__PURE__ */ jsx11(Icon, { className: "matrx-alchemy-menu-icon" }) : /* @__PURE__ */ jsx11(PaletteGlyph, { file: true }),
|
|
1849
1849
|
/* @__PURE__ */ jsxs6("span", { children: [
|
|
1850
1850
|
label,
|
|
1851
1851
|
hint ? /* @__PURE__ */ jsx11("small", { className: "matrx-alchemy-menu-hint", children: hint }) : null
|
|
@@ -1867,8 +1867,11 @@ function DestinationPresentation({ action }) {
|
|
|
1867
1867
|
};
|
|
1868
1868
|
const path = paths[action.id.replace(/^matrx:/, "")];
|
|
1869
1869
|
return /* @__PURE__ */ jsxs6(Fragment2, { children: [
|
|
1870
|
-
|
|
1871
|
-
/* @__PURE__ */
|
|
1870
|
+
action.icon ? /* @__PURE__ */ jsx11(action.icon, { className: "matrx-alchemy-menu-icon" }) : path ? /* @__PURE__ */ jsx11("svg", { className: "matrx-alchemy-palette-glyph", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx11("path", { d: path }) }) : /* @__PURE__ */ jsx11(PaletteGlyph, { file: true }),
|
|
1871
|
+
/* @__PURE__ */ jsxs6("span", { children: [
|
|
1872
|
+
action.label,
|
|
1873
|
+
action.hint ? /* @__PURE__ */ jsx11("small", { className: "matrx-alchemy-menu-hint", children: action.hint }) : null
|
|
1874
|
+
] })
|
|
1872
1875
|
] });
|
|
1873
1876
|
}
|
|
1874
1877
|
function ReceiptLink({ target }) {
|
|
@@ -1878,6 +1881,11 @@ function ReceiptLink({ target }) {
|
|
|
1878
1881
|
] }) : null;
|
|
1879
1882
|
}
|
|
1880
1883
|
function PaletteGlyph({ format, ai = false, file = false, kind }) {
|
|
1884
|
+
if (kind === "link") return /* @__PURE__ */ jsx11("svg", { className: "matrx-alchemy-palette-glyph", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx11("path", { d: "M10 13a5 5 0 0 0 7 0l3-3a5 5 0 0 0-7-7l-2 2M14 11a5 5 0 0 0-7 0l-3 3a5 5 0 0 0 7 7l2-2" }) });
|
|
1885
|
+
if (kind === "surface") return /* @__PURE__ */ jsxs6("svg", { className: "matrx-alchemy-palette-glyph", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
1886
|
+
/* @__PURE__ */ jsx11("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
|
|
1887
|
+
/* @__PURE__ */ jsx11("path", { d: "M3 9h18M9 9v12" })
|
|
1888
|
+
] });
|
|
1881
1889
|
if (kind === "ai-copy") return /* @__PURE__ */ jsxs6("svg", { className: "matrx-alchemy-palette-glyph", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
1882
1890
|
/* @__PURE__ */ jsx11("rect", { x: "5", y: "5", width: "11", height: "14", rx: "2" }),
|
|
1883
1891
|
/* @__PURE__ */ jsx11("path", { d: "M9 3h6a2 2 0 0 1 2 2v10" }),
|
|
@@ -2358,7 +2366,7 @@ function ContentTransferMenuSession({ references = [], referenceActions = [], so
|
|
|
2358
2366
|
const presentation = options.action;
|
|
2359
2367
|
const Icon = presentation?.icon;
|
|
2360
2368
|
const fallbackLabel = options.file && !/^download\b/i.test(label2) ? `Download ${label2}` : label2;
|
|
2361
|
-
return /* @__PURE__ */ jsxs6("button", { type: "button", className: "matrx-alchemy-palette-tile", "aria-label": presentation?.ariaLabel ?? (presentation ? fallbackLabel : options.ariaLabel ?? `${resolvedMode === "copy" ? "Copy" : "Download"} ${label2}`), onClick: () => {
|
|
2369
|
+
return /* @__PURE__ */ jsxs6("button", { type: "button", className: "matrx-alchemy-palette-tile", title: id === "table-data" ? "JSON using column display names" : id === "table-schema" ? "Table schema and rows" : label2, "aria-label": presentation?.ariaLabel ?? (presentation ? fallbackLabel : options.ariaLabel ?? `${resolvedMode === "copy" ? "Copy" : "Download"} ${label2}`), onClick: () => {
|
|
2362
2370
|
closePalette();
|
|
2363
2371
|
onClick();
|
|
2364
2372
|
}, children: [
|
|
@@ -2420,7 +2428,7 @@ function ContentTransferMenuSession({ references = [], referenceActions = [], so
|
|
|
2420
2428
|
/* @__PURE__ */ jsx11(PaletteGlyph, { kind: "ai-copy" }),
|
|
2421
2429
|
/* @__PURE__ */ jsxs6("span", { children: [
|
|
2422
2430
|
"Copy with AI context",
|
|
2423
|
-
/* @__PURE__ */ jsx11("small", { className: "matrx-alchemy-menu-hint", children: "
|
|
2431
|
+
/* @__PURE__ */ jsx11("small", { className: "matrx-alchemy-menu-hint", children: "Include source context" })
|
|
2424
2432
|
] })
|
|
2425
2433
|
] }) : null, items: quickVariants("ai"), onRun: (variant) => {
|
|
2426
2434
|
closePalette();
|
|
@@ -2433,32 +2441,44 @@ function ContentTransferMenuSession({ references = [], referenceActions = [], so
|
|
|
2433
2441
|
/* @__PURE__ */ jsx11(PaletteGlyph, { kind: "sliders" }),
|
|
2434
2442
|
/* @__PURE__ */ jsxs6("span", { children: [
|
|
2435
2443
|
"Prepare for AI",
|
|
2436
|
-
/* @__PURE__ */ jsx11("small", { className: "matrx-alchemy-menu-hint", children: "
|
|
2444
|
+
/* @__PURE__ */ jsx11("small", { className: "matrx-alchemy-menu-hint", children: "Trim, edit or summarize" })
|
|
2437
2445
|
] })
|
|
2438
2446
|
] }) })
|
|
2439
2447
|
] }) : null,
|
|
2440
2448
|
prepareAvailable && (nearestWorkspaceKey || variants.length) ? /* @__PURE__ */ jsx11(PaletteRows, { title: "Other sources", items: [], extra: /* @__PURE__ */ jsxs6(Fragment2, { children: [
|
|
2441
|
-
nearestWorkspaceKey && nearestSurface ? /* @__PURE__ */
|
|
2449
|
+
nearestWorkspaceKey && nearestSurface ? /* @__PURE__ */ jsxs6("button", { type: "button", className: "matrx-alchemy-palette-row", onClick: () => {
|
|
2442
2450
|
closePalette();
|
|
2443
2451
|
void openWorkspace(nearestWorkspaceKey, { source: nearestSurface, label: nearestSurface.surfaceName });
|
|
2444
|
-
}, children:
|
|
2452
|
+
}, children: [
|
|
2453
|
+
/* @__PURE__ */ jsx11(PaletteGlyph, { kind: "surface" }),
|
|
2454
|
+
/* @__PURE__ */ jsx11("span", { children: "Prepare this page" })
|
|
2455
|
+
] }) : null,
|
|
2445
2456
|
variants.map((variant) => /* @__PURE__ */ jsx11("button", { type: "button", className: "matrx-alchemy-palette-row", "aria-label": variant.ariaLabel, onClick: () => {
|
|
2446
2457
|
closePalette();
|
|
2447
2458
|
void openWorkspace(variantWorkspaceKeys.get(variant.id), variant);
|
|
2448
2459
|
}, children: /* @__PURE__ */ jsx11(MenuPresentation, { ...variant, label: `Prepare ${variant.label}` }) }, variant.id))
|
|
2449
2460
|
] }) }) : null,
|
|
2450
2461
|
references.length || referenceActions.length ? /* @__PURE__ */ jsxs6("section", { className: "matrx-alchemy-palette-section", children: [
|
|
2451
|
-
/* @__PURE__ */ jsx11("h3", { children: "
|
|
2452
|
-
/* @__PURE__ */
|
|
2453
|
-
|
|
2454
|
-
|
|
2462
|
+
/* @__PURE__ */ jsx11("h3", { children: "References" }),
|
|
2463
|
+
referenceActions.map((action) => /* @__PURE__ */ jsxs6("button", { type: "button", className: "matrx-alchemy-palette-row", onClick: () => void openReference(action), children: [
|
|
2464
|
+
/* @__PURE__ */ jsx11(PaletteGlyph, { kind: "link" }),
|
|
2465
|
+
/* @__PURE__ */ jsx11("span", { children: action.label }),
|
|
2466
|
+
/* @__PURE__ */ jsx11("svg", { className: "matrx-alchemy-disclosure", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", "aria-hidden": "true", children: /* @__PURE__ */ jsx11("path", { d: "m6 4 4 4-4 4" }) })
|
|
2467
|
+
] }, action.id)),
|
|
2468
|
+
references.map((reference) => /* @__PURE__ */ jsxs6("button", { type: "button", className: "matrx-alchemy-palette-row", title: "Copies a reference to saved data", onClick: () => void copyReference(reference), children: [
|
|
2469
|
+
/* @__PURE__ */ jsx11(PaletteGlyph, { kind: "link" }),
|
|
2470
|
+
/* @__PURE__ */ jsx11("span", { children: reference.label })
|
|
2471
|
+
] }, reference.id))
|
|
2455
2472
|
] }) : null,
|
|
2456
2473
|
["save", "chat", "email", "other"].map((group) => {
|
|
2457
2474
|
const entries = ordinaryActions.filter((action) => (action.group ?? "other") === group);
|
|
2458
2475
|
return entries.length ? /* @__PURE__ */ jsxs6("details", { className: "matrx-alchemy-palette-destinations", children: [
|
|
2459
2476
|
/* @__PURE__ */ jsxs6("summary", { children: [
|
|
2460
2477
|
group === "save" ? "Save to Matrx" : group === "chat" ? "Continue with AI" : group === "email" ? "Email to me" : "Actions",
|
|
2461
|
-
/* @__PURE__ */
|
|
2478
|
+
/* @__PURE__ */ jsxs6("span", { className: "matrx-alchemy-disclosure-meta", children: [
|
|
2479
|
+
/* @__PURE__ */ jsx11("span", { children: entries.length }),
|
|
2480
|
+
/* @__PURE__ */ jsx11("svg", { className: "matrx-alchemy-disclosure", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", "aria-hidden": "true", children: /* @__PURE__ */ jsx11("path", { d: "m6 4 4 4-4 4" }) })
|
|
2481
|
+
] })
|
|
2462
2482
|
] }),
|
|
2463
2483
|
/* @__PURE__ */ jsx11("div", { children: entries.map((action) => /* @__PURE__ */ jsx11("button", { type: "button", className: "matrx-alchemy-palette-row", "aria-label": action.ariaLabel, onClick: () => {
|
|
2464
2484
|
closePalette();
|