Restyle the panel on ComfyUI palette tokens and drop the built-in themes. Add a header with Back/Forward, Prev/Next, Focus, Lock and a searchable Go to node picker, a subgraph/group breadcrumb, and simplified modes: Follow glass or Float, plus Sticky, Follow selection and Lock to node (replaces Hold). Fix widget edits (step2 steps, INT/FLOAT, commit on Enter/blur, undo), subgraph lookups, orphaned dropdown menus, global arrow-key capture, the pop-out editor, and remove Google Fonts loading and dead code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
23 lines
591 B
JavaScript
23 lines
591 B
JavaScript
function formatWidgetValue(value, precision) {
|
|
if (value === null) return "null";
|
|
if (value === void 0) return "undefined";
|
|
if (typeof value === "number") {
|
|
return precision === void 0 ? String(value) : value.toFixed(precision);
|
|
}
|
|
if (typeof value === "object") {
|
|
try {
|
|
return JSON.stringify(value, null, 2);
|
|
} catch {
|
|
return Array.isArray(value) ? `Array(${value.length})` : "Object";
|
|
}
|
|
}
|
|
return String(value);
|
|
}
|
|
function isLongText(text) {
|
|
return text.length > 200 || text.split("\n").length > 4;
|
|
}
|
|
export {
|
|
formatWidgetValue,
|
|
isLongText
|
|
};
|