Skip to content

Commit 87390e1

Browse files
committed
chore: move type out
1 parent 5488cab commit 87390e1

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

packages/core/src/controlledEnvironment/DraggingPositionEvaluation.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
import {
2-
DraggingPositionEvaluator,
3-
HoveringPosition,
4-
} from './DraggingPositionEvaluator';
1+
import { DraggingPositionEvaluator } from './DraggingPositionEvaluator';
52
import {
63
DraggingPosition,
4+
HoveringPosition,
75
LinearItem,
86
TreeEnvironmentContextProps,
97
TreeItem,

packages/core/src/controlledEnvironment/DraggingPositionEvaluator.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
11
import * as React from 'react';
22
import {
33
DraggingPosition,
4+
HoveringPosition,
45
TreeEnvironmentContextProps,
56
TreeItem,
67
} from '../types';
78
import { useGetGetParentOfLinearItem } from './useGetParentOfLinearItem';
89
import { isOutsideOfContainer } from './layoutUtils';
910
import { DraggingPositionEvaluation } from './DraggingPositionEvaluation';
1011

11-
// TODO move out
12-
export type HoveringPosition = {
13-
linearIndex: number;
14-
offset: 'bottom' | 'top' | undefined;
15-
indentation: number;
16-
};
17-
1812
// TODO move back into hook?
1913
export class DraggingPositionEvaluator {
2014
private env: TreeEnvironmentContextProps;

packages/core/src/types.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,3 +519,9 @@ export interface LiveDescriptors {
519519
*/
520520
programmaticallyDraggingTarget: string;
521521
}
522+
523+
export type HoveringPosition = {
524+
linearIndex: number;
525+
offset: 'bottom' | 'top' | undefined;
526+
indentation: number;
527+
};

0 commit comments

Comments
 (0)