@ai-matrx/design-system 0.18.13 → 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.
@@ -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.jsx)("span", { className: "matrx-alchemy-notice", role: "status", children: notice }) : null,
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
  }
@@ -4070,24 +4074,26 @@ function CopySubsetDialog({ source, onClose }) {
4070
4074
  }
4071
4075
  return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Dialog, { open: true, onOpenChange: (open) => {
4072
4076
  if (!open) onClose();
4073
- }, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(DialogContent, { className: "flex h-[80dvh] max-w-5xl flex-col overflow-hidden", children: [
4077
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(DialogContent, { className: "matrx-alchemy-workspace matrx-alchemy-subset", children: [
4074
4078
  /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DialogHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DialogTitle, { children: "Filter & sort before copying" }) }),
4075
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("fieldset", { className: "max-h-24 shrink-0 overflow-auto text-xs", children: [
4076
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("legend", { children: "Visible columns" }),
4077
- source.columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("label", { className: "mr-3 inline-flex items-center gap-1", children: [
4078
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("input", { type: "checkbox", checked: !hidden.has(column.id), onChange: () => setHidden((current) => {
4079
- const next = new Set(current);
4080
- next.has(column.id) ? next.delete(column.id) : next.add(column.id);
4081
- return next;
4082
- }) }),
4083
- column.header
4084
- ] }, column.id))
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
4085
4094
  ] }),
4086
- 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." }),
4087
- buildError ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { role: "alert", className: "text-destructive", children: buildError }) : null,
4088
- notice,
4089
4095
  /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(DialogFooter, { children: [
4090
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("label", { className: "flex items-center gap-2 text-sm", children: [
4096
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("label", { className: "matrx-alchemy-subset-format", children: [
4091
4097
  "Format",
4092
4098
  /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("select", { "aria-label": "Copy format", value: format, onChange: (event) => setFormat(event.target.value), children: [
4093
4099
  /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("option", { value: "ai", children: "For AI" }),
@@ -4106,8 +4112,8 @@ function CopySubsetDialog({ source, onClose }) {
4106
4112
  text.length.toLocaleString(),
4107
4113
  " characters"
4108
4114
  ] }),
4109
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Button, { type: "button", variant: "outline", onClick: onClose, children: "Close" }),
4110
- /* @__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" })
4111
4117
  ] })
4112
4118
  ] }) });
4113
4119
  }