1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-03-06 15:36:49 +02:00

Update plugin types

This commit is contained in:
Laurent Cozic 2023-09-17 18:09:08 +01:00
parent 510caa77cc
commit 40ddb80173
22 changed files with 22 additions and 462 deletions
packages
app-cli/tests/support/plugins
clipboard/api
codemirror_content_script/api
content_script/api
dialog/api
editor_context_menu/api
events/api
external_assets/api
imaging/api
jpl_test/api
json_export/api
load_css/api
menu/api
multi_selection/api
nativeModule/api
post_messages/api
register_command/api
selected_text/api
settings/api
toc/api
user_data/api
withExternalModules/api
generator-joplin/generators/app/templates/api

@ -1,4 +1,4 @@
import { Rectangle } from "./types";
import { Rectangle } from './types';
export interface Implementation {
nativeImage: any;
}
@ -32,31 +32,11 @@ export default class JoplinImaging {
private createImageHandle;
private imageByHandle;
private cacheImage;
/**
* Create an image from a buffer - however only use this for very small
* images. It requires transferring the full image data from the plugin to
* the app, which is extremely slow and will freeze the app. Instead, use
* `createFromPath` or `createFromResource`, which will manipulate the image
* data directly from the main process.
*/
createFromBuffer(buffer: any, options?: CreateFromBufferOptions): Promise<Handle>;
createFromPath(filePath: string): Promise<Handle>;
createFromResource(resourceId: string): Promise<Handle>;
getSize(handle: Handle): Promise<any>;
resize(handle: Handle, options?: ResizeOptions): Promise<string>;
crop(handle: Handle, rectange: Rectangle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toDataUrl(handle: Handle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toBase64(handle: Handle): Promise<string>;
toPngFile(handle: Handle, filePath: string): Promise<void>;
/**
* Quality is between 0 and 100

@ -1,4 +1,4 @@
import { Rectangle } from "./types";
import { Rectangle } from './types';
export interface Implementation {
nativeImage: any;
}
@ -32,31 +32,11 @@ export default class JoplinImaging {
private createImageHandle;
private imageByHandle;
private cacheImage;
/**
* Create an image from a buffer - however only use this for very small
* images. It requires transferring the full image data from the plugin to
* the app, which is extremely slow and will freeze the app. Instead, use
* `createFromPath` or `createFromResource`, which will manipulate the image
* data directly from the main process.
*/
createFromBuffer(buffer: any, options?: CreateFromBufferOptions): Promise<Handle>;
createFromPath(filePath: string): Promise<Handle>;
createFromResource(resourceId: string): Promise<Handle>;
getSize(handle: Handle): Promise<any>;
resize(handle: Handle, options?: ResizeOptions): Promise<string>;
crop(handle: Handle, rectange: Rectangle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toDataUrl(handle: Handle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toBase64(handle: Handle): Promise<string>;
toPngFile(handle: Handle, filePath: string): Promise<void>;
/**
* Quality is between 0 and 100

@ -1,4 +1,4 @@
import { Rectangle } from "./types";
import { Rectangle } from './types';
export interface Implementation {
nativeImage: any;
}
@ -32,31 +32,11 @@ export default class JoplinImaging {
private createImageHandle;
private imageByHandle;
private cacheImage;
/**
* Create an image from a buffer - however only use this for very small
* images. It requires transferring the full image data from the plugin to
* the app, which is extremely slow and will freeze the app. Instead, use
* `createFromPath` or `createFromResource`, which will manipulate the image
* data directly from the main process.
*/
createFromBuffer(buffer: any, options?: CreateFromBufferOptions): Promise<Handle>;
createFromPath(filePath: string): Promise<Handle>;
createFromResource(resourceId: string): Promise<Handle>;
getSize(handle: Handle): Promise<any>;
resize(handle: Handle, options?: ResizeOptions): Promise<string>;
crop(handle: Handle, rectange: Rectangle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toDataUrl(handle: Handle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toBase64(handle: Handle): Promise<string>;
toPngFile(handle: Handle, filePath: string): Promise<void>;
/**
* Quality is between 0 and 100

@ -1,4 +1,4 @@
import { Rectangle } from "./types";
import { Rectangle } from './types';
export interface Implementation {
nativeImage: any;
}
@ -32,31 +32,11 @@ export default class JoplinImaging {
private createImageHandle;
private imageByHandle;
private cacheImage;
/**
* Create an image from a buffer - however only use this for very small
* images. It requires transferring the full image data from the plugin to
* the app, which is extremely slow and will freeze the app. Instead, use
* `createFromPath` or `createFromResource`, which will manipulate the image
* data directly from the main process.
*/
createFromBuffer(buffer: any, options?: CreateFromBufferOptions): Promise<Handle>;
createFromPath(filePath: string): Promise<Handle>;
createFromResource(resourceId: string): Promise<Handle>;
getSize(handle: Handle): Promise<any>;
resize(handle: Handle, options?: ResizeOptions): Promise<string>;
crop(handle: Handle, rectange: Rectangle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toDataUrl(handle: Handle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toBase64(handle: Handle): Promise<string>;
toPngFile(handle: Handle, filePath: string): Promise<void>;
/**
* Quality is between 0 and 100

@ -1,4 +1,4 @@
import { Rectangle } from "./types";
import { Rectangle } from './types';
export interface Implementation {
nativeImage: any;
}
@ -32,31 +32,11 @@ export default class JoplinImaging {
private createImageHandle;
private imageByHandle;
private cacheImage;
/**
* Create an image from a buffer - however only use this for very small
* images. It requires transferring the full image data from the plugin to
* the app, which is extremely slow and will freeze the app. Instead, use
* `createFromPath` or `createFromResource`, which will manipulate the image
* data directly from the main process.
*/
createFromBuffer(buffer: any, options?: CreateFromBufferOptions): Promise<Handle>;
createFromPath(filePath: string): Promise<Handle>;
createFromResource(resourceId: string): Promise<Handle>;
getSize(handle: Handle): Promise<any>;
resize(handle: Handle, options?: ResizeOptions): Promise<string>;
crop(handle: Handle, rectange: Rectangle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toDataUrl(handle: Handle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toBase64(handle: Handle): Promise<string>;
toPngFile(handle: Handle, filePath: string): Promise<void>;
/**
* Quality is between 0 and 100

@ -1,4 +1,4 @@
import { Rectangle } from "./types";
import { Rectangle } from './types';
export interface Implementation {
nativeImage: any;
}
@ -32,31 +32,11 @@ export default class JoplinImaging {
private createImageHandle;
private imageByHandle;
private cacheImage;
/**
* Create an image from a buffer - however only use this for very small
* images. It requires transferring the full image data from the plugin to
* the app, which is extremely slow and will freeze the app. Instead, use
* `createFromPath` or `createFromResource`, which will manipulate the image
* data directly from the main process.
*/
createFromBuffer(buffer: any, options?: CreateFromBufferOptions): Promise<Handle>;
createFromPath(filePath: string): Promise<Handle>;
createFromResource(resourceId: string): Promise<Handle>;
getSize(handle: Handle): Promise<any>;
resize(handle: Handle, options?: ResizeOptions): Promise<string>;
crop(handle: Handle, rectange: Rectangle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toDataUrl(handle: Handle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toBase64(handle: Handle): Promise<string>;
toPngFile(handle: Handle, filePath: string): Promise<void>;
/**
* Quality is between 0 and 100

@ -1,4 +1,4 @@
import { Rectangle } from "./types";
import { Rectangle } from './types';
export interface Implementation {
nativeImage: any;
}
@ -32,31 +32,11 @@ export default class JoplinImaging {
private createImageHandle;
private imageByHandle;
private cacheImage;
/**
* Create an image from a buffer - however only use this for very small
* images. It requires transferring the full image data from the plugin to
* the app, which is extremely slow and will freeze the app. Instead, use
* `createFromPath` or `createFromResource`, which will manipulate the image
* data directly from the main process.
*/
createFromBuffer(buffer: any, options?: CreateFromBufferOptions): Promise<Handle>;
createFromPath(filePath: string): Promise<Handle>;
createFromResource(resourceId: string): Promise<Handle>;
getSize(handle: Handle): Promise<any>;
resize(handle: Handle, options?: ResizeOptions): Promise<string>;
crop(handle: Handle, rectange: Rectangle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toDataUrl(handle: Handle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toBase64(handle: Handle): Promise<string>;
toPngFile(handle: Handle, filePath: string): Promise<void>;
/**
* Quality is between 0 and 100

@ -1,4 +1,4 @@
import { Rectangle } from "./types";
import { Rectangle } from './types';
export interface Implementation {
nativeImage: any;
}
@ -32,31 +32,11 @@ export default class JoplinImaging {
private createImageHandle;
private imageByHandle;
private cacheImage;
/**
* Create an image from a buffer - however only use this for very small
* images. It requires transferring the full image data from the plugin to
* the app, which is extremely slow and will freeze the app. Instead, use
* `createFromPath` or `createFromResource`, which will manipulate the image
* data directly from the main process.
*/
createFromBuffer(buffer: any, options?: CreateFromBufferOptions): Promise<Handle>;
createFromPath(filePath: string): Promise<Handle>;
createFromResource(resourceId: string): Promise<Handle>;
getSize(handle: Handle): Promise<any>;
resize(handle: Handle, options?: ResizeOptions): Promise<string>;
crop(handle: Handle, rectange: Rectangle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toDataUrl(handle: Handle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toBase64(handle: Handle): Promise<string>;
toPngFile(handle: Handle, filePath: string): Promise<void>;
/**
* Quality is between 0 and 100

@ -1,4 +1,4 @@
import { Rectangle } from "./types";
import { Rectangle } from './types';
export interface Implementation {
nativeImage: any;
}
@ -32,31 +32,11 @@ export default class JoplinImaging {
private createImageHandle;
private imageByHandle;
private cacheImage;
/**
* Create an image from a buffer - however only use this for very small
* images. It requires transferring the full image data from the plugin to
* the app, which is extremely slow and will freeze the app. Instead, use
* `createFromPath` or `createFromResource`, which will manipulate the image
* data directly from the main process.
*/
createFromBuffer(buffer: any, options?: CreateFromBufferOptions): Promise<Handle>;
createFromPath(filePath: string): Promise<Handle>;
createFromResource(resourceId: string): Promise<Handle>;
getSize(handle: Handle): Promise<any>;
resize(handle: Handle, options?: ResizeOptions): Promise<string>;
crop(handle: Handle, rectange: Rectangle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toDataUrl(handle: Handle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toBase64(handle: Handle): Promise<string>;
toPngFile(handle: Handle, filePath: string): Promise<void>;
/**
* Quality is between 0 and 100

@ -1,4 +1,4 @@
import { Rectangle } from "./types";
import { Rectangle } from './types';
export interface Implementation {
nativeImage: any;
}
@ -32,31 +32,11 @@ export default class JoplinImaging {
private createImageHandle;
private imageByHandle;
private cacheImage;
/**
* Create an image from a buffer - however only use this for very small
* images. It requires transferring the full image data from the plugin to
* the app, which is extremely slow and will freeze the app. Instead, use
* `createFromPath` or `createFromResource`, which will manipulate the image
* data directly from the main process.
*/
createFromBuffer(buffer: any, options?: CreateFromBufferOptions): Promise<Handle>;
createFromPath(filePath: string): Promise<Handle>;
createFromResource(resourceId: string): Promise<Handle>;
getSize(handle: Handle): Promise<any>;
resize(handle: Handle, options?: ResizeOptions): Promise<string>;
crop(handle: Handle, rectange: Rectangle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toDataUrl(handle: Handle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toBase64(handle: Handle): Promise<string>;
toPngFile(handle: Handle, filePath: string): Promise<void>;
/**
* Quality is between 0 and 100

@ -1,4 +1,4 @@
import { Rectangle } from "./types";
import { Rectangle } from './types';
export interface Implementation {
nativeImage: any;
}
@ -32,31 +32,11 @@ export default class JoplinImaging {
private createImageHandle;
private imageByHandle;
private cacheImage;
/**
* Create an image from a buffer - however only use this for very small
* images. It requires transferring the full image data from the plugin to
* the app, which is extremely slow and will freeze the app. Instead, use
* `createFromPath` or `createFromResource`, which will manipulate the image
* data directly from the main process.
*/
createFromBuffer(buffer: any, options?: CreateFromBufferOptions): Promise<Handle>;
createFromPath(filePath: string): Promise<Handle>;
createFromResource(resourceId: string): Promise<Handle>;
getSize(handle: Handle): Promise<any>;
resize(handle: Handle, options?: ResizeOptions): Promise<string>;
crop(handle: Handle, rectange: Rectangle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toDataUrl(handle: Handle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toBase64(handle: Handle): Promise<string>;
toPngFile(handle: Handle, filePath: string): Promise<void>;
/**
* Quality is between 0 and 100

@ -1,4 +1,4 @@
import { Rectangle } from "./types";
import { Rectangle } from './types';
export interface Implementation {
nativeImage: any;
}
@ -32,31 +32,11 @@ export default class JoplinImaging {
private createImageHandle;
private imageByHandle;
private cacheImage;
/**
* Create an image from a buffer - however only use this for very small
* images. It requires transferring the full image data from the plugin to
* the app, which is extremely slow and will freeze the app. Instead, use
* `createFromPath` or `createFromResource`, which will manipulate the image
* data directly from the main process.
*/
createFromBuffer(buffer: any, options?: CreateFromBufferOptions): Promise<Handle>;
createFromPath(filePath: string): Promise<Handle>;
createFromResource(resourceId: string): Promise<Handle>;
getSize(handle: Handle): Promise<any>;
resize(handle: Handle, options?: ResizeOptions): Promise<string>;
crop(handle: Handle, rectange: Rectangle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toDataUrl(handle: Handle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toBase64(handle: Handle): Promise<string>;
toPngFile(handle: Handle, filePath: string): Promise<void>;
/**
* Quality is between 0 and 100

@ -1,4 +1,4 @@
import { Rectangle } from "./types";
import { Rectangle } from './types';
export interface Implementation {
nativeImage: any;
}
@ -32,31 +32,11 @@ export default class JoplinImaging {
private createImageHandle;
private imageByHandle;
private cacheImage;
/**
* Create an image from a buffer - however only use this for very small
* images. It requires transferring the full image data from the plugin to
* the app, which is extremely slow and will freeze the app. Instead, use
* `createFromPath` or `createFromResource`, which will manipulate the image
* data directly from the main process.
*/
createFromBuffer(buffer: any, options?: CreateFromBufferOptions): Promise<Handle>;
createFromPath(filePath: string): Promise<Handle>;
createFromResource(resourceId: string): Promise<Handle>;
getSize(handle: Handle): Promise<any>;
resize(handle: Handle, options?: ResizeOptions): Promise<string>;
crop(handle: Handle, rectange: Rectangle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toDataUrl(handle: Handle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toBase64(handle: Handle): Promise<string>;
toPngFile(handle: Handle, filePath: string): Promise<void>;
/**
* Quality is between 0 and 100

@ -1,4 +1,4 @@
import { Rectangle } from "./types";
import { Rectangle } from './types';
export interface Implementation {
nativeImage: any;
}
@ -32,31 +32,11 @@ export default class JoplinImaging {
private createImageHandle;
private imageByHandle;
private cacheImage;
/**
* Create an image from a buffer - however only use this for very small
* images. It requires transferring the full image data from the plugin to
* the app, which is extremely slow and will freeze the app. Instead, use
* `createFromPath` or `createFromResource`, which will manipulate the image
* data directly from the main process.
*/
createFromBuffer(buffer: any, options?: CreateFromBufferOptions): Promise<Handle>;
createFromPath(filePath: string): Promise<Handle>;
createFromResource(resourceId: string): Promise<Handle>;
getSize(handle: Handle): Promise<any>;
resize(handle: Handle, options?: ResizeOptions): Promise<string>;
crop(handle: Handle, rectange: Rectangle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toDataUrl(handle: Handle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toBase64(handle: Handle): Promise<string>;
toPngFile(handle: Handle, filePath: string): Promise<void>;
/**
* Quality is between 0 and 100

@ -1,4 +1,4 @@
import { Rectangle } from "./types";
import { Rectangle } from './types';
export interface Implementation {
nativeImage: any;
}
@ -32,31 +32,11 @@ export default class JoplinImaging {
private createImageHandle;
private imageByHandle;
private cacheImage;
/**
* Create an image from a buffer - however only use this for very small
* images. It requires transferring the full image data from the plugin to
* the app, which is extremely slow and will freeze the app. Instead, use
* `createFromPath` or `createFromResource`, which will manipulate the image
* data directly from the main process.
*/
createFromBuffer(buffer: any, options?: CreateFromBufferOptions): Promise<Handle>;
createFromPath(filePath: string): Promise<Handle>;
createFromResource(resourceId: string): Promise<Handle>;
getSize(handle: Handle): Promise<any>;
resize(handle: Handle, options?: ResizeOptions): Promise<string>;
crop(handle: Handle, rectange: Rectangle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toDataUrl(handle: Handle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toBase64(handle: Handle): Promise<string>;
toPngFile(handle: Handle, filePath: string): Promise<void>;
/**
* Quality is between 0 and 100

@ -1,4 +1,4 @@
import { Rectangle } from "./types";
import { Rectangle } from './types';
export interface Implementation {
nativeImage: any;
}
@ -32,31 +32,11 @@ export default class JoplinImaging {
private createImageHandle;
private imageByHandle;
private cacheImage;
/**
* Create an image from a buffer - however only use this for very small
* images. It requires transferring the full image data from the plugin to
* the app, which is extremely slow and will freeze the app. Instead, use
* `createFromPath` or `createFromResource`, which will manipulate the image
* data directly from the main process.
*/
createFromBuffer(buffer: any, options?: CreateFromBufferOptions): Promise<Handle>;
createFromPath(filePath: string): Promise<Handle>;
createFromResource(resourceId: string): Promise<Handle>;
getSize(handle: Handle): Promise<any>;
resize(handle: Handle, options?: ResizeOptions): Promise<string>;
crop(handle: Handle, rectange: Rectangle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toDataUrl(handle: Handle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toBase64(handle: Handle): Promise<string>;
toPngFile(handle: Handle, filePath: string): Promise<void>;
/**
* Quality is between 0 and 100

@ -1,4 +1,4 @@
import { Rectangle } from "./types";
import { Rectangle } from './types';
export interface Implementation {
nativeImage: any;
}
@ -32,31 +32,11 @@ export default class JoplinImaging {
private createImageHandle;
private imageByHandle;
private cacheImage;
/**
* Create an image from a buffer - however only use this for very small
* images. It requires transferring the full image data from the plugin to
* the app, which is extremely slow and will freeze the app. Instead, use
* `createFromPath` or `createFromResource`, which will manipulate the image
* data directly from the main process.
*/
createFromBuffer(buffer: any, options?: CreateFromBufferOptions): Promise<Handle>;
createFromPath(filePath: string): Promise<Handle>;
createFromResource(resourceId: string): Promise<Handle>;
getSize(handle: Handle): Promise<any>;
resize(handle: Handle, options?: ResizeOptions): Promise<string>;
crop(handle: Handle, rectange: Rectangle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toDataUrl(handle: Handle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toBase64(handle: Handle): Promise<string>;
toPngFile(handle: Handle, filePath: string): Promise<void>;
/**
* Quality is between 0 and 100

@ -1,4 +1,4 @@
import { Rectangle } from "./types";
import { Rectangle } from './types';
export interface Implementation {
nativeImage: any;
}
@ -32,31 +32,11 @@ export default class JoplinImaging {
private createImageHandle;
private imageByHandle;
private cacheImage;
/**
* Create an image from a buffer - however only use this for very small
* images. It requires transferring the full image data from the plugin to
* the app, which is extremely slow and will freeze the app. Instead, use
* `createFromPath` or `createFromResource`, which will manipulate the image
* data directly from the main process.
*/
createFromBuffer(buffer: any, options?: CreateFromBufferOptions): Promise<Handle>;
createFromPath(filePath: string): Promise<Handle>;
createFromResource(resourceId: string): Promise<Handle>;
getSize(handle: Handle): Promise<any>;
resize(handle: Handle, options?: ResizeOptions): Promise<string>;
crop(handle: Handle, rectange: Rectangle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toDataUrl(handle: Handle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toBase64(handle: Handle): Promise<string>;
toPngFile(handle: Handle, filePath: string): Promise<void>;
/**
* Quality is between 0 and 100

@ -1,4 +1,4 @@
import { Rectangle } from "./types";
import { Rectangle } from './types';
export interface Implementation {
nativeImage: any;
}
@ -32,31 +32,11 @@ export default class JoplinImaging {
private createImageHandle;
private imageByHandle;
private cacheImage;
/**
* Create an image from a buffer - however only use this for very small
* images. It requires transferring the full image data from the plugin to
* the app, which is extremely slow and will freeze the app. Instead, use
* `createFromPath` or `createFromResource`, which will manipulate the image
* data directly from the main process.
*/
createFromBuffer(buffer: any, options?: CreateFromBufferOptions): Promise<Handle>;
createFromPath(filePath: string): Promise<Handle>;
createFromResource(resourceId: string): Promise<Handle>;
getSize(handle: Handle): Promise<any>;
resize(handle: Handle, options?: ResizeOptions): Promise<string>;
crop(handle: Handle, rectange: Rectangle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toDataUrl(handle: Handle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toBase64(handle: Handle): Promise<string>;
toPngFile(handle: Handle, filePath: string): Promise<void>;
/**
* Quality is between 0 and 100

@ -1,4 +1,4 @@
import { Rectangle } from "./types";
import { Rectangle } from './types';
export interface Implementation {
nativeImage: any;
}
@ -32,31 +32,11 @@ export default class JoplinImaging {
private createImageHandle;
private imageByHandle;
private cacheImage;
/**
* Create an image from a buffer - however only use this for very small
* images. It requires transferring the full image data from the plugin to
* the app, which is extremely slow and will freeze the app. Instead, use
* `createFromPath` or `createFromResource`, which will manipulate the image
* data directly from the main process.
*/
createFromBuffer(buffer: any, options?: CreateFromBufferOptions): Promise<Handle>;
createFromPath(filePath: string): Promise<Handle>;
createFromResource(resourceId: string): Promise<Handle>;
getSize(handle: Handle): Promise<any>;
resize(handle: Handle, options?: ResizeOptions): Promise<string>;
crop(handle: Handle, rectange: Rectangle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toDataUrl(handle: Handle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toBase64(handle: Handle): Promise<string>;
toPngFile(handle: Handle, filePath: string): Promise<void>;
/**
* Quality is between 0 and 100

@ -1,4 +1,4 @@
import { Rectangle } from "./types";
import { Rectangle } from './types';
export interface Implementation {
nativeImage: any;
}
@ -32,31 +32,11 @@ export default class JoplinImaging {
private createImageHandle;
private imageByHandle;
private cacheImage;
/**
* Create an image from a buffer - however only use this for very small
* images. It requires transferring the full image data from the plugin to
* the app, which is extremely slow and will freeze the app. Instead, use
* `createFromPath` or `createFromResource`, which will manipulate the image
* data directly from the main process.
*/
createFromBuffer(buffer: any, options?: CreateFromBufferOptions): Promise<Handle>;
createFromPath(filePath: string): Promise<Handle>;
createFromResource(resourceId: string): Promise<Handle>;
getSize(handle: Handle): Promise<any>;
resize(handle: Handle, options?: ResizeOptions): Promise<string>;
crop(handle: Handle, rectange: Rectangle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toDataUrl(handle: Handle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toBase64(handle: Handle): Promise<string>;
toPngFile(handle: Handle, filePath: string): Promise<void>;
/**
* Quality is between 0 and 100

@ -1,4 +1,4 @@
import { Rectangle } from "./types";
import { Rectangle } from './types';
export interface Implementation {
nativeImage: any;
}
@ -32,31 +32,11 @@ export default class JoplinImaging {
private createImageHandle;
private imageByHandle;
private cacheImage;
/**
* Create an image from a buffer - however only use this for very small
* images. It requires transferring the full image data from the plugin to
* the app, which is extremely slow and will freeze the app. Instead, use
* `createFromPath` or `createFromResource`, which will manipulate the image
* data directly from the main process.
*/
createFromBuffer(buffer: any, options?: CreateFromBufferOptions): Promise<Handle>;
createFromPath(filePath: string): Promise<Handle>;
createFromResource(resourceId: string): Promise<Handle>;
getSize(handle: Handle): Promise<any>;
resize(handle: Handle, options?: ResizeOptions): Promise<string>;
crop(handle: Handle, rectange: Rectangle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toDataUrl(handle: Handle): Promise<string>;
/**
* Warnings: requires transferring the complete image from the app to the
* plugin which may freeze the app. Consider using one of the `toXxxFile()`
* or `toXxxResource()` methods instead.
*/
toBase64(handle: Handle): Promise<string>;
toPngFile(handle: Handle, filePath: string): Promise<void>;
/**
* Quality is between 0 and 100