@ai-matrx/design-system 0.18.0 → 0.18.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 +24 -0
- package/dist/content-transfer.cjs +24 -6
- package/dist/content-transfer.cjs.map +1 -1
- package/dist/content-transfer.d.cts +5 -1
- package/dist/content-transfer.d.ts +5 -1
- package/dist/content-transfer.js +24 -6
- package/dist/content-transfer.js.map +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 +27 -8
- package/dist/data-table/data-row-inspector.cjs.map +1 -1
- package/dist/data-table/data-row-inspector.js +27 -8
- package/dist/data-table/data-row-inspector.js.map +1 -1
- package/dist/data-table/data-row-window.cjs +27 -8
- package/dist/data-table/data-row-window.cjs.map +1 -1
- package/dist/data-table/data-row-window.js +27 -8
- package/dist/data-table/data-row-window.js.map +1 -1
- package/dist/data-table/index.cjs +140 -86
- package/dist/data-table/index.cjs.map +1 -1
- package/dist/data-table/index.js +134 -76
- package/dist/data-table/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.18.2 — 2026-09-12
|
|
4
|
+
|
|
5
|
+
Alchemy copy sessions now reset only when their explicit identity changes,
|
|
6
|
+
preventing organization or authentication transitions from leaking prepared
|
|
7
|
+
state across sessions. Data-table copy sources explicitly identify the table as
|
|
8
|
+
their primary source while preserving raw JSON and hidden-export preparation.
|
|
9
|
+
Failed-run recovery remains limited to valid recoverable runs.
|
|
10
|
+
|
|
11
|
+
### Consumer action
|
|
12
|
+
|
|
13
|
+
Update to 0.18.2 and provide a stable `identityKey` wherever authentication or
|
|
14
|
+
organization identity can change during a mounted Alchemy session.
|
|
15
|
+
|
|
16
|
+
## 0.18.1 — 2026-09-12
|
|
17
|
+
|
|
18
|
+
Reorderable table columns now drag from the visible header label instead of a
|
|
19
|
+
separate grip. Ordinary click, Enter, and Space sorting remain intact, compact
|
|
20
|
+
headers remain accessible, and sticky headers continue to be the default.
|
|
21
|
+
|
|
22
|
+
### Consumer action
|
|
23
|
+
|
|
24
|
+
Update to 0.18.1 to use direct header-label column dragging. No table
|
|
25
|
+
configuration changes are required.
|
|
26
|
+
|
|
3
27
|
## 0.18.0 — 2026-09-12
|
|
4
28
|
|
|
5
29
|
Portable data-table copy controls now use the canonical Alchemy menu for rows,
|
|
@@ -660,7 +660,17 @@ var sourceFor = (id, label, build) => ({
|
|
|
660
660
|
}
|
|
661
661
|
});
|
|
662
662
|
function MatrxCopyMenu(props) {
|
|
663
|
-
|
|
663
|
+
const inherited = useContentTransferCapabilities();
|
|
664
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
665
|
+
MatrxCopyMenuSession,
|
|
666
|
+
{
|
|
667
|
+
...props
|
|
668
|
+
},
|
|
669
|
+
JSON.stringify([
|
|
670
|
+
inherited.identityKey ?? null,
|
|
671
|
+
props.sourceId ?? props.label
|
|
672
|
+
])
|
|
673
|
+
);
|
|
664
674
|
}
|
|
665
675
|
function MatrxCopyMenuSession(props) {
|
|
666
676
|
const instance = React7.useId();
|
|
@@ -688,7 +698,7 @@ function MatrxCopyMenuSession(props) {
|
|
|
688
698
|
})) : void 0;
|
|
689
699
|
const agent = aiVisible && props.agent !== void 0 ? make("agent", () => asPayload(resolve(props.agent))) : void 0;
|
|
690
700
|
const structuredAgent = aiVisible && props.agent !== void 0 ? make("structured-agent", () => structuredPayload(resolve(props.agent))) : void 0;
|
|
691
|
-
const table = exportVisible && props.export?.sheetRows ? make("rows", () => {
|
|
701
|
+
const table = (exportVisible || props.primarySource === "table") && props.export?.sheetRows ? make("rows", () => {
|
|
692
702
|
const value = (0, import_content_transfer.normalizeTransferJson)(props.export.sheetRows());
|
|
693
703
|
if (!Array.isArray(value) || value.some(
|
|
694
704
|
(row) => row === null || typeof row !== "object" || Array.isArray(row)
|
|
@@ -835,7 +845,7 @@ function MatrxCopyMenuSession(props) {
|
|
|
835
845
|
return props.sendToSheet(draft.payload.rows, props.label);
|
|
836
846
|
}
|
|
837
847
|
});
|
|
838
|
-
const source = json ?? table ?? structuredAgent ?? human ?? builderVariants[0]?.source;
|
|
848
|
+
const source = (props.primarySource === "table" ? table : void 0) ?? json ?? table ?? structuredAgent ?? human ?? builderVariants[0]?.source;
|
|
839
849
|
if (!source && !actions.length) return null;
|
|
840
850
|
const target = source ?? make("actions", () => ({ kind: "text", text: props.label }));
|
|
841
851
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
@@ -855,7 +865,7 @@ function MatrxCopyMenuSession(props) {
|
|
|
855
865
|
formatSources: {
|
|
856
866
|
...human ? { plain: human, markdown: humanMarkdown, html: humanMarkdown } : {},
|
|
857
867
|
...json ? { json, "compact-json": json } : {},
|
|
858
|
-
...table ? { csv: table, tsv: table } : {}
|
|
868
|
+
...table && exportVisible ? { csv: table, tsv: table } : {}
|
|
859
869
|
},
|
|
860
870
|
...props.disabled !== void 0 ? { disabled: props.disabled } : {},
|
|
861
871
|
className: cn(
|
|
@@ -1288,7 +1298,12 @@ async function buildArtifact(draft, format, label) {
|
|
|
1288
1298
|
const extension = format === "plain" ? "txt" : format === "compact-json" ? "json" : format;
|
|
1289
1299
|
return (0, import_content_transfer2.serialize)(draft, format, { spreadsheetSafe: format === "csv" || format === "tsv", filename: `${filenameFor(label)}.${extension}` });
|
|
1290
1300
|
}
|
|
1291
|
-
function ContentTransferMenu(
|
|
1301
|
+
function ContentTransferMenu(props) {
|
|
1302
|
+
const inherited = React8.useContext(CapabilityContext);
|
|
1303
|
+
const identityKey = props.capabilities?.identityKey ?? inherited.identityKey;
|
|
1304
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ContentTransferMenuSession, { ...props }, identityKey ?? "anonymous");
|
|
1305
|
+
}
|
|
1306
|
+
function ContentTransferMenuSession({ source, surface, label, projection, sections, preferences, table, formatSources, variants = EMPTY_VARIANTS, actions = [], capabilities: local, disabled, enabled = true, className, stopPropagation = true, hide = [], controllerRef }) {
|
|
1292
1307
|
const triggerRef = React8.useRef(null);
|
|
1293
1308
|
const inherited = React8.useContext(CapabilityContext);
|
|
1294
1309
|
const nearestSurface = React8.useContext(SurfaceContext);
|
|
@@ -1581,6 +1596,9 @@ function PreparationWorkspace({ restoreFocus, open, state, scopes, onClose, onCh
|
|
|
1581
1596
|
const [instruction, setInstruction] = React8.useState("");
|
|
1582
1597
|
const [busy, setBusy] = React8.useState(null);
|
|
1583
1598
|
const [aiFailed, setAiFailed] = React8.useState(false);
|
|
1599
|
+
React8.useEffect(() => {
|
|
1600
|
+
setAiFailed(false);
|
|
1601
|
+
}, [state.snapshot.id, state.draft.revision]);
|
|
1584
1602
|
const activeAi = React8.useRef(null);
|
|
1585
1603
|
const activeCapture = React8.useRef(null);
|
|
1586
1604
|
React8.useEffect(() => {
|
|
@@ -1891,7 +1909,7 @@ function PreparationWorkspace({ restoreFocus, open, state, scopes, onClose, onCh
|
|
|
1891
1909
|
activeCapture.current = null;
|
|
1892
1910
|
setBusy(null);
|
|
1893
1911
|
}, children: "Stop loading rows" }) : null,
|
|
1894
|
-
ai && aiSession.current?.recover && busy !== "ai" ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Button, { type: "button", variant: "outline", onClick: () => void runAi(true), children: aiFailed ? "Retry or rejoin AI run" : "Rejoin AI run" }) : null,
|
|
1912
|
+
ai && aiFailed && aiSession.current?.recover && busy !== "ai" ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Button, { type: "button", variant: "outline", onClick: () => void runAi(true), children: aiFailed ? "Retry or rejoin AI run" : "Rejoin AI run" }) : null,
|
|
1895
1913
|
ai ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "matrx-alchemy-meta", children: "AI creates a preview. It never copies automatically. Closing detaches this view without cancelling server work." }) : null,
|
|
1896
1914
|
state.error ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { role: "alert", className: "matrx-alchemy-error", children: state.error }) : null
|
|
1897
1915
|
] }) : null
|