mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Move actions folder in src
This commit is contained in:
parent
ce8542c6f9
commit
c9c6c47081
79 changed files with 276 additions and 261 deletions
|
@ -2,7 +2,7 @@ import { CaptureUpdateAction, newElementWith } from "@excalidraw/excalidraw";
|
|||
import {
|
||||
createRedoAction,
|
||||
createUndoAction,
|
||||
} from "@excalidraw/excalidraw/actions/actionHistory";
|
||||
} from "@excalidraw/excalidraw/src/actions/actionHistory";
|
||||
import { syncInvalidIndices } from "@excalidraw/element/fractionalIndex";
|
||||
import { API } from "@excalidraw/excalidraw/tests/helpers/api";
|
||||
import { act, render, waitFor } from "@excalidraw/excalidraw/tests/test-utils";
|
||||
|
|
|
@ -8,7 +8,7 @@ import {
|
|||
actionAlignBottom,
|
||||
actionAlignLeft,
|
||||
actionAlignRight,
|
||||
} from "@excalidraw/excalidraw/actions";
|
||||
} from "@excalidraw/excalidraw/src/actions";
|
||||
import { defaultLang, setLanguage } from "@excalidraw/excalidraw/i18n";
|
||||
import { Excalidraw } from "@excalidraw/excalidraw";
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import { KEYS, arrayToMap } from "@excalidraw/common";
|
|||
|
||||
import { pointFrom } from "@excalidraw/math";
|
||||
|
||||
import { actionWrapTextInContainer } from "@excalidraw/excalidraw/actions/actionBoundText";
|
||||
import { actionWrapTextInContainer } from "@excalidraw/excalidraw/src/actions/actionBoundText";
|
||||
|
||||
import { Excalidraw, isLinearElement } from "@excalidraw/excalidraw";
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import {
|
|||
|
||||
import { Excalidraw } from "@excalidraw/excalidraw";
|
||||
|
||||
import { actionDuplicateSelection } from "@excalidraw/excalidraw/actions";
|
||||
import { actionDuplicateSelection } from "@excalidraw/excalidraw/src/actions";
|
||||
|
||||
import { API } from "@excalidraw/excalidraw/tests/helpers/api";
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@ import { pointFrom } from "@excalidraw/math";
|
|||
import { Excalidraw, mutateElement } from "@excalidraw/excalidraw";
|
||||
|
||||
import Scene from "@excalidraw/excalidraw/src/scene/Scene";
|
||||
import { actionSelectAll } from "@excalidraw/excalidraw/actions";
|
||||
import { actionDuplicateSelection } from "@excalidraw/excalidraw/actions/actionDuplicateSelection";
|
||||
import { actionSelectAll } from "@excalidraw/excalidraw/src/actions";
|
||||
import { actionDuplicateSelection } from "@excalidraw/excalidraw/src/actions/actionDuplicateSelection";
|
||||
|
||||
import { API } from "@excalidraw/excalidraw/tests/helpers/api";
|
||||
import { Pointer, UI } from "@excalidraw/excalidraw/tests/helpers/ui";
|
||||
|
|
|
@ -6,7 +6,7 @@ import {
|
|||
actionBringToFront,
|
||||
actionSendToBack,
|
||||
actionDuplicateSelection,
|
||||
} from "@excalidraw/excalidraw/actions";
|
||||
} from "@excalidraw/excalidraw/src/actions";
|
||||
|
||||
import { Excalidraw } from "@excalidraw/excalidraw";
|
||||
|
||||
|
|
|
@ -30,9 +30,9 @@ import type {
|
|||
NonDeletedSceneElementsMap,
|
||||
} from "@excalidraw/element/types";
|
||||
|
||||
import { actionToggleZenMode } from "../actions";
|
||||
import { actionToggleZenMode } from "../src/actions";
|
||||
|
||||
import { alignActionsPredicate } from "../actions/actionAlign";
|
||||
import { alignActionsPredicate } from "../src/actions/actionAlign";
|
||||
import { trackEvent } from "../analytics";
|
||||
import { useTunnels } from "../src/context/tunnels";
|
||||
|
||||
|
@ -66,7 +66,7 @@ import {
|
|||
} from "./icons";
|
||||
|
||||
import type { AppClassProperties, AppProps, UIAppState, Zoom } from "../types";
|
||||
import type { ActionManager } from "../actions/manager";
|
||||
import type { ActionManager } from "../src/actions/manager";
|
||||
|
||||
export const canChangeStrokeColor = (
|
||||
appState: UIAppState,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { actionClearCanvas } from "../actions";
|
||||
import { actionClearCanvas } from "../src/actions";
|
||||
import { atom, useAtom } from "../editor-jotai";
|
||||
import { t } from "../i18n";
|
||||
|
||||
|
|
|
@ -362,23 +362,26 @@ import {
|
|||
actionToggleLinearEditor,
|
||||
actionToggleObjectsSnapMode,
|
||||
actionToggleCropEditor,
|
||||
} 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";
|
||||
} 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";
|
||||
import {
|
||||
actionRemoveAllElementsFromFrame,
|
||||
actionSelectAllElementsInFrame,
|
||||
actionWrapSelectionInFrame,
|
||||
} 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";
|
||||
} 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";
|
||||
import {
|
||||
|
@ -527,7 +530,7 @@ import type {
|
|||
Offsets,
|
||||
} from "../types";
|
||||
import type { RoughCanvas } from "roughjs/bin/canvas";
|
||||
import type { Action, ActionResult } from "../actions/types";
|
||||
import type { Action, ActionResult } from "../src/actions/types";
|
||||
|
||||
const AppContext = React.createContext<AppClassProperties>(null!);
|
||||
const AppPropsContext = React.createContext<AppProps>(null!);
|
||||
|
|
|
@ -17,12 +17,12 @@ import {
|
|||
actionClearCanvas,
|
||||
actionLink,
|
||||
actionToggleSearchMenu,
|
||||
} from "../../actions";
|
||||
} from "../../src/actions";
|
||||
import {
|
||||
actionCopyElementLink,
|
||||
actionLinkToElement,
|
||||
} from "../../actions/actionElementLink";
|
||||
import { getShortcutFromShortcutName } from "../../actions/shortcuts";
|
||||
} 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";
|
||||
|
@ -63,9 +63,9 @@ import "./CommandPalette.scss";
|
|||
|
||||
import type { CommandPaletteItem } from "./types";
|
||||
import type { AppProps, AppState, UIAppState } from "../../types";
|
||||
import type { ShortcutName } from "../../actions/shortcuts";
|
||||
import type { ShortcutName } from "../../src/actions/shortcuts";
|
||||
import type { TranslationKeys } from "../../i18n";
|
||||
import type { Action } from "../../actions/types";
|
||||
import type { Action } from "../../src/actions/types";
|
||||
|
||||
const lastUsedPaletteItem = atom<CommandPaletteItem | null>(null);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { actionToggleTheme } from "../../actions";
|
||||
import { actionToggleTheme } from "../../src/actions";
|
||||
|
||||
import type { CommandPaletteItem } from "./types";
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import type { ActionManager } from "../../actions/manager";
|
||||
import type { Action } from "../../actions/types";
|
||||
import type { ActionManager } from "../../src/actions/manager";
|
||||
import type { Action } from "../../src/actions/types";
|
||||
import type { UIAppState } from "../../types";
|
||||
|
||||
export type CommandPaletteItem = {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import clsx from "clsx";
|
||||
import React from "react";
|
||||
|
||||
import { getShortcutFromShortcutName } from "../actions/shortcuts";
|
||||
import { getShortcutFromShortcutName } from "../src/actions/shortcuts";
|
||||
import { t } from "../i18n";
|
||||
|
||||
import { useExcalidrawAppState, useExcalidrawElements } from "./App";
|
||||
|
@ -10,9 +10,9 @@ import { Popover } from "./Popover";
|
|||
|
||||
import "./ContextMenu.scss";
|
||||
|
||||
import type { ActionManager } from "../actions/manager";
|
||||
import type { ShortcutName } from "../actions/shortcuts";
|
||||
import type { Action } from "../actions/types";
|
||||
import type { ActionManager } from "../src/actions/manager";
|
||||
import type { ShortcutName } from "../src/actions/shortcuts";
|
||||
import type { Action } from "../src/actions/types";
|
||||
|
||||
import type { TranslationKeys } from "../i18n";
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import { isDarwin, isFirefox, isWindows } from "@excalidraw/common";
|
|||
|
||||
import { KEYS, getShortcutKey } from "@excalidraw/common";
|
||||
|
||||
import { getShortcutFromShortcutName } from "../actions/shortcuts";
|
||||
import { getShortcutFromShortcutName } from "../src/actions/shortcuts";
|
||||
import { probablySupportsClipboardBlob } from "../clipboard";
|
||||
import { t } from "../i18n";
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ import {
|
|||
actionChangeExportEmbedScene,
|
||||
actionChangeExportScale,
|
||||
actionChangeProjectName,
|
||||
} from "../actions/actionExport";
|
||||
} from "../src/actions/actionExport";
|
||||
import { probablySupportsClipboardBlob } from "../clipboard";
|
||||
import { prepareElementsForExport } from "../src/data";
|
||||
import { canvasToBlob } from "../src/data/blob";
|
||||
|
@ -36,7 +36,7 @@ import { FilledButton } from "./FilledButton";
|
|||
|
||||
import "./ImageExportDialog.scss";
|
||||
|
||||
import type { ActionManager } from "../actions/manager";
|
||||
import type { ActionManager } from "../src/actions/manager";
|
||||
|
||||
import type { AppClassProperties, BinaryFiles, UIAppState } from "../types";
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import { getFrame } from "@excalidraw/common";
|
|||
|
||||
import type { NonDeletedExcalidrawElement } from "@excalidraw/element/types";
|
||||
|
||||
import { actionSaveFileToDisk } from "../actions/actionExport";
|
||||
import { actionSaveFileToDisk } from "../src/actions/actionExport";
|
||||
|
||||
import { trackEvent } from "../analytics";
|
||||
import { nativeFileSystemSupported } from "../src/data/filesystem";
|
||||
|
@ -17,7 +17,7 @@ import { exportToFileIcon, LinkIcon } from "./icons";
|
|||
|
||||
import "./ExportDialog.scss";
|
||||
|
||||
import type { ActionManager } from "../actions/manager";
|
||||
import type { ActionManager } from "../src/actions/manager";
|
||||
|
||||
import type { ExportOpts, BinaryFiles, UIAppState } from "../types";
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ import { ShapeCache } from "@excalidraw/element/ShapeCache";
|
|||
import type { NonDeletedExcalidrawElement } from "@excalidraw/element/types";
|
||||
|
||||
import Scene from "../src/scene/Scene";
|
||||
import { actionToggleStats } from "../actions";
|
||||
import { actionToggleStats } from "../src/actions";
|
||||
import { trackEvent } from "../analytics";
|
||||
import { isHandToolActive } from "../appState";
|
||||
import { TunnelsContext, useInitializeTunnels } from "../src/context/tunnels";
|
||||
|
@ -62,7 +62,7 @@ import { LaserPointerButton } from "./LaserPointerButton";
|
|||
import "./LayerUI.scss";
|
||||
import "./Toolbar.scss";
|
||||
|
||||
import type { ActionManager } from "../actions/manager";
|
||||
import type { ActionManager } from "../src/actions/manager";
|
||||
|
||||
import type { Language } from "../i18n";
|
||||
import type {
|
||||
|
|
|
@ -20,7 +20,7 @@ import { PenModeButton } from "./PenModeButton";
|
|||
import { Section } from "./Section";
|
||||
import Stack from "./Stack";
|
||||
|
||||
import type { ActionManager } from "../actions/manager";
|
||||
import type { ActionManager } from "../src/actions/manager";
|
||||
import type {
|
||||
AppClassProperties,
|
||||
AppProps,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React from "react";
|
||||
|
||||
import { actionSaveFileToDisk } from "../../actions";
|
||||
import { actionChangeExportEmbedScene } from "../../actions/actionExport";
|
||||
import { actionSaveFileToDisk } from "../../src/actions";
|
||||
import { actionChangeExportEmbedScene } from "../../src/actions/actionExport";
|
||||
import { useI18n } from "../../i18n";
|
||||
import { useExcalidrawActionManager, useExcalidrawSetAppState } from "../App";
|
||||
import { FilledButton } from "../FilledButton";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React, { useEffect } from "react";
|
||||
|
||||
import { getFormValue } from "../actions/actionProperties";
|
||||
import { getFormValue } from "../src/actions/actionProperties";
|
||||
import { t } from "../i18n";
|
||||
|
||||
import "./Range.scss";
|
||||
|
|
|
@ -18,7 +18,7 @@ import type {
|
|||
} from "@excalidraw/element/types";
|
||||
|
||||
import { Excalidraw, getCommonBounds, mutateElement } from "../..";
|
||||
import { actionGroup } from "../../actions";
|
||||
import { actionGroup } from "../../src/actions";
|
||||
import { t } from "../../i18n";
|
||||
import * as StaticScene from "../../src/renderer/staticScene";
|
||||
import { API } from "../../tests/helpers/api";
|
||||
|
|
|
@ -16,7 +16,7 @@ import { Tooltip } from "./Tooltip";
|
|||
|
||||
import "./UserList.scss";
|
||||
|
||||
import type { ActionManager } from "../actions/manager";
|
||||
import type { ActionManager } from "../src/actions/manager";
|
||||
import type { Collaborator, SocketId } from "../types";
|
||||
|
||||
export type GoToCollaboratorComponentProps = {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import clsx from "clsx";
|
||||
|
||||
import { actionShortcuts } from "../../actions";
|
||||
import { actionShortcuts } from "../../src/actions";
|
||||
import { useTunnels } from "../../src/context/tunnels";
|
||||
import {
|
||||
ExitZenModeAction,
|
||||
|
@ -13,7 +13,7 @@ import { HelpButton } from "../HelpButton";
|
|||
import { Section } from "../Section";
|
||||
import Stack from "../Stack";
|
||||
|
||||
import type { ActionManager } from "../../actions/manager";
|
||||
import type { ActionManager } from "../../src/actions/manager";
|
||||
import type { UIAppState } from "../../types";
|
||||
|
||||
const Footer = ({
|
||||
|
|
|
@ -11,8 +11,8 @@ import {
|
|||
actionShortcuts,
|
||||
actionToggleSearchMenu,
|
||||
actionToggleTheme,
|
||||
} from "../../actions";
|
||||
import { getShortcutFromShortcutName } from "../../actions/shortcuts";
|
||||
} from "../../src/actions";
|
||||
import { getShortcutFromShortcutName } from "../../src/actions/shortcuts";
|
||||
import { trackEvent } from "../../analytics";
|
||||
import { useUIAppState } from "../../src/context/ui-appState";
|
||||
import { useSetAtom } from "../../editor-jotai";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { actionLoadScene, actionShortcuts } from "../../actions";
|
||||
import { getShortcutFromShortcutName } from "../../actions/shortcuts";
|
||||
import { actionLoadScene, actionShortcuts } from "../../src/actions";
|
||||
import { getShortcutFromShortcutName } from "../../src/actions/shortcuts";
|
||||
import { useTunnels } from "../../src/context/tunnels";
|
||||
import { useUIAppState } from "../../src/context/ui-appState";
|
||||
import { t, useI18n } from "../../i18n";
|
||||
|
|
|
@ -289,7 +289,7 @@ export { DefaultSidebar } from "./components/DefaultSidebar";
|
|||
export { TTDDialog } from "./components/TTDDialog/TTDDialog";
|
||||
export { TTDDialogTrigger } from "./components/TTDDialog/TTDDialogTrigger";
|
||||
|
||||
export { zoomToFitBounds } from "./actions/actionCanvas";
|
||||
export { zoomToFitBounds } from "./src/actions/actionCanvas";
|
||||
export { convertToExcalidrawElements } from "./src/data/transform";
|
||||
export {
|
||||
getCommonBounds,
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { LIBRARY_DISABLED_TYPES, randomId } from "@excalidraw/common";
|
||||
import { deepCopyElement } from "@excalidraw/element/duplicate";
|
||||
|
||||
import { t } from "../i18n";
|
||||
import { CaptureUpdateAction } from "../store";
|
||||
import { t } from "../../i18n";
|
||||
import { CaptureUpdateAction } from "../../store";
|
||||
|
||||
import { register } from "./register";
|
||||
|
|
@ -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,16 +20,16 @@ import {
|
|||
AlignTopIcon,
|
||||
CenterHorizontallyIcon,
|
||||
CenterVerticallyIcon,
|
||||
} from "../components/icons";
|
||||
} from "../../components/icons";
|
||||
|
||||
import { t } from "../i18n";
|
||||
import { t } from "../../i18n";
|
||||
|
||||
import { isSomeElementSelected } from "../src/scene";
|
||||
import { CaptureUpdateAction } from "../store";
|
||||
import { isSomeElementSelected } from "../scene";
|
||||
import { CaptureUpdateAction } from "../../store";
|
||||
|
||||
import { register } from "./register";
|
||||
|
||||
import type { AppClassProperties, AppState, UIAppState } from "../types";
|
||||
import type { AppClassProperties, AppState, UIAppState } from "../../types";
|
||||
|
||||
export const alignActionsPredicate = (
|
||||
appState: UIAppState,
|
|
@ -43,13 +43,13 @@ import type {
|
|||
|
||||
import type { Mutable } from "@excalidraw/common/utility-types";
|
||||
|
||||
import { CaptureUpdateAction } from "../store";
|
||||
import { CaptureUpdateAction } from "../../store";
|
||||
|
||||
import { register } from "./register";
|
||||
|
||||
import type { Radians } from "../../math/src";
|
||||
import type { Radians } from "../../../math/src";
|
||||
|
||||
import type { AppState } from "../types";
|
||||
import type { AppState } from "../../types";
|
||||
|
||||
export const actionUnbindText = register({
|
||||
name: "unbindText",
|
|
@ -23,10 +23,10 @@ import {
|
|||
getDefaultAppState,
|
||||
isEraserActive,
|
||||
isHandToolActive,
|
||||
} from "../appState";
|
||||
import { ColorPicker } from "../components/ColorPicker/ColorPicker";
|
||||
import { ToolButton } from "../components/ToolButton";
|
||||
import { Tooltip } from "../components/Tooltip";
|
||||
} from "../../appState";
|
||||
import { ColorPicker } from "../../components/ColorPicker/ColorPicker";
|
||||
import { ToolButton } from "../../components/ToolButton";
|
||||
import { Tooltip } from "../../components/Tooltip";
|
||||
import {
|
||||
handIcon,
|
||||
LassoIcon,
|
||||
|
@ -37,18 +37,18 @@ import {
|
|||
ZoomInIcon,
|
||||
ZoomOutIcon,
|
||||
ZoomResetIcon,
|
||||
} from "../components/icons";
|
||||
import { setCursor } from "../cursor";
|
||||
} from "../../components/icons";
|
||||
import { setCursor } from "../../cursor";
|
||||
|
||||
import { t } from "../i18n";
|
||||
import { getNormalizedZoom } from "../src/scene";
|
||||
import { centerScrollOn } from "../src/scene/scroll";
|
||||
import { getStateForZoom } from "../src/scene/zoom";
|
||||
import { CaptureUpdateAction } from "../store";
|
||||
import { t } from "../../i18n";
|
||||
import { getNormalizedZoom } from "../scene";
|
||||
import { centerScrollOn } from "../scene/scroll";
|
||||
import { getStateForZoom } from "../scene/zoom";
|
||||
import { CaptureUpdateAction } from "../../store";
|
||||
|
||||
import { register } from "./register";
|
||||
|
||||
import type { AppState, Offsets } from "../types";
|
||||
import type { AppState, Offsets } from "../../types";
|
||||
|
||||
export const actionChangeViewBackgroundColor = register({
|
||||
name: "changeViewBackgroundColor",
|
|
@ -10,12 +10,17 @@ import {
|
|||
probablySupportsClipboardBlob,
|
||||
probablySupportsClipboardWriteText,
|
||||
readSystemClipboard,
|
||||
} from "../clipboard";
|
||||
import { DuplicateIcon, cutIcon, pngIcon, svgIcon } from "../components/icons";
|
||||
import { exportCanvas, prepareElementsForExport } from "../src/data/index";
|
||||
import { t } from "../i18n";
|
||||
} from "../../clipboard";
|
||||
import {
|
||||
DuplicateIcon,
|
||||
cutIcon,
|
||||
pngIcon,
|
||||
svgIcon,
|
||||
} from "../../components/icons";
|
||||
import { exportCanvas, prepareElementsForExport } from "../data/index";
|
||||
import { t } from "../../i18n";
|
||||
|
||||
import { CaptureUpdateAction } from "../store";
|
||||
import { CaptureUpdateAction } from "../../store";
|
||||
|
||||
import { actionDeleteSelected } from "./actionDeleteSelected";
|
||||
import { register } from "./register";
|
|
@ -2,10 +2,10 @@ import { isImageElement } from "@excalidraw/element/typeChecks";
|
|||
|
||||
import type { ExcalidrawImageElement } from "@excalidraw/element/types";
|
||||
|
||||
import { ToolButton } from "../components/ToolButton";
|
||||
import { cropIcon } from "../components/icons";
|
||||
import { t } from "../i18n";
|
||||
import { CaptureUpdateAction } from "../store";
|
||||
import { ToolButton } from "../../components/ToolButton";
|
||||
import { cropIcon } from "../../components/icons";
|
||||
import { t } from "../../i18n";
|
||||
import { CaptureUpdateAction } from "../../store";
|
||||
|
||||
import { register } from "./register";
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
import React from "react";
|
||||
|
||||
import { Excalidraw, mutateElement } from "../index";
|
||||
import { API } from "../tests/helpers/api";
|
||||
import { act, assertElements, render } from "../tests/test-utils";
|
||||
import { Excalidraw, mutateElement } from "../../index";
|
||||
import { API } from "../../tests/helpers/api";
|
||||
import { act, assertElements, render } from "../../tests/test-utils";
|
||||
|
||||
import { actionDeleteSelected } from "./actionDeleteSelected";
|
||||
|
|
@ -22,15 +22,15 @@ import {
|
|||
|
||||
import type { ExcalidrawElement } from "@excalidraw/element/types";
|
||||
|
||||
import { t } from "../i18n";
|
||||
import { getSelectedElements, isSomeElementSelected } from "../src/scene";
|
||||
import { CaptureUpdateAction } from "../store";
|
||||
import { TrashIcon } from "../components/icons";
|
||||
import { ToolButton } from "../components/ToolButton";
|
||||
import { t } from "../../i18n";
|
||||
import { getSelectedElements, isSomeElementSelected } from "../scene";
|
||||
import { CaptureUpdateAction } from "../../store";
|
||||
import { TrashIcon } from "../../components/icons";
|
||||
import { ToolButton } from "../../components/ToolButton";
|
||||
|
||||
import { register } from "./register";
|
||||
|
||||
import type { AppClassProperties, AppState } from "../types";
|
||||
import type { AppClassProperties, AppState } from "../../types";
|
||||
|
||||
const deleteSelectedElements = (
|
||||
elements: readonly ExcalidrawElement[],
|
|
@ -12,20 +12,20 @@ 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";
|
||||
import { t } from "../../i18n";
|
||||
|
||||
import { isSomeElementSelected } from "../src/scene";
|
||||
import { CaptureUpdateAction } from "../store";
|
||||
import { isSomeElementSelected } from "../scene";
|
||||
import { CaptureUpdateAction } from "../../store";
|
||||
|
||||
import { register } from "./register";
|
||||
|
||||
import type { AppClassProperties, AppState } from "../types";
|
||||
import type { AppClassProperties, AppState } from "../../types";
|
||||
|
||||
const enableActionGroup = (appState: AppState, app: AppClassProperties) => {
|
||||
const selectedElements = app.scene.getSelectedElements(appState);
|
|
@ -1,13 +1,13 @@
|
|||
import { ORIG_ID } from "@excalidraw/common";
|
||||
|
||||
import { Excalidraw } from "../index";
|
||||
import { API } from "../tests/helpers/api";
|
||||
import { Excalidraw } from "../../index";
|
||||
import { API } from "../../tests/helpers/api";
|
||||
import {
|
||||
act,
|
||||
assertElements,
|
||||
getCloneByOrigId,
|
||||
render,
|
||||
} from "../tests/test-utils";
|
||||
} from "../../tests/test-utils";
|
||||
|
||||
import { actionDuplicateSelection } from "./actionDuplicateSelection";
|
||||
|
|
@ -27,12 +27,12 @@ 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 "../src/scene";
|
||||
import { CaptureUpdateAction } from "../store";
|
||||
import { t } from "../../i18n";
|
||||
import { isSomeElementSelected } from "../scene";
|
||||
import { CaptureUpdateAction } from "../../store";
|
||||
|
||||
import { register } from "./register";
|
||||
|
|
@ -4,11 +4,11 @@ import {
|
|||
getLinkIdAndTypeFromSelection,
|
||||
} from "@excalidraw/element/elementLink";
|
||||
|
||||
import { copyTextToSystemClipboard } from "../clipboard";
|
||||
import { copyIcon, elementLinkIcon } from "../components/icons";
|
||||
import { t } from "../i18n";
|
||||
import { getSelectedElements } from "../src/scene";
|
||||
import { CaptureUpdateAction } from "../store";
|
||||
import { copyTextToSystemClipboard } from "../../clipboard";
|
||||
import { copyIcon, elementLinkIcon } from "../../components/icons";
|
||||
import { t } from "../../i18n";
|
||||
import { getSelectedElements } from "../scene";
|
||||
import { CaptureUpdateAction } from "../../store";
|
||||
|
||||
import { register } from "./register";
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
import { queryByTestId, fireEvent } from "@testing-library/react";
|
||||
import React from "react";
|
||||
|
||||
import { Excalidraw } from "../index";
|
||||
import { API } from "../tests/helpers/api";
|
||||
import { Pointer, UI } from "../tests/helpers/ui";
|
||||
import { render } from "../tests/test-utils";
|
||||
import { Excalidraw } from "../../index";
|
||||
import { API } from "../../tests/helpers/api";
|
||||
import { Pointer, UI } from "../../tests/helpers/ui";
|
||||
import { render } from "../../tests/test-utils";
|
||||
|
||||
const { h } = window;
|
||||
const mouse = new Pointer("mouse");
|
|
@ -6,10 +6,10 @@ 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 "../src/scene";
|
||||
import { CaptureUpdateAction } from "../store";
|
||||
import { getSelectedElements } from "../scene";
|
||||
import { CaptureUpdateAction } from "../../store";
|
||||
|
||||
import { register } from "./register";
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
import { updateActiveTool } from "@excalidraw/common";
|
||||
|
||||
import { setCursorForShape } from "../cursor";
|
||||
import { CaptureUpdateAction } from "../store";
|
||||
import { setCursorForShape } from "../../cursor";
|
||||
import { CaptureUpdateAction } from "../../store";
|
||||
|
||||
import { register } from "./register";
|
||||
|
|
@ -9,24 +9,24 @@ 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 { loadFromJSON, saveAsJSON } from "../src/data";
|
||||
import { isImageFileHandle } from "../src/data/blob";
|
||||
import { nativeFileSystemSupported } from "../src/data/filesystem";
|
||||
import { resaveAsImageWithScene } from "../src/data/resave";
|
||||
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";
|
||||
import { resaveAsImageWithScene } from "../data/resave";
|
||||
|
||||
import { t } from "../i18n";
|
||||
import { getSelectedElements, isSomeElementSelected } from "../src/scene";
|
||||
import { getExportSize } from "../src/scene/export";
|
||||
import { CaptureUpdateAction } from "../store";
|
||||
import { t } from "../../i18n";
|
||||
import { getSelectedElements, isSomeElementSelected } from "../scene";
|
||||
import { getExportSize } from "../scene/export";
|
||||
import { CaptureUpdateAction } from "../../store";
|
||||
|
||||
import "../components/ToolIcon.scss";
|
||||
import "../../components/ToolIcon.scss";
|
||||
|
||||
import { register } from "./register";
|
||||
|
|
@ -16,15 +16,15 @@ import { isPathALoop } from "@excalidraw/element/shapes";
|
|||
|
||||
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 { CaptureUpdateAction } from "../store";
|
||||
import { t } from "../../i18n";
|
||||
import { resetCursor } from "../../cursor";
|
||||
import { done } from "../../components/icons";
|
||||
import { ToolButton } from "../../components/ToolButton";
|
||||
import { CaptureUpdateAction } from "../../store";
|
||||
|
||||
import { register } from "./register";
|
||||
|
||||
import type { AppState } from "../types";
|
||||
import type { AppState } from "../../types";
|
||||
|
||||
export const actionFinalize = register({
|
||||
name: "finalize",
|
|
@ -1,8 +1,8 @@
|
|||
import { pointFrom } from "@excalidraw/math";
|
||||
|
||||
import { Excalidraw } from "../index";
|
||||
import { API } from "../tests/helpers/api";
|
||||
import { render } from "../tests/test-utils";
|
||||
import { Excalidraw } from "../../index";
|
||||
import { API } from "../../tests/helpers/api";
|
||||
import { render } from "../../tests/test-utils";
|
||||
|
||||
import { actionFlipHorizontal, actionFlipVertical } from "./actionFlip";
|
||||
|
|
@ -26,14 +26,14 @@ import type {
|
|||
NonDeletedSceneElementsMap,
|
||||
} from "@excalidraw/element/types";
|
||||
|
||||
import { getSelectedElements } from "../src/scene";
|
||||
import { CaptureUpdateAction } from "../store";
|
||||
import { getSelectedElements } from "../scene";
|
||||
import { CaptureUpdateAction } from "../../store";
|
||||
|
||||
import { flipHorizontal, flipVertical } from "../components/icons";
|
||||
import { flipHorizontal, flipVertical } from "../../components/icons";
|
||||
|
||||
import { register } from "./register";
|
||||
|
||||
import type { AppClassProperties, AppState } from "../types";
|
||||
import type { AppClassProperties, AppState } from "../../types";
|
||||
|
||||
export const actionFlipHorizontal = register({
|
||||
name: "flipHorizontal",
|
|
@ -16,14 +16,14 @@ import { getCommonBounds } from "@excalidraw/element/bounds";
|
|||
|
||||
import type { ExcalidrawElement } from "@excalidraw/element/types";
|
||||
|
||||
import { setCursorForShape } from "../cursor";
|
||||
import { frameToolIcon } from "../components/icons";
|
||||
import { getSelectedElements } from "../src/scene";
|
||||
import { CaptureUpdateAction } from "../store";
|
||||
import { setCursorForShape } from "../../cursor";
|
||||
import { frameToolIcon } from "../../components/icons";
|
||||
import { getSelectedElements } from "../scene";
|
||||
import { CaptureUpdateAction } from "../../store";
|
||||
|
||||
import { register } from "./register";
|
||||
|
||||
import type { AppClassProperties, AppState, UIAppState } from "../types";
|
||||
import type { AppClassProperties, AppState, UIAppState } from "../../types";
|
||||
|
||||
const isSingleFrameSelected = (
|
||||
appState: UIAppState,
|
|
@ -34,17 +34,17 @@ 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";
|
||||
import { t } from "../../i18n";
|
||||
|
||||
import { isSomeElementSelected } from "../src/scene";
|
||||
import { CaptureUpdateAction } from "../store";
|
||||
import { isSomeElementSelected } from "../scene";
|
||||
import { CaptureUpdateAction } from "../../store";
|
||||
|
||||
import { register } from "./register";
|
||||
|
||||
import type { AppClassProperties, AppState } from "../types";
|
||||
import type { AppClassProperties, AppState } from "../../types";
|
||||
|
||||
const allElementsInSameGroup = (elements: readonly ExcalidrawElement[]) => {
|
||||
if (elements.length >= 2) {
|
|
@ -2,16 +2,16 @@ 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 { HistoryChangedEvent } from "../history";
|
||||
import { useEmitter } from "../src/hooks/useEmitter";
|
||||
import { t } from "../i18n";
|
||||
import { CaptureUpdateAction } from "../store";
|
||||
import { ToolButton } from "../../components/ToolButton";
|
||||
import { UndoIcon, RedoIcon } from "../../components/icons";
|
||||
import { HistoryChangedEvent } from "../../history";
|
||||
import { useEmitter } from "../hooks/useEmitter";
|
||||
import { t } from "../../i18n";
|
||||
import { CaptureUpdateAction } from "../../store";
|
||||
|
||||
import type { History } from "../history";
|
||||
import type { Store } from "../store";
|
||||
import type { AppClassProperties, AppState } from "../types";
|
||||
import type { History } from "../../history";
|
||||
import type { Store } from "../../store";
|
||||
import type { AppClassProperties, AppState } from "../../types";
|
||||
import type { Action, ActionResult } from "./types";
|
||||
|
||||
const executeHistoryAction = (
|
|
@ -4,12 +4,12 @@ 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";
|
||||
import { t } from "../../i18n";
|
||||
import { CaptureUpdateAction } from "../../store";
|
||||
|
||||
import { register } from "./register";
|
||||
|
|
@ -2,13 +2,13 @@ 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 { t } from "../i18n";
|
||||
import { ToolButton } from "../../components/ToolButton";
|
||||
import { getContextMenuLabel } from "../../components/hyperlink/Hyperlink";
|
||||
import { LinkIcon } from "../../components/icons";
|
||||
import { t } from "../../i18n";
|
||||
|
||||
import { getSelectedElements } from "../src/scene";
|
||||
import { CaptureUpdateAction } from "../store";
|
||||
import { getSelectedElements } from "../scene";
|
||||
import { CaptureUpdateAction } from "../../store";
|
||||
|
||||
import { register } from "./register";
|
||||
|
|
@ -4,11 +4,15 @@ import { getNonDeletedElements } from "@excalidraw/element";
|
|||
|
||||
import { showSelectedShapeActions } from "@excalidraw/element/showSelectedShapeActions";
|
||||
|
||||
import { ToolButton } from "../components/ToolButton";
|
||||
import { HamburgerMenuIcon, HelpIconThin, palette } from "../components/icons";
|
||||
import { t } from "../i18n";
|
||||
import { ToolButton } from "../../components/ToolButton";
|
||||
import {
|
||||
HamburgerMenuIcon,
|
||||
HelpIconThin,
|
||||
palette,
|
||||
} from "../../components/icons";
|
||||
import { t } from "../../i18n";
|
||||
|
||||
import { CaptureUpdateAction } from "../store";
|
||||
import { CaptureUpdateAction } from "../../store";
|
||||
|
||||
import { register } from "./register";
|
||||
|
|
@ -1,19 +1,19 @@
|
|||
import clsx from "clsx";
|
||||
|
||||
import { getClientColor } from "../clients";
|
||||
import { Avatar } from "../components/Avatar";
|
||||
import { getClientColor } from "../../clients";
|
||||
import { Avatar } from "../../components/Avatar";
|
||||
import {
|
||||
eyeIcon,
|
||||
microphoneIcon,
|
||||
microphoneMutedIcon,
|
||||
} from "../components/icons";
|
||||
import { t } from "../i18n";
|
||||
import { CaptureUpdateAction } from "../store";
|
||||
} from "../../components/icons";
|
||||
import { t } from "../../i18n";
|
||||
import { CaptureUpdateAction } from "../../store";
|
||||
|
||||
import { register } from "./register";
|
||||
|
||||
import type { GoToCollaboratorComponentProps } from "../components/UserList";
|
||||
import type { Collaborator } from "../types";
|
||||
import type { GoToCollaboratorComponentProps } from "../../components/UserList";
|
||||
import type { Collaborator } from "../../types";
|
||||
|
||||
export const actionGoToCollaborator = register({
|
||||
name: "goToCollaborator",
|
|
@ -7,10 +7,10 @@ import {
|
|||
STROKE_WIDTH,
|
||||
} from "@excalidraw/common";
|
||||
|
||||
import { Excalidraw } from "../index";
|
||||
import { API } from "../tests/helpers/api";
|
||||
import { UI } from "../tests/helpers/ui";
|
||||
import { render } from "../tests/test-utils";
|
||||
import { Excalidraw } from "../../index";
|
||||
import { API } from "../../tests/helpers/api";
|
||||
import { UI } from "../../tests/helpers/ui";
|
||||
import { render } from "../../tests/test-utils";
|
||||
|
||||
describe("element locking", () => {
|
||||
beforeEach(async () => {
|
|
@ -71,15 +71,15 @@ import type {
|
|||
NonDeletedSceneElementsMap,
|
||||
} 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 { 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";
|
||||
// TODO barnabasmolnar/editor-redesign
|
||||
// TextAlignTopIcon, TextAlignBottomIcon,TextAlignMiddleIcon,
|
||||
// ArrowHead icons
|
||||
import { Range } from "../components/Range";
|
||||
import { Range } from "../../components/Range";
|
||||
import {
|
||||
ArrowheadArrowIcon,
|
||||
ArrowheadBarIcon,
|
||||
|
@ -121,23 +121,23 @@ import {
|
|||
ArrowheadCrowfootIcon,
|
||||
ArrowheadCrowfootOneIcon,
|
||||
ArrowheadCrowfootOneOrManyIcon,
|
||||
} from "../components/icons";
|
||||
} from "../../components/icons";
|
||||
|
||||
import { Fonts } from "../fonts";
|
||||
import { getLanguage, t } from "../i18n";
|
||||
import { Fonts } from "../../fonts";
|
||||
import { getLanguage, t } from "../../i18n";
|
||||
import {
|
||||
canHaveArrowheads,
|
||||
getCommonAttributeOfSelectedElements,
|
||||
getSelectedElements,
|
||||
getTargetElements,
|
||||
isSomeElementSelected,
|
||||
} from "../src/scene";
|
||||
import { CaptureUpdateAction } from "../store";
|
||||
} from "../scene";
|
||||
import { CaptureUpdateAction } from "../../store";
|
||||
|
||||
import { register } from "./register";
|
||||
|
||||
import type { CaptureUpdateActionType } from "../store";
|
||||
import type { AppClassProperties, AppState, Primitive } from "../types";
|
||||
import type { CaptureUpdateActionType } from "../../store";
|
||||
import type { AppClassProperties, AppState, Primitive } from "../../types";
|
||||
|
||||
const FONT_SIZE_RELATIVE_INCREASE_STEP = 0.1;
|
||||
|
|
@ -8,9 +8,9 @@ import { selectGroupsForSelectedElements } from "@excalidraw/element/groups";
|
|||
|
||||
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";
|
||||
|
|
@ -26,11 +26,11 @@ 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 "../src/scene";
|
||||
import { CaptureUpdateAction } from "../store";
|
||||
import { t } from "../../i18n";
|
||||
import { getSelectedElements } from "../scene";
|
||||
import { CaptureUpdateAction } from "../../store";
|
||||
|
||||
import { register } from "./register";
|
||||
|
|
@ -5,12 +5,12 @@ import { measureText } from "@excalidraw/element/textMeasurements";
|
|||
|
||||
import { isTextElement } from "@excalidraw/element/typeChecks";
|
||||
|
||||
import { getSelectedElements } from "../src/scene";
|
||||
import { CaptureUpdateAction } from "../store";
|
||||
import { getSelectedElements } from "../scene";
|
||||
import { CaptureUpdateAction } from "../../store";
|
||||
|
||||
import { register } from "./register";
|
||||
|
||||
import type { AppClassProperties } from "../types";
|
||||
import type { AppClassProperties } from "../../types";
|
||||
|
||||
export const actionTextAutoResize = register({
|
||||
name: "autoResize",
|
|
@ -1,11 +1,11 @@
|
|||
import { CODES, KEYS } from "@excalidraw/common";
|
||||
|
||||
import { gridIcon } from "../components/icons";
|
||||
import { CaptureUpdateAction } from "../store";
|
||||
import { gridIcon } from "../../components/icons";
|
||||
import { CaptureUpdateAction } from "../../store";
|
||||
|
||||
import { register } from "./register";
|
||||
|
||||
import type { AppState } from "../types";
|
||||
import type { AppState } from "../../types";
|
||||
|
||||
export const actionToggleGridMode = register({
|
||||
name: "gridMode",
|
|
@ -1,7 +1,7 @@
|
|||
import { CODES, KEYS } from "@excalidraw/common";
|
||||
|
||||
import { magnetIcon } from "../components/icons";
|
||||
import { CaptureUpdateAction } from "../store";
|
||||
import { magnetIcon } from "../../components/icons";
|
||||
import { CaptureUpdateAction } from "../../store";
|
||||
|
||||
import { register } from "./register";
|
||||
|
|
@ -5,12 +5,12 @@ import {
|
|||
DEFAULT_SIDEBAR,
|
||||
} from "@excalidraw/common";
|
||||
|
||||
import { searchIcon } from "../components/icons";
|
||||
import { CaptureUpdateAction } from "../store";
|
||||
import { searchIcon } from "../../components/icons";
|
||||
import { CaptureUpdateAction } from "../../store";
|
||||
|
||||
import { register } from "./register";
|
||||
|
||||
import type { AppState } from "../types";
|
||||
import type { AppState } from "../../types";
|
||||
|
||||
export const actionToggleSearchMenu = register({
|
||||
name: "searchMenu",
|
|
@ -1,7 +1,7 @@
|
|||
import { CODES, KEYS } from "@excalidraw/common";
|
||||
|
||||
import { abacusIcon } from "../components/icons";
|
||||
import { CaptureUpdateAction } from "../store";
|
||||
import { abacusIcon } from "../../components/icons";
|
||||
import { CaptureUpdateAction } from "../../store";
|
||||
|
||||
import { register } from "./register";
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
import { CODES, KEYS } from "@excalidraw/common";
|
||||
|
||||
import { eyeIcon } from "../components/icons";
|
||||
import { CaptureUpdateAction } from "../store";
|
||||
import { eyeIcon } from "../../components/icons";
|
||||
import { CaptureUpdateAction } from "../../store";
|
||||
|
||||
import { register } from "./register";
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
import { CODES, KEYS } from "@excalidraw/common";
|
||||
|
||||
import { coffeeIcon } from "../components/icons";
|
||||
import { CaptureUpdateAction } from "../store";
|
||||
import { coffeeIcon } from "../../components/icons";
|
||||
import { CaptureUpdateAction } from "../../store";
|
||||
|
||||
import { register } from "./register";
|
||||
|
|
@ -12,9 +12,9 @@ import {
|
|||
BringToFrontIcon,
|
||||
SendBackwardIcon,
|
||||
SendToBackIcon,
|
||||
} from "../components/icons";
|
||||
import { t } from "../i18n";
|
||||
import { CaptureUpdateAction } from "../store";
|
||||
} from "../../components/icons";
|
||||
import { t } from "../../i18n";
|
||||
import { CaptureUpdateAction } from "../../store";
|
||||
|
||||
import { register } from "./register";
|
||||
|
|
@ -7,9 +7,9 @@ import type {
|
|||
OrderedExcalidrawElement,
|
||||
} from "@excalidraw/element/types";
|
||||
|
||||
import { trackEvent } from "../analytics";
|
||||
import { trackEvent } from "../../analytics";
|
||||
|
||||
import type { AppClassProperties, AppState } from "../types";
|
||||
import type { AppClassProperties, AppState } from "../../types";
|
||||
import type {
|
||||
Action,
|
||||
UpdaterFn,
|
|
@ -2,7 +2,7 @@ import { isDarwin, getShortcutKey } from "@excalidraw/common";
|
|||
|
||||
import type { SubtypeOf } from "@excalidraw/common/utility-types";
|
||||
|
||||
import { t } from "../i18n";
|
||||
import { t } from "../../i18n";
|
||||
|
||||
import type { ActionName } from "./types";
|
||||
|
|
@ -3,14 +3,14 @@ import type {
|
|||
OrderedExcalidrawElement,
|
||||
} from "@excalidraw/element/types";
|
||||
|
||||
import type { CaptureUpdateActionType } from "../store";
|
||||
import type { CaptureUpdateActionType } from "../../store";
|
||||
import type {
|
||||
AppClassProperties,
|
||||
AppState,
|
||||
ExcalidrawProps,
|
||||
BinaryFiles,
|
||||
UIAppState,
|
||||
} from "../types";
|
||||
} from "../../types";
|
||||
import type React from "react";
|
||||
|
||||
export type ActionSource =
|
|
@ -31,7 +31,7 @@ import {
|
|||
mockBoundingClientRect,
|
||||
restoreOriginalGetBoundingClientRect,
|
||||
} from "../../tests/test-utils";
|
||||
import { actionBindText } from "../../actions";
|
||||
import { actionBindText } from "../actions";
|
||||
|
||||
unmountComponent();
|
||||
|
||||
|
|
|
@ -43,19 +43,19 @@ import type {
|
|||
ExcalidrawTextElement,
|
||||
} from "@excalidraw/element/types";
|
||||
|
||||
import { actionSaveToActiveFile } from "../../actions";
|
||||
import { actionSaveToActiveFile } from "../actions";
|
||||
|
||||
import Scene from "../scene/Scene";
|
||||
import { parseClipboard } from "../../clipboard";
|
||||
import {
|
||||
actionDecreaseFontSize,
|
||||
actionIncreaseFontSize,
|
||||
} from "../../actions/actionProperties";
|
||||
} from "../actions/actionProperties";
|
||||
import {
|
||||
actionResetZoom,
|
||||
actionZoomIn,
|
||||
actionZoomOut,
|
||||
} from "../../actions/actionCanvas";
|
||||
} from "../actions/actionCanvas";
|
||||
|
||||
import type App from "../../components/App";
|
||||
import type { AppState } from "../../types";
|
||||
|
|
|
@ -2,7 +2,7 @@ import React from "react";
|
|||
|
||||
import { CODES } from "@excalidraw/common";
|
||||
|
||||
import { copiedStyles } from "../actions/actionStyles";
|
||||
import { copiedStyles } from "../src/actions/actionStyles";
|
||||
import { Excalidraw } from "../index";
|
||||
import { API } from "../tests/helpers/api";
|
||||
import { Keyboard, Pointer, UI } from "../tests/helpers/ui";
|
||||
|
|
|
@ -5,7 +5,7 @@ import { KEYS, reseed } from "@excalidraw/common";
|
|||
|
||||
import { setDateTimeForTests } from "@excalidraw/common";
|
||||
|
||||
import { copiedStyles } from "../actions/actionStyles";
|
||||
import { copiedStyles } from "../src/actions/actionStyles";
|
||||
import { Excalidraw } from "../index";
|
||||
import * as StaticScene from "../src/renderer/staticScene";
|
||||
|
||||
|
@ -25,8 +25,8 @@ import {
|
|||
unmountComponent,
|
||||
} from "./test-utils";
|
||||
|
||||
import type { ShortcutName } from "../actions/shortcuts";
|
||||
import type { ActionName } from "../actions/types";
|
||||
import type { ShortcutName } from "../src/actions/shortcuts";
|
||||
import type { ActionName } from "../src/actions/types";
|
||||
|
||||
const checkpoint = (name: string) => {
|
||||
expect(renderStaticScene.mock.calls.length).toMatchSnapshot(
|
||||
|
|
|
@ -11,7 +11,7 @@ import type {
|
|||
} from "@excalidraw/element/types";
|
||||
|
||||
import { Excalidraw, exportToCanvas, exportToSvg } from "..";
|
||||
import { actionFlipHorizontal, actionFlipVertical } from "../actions";
|
||||
import { actionFlipHorizontal, actionFlipVertical } from "../src/actions";
|
||||
|
||||
import { API } from "./helpers/api";
|
||||
import { Keyboard, Pointer, UI } from "./helpers/ui";
|
||||
|
|
|
@ -4,7 +4,7 @@ import { mutateElement } from "@excalidraw/element/mutateElement";
|
|||
|
||||
import { KEYS } from "@excalidraw/common";
|
||||
|
||||
import { actionSelectAll } from "../actions";
|
||||
import { actionSelectAll } from "../src/actions";
|
||||
import { t } from "../i18n";
|
||||
import { Excalidraw } from "../index";
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ import type {
|
|||
FileId,
|
||||
} from "@excalidraw/element/types";
|
||||
|
||||
import { actionFlipHorizontal, actionFlipVertical } from "../actions";
|
||||
import { actionFlipHorizontal, actionFlipVertical } from "../src/actions";
|
||||
import { createPasteEvent } from "../clipboard";
|
||||
import { Excalidraw } from "../index";
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ import { createTestHook } from "../../components/App";
|
|||
import { getDefaultAppState } from "../../appState";
|
||||
import { GlobalTestState, createEvent, fireEvent, act } from "../test-utils";
|
||||
|
||||
import type { Action } from "../../actions/types";
|
||||
import type { Action } from "../../src/actions/types";
|
||||
import type App from "../../components/App";
|
||||
import type { AppState } from "../../types";
|
||||
|
||||
|
|
|
@ -42,9 +42,12 @@ import {
|
|||
actionSendBackward,
|
||||
actionBringForward,
|
||||
actionSendToBack,
|
||||
} from "../actions";
|
||||
import { createUndoAction, createRedoAction } from "../actions/actionHistory";
|
||||
import { actionToggleViewMode } from "../actions/actionToggleViewMode";
|
||||
} from "../src/actions/index.js";
|
||||
import {
|
||||
createUndoAction,
|
||||
createRedoAction,
|
||||
} from "../src/actions/actionHistory.js";
|
||||
import { actionToggleViewMode } from "../src/actions/actionToggleViewMode.js";
|
||||
import { getDefaultAppState } from "../appState";
|
||||
import { HistoryEntry } from "../history";
|
||||
import { Excalidraw } from "../index";
|
||||
|
|
|
@ -43,7 +43,7 @@ import type {
|
|||
MakeBrand,
|
||||
} from "@excalidraw/common/utility-types";
|
||||
|
||||
import type { Action } from "./actions/types";
|
||||
import type { Action } from "./src/actions/types";
|
||||
import type { Spreadsheet } from "./charts";
|
||||
import type { ClipboardData } from "./clipboard";
|
||||
import type App from "./components/App";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue