UNPKG

@tokens-studio/graph-engine

Version:

An execution engine to handle Token Studios generators and resolvers

24 lines 822 B
import { ColorSchema, GradientStopSchema, NumberSchema } from '../../schemas/index.js'; import { Node } from '../../programmatic/node.js'; export default class NodeDefinition extends Node { static title = 'Gradient Stop'; static type = 'studio.tokens.gradient.stop'; static description = 'Create a gradient stop.'; constructor(props) { super(props); this.addInput('color', { type: ColorSchema }); this.addInput('position', { type: NumberSchema }); this.addOutput('gradientStop', { type: GradientStopSchema }); } execute() { const { color, position } = this.getAllInputs(); this.outputs.gradientStop.set({ color: color, position: position }); } } //# sourceMappingURL=gradientStop.js.map