@ai-matrx/design-system 0.18.12 → 0.18.14
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 +12 -0
- package/dist/content-transfer.cjs +31 -15
- package/dist/content-transfer.cjs.map +1 -1
- package/dist/content-transfer.css +26 -7
- package/dist/content-transfer.js +31 -15
- package/dist/content-transfer.js.map +1 -1
- package/dist/data-table/data-row-inspector.cjs +31 -15
- package/dist/data-table/data-row-inspector.cjs.map +1 -1
- package/dist/data-table/data-row-inspector.js +31 -15
- package/dist/data-table/data-row-inspector.js.map +1 -1
- package/dist/data-table/data-row-window.cjs +31 -15
- package/dist/data-table/data-row-window.cjs.map +1 -1
- package/dist/data-table/data-row-window.js +31 -15
- package/dist/data-table/data-row-window.js.map +1 -1
- package/dist/data-table/index.cjs +50 -32
- package/dist/data-table/index.cjs.map +1 -1
- package/dist/data-table/index.js +50 -32
- package/dist/data-table/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1929,6 +1929,7 @@ var import_content_transfer2 = require("@ai-matrx/kit/content-transfer");
|
|
|
1929
1929
|
|
|
1930
1930
|
// src/content-transfer/index.tsx
|
|
1931
1931
|
var React13 = __toESM(require("react"), 1);
|
|
1932
|
+
var import_react_dom = require("react-dom");
|
|
1932
1933
|
var import_content_transfer = require("@ai-matrx/kit/content-transfer");
|
|
1933
1934
|
|
|
1934
1935
|
// src/popover.tsx
|
|
@@ -2494,7 +2495,10 @@ function ContentTransferMenuSession({ source, surface, label, projection, sectio
|
|
|
2494
2495
|
}, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(MenuPresentation, { ...action, label: action.label }) }, action.id)) }) : null
|
|
2495
2496
|
] })
|
|
2496
2497
|
] }),
|
|
2497
|
-
notice ? /* @__PURE__ */ (0, import_jsx_runtime21.
|
|
2498
|
+
notice && triggerRef.current ? (0, import_react_dom.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "matrx-alchemy-feedback", children: [
|
|
2499
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { role: "status", children: notice }),
|
|
2500
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { type: "button", "aria-label": "Dismiss Alchemy feedback", onClick: () => setNotice(null), children: "\xD7" })
|
|
2501
|
+
] }), triggerRef.current.ownerDocument.body) : null,
|
|
2498
2502
|
Object.values(workspaces).map((saved) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(PreparationWorkspace, { restoreFocus: () => triggerRef.current?.focus(), open: workspaceOpen && workspaceKey === saved.key, state: saved, scopes, onClose: () => setWorkspaceOpen(false), onChange: (next) => setWorkspaces((current) => ({ ...current, [saved.key]: next })), transport, adapters, captureScope: workspaceCaptures.current.get(saved.key) ?? capturePrimary, ...ai ? { ai } : {}, onOutcome: report }, saved.key))
|
|
2499
2503
|
] });
|
|
2500
2504
|
}
|
|
@@ -2811,15 +2815,36 @@ function PreparationWorkspace({ restoreFocus, open, state, scopes, onClose, onCh
|
|
|
2811
2815
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("input", { type: "number", min: "0", value: controls[key] ?? "", onChange: (e) => changeControls({ ...controls, [key]: Number.isNaN(e.target.valueAsNumber) ? null : e.target.valueAsNumber }) })
|
|
2812
2816
|
] }, key))
|
|
2813
2817
|
] }) : null,
|
|
2814
|
-
rows ? /* @__PURE__ */ (0, import_jsx_runtime21.
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
+
rows ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("details", { className: "matrx-alchemy-options matrx-alchemy-data-controls", children: [
|
|
2819
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("summary", { children: [
|
|
2820
|
+
"Data selection \xB7 ",
|
|
2821
|
+
controls.visibleColumns.length,
|
|
2822
|
+
" columns",
|
|
2823
|
+
controls.search || controls.sort || controls.top != null || controls.selectedOnly || Object.values(controls.filters).some(Boolean) ? " \xB7 customized" : " \xB7 all rows"
|
|
2824
|
+
] }),
|
|
2825
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "matrx-alchemy-data-controls-body", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(RowControls, { rows, controls, change: changeControls }) })
|
|
2826
|
+
] }) : null,
|
|
2827
|
+
state.snapshot.sections.length ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("details", { className: "matrx-alchemy-options", children: [
|
|
2828
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("summary", { children: [
|
|
2829
|
+
"Sections \xB7 ",
|
|
2830
|
+
controls.sections.length,
|
|
2831
|
+
" included"
|
|
2832
|
+
] }),
|
|
2833
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("fieldset", { "aria-label": "Included sections", children: state.snapshot.sections.map((section) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("label", { children: [
|
|
2818
2834
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("input", { type: "checkbox", checked: controls.sections.includes(section.id), onChange: (e) => changeControls({ ...controls, sections: e.target.checked ? [...controls.sections, section.id] : controls.sections.filter((id) => id !== section.id) }) }),
|
|
2819
2835
|
" ",
|
|
2820
2836
|
section.label
|
|
2821
|
-
] }, section.id))
|
|
2837
|
+
] }, section.id)) })
|
|
2822
2838
|
] }) : null,
|
|
2839
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("label", { className: "matrx-alchemy-preview-label", children: [
|
|
2840
|
+
"Output format",
|
|
2841
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("select", { "aria-label": "Output format", value: format, onChange: (e) => setFormat(e.target.value), children: [
|
|
2842
|
+
formats.map((f) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("option", { value: f, children: LABEL[f] }, f)),
|
|
2843
|
+
state.draft.payload.kind === "rows" ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("option", { value: "xlsx", children: "Excel workbook" }) : null,
|
|
2844
|
+
workspaceAdapters.map((adapter) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("option", { value: adapter.id, children: adapter.label }, adapter.id))
|
|
2845
|
+
] })
|
|
2846
|
+
] }),
|
|
2847
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("textarea", { className: "matrx-alchemy-preview", "aria-label": "Prepared output", "aria-invalid": bufferError ? true : void 0, "aria-describedby": bufferError ? "alchemy-buffer-error" : void 0, value: buffer, onChange: (e) => editBuffer(e.target.value) }),
|
|
2823
2848
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "matrx-alchemy-coverage", children: [
|
|
2824
2849
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { children: [
|
|
2825
2850
|
state.snapshot.coverage.included.toLocaleString(),
|
|
@@ -2846,15 +2871,6 @@ function PreparationWorkspace({ restoreFocus, open, state, scopes, onClose, onCh
|
|
|
2846
2871
|
] }, `${o.path}-${o.reason}-${i}`)) })
|
|
2847
2872
|
] }) : null
|
|
2848
2873
|
] }),
|
|
2849
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("label", { className: "matrx-alchemy-preview-label", children: [
|
|
2850
|
-
"Output format",
|
|
2851
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("select", { "aria-label": "Output format", value: format, onChange: (e) => setFormat(e.target.value), children: [
|
|
2852
|
-
formats.map((f) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("option", { value: f, children: LABEL[f] }, f)),
|
|
2853
|
-
state.draft.payload.kind === "rows" ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("option", { value: "xlsx", children: "Excel workbook" }) : null,
|
|
2854
|
-
workspaceAdapters.map((adapter) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("option", { value: adapter.id, children: adapter.label }, adapter.id))
|
|
2855
|
-
] })
|
|
2856
|
-
] }),
|
|
2857
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("textarea", { className: "matrx-alchemy-preview", "aria-label": "Prepared output", "aria-invalid": bufferError ? true : void 0, "aria-describedby": bufferError ? "alchemy-buffer-error" : void 0, value: buffer, onChange: (e) => editBuffer(e.target.value) }),
|
|
2858
2874
|
bufferError ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { id: "alchemy-buffer-error", role: "alert", className: "matrx-alchemy-error", children: bufferError }) : null,
|
|
2859
2875
|
formatError ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { role: "alert", className: "matrx-alchemy-error", children: formatError }) : null,
|
|
2860
2876
|
bufferError ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Button, { className: "matrx-alchemy-workspace-secondary", type: "button", variant: "outline", disabled: busy !== null, onClick: () => {
|
|
@@ -4058,24 +4074,26 @@ function CopySubsetDialog({ source, onClose }) {
|
|
|
4058
4074
|
}
|
|
4059
4075
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Dialog, { open: true, onOpenChange: (open) => {
|
|
4060
4076
|
if (!open) onClose();
|
|
4061
|
-
}, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(DialogContent, { className: "
|
|
4077
|
+
}, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(DialogContent, { className: "matrx-alchemy-workspace matrx-alchemy-subset", children: [
|
|
4062
4078
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DialogHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DialogTitle, { children: "Filter & sort before copying" }) }),
|
|
4063
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("
|
|
4064
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.
|
|
4065
|
-
|
|
4066
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4079
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "matrx-alchemy-workspace-body matrx-alchemy-subset-body", children: [
|
|
4080
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("fieldset", { className: "matrx-alchemy-subset-columns", children: [
|
|
4081
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("legend", { children: "Visible columns" }),
|
|
4082
|
+
source.columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("label", { className: "mr-3 inline-flex items-center gap-1", children: [
|
|
4083
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("input", { type: "checkbox", checked: !hidden.has(column.id), onChange: () => setHidden((current) => {
|
|
4084
|
+
const next = new Set(current);
|
|
4085
|
+
next.has(column.id) ? next.delete(column.id) : next.add(column.id);
|
|
4086
|
+
return next;
|
|
4087
|
+
}) }),
|
|
4088
|
+
column.header
|
|
4089
|
+
] }, column.id))
|
|
4090
|
+
] }),
|
|
4091
|
+
columns.length ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "matrx-alchemy-subset-table", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(MatrxDataTable, { copy: false, data: rows, columns, getRowId: source.getRowId, query: { mode: "controlled-local", state: query, onStateChange: setQuery }, selection: { selectedIds, onSelectedIdsChange: setSelectedIds }, detail: { enabled: false }, window: { enabled: false }, toolbar: { searchMatch: {} } }) }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { children: "Show at least one column to copy." }),
|
|
4092
|
+
buildError ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { role: "alert", className: "text-destructive", children: buildError }) : null,
|
|
4093
|
+
notice
|
|
4073
4094
|
] }),
|
|
4074
|
-
columns.length ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "min-h-0 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(MatrxDataTable, { data: rows, columns, getRowId: source.getRowId, query: { mode: "controlled-local", state: query, onStateChange: setQuery }, selection: { selectedIds, onSelectedIdsChange: setSelectedIds }, detail: { enabled: false }, window: { enabled: false }, toolbar: { searchMatch: {} } }) }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { children: "Show at least one column to copy." }),
|
|
4075
|
-
buildError ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { role: "alert", className: "text-destructive", children: buildError }) : null,
|
|
4076
|
-
notice,
|
|
4077
4095
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(DialogFooter, { children: [
|
|
4078
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("label", { className: "
|
|
4096
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("label", { className: "matrx-alchemy-subset-format", children: [
|
|
4079
4097
|
"Format",
|
|
4080
4098
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("select", { "aria-label": "Copy format", value: format, onChange: (event) => setFormat(event.target.value), children: [
|
|
4081
4099
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("option", { value: "ai", children: "For AI" }),
|
|
@@ -4094,8 +4112,8 @@ function CopySubsetDialog({ source, onClose }) {
|
|
|
4094
4112
|
text.length.toLocaleString(),
|
|
4095
4113
|
" characters"
|
|
4096
4114
|
] }),
|
|
4097
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Button, { type: "button", variant: "outline", onClick: onClose, children: "Close" }),
|
|
4098
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Button, { type: "button", disabled: buildError !== null || !columns.length || !shaped.length, onClick: () => void clipboard.copyText(text, `${source.label} copied`), children: "Copy subset" })
|
|
4115
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Button, { type: "button", variant: "outline", className: "matrx-alchemy-workspace-secondary", onClick: onClose, children: "Close" }),
|
|
4116
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Button, { type: "button", className: "matrx-alchemy-workspace-primary", disabled: buildError !== null || !columns.length || !shaped.length, onClick: () => void clipboard.copyText(text, `${source.label} copied`), children: "Copy subset" })
|
|
4099
4117
|
] })
|
|
4100
4118
|
] }) });
|
|
4101
4119
|
}
|