@ai-matrx/design-system 0.20.5 → 0.20.6

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.
@@ -1199,7 +1199,7 @@ var useContentTransferCapabilities = () => React9.useContext(CapabilityContext);
1199
1199
  var SurfaceContext = React9.createContext(null);
1200
1200
  function MenuPresentation({ label, hint, icon: Icon2 }) {
1201
1201
  return /* @__PURE__ */ jsxs7(Fragment, { children: [
1202
- Icon2 ? /* @__PURE__ */ jsx13(Icon2, { className: "matrx-alchemy-menu-icon" }) : null,
1202
+ Icon2 ? /* @__PURE__ */ jsx13(Icon2, { className: "matrx-alchemy-menu-icon" }) : /* @__PURE__ */ jsx13(PaletteGlyph, { file: true }),
1203
1203
  /* @__PURE__ */ jsxs7("span", { children: [
1204
1204
  label,
1205
1205
  hint ? /* @__PURE__ */ jsx13("small", { className: "matrx-alchemy-menu-hint", children: hint }) : null
@@ -1221,8 +1221,11 @@ function DestinationPresentation({ action }) {
1221
1221
  };
1222
1222
  const path = paths[action.id.replace(/^matrx:/, "")];
1223
1223
  return /* @__PURE__ */ jsxs7(Fragment, { children: [
1224
- !action.icon ? path ? /* @__PURE__ */ jsx13("svg", { className: "matrx-alchemy-palette-glyph", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx13("path", { d: path }) }) : /* @__PURE__ */ jsx13(PaletteGlyph, { file: true }) : null,
1225
- /* @__PURE__ */ jsx13(MenuPresentation, { ...action })
1224
+ action.icon ? /* @__PURE__ */ jsx13(action.icon, { className: "matrx-alchemy-menu-icon" }) : path ? /* @__PURE__ */ jsx13("svg", { className: "matrx-alchemy-palette-glyph", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx13("path", { d: path }) }) : /* @__PURE__ */ jsx13(PaletteGlyph, { file: true }),
1225
+ /* @__PURE__ */ jsxs7("span", { children: [
1226
+ action.label,
1227
+ action.hint ? /* @__PURE__ */ jsx13("small", { className: "matrx-alchemy-menu-hint", children: action.hint }) : null
1228
+ ] })
1226
1229
  ] });
1227
1230
  }
1228
1231
  function ReceiptLink({ target }) {
@@ -1232,6 +1235,11 @@ function ReceiptLink({ target }) {
1232
1235
  ] }) : null;
1233
1236
  }
1234
1237
  function PaletteGlyph({ format, ai = false, file = false, kind }) {
1238
+ if (kind === "link") return /* @__PURE__ */ jsx13("svg", { className: "matrx-alchemy-palette-glyph", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx13("path", { d: "M10 13a5 5 0 0 0 7 0l3-3a5 5 0 0 0-7-7l-2 2M14 11a5 5 0 0 0-7 0l-3 3a5 5 0 0 0 7 7l2-2" }) });
1239
+ if (kind === "surface") return /* @__PURE__ */ jsxs7("svg", { className: "matrx-alchemy-palette-glyph", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
1240
+ /* @__PURE__ */ jsx13("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
1241
+ /* @__PURE__ */ jsx13("path", { d: "M3 9h18M9 9v12" })
1242
+ ] });
1235
1243
  if (kind === "ai-copy") return /* @__PURE__ */ jsxs7("svg", { className: "matrx-alchemy-palette-glyph", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
1236
1244
  /* @__PURE__ */ jsx13("rect", { x: "5", y: "5", width: "11", height: "14", rx: "2" }),
1237
1245
  /* @__PURE__ */ jsx13("path", { d: "M9 3h6a2 2 0 0 1 2 2v10" }),
@@ -1712,7 +1720,7 @@ function ContentTransferMenuSession({ references = [], referenceActions = [], so
1712
1720
  const presentation = options.action;
1713
1721
  const Icon2 = presentation?.icon;
1714
1722
  const fallbackLabel = options.file && !/^download\b/i.test(label2) ? `Download ${label2}` : label2;
1715
- return /* @__PURE__ */ jsxs7("button", { type: "button", className: "matrx-alchemy-palette-tile", "aria-label": presentation?.ariaLabel ?? (presentation ? fallbackLabel : options.ariaLabel ?? `${resolvedMode === "copy" ? "Copy" : "Download"} ${label2}`), onClick: () => {
1723
+ return /* @__PURE__ */ jsxs7("button", { type: "button", className: "matrx-alchemy-palette-tile", title: id === "table-data" ? "JSON using column display names" : id === "table-schema" ? "Table schema and rows" : label2, "aria-label": presentation?.ariaLabel ?? (presentation ? fallbackLabel : options.ariaLabel ?? `${resolvedMode === "copy" ? "Copy" : "Download"} ${label2}`), onClick: () => {
1716
1724
  closePalette();
1717
1725
  onClick();
1718
1726
  }, children: [
@@ -1774,7 +1782,7 @@ function ContentTransferMenuSession({ references = [], referenceActions = [], so
1774
1782
  /* @__PURE__ */ jsx13(PaletteGlyph, { kind: "ai-copy" }),
1775
1783
  /* @__PURE__ */ jsxs7("span", { children: [
1776
1784
  "Copy with AI context",
1777
- /* @__PURE__ */ jsx13("small", { className: "matrx-alchemy-menu-hint", children: "Content, source and capture details" })
1785
+ /* @__PURE__ */ jsx13("small", { className: "matrx-alchemy-menu-hint", children: "Include source context" })
1778
1786
  ] })
1779
1787
  ] }) : null, items: quickVariants("ai"), onRun: (variant) => {
1780
1788
  closePalette();
@@ -1787,32 +1795,44 @@ function ContentTransferMenuSession({ references = [], referenceActions = [], so
1787
1795
  /* @__PURE__ */ jsx13(PaletteGlyph, { kind: "sliders" }),
1788
1796
  /* @__PURE__ */ jsxs7("span", { children: [
1789
1797
  "Prepare for AI",
1790
- /* @__PURE__ */ jsx13("small", { className: "matrx-alchemy-menu-hint", children: "Review and edit before copying" })
1798
+ /* @__PURE__ */ jsx13("small", { className: "matrx-alchemy-menu-hint", children: "Trim, edit or summarize" })
1791
1799
  ] })
1792
1800
  ] }) })
1793
1801
  ] }) : null,
1794
1802
  prepareAvailable && (nearestWorkspaceKey || variants.length) ? /* @__PURE__ */ jsx13(PaletteRows, { title: "Other sources", items: [], extra: /* @__PURE__ */ jsxs7(Fragment, { children: [
1795
- nearestWorkspaceKey && nearestSurface ? /* @__PURE__ */ jsx13("button", { type: "button", className: "matrx-alchemy-palette-row", onClick: () => {
1803
+ nearestWorkspaceKey && nearestSurface ? /* @__PURE__ */ jsxs7("button", { type: "button", className: "matrx-alchemy-palette-row", onClick: () => {
1796
1804
  closePalette();
1797
1805
  void openWorkspace(nearestWorkspaceKey, { source: nearestSurface, label: nearestSurface.surfaceName });
1798
- }, children: /* @__PURE__ */ jsx13("span", { children: "Prepare this surface" }) }) : null,
1806
+ }, children: [
1807
+ /* @__PURE__ */ jsx13(PaletteGlyph, { kind: "surface" }),
1808
+ /* @__PURE__ */ jsx13("span", { children: "Prepare this page" })
1809
+ ] }) : null,
1799
1810
  variants.map((variant) => /* @__PURE__ */ jsx13("button", { type: "button", className: "matrx-alchemy-palette-row", "aria-label": variant.ariaLabel, onClick: () => {
1800
1811
  closePalette();
1801
1812
  void openWorkspace(variantWorkspaceKeys.get(variant.id), variant);
1802
1813
  }, children: /* @__PURE__ */ jsx13(MenuPresentation, { ...variant, label: `Prepare ${variant.label}` }) }, variant.id))
1803
1814
  ] }) }) : null,
1804
1815
  references.length || referenceActions.length ? /* @__PURE__ */ jsxs7("section", { className: "matrx-alchemy-palette-section", children: [
1805
- /* @__PURE__ */ jsx13("h3", { children: "Live references" }),
1806
- /* @__PURE__ */ jsx13("p", { className: "matrx-alchemy-menu-hint", children: "Pointers to saved data, independent of filters and edits." }),
1807
- references.map((reference) => /* @__PURE__ */ jsx13("button", { type: "button", className: "matrx-alchemy-palette-row", onClick: () => void copyReference(reference), children: /* @__PURE__ */ jsx13("span", { children: reference.label }) }, reference.id)),
1808
- referenceActions.map((action) => /* @__PURE__ */ jsx13("button", { type: "button", className: "matrx-alchemy-palette-row", onClick: () => void openReference(action), children: /* @__PURE__ */ jsx13("span", { children: action.label }) }, action.id))
1816
+ /* @__PURE__ */ jsx13("h3", { children: "References" }),
1817
+ referenceActions.map((action) => /* @__PURE__ */ jsxs7("button", { type: "button", className: "matrx-alchemy-palette-row", onClick: () => void openReference(action), children: [
1818
+ /* @__PURE__ */ jsx13(PaletteGlyph, { kind: "link" }),
1819
+ /* @__PURE__ */ jsx13("span", { children: action.label }),
1820
+ /* @__PURE__ */ jsx13("svg", { className: "matrx-alchemy-disclosure", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", "aria-hidden": "true", children: /* @__PURE__ */ jsx13("path", { d: "m6 4 4 4-4 4" }) })
1821
+ ] }, action.id)),
1822
+ references.map((reference) => /* @__PURE__ */ jsxs7("button", { type: "button", className: "matrx-alchemy-palette-row", title: "Copies a reference to saved data", onClick: () => void copyReference(reference), children: [
1823
+ /* @__PURE__ */ jsx13(PaletteGlyph, { kind: "link" }),
1824
+ /* @__PURE__ */ jsx13("span", { children: reference.label })
1825
+ ] }, reference.id))
1809
1826
  ] }) : null,
1810
1827
  ["save", "chat", "email", "other"].map((group) => {
1811
1828
  const entries = ordinaryActions.filter((action) => (action.group ?? "other") === group);
1812
1829
  return entries.length ? /* @__PURE__ */ jsxs7("details", { className: "matrx-alchemy-palette-destinations", children: [
1813
1830
  /* @__PURE__ */ jsxs7("summary", { children: [
1814
1831
  group === "save" ? "Save to Matrx" : group === "chat" ? "Continue with AI" : group === "email" ? "Email to me" : "Actions",
1815
- /* @__PURE__ */ jsx13("span", { children: entries.length })
1832
+ /* @__PURE__ */ jsxs7("span", { className: "matrx-alchemy-disclosure-meta", children: [
1833
+ /* @__PURE__ */ jsx13("span", { children: entries.length }),
1834
+ /* @__PURE__ */ jsx13("svg", { className: "matrx-alchemy-disclosure", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", "aria-hidden": "true", children: /* @__PURE__ */ jsx13("path", { d: "m6 4 4 4-4 4" }) })
1835
+ ] })
1816
1836
  ] }),
1817
1837
  /* @__PURE__ */ jsx13("div", { children: entries.map((action) => /* @__PURE__ */ jsx13("button", { type: "button", className: "matrx-alchemy-palette-row", "aria-label": action.ariaLabel, onClick: () => {
1818
1838
  closePalette();