Files
AEmotionStudio-ComfyUI-Magn…/web/info-panel/NodeDataExtractor.js
T
Æmotion StudioandClaude Opus 5.5 4b06ee92bb Update the Inspector panel look, navigation and editing
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>
2026-11-04 06:47:21 -08:00

45 lines
1.6 KiB
JavaScript

import { formatWidgetValue } from "./ValueFormatter.js";
import { WidgetSyncManager } from "./widget-editors/WidgetSyncManager.js";
const SKIP_WIDGET_NAMES = ["title", "node", "id", "type", "mode"];
function getImportantNodeParameters(nodeInfo) {
const parameters = [];
if (!nodeInfo.widgets || nodeInfo.widgets.length === 0) {
return parameters;
}
const inputs = nodeInfo.inputs || [];
const widgetSlot = (widget) => inputs.find((input) => {
var _a;
return ((_a = input.widget) == null ? void 0 : _a.name) === widget.name;
});
const createParameterItem = (widget) => {
var _a;
const widgetType = WidgetSyncManager.getWidgetType(widget);
const constraints = WidgetSyncManager.extractConstraints(widget);
const isLinked = !!widget.computedDisabled || ((_a = widgetSlot(widget)) == null ? void 0 : _a.link) != null;
const isEditable = !isLinked && WidgetSyncManager.isWidgetEditable(widget);
const isActionable = widgetType === "button";
return {
label: widget.label || widget.name,
value: formatWidgetValue(widget.value, constraints.precision),
// Editing metadata
widgetName: widget.name,
widgetType,
isEditable,
isActionable,
isLinked,
rawValue: widget.value,
constraints,
nodeId: nodeInfo.id
};
};
for (const widget of nodeInfo.widgets) {
if (widget.name && (!SKIP_WIDGET_NAMES.includes(widget.name.toLowerCase()) || widgetSlot(widget))) {
parameters.push(createParameterItem(widget));
}
}
return parameters;
}
export {
getImportantNodeParameters
};