@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.
@@ -2825,7 +2825,7 @@ var useContentTransferCapabilities = () => React14.useContext(CapabilityContext)
2825
2825
  var SurfaceContext = React14.createContext(null);
2826
2826
  function MenuPresentation({ label, hint, icon: Icon3 }) {
2827
2827
  return /* @__PURE__ */ jsxs16(Fragment2, { children: [
2828
- Icon3 ? /* @__PURE__ */ jsx24(Icon3, { className: "matrx-alchemy-menu-icon" }) : null,
2828
+ Icon3 ? /* @__PURE__ */ jsx24(Icon3, { className: "matrx-alchemy-menu-icon" }) : /* @__PURE__ */ jsx24(PaletteGlyph, { file: true }),
2829
2829
  /* @__PURE__ */ jsxs16("span", { children: [
2830
2830
  label,
2831
2831
  hint ? /* @__PURE__ */ jsx24("small", { className: "matrx-alchemy-menu-hint", children: hint }) : null
@@ -2847,8 +2847,11 @@ function DestinationPresentation({ action }) {
2847
2847
  };
2848
2848
  const path2 = paths[action.id.replace(/^matrx:/, "")];
2849
2849
  return /* @__PURE__ */ jsxs16(Fragment2, { children: [
2850
- !action.icon ? path2 ? /* @__PURE__ */ jsx24("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__ */ jsx24("path", { d: path2 }) }) : /* @__PURE__ */ jsx24(PaletteGlyph, { file: true }) : null,
2851
- /* @__PURE__ */ jsx24(MenuPresentation, { ...action })
2850
+ action.icon ? /* @__PURE__ */ jsx24(action.icon, { className: "matrx-alchemy-menu-icon" }) : path2 ? /* @__PURE__ */ jsx24("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__ */ jsx24("path", { d: path2 }) }) : /* @__PURE__ */ jsx24(PaletteGlyph, { file: true }),
2851
+ /* @__PURE__ */ jsxs16("span", { children: [
2852
+ action.label,
2853
+ action.hint ? /* @__PURE__ */ jsx24("small", { className: "matrx-alchemy-menu-hint", children: action.hint }) : null
2854
+ ] })
2852
2855
  ] });
2853
2856
  }
2854
2857
  function ReceiptLink({ target }) {
@@ -2858,6 +2861,11 @@ function ReceiptLink({ target }) {
2858
2861
  ] }) : null;
2859
2862
  }
2860
2863
  function PaletteGlyph({ format, ai = false, file = false, kind }) {
2864
+ if (kind === "link") return /* @__PURE__ */ jsx24("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__ */ jsx24("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" }) });
2865
+ if (kind === "surface") return /* @__PURE__ */ jsxs16("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: [
2866
+ /* @__PURE__ */ jsx24("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
2867
+ /* @__PURE__ */ jsx24("path", { d: "M3 9h18M9 9v12" })
2868
+ ] });
2861
2869
  if (kind === "ai-copy") return /* @__PURE__ */ jsxs16("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: [
2862
2870
  /* @__PURE__ */ jsx24("rect", { x: "5", y: "5", width: "11", height: "14", rx: "2" }),
2863
2871
  /* @__PURE__ */ jsx24("path", { d: "M9 3h6a2 2 0 0 1 2 2v10" }),
@@ -3338,7 +3346,7 @@ function ContentTransferMenuSession({ references = [], referenceActions = [], so
3338
3346
  const presentation = options.action;
3339
3347
  const Icon3 = presentation?.icon;
3340
3348
  const fallbackLabel = options.file && !/^download\b/i.test(label2) ? `Download ${label2}` : label2;
3341
- return /* @__PURE__ */ jsxs16("button", { type: "button", className: "matrx-alchemy-palette-tile", "aria-label": presentation?.ariaLabel ?? (presentation ? fallbackLabel : options.ariaLabel ?? `${resolvedMode === "copy" ? "Copy" : "Download"} ${label2}`), onClick: () => {
3349
+ return /* @__PURE__ */ jsxs16("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: () => {
3342
3350
  closePalette();
3343
3351
  onClick();
3344
3352
  }, children: [
@@ -3400,7 +3408,7 @@ function ContentTransferMenuSession({ references = [], referenceActions = [], so
3400
3408
  /* @__PURE__ */ jsx24(PaletteGlyph, { kind: "ai-copy" }),
3401
3409
  /* @__PURE__ */ jsxs16("span", { children: [
3402
3410
  "Copy with AI context",
3403
- /* @__PURE__ */ jsx24("small", { className: "matrx-alchemy-menu-hint", children: "Content, source and capture details" })
3411
+ /* @__PURE__ */ jsx24("small", { className: "matrx-alchemy-menu-hint", children: "Include source context" })
3404
3412
  ] })
3405
3413
  ] }) : null, items: quickVariants("ai"), onRun: (variant) => {
3406
3414
  closePalette();
@@ -3413,32 +3421,44 @@ function ContentTransferMenuSession({ references = [], referenceActions = [], so
3413
3421
  /* @__PURE__ */ jsx24(PaletteGlyph, { kind: "sliders" }),
3414
3422
  /* @__PURE__ */ jsxs16("span", { children: [
3415
3423
  "Prepare for AI",
3416
- /* @__PURE__ */ jsx24("small", { className: "matrx-alchemy-menu-hint", children: "Review and edit before copying" })
3424
+ /* @__PURE__ */ jsx24("small", { className: "matrx-alchemy-menu-hint", children: "Trim, edit or summarize" })
3417
3425
  ] })
3418
3426
  ] }) })
3419
3427
  ] }) : null,
3420
3428
  prepareAvailable && (nearestWorkspaceKey || variants.length) ? /* @__PURE__ */ jsx24(PaletteRows, { title: "Other sources", items: [], extra: /* @__PURE__ */ jsxs16(Fragment2, { children: [
3421
- nearestWorkspaceKey && nearestSurface ? /* @__PURE__ */ jsx24("button", { type: "button", className: "matrx-alchemy-palette-row", onClick: () => {
3429
+ nearestWorkspaceKey && nearestSurface ? /* @__PURE__ */ jsxs16("button", { type: "button", className: "matrx-alchemy-palette-row", onClick: () => {
3422
3430
  closePalette();
3423
3431
  void openWorkspace(nearestWorkspaceKey, { source: nearestSurface, label: nearestSurface.surfaceName });
3424
- }, children: /* @__PURE__ */ jsx24("span", { children: "Prepare this surface" }) }) : null,
3432
+ }, children: [
3433
+ /* @__PURE__ */ jsx24(PaletteGlyph, { kind: "surface" }),
3434
+ /* @__PURE__ */ jsx24("span", { children: "Prepare this page" })
3435
+ ] }) : null,
3425
3436
  variants.map((variant) => /* @__PURE__ */ jsx24("button", { type: "button", className: "matrx-alchemy-palette-row", "aria-label": variant.ariaLabel, onClick: () => {
3426
3437
  closePalette();
3427
3438
  void openWorkspace(variantWorkspaceKeys.get(variant.id), variant);
3428
3439
  }, children: /* @__PURE__ */ jsx24(MenuPresentation, { ...variant, label: `Prepare ${variant.label}` }) }, variant.id))
3429
3440
  ] }) }) : null,
3430
3441
  references.length || referenceActions.length ? /* @__PURE__ */ jsxs16("section", { className: "matrx-alchemy-palette-section", children: [
3431
- /* @__PURE__ */ jsx24("h3", { children: "Live references" }),
3432
- /* @__PURE__ */ jsx24("p", { className: "matrx-alchemy-menu-hint", children: "Pointers to saved data, independent of filters and edits." }),
3433
- references.map((reference) => /* @__PURE__ */ jsx24("button", { type: "button", className: "matrx-alchemy-palette-row", onClick: () => void copyReference(reference), children: /* @__PURE__ */ jsx24("span", { children: reference.label }) }, reference.id)),
3434
- referenceActions.map((action) => /* @__PURE__ */ jsx24("button", { type: "button", className: "matrx-alchemy-palette-row", onClick: () => void openReference(action), children: /* @__PURE__ */ jsx24("span", { children: action.label }) }, action.id))
3442
+ /* @__PURE__ */ jsx24("h3", { children: "References" }),
3443
+ referenceActions.map((action) => /* @__PURE__ */ jsxs16("button", { type: "button", className: "matrx-alchemy-palette-row", onClick: () => void openReference(action), children: [
3444
+ /* @__PURE__ */ jsx24(PaletteGlyph, { kind: "link" }),
3445
+ /* @__PURE__ */ jsx24("span", { children: action.label }),
3446
+ /* @__PURE__ */ jsx24("svg", { className: "matrx-alchemy-disclosure", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", "aria-hidden": "true", children: /* @__PURE__ */ jsx24("path", { d: "m6 4 4 4-4 4" }) })
3447
+ ] }, action.id)),
3448
+ references.map((reference) => /* @__PURE__ */ jsxs16("button", { type: "button", className: "matrx-alchemy-palette-row", title: "Copies a reference to saved data", onClick: () => void copyReference(reference), children: [
3449
+ /* @__PURE__ */ jsx24(PaletteGlyph, { kind: "link" }),
3450
+ /* @__PURE__ */ jsx24("span", { children: reference.label })
3451
+ ] }, reference.id))
3435
3452
  ] }) : null,
3436
3453
  ["save", "chat", "email", "other"].map((group) => {
3437
3454
  const entries = ordinaryActions.filter((action) => (action.group ?? "other") === group);
3438
3455
  return entries.length ? /* @__PURE__ */ jsxs16("details", { className: "matrx-alchemy-palette-destinations", children: [
3439
3456
  /* @__PURE__ */ jsxs16("summary", { children: [
3440
3457
  group === "save" ? "Save to Matrx" : group === "chat" ? "Continue with AI" : group === "email" ? "Email to me" : "Actions",
3441
- /* @__PURE__ */ jsx24("span", { children: entries.length })
3458
+ /* @__PURE__ */ jsxs16("span", { className: "matrx-alchemy-disclosure-meta", children: [
3459
+ /* @__PURE__ */ jsx24("span", { children: entries.length }),
3460
+ /* @__PURE__ */ jsx24("svg", { className: "matrx-alchemy-disclosure", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", "aria-hidden": "true", children: /* @__PURE__ */ jsx24("path", { d: "m6 4 4 4-4 4" }) })
3461
+ ] })
3442
3462
  ] }),
3443
3463
  /* @__PURE__ */ jsx24("div", { children: entries.map((action) => /* @__PURE__ */ jsx24("button", { type: "button", className: "matrx-alchemy-palette-row", "aria-label": action.ariaLabel, onClick: () => {
3444
3464
  closePalette();