Svelte API

Wrap components in Engine from @snap-engine/asset-base/svelte.

ComponentImportant props
Nodeid, nodeObject, x, y, width, height, resize configuration, callbacks, onGeometryCommit, onSizeChange, edgePan, metadata, LineSvelteComponent, className, elementProps
Connectorid, name, rules, custom-root snippet, surfaceStrategies, colliderRadius, metadata, callbacks
Lineline, SVG presentation
Selectcallbacks, className
GroupNode geometry plus title, headerContent, canContain, membership callbacks
Placementcontroller, cancellation options, preview snippet
ControlledGraphonLineChangeRequest (returns the next LineRecord[]), onDiagnosticsChanged

getNodeObject() exposes the underlying object from Node and Group; Connector.object() exposes its connector; Select.getSelectObject() exposes its RectSelectController. Supplied objects are not destroyed when the component unmounts.

Give Connector a child snippet to use a custom HTML or SVG input root. Apply the supplied action to one element; an SVG path with pointer-events="stroke" can make a whole node border draggable without a headless input route. LineRecord.payload stays opaque to the adapter and is available to custom LineSvelteComponent renderers through LineMirror. Custom renderers register line.bindGeometryWriter(...) on mount and mutate retained SVG, Canvas, or graphics refs directly.

Connector callbacks, metadata, policy, surface strategies, collider radius, and edge-pan behavior are reactive. name and connectorObject are construction-time identities.

Changed geometry props resynchronize the object deliberately. During a live pointer gesture core writes retained element geometry directly; the batched onGeometryCommit reports final values for application persistence.