Skip to content

Commit

Permalink
major file reorganization
Browse files Browse the repository at this point in the history
  • Loading branch information
zsviczian committed Dec 19, 2024
1 parent ab8ba66 commit eebc428
Show file tree
Hide file tree
Showing 103 changed files with 14,783 additions and 15,118 deletions.
8 changes: 4 additions & 4 deletions docs/API/ExcalidrawAutomate.d.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
/// <reference types="react" />
import ExcalidrawPlugin from "src/main";
import ExcalidrawPlugin from "src/Core/main";
import { FillStyle, StrokeStyle, ExcalidrawElement, ExcalidrawBindableElement, FileId, NonDeletedExcalidrawElement, ExcalidrawImageElement, StrokeRoundness, RoundnessType } from "@zsviczian/excalidraw/types/excalidraw/element/types";
import { Editor, OpenViewState, TFile, WorkspaceLeaf } from "obsidian";
import * as obsidian_module from "obsidian";
import ExcalidrawView, { ExportSettings } from "src/ExcalidrawView";
import ExcalidrawView, { ExportSettings } from "src/View/ExcalidrawView";
import { AppState, BinaryFileData, DataURL, ExcalidrawImperativeAPI, Point } from "@zsviczian/excalidraw/types/excalidraw/types";
import { EmbeddedFilesLoader } from "src/EmbeddedFileLoader";
import { ConnectionPoint, DeviceType } from "src/types/types";
import { ConnectionPoint, DeviceType } from "src/Types/Types";
import { ColorMaster } from "colormaster";
import { TInput } from "colormaster/types";
import { ClipboardData } from "@zsviczian/excalidraw/types/excalidraw/clipboard";
import { PaneTarget } from "src/utils/ModifierkeyHelper";
import { PaneTarget } from "src/Utils/ModifierkeyHelper";
export declare class ExcalidrawAutomate {
/**
* Utility function that returns the Obsidian Module object.
Expand Down
6 changes: 3 additions & 3 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function minifyCode(code) {
}

function compressLanguageFile(lang) {
const inputDir = "./src/lang/locale";
const inputDir = "./src/Lang/Locale";
const filePath = `${inputDir}/${lang}.ts`;
let content = fs.readFileSync(filePath, "utf-8");
content = trimLastSemicolon(content.split("export default")[1].trim());
Expand Down Expand Up @@ -102,7 +102,7 @@ const packageString = isLib
'const PLUGIN_VERSION="' + manifest.version + '";';

const BASE_CONFIG = {
input: 'src/main.ts',
input: 'src/Core/main.ts',
external: [
'@codemirror/autocomplete',
'@codemirror/collab',
Expand Down Expand Up @@ -166,7 +166,7 @@ const BUILD_CONFIG = {

const LIB_CONFIG = {
...BASE_CONFIG,
input: "src/index.ts",
input: "src/Core/index.ts",
output: {
dir: "lib",
sourcemap: true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Extension } from "@codemirror/state";
import ExcalidrawPlugin from "src/main";
import ExcalidrawPlugin from "src/Core/main";
import { HideTextBetweenCommentsExtension } from "./Fadeout";
import { debug, DEBUGGING } from "src/utils/DebugHelper";
import { debug, DEBUGGING } from "src/Utils/DebugHelper";
export const EDITOR_FADEOUT = "fadeOutExcalidrawMarkup";

const editorExtensions: {[key:string]:Extension}= {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,25 @@ import {
IMAGE_TYPES,
DEVICE,
sceneCoordsToViewportCoords,
} from "../constants/constants";
import ExcalidrawView, { TextMode } from "../ExcalidrawView";
} from "../../Constants/Constants";
import ExcalidrawView, { TextMode } from "../../View/ExcalidrawView";
import {
REGEX_LINK,
} from "../ExcalidrawData";
} from "../../Shared/ExcalidrawData";
import { ExcalidrawSettings } from "../settings";
import { openDialogAction, OpenFileDialog } from "../dialogs/OpenDrawing";
import { InsertLinkDialog } from "../dialogs/InsertLinkDialog";
import { InsertCommandDialog } from "../dialogs/InsertCommandDialog";
import { InsertImageDialog } from "../dialogs/InsertImageDialog";
import { ImportSVGDialog } from "../dialogs/ImportSVGDialog";
import { InsertMDDialog } from "../dialogs/InsertMDDialog";
import { openDialogAction, OpenFileDialog } from "../../Shared/Dialogs/OpenDrawing";
import { InsertLinkDialog } from "../../Shared/Dialogs/InsertLinkDialog";
import { InsertCommandDialog } from "../../Shared/Dialogs/InsertCommandDialog";
import { InsertImageDialog } from "../../Shared/Dialogs/InsertImageDialog";
import { ImportSVGDialog } from "../../Shared/Dialogs/ImportSVGDialog";
import { InsertMDDialog } from "../../Shared/Dialogs/InsertMDDialog";
import {
ExcalidrawAutomate,
insertLaTeXToView,
search,
} from "../ExcalidrawAutomate";
import { templatePromt } from "../dialogs/Prompt";
import { t } from "../lang/helpers";
} from "../../Shared/ExcalidrawAutomate";
import { templatePromt } from "../../Shared/Dialogs/Prompt";
import { t } from "../../Lang/Helpers";
import {
getAliasWithSize,
getAnnotationFileNameAndFolder,
Expand All @@ -45,32 +45,32 @@ import {
getLink,
getListOfTemplateFiles,
getURLImageExtension,
} from "../utils/FileUtils";
} from "../../Utils/FileUtils";
import {
setLeftHandedMode,
sleep,
decompress,
getImageSize,
} from "../utils/Utils";
import { extractSVGPNGFileName, getActivePDFPageNumberFromPDFView, getAttachmentsFolderAndFilePath, isObsidianThemeDark, mergeMarkdownFiles, setExcalidrawView } from "../utils/ObsidianUtils";
} from "../../Utils/Utils";
import { extractSVGPNGFileName, getActivePDFPageNumberFromPDFView, getAttachmentsFolderAndFilePath, isObsidianThemeDark, mergeMarkdownFiles, setExcalidrawView } from "../../Utils/ObsidianUtils";
import { ExcalidrawElement, ExcalidrawEmbeddableElement, ExcalidrawImageElement, ExcalidrawTextElement } from "@zsviczian/excalidraw/types/excalidraw/element/types";
import { ReleaseNotes } from "../dialogs/ReleaseNotes";
import { ScriptInstallPrompt } from "../dialogs/ScriptInstallPrompt";
import Taskbone from "../ocr/Taskbone";
import { emulateCTRLClickForLinks, linkClickModifierType, PaneTarget } from "../utils/ModifierkeyHelper";
import { InsertPDFModal } from "../dialogs/InsertPDFModal";
import { ExportDialog } from "../dialogs/ExportDialog";
import { UniversalInsertFileModal } from "../dialogs/UniversalInsertFileModal";
import { PublishOutOfDateFilesDialog } from "../dialogs/PublishOutOfDateFiles";
import { EmbeddableSettings } from "../dialogs/EmbeddableSettings";
import { processLinkText } from "../utils/CustomEmbeddableUtils";
import { getEA } from "src";
import { ReleaseNotes } from "../../Shared/Dialogs/ReleaseNotes";
import { ScriptInstallPrompt } from "../../Shared/Dialogs/ScriptInstallPrompt";
import Taskbone from "../../Shared/OCR/Taskbone";
import { emulateCTRLClickForLinks, linkClickModifierType, PaneTarget } from "../../Utils/ModifierkeyHelper";
import { InsertPDFModal } from "../../Shared/Dialogs/InsertPDFModal";
import { ExportDialog } from "../../Shared/Dialogs/ExportDialog";
import { UniversalInsertFileModal } from "../../Shared/Dialogs/UniversalInsertFileModal";
import { PublishOutOfDateFilesDialog } from "../../Shared/Dialogs/PublishOutOfDateFiles";
import { EmbeddableSettings } from "../../Shared/Dialogs/EmbeddableSettings";
import { processLinkText } from "../../Utils/CustomEmbeddableUtils";
import { getEA } from "src/Core";
import { ExcalidrawImperativeAPI } from "@zsviczian/excalidraw/types/excalidraw/types";
import { Mutable } from "@zsviczian/excalidraw/types/excalidraw/utility-types";
import { carveOutImage, carveOutPDF, createImageCropperFile } from "../utils/CarveOut";
import { showFrameSettings } from "../dialogs/FrameSettings";
import { insertImageToView } from "../utils/ExcalidrawViewUtils";
import ExcalidrawPlugin from "src/main";
import { carveOutImage, carveOutPDF, createImageCropperFile } from "../../Utils/CarveOut";
import { showFrameSettings } from "../../Shared/Dialogs/FrameSettings";
import { insertImageToView } from "../../Utils/ExcalidrawViewUtils";
import ExcalidrawPlugin from "src/Core/main";

declare const PLUGIN_VERSION:string;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { WorkspaceLeaf, TFile, Editor, MarkdownView, MarkdownFileInfo, MetadataCache, App, EventRef, Menu, FileView } from "obsidian";
import { ExcalidrawElement } from "@zsviczian/excalidraw/types/excalidraw/element/types";
import { getLink } from "../utils/FileUtils";
import { editorInsertText, getParentOfClass, setExcalidrawView } from "../utils/ObsidianUtils";
import ExcalidrawPlugin from "src/main";
import { DEBUGGING, debug } from "src/utils/DebugHelper";
import { ExcalidrawAutomate } from "src/ExcalidrawAutomate";
import { DEVICE, FRONTMATTER_KEYS, ICON_NAME, VIEW_TYPE_EXCALIDRAW } from "src/constants/constants";
import ExcalidrawView from "src/ExcalidrawView";
import { t } from "src/lang/helpers";
import { getLink } from "../../Utils/FileUtils";
import { editorInsertText, getParentOfClass, setExcalidrawView } from "../../Utils/ObsidianUtils";
import ExcalidrawPlugin from "src/Core/main";
import { DEBUGGING, debug } from "src/Utils/DebugHelper";
import { ExcalidrawAutomate } from "src/Shared/ExcalidrawAutomate";
import { DEVICE, FRONTMATTER_KEYS, ICON_NAME, VIEW_TYPE_EXCALIDRAW } from "src/Constants/Constants";
import ExcalidrawView from "src/View/ExcalidrawView";
import { t } from "src/Lang/Helpers";

/**
* Registers event listeners for the plugin
Expand Down
22 changes: 11 additions & 11 deletions src/Managers/FileManager.ts → src/Core/Managers/FileManager.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { debug } from "src/utils/DebugHelper";
import { debug } from "src/Utils/DebugHelper";
import { App, FrontMatterCache, MarkdownView, MetadataCache, normalizePath, Notice, TAbstractFile, TFile, WorkspaceLeaf } from "obsidian";
import { BLANK_DRAWING, DARK_BLANK_DRAWING, DEVICE, EXPORT_TYPES, FRONTMATTER, FRONTMATTER_KEYS, JSON_parse, nanoid, VIEW_TYPE_EXCALIDRAW } from "src/constants/constants";
import { Prompt, templatePromt } from "src/dialogs/Prompt";
import { changeThemeOfExcalidrawMD, ExcalidrawData, getMarkdownDrawingSection } from "src/ExcalidrawData";
import ExcalidrawView, { getTextMode } from "src/ExcalidrawView";
import ExcalidrawPlugin from "src/main";
import { DEBUGGING } from "src/utils/DebugHelper";
import { checkAndCreateFolder, download, getIMGFilename, getLink, getListOfTemplateFiles, getNewUniqueFilepath } from "src/utils/FileUtils";
import { PaneTarget } from "src/utils/ModifierkeyHelper";
import { getExcalidrawViews, getNewOrAdjacentLeaf, isObsidianThemeDark, openLeaf } from "src/utils/ObsidianUtils";
import { errorlog, getExportTheme } from "src/utils/Utils";
import { BLANK_DRAWING, DARK_BLANK_DRAWING, DEVICE, EXPORT_TYPES, FRONTMATTER, FRONTMATTER_KEYS, JSON_parse, nanoid, VIEW_TYPE_EXCALIDRAW } from "src/Constants/Constants";
import { Prompt, templatePromt } from "src/Shared/Dialogs/Prompt";
import { changeThemeOfExcalidrawMD, ExcalidrawData, getMarkdownDrawingSection } from "../../Shared/ExcalidrawData";
import ExcalidrawView, { getTextMode } from "src/View/ExcalidrawView";
import ExcalidrawPlugin from "src/Core/main";
import { DEBUGGING } from "src/Utils/DebugHelper";
import { checkAndCreateFolder, download, getIMGFilename, getLink, getListOfTemplateFiles, getNewUniqueFilepath } from "src/Utils/FileUtils";
import { PaneTarget } from "src/Utils/ModifierkeyHelper";
import { getExcalidrawViews, getNewOrAdjacentLeaf, isObsidianThemeDark, openLeaf } from "src/Utils/ObsidianUtils";
import { errorlog, getExportTheme } from "src/Utils/Utils";

export class PluginFileManager {
private plugin: ExcalidrawPlugin;
Expand Down
Loading

0 comments on commit eebc428

Please sign in to comment.