Move components and css folder in src

This commit is contained in:
Deepen Timalsina 2025-04-15 20:15:16 +05:45
parent c9c6c47081
commit e75a7b45d6
288 changed files with 473 additions and 469 deletions

View file

@ -10,12 +10,12 @@ import { getDefaultAppState } from "@excalidraw/excalidraw/appState";
import {
CommandPalette,
DEFAULT_CATEGORIES,
} from "@excalidraw/excalidraw/components/CommandPalette/CommandPalette";
import { ErrorDialog } from "@excalidraw/excalidraw/components/ErrorDialog";
import { OverwriteConfirmDialog } from "@excalidraw/excalidraw/components/OverwriteConfirm/OverwriteConfirm";
import { openConfirmModal } from "@excalidraw/excalidraw/components/OverwriteConfirm/OverwriteConfirmState";
import { ShareableLinkDialog } from "@excalidraw/excalidraw/components/ShareableLinkDialog";
import Trans from "@excalidraw/excalidraw/components/Trans";
} from "@excalidraw/excalidraw/src/components/CommandPalette/CommandPalette";
import { ErrorDialog } from "@excalidraw/excalidraw/src/components/ErrorDialog";
import { OverwriteConfirmDialog } from "@excalidraw/excalidraw/src/components/OverwriteConfirm/OverwriteConfirm";
import { openConfirmModal } from "@excalidraw/excalidraw/src/components/OverwriteConfirm/OverwriteConfirmState";
import { ShareableLinkDialog } from "@excalidraw/excalidraw/src/components/ShareableLinkDialog";
import Trans from "@excalidraw/excalidraw/src/components/Trans";
import {
APP_NAME,
EVENT,
@ -46,7 +46,7 @@ import {
exportToPlus,
share,
youtubeIcon,
} from "@excalidraw/excalidraw/components/icons";
} from "@excalidraw/excalidraw/src/components/icons";
import { isElementLink } from "@excalidraw/element/elementLink";
import {
restore,

View file

@ -5,7 +5,7 @@ import {
zoomToFitBounds,
reconcileElements,
} from "@excalidraw/excalidraw";
import { ErrorDialog } from "@excalidraw/excalidraw/components/ErrorDialog";
import { ErrorDialog } from "@excalidraw/excalidraw/src/components/ErrorDialog";
import { APP_NAME, EVENT } from "@excalidraw/common";
import {
IDLE_THRESHOLD,

View file

@ -1,4 +1,4 @@
@import "../../packages/excalidraw/css/variables.module.scss";
@import "../../packages/excalidraw/src/css/variables.module.scss";
.excalidraw {
.collab-errors-button {

View file

@ -1,5 +1,5 @@
import { Tooltip } from "@excalidraw/excalidraw/components/Tooltip";
import { warning } from "@excalidraw/excalidraw/components/icons";
import { Tooltip } from "@excalidraw/excalidraw/src/components/Tooltip";
import { warning } from "@excalidraw/excalidraw/src/components/icons";
import clsx from "clsx";
import { useEffect, useRef, useState } from "react";

View file

@ -2,7 +2,7 @@ import {
loginIcon,
ExcalLogo,
eyeIcon,
} from "@excalidraw/excalidraw/components/icons";
} from "@excalidraw/excalidraw/src/components/icons";
import { MainMenu } from "@excalidraw/excalidraw/index";
import React from "react";

View file

@ -1,4 +1,4 @@
import { loginIcon } from "@excalidraw/excalidraw/components/icons";
import { loginIcon } from "@excalidraw/excalidraw/src/components/icons";
import { POINTER_EVENTS } from "@excalidraw/common";
import { useI18n } from "@excalidraw/excalidraw/i18n";
import { WelcomeScreen } from "@excalidraw/excalidraw/index";

View file

@ -2,7 +2,7 @@ import {
ArrowheadArrowIcon,
CloseIcon,
TrashIcon,
} from "@excalidraw/excalidraw/components/icons";
} from "@excalidraw/excalidraw/src/components/icons";
import {
bootstrapCanvas,
getNormalizedCanvasDimensions,

View file

@ -1,5 +1,5 @@
import { Tooltip } from "@excalidraw/excalidraw/components/Tooltip";
import { shield } from "@excalidraw/excalidraw/components/icons";
import { Tooltip } from "@excalidraw/excalidraw/src/components/Tooltip";
import { shield } from "@excalidraw/excalidraw/src/components/icons";
import { useI18n } from "@excalidraw/excalidraw/i18n";
export const EncryptedIcon = () => {

View file

@ -3,9 +3,9 @@ import { uploadBytes, ref } from "firebase/storage";
import { nanoid } from "nanoid";
import { trackEvent } from "@excalidraw/excalidraw/analytics";
import { Card } from "@excalidraw/excalidraw/components/Card";
import { ExcalidrawLogo } from "@excalidraw/excalidraw/components/ExcalidrawLogo";
import { ToolButton } from "@excalidraw/excalidraw/components/ToolButton";
import { Card } from "@excalidraw/excalidraw/src/components/Card";
import { ExcalidrawLogo } from "@excalidraw/excalidraw/src/components/ExcalidrawLogo";
import { ToolButton } from "@excalidraw/excalidraw/src/components/ToolButton";
import { MIME_TYPES, getFrame } from "@excalidraw/common";
import {
encryptData,

View file

@ -1,4 +1,4 @@
import Trans from "@excalidraw/excalidraw/components/Trans";
import Trans from "@excalidraw/excalidraw/src/components/Trans";
import { t } from "@excalidraw/excalidraw/i18n";
import * as Sentry from "@sentry/browser";
import React from "react";

View file

@ -1,4 +1,4 @@
@import "../../packages/excalidraw/css/variables.module.scss";
@import "../../packages/excalidraw/src/css/variables.module.scss";
.excalidraw {
.ShareDialog {

View file

@ -1,8 +1,8 @@
import { trackEvent } from "@excalidraw/excalidraw/analytics";
import { copyTextToSystemClipboard } from "@excalidraw/excalidraw/clipboard";
import { Dialog } from "@excalidraw/excalidraw/components/Dialog";
import { FilledButton } from "@excalidraw/excalidraw/components/FilledButton";
import { TextField } from "@excalidraw/excalidraw/components/TextField";
import { Dialog } from "@excalidraw/excalidraw/src/components/Dialog";
import { FilledButton } from "@excalidraw/excalidraw/src/components/FilledButton";
import { TextField } from "@excalidraw/excalidraw/src/components/TextField";
import {
copyIcon,
LinkIcon,
@ -11,7 +11,7 @@ import {
share,
shareIOS,
shareWindows,
} from "@excalidraw/excalidraw/components/icons";
} from "@excalidraw/excalidraw/src/components/icons";
import { useUIAppState } from "@excalidraw/excalidraw/src/context/ui-appState";
import { useCopyStatus } from "@excalidraw/excalidraw/src/hooks/useCopiedIndicator";
import { useI18n } from "@excalidraw/excalidraw/i18n";

View file

@ -140,7 +140,7 @@ export default defineConfig(({ mode }) => {
},
workbox: {
maximumFileSizeToCacheInBytes: 3000000,
maximumFileSizeToCacheInBytes: 3 * 1000 * 1000,
// don't precache fonts, locales and separate chunks
globIgnores: [
"fonts.css",

View file

@ -2,18 +2,18 @@ import React, { useEffect } from "react";
import { DEFAULT_UI_OPTIONS, isShallowEqual } from "@excalidraw/common";
import App from "./components/App";
import { InitializeApp } from "./components/InitializeApp";
import Footer from "./components/footer/FooterCenter";
import LiveCollaborationTrigger from "./components/live-collaboration/LiveCollaborationTrigger";
import MainMenu from "./components/main-menu/MainMenu";
import WelcomeScreen from "./components/welcome-screen/WelcomeScreen";
import App from "./src/components/App";
import { InitializeApp } from "./src/components/InitializeApp";
import Footer from "./src/components/footer/FooterCenter";
import LiveCollaborationTrigger from "./src/components/live-collaboration/LiveCollaborationTrigger";
import MainMenu from "./src/components/main-menu/MainMenu";
import WelcomeScreen from "./src/components/welcome-screen/WelcomeScreen";
import { defaultLang } from "./i18n";
import { EditorJotaiProvider, editorJotaiStore } from "./editor-jotai";
import polyfill from "./polyfill";
import "./css/app.scss";
import "./css/styles.scss";
import "./src/css/app.scss";
import "./src/css/styles.scss";
import "./fonts/fonts.css";
import type { AppProps, ExcalidrawProps } from "./types";
@ -276,18 +276,18 @@ export {
viewportCoordsToSceneCoords,
} from "@excalidraw/common";
export { Sidebar } from "./components/Sidebar/Sidebar";
export { Button } from "./components/Button";
export { Sidebar } from "./src/components/Sidebar/Sidebar";
export { Button } from "./src/components/Button";
export { Footer };
export { MainMenu };
export { useDevice } from "./components/App";
export { useDevice } from "./src/components/App";
export { WelcomeScreen };
export { LiveCollaborationTrigger };
export { Stats } from "./components/Stats";
export { Stats } from "./src/components/Stats";
export { DefaultSidebar } from "./components/DefaultSidebar";
export { TTDDialog } from "./components/TTDDialog/TTDDialog";
export { TTDDialogTrigger } from "./components/TTDDialog/TTDDialogTrigger";
export { DefaultSidebar } from "./src/components/DefaultSidebar";
export { TTDDialog } from "./src/components/TTDDialog/TTDDialog";
export { TTDDialogTrigger } from "./src/components/TTDDialog/TTDDialogTrigger";
export { zoomToFitBounds } from "./src/actions/actionCanvas";
export { convertToExcalidrawElements } from "./src/data/transform";
@ -302,7 +302,7 @@ export {
elementPartiallyOverlapsWithOrContainsBBox,
} from "@excalidraw/utils/withinBounds";
export { DiagramToCodePlugin } from "./components/DiagramToCodePlugin/DiagramToCodePlugin";
export { DiagramToCodePlugin } from "./src/components/DiagramToCodePlugin/DiagramToCodePlugin";
export { getDataURL } from "./src/data/blob";
export { isElementLink } from "@excalidraw/element/elementLink";

View file

@ -7,7 +7,7 @@ import { getClientColor } from "./clients";
import type { Trail } from "./src/animated-trail";
import type { AnimationFrameHandler } from "./src/animation-frame-handler";
import type App from "./components/App";
import type App from "./src/components/App";
import type { SocketId } from "./types";
export class LaserTrails implements Trail {

View file

@ -12,7 +12,7 @@ import type { ExcalidrawElement } from "@excalidraw/element/types";
import type { Alignment } from "@excalidraw/element/align";
import { ToolButton } from "../../components/ToolButton";
import { ToolButton } from "../components/ToolButton";
import {
AlignBottomIcon,
AlignLeftIcon,
@ -20,7 +20,7 @@ import {
AlignTopIcon,
CenterHorizontallyIcon,
CenterVerticallyIcon,
} from "../../components/icons";
} from "../components/icons";
import { t } from "../../i18n";

View file

@ -24,9 +24,9 @@ import {
isEraserActive,
isHandToolActive,
} from "../../appState";
import { ColorPicker } from "../../components/ColorPicker/ColorPicker";
import { ToolButton } from "../../components/ToolButton";
import { Tooltip } from "../../components/Tooltip";
import { ColorPicker } from "../components/ColorPicker/ColorPicker";
import { ToolButton } from "../components/ToolButton";
import { Tooltip } from "../components/Tooltip";
import {
handIcon,
LassoIcon,
@ -37,7 +37,7 @@ import {
ZoomInIcon,
ZoomOutIcon,
ZoomResetIcon,
} from "../../components/icons";
} from "../components/icons";
import { setCursor } from "../../cursor";
import { t } from "../../i18n";

View file

@ -11,12 +11,7 @@ import {
probablySupportsClipboardWriteText,
readSystemClipboard,
} from "../../clipboard";
import {
DuplicateIcon,
cutIcon,
pngIcon,
svgIcon,
} from "../../components/icons";
import { DuplicateIcon, cutIcon, pngIcon, svgIcon } from "../components/icons";
import { exportCanvas, prepareElementsForExport } from "../data/index";
import { t } from "../../i18n";

View file

@ -2,8 +2,8 @@ import { isImageElement } from "@excalidraw/element/typeChecks";
import type { ExcalidrawImageElement } from "@excalidraw/element/types";
import { ToolButton } from "../../components/ToolButton";
import { cropIcon } from "../../components/icons";
import { ToolButton } from "../components/ToolButton";
import { cropIcon } from "../components/icons";
import { t } from "../../i18n";
import { CaptureUpdateAction } from "../../store";

View file

@ -25,8 +25,8 @@ import type { ExcalidrawElement } from "@excalidraw/element/types";
import { t } from "../../i18n";
import { getSelectedElements, isSomeElementSelected } from "../scene";
import { CaptureUpdateAction } from "../../store";
import { TrashIcon } from "../../components/icons";
import { ToolButton } from "../../components/ToolButton";
import { TrashIcon } from "../components/icons";
import { ToolButton } from "../components/ToolButton";
import { register } from "./register";

View file

@ -12,11 +12,11 @@ import type { ExcalidrawElement } from "@excalidraw/element/types";
import type { Distribution } from "@excalidraw/element/distribute";
import { ToolButton } from "../../components/ToolButton";
import { ToolButton } from "../components/ToolButton";
import {
DistributeHorizontallyIcon,
DistributeVerticallyIcon,
} from "../../components/icons";
} from "../components/icons";
import { t } from "../../i18n";

View file

@ -27,8 +27,8 @@ import { duplicateElements } from "@excalidraw/element/duplicate";
import type { ExcalidrawElement } from "@excalidraw/element/types";
import { ToolButton } from "../../components/ToolButton";
import { DuplicateIcon } from "../../components/icons";
import { ToolButton } from "../components/ToolButton";
import { DuplicateIcon } from "../components/icons";
import { t } from "../../i18n";
import { isSomeElementSelected } from "../scene";

View file

@ -5,7 +5,7 @@ import {
} from "@excalidraw/element/elementLink";
import { copyTextToSystemClipboard } from "../../clipboard";
import { copyIcon, elementLinkIcon } from "../../components/icons";
import { copyIcon, elementLinkIcon } from "../components/icons";
import { t } from "../../i18n";
import { getSelectedElements } from "../scene";
import { CaptureUpdateAction } from "../../store";

View file

@ -6,7 +6,7 @@ import { isFrameLikeElement } from "@excalidraw/element/typeChecks";
import type { ExcalidrawElement } from "@excalidraw/element/types";
import { LockedIcon, UnlockedIcon } from "../../components/icons";
import { LockedIcon, UnlockedIcon } from "../components/icons";
import { getSelectedElements } from "../scene";
import { CaptureUpdateAction } from "../../store";

View file

@ -9,13 +9,13 @@ import { getNonDeletedElements } from "@excalidraw/element";
import type { Theme } from "@excalidraw/element/types";
import { useDevice } from "../../components/App";
import { CheckboxItem } from "../../components/CheckboxItem";
import { DarkModeToggle } from "../../components/DarkModeToggle";
import { ProjectName } from "../../components/ProjectName";
import { ToolButton } from "../../components/ToolButton";
import { Tooltip } from "../../components/Tooltip";
import { ExportIcon, questionCircle, saveAs } from "../../components/icons";
import { useDevice } from "../components/App";
import { CheckboxItem } from "../components/CheckboxItem";
import { DarkModeToggle } from "../components/DarkModeToggle";
import { ProjectName } from "../components/ProjectName";
import { ToolButton } from "../components/ToolButton";
import { Tooltip } from "../components/Tooltip";
import { ExportIcon, questionCircle, saveAs } from "../components/icons";
import { loadFromJSON, saveAsJSON } from "../data";
import { isImageFileHandle } from "../data/blob";
import { nativeFileSystemSupported } from "../data/filesystem";
@ -26,7 +26,7 @@ import { getSelectedElements, isSomeElementSelected } from "../scene";
import { getExportSize } from "../scene/export";
import { CaptureUpdateAction } from "../../store";
import "../../components/ToolIcon.scss";
import "../../src/components/ToolIcon.scss";
import { register } from "./register";

View file

@ -18,8 +18,8 @@ import { isInvisiblySmallElement } from "@excalidraw/element/sizeHelpers";
import { t } from "../../i18n";
import { resetCursor } from "../../cursor";
import { done } from "../../components/icons";
import { ToolButton } from "../../components/ToolButton";
import { done } from "../components/icons";
import { ToolButton } from "../components/ToolButton";
import { CaptureUpdateAction } from "../../store";
import { register } from "./register";

View file

@ -29,7 +29,7 @@ import type {
import { getSelectedElements } from "../scene";
import { CaptureUpdateAction } from "../../store";
import { flipHorizontal, flipVertical } from "../../components/icons";
import { flipHorizontal, flipVertical } from "../components/icons";
import { register } from "./register";

View file

@ -17,7 +17,7 @@ import { getCommonBounds } from "@excalidraw/element/bounds";
import type { ExcalidrawElement } from "@excalidraw/element/types";
import { setCursorForShape } from "../../cursor";
import { frameToolIcon } from "../../components/icons";
import { frameToolIcon } from "../components/icons";
import { getSelectedElements } from "../scene";
import { CaptureUpdateAction } from "../../store";

View file

@ -34,8 +34,8 @@ import type {
OrderedExcalidrawElement,
} from "@excalidraw/element/types";
import { ToolButton } from "../../components/ToolButton";
import { UngroupIcon, GroupIcon } from "../../components/icons";
import { ToolButton } from "../components/ToolButton";
import { UngroupIcon, GroupIcon } from "../components/icons";
import { t } from "../../i18n";

View file

@ -2,8 +2,8 @@ import { isWindows, KEYS, matchKey, arrayToMap } from "@excalidraw/common";
import type { SceneElementsMap } from "@excalidraw/element/types";
import { ToolButton } from "../../components/ToolButton";
import { UndoIcon, RedoIcon } from "../../components/icons";
import { ToolButton } from "../components/ToolButton";
import { UndoIcon, RedoIcon } from "../components/icons";
import { HistoryChangedEvent } from "../../history";
import { useEmitter } from "../hooks/useEmitter";
import { t } from "../../i18n";

View file

@ -4,9 +4,9 @@ import { isElbowArrow, isLinearElement } from "@excalidraw/element/typeChecks";
import type { ExcalidrawLinearElement } from "@excalidraw/element/types";
import { DEFAULT_CATEGORIES } from "../../components/CommandPalette/CommandPalette";
import { ToolButton } from "../../components/ToolButton";
import { lineEditorIcon } from "../../components/icons";
import { DEFAULT_CATEGORIES } from "../components/CommandPalette/CommandPalette";
import { ToolButton } from "../components/ToolButton";
import { lineEditorIcon } from "../components/icons";
import { t } from "../../i18n";
import { CaptureUpdateAction } from "../../store";

View file

@ -2,9 +2,9 @@ import { isEmbeddableElement } from "@excalidraw/element/typeChecks";
import { KEYS, getShortcutKey } from "@excalidraw/common";
import { ToolButton } from "../../components/ToolButton";
import { getContextMenuLabel } from "../../components/hyperlink/Hyperlink";
import { LinkIcon } from "../../components/icons";
import { ToolButton } from "../components/ToolButton";
import { getContextMenuLabel } from "../components/hyperlink/Hyperlink";
import { LinkIcon } from "../components/icons";
import { t } from "../../i18n";
import { getSelectedElements } from "../scene";

View file

@ -4,12 +4,8 @@ import { getNonDeletedElements } from "@excalidraw/element";
import { showSelectedShapeActions } from "@excalidraw/element/showSelectedShapeActions";
import { ToolButton } from "../../components/ToolButton";
import {
HamburgerMenuIcon,
HelpIconThin,
palette,
} from "../../components/icons";
import { ToolButton } from "../components/ToolButton";
import { HamburgerMenuIcon, HelpIconThin, palette } from "../components/icons";
import { t } from "../../i18n";
import { CaptureUpdateAction } from "../../store";

View file

@ -1,18 +1,18 @@
import clsx from "clsx";
import { getClientColor } from "../../clients";
import { Avatar } from "../../components/Avatar";
import { Avatar } from "../components/Avatar";
import {
eyeIcon,
microphoneIcon,
microphoneMutedIcon,
} from "../../components/icons";
} from "../components/icons";
import { t } from "../../i18n";
import { CaptureUpdateAction } from "../../store";
import { register } from "./register";
import type { GoToCollaboratorComponentProps } from "../../components/UserList";
import type { GoToCollaboratorComponentProps } from "../components/UserList";
import type { Collaborator } from "../../types";
export const actionGoToCollaborator = register({

View file

@ -72,14 +72,14 @@ import type {
} from "@excalidraw/element/types";
import { trackEvent } from "../../analytics";
import { ButtonIconSelect } from "../../components/ButtonIconSelect";
import { ColorPicker } from "../../components/ColorPicker/ColorPicker";
import { FontPicker } from "../../components/FontPicker/FontPicker";
import { IconPicker } from "../../components/IconPicker";
import { ButtonIconSelect } from "../components/ButtonIconSelect";
import { ColorPicker } from "../components/ColorPicker/ColorPicker";
import { FontPicker } from "../components/FontPicker/FontPicker";
import { IconPicker } from "../components/IconPicker";
// TODO barnabasmolnar/editor-redesign
// TextAlignTopIcon, TextAlignBottomIcon,TextAlignMiddleIcon,
// ArrowHead icons
import { Range } from "../../components/Range";
import { Range } from "../components/Range";
import {
ArrowheadArrowIcon,
ArrowheadBarIcon,
@ -121,7 +121,7 @@ import {
ArrowheadCrowfootIcon,
ArrowheadCrowfootOneIcon,
ArrowheadCrowfootOneOrManyIcon,
} from "../../components/icons";
} from "../components/icons";
import { Fonts } from "../../fonts";
import { getLanguage, t } from "../../i18n";

View file

@ -10,7 +10,7 @@ import type { ExcalidrawElement } from "@excalidraw/element/types";
import { CaptureUpdateAction } from "../../store";
import { selectAllIcon } from "../../components/icons";
import { selectAllIcon } from "../components/icons";
import { register } from "./register";

View file

@ -26,7 +26,7 @@ import {
import type { ExcalidrawTextElement } from "@excalidraw/element/types";
import { paintIcon } from "../../components/icons";
import { paintIcon } from "../components/icons";
import { t } from "../../i18n";
import { getSelectedElements } from "../scene";

View file

@ -1,6 +1,6 @@
import { CODES, KEYS } from "@excalidraw/common";
import { gridIcon } from "../../components/icons";
import { gridIcon } from "../components/icons";
import { CaptureUpdateAction } from "../../store";
import { register } from "./register";

View file

@ -1,6 +1,6 @@
import { CODES, KEYS } from "@excalidraw/common";
import { magnetIcon } from "../../components/icons";
import { magnetIcon } from "../components/icons";
import { CaptureUpdateAction } from "../../store";
import { register } from "./register";

View file

@ -5,7 +5,7 @@ import {
DEFAULT_SIDEBAR,
} from "@excalidraw/common";
import { searchIcon } from "../../components/icons";
import { searchIcon } from "../components/icons";
import { CaptureUpdateAction } from "../../store";
import { register } from "./register";

View file

@ -1,6 +1,6 @@
import { CODES, KEYS } from "@excalidraw/common";
import { abacusIcon } from "../../components/icons";
import { abacusIcon } from "../components/icons";
import { CaptureUpdateAction } from "../../store";
import { register } from "./register";

View file

@ -1,6 +1,6 @@
import { CODES, KEYS } from "@excalidraw/common";
import { eyeIcon } from "../../components/icons";
import { eyeIcon } from "../components/icons";
import { CaptureUpdateAction } from "../../store";
import { register } from "./register";

View file

@ -1,6 +1,6 @@
import { CODES, KEYS } from "@excalidraw/common";
import { coffeeIcon } from "../../components/icons";
import { coffeeIcon } from "../components/icons";
import { CaptureUpdateAction } from "../../store";
import { register } from "./register";

View file

@ -12,7 +12,7 @@ import {
BringToFrontIcon,
SendBackwardIcon,
SendToBackIcon,
} from "../../components/icons";
} from "../components/icons";
import { t } from "../../i18n";
import { CaptureUpdateAction } from "../../store";

View file

@ -9,7 +9,7 @@ import {
import type { LaserPointerOptions } from "@excalidraw/laser-pointer";
import type { AnimationFrameHandler } from "./animation-frame-handler";
import type App from "../components/App";
import type App from "./components/App";
import type { AppState } from "../types";
export interface Trail {

View file

@ -30,13 +30,13 @@ import type {
NonDeletedSceneElementsMap,
} from "@excalidraw/element/types";
import { actionToggleZenMode } from "../src/actions";
import { actionToggleZenMode } from "../actions";
import { alignActionsPredicate } from "../src/actions/actionAlign";
import { trackEvent } from "../analytics";
import { useTunnels } from "../src/context/tunnels";
import { alignActionsPredicate } from "../actions/actionAlign";
import { trackEvent } from "../../analytics";
import { useTunnels } from "../context/tunnels";
import { t } from "../i18n";
import { t } from "../../i18n";
import {
canChangeRoundness,
canHaveArrowheads,
@ -44,7 +44,7 @@ import {
hasBackground,
hasStrokeStyle,
hasStrokeWidth,
} from "../src/scene";
} from "../scene";
import { SHAPES } from "./shapes";
@ -65,8 +65,13 @@ import {
LassoIcon,
} from "./icons";
import type { AppClassProperties, AppProps, UIAppState, Zoom } from "../types";
import type { ActionManager } from "../src/actions/manager";
import type {
AppClassProperties,
AppProps,
UIAppState,
Zoom,
} from "../../types";
import type { ActionManager } from "../actions/manager";
export const canChangeStrokeColor = (
appState: UIAppState,

View file

@ -1,6 +1,6 @@
import { actionClearCanvas } from "../src/actions";
import { atom, useAtom } from "../editor-jotai";
import { t } from "../i18n";
import { actionClearCanvas } from "../actions";
import { atom, useAtom } from "../../editor-jotai";
import { t } from "../../i18n";
import { useExcalidrawActionManager } from "./App";
import ConfirmDialog from "./ConfirmDialog";

View file

@ -362,42 +362,43 @@ import {
actionToggleLinearEditor,
actionToggleObjectsSnapMode,
actionToggleCropEditor,
} from "../src/actions";
import { actionWrapTextInContainer } from "../src/actions/actionBoundText";
import { actionToggleHandTool, zoomToFit } from "../src/actions/actionCanvas";
import { actionPaste } from "../src/actions/actionClipboard";
import { actionCopyElementLink } from "../src/actions/actionElementLink";
import { actionUnlockAllElements } from "../src/actions/actionElementLock";
} from "../actions";
import { actionWrapTextInContainer } from "../actions/actionBoundText";
import { actionToggleHandTool, zoomToFit } from "../actions/actionCanvas";
import { actionPaste } from "../actions/actionClipboard";
import { actionCopyElementLink } from "../actions/actionElementLink";
import { actionUnlockAllElements } from "../actions/actionElementLock";
import {
actionRemoveAllElementsFromFrame,
actionSelectAllElementsInFrame,
actionWrapSelectionInFrame,
} from "../src/actions/actionFrame";
import {
createRedoAction,
createUndoAction,
} from "../src/actions/actionHistory";
import { actionTextAutoResize } from "../src/actions/actionTextAutoResize";
import { actionToggleViewMode } from "../src/actions/actionToggleViewMode";
import { ActionManager } from "../src/actions/manager";
import { actions } from "../src/actions/register";
import { getShortcutFromShortcutName } from "../src/actions/shortcuts";
import { trackEvent } from "../analytics";
import { AnimationFrameHandler } from "../src/animation-frame-handler";
} from "../actions/actionFrame";
import { createRedoAction, createUndoAction } from "../actions/actionHistory";
import { actionTextAutoResize } from "../actions/actionTextAutoResize";
import { actionToggleViewMode } from "../actions/actionToggleViewMode";
import { ActionManager } from "../actions/manager";
import { actions } from "../actions/register";
import { getShortcutFromShortcutName } from "../actions/shortcuts";
import { trackEvent } from "../../analytics";
import { AnimationFrameHandler } from "../animation-frame-handler";
import {
getDefaultAppState,
isEraserActive,
isHandToolActive,
} from "../appState";
import { copyTextToSystemClipboard, parseClipboard } from "../clipboard";
import { exportCanvas, loadFromBlob } from "../src/data";
import Library, {
distributeLibraryItemsOnSquareGrid,
} from "../src/data/library";
import { restore, restoreElements } from "../src/data/restore";
import { getCenter, getDistance } from "../gesture";
import { History } from "../history";
import { defaultLang, getLanguage, languages, setLanguage, t } from "../i18n";
} from "../../appState";
import { copyTextToSystemClipboard, parseClipboard } from "../../clipboard";
import { exportCanvas, loadFromBlob } from "../data";
import Library, { distributeLibraryItemsOnSquareGrid } from "../data/library";
import { restore, restoreElements } from "../data/restore";
import { getCenter, getDistance } from "../../gesture";
import { History } from "../../history";
import {
defaultLang,
getLanguage,
languages,
setLanguage,
t,
} from "../../i18n";
import {
calculateScrollCenter,
@ -406,9 +407,9 @@ import {
getSelectedElements,
hasBackground,
isSomeElementSelected,
} from "../src/scene";
import Scene from "../src/scene/Scene";
import { getStateForZoom } from "../src/scene/zoom";
} from "../scene";
import Scene from "../scene/Scene";
import { getStateForZoom } from "../scene/zoom";
import {
dataURLToFile,
dataURLToString,
@ -424,18 +425,18 @@ import {
parseLibraryJSON,
resizeImageFile,
SVGStringToFile,
} from "../src/data/blob";
} from "../data/blob";
import { fileOpen } from "../src/data/filesystem";
import { fileOpen } from "../data/filesystem";
import {
showHyperlinkTooltip,
hideHyperlinkToolip,
Hyperlink,
} from "../components/hyperlink/Hyperlink";
} from "./hyperlink/Hyperlink";
import { Fonts } from "../fonts";
import { editorJotaiStore } from "../editor-jotai";
import { ImageSceneDataError } from "../errors";
import { Fonts } from "../../fonts";
import { editorJotaiStore } from "../../editor-jotai";
import { ImageSceneDataError } from "../../errors";
import {
getSnapLinesAtPointer,
snapDraggedElements,
@ -447,27 +448,30 @@ import {
getReferenceSnapPoints,
SnapCache,
isGridModeEnabled,
} from "../snapping";
import { convertToExcalidrawElements } from "../src/data/transform";
import { Renderer } from "../src/scene/Renderer";
} from "../../snapping";
import { convertToExcalidrawElements } from "../data/transform";
import { Renderer } from "../scene/Renderer";
import {
setEraserCursor,
setCursor,
resetCursor,
setCursorForShape,
} from "../cursor";
import { Emitter } from "../emitter";
import { ElementCanvasButtons } from "../components/ElementCanvasButtons";
import { Store, CaptureUpdateAction } from "../store";
import { AnimatedTrail } from "../src/animated-trail";
import { LaserTrails } from "../laser-trails";
import { withBatchedUpdates, withBatchedUpdatesThrottled } from "../reactUtils";
import { textWysiwyg } from "../src/wysiwyg/textWysiwyg";
import { isOverScrollBars } from "../src/scene/scrollbars";
} from "../../cursor";
import { Emitter } from "../../emitter";
import { ElementCanvasButtons } from "./ElementCanvasButtons";
import { Store, CaptureUpdateAction } from "../../store";
import { AnimatedTrail } from "../animated-trail";
import { LaserTrails } from "../../laser-trails";
import {
withBatchedUpdates,
withBatchedUpdatesThrottled,
} from "../../reactUtils";
import { textWysiwyg } from "../wysiwyg/textWysiwyg";
import { isOverScrollBars } from "../scene/scrollbars";
import { isMaybeMermaidDefinition } from "../mermaid";
import { isMaybeMermaidDefinition } from "../../mermaid";
import { LassoTrail } from "../src/lasso";
import { LassoTrail } from "../lasso";
import { activeConfirmDialogAtom } from "./ActiveConfirmDialog";
import BraveMeasureTextError from "./BraveMeasureTextError";
@ -493,13 +497,13 @@ import { findShapeByKey } from "./shapes";
import type {
RenderInteractiveSceneCallback,
ScrollBars,
} from "../src/scene/types";
} from "../scene/types";
import type { PastedMixedContent } from "../clipboard";
import type { ExportedElements } from "../src/data";
import type { PastedMixedContent } from "../../clipboard";
import type { ExportedElements } from "../data";
import type { ContextMenuItems } from "./ContextMenu";
import type { FileSystemHandle } from "../src/data/filesystem";
import type { ExcalidrawElementSkeleton } from "../src/data/transform";
import type { FileSystemHandle } from "../data/filesystem";
import type { ExcalidrawElementSkeleton } from "../data/transform";
import type {
AppClassProperties,
@ -528,9 +532,9 @@ import type {
GenerateDiagramToCode,
NullableGridSize,
Offsets,
} from "../types";
} from "../../types";
import type { RoughCanvas } from "roughjs/bin/canvas";
import type { Action, ActionResult } from "../src/actions/types";
import type { Action, ActionResult } from "../actions/types";
const AppContext = React.createContext<AppClassProperties>(null!);
const AppPropsContext = React.createContext<AppProps>(null!);

View file

@ -1,7 +1,7 @@
import clsx from "clsx";
import React, { useState } from "react";
import { getNameInitial } from "../clients";
import { getNameInitial } from "../../clients";
import "./Avatar.scss";

View file

@ -3,8 +3,8 @@ import { useCallback, useEffect, useRef, useState } from "react";
import { KEYS, getShortcutKey } from "@excalidraw/common";
import { useAtom } from "../../editor-jotai";
import { t } from "../../i18n";
import { useAtom } from "../../../editor-jotai";
import { t } from "../../../i18n";
import { useDevice } from "../App";
import { activeEyeDropperAtom } from "../EyeDropper";
import { eyeDropperIcon } from "../icons";

View file

@ -12,8 +12,8 @@ import type { ColorTuple, ColorPaletteCustom } from "@excalidraw/common";
import type { ExcalidrawElement } from "@excalidraw/element/types";
import { useAtom } from "../../editor-jotai";
import { t } from "../../i18n";
import { useAtom } from "../../../editor-jotai";
import { t } from "../../../i18n";
import { useExcalidrawContainer } from "../App";
import { ButtonSeparator } from "../ButtonSeparator";
import { activeEyeDropperAtom } from "../EyeDropper";
@ -29,7 +29,7 @@ import "./ColorPicker.scss";
import type { ColorPickerType } from "./colorPickerUtils";
import type { AppState } from "../../types";
import type { AppState } from "../../../types";
const isValidColor = (color: string) => {
const style = new Option().style;

View file

@ -1,7 +1,7 @@
import clsx from "clsx";
import { useEffect, useRef } from "react";
import { useAtom } from "../../editor-jotai";
import { useAtom } from "../../../editor-jotai";
import HotkeyLabel from "./HotkeyLabel";
import { activeColorPickerSectionAtom } from "./colorPickerUtils";

View file

@ -12,8 +12,8 @@ import type { ExcalidrawElement } from "@excalidraw/element/types";
import type { ColorPaletteCustom } from "@excalidraw/common";
import { useAtom } from "../../editor-jotai";
import { t } from "../../i18n";
import { useAtom } from "../../../editor-jotai";
import { t } from "../../../i18n";
import { CustomColorList } from "./CustomColorList";
import PickerColorList from "./PickerColorList";

View file

@ -3,8 +3,8 @@ import { useEffect, useRef } from "react";
import type { ColorPaletteCustom } from "@excalidraw/common";
import { useAtom } from "../../editor-jotai";
import { t } from "../../i18n";
import { useAtom } from "../../../editor-jotai";
import { t } from "../../../i18n";
import HotkeyLabel from "./HotkeyLabel";
import {
@ -13,7 +13,7 @@ import {
getColorNameAndShadeFromColor,
} from "./colorPickerUtils";
import type { TranslationKeys } from "../../i18n";
import type { TranslationKeys } from "../../../i18n";
interface PickerColorListProps {
palette: ColorPaletteCustom;

View file

@ -3,8 +3,8 @@ import { useEffect, useRef } from "react";
import type { ColorPaletteCustom } from "@excalidraw/common";
import { useAtom } from "../../editor-jotai";
import { t } from "../../i18n";
import { useAtom } from "../../../editor-jotai";
import { t } from "../../../i18n";
import HotkeyLabel from "./HotkeyLabel";
import {

View file

@ -4,7 +4,7 @@ import type { ExcalidrawElement } from "@excalidraw/element/types";
import type { ColorPickerColor, ColorPaletteCustom } from "@excalidraw/common";
import { atom } from "../../editor-jotai";
import { atom } from "../../../editor-jotai";
export const getColorNameAndShadeFromColor = ({
palette,

View file

@ -17,17 +17,17 @@ import {
actionClearCanvas,
actionLink,
actionToggleSearchMenu,
} from "../../src/actions";
} from "../../actions";
import {
actionCopyElementLink,
actionLinkToElement,
} from "../../src/actions/actionElementLink";
import { getShortcutFromShortcutName } from "../../src/actions/shortcuts";
import { trackEvent } from "../../analytics";
import { useUIAppState } from "../../src/context/ui-appState";
import { deburr } from "../../deburr";
import { atom, useAtom, editorJotaiStore } from "../../editor-jotai";
import { t } from "../../i18n";
} from "../../actions/actionElementLink";
import { getShortcutFromShortcutName } from "../../actions/shortcuts";
import { trackEvent } from "../../../analytics";
import { useUIAppState } from "../../context/ui-appState";
import { deburr } from "../../../deburr";
import { atom, useAtom, editorJotaiStore } from "../../../editor-jotai";
import { t } from "../../../i18n";
import {
useApp,
useAppProps,
@ -37,7 +37,7 @@ import {
import { Dialog } from "../Dialog";
import { InlineIcon } from "../InlineIcon";
import { TextField } from "../TextField";
import { getSelectedElements } from "../../src/scene";
import { getSelectedElements } from "../../scene";
import {
LockedIcon,
UnlockedIcon,
@ -53,19 +53,19 @@ import {
import { SHAPES } from "../shapes";
import { canChangeBackgroundColor, canChangeStrokeColor } from "../Actions";
import { useStableCallback } from "../../src/hooks/useStableCallback";
import { useStableCallback } from "../../hooks/useStableCallback";
import { activeConfirmDialogAtom } from "../ActiveConfirmDialog";
import { useStable } from "../../src/hooks/useStable";
import { useStable } from "../../hooks/useStable";
import * as defaultItems from "./defaultCommandPaletteItems";
import "./CommandPalette.scss";
import type { CommandPaletteItem } from "./types";
import type { AppProps, AppState, UIAppState } from "../../types";
import type { ShortcutName } from "../../src/actions/shortcuts";
import type { TranslationKeys } from "../../i18n";
import type { Action } from "../../src/actions/types";
import type { AppProps, AppState, UIAppState } from "../../../types";
import type { ShortcutName } from "../../actions/shortcuts";
import type { TranslationKeys } from "../../../i18n";
import type { Action } from "../../actions/types";
const lastUsedPaletteItem = atom<CommandPaletteItem | null>(null);

View file

@ -1,4 +1,4 @@
import { actionToggleTheme } from "../../src/actions";
import { actionToggleTheme } from "../../actions";
import type { CommandPaletteItem } from "./types";

View file

@ -1,6 +1,6 @@
import type { ActionManager } from "../../src/actions/manager";
import type { Action } from "../../src/actions/types";
import type { UIAppState } from "../../types";
import type { ActionManager } from "../../actions/manager";
import type { Action } from "../../actions/types";
import type { UIAppState } from "../../../types";
export type CommandPaletteItem = {
label: string;

View file

@ -1,7 +1,7 @@
import { flushSync } from "react-dom";
import { useSetAtom } from "../editor-jotai";
import { t } from "../i18n";
import { useSetAtom } from "../../editor-jotai";
import { t } from "../../i18n";
import { Dialog } from "./Dialog";
import DialogActionButton from "./DialogActionButton";

View file

@ -1,8 +1,8 @@
import clsx from "clsx";
import React from "react";
import { getShortcutFromShortcutName } from "../src/actions/shortcuts";
import { t } from "../i18n";
import { getShortcutFromShortcutName } from "../actions/shortcuts";
import { t } from "../../i18n";
import { useExcalidrawAppState, useExcalidrawElements } from "./App";
@ -10,11 +10,11 @@ import { Popover } from "./Popover";
import "./ContextMenu.scss";
import type { ActionManager } from "../src/actions/manager";
import type { ShortcutName } from "../src/actions/shortcuts";
import type { Action } from "../src/actions/types";
import type { ActionManager } from "../actions/manager";
import type { ShortcutName } from "../actions/shortcuts";
import type { Action } from "../actions/types";
import type { TranslationKeys } from "../i18n";
import type { TranslationKeys } from "../../i18n";
export type ContextMenuItem = typeof CONTEXT_MENU_SEPARATOR | Action;

View file

@ -2,7 +2,7 @@ import { THEME } from "@excalidraw/common";
import type { Theme } from "@excalidraw/element/types";
import { t } from "../i18n";
import { t } from "../../i18n";
import { ToolButton } from "./ToolButton";

View file

@ -9,8 +9,8 @@ import {
import type { MarkOptional, Merge } from "@excalidraw/common/utility-types";
import { useTunnels } from "../src/context/tunnels";
import { useUIAppState } from "../src/context/ui-appState";
import { useTunnels } from "../context/tunnels";
import { useUIAppState } from "../context/ui-appState";
import "../components/dropdownMenu/DropdownMenu.scss";

View file

@ -2,7 +2,7 @@ import { useLayoutEffect } from "react";
import { useApp } from "../App";
import type { GenerateDiagramToCode } from "../../types";
import type { GenerateDiagramToCode } from "../../../types";
export const DiagramToCodePlugin = (props: {
generate: GenerateDiagramToCode;

View file

@ -3,9 +3,9 @@ import React, { useEffect, useState } from "react";
import { KEYS, queryFocusableElements } from "@excalidraw/common";
import { useSetAtom } from "../editor-jotai";
import { useCallbackRefState } from "../src/hooks/useCallbackRefState";
import { t } from "../i18n";
import { useSetAtom } from "../../editor-jotai";
import { useCallbackRefState } from "../hooks/useCallbackRefState";
import { t } from "../../i18n";
import {
useExcalidrawContainer,

View file

@ -6,11 +6,11 @@ import type {
NonDeletedExcalidrawElement,
} from "@excalidraw/element/types";
import { useExcalidrawAppState } from "../components/App";
import { useExcalidrawAppState } from "./App";
import "./ElementCanvasButtons.scss";
import type { AppState } from "../types";
import type { AppState } from "../../types";
const CONTAINER_PADDING = 5;

View file

@ -10,8 +10,8 @@ import { mutateElement } from "@excalidraw/element/mutateElement";
import type { ElementsMap, ExcalidrawElement } from "@excalidraw/element/types";
import { t } from "../i18n";
import { getSelectedElements } from "../src/scene";
import { t } from "../../i18n";
import { getSelectedElements } from "../scene";
import DialogActionButton from "./DialogActionButton";
import { TextField } from "./TextField";
@ -20,7 +20,7 @@ import { TrashIcon } from "./icons";
import "./ElementLinkDialog.scss";
import type { AppProps, AppState, UIAppState } from "../types";
import type { AppProps, AppState, UIAppState } from "../../types";
const ElementLinkDialog = ({
sourceElementId,

View file

@ -1,6 +1,6 @@
import React, { useState } from "react";
import { t } from "../i18n";
import { t } from "../../i18n";
import { useExcalidrawContainer } from "./App";
import { Dialog } from "./Dialog";

Some files were not shown because too many files have changed in this diff Show more