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 { import {
CommandPalette, CommandPalette,
DEFAULT_CATEGORIES, DEFAULT_CATEGORIES,
} from "@excalidraw/excalidraw/components/CommandPalette/CommandPalette"; } from "@excalidraw/excalidraw/src/components/CommandPalette/CommandPalette";
import { ErrorDialog } from "@excalidraw/excalidraw/components/ErrorDialog"; import { ErrorDialog } from "@excalidraw/excalidraw/src/components/ErrorDialog";
import { OverwriteConfirmDialog } from "@excalidraw/excalidraw/components/OverwriteConfirm/OverwriteConfirm"; import { OverwriteConfirmDialog } from "@excalidraw/excalidraw/src/components/OverwriteConfirm/OverwriteConfirm";
import { openConfirmModal } from "@excalidraw/excalidraw/components/OverwriteConfirm/OverwriteConfirmState"; import { openConfirmModal } from "@excalidraw/excalidraw/src/components/OverwriteConfirm/OverwriteConfirmState";
import { ShareableLinkDialog } from "@excalidraw/excalidraw/components/ShareableLinkDialog"; import { ShareableLinkDialog } from "@excalidraw/excalidraw/src/components/ShareableLinkDialog";
import Trans from "@excalidraw/excalidraw/components/Trans"; import Trans from "@excalidraw/excalidraw/src/components/Trans";
import { import {
APP_NAME, APP_NAME,
EVENT, EVENT,
@ -46,7 +46,7 @@ import {
exportToPlus, exportToPlus,
share, share,
youtubeIcon, youtubeIcon,
} from "@excalidraw/excalidraw/components/icons"; } from "@excalidraw/excalidraw/src/components/icons";
import { isElementLink } from "@excalidraw/element/elementLink"; import { isElementLink } from "@excalidraw/element/elementLink";
import { import {
restore, restore,

View file

@ -5,7 +5,7 @@ import {
zoomToFitBounds, zoomToFitBounds,
reconcileElements, reconcileElements,
} from "@excalidraw/excalidraw"; } 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 { APP_NAME, EVENT } from "@excalidraw/common";
import { import {
IDLE_THRESHOLD, IDLE_THRESHOLD,

View file

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

View file

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

View file

@ -2,7 +2,7 @@ import {
loginIcon, loginIcon,
ExcalLogo, ExcalLogo,
eyeIcon, eyeIcon,
} from "@excalidraw/excalidraw/components/icons"; } from "@excalidraw/excalidraw/src/components/icons";
import { MainMenu } from "@excalidraw/excalidraw/index"; import { MainMenu } from "@excalidraw/excalidraw/index";
import React from "react"; 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 { POINTER_EVENTS } from "@excalidraw/common";
import { useI18n } from "@excalidraw/excalidraw/i18n"; import { useI18n } from "@excalidraw/excalidraw/i18n";
import { WelcomeScreen } from "@excalidraw/excalidraw/index"; import { WelcomeScreen } from "@excalidraw/excalidraw/index";

View file

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

View file

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

View file

@ -3,9 +3,9 @@ import { uploadBytes, ref } from "firebase/storage";
import { nanoid } from "nanoid"; import { nanoid } from "nanoid";
import { trackEvent } from "@excalidraw/excalidraw/analytics"; import { trackEvent } from "@excalidraw/excalidraw/analytics";
import { Card } from "@excalidraw/excalidraw/components/Card"; import { Card } from "@excalidraw/excalidraw/src/components/Card";
import { ExcalidrawLogo } from "@excalidraw/excalidraw/components/ExcalidrawLogo"; import { ExcalidrawLogo } from "@excalidraw/excalidraw/src/components/ExcalidrawLogo";
import { ToolButton } from "@excalidraw/excalidraw/components/ToolButton"; import { ToolButton } from "@excalidraw/excalidraw/src/components/ToolButton";
import { MIME_TYPES, getFrame } from "@excalidraw/common"; import { MIME_TYPES, getFrame } from "@excalidraw/common";
import { import {
encryptData, 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 { t } from "@excalidraw/excalidraw/i18n";
import * as Sentry from "@sentry/browser"; import * as Sentry from "@sentry/browser";
import React from "react"; 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 { .excalidraw {
.ShareDialog { .ShareDialog {

View file

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

View file

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

View file

@ -2,18 +2,18 @@ import React, { useEffect } from "react";
import { DEFAULT_UI_OPTIONS, isShallowEqual } from "@excalidraw/common"; import { DEFAULT_UI_OPTIONS, isShallowEqual } from "@excalidraw/common";
import App from "./components/App"; import App from "./src/components/App";
import { InitializeApp } from "./components/InitializeApp"; import { InitializeApp } from "./src/components/InitializeApp";
import Footer from "./components/footer/FooterCenter"; import Footer from "./src/components/footer/FooterCenter";
import LiveCollaborationTrigger from "./components/live-collaboration/LiveCollaborationTrigger"; import LiveCollaborationTrigger from "./src/components/live-collaboration/LiveCollaborationTrigger";
import MainMenu from "./components/main-menu/MainMenu"; import MainMenu from "./src/components/main-menu/MainMenu";
import WelcomeScreen from "./components/welcome-screen/WelcomeScreen"; import WelcomeScreen from "./src/components/welcome-screen/WelcomeScreen";
import { defaultLang } from "./i18n"; import { defaultLang } from "./i18n";
import { EditorJotaiProvider, editorJotaiStore } from "./editor-jotai"; import { EditorJotaiProvider, editorJotaiStore } from "./editor-jotai";
import polyfill from "./polyfill"; import polyfill from "./polyfill";
import "./css/app.scss"; import "./src/css/app.scss";
import "./css/styles.scss"; import "./src/css/styles.scss";
import "./fonts/fonts.css"; import "./fonts/fonts.css";
import type { AppProps, ExcalidrawProps } from "./types"; import type { AppProps, ExcalidrawProps } from "./types";
@ -276,18 +276,18 @@ export {
viewportCoordsToSceneCoords, viewportCoordsToSceneCoords,
} from "@excalidraw/common"; } from "@excalidraw/common";
export { Sidebar } from "./components/Sidebar/Sidebar"; export { Sidebar } from "./src/components/Sidebar/Sidebar";
export { Button } from "./components/Button"; export { Button } from "./src/components/Button";
export { Footer }; export { Footer };
export { MainMenu }; export { MainMenu };
export { useDevice } from "./components/App"; export { useDevice } from "./src/components/App";
export { WelcomeScreen }; export { WelcomeScreen };
export { LiveCollaborationTrigger }; export { LiveCollaborationTrigger };
export { Stats } from "./components/Stats"; export { Stats } from "./src/components/Stats";
export { DefaultSidebar } from "./components/DefaultSidebar"; export { DefaultSidebar } from "./src/components/DefaultSidebar";
export { TTDDialog } from "./components/TTDDialog/TTDDialog"; export { TTDDialog } from "./src/components/TTDDialog/TTDDialog";
export { TTDDialogTrigger } from "./components/TTDDialog/TTDDialogTrigger"; export { TTDDialogTrigger } from "./src/components/TTDDialog/TTDDialogTrigger";
export { zoomToFitBounds } from "./src/actions/actionCanvas"; export { zoomToFitBounds } from "./src/actions/actionCanvas";
export { convertToExcalidrawElements } from "./src/data/transform"; export { convertToExcalidrawElements } from "./src/data/transform";
@ -302,7 +302,7 @@ export {
elementPartiallyOverlapsWithOrContainsBBox, elementPartiallyOverlapsWithOrContainsBBox,
} from "@excalidraw/utils/withinBounds"; } from "@excalidraw/utils/withinBounds";
export { DiagramToCodePlugin } from "./components/DiagramToCodePlugin/DiagramToCodePlugin"; export { DiagramToCodePlugin } from "./src/components/DiagramToCodePlugin/DiagramToCodePlugin";
export { getDataURL } from "./src/data/blob"; export { getDataURL } from "./src/data/blob";
export { isElementLink } from "@excalidraw/element/elementLink"; 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 { Trail } from "./src/animated-trail";
import type { AnimationFrameHandler } from "./src/animation-frame-handler"; 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"; import type { SocketId } from "./types";
export class LaserTrails implements Trail { 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 type { Alignment } from "@excalidraw/element/align";
import { ToolButton } from "../../components/ToolButton"; import { ToolButton } from "../components/ToolButton";
import { import {
AlignBottomIcon, AlignBottomIcon,
AlignLeftIcon, AlignLeftIcon,
@ -20,7 +20,7 @@ import {
AlignTopIcon, AlignTopIcon,
CenterHorizontallyIcon, CenterHorizontallyIcon,
CenterVerticallyIcon, CenterVerticallyIcon,
} from "../../components/icons"; } from "../components/icons";
import { t } from "../../i18n"; import { t } from "../../i18n";

View file

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

View file

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

View file

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

View file

@ -25,8 +25,8 @@ import type { ExcalidrawElement } from "@excalidraw/element/types";
import { t } from "../../i18n"; import { t } from "../../i18n";
import { getSelectedElements, isSomeElementSelected } from "../scene"; import { getSelectedElements, isSomeElementSelected } from "../scene";
import { CaptureUpdateAction } from "../../store"; import { CaptureUpdateAction } from "../../store";
import { TrashIcon } from "../../components/icons"; import { TrashIcon } from "../components/icons";
import { ToolButton } from "../../components/ToolButton"; import { ToolButton } from "../components/ToolButton";
import { register } from "./register"; 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 type { Distribution } from "@excalidraw/element/distribute";
import { ToolButton } from "../../components/ToolButton"; import { ToolButton } from "../components/ToolButton";
import { import {
DistributeHorizontallyIcon, DistributeHorizontallyIcon,
DistributeVerticallyIcon, DistributeVerticallyIcon,
} from "../../components/icons"; } from "../components/icons";
import { t } from "../../i18n"; import { t } from "../../i18n";

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -34,8 +34,8 @@ import type {
OrderedExcalidrawElement, OrderedExcalidrawElement,
} from "@excalidraw/element/types"; } from "@excalidraw/element/types";
import { ToolButton } from "../../components/ToolButton"; import { ToolButton } from "../components/ToolButton";
import { UngroupIcon, GroupIcon } from "../../components/icons"; import { UngroupIcon, GroupIcon } from "../components/icons";
import { t } from "../../i18n"; 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 type { SceneElementsMap } from "@excalidraw/element/types";
import { ToolButton } from "../../components/ToolButton"; import { ToolButton } from "../components/ToolButton";
import { UndoIcon, RedoIcon } from "../../components/icons"; import { UndoIcon, RedoIcon } from "../components/icons";
import { HistoryChangedEvent } from "../../history"; import { HistoryChangedEvent } from "../../history";
import { useEmitter } from "../hooks/useEmitter"; import { useEmitter } from "../hooks/useEmitter";
import { t } from "../../i18n"; 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 type { ExcalidrawLinearElement } from "@excalidraw/element/types";
import { DEFAULT_CATEGORIES } from "../../components/CommandPalette/CommandPalette"; import { DEFAULT_CATEGORIES } from "../components/CommandPalette/CommandPalette";
import { ToolButton } from "../../components/ToolButton"; import { ToolButton } from "../components/ToolButton";
import { lineEditorIcon } from "../../components/icons"; import { lineEditorIcon } from "../components/icons";
import { t } from "../../i18n"; import { t } from "../../i18n";
import { CaptureUpdateAction } from "../../store"; import { CaptureUpdateAction } from "../../store";

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -3,8 +3,8 @@ import { useCallback, useEffect, useRef, useState } from "react";
import { KEYS, getShortcutKey } from "@excalidraw/common"; import { KEYS, getShortcutKey } from "@excalidraw/common";
import { useAtom } from "../../editor-jotai"; import { useAtom } from "../../../editor-jotai";
import { t } from "../../i18n"; import { t } from "../../../i18n";
import { useDevice } from "../App"; import { useDevice } from "../App";
import { activeEyeDropperAtom } from "../EyeDropper"; import { activeEyeDropperAtom } from "../EyeDropper";
import { eyeDropperIcon } from "../icons"; 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 type { ExcalidrawElement } from "@excalidraw/element/types";
import { useAtom } from "../../editor-jotai"; import { useAtom } from "../../../editor-jotai";
import { t } from "../../i18n"; import { t } from "../../../i18n";
import { useExcalidrawContainer } from "../App"; import { useExcalidrawContainer } from "../App";
import { ButtonSeparator } from "../ButtonSeparator"; import { ButtonSeparator } from "../ButtonSeparator";
import { activeEyeDropperAtom } from "../EyeDropper"; import { activeEyeDropperAtom } from "../EyeDropper";
@ -29,7 +29,7 @@ import "./ColorPicker.scss";
import type { ColorPickerType } from "./colorPickerUtils"; import type { ColorPickerType } from "./colorPickerUtils";
import type { AppState } from "../../types"; import type { AppState } from "../../../types";
const isValidColor = (color: string) => { const isValidColor = (color: string) => {
const style = new Option().style; const style = new Option().style;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -6,11 +6,11 @@ import type {
NonDeletedExcalidrawElement, NonDeletedExcalidrawElement,
} from "@excalidraw/element/types"; } from "@excalidraw/element/types";
import { useExcalidrawAppState } from "../components/App"; import { useExcalidrawAppState } from "./App";
import "./ElementCanvasButtons.scss"; import "./ElementCanvasButtons.scss";
import type { AppState } from "../types"; import type { AppState } from "../../types";
const CONTAINER_PADDING = 5; 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 type { ElementsMap, ExcalidrawElement } from "@excalidraw/element/types";
import { t } from "../i18n"; import { t } from "../../i18n";
import { getSelectedElements } from "../src/scene"; import { getSelectedElements } from "../scene";
import DialogActionButton from "./DialogActionButton"; import DialogActionButton from "./DialogActionButton";
import { TextField } from "./TextField"; import { TextField } from "./TextField";
@ -20,7 +20,7 @@ import { TrashIcon } from "./icons";
import "./ElementLinkDialog.scss"; import "./ElementLinkDialog.scss";
import type { AppProps, AppState, UIAppState } from "../types"; import type { AppProps, AppState, UIAppState } from "../../types";
const ElementLinkDialog = ({ const ElementLinkDialog = ({
sourceElementId, sourceElementId,

View file

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

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