diff --git a/manifest-beta.json b/manifest-beta.json index 521ae62..c05cc44 100644 --- a/manifest-beta.json +++ b/manifest-beta.json @@ -1,7 +1,7 @@ { "id": "obsidian-excalidraw-plugin", "name": "Excalidraw", - "version": "2.14.0", + "version": "2.14.1-beta-1", "minAppVersion": "1.5.7", "description": "An Obsidian plugin to edit and view Excalidraw drawings", "author": "Zsolt Viczian", diff --git a/package.json b/package.json index 51bd0f2..04d8671 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "license": "MIT", "dependencies": { "@popperjs/core": "^2.11.8", - "@zsviczian/excalidraw": "0.18.0-25", + "@zsviczian/excalidraw": "0.18.0-26", "chroma-js": "^3.1.2", "clsx": "^2.0.0", "@zsviczian/colormaster": "^1.2.2", diff --git a/rollup.config.js b/rollup.config.js index d2bbc34..f81bc7e 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -49,7 +49,7 @@ const jsxRuntimeShim = ` const mathjaxtosvg_pkg = isLib ? "" : fs.readFileSync("./MathjaxToSVG/dist/index.js", "utf8"); -const LANGUAGES = ['ru', 'zh-cn', 'zh-tw']; //english is not compressed as it is always loaded by default +const LANGUAGES = ['ru', 'zh-cn', 'zh-tw', 'es']; //english is not compressed as it is always loaded by default function trimLastSemicolon(input) { if (input.endsWith(";")) { diff --git a/src/shared/Dialogs/Messages.ts b/src/shared/Dialogs/Messages.ts index efc9afc..141c7bb 100644 --- a/src/shared/Dialogs/Messages.ts +++ b/src/shared/Dialogs/Messages.ts @@ -17,6 +17,15 @@ I build this plugin in my free time, as a labor of love. Curious about the philo
`, +"2.14.1":` +## New +- Added Spanish translation by [@Joakim31](https://github.com/Joakim31) [#2425](https://github.com/zsviczian/obsidian-excalidraw-plugin/pull/2425) +- Incremental minor updates from the main Excalidraw project. + +## Fixed +- Styling issues impacting native Obsidian search/replace dialogs. [#2420](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/2420) +- Now using native Obsidian attachment location function. 🙏 [mnaoumov](https://github.com/mnaoumov) [#2421](https://github.com/zsviczian/obsidian-excalidraw-plugin/pull/2421), potentially fixes [#179](https://github.com/RainCat1998/obsidian-custom-attachment-location/issues/179) of the Obsidian Custom Attachment Location plugin issue. +`, "2.14.0":` ## A Big "Small" Update - Added search to Excalidraw Settings, plus added a link to access the public NotebookLM workbook pre-loaded with everything about the plugin diff --git a/src/shared/Scripts.ts b/src/shared/Scripts.ts index d89e831..4ca3f4f 100644 --- a/src/shared/Scripts.ts +++ b/src/shared/Scripts.ts @@ -191,7 +191,7 @@ export class ScriptEngine { ...this.scriptIconMap, }; const splitname = splitFolderAndFilename(name) - this.scriptIconMap[scriptPath] = { name:splitname.filename, group: splitname.folderpath === "/" ? "" : splitname.folderpath, svgString }; + this.scriptIconMap[scriptPath] = { name:splitname.filename, group: splitname.folderpath, svgString }; this.updateToolPannels(); } diff --git a/src/shared/components/ContentSearcher.ts b/src/shared/components/ContentSearcher.ts index 63a60f8..4b0e0e4 100644 --- a/src/shared/components/ContentSearcher.ts +++ b/src/shared/components/ContentSearcher.ts @@ -28,7 +28,7 @@ export class ContentSearcher { * Creates search UI elements styled like Obsidian's native search */ private createSearchElements(): void { - this.searchBarWrapper = createDiv("document-search-container"); + this.searchBarWrapper = createDiv("excalidraw-search document-search-container"); const documentSearch = createDiv("document-search"); this.inputContainer = createDiv("search-input-container document-search-input"); this.searchBar = createEl("input",{type: "text", placeholder: "Find..."}); diff --git a/src/utils/carveout.ts b/src/utils/carveout.ts index b1e90a4..378dcb5 100644 --- a/src/utils/carveout.ts +++ b/src/utils/carveout.ts @@ -2,7 +2,7 @@ import { ExcalidrawEmbeddableElement, ExcalidrawFrameElement, ExcalidrawImageEle import { Mutable } from "@zsviczian/excalidraw/types/common/src/utility-types"; import { getEA } from "src/core"; import { ExcalidrawAutomate } from "src/shared/ExcalidrawAutomate"; -import { getCropFileNameAndFolder, getListOfTemplateFiles, splitFolderAndFilename } from "./fileUtils"; +import { getCropFileNameAndFolder, getListOfTemplateFiles } from "./fileUtils"; import { Notice, TFile } from "obsidian"; import { Radians } from "@zsviczian/excalidraw/types/math/src/types"; diff --git a/src/utils/fileUtils.ts b/src/utils/fileUtils.ts index 1a40523..d205a33 100644 --- a/src/utils/fileUtils.ts +++ b/src/utils/fileUtils.ts @@ -11,7 +11,7 @@ import ExcalidrawView from "src/view/ExcalidrawView"; /** * Splits a full path including a folderpath and a filename into separate folderpath and filename components * @param filepath - * @returns folderpath will be normalized. This means "/" for root folder and no trailing "/" for other folders + * @returns returns "" for root folder and normalized path for subfolders (no trailing "/", e.g. "folder/subfolder") */ type ImageExtension = keyof typeof IMAGE_MIME_TYPES; @@ -23,11 +23,13 @@ export function splitFolderAndFilename(filepath: string): { } { const lastIndex = filepath.lastIndexOf("/"); const filename = lastIndex == -1 ? filepath : filepath.substring(lastIndex + 1); + const lastDotIndex = filename.lastIndexOf("."); + const folderpath = filepath.substring(0, lastIndex); return { - folderpath: normalizePath(filepath.substring(0, lastIndex)), + folderpath: folderpath ? normalizePath(folderpath) : "", filename, basename: filename.replace(/\.[^/.]+$/, ""), - extension: filename.substring(filename.lastIndexOf(".") + 1), + extension: lastDotIndex > 0 ? filename.substring(lastDotIndex + 1) : "", }; } @@ -540,7 +542,7 @@ export async function importFileToVault(app: App, fname: string, content: string export async function createOrOverwriteFile(app: App, path: string, content: string | ArrayBuffer | Blob): Promise