refactor: separate elements logic into a standalone package (#9285)

This commit is contained in:
Marcel Mraz
2025-03-26 15:24:59 +01:00
committed by GitHub
parent a18f059188
commit 432a46ef9e
372 changed files with 3466 additions and 2466 deletions

View File

@@ -1,7 +1,8 @@
import { useState, useLayoutEffect } from "react";
import { THEME } from "@excalidraw/common";
import { useDevice, useExcalidrawContainer } from "../components/App";
import { THEME } from "../constants";
import { useUIAppState } from "../context/ui-appState";
export const useCreatePortalContainer = (opts?: {

View File

@@ -1,7 +1,8 @@
import { exportToSvg } from "@excalidraw/utils/export";
import { useEffect, useState } from "react";
import { COLOR_PALETTE } from "../colors";
import { COLOR_PALETTE } from "@excalidraw/common";
import { atom, useAtom } from "../editor-jotai";
import type { LibraryItem } from "../types";

View File

@@ -1,6 +1,6 @@
import { useEffect } from "react";
import { EVENT } from "../constants";
import { EVENT } from "@excalidraw/common";
export function useOutsideClick<T extends HTMLElement>(
ref: React.RefObject<T | null>,