import type {PossibleVector2, Signal} from '@revideo/core'; import {Vector2} from '@revideo/core'; import type {Length} from '../partials'; import {compound} from './compound'; import {wrapper} from './signal'; export type Vector2LengthSignal = Signal< PossibleVector2, Vector2, TOwner > & { x: Signal; y: Signal; }; export function vector2Signal( prefix?: string | Record, ): PropertyDecorator { return (target, key) => { compound( typeof prefix === 'object' ? prefix : { x: prefix ? `${prefix}X` : 'x', y: prefix ? `${prefix}Y` : 'y', }, )(target, key); wrapper(Vector2)(target, key); }; }