From c411edb7c160c55e94fddf62fd60fa1e166351c0 Mon Sep 17 00:00:00 2001 From: Maze Winther Date: Mon, 6 Apr 2026 12:59:07 +0200 Subject: fix: clean up --- apps/web/src/lib/animation/target-resolver.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'apps/web/src/lib/animation/target-resolver.ts') diff --git a/apps/web/src/lib/animation/target-resolver.ts b/apps/web/src/lib/animation/target-resolver.ts index 06c9e140..64bb8709 100644 --- a/apps/web/src/lib/animation/target-resolver.ts +++ b/apps/web/src/lib/animation/target-resolver.ts @@ -32,9 +32,9 @@ export interface AnimationPathDescriptor { kind: AnimationBindingKind; defaultInterpolation: AnimationInterpolation; numericRanges?: Partial>; - coerceValue(value: AnimationValue): AnimationValue | null; - getBaseValue(): AnimationValue | null; - setBaseValue(value: AnimationValue): TimelineElement; + coerceValue: ({ value }: { value: AnimationValue }) => AnimationValue | null; + getBaseValue: () => AnimationValue | null; + setBaseValue: ({ value }: { value: AnimationValue }) => TimelineElement; } export function getParamValueKind({ @@ -135,9 +135,9 @@ function buildGraphicParamDescriptor({ kind: getParamValueKind({ param }), defaultInterpolation: getParamDefaultInterpolation({ param }), numericRanges: getParamNumericRange({ param }), - coerceValue: (value) => coerceAnimationValueForParam({ param, value }), + coerceValue: ({ value }) => coerceAnimationValueForParam({ param, value }), getBaseValue: () => element.params[param.key] ?? param.default, - setBaseValue: (value) => { + setBaseValue: ({ value }) => { const coercedValue = coerceAnimationValueForParam({ param, value }); if (coercedValue === null) { return element; @@ -183,9 +183,9 @@ function buildEffectParamDescriptor({ kind: getParamValueKind({ param }), defaultInterpolation: getParamDefaultInterpolation({ param }), numericRanges: getParamNumericRange({ param }), - coerceValue: (value) => coerceAnimationValueForParam({ param, value }), + coerceValue: ({ value }) => coerceAnimationValueForParam({ param, value }), getBaseValue: () => effect.params[param.key] ?? param.default, - setBaseValue: (value) => { + setBaseValue: ({ value }) => { const coercedValue = coerceAnimationValueForParam({ param, value }); if (coercedValue === null) { return element; @@ -239,7 +239,7 @@ export function resolveAnimationTarget({ kind: propertyDefinition.kind, defaultInterpolation: propertyDefinition.defaultInterpolation, numericRanges: propertyDefinition.numericRanges, - coerceValue: (value) => + coerceValue: ({ value }) => coerceAnimationValueForProperty({ propertyPath: path, value, @@ -249,7 +249,7 @@ export function resolveAnimationTarget({ element, propertyPath: path, }), - setBaseValue: (value) => { + setBaseValue: ({ value }) => { const coercedValue = propertyDefinition.coerceValue({ value }); if (coercedValue === null) { return element; -- cgit v1.3.1