@ai-matrx/design-system 0.20.1 → 0.20.5

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.
@@ -1197,9 +1197,14 @@ function PaletteGlyph({ format, ai = false, file = false, kind }) {
1197
1197
  /* @__PURE__ */ jsx10("path", { d: "M6 3h8l4 4v14H6z" }),
1198
1198
  /* @__PURE__ */ jsx10("path", { d: "M14 3v5h5M9 13h6M9 17h6" })
1199
1199
  ] });
1200
- const path = format === "json" ? /* @__PURE__ */ jsxs5(Fragment, { children: [
1200
+ const path = format === "json" || format === "table-data" ? /* @__PURE__ */ jsxs5(Fragment, { children: [
1201
1201
  /* @__PURE__ */ jsx10("path", { d: "M9 4C7 4 7 7 5 7v3c2 0 2 1 2 2s0 2-2 2v3c2 0 2 3 4 3" }),
1202
1202
  /* @__PURE__ */ jsx10("path", { d: "M15 4c2 0 2 3 4 3v3c-2 0-2 1-2 2s0 2 2 2v3c-2 0-2 3-4 3" })
1203
+ ] }) : format === "table-schema" ? /* @__PURE__ */ jsxs5(Fragment, { children: [
1204
+ /* @__PURE__ */ jsx10("rect", { x: "8", y: "3", width: "8", height: "5", rx: "1" }),
1205
+ /* @__PURE__ */ jsx10("rect", { x: "2", y: "16", width: "8", height: "5", rx: "1" }),
1206
+ /* @__PURE__ */ jsx10("rect", { x: "14", y: "16", width: "8", height: "5", rx: "1" }),
1207
+ /* @__PURE__ */ jsx10("path", { d: "M12 8v4M6 16v-4h12v4" })
1203
1208
  ] }) : format === "compact-json" ? /* @__PURE__ */ jsxs5(Fragment, { children: [
1204
1209
  /* @__PURE__ */ jsx10("path", { d: "m14 10 7-7" }),
1205
1210
  /* @__PURE__ */ jsx10("path", { d: "M20 10h-6V4" }),
@@ -1658,7 +1663,7 @@ function ContentTransferMenuSession({ references = [], referenceActions = [], so
1658
1663
  closePalette();
1659
1664
  onClick();
1660
1665
  }, children: [
1661
- Icon2 ? /* @__PURE__ */ jsx10(Icon2, { className: "matrx-alchemy-menu-icon" }) : /* @__PURE__ */ jsx10(PaletteGlyph, { ...!options.custom ? { format: id } : {}, ...options.ai ? { ai: true } : {}, ...options.file ? { file: true } : {} }),
1666
+ Icon2 ? /* @__PURE__ */ jsx10(Icon2, { className: "matrx-alchemy-menu-icon" }) : /* @__PURE__ */ jsx10(PaletteGlyph, { format: id, ai: Boolean(options.ai), file: options.file || Boolean(options.custom && id !== "table-data" && id !== "table-schema") }),
1662
1667
  /* @__PURE__ */ jsxs5("span", { children: [
1663
1668
  label2,
1664
1669
  presentation?.hint ? /* @__PURE__ */ jsx10("small", { className: "matrx-alchemy-menu-hint", children: presentation.hint }) : null
@@ -3155,6 +3160,32 @@ function isUuidValue(value) {
3155
3160
  return typeof value === "string" && /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(value);
3156
3161
  }
3157
3162
 
3163
+ // src/data-table/filter-engine.ts
3164
+ function stringifyCellValue(value) {
3165
+ if (value == null) return "";
3166
+ if (typeof value === "string") return value;
3167
+ if (typeof value === "number" || typeof value === "boolean") {
3168
+ return String(value);
3169
+ }
3170
+ if (value instanceof Date) return value.toISOString();
3171
+ try {
3172
+ return JSON.stringify(value);
3173
+ } catch {
3174
+ return String(value);
3175
+ }
3176
+ }
3177
+
3178
+ // src/data-table/display-value.ts
3179
+ function formatTableDisplayValue(value) {
3180
+ if (typeof value === "number") return value.toLocaleString(void 0, { maximumFractionDigits: 12 });
3181
+ if (value instanceof Date) return value.toLocaleString();
3182
+ if (typeof value === "string" && /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}/.test(value) && !Number.isNaN(Date.parse(value))) {
3183
+ return new Date(value).toLocaleString();
3184
+ }
3185
+ if (typeof value === "boolean") return value ? "Yes" : "No";
3186
+ return stringifyCellValue(value) || "\u2014";
3187
+ }
3188
+
3158
3189
  // src/data-table/DataRowInspector.tsx
3159
3190
  import { jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
3160
3191
  var noFieldToken = () => null;
@@ -3227,7 +3258,7 @@ function DataRowInspector({
3227
3258
  key
3228
3259
  );
3229
3260
  }
3230
- const formatted = formatValue(value);
3261
+ const formatted = value !== null && typeof value === "object" && !(value instanceof Date) ? formatValue(value) : formatTableDisplayValue(value);
3231
3262
  const multiline = formatted.includes("\n") || formatted.length > 80;
3232
3263
  return /* @__PURE__ */ jsxs10(
3233
3264
  "div",