@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.
@@ -387,6 +387,7 @@ import {
387
387
 
388
388
  // src/content-transfer/index.tsx
389
389
  import * as React7 from "react";
390
+ import { createPortal } from "react-dom";
390
391
  import {
391
392
  applySectionSelection,
392
393
  applyTransferLimits,
@@ -1043,7 +1044,10 @@ function ContentTransferMenuSession({ source, surface, label, projection, sectio
1043
1044
  }, children: /* @__PURE__ */ jsx10(MenuPresentation, { ...action, label: action.label }) }, action.id)) }) : null
1044
1045
  ] })
1045
1046
  ] }),
1046
- notice ? /* @__PURE__ */ jsx10("span", { className: "matrx-alchemy-notice", role: "status", children: notice }) : null,
1047
+ notice && triggerRef.current ? createPortal(/* @__PURE__ */ jsxs5("div", { className: "matrx-alchemy-feedback", children: [
1048
+ /* @__PURE__ */ jsx10("span", { role: "status", children: notice }),
1049
+ /* @__PURE__ */ jsx10("button", { type: "button", "aria-label": "Dismiss Alchemy feedback", onClick: () => setNotice(null), children: "\xD7" })
1050
+ ] }), triggerRef.current.ownerDocument.body) : null,
1047
1051
  Object.values(workspaces).map((saved) => /* @__PURE__ */ jsx10(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))
1048
1052
  ] });
1049
1053
  }
@@ -1360,15 +1364,36 @@ function PreparationWorkspace({ restoreFocus, open, state, scopes, onClose, onCh
1360
1364
  /* @__PURE__ */ jsx10("input", { type: "number", min: "0", value: controls[key] ?? "", onChange: (e) => changeControls({ ...controls, [key]: Number.isNaN(e.target.valueAsNumber) ? null : e.target.valueAsNumber }) })
1361
1365
  ] }, key))
1362
1366
  ] }) : null,
1363
- rows ? /* @__PURE__ */ jsx10(RowControls, { rows, controls, change: changeControls }) : null,
1364
- state.snapshot.sections.length ? /* @__PURE__ */ jsxs5("fieldset", { className: "matrx-alchemy-options", children: [
1365
- /* @__PURE__ */ jsx10("legend", { children: "Sections" }),
1366
- state.snapshot.sections.map((section) => /* @__PURE__ */ jsxs5("label", { children: [
1367
+ rows ? /* @__PURE__ */ jsxs5("details", { className: "matrx-alchemy-options matrx-alchemy-data-controls", children: [
1368
+ /* @__PURE__ */ jsxs5("summary", { children: [
1369
+ "Data selection \xB7 ",
1370
+ controls.visibleColumns.length,
1371
+ " columns",
1372
+ controls.search || controls.sort || controls.top != null || controls.selectedOnly || Object.values(controls.filters).some(Boolean) ? " \xB7 customized" : " \xB7 all rows"
1373
+ ] }),
1374
+ /* @__PURE__ */ jsx10("div", { className: "matrx-alchemy-data-controls-body", children: /* @__PURE__ */ jsx10(RowControls, { rows, controls, change: changeControls }) })
1375
+ ] }) : null,
1376
+ state.snapshot.sections.length ? /* @__PURE__ */ jsxs5("details", { className: "matrx-alchemy-options", children: [
1377
+ /* @__PURE__ */ jsxs5("summary", { children: [
1378
+ "Sections \xB7 ",
1379
+ controls.sections.length,
1380
+ " included"
1381
+ ] }),
1382
+ /* @__PURE__ */ jsx10("fieldset", { "aria-label": "Included sections", children: state.snapshot.sections.map((section) => /* @__PURE__ */ jsxs5("label", { children: [
1367
1383
  /* @__PURE__ */ jsx10("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) }) }),
1368
1384
  " ",
1369
1385
  section.label
1370
- ] }, section.id))
1386
+ ] }, section.id)) })
1371
1387
  ] }) : null,
1388
+ /* @__PURE__ */ jsxs5("label", { className: "matrx-alchemy-preview-label", children: [
1389
+ "Output format",
1390
+ /* @__PURE__ */ jsxs5("select", { "aria-label": "Output format", value: format, onChange: (e) => setFormat(e.target.value), children: [
1391
+ formats.map((f) => /* @__PURE__ */ jsx10("option", { value: f, children: LABEL[f] }, f)),
1392
+ state.draft.payload.kind === "rows" ? /* @__PURE__ */ jsx10("option", { value: "xlsx", children: "Excel workbook" }) : null,
1393
+ workspaceAdapters.map((adapter) => /* @__PURE__ */ jsx10("option", { value: adapter.id, children: adapter.label }, adapter.id))
1394
+ ] })
1395
+ ] }),
1396
+ /* @__PURE__ */ jsx10("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) }),
1372
1397
  /* @__PURE__ */ jsxs5("div", { className: "matrx-alchemy-coverage", children: [
1373
1398
  /* @__PURE__ */ jsxs5("span", { children: [
1374
1399
  state.snapshot.coverage.included.toLocaleString(),
@@ -1395,15 +1420,6 @@ function PreparationWorkspace({ restoreFocus, open, state, scopes, onClose, onCh
1395
1420
  ] }, `${o.path}-${o.reason}-${i}`)) })
1396
1421
  ] }) : null
1397
1422
  ] }),
1398
- /* @__PURE__ */ jsxs5("label", { className: "matrx-alchemy-preview-label", children: [
1399
- "Output format",
1400
- /* @__PURE__ */ jsxs5("select", { "aria-label": "Output format", value: format, onChange: (e) => setFormat(e.target.value), children: [
1401
- formats.map((f) => /* @__PURE__ */ jsx10("option", { value: f, children: LABEL[f] }, f)),
1402
- state.draft.payload.kind === "rows" ? /* @__PURE__ */ jsx10("option", { value: "xlsx", children: "Excel workbook" }) : null,
1403
- workspaceAdapters.map((adapter) => /* @__PURE__ */ jsx10("option", { value: adapter.id, children: adapter.label }, adapter.id))
1404
- ] })
1405
- ] }),
1406
- /* @__PURE__ */ jsx10("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) }),
1407
1423
  bufferError ? /* @__PURE__ */ jsx10("p", { id: "alchemy-buffer-error", role: "alert", className: "matrx-alchemy-error", children: bufferError }) : null,
1408
1424
  formatError ? /* @__PURE__ */ jsx10("p", { role: "alert", className: "matrx-alchemy-error", children: formatError }) : null,
1409
1425
  bufferError ? /* @__PURE__ */ jsx10(Button, { className: "matrx-alchemy-workspace-secondary", type: "button", variant: "outline", disabled: busy !== null, onClick: () => {