@particle-academy/fancy-flow 0.16.0 → 0.17.0
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/dist/{chunk-M2QTDA3B.js → chunk-532A5QA3.js} +25 -8
- package/dist/chunk-532A5QA3.js.map +1 -0
- package/dist/index.cjs +65 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.js +44 -17
- package/dist/index.js.map +1 -1
- package/dist/registry.cjs +23 -6
- package/dist/registry.cjs.map +1 -1
- package/dist/registry.js +1 -1
- package/dist/styles.css +27 -0
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-M2QTDA3B.js.map +0 -1
package/dist/registry.cjs
CHANGED
|
@@ -9576,15 +9576,32 @@ function DefaultBody({ config, kind }) {
|
|
|
9576
9576
|
] })
|
|
9577
9577
|
] });
|
|
9578
9578
|
}
|
|
9579
|
+
var truncate = (s, n = 30) => s.length > n ? s.slice(0, n - 1) + "\u2026" : s;
|
|
9580
|
+
function itemLabel(item) {
|
|
9581
|
+
if (item && typeof item === "object") {
|
|
9582
|
+
const o = item;
|
|
9583
|
+
const name = o.label ?? o.name ?? o.key ?? o.title ?? o.id;
|
|
9584
|
+
if (typeof name === "string" && name) return name;
|
|
9585
|
+
if (typeof name === "number") return String(name);
|
|
9586
|
+
return "item";
|
|
9587
|
+
}
|
|
9588
|
+
return String(item ?? "");
|
|
9589
|
+
}
|
|
9579
9590
|
function previewValue(v) {
|
|
9580
|
-
if (
|
|
9591
|
+
if (v === null || v === void 0) return "";
|
|
9592
|
+
if (typeof v === "string") return truncate(v);
|
|
9581
9593
|
if (typeof v === "number" || typeof v === "boolean") return String(v);
|
|
9582
|
-
|
|
9583
|
-
|
|
9584
|
-
|
|
9585
|
-
|
|
9586
|
-
return "
|
|
9594
|
+
if (Array.isArray(v)) {
|
|
9595
|
+
if (v.length === 0) return "none";
|
|
9596
|
+
const names = v.slice(0, 3).map(itemLabel).filter(Boolean).join(", ");
|
|
9597
|
+
const rest = v.length > 3 ? `, +${v.length - 3}` : "";
|
|
9598
|
+
return names ? truncate(names + rest) : `${v.length} item${v.length === 1 ? "" : "s"}`;
|
|
9599
|
+
}
|
|
9600
|
+
if (typeof v === "object") {
|
|
9601
|
+
const keys = Object.keys(v);
|
|
9602
|
+
return keys.length === 0 ? "empty" : `${keys.length} field${keys.length === 1 ? "" : "s"}`;
|
|
9587
9603
|
}
|
|
9604
|
+
return "\u2026";
|
|
9588
9605
|
}
|
|
9589
9606
|
function casePorts(cases) {
|
|
9590
9607
|
const byPort = /* @__PURE__ */ new Map();
|