@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.
@@ -2029,13 +2029,17 @@ function PaletteRows({ title, items, onRun, extra, ai = false, glyphKind, fallba
2029
2029
  if (!items.length && !extra) return null;
2030
2030
  return /* @__PURE__ */ jsxs13("section", { className: "matrx-alchemy-palette-section", children: [
2031
2031
  /* @__PURE__ */ jsx21("h3", { children: title }),
2032
- items.map((item) => /* @__PURE__ */ jsxs13("button", { type: "button", className: cn("matrx-alchemy-palette-row", ai && "matrx-alchemy-palette-row-ai"), "aria-label": item.ariaLabel, onClick: () => onRun?.(item), children: [
2033
- item.icon ? /* @__PURE__ */ jsx21(item.icon, { className: "matrx-alchemy-menu-icon" }) : /* @__PURE__ */ jsx21(PaletteGlyph, { ai, ...glyphKind ? { kind: glyphKind } : {} }),
2034
- /* @__PURE__ */ jsxs13("span", { children: [
2035
- item.copyLabel ?? item.label,
2036
- item.hint ?? fallbackHint ? /* @__PURE__ */ jsx21("small", { className: "matrx-alchemy-menu-hint", children: item.hint ?? fallbackHint }) : null
2037
- ] })
2038
- ] }, item.id)),
2032
+ items.map((item) => {
2033
+ const label = item.copyLabel ?? item.label;
2034
+ const hint = item.hint ?? fallbackHint;
2035
+ return /* @__PURE__ */ jsxs13("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: [
2036
+ item.icon ? /* @__PURE__ */ jsx21(item.icon, { className: "matrx-alchemy-menu-icon" }) : /* @__PURE__ */ jsx21(PaletteGlyph, { ai, ...glyphKind ? { kind: glyphKind } : {} }),
2037
+ /* @__PURE__ */ jsxs13("span", { children: [
2038
+ label,
2039
+ hint ? /* @__PURE__ */ jsx21("small", { className: "matrx-alchemy-menu-hint", children: hint }) : null
2040
+ ] })
2041
+ ] }, item.id);
2042
+ }),
2039
2043
  extra
2040
2044
  ] });
2041
2045
  }
@@ -2996,15 +3000,18 @@ var structuredPayload = (value) => {
2996
3000
  );
2997
3001
  return {
2998
3002
  kind: "json",
2999
- value: normalizeTransferJson({
3000
- kind: value.kind,
3001
- location: value.location,
3002
- description: value.description,
3003
- data: value.data,
3004
- ...value.summary !== void 0 ? { summary: value.summary } : {},
3005
- attributes: clean(value.attributes),
3006
- context: clean(value.context)
3007
- })
3003
+ value: normalizeTransferJson(
3004
+ {
3005
+ kind: value.kind,
3006
+ location: value.location,
3007
+ description: value.description,
3008
+ data: value.data,
3009
+ ...value.summary !== void 0 ? { summary: value.summary } : {},
3010
+ attributes: clean(value.attributes),
3011
+ context: clean(value.context)
3012
+ },
3013
+ { omitUndefinedObjectProperties: true }
3014
+ )
3008
3015
  };
3009
3016
  };
3010
3017
  var actionDone = (message) => ({
@@ -3059,12 +3066,16 @@ function MatrxCopyMenuSession(props) {
3059
3066
  })) : void 0;
3060
3067
  const json = aiVisible && props.json !== void 0 ? make("json", () => ({
3061
3068
  kind: "json",
3062
- value: normalizeTransferJson(resolve(props.json))
3069
+ value: normalizeTransferJson(resolve(props.json), {
3070
+ omitUndefinedObjectProperties: true
3071
+ })
3063
3072
  })) : void 0;
3064
3073
  const agent = aiVisible && props.agent !== void 0 ? make("agent", () => asPayload(resolve(props.agent))) : void 0;
3065
3074
  const structuredAgent = aiVisible && props.agent !== void 0 ? make("structured-agent", () => structuredPayload(resolve(props.agent))) : void 0;
3066
3075
  const table = (exportVisible || props.primarySource === "table") && props.export?.sheetRows ? make("rows", () => {
3067
- const value = normalizeTransferJson(props.export.sheetRows());
3076
+ const value = normalizeTransferJson(props.export.sheetRows(), {
3077
+ omitUndefinedObjectProperties: true
3078
+ });
3068
3079
  if (!Array.isArray(value) || value.some(
3069
3080
  (row) => row === null || typeof row !== "object" || Array.isArray(row)
3070
3081
  ))
@@ -8669,7 +8680,7 @@ function MatrxDataTableCore({
8669
8680
  setSort({ id, direction: "desc" });
8670
8681
  return;
8671
8682
  }
8672
- setSort(null);
8683
+ setSort({ id, direction: "asc" });
8673
8684
  },
8674
8685
  filterKind: meta?.kind ?? null,
8675
8686
  filterValue: columnFilters[id],