ValyroUI English version

Node Canvas

Бесконечный холст нод: типизированные порты, связи, группы, мини-карта, выполнение графа. Pro · Изображения и генерация › Нод-граф

Установка

npx valyro-cli@latest login
npx valyro-cli@latest add node-canvas
npm install valyro-ui-pro

import 'valyro-ui-pro/styles.css';
import { NodeCanvas } from 'valyro-ui-pro';

Пропсы

PropTypeDefault
editorNodeGraphEditorState from useNodeGraph, shared with NodeInspector, NodeLibrary… Without it the canvas keeps its own.
typesreadonly NodeTypeDef[]Node type registry (when no editor is passed).
graphNodeGraphControlled graph (when no editor is passed).
defaultGraphNodeGraphInitial graph when uncontrolled.
onGraphChange(graph: NodeGraph) => voidCalled with the new graph when it changes.
executionReadonly<Record<string, NodeExecutionState>>NO_EXECUTIONRun state per node id: status, progress, error, output images.
errorsreadonly GraphError[]NO_ERRORSValidation problems to show: missing inputs get a red port and an error badge.
viewportViewportControlled viewport; use with onViewportChange.
defaultViewportViewportInitial viewport when uncontrolled.
onViewportChange(viewport: Viewport) => voidCalled with the new viewport when it changes.
fitViewOnMountbooleantrueFits the graph into view on mount (ignored with a controlled viewport).
minFitZoomnumber0.75Smallest zoom the fit on mount settles on, so ports and widgets stay readable. A graph that does not fit at it opens at its left and top edges, clear of the controls and minimap, moved just enough to show the selection; its right / bottom end is cut. The Fit button and apiRef.fitView() still show the whole graph.
minZoomnumber0.1Smallest zoom factor reachable by wheel, pinch, the zoom buttons and fit. @default 0.1
maxZoomnumber2.5Largest zoom factor reachable by wheel, pinch and the zoom buttons; fit never zooms past 1. @default 2.5
gridSizenumber20Grid spacing in canvas units, also the snap step. @default 20
snapToGridbooleanControlled snapToGrid; use with onSnapToGridChange.
defaultSnapToGridbooleanfalseInitial snapToGrid when uncontrolled.
onSnapToGridChange(snap: boolean) => voidCalled with the new snapToGrid when it changes.
lockedbooleanLocked: pan, zoom and select only.
defaultLockedbooleanfalseInitial locked when uncontrolled.
onLockedChange(locked: boolean) => voidCalled with the new locked when it changes.
minimapbooleantrueOverview map in the corner; click or drag in it to move the view. Hidden while the canvas is under 640 px wide or 360 px tall.
controlsbooleantrueZoom, fit, snap and lock buttons. @default true
portTypesPortTypeStylesWire colour / display name per socket type; defaults come from the theme's wire palette.
childrenReactNodeRendered over the canvas, e.g. a floating toolbar or run button.
localestringNumber formatting in widgets. Defaults to the ThemeProvider locale.
labelsPartial<NodeCanvasLabels>Overrides for the built-in English text; keys left out keep their defaults.
widgetLabelsPartial<NodeWidgetLabels>Text of the built-in node widgets: number steppers, seed controls and image upload.
apiRefRef<NodeCanvasApi>Imperative fit / zoom / focus.

Похожие компоненты

  • Node Library — Палитра нод: нечёткий поиск, категории, избранное, перетаскивание на холст
  • Node Inspector — Свойства выбранной ноды: заголовок, цвет, режим, параметры, порты
  • Execution Queue — Очередь и история запусков: прогресс, ETA, превью, отмена и повтор
  • Prompt Editor — Промпт и негатив: веса, LoRA, автодополнение, токены
  • Generation Settings — Модель, сэмплер, шаги, CFG, размер, пресеты
  • Aspect Ratio Picker — Соотношение сторон и точный размер
  • Seed Input — Сид: случайный, фиксированный, инкремент
  • LoRA Stack — Стек LoRA: силы, переключатели, порядок, триггеры
  • Style Presets — Карточки стилей с превью и весами
  • Reference Image Input — Референс для img2img и ControlNet
  • Generation Progress — Шаги, ETA, живое латентное превью, очередь
  • Image Result Grid — Галерея результатов, действия и лайтбокс

Назад: Image Adjustments · Далее: Node Library · Весь раздел «Изображения и генерация»