refactor: auto ordered imports (#9163)

This commit is contained in:
Marcel Mraz
2025-03-12 15:23:31 +01:00
committed by GitHub
parent 82b9a6b464
commit 21ffaf4d76
421 changed files with 3532 additions and 2763 deletions
@@ -1,4 +1,6 @@
import React from "react";
import { vi } from "vitest";
import { DEFAULT_SIDEBAR } from "../../constants";
import { Excalidraw, Sidebar } from "../../index";
import {
@@ -10,7 +12,7 @@ import {
waitFor,
withExcalidrawDimensions,
} from "../../tests/test-utils";
import { vi } from "vitest";
import {
assertExcalidrawWithSidebar,
assertSidebarDockButton,
@@ -1,3 +1,4 @@
import clsx from "clsx";
import React, {
useEffect,
useLayoutEffect,
@@ -7,26 +8,28 @@ import React, {
useImperativeHandle,
useCallback,
} from "react";
import { Island } from "../Island";
import { atom, useSetAtom } from "../../editor-jotai";
import type { SidebarProps, SidebarPropsContextValue } from "./common";
import { SidebarPropsContext } from "./common";
import { SidebarHeader } from "./SidebarHeader";
import clsx from "clsx";
import { useDevice, useExcalidrawSetAppState } from "../App";
import { updateObject } from "../../utils";
import { KEYS } from "../../keys";
import { EVENT } from "../../constants";
import { SidebarTrigger } from "./SidebarTrigger";
import { SidebarTabTriggers } from "./SidebarTabTriggers";
import { useUIAppState } from "../../context/ui-appState";
import { atom, useSetAtom } from "../../editor-jotai";
import { useOutsideClick } from "../../hooks/useOutsideClick";
import { KEYS } from "../../keys";
import { updateObject } from "../../utils";
import { useDevice, useExcalidrawSetAppState } from "../App";
import { Island } from "../Island";
import { SidebarHeader } from "./SidebarHeader";
import { SidebarTabTrigger } from "./SidebarTabTrigger";
import { SidebarTabTriggers } from "./SidebarTabTriggers";
import { SidebarTrigger } from "./SidebarTrigger";
import { SidebarPropsContext } from "./common";
import { SidebarTabs } from "./SidebarTabs";
import { SidebarTab } from "./SidebarTab";
import { useUIAppState } from "../../context/ui-appState";
import { useOutsideClick } from "../../hooks/useOutsideClick";
import "./Sidebar.scss";
import type { SidebarProps, SidebarPropsContextValue } from "./common";
/**
* Flags whether the currently rendered Sidebar is docked or not, for use
* in upstream components that need to act on this (e.g. LayerUI to shift the
@@ -1,11 +1,13 @@
import clsx from "clsx";
import { useContext } from "react";
import { t } from "../../i18n";
import { useDevice } from "../App";
import { SidebarPropsContext } from "./common";
import { CloseIcon, PinIcon } from "../icons";
import { Tooltip } from "../Tooltip";
import { Button } from "../Button";
import { Tooltip } from "../Tooltip";
import { CloseIcon, PinIcon } from "../icons";
import { SidebarPropsContext } from "./common";
export const SidebarHeader = ({
children,
@@ -1,4 +1,5 @@
import * as RadixTabs from "@radix-ui/react-tabs";
import type { SidebarTabName } from "../../types";
export const SidebarTab = ({
@@ -1,4 +1,5 @@
import * as RadixTabs from "@radix-ui/react-tabs";
import type { SidebarTabName } from "../../types";
export const SidebarTabTrigger = ({
@@ -1,4 +1,5 @@
import * as RadixTabs from "@radix-ui/react-tabs";
import { useUIAppState } from "../../context/ui-appState";
import { useExcalidrawSetAppState } from "../App";
@@ -1,10 +1,12 @@
import { useExcalidrawSetAppState } from "../App";
import type { SidebarTriggerProps } from "./common";
import { useUIAppState } from "../../context/ui-appState";
import clsx from "clsx";
import { useUIAppState } from "../../context/ui-appState";
import { useExcalidrawSetAppState } from "../App";
import "./SidebarTrigger.scss";
import type { SidebarTriggerProps } from "./common";
export const SidebarTrigger = ({
name,
tab,
@@ -1,6 +1,7 @@
import type { JSX } from "react";
import React from "react";
import type { AppState, SidebarName, SidebarTabName } from "../../types";
import type { JSX } from "react";
export type SidebarTriggerProps = {
name: SidebarName;
@@ -1,4 +1,5 @@
import React from "react";
import { Excalidraw } from "../..";
import {
GlobalTestState,