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