@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.
- package/CHANGELOG.md +20 -0
- package/dist/content-transfer.cjs +7 -2
- package/dist/content-transfer.cjs.map +1 -1
- package/dist/content-transfer.js +7 -2
- package/dist/content-transfer.js.map +1 -1
- package/dist/data-table/data-row-inspector.cjs +34 -3
- package/dist/data-table/data-row-inspector.cjs.map +1 -1
- package/dist/data-table/data-row-inspector.js +34 -3
- package/dist/data-table/data-row-inspector.js.map +1 -1
- package/dist/data-table/data-row-window.cjs +34 -3
- package/dist/data-table/data-row-window.cjs.map +1 -1
- package/dist/data-table/data-row-window.js +34 -3
- package/dist/data-table/data-row-window.js.map +1 -1
- package/dist/data-table/index.cjs +41 -35
- package/dist/data-table/index.cjs.map +1 -1
- package/dist/data-table/index.js +41 -35
- package/dist/data-table/index.js.map +1 -1
- package/dist/styles.css +1 -19
- package/package.json +1 -1
|
@@ -1247,9 +1247,14 @@ function PaletteGlyph({ format, ai = false, file = false, kind }) {
|
|
|
1247
1247
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { d: "M6 3h8l4 4v14H6z" }),
|
|
1248
1248
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { d: "M14 3v5h5M9 13h6M9 17h6" })
|
|
1249
1249
|
] });
|
|
1250
|
-
const path = format === "json" ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
|
|
1250
|
+
const path = format === "json" || format === "table-data" ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
|
|
1251
1251
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { d: "M9 4C7 4 7 7 5 7v3c2 0 2 1 2 2s0 2-2 2v3c2 0 2 3 4 3" }),
|
|
1252
1252
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { d: "M15 4c2 0 2 3 4 3v3c-2 0-2 1-2 2s0 2 2 2v3c-2 0-2 3-4 3" })
|
|
1253
|
+
] }) : format === "table-schema" ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
|
|
1254
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("rect", { x: "8", y: "3", width: "8", height: "5", rx: "1" }),
|
|
1255
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("rect", { x: "2", y: "16", width: "8", height: "5", rx: "1" }),
|
|
1256
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("rect", { x: "14", y: "16", width: "8", height: "5", rx: "1" }),
|
|
1257
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { d: "M12 8v4M6 16v-4h12v4" })
|
|
1253
1258
|
] }) : format === "compact-json" ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
|
|
1254
1259
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { d: "m14 10 7-7" }),
|
|
1255
1260
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { d: "M20 10h-6V4" }),
|
|
@@ -1708,7 +1713,7 @@ function ContentTransferMenuSession({ references = [], referenceActions = [], so
|
|
|
1708
1713
|
closePalette();
|
|
1709
1714
|
onClick();
|
|
1710
1715
|
}, children: [
|
|
1711
|
-
Icon2 ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Icon2, { className: "matrx-alchemy-menu-icon" }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(PaletteGlyph, {
|
|
1716
|
+
Icon2 ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Icon2, { className: "matrx-alchemy-menu-icon" }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(PaletteGlyph, { format: id, ai: Boolean(options.ai), file: options.file || Boolean(options.custom && id !== "table-data" && id !== "table-schema") }),
|
|
1712
1717
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { children: [
|
|
1713
1718
|
label2,
|
|
1714
1719
|
presentation?.hint ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("small", { className: "matrx-alchemy-menu-hint", children: presentation.hint }) : null
|
|
@@ -3173,6 +3178,32 @@ function isUuidValue(value) {
|
|
|
3173
3178
|
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);
|
|
3174
3179
|
}
|
|
3175
3180
|
|
|
3181
|
+
// src/data-table/filter-engine.ts
|
|
3182
|
+
function stringifyCellValue(value) {
|
|
3183
|
+
if (value == null) return "";
|
|
3184
|
+
if (typeof value === "string") return value;
|
|
3185
|
+
if (typeof value === "number" || typeof value === "boolean") {
|
|
3186
|
+
return String(value);
|
|
3187
|
+
}
|
|
3188
|
+
if (value instanceof Date) return value.toISOString();
|
|
3189
|
+
try {
|
|
3190
|
+
return JSON.stringify(value);
|
|
3191
|
+
} catch {
|
|
3192
|
+
return String(value);
|
|
3193
|
+
}
|
|
3194
|
+
}
|
|
3195
|
+
|
|
3196
|
+
// src/data-table/display-value.ts
|
|
3197
|
+
function formatTableDisplayValue(value) {
|
|
3198
|
+
if (typeof value === "number") return value.toLocaleString(void 0, { maximumFractionDigits: 12 });
|
|
3199
|
+
if (value instanceof Date) return value.toLocaleString();
|
|
3200
|
+
if (typeof value === "string" && /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}/.test(value) && !Number.isNaN(Date.parse(value))) {
|
|
3201
|
+
return new Date(value).toLocaleString();
|
|
3202
|
+
}
|
|
3203
|
+
if (typeof value === "boolean") return value ? "Yes" : "No";
|
|
3204
|
+
return stringifyCellValue(value) || "\u2014";
|
|
3205
|
+
}
|
|
3206
|
+
|
|
3176
3207
|
// src/data-table/DataRowInspector.tsx
|
|
3177
3208
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
3178
3209
|
var noFieldToken = () => null;
|
|
@@ -3245,7 +3276,7 @@ function DataRowInspector({
|
|
|
3245
3276
|
key
|
|
3246
3277
|
);
|
|
3247
3278
|
}
|
|
3248
|
-
const formatted = formatValue(value);
|
|
3279
|
+
const formatted = value !== null && typeof value === "object" && !(value instanceof Date) ? formatValue(value) : formatTableDisplayValue(value);
|
|
3249
3280
|
const multiline = formatted.includes("\n") || formatted.length > 80;
|
|
3250
3281
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
3251
3282
|
"div",
|