@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.
@@ -49,6 +49,7 @@ var import_content_transfer2 = require("@ai-matrx/kit/content-transfer");
49
49
 
50
50
  // src/content-transfer/index.tsx
51
51
  var React7 = __toESM(require("react"), 1);
52
+ var import_react_dom = require("react-dom");
52
53
  var import_content_transfer = require("@ai-matrx/kit/content-transfer");
53
54
 
54
55
  // src/button.tsx
@@ -999,7 +1000,10 @@ function ContentTransferMenuSession({ source, surface, label, projection, sectio
999
1000
  }, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(MenuPresentation, { ...action, label: action.label }) }, action.id)) }) : null
1000
1001
  ] })
1001
1002
  ] }),
1002
- notice ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "matrx-alchemy-notice", role: "status", children: notice }) : null,
1003
+ notice && triggerRef.current ? (0, import_react_dom.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "matrx-alchemy-feedback", children: [
1004
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { role: "status", children: notice }),
1005
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", "aria-label": "Dismiss Alchemy feedback", onClick: () => setNotice(null), children: "\xD7" })
1006
+ ] }), triggerRef.current.ownerDocument.body) : null,
1003
1007
  Object.values(workspaces).map((saved) => /* @__PURE__ */ (0, import_jsx_runtime7.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))
1004
1008
  ] });
1005
1009
  }
@@ -1316,15 +1320,36 @@ function PreparationWorkspace({ restoreFocus, open, state, scopes, onClose, onCh
1316
1320
  /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("input", { type: "number", min: "0", value: controls[key] ?? "", onChange: (e) => changeControls({ ...controls, [key]: Number.isNaN(e.target.valueAsNumber) ? null : e.target.valueAsNumber }) })
1317
1321
  ] }, key))
1318
1322
  ] }) : null,
1319
- rows ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(RowControls, { rows, controls, change: changeControls }) : null,
1320
- state.snapshot.sections.length ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("fieldset", { className: "matrx-alchemy-options", children: [
1321
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("legend", { children: "Sections" }),
1322
- state.snapshot.sections.map((section) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("label", { children: [
1323
+ rows ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("details", { className: "matrx-alchemy-options matrx-alchemy-data-controls", children: [
1324
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("summary", { children: [
1325
+ "Data selection \xB7 ",
1326
+ controls.visibleColumns.length,
1327
+ " columns",
1328
+ controls.search || controls.sort || controls.top != null || controls.selectedOnly || Object.values(controls.filters).some(Boolean) ? " \xB7 customized" : " \xB7 all rows"
1329
+ ] }),
1330
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "matrx-alchemy-data-controls-body", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(RowControls, { rows, controls, change: changeControls }) })
1331
+ ] }) : null,
1332
+ state.snapshot.sections.length ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("details", { className: "matrx-alchemy-options", children: [
1333
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("summary", { children: [
1334
+ "Sections \xB7 ",
1335
+ controls.sections.length,
1336
+ " included"
1337
+ ] }),
1338
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("fieldset", { "aria-label": "Included sections", children: state.snapshot.sections.map((section) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("label", { children: [
1323
1339
  /* @__PURE__ */ (0, import_jsx_runtime7.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) }) }),
1324
1340
  " ",
1325
1341
  section.label
1326
- ] }, section.id))
1342
+ ] }, section.id)) })
1327
1343
  ] }) : null,
1344
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("label", { className: "matrx-alchemy-preview-label", children: [
1345
+ "Output format",
1346
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("select", { "aria-label": "Output format", value: format, onChange: (e) => setFormat(e.target.value), children: [
1347
+ formats.map((f) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("option", { value: f, children: LABEL[f] }, f)),
1348
+ state.draft.payload.kind === "rows" ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("option", { value: "xlsx", children: "Excel workbook" }) : null,
1349
+ workspaceAdapters.map((adapter) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("option", { value: adapter.id, children: adapter.label }, adapter.id))
1350
+ ] })
1351
+ ] }),
1352
+ /* @__PURE__ */ (0, import_jsx_runtime7.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) }),
1328
1353
  /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "matrx-alchemy-coverage", children: [
1329
1354
  /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { children: [
1330
1355
  state.snapshot.coverage.included.toLocaleString(),
@@ -1351,15 +1376,6 @@ function PreparationWorkspace({ restoreFocus, open, state, scopes, onClose, onCh
1351
1376
  ] }, `${o.path}-${o.reason}-${i}`)) })
1352
1377
  ] }) : null
1353
1378
  ] }),
1354
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("label", { className: "matrx-alchemy-preview-label", children: [
1355
- "Output format",
1356
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("select", { "aria-label": "Output format", value: format, onChange: (e) => setFormat(e.target.value), children: [
1357
- formats.map((f) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("option", { value: f, children: LABEL[f] }, f)),
1358
- state.draft.payload.kind === "rows" ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("option", { value: "xlsx", children: "Excel workbook" }) : null,
1359
- workspaceAdapters.map((adapter) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("option", { value: adapter.id, children: adapter.label }, adapter.id))
1360
- ] })
1361
- ] }),
1362
- /* @__PURE__ */ (0, import_jsx_runtime7.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) }),
1363
1379
  bufferError ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { id: "alchemy-buffer-error", role: "alert", className: "matrx-alchemy-error", children: bufferError }) : null,
1364
1380
  formatError ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { role: "alert", className: "matrx-alchemy-error", children: formatError }) : null,
1365
1381
  bufferError ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Button, { className: "matrx-alchemy-workspace-secondary", type: "button", variant: "outline", disabled: busy !== null, onClick: () => {