@kitschpatrol/tldraw-cli 4.2.1 → 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.js +104 -117
- package/dist/.DS_Store +0 -0
- package/dist/lib/index.js +73 -108
- package/dist/lib/inline/get-image.d.ts +6 -6
- package/dist/lib/tldraw-controller.d.ts +8 -5
- package/dist/lib/tldraw-to-image.d.ts +2 -0
- package/package.json +1 -1
- package/readme.md +2 -2
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { type Editor
|
|
1
|
+
import { type Editor } from 'tldraw';
|
|
2
2
|
declare global {
|
|
3
3
|
interface Window {
|
|
4
4
|
editor: Editor;
|
|
5
5
|
getImage: (options: {
|
|
6
|
-
background
|
|
7
|
-
darkMode
|
|
8
|
-
format:
|
|
9
|
-
padding
|
|
10
|
-
scale
|
|
6
|
+
background?: boolean;
|
|
7
|
+
darkMode?: boolean;
|
|
8
|
+
format: 'json' | 'png' | 'svg';
|
|
9
|
+
padding?: number;
|
|
10
|
+
scale?: number;
|
|
11
11
|
}) => Promise<string>;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TldrawToImageOptions } from './tldraw-to-image';
|
|
2
|
+
type DownloadOptions = Omit<TldrawToImageOptions, 'frames'>;
|
|
2
3
|
export default class TldrawController {
|
|
3
4
|
private readonly href;
|
|
4
5
|
private page?;
|
|
@@ -8,10 +9,10 @@ export default class TldrawController {
|
|
|
8
9
|
private get isLocal();
|
|
9
10
|
start(): Promise<void>;
|
|
10
11
|
close(): Promise<void>;
|
|
11
|
-
download(
|
|
12
|
-
downloadFrame(
|
|
13
|
-
downloadFrames(
|
|
14
|
-
downloadAllFrames(
|
|
12
|
+
download(options: DownloadOptions): Promise<string[]>;
|
|
13
|
+
downloadFrame(frameNameOrId: string, options: DownloadOptions): Promise<string[]>;
|
|
14
|
+
downloadFrames(frameNamesOrIds: string[], options: DownloadOptions): Promise<string[]>;
|
|
15
|
+
downloadAllFrames(options: DownloadOptions): Promise<string[]>;
|
|
15
16
|
loadFile(filePath: string): Promise<void>;
|
|
16
17
|
getShareUrl(): Promise<string>;
|
|
17
18
|
private _download;
|
|
@@ -20,4 +21,6 @@ export default class TldrawController {
|
|
|
20
21
|
private getPageFrameWithNameOrId;
|
|
21
22
|
private getPageFrames;
|
|
22
23
|
private stripStyleElement;
|
|
24
|
+
private stripUndefined;
|
|
23
25
|
}
|
|
26
|
+
export {};
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -344,8 +344,8 @@ On GitHub:
|
|
|
344
344
|
|
|
345
345
|
On Discord:
|
|
346
346
|
|
|
347
|
-
- [@jorisjh in #
|
|
348
|
-
- [@Nitsuj in #
|
|
347
|
+
- [@jorisjh in #ideas_old](https://discord.com/channels/859816885297741824/859816885801713730/1156880056501665802)
|
|
348
|
+
- [@Nitsuj in #ideas_old](https://discord.com/channels/859816885297741824/859816885801713730/1020352607920869406)
|
|
349
349
|
|
|
350
350
|
## Implementation notes
|
|
351
351
|
|