@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.
@@ -86,7 +86,7 @@
86
86
  .matrx-alchemy-palette-row > span { min-width: 0; }
87
87
  .matrx-alchemy-palette-row-ai { color: hsl(var(--primary, 262 43% 51%)); }
88
88
  .matrx-alchemy-palette :is(button:hover, button:focus-visible) { background: hsl(var(--accent, 240 5% 96%)); outline: none; }
89
- .matrx-alchemy-palette :is(button:focus-visible) { box-shadow: 0 0 0 2px hsl(var(--ring, 240 5% 65%)); }
89
+ .matrx-alchemy-palette :is(button:focus-visible) { box-shadow: inset 0 0 0 2px hsl(var(--ring, 240 5% 65%)); }
90
90
  .matrx-alchemy-palette-status { margin: 0.25rem 0.375rem; color: hsl(var(--muted-foreground, 240 4% 46%)); font-size: 0.75rem; }
91
91
  .matrx-alchemy-notice,
92
92
  .matrx-alchemy-meta {
@@ -100,7 +100,7 @@
100
100
  }
101
101
  .matrx-alchemy-workspace-grid {
102
102
  display: grid;
103
- grid-template-columns: minmax(0, 2fr) minmax(14rem, 1fr);
103
+ grid-template-columns: minmax(0, 2fr) minmax(12rem, 1fr);
104
104
  gap: 1rem;
105
105
  min-height: 0;
106
106
  }
@@ -108,7 +108,7 @@
108
108
  min-height: 0;
109
109
  overflow: auto;
110
110
  overscroll-behavior: contain;
111
- padding-right: 0.125rem;
111
+ padding: 0.25rem;
112
112
  }
113
113
  .matrx-alchemy-main {
114
114
  display: grid;
@@ -323,11 +323,11 @@
323
323
  margin: auto;
324
324
  translate: none;
325
325
  height: fit-content;
326
- width: min(56rem, calc(100vw - 2rem));
326
+ width: min(48rem, calc(100vw - 2rem));
327
327
  max-width: calc(100vw - 2rem);
328
- padding: 1.5rem;
328
+ padding: 1rem;
329
329
  display: grid;
330
- gap: 1rem;
330
+ gap: 0.75rem;
331
331
  }
332
332
  [data-slot="dialog-overlay"]:has(+ .matrx-alchemy-workspace) {
333
333
  position: fixed;
@@ -352,6 +352,7 @@
352
352
  }
353
353
  .matrx-alchemy-workspace [data-slot="dialog-footer"] {
354
354
  display: flex;
355
+ flex-direction: row;
355
356
  flex-wrap: wrap;
356
357
  justify-content: flex-end;
357
358
  gap: 0.5rem;
@@ -416,6 +417,10 @@
416
417
  white-space: nowrap;
417
418
  }
418
419
  @media (max-width: 767px) {
420
+ .matrx-alchemy-workspace [data-slot="dialog-footer"] > .matrx-alchemy-meta {
421
+ flex-basis: 100%;
422
+ text-align: right;
423
+ }
419
424
  .matrx-alchemy-workspace {
420
425
  inset: auto 0 0;
421
426
  width: 100%;
@@ -461,3 +466,20 @@
461
466
  .matrx-alchemy-data-controls-body { display: grid; gap: 0.75rem; margin-top: 0.75rem; }
462
467
  .matrx-alchemy-preview-label { display: flex; align-items: center; gap: 0.5rem; }
463
468
  .matrx-alchemy-preview-label select { width: auto; min-width: 10rem; max-width: 100%; }
469
+
470
+ /* Subset shaping uses the same dialog chrome without recursive transfer controls. */
471
+ .matrx-alchemy-subset { width: min(48rem, calc(100vw - 2rem)); height: min(80dvh, 42rem); }
472
+ .matrx-alchemy-subset-body { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 0.75rem; }
473
+ .matrx-alchemy-subset-columns { max-height: 8rem; overflow: auto; margin: 0; padding: 0.25rem; border: 0; font-size: 0.8125rem; }
474
+ .matrx-alchemy-subset-columns legend { font-weight: 500; }
475
+ .matrx-alchemy-subset-table { min-height: 18rem; overflow: hidden; }
476
+ .matrx-alchemy-subset-format { display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.8125rem; }
477
+ .matrx-alchemy-subset-format select { min-height: 2rem; border: 1px solid hsl(var(--border)); border-radius: 0.375rem; background: hsl(var(--background)); color: inherit; padding: 0.25rem 0.5rem; }
478
+ @media (max-width: 767px) { .matrx-alchemy-subset { width: 100%; } }
479
+
480
+ .matrx-alchemy-feedback { position: fixed; z-index: 10002; bottom: max(1rem, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 0.75rem; width: max-content; max-width: calc(100vw - 2rem); padding: 0.5rem 0.75rem; border: 1px solid hsl(var(--border)); border-radius: 0.5rem; background: hsl(var(--background)); color: hsl(var(--foreground)); box-shadow: 0 4px 16px hsl(var(--foreground) / 0.12); font-size: 0.8125rem; }
481
+ .matrx-alchemy-feedback button { flex-shrink: 0; width: 1.75rem; height: 1.75rem; border: 0; border-radius: 0.25rem; background: transparent; color: inherit; cursor: pointer; }
482
+ .matrx-alchemy-feedback button:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: -2px; }
483
+
484
+ /* Dialogs show their own result; an earlier page notice must not cover their actions. */
485
+ body:has(.matrx-alchemy-workspace[data-state="open"]) > .matrx-alchemy-feedback { display: none; }
@@ -3,6 +3,7 @@
3
3
 
4
4
  // src/content-transfer/index.tsx
5
5
  import * as React8 from "react";
6
+ import { createPortal } from "react-dom";
6
7
  import {
7
8
  applySectionSelection,
8
9
  applyTransferLimits,
@@ -485,15 +486,18 @@ var structuredPayload = (value) => {
485
486
  );
486
487
  return {
487
488
  kind: "json",
488
- value: normalizeTransferJson({
489
- kind: value.kind,
490
- location: value.location,
491
- description: value.description,
492
- data: value.data,
493
- ...value.summary !== void 0 ? { summary: value.summary } : {},
494
- attributes: clean(value.attributes),
495
- context: clean(value.context)
496
- })
489
+ value: normalizeTransferJson(
490
+ {
491
+ kind: value.kind,
492
+ location: value.location,
493
+ description: value.description,
494
+ data: value.data,
495
+ ...value.summary !== void 0 ? { summary: value.summary } : {},
496
+ attributes: clean(value.attributes),
497
+ context: clean(value.context)
498
+ },
499
+ { omitUndefinedObjectProperties: true }
500
+ )
497
501
  };
498
502
  };
499
503
  var actionDone = (message) => ({
@@ -548,12 +552,16 @@ function MatrxCopyMenuSession(props) {
548
552
  })) : void 0;
549
553
  const json = aiVisible && props.json !== void 0 ? make("json", () => ({
550
554
  kind: "json",
551
- value: normalizeTransferJson(resolve(props.json))
555
+ value: normalizeTransferJson(resolve(props.json), {
556
+ omitUndefinedObjectProperties: true
557
+ })
552
558
  })) : void 0;
553
559
  const agent = aiVisible && props.agent !== void 0 ? make("agent", () => asPayload(resolve(props.agent))) : void 0;
554
560
  const structuredAgent = aiVisible && props.agent !== void 0 ? make("structured-agent", () => structuredPayload(resolve(props.agent))) : void 0;
555
561
  const table = (exportVisible || props.primarySource === "table") && props.export?.sheetRows ? make("rows", () => {
556
- const value = normalizeTransferJson(props.export.sheetRows());
562
+ const value = normalizeTransferJson(props.export.sheetRows(), {
563
+ omitUndefinedObjectProperties: true
564
+ });
557
565
  if (!Array.isArray(value) || value.some(
558
566
  (row) => row === null || typeof row !== "object" || Array.isArray(row)
559
567
  ))
@@ -1592,7 +1600,10 @@ function ContentTransferMenuSession({ source, surface, label, projection, sectio
1592
1600
  }, children: /* @__PURE__ */ jsx8(MenuPresentation, { ...action, label: action.label }) }, action.id)) }) : null
1593
1601
  ] })
1594
1602
  ] }),
1595
- notice ? /* @__PURE__ */ jsx8("span", { className: "matrx-alchemy-notice", role: "status", children: notice }) : null,
1603
+ notice && triggerRef.current ? createPortal(/* @__PURE__ */ jsxs4("div", { className: "matrx-alchemy-feedback", children: [
1604
+ /* @__PURE__ */ jsx8("span", { role: "status", children: notice }),
1605
+ /* @__PURE__ */ jsx8("button", { type: "button", "aria-label": "Dismiss Alchemy feedback", onClick: () => setNotice(null), children: "\xD7" })
1606
+ ] }), triggerRef.current.ownerDocument.body) : null,
1596
1607
  Object.values(workspaces).map((saved) => /* @__PURE__ */ jsx8(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))
1597
1608
  ] });
1598
1609
  }