From 93791018ada95ebf98774e486df422df5233547c Mon Sep 17 00:00:00 2001 From: Titouan Mathis Date: Wed, 15 Jan 2025 15:49:36 +0100 Subject: [PATCH 1/2] Fix a circular dependency --- packages/js-toolkit/services/DragService.ts | 3 ++- packages/js-toolkit/utils/tween.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/js-toolkit/services/DragService.ts b/packages/js-toolkit/services/DragService.ts index d61f0d64..fa4d74c1 100644 --- a/packages/js-toolkit/services/DragService.ts +++ b/packages/js-toolkit/services/DragService.ts @@ -1,7 +1,8 @@ import type { ServiceConfig, ServiceInterface } from './AbstractService.js'; import { AbstractService } from './AbstractService.js'; import { useRaf } from './RafService.js'; -import { isDefined, inertiaFinalValue } from '../utils/index.js'; +import { isDefined } from '../utils/is.js'; +import { inertiaFinalValue } from '../utils/math/index.js'; import { PASSIVE_EVENT_OPTIONS, CAPTURE_EVENT_OPTIONS } from './utils.js'; type DragLifecycle = 'start' | 'drag' | 'drop' | 'inertia' | 'stop'; diff --git a/packages/js-toolkit/utils/tween.ts b/packages/js-toolkit/utils/tween.ts index f8e8628e..51af0339 100644 --- a/packages/js-toolkit/utils/tween.ts +++ b/packages/js-toolkit/utils/tween.ts @@ -2,7 +2,7 @@ import { cubicBezier } from '@motionone/easing'; import { lerp, map, clamp01, damp, inertiaFinalValue } from './math/index.js'; import { isDefined, isArray, isNumber } from './is.js'; import { noop, noopValue as linear } from './noop.js'; -import { useRaf } from '../services/index.js'; +import { useRaf } from '../services/RafService.js'; import type { EasingFunction } from './math/createEases.js'; let id = 0; From 3451d0dc09ed378bc15353eb1b204c900f7838aa Mon Sep 17 00:00:00 2001 From: Titouan Mathis Date: Wed, 15 Jan 2025 15:51:59 +0100 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 655375ef..473cdb21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format ## [Unreleased] +### Fixed + +- Fix a circular dependency ([#573](https://github.com/studiometa/js-toolkit/pull/573), [93791018](https://github.com/studiometa/js-toolkit/commit/93791018)) + ## [v3.0.0-beta.3](https://github.com/studiometa/js-toolkit/compare/3.0.0-beta.2..3.0.0-beta.3) (2024-12-04) ### Added