mirror of
https://github.com/zsviczian/obsidian-excalidraw-plugin.git
synced 2025-08-06 05:46:28 +00:00
1.8.26
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "obsidian-excalidraw-plugin",
|
||||
"name": "Excalidraw",
|
||||
"version": "1.8.25",
|
||||
"version": "1.8.26",
|
||||
"minAppVersion": "1.1.6",
|
||||
"description": "An Obsidian plugin to edit and view Excalidraw drawings",
|
||||
"author": "Zsolt Viczian",
|
||||
|
||||
@@ -21,7 +21,7 @@ import {
|
||||
svgToBase64,
|
||||
} from "./utils/Utils";
|
||||
import { isObsidianThemeDark } from "./utils/ObsidianUtils";
|
||||
import { isCTRL, isMETA, linkClickModifierType } from "./utils/ModifierkeyHelper";
|
||||
import { linkClickModifierType } from "./utils/ModifierkeyHelper";
|
||||
|
||||
interface imgElementAttributes {
|
||||
file?: TFile;
|
||||
|
||||
@@ -17,6 +17,13 @@ I develop this plugin as a hobby, spending my free time doing this. If you find
|
||||
|
||||
<div class="ex-coffee-div"><a href="https://ko-fi.com/zsolt"><img src="https://cdn.ko-fi.com/cdn/kofi3.png?v=3" height=45></a></div>
|
||||
`,
|
||||
"1.8.26":`
|
||||
## Fixed
|
||||
- Dynamic styling did not pick up correctly
|
||||
- the accent color with the default Obsidian theme
|
||||
- the drawing theme color with the out of the box, default new drawing (not using a template)
|
||||
- The Obsidian tools panel did not pick up user scripts when installing your very first script. A reload of Obsidian was required.
|
||||
`,
|
||||
"1.8.25": `
|
||||
<div class="excalidraw-videoWrapper"><div>
|
||||
<iframe src="https://www.youtube.com/embed/BvYkOaly-QM" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
||||
|
||||
@@ -103,8 +103,6 @@ import { Packages } from "./types";
|
||||
import { ScriptInstallPrompt } from "./dialogs/ScriptInstallPrompt";
|
||||
import Taskbone from "./ocr/Taskbone";
|
||||
import { emulateCTRLClickForLinks, linkClickModifierType, PaneTarget } from "./utils/ModifierkeyHelper";
|
||||
import { ColorMap } from "./EmbeddedFileLoader";
|
||||
|
||||
|
||||
declare module "obsidian" {
|
||||
interface App {
|
||||
@@ -495,6 +493,9 @@ export default class ExcalidrawPlugin extends Plugin {
|
||||
svgPath,
|
||||
);
|
||||
setButtonText("UPTODATE");
|
||||
if(Object.keys(this.scriptEngine.scriptIconMap).length === 0) {
|
||||
this.scriptEngine.loadScripts();
|
||||
}
|
||||
new Notice(`Installed: ${(scriptFile as TFile).basename}`);
|
||||
} catch (e) {
|
||||
new Notice(`Error installing script: ${fname}`);
|
||||
|
||||
@@ -23,7 +23,9 @@ export const setDynamicStyle = (
|
||||
return;
|
||||
}
|
||||
const doc = view.ownerDocument;
|
||||
const isLightTheme = view?.excalidrawData?.scene?.appState?.theme === "light";
|
||||
const isLightTheme =
|
||||
view?.excalidrawAPI?.getAppState?.()?.theme === "light" ||
|
||||
view?.excalidrawData?.scene?.appState?.theme === "light";
|
||||
|
||||
const darker = "#202020";
|
||||
const lighter = "#fbfbfb";
|
||||
@@ -43,11 +45,8 @@ export const setDynamicStyle = (
|
||||
const bgLightness = cmBG().lightness;
|
||||
const isDark = cmBG().isDark();
|
||||
|
||||
const docStyle = doc.querySelector("body").style;
|
||||
const accentColorString = `hsl(${
|
||||
docStyle.getPropertyValue("--accent-h")},${
|
||||
docStyle.getPropertyValue("--accent-s")},${
|
||||
docStyle.getPropertyValue("--accent-l")})`;
|
||||
//@ts-ignore
|
||||
const accentColorString = app.getAccentColor();
|
||||
const accent = () => ea.getCM(accentColorString);
|
||||
|
||||
const cmBlack = () => ea.getCM("#000000").lightnessTo(bgLightness);
|
||||
|
||||
Reference in New Issue
Block a user