@ai-matrx/design-system 0.18.13 → 0.18.15

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
  }
@@ -1507,15 +1511,18 @@ var structuredPayload = (value) => {
1507
1511
  );
1508
1512
  return {
1509
1513
  kind: "json",
1510
- value: (0, import_content_transfer2.normalizeTransferJson)({
1511
- kind: value.kind,
1512
- location: value.location,
1513
- description: value.description,
1514
- data: value.data,
1515
- ...value.summary !== void 0 ? { summary: value.summary } : {},
1516
- attributes: clean(value.attributes),
1517
- context: clean(value.context)
1518
- })
1514
+ value: (0, import_content_transfer2.normalizeTransferJson)(
1515
+ {
1516
+ kind: value.kind,
1517
+ location: value.location,
1518
+ description: value.description,
1519
+ data: value.data,
1520
+ ...value.summary !== void 0 ? { summary: value.summary } : {},
1521
+ attributes: clean(value.attributes),
1522
+ context: clean(value.context)
1523
+ },
1524
+ { omitUndefinedObjectProperties: true }
1525
+ )
1519
1526
  };
1520
1527
  };
1521
1528
  var actionDone = (message) => ({
@@ -1570,12 +1577,16 @@ function MatrxCopyMenuSession(props) {
1570
1577
  })) : void 0;
1571
1578
  const json = aiVisible && props.json !== void 0 ? make("json", () => ({
1572
1579
  kind: "json",
1573
- value: (0, import_content_transfer2.normalizeTransferJson)(resolve(props.json))
1580
+ value: (0, import_content_transfer2.normalizeTransferJson)(resolve(props.json), {
1581
+ omitUndefinedObjectProperties: true
1582
+ })
1574
1583
  })) : void 0;
1575
1584
  const agent = aiVisible && props.agent !== void 0 ? make("agent", () => asPayload(resolve(props.agent))) : void 0;
1576
1585
  const structuredAgent = aiVisible && props.agent !== void 0 ? make("structured-agent", () => structuredPayload(resolve(props.agent))) : void 0;
1577
1586
  const table = (exportVisible || props.primarySource === "table") && props.export?.sheetRows ? make("rows", () => {
1578
- const value = (0, import_content_transfer2.normalizeTransferJson)(props.export.sheetRows());
1587
+ const value = (0, import_content_transfer2.normalizeTransferJson)(props.export.sheetRows(), {
1588
+ omitUndefinedObjectProperties: true
1589
+ });
1579
1590
  if (!Array.isArray(value) || value.some(
1580
1591
  (row) => row === null || typeof row !== "object" || Array.isArray(row)
1581
1592
  ))