Compare commits

..

1 Commits

Author SHA1 Message Date
Zsolt Viczian
75b9083ec8 WIP 2022-10-09 08:10:58 +02:00
19 changed files with 8238 additions and 8428 deletions

View File

@@ -17,10 +17,7 @@ Please upgrade to Obsidian v0.12.19 or higher to get the latest release.
|[![fourtfont](https://user-images.githubusercontent.com/14358394/149659524-2a4e0a24-40c9-4e66-a6b1-c92f3b88ecd5.jpg)](https://youtu.be/eKFmrSQhFA4)|[![thumbnail](https://user-images.githubusercontent.com/14358394/151705333-54e9ffd2-0bd7-4d02-b99e-0bd4e4708d4d.jpg)](https://youtu.be/qbPIAZguJeo)|[![Thumbnail](https://user-images.githubusercontent.com/14358394/152585752-7eb0371f-0bab-40f6-a194-3b48e5811735.jpg)](https://youtu.be/2Y8OhkGiTHg)|
|[![Thumbnail](https://user-images.githubusercontent.com/14358394/153676009-6f86b2d7-c248-49a2-b802-be21c6999e4f.jpg)](https://youtu.be/2v9TZmQNO8c)|[![Thumbnail](https://user-images.githubusercontent.com/14358394/154821232-a404b6cf-72fb-4ce4-9d53-619132dce491.jpg)](https://youtu.be/xHPGWR3m0c8)|[![Thumbnail](https://user-images.githubusercontent.com/14358394/156931428-b2269fd9-87bd-43ab-8558-5572f40dff93.jpg)](https://youtu.be/gMIKXyhS-dM)|
|[![thumbnail](https://user-images.githubusercontent.com/14358394/156931461-0979b821-315a-41dd-86f1-31d169b7c127.jpg)](https://youtu.be/Etskjw7a5zo)|[![Thumbnail](https://user-images.githubusercontent.com/14358394/158008902-12c6a851-237e-4edd-a631-d48e81c904b2.jpg)](https://youtu.be/4N6efq1DtH0)|[![thumbnail](https://user-images.githubusercontent.com/14358394/159369910-6371f08d-b5fa-454d-9c6c-948f7e7a7d26.jpg)](https://youtu.be/U2LkBRBk4LY)|
| [![6 strategies for linking your visual thoughts v4](https://user-images.githubusercontent.com/14358394/171635214-30533c45-94fa-436e-83a9-b2ec99f190e2.jpg)](https://youtu.be/qiKuqMcNWgU)|[![Video thumbnail small](https://user-images.githubusercontent.com/14358394/185791706-3d9983ab-7cb1-4b27-a016-30c039d84e34.jpg)](https://youtu.be/yZQoJg2RCKI)|[![Thumbnail - Colors - Excalidraw Basics (Custom)](https://user-images.githubusercontent.com/14358394/194773147-5418a0ab-6be5-4eb0-a8e4-d6af21b1b483.png)](https://youtu.be/6PLGHBH9VZ4) |
|[![Thumbnail - Excalidraw color palettes (Custom)](https://user-images.githubusercontent.com/14358394/194773211-9e871be7-0795-4dc7-947e-c6c275e690d0.png)](https://youtu.be/epYNx2FSf2w) | [![Thumbnail (Custom)](https://user-images.githubusercontent.com/14358394/194773268-400cfb1b-6bde-45e0-9e4b-91bbaa461cf0.png)](https://youtu.be/Amhlv6r9WvM) | [![Thumbnail - Simple rules for beautiful sketches (Custom) (1)](https://user-images.githubusercontent.com/14358394/194773527-ef35c8b9-1a6d-4415-9c7e-b667fb17535d.png)](https://youtu.be/r9oB1SlK1GU) |
|[![Thumbnail - ColorMaster Scripting (Custom)](https://user-images.githubusercontent.com/14358394/195988535-a133a9b9-d094-45ba-ba64-c994b9a1e0ef.png)](https://youtu.be/7gJDwNgQ6NU) | | |
| [![6 strategies for linking your visual thoughts v4](https://user-images.githubusercontent.com/14358394/171635214-30533c45-94fa-436e-83a9-b2ec99f190e2.jpg)](https://youtu.be/qiKuqMcNWgU)|[![Video thumbnail small](https://user-images.githubusercontent.com/14358394/185791706-3d9983ab-7cb1-4b27-a016-30c039d84e34.jpg)](https://youtu.be/yZQoJg2RCKI)| |
# Key features

View File

@@ -1,7 +1,7 @@
{
"id": "obsidian-excalidraw-plugin",
"name": "Excalidraw",
"version": "1.7.25",
"version": "1.7.22",
"minAppVersion": "0.15.6",
"description": "An Obsidian plugin to edit and view Excalidraw drawings",
"author": "Zsolt Viczian",

View File

@@ -1,6 +1,6 @@
{
"name": "obsidian-excalidraw-plugin",
"version": "1.7.25",
"version": "1.7.11",
"description": "This is an Obsidian.md plugin that lets you view and edit Excalidraw drawings",
"main": "lib/index.js",
"types": "lib/index.d.ts",
@@ -18,7 +18,7 @@
"license": "MIT",
"dependencies": {
"@types/lz-string": "^1.3.34",
"@zsviczian/excalidraw": "0.12.0-obsidian-11",
"@zsviczian/excalidraw": "0.12.0-obsidian-9",
"clsx": "^1.1.1",
"lz-string": "^1.4.4",
"monkey-around": "^2.3.0",

File diff suppressed because it is too large Load Diff

View File

@@ -7,7 +7,6 @@ import {
ExcalidrawBindableElement,
FileId,
NonDeletedExcalidrawElement,
ExcalidrawImageElement,
} from "@zsviczian/excalidraw/types/element/types";
import { normalizePath, TFile, WorkspaceLeaf } from "obsidian";
import ExcalidrawView, { ExportSettings, TextMode } from "./ExcalidrawView";
@@ -25,9 +24,7 @@ import {
//debug,
embedFontsInSVG,
errorlog,
getDataURL,
getEmbeddedFilenameParts,
getImageSize,
getPNG,
getSVG,
isVersionNewerThanOther,
@@ -1217,7 +1214,7 @@ export class ExcalidrawAutomate implements ExcalidrawAutomateInterface {
getViewElements(): ExcalidrawElement[] {
//@ts-ignore
if (!this.targetView || !this.targetView?._loaded) {
errorMessage("targetView not set", "getViewElements()");
errorMessage("targetView not set", "getViewSelectedElements()");
return [];
}
const current = this.targetView?.excalidrawRef?.current;
@@ -1235,7 +1232,7 @@ export class ExcalidrawAutomate implements ExcalidrawAutomateInterface {
deleteViewElements(elToDelete: ExcalidrawElement[]): boolean {
//@ts-ignore
if (!this.targetView || !this.targetView?._loaded) {
errorMessage("targetView not set", "deleteViewElements()");
errorMessage("targetView not set", "getViewSelectedElements()");
return false;
}
const current = this.targetView?.excalidrawRef?.current;
@@ -1283,7 +1280,7 @@ export class ExcalidrawAutomate implements ExcalidrawAutomateInterface {
getViewFileForImageElement(el: ExcalidrawElement): TFile | null {
//@ts-ignore
if (!this.targetView || !this.targetView?._loaded) {
errorMessage("targetView not set", "getViewFileForImageElement()");
errorMessage("targetView not set", "getViewSelectedElements()");
return null;
}
if (!el || el.type !== "image") {
@@ -1491,15 +1488,6 @@ export class ExcalidrawAutomate implements ExcalidrawAutomateInterface {
pointerPosition: { x: number; y: number }; //the pointer position on canvas at the time of drop
}) => boolean = null;
/**
* If set, this callback is triggered whenever the active canvas color changes
*/
onCanvasColorChangeHook: (
ea: ExcalidrawAutomate,
view: ExcalidrawView, //the excalidraw view
color: string,
) => void = null;
/**
* utility function to generate EmbeddedFilesLoader object
* @param isDark
@@ -1690,30 +1678,6 @@ export class ExcalidrawAutomate implements ExcalidrawAutomateInterface {
return { width: size.w ?? 0, height: size.h ?? 0 };
};
/**
* Returns the size of the image element at 100% (i.e. the original size)
* @param imageElement an image element from the active scene on targetView
*/
async getOriginalImageSize(imageElement: ExcalidrawImageElement): Promise<{width: number; height: number}> {
//@ts-ignore
if (!this.targetView || !this.targetView?._loaded) {
errorMessage("targetView not set", "getOriginalImageSize()");
return null;
}
if(!imageElement || imageElement.type !== "image") {
errorMessage("Please provide a single image element as input", "getOriginalImageSize()");
return null;
}
const ef = this.targetView.excalidrawData.getFile(imageElement.fileId);
if(!ef) {
errorMessage("Please provide a single image element as input", "getOriginalImageSize()");
return null;
}
const isDark = this.getExcalidrawAPI().getAppState().theme === "dark";
const dataURL = ef.getImage(isDark);
return await getImageSize(dataURL);
}
/**
* verifyMinimumPluginVersion returns true if plugin version is >= than required
* recommended use:
@@ -1867,10 +1831,6 @@ export class ExcalidrawAutomate implements ExcalidrawAutomateInterface {
log("Creates a CM object. Visit https://github.com/lbragile/ColorMaster for documentation.");
return;
}
if(typeof color === "string") {
color = this.colorNameToHex(color);
}
return CM(color);
}
};

View File

@@ -488,7 +488,7 @@ export class ExcalidrawData {
let res = data.matchAll(/\s\^(.{8})[\n]+/g);
let parts;
while (!(parts = res.next()).done) {
let text = data.substring(position, parts.value.index);
const text = data.substring(position, parts.value.index);
const id: string = parts.value[1];
const textEl = this.scene.elements.filter((el: any) => el.id === id)[0];
if (textEl) {
@@ -502,13 +502,6 @@ export class ExcalidrawData {
this.elementLinks.set(id, text);
} else {
const wrapAt = estimateMaxLineLen(textEl.text, textEl.originalText);
//https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/566
const elementLinkRes = text.matchAll(/^%%\*\*\*>>>text element-link:(\[\[[^<*\]]*]])<<<\*\*\*%%/gm);
const elementLink = elementLinkRes.next();
if(!elementLink.done) {
text = text.replace(/^%%\*\*\*>>>text element-link:\[\[[^<*\]]*]]<<<\*\*\*%%/gm,"");
textEl.link = elementLink.value[1];
}
const parseRes = await this.parse(text);
this.textElements.set(id, {
raw: text,
@@ -877,14 +870,8 @@ export class ExcalidrawData {
}
if (REGEX_LINK.isTransclusion(parts)) {
//transclusion //parts.value[1] || parts.value[4]
let contents = this
.parseCheckbox((await this.getTransclusion(REGEX_LINK.getLink(parts))).contents)
.replaceAll(/%%[^%]*%%/gm,""); //remove comments, consequence of https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/566
if(this.plugin.settings.removeTransclusionQuoteSigns) {
//remove leading > signs from transcluded quotations; the first > sign is not explicitlyl removed becuse
//Obsidian app.metadataCache.blockCache returns the block position already discarding the first '> '
contents = contents.replaceAll(/\n\s*>\s?/gm,"\n");
}
const contents = this.parseCheckbox((await this.getTransclusion(REGEX_LINK.getLink(parts)))
.contents);
outString +=
text.substring(position, parts.value.index) +
wrapText(
@@ -1004,15 +991,7 @@ export class ExcalidrawData {
generateMD(deletedElements: ExcalidrawElement[] = []): string {
let outString = "# Text Elements\n";
for (const key of this.textElements.keys()) {
//https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/566
const element = this.scene.elements.filter((el:any)=>el.id===key);
let elementString = this.textElements.get(key).raw;
if(element && element.length===1 && element[0].link && element[0].rawText === element[0].originalText) {
if(element[0].link.match(/^\[\[[^\]]*]]$/g)) { //apply this only to markdown links
elementString = `%%***>>>text element-link:${element[0].link}<<<***%%` + elementString;
}
}
outString += `${elementString} ^${key}\n\n`;
outString += `${this.textElements.get(key).raw} ^${key}\n\n`;
}
for (const key of this.elementLinks.keys()) {
@@ -1030,13 +1009,7 @@ export class ExcalidrawData {
}
if (this.files.size > 0) {
for (const key of this.files.keys()) {
const PATHREG = /(^[^#\|]*)/;
const ef = this.files.get(key);
//https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/829
const path = ef.file
? ef.linkParts.original.replace(PATHREG,app.metadataCache.fileToLinktext(ef.file,this.file.path))
: ef.linkParts.original;
outString += `${key}: [[${path}]]\n`;
outString += `${key}: [[${this.files.get(key).linkParts.original}]]\n`;
}
}
outString += this.equations.size > 0 || this.files.size > 0 ? "\n" : "";
@@ -1087,7 +1060,7 @@ export class ExcalidrawData {
});
//check if there are any images that need to be processed in the new scene
if (!scene.files || Object.keys(scene.files).length === 0) {
if (!scene.files || scene.files == {}) {
return false;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -20,7 +20,7 @@ export const REG_LINKINDEX_INVALIDCHARS = /[<>:"\\|?*#]/g;
export const REG_BLOCK_REF_CLEAN =
/[!"#$%&()*+,.:;<=>?@^`{|}~\/\[\]\\]/g; //https://discord.com/channels/686053708261228577/989603365606531104/1000128926619816048
// /\+|\/|~|=|%|\(|\)|{|}|,|&|\.|\$|!|\?|;|\[|]|\^|#|\*|<|>|&|@|\||\\|"|:|\s/g;
export const IMAGE_TYPES = ["jpeg", "jpg", "png", "gif", "svg", "webp", "bmp", "ico"];
export const IMAGE_TYPES = ["jpeg", "jpg", "png", "gif", "svg"];
export const EXPORT_TYPES = ["svg", "dark.svg", "light.svg", "png", "dark.png", "light.png"];
export const MAX_IMAGE_SIZE = 500;
export const FRONTMATTER_KEY = "excalidraw-plugin";

View File

@@ -17,48 +17,6 @@ I develop this plugin as a hobby, spending most of my free time doing this. If y
<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.7.25":`## Fixed
- Tool buttons did not "stick" the first time you clicked them.
- Tray (in tray mode) was higher when the help button was visible. The tray in tablet mode was too large and the help button was missing.
- ExcalidrawAutomate ${String.fromCharCode(96)}getCM(color:TInput): ColorMaster;${String.fromCharCode(96)} function will now properly convert valid [css color names](https://www.w3schools.com/colors/colors_names.asp) to ColorMaster objects.
- The downloaded script icons in the Excalidraw-Obsidian menu were not always correct
- The obsidian mobile navigation bar at the bottom overlapped with Excalidraw
## New
- Created ExcalidrawAutomate hook for styling script when the canvas color changes. See sample [onCanvasColorChangeHook](https://gist.github.com/zsviczian/c7223c5b4af30d5c88a0cae05300305c) implementation following the link.
<div class="excalidraw-videoWrapper"><div>
<iframe src="https://www.youtube.com/embed/LtR04fNTKTM" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div></div>
${String.fromCharCode(96, 96, 96)}typescript
/**
* If set, this callback is triggered whenever the active canvas color changes
*/
onCanvasColorChangeHook: (
ea: ExcalidrawAutomate,
view: ExcalidrawView, //the Excalidraw view
color: string,
) => void = null;
${String.fromCharCode(96, 96, 96)}
`,
"1.7.24":`
# New and improved
- **Updated Chinese translation**. Thanks, @tswwe!
- **Improved update for TextElement links**: Until now, when you attached a link to a file to a TextElement using the "Create Link" command, this link did not get updated when the file was renamed or moved. Only links created as markdown links in the TextElement text were updated. Now both approaches work. Keep in mind however, that if you have a link in the TextElemenet text, it will override the link attached to the text element using the create link command. [#566](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/566)
- **Transclusion filters markdown comments**: Text transclusion in a TextElement using the ${String.fromCharCode(96)}![[file]]${String.fromCharCode(96)} or ${String.fromCharCode(96)}![[file#section]]${String.fromCharCode(96)} format did not filter out markdown comments in the file placed ${String.fromCharCode(96)}%% inside a comment block %%${String.fromCharCode(96)}. Now they do.
- **Remove leading '>' from trancluded quotes**: Added a new option in settings under **Links and Transclusion** to remove the leading ${String.fromCharCode(96)}> ${String.fromCharCode(96)} characters from quotes you transclude as a text element in your drawing.
![image](https://user-images.githubusercontent.com/14358394/194755306-6e7bf5f3-4228-44a1-9363-c3241b34865e.png)
- **Added support for ${String.fromCharCode(96)}webp${String.fromCharCode(96)}, ${String.fromCharCode(96)}bmp${String.fromCharCode(96)}, and ${String.fromCharCode(96)}ico${String.fromCharCode(96)} images**. This extends the already supported formats (${String.fromCharCode(96)}jpg${String.fromCharCode(96)}, ${String.fromCharCode(96)}gif${String.fromCharCode(96)}, ${String.fromCharCode(96)}png${String.fromCharCode(96)}, ${String.fromCharCode(96)}svg${String.fromCharCode(96)}).
- **Added command palette action to reset images to original size**. Select a single image or embedded Excalidraw drawing on your canvas and choose ${String.fromCharCode(96)}Set selected image element size to 100% of original${String.fromCharCode(96)} from the command palette. This function is especially helpful when you combine atomic drawings on a single canvas, keeping each atomic piece in its original excalidraw file (i.e. the way I create [book on a page summaries](https://www.youtube.com/playlist?list=PL6mqgtMZ4NP1-mbCYc3T7mr-unmsIXpEG))
- The ${String.fromCharCode(96)}async getOriginalImageSize(imageElement: ExcalidrawImageElement): Promise<{width: number; height: number}>${String.fromCharCode(96)} function is also avaiable via ExcalidrawAutomate. You may use this function to resize images to custom scales (e.g. 50% size, or to fit a certain bounding rectangle).
# Fixed
- **Upgraded perfect freehand package to resolve unwanted dots on end of lines** [#5727](https://github.com/excalidraw/excalidraw/pull/5727)
- **Pinch zoom in View mode opens images** resulting in a very annoying behavior [#837](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/837)
- **Embedded files** such as transcluded markdown documents and images **did not honor the Obsidian "New Link Format" setting** (shortest path, relative path, absolute path). [#829](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/829)
- **Fixed error with dataview queries involving Excalidraw files**: In case you created a task on an Excalidraw canvas (${String.fromCharCode(96)}docA.md${String.fromCharCode(96)}) by typing ${String.fromCharCode(96)}- [ ] Task [[owner]] #tag${String.fromCharCode(96)}, and then you created a Dataview tasklist in another document (${String.fromCharCode(96)}docB.md${String.fromCharCode(96)}) such that the query criteria matched the task in ${String.fromCharCode(96)}docA.md${String.fromCharCode(96)}, then the task from ${String.fromCharCode(96)}docA.md${String.fromCharCode(96)} only appeared as an empty line when viewing ${String.fromCharCode(96)}docB.md${String.fromCharCode(96)}. If you now embedded ${String.fromCharCode(96)}docB.md${String.fromCharCode(96)} into a third markdown document (${String.fromCharCode(96)}docC.md${String.fromCharCode(96)}), then instead of the contents of ${String.fromCharCode(96)}docB.md${String.fromCharCode(96)} Obsidian rendered ${String.fromCharCode(96)}docA.md${String.fromCharCode(96)}. [#835](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/835)
`,
"1.7.22":`
# Fixed
- Text size in sticky notes increased when opening the drawing and when editing a sticky note [#824](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/824)

View File

@@ -60,7 +60,6 @@ export default {
READ_RELEASE_NOTES: "Read latest release notes",
TRAY_MODE: "Toggle property-panel tray-mode",
SEARCH: "Search for text in drawing",
RESET_IMG_TO_100: "Set selected image element size to 100% of original",
//ExcalidrawView.ts
INSTALL_SCRIPT_BUTTON: "Install or update Excalidraw Scripts",
@@ -260,9 +259,6 @@ export default {
PAGE_TRANSCLUSION_CHARCOUNT_DESC:
"The maximum number of characters to display from the page when transcluding an entire page with the " +
"![[markdown page]] format.",
QUOTE_TRANSCLUSION_REMOVE_NAME: "Quote translusion: remove leading '> ' from each line",
QUOTE_TRANSCLUSION_REMOVE_DESC: "Remove the leading '> ' from each line of the transclusion. This will improve readibility of quotes in text only transclusions<br>" +
"<b>Toggle ON:</b> Remove leading '> '<br><b>Toggle OFF:</b> Do not remove leading '> ' (note it will still be removed from the first row due to Obsidian API functionality)",
GET_URL_TITLE_NAME: "Use iframely to resolve page title",
GET_URL_TITLE_DESC:
"Use the <code>http://iframely.server.crestify.com/iframely?url=</code> to get title of page when dropping a link into Excalidraw",

File diff suppressed because it is too large Load Diff

View File

@@ -287,15 +287,3 @@ export const ICONS = {
</svg>
),
};
export const stringToSVG = (svg: string) => {
svg = svg
.replace(/stroke\s*=\s*['"][^"']*['"]/g,"")
.replace(/width\s*=\s*['"][^"']*['"]/g,"")
.replace(/height\s*=\s*['"][^"']*['"]/g,"")
.replace("<svg ",`<svg style="stroke:var(--icon-fill-color);color:var(--icon-fill-color);fill:var(--icon-fill-color)" `)
return (
<div dangerouslySetInnerHTML={{__html: svg}}></div>
)
}

File diff suppressed because it is too large Load Diff

View File

@@ -58,7 +58,6 @@ export interface ExcalidrawSettings {
forceWrap: boolean;
pageTransclusionCharLimit: number;
wordWrappingDefault: number;
removeTransclusionQuoteSigns: boolean;
iframelyAllowed: boolean;
pngExportScale: number;
exportWithTheme: boolean;
@@ -150,7 +149,6 @@ export const DEFAULT_SETTINGS: ExcalidrawSettings = {
forceWrap: false,
pageTransclusionCharLimit: 200,
wordWrappingDefault: 0,
removeTransclusionQuoteSigns: true,
iframelyAllowed: true,
pngExportScale: 1,
exportWithTheme: true,
@@ -811,19 +809,6 @@ export class ExcalidrawSettingTab extends PluginSettingTab {
}),
);
new Setting(containerEl)
.setName(t("QUOTE_TRANSCLUSION_REMOVE_NAME"))
.setDesc(fragWithHTML(t("QUOTE_TRANSCLUSION_REMOVE_DESC")))
.addToggle(toggle =>
toggle
.setValue(this.plugin.settings.removeTransclusionQuoteSigns)
.onChange(value => {
this.plugin.settings.removeTransclusionQuoteSigns = value;
this.requestEmbedUpdate = true;
this.applySettingsUpdate(true);
})
);
new Setting(containerEl)
.setName(t("GET_URL_TITLE_NAME"))
.setDesc(fragWithHTML(t("GET_URL_TITLE_DESC")))

3
src/types.d.ts vendored
View File

@@ -1,4 +1,4 @@
import { ExcalidrawBindableElement, ExcalidrawElement, ExcalidrawImageElement, FileId, FillStyle, NonDeletedExcalidrawElement, StrokeSharpness, StrokeStyle } from "@zsviczian/excalidraw/types/element/types";
import { ExcalidrawBindableElement, ExcalidrawElement, FileId, FillStyle, NonDeletedExcalidrawElement, StrokeSharpness, StrokeStyle } from "@zsviczian/excalidraw/types/element/types";
import { Point } from "@zsviczian/excalidraw/types/types";
import { TFile, WorkspaceLeaf } from "obsidian";
import { EmbeddedFilesLoader } from "./EmbeddedFileLoader";
@@ -223,7 +223,6 @@ export interface ExcalidrawAutomateInterface {
//verifyMinimumPluginVersion returns true if plugin version is >= than required
//recommended use:
//if(!ea.verifyMinimumPluginVersion || !ea.verifyMinimumPluginVersion("1.5.20")) {new Notice("message");return;}
getOriginalImageSize(imageElement: ExcalidrawImageElement): Promise<{width: number; height: number}>;
verifyMinimumPluginVersion(requiredVersion: string): boolean;
isExcalidrawView(view: any): boolean;
selectElementsInView(elements: ExcalidrawElement[]): void; //sets selection in view

File diff suppressed because it is too large Load Diff

View File

@@ -223,8 +223,4 @@ textarea.excalidraw-wysiwyg {
-moz-box-shadow: none;
box-shadow: none;
border-radius: 0;
}
.is-tablet .excalidraw button {
padding: initial;
}

View File

@@ -2216,10 +2216,10 @@
dependencies:
"@zerollup/ts-helpers" "^1.7.18"
"@zsviczian/excalidraw@0.12.0-obsidian-11":
"integrity" "sha512-DoCXKyjFFkpBQ5GTK5Ud3RocqAxwbHzy9fWZIgWqznMqy2sdR9QDg0y/QILMKG4cOuiRlXXvHnpMxfOPkT4eeA=="
"resolved" "https://registry.npmjs.org/@zsviczian/excalidraw/-/excalidraw-0.12.0-obsidian-11.tgz"
"version" "0.12.0-obsidian-11"
"@zsviczian/excalidraw@0.12.0-obsidian-9":
"integrity" "sha512-mJ1MB0eKgHjtXPxSCCQkn/z/hdg3pI9vQQuwyCqNs5hjspuLJ+DdGkhaHvX+HrDuFdwPl/s+vfPC/tjTj6tmbA=="
"resolved" "https://registry.npmjs.org/@zsviczian/excalidraw/-/excalidraw-0.12.0-obsidian-9.tgz"
"version" "0.12.0-obsidian-9"
"abab@^2.0.3", "abab@^2.0.5":
"integrity" "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q=="