Skip to content

Commit 2a84c10

Browse files
committed
refactor(studio): import POSITION_CHANNELS from its owner instead of a re-export
1 parent fc9a6a0 commit 2a84c10

3 files changed

Lines changed: 6 additions & 8 deletions

File tree

‎packages/studio/src/hooks/gsapRuntimeBridge.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ import {
4242
type GsapEditOutcome,
4343
} from "./gsapEditOutcome";
4444

45-
export { POSITION_CHANNELS };
4645
const POSITION_CHANNEL_SET = new Set<string>(POSITION_CHANNELS);
4746

4847
const ROTATION_CHANNELS: string[] = ["rotation", "rotationX", "rotationY", "rotationZ"];

‎packages/studio/src/hooks/useGsapAwareEditing.test.tsx‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ const mocks = vi.hoisted(() => ({
2222

2323
vi.mock("./gsapResizeIntercept", () => ({ tryGsapResizeIntercept: mocks.resize }));
2424
vi.mock("./gsapRuntimeBridge", () => ({
25-
POSITION_CHANNELS: ["x", "y"],
2625
tryGsapDragIntercept: mocks.drag,
2726
tryGsapRotationIntercept: vi.fn(),
2827
}));

‎packages/studio/src/hooks/useGsapAwareEditing.ts‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@
1010
import { useCallback } from "react";
1111
import type { GsapAnimation } from "@hyperframes/core/gsap-parser";
1212
import type { DomEditSelection } from "../components/editor/domEditingTypes";
13-
import {
14-
POSITION_CHANNELS,
15-
tryGsapDragIntercept,
16-
tryGsapRotationIntercept,
17-
} from "./gsapRuntimeBridge";
13+
import { tryGsapDragIntercept, tryGsapRotationIntercept } from "./gsapRuntimeBridge";
1814
import { tryGsapResizeIntercept } from "./gsapResizeIntercept";
1915
import { computeDraggedGsapPosition } from "./draggedGsapPosition";
2016
import { readGsapPositionFromIframe } from "./gsapPositionDetection";
@@ -33,7 +29,11 @@ import { setElementGsapPosition } from "../utils/elementGsap";
3329
import { logResize, logResizeSettle } from "../utils/resizeDebug";
3430
import type { DomEditGroupPathOffsetCommit } from "../components/editor/DomEditOverlay";
3531
import { runGestureTransaction } from "./gestureTransaction";
36-
import { gsapWritesPosition, hasNonHoldTweenForElement } from "./gsapRuntimeKeyframes";
32+
import {
33+
gsapWritesPosition,
34+
hasNonHoldTweenForElement,
35+
POSITION_CHANNELS,
36+
} from "./gsapRuntimeKeyframes";
3737
import { assertGsapEditPersisted, saveMove } from "./gsapEditOutcome";
3838
import type { GsapAnimationFetchOptions } from "./useGsapAnimationFetchFallback";
3939
import type { ElementOffsetStagerDeps } from "./elementOffsetStager";

0 commit comments

Comments
 (0)