Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/react-arborist/src/context.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { createContext, useContext } from "react";
import type { TreeApi } from "./interfaces/tree-api.js";
import { RootState } from "./state/root-reducer.js";
import type { RootState } from "./state/root-reducer.js";

export const TreeApiContext = createContext<TreeApi<any> | null>(null);

Expand Down
2 changes: 1 addition & 1 deletion modules/react-arborist/src/data/create-list.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { NodeApi } from "../interfaces/node-api.js";
import type { NodeApi } from "../interfaces/node-api.js";
import type { TreeApi } from "../interfaces/tree-api.js";

export type ListResult<T> = {
Expand Down
2 changes: 1 addition & 1 deletion modules/react-arborist/src/dnd/drag-hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ConnectDragSource, useDrag } from "react-dnd";
import { getEmptyImage } from "react-dnd-html5-backend";
import { useTreeApi } from "../context.js";
import { NodeApi } from "../interfaces/node-api.js";
import { DragItem } from "../types/dnd.js";
import type { DragItem } from "../types/dnd.js";
import { TreeProps } from "../types/tree-props.js";
import { DropResult } from "./drop-hook.js";
import { actions as dnd } from "../state/dnd-slice.js";
Expand Down
2 changes: 1 addition & 1 deletion modules/react-arborist/src/dnd/drop-hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { RefObject } from "react";
import { ConnectDropTarget, useDrop } from "react-dnd";
import { useTreeApi } from "../context.js";
import type { NodeApi } from "../interfaces/node-api.js";
import { DragItem } from "../types/dnd.js";
import type { DragItem } from "../types/dnd.js";
import { computeDrop } from "./compute-drop.js";

export type DropResult = {
Expand Down
2 changes: 1 addition & 1 deletion modules/react-arborist/src/dnd/outer-drop-hook.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useDrop } from "react-dnd";
import { useTreeApi } from "../context.js";
import { DragItem } from "../types/dnd.js";
import type { DragItem } from "../types/dnd.js";
import { computeDrop } from "./compute-drop.js";
import { DropResult } from "./drop-hook.js";

Expand Down
2 changes: 1 addition & 1 deletion modules/react-arborist/src/state/initial.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TreeProps } from "../types/tree-props.js";
import type { TreeProps } from "../types/tree-props.js";
import type { RootState } from "./root-reducer.js";
import { initialDndState } from "./dnd-slice.js";
import { initialDragState } from "./drag-slice.js";
Expand Down
8 changes: 4 additions & 4 deletions modules/react-arborist/src/types/tree-props.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { BoolFunc } from "./utils.js";
import * as handlers from "./handlers.js";
import * as renderers from "./renderers.js";
import type * as handlers from "./handlers.js";
import type * as renderers from "./renderers.js";
import { ElementType, MouseEventHandler } from "react";
import { ListOnScrollProps, CommonProps as ReactWindowCommonProps } from "react-window";
import type { NodeApi } from "../interfaces/node-api.js";
import { OpenMap } from "../state/open-slice.js";
import { useDragDropManager, DndProviderProps } from "react-dnd";
import type { OpenMap } from "../state/open-slice.js";
import { useDragDropManager, type DndProviderProps } from "react-dnd";

/** Returns the height in pixels for a given node's row. */
export type RowHeightAccessor<T> = (node: NodeApi<T>) => number;
Expand Down
Loading