@ai-matrx/design-system 0.18.14 → 0.18.16

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.
@@ -2039,13 +2039,17 @@ function PaletteRows({ title, items, onRun, extra, ai = false, glyphKind, fallba
2039
2039
  if (!items.length && !extra) return null;
2040
2040
  return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("section", { className: "matrx-alchemy-palette-section", children: [
2041
2041
  /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("h3", { children: title }),
2042
- items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("button", { type: "button", className: cn("matrx-alchemy-palette-row", ai && "matrx-alchemy-palette-row-ai"), "aria-label": item.ariaLabel, onClick: () => onRun?.(item), children: [
2043
- item.icon ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(item.icon, { className: "matrx-alchemy-menu-icon" }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(PaletteGlyph, { ai, ...glyphKind ? { kind: glyphKind } : {} }),
2044
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { children: [
2045
- item.copyLabel ?? item.label,
2046
- item.hint ?? fallbackHint ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("small", { className: "matrx-alchemy-menu-hint", children: item.hint ?? fallbackHint }) : null
2047
- ] })
2048
- ] }, item.id)),
2042
+ items.map((item) => {
2043
+ const label = item.copyLabel ?? item.label;
2044
+ const hint = item.hint ?? fallbackHint;
2045
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("button", { type: "button", className: cn("matrx-alchemy-palette-row", ai && "matrx-alchemy-palette-row-ai"), "aria-label": item.ariaLabel ?? `${label}${hint ? ` ${hint}` : ""}`, onClick: () => onRun?.(item), children: [
2046
+ item.icon ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(item.icon, { className: "matrx-alchemy-menu-icon" }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(PaletteGlyph, { ai, ...glyphKind ? { kind: glyphKind } : {} }),
2047
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { children: [
2048
+ label,
2049
+ hint ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("small", { className: "matrx-alchemy-menu-hint", children: hint }) : null
2050
+ ] })
2051
+ ] }, item.id);
2052
+ }),
2049
2053
  extra
2050
2054
  ] });
2051
2055
  }
@@ -3006,15 +3010,18 @@ var structuredPayload = (value) => {
3006
3010
  );
3007
3011
  return {
3008
3012
  kind: "json",
3009
- value: (0, import_content_transfer2.normalizeTransferJson)({
3010
- kind: value.kind,
3011
- location: value.location,
3012
- description: value.description,
3013
- data: value.data,
3014
- ...value.summary !== void 0 ? { summary: value.summary } : {},
3015
- attributes: clean(value.attributes),
3016
- context: clean(value.context)
3017
- })
3013
+ value: (0, import_content_transfer2.normalizeTransferJson)(
3014
+ {
3015
+ kind: value.kind,
3016
+ location: value.location,
3017
+ description: value.description,
3018
+ data: value.data,
3019
+ ...value.summary !== void 0 ? { summary: value.summary } : {},
3020
+ attributes: clean(value.attributes),
3021
+ context: clean(value.context)
3022
+ },
3023
+ { omitUndefinedObjectProperties: true }
3024
+ )
3018
3025
  };
3019
3026
  };
3020
3027
  var actionDone = (message) => ({
@@ -3069,12 +3076,16 @@ function MatrxCopyMenuSession(props) {
3069
3076
  })) : void 0;
3070
3077
  const json = aiVisible && props.json !== void 0 ? make("json", () => ({
3071
3078
  kind: "json",
3072
- value: (0, import_content_transfer2.normalizeTransferJson)(resolve(props.json))
3079
+ value: (0, import_content_transfer2.normalizeTransferJson)(resolve(props.json), {
3080
+ omitUndefinedObjectProperties: true
3081
+ })
3073
3082
  })) : void 0;
3074
3083
  const agent = aiVisible && props.agent !== void 0 ? make("agent", () => asPayload(resolve(props.agent))) : void 0;
3075
3084
  const structuredAgent = aiVisible && props.agent !== void 0 ? make("structured-agent", () => structuredPayload(resolve(props.agent))) : void 0;
3076
3085
  const table = (exportVisible || props.primarySource === "table") && props.export?.sheetRows ? make("rows", () => {
3077
- const value = (0, import_content_transfer2.normalizeTransferJson)(props.export.sheetRows());
3086
+ const value = (0, import_content_transfer2.normalizeTransferJson)(props.export.sheetRows(), {
3087
+ omitUndefinedObjectProperties: true
3088
+ });
3078
3089
  if (!Array.isArray(value) || value.some(
3079
3090
  (row) => row === null || typeof row !== "object" || Array.isArray(row)
3080
3091
  ))
@@ -8663,7 +8674,7 @@ function MatrxDataTableCore({
8663
8674
  setSort({ id, direction: "desc" });
8664
8675
  return;
8665
8676
  }
8666
- setSort(null);
8677
+ setSort({ id, direction: "asc" });
8667
8678
  },
8668
8679
  filterKind: meta?.kind ?? null,
8669
8680
  filterValue: columnFilters[id],