@kitschpatrol/tldraw-cli 2.2.0 → 2.2.2
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 +25 -35
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/index.js +7 -19
- package/dist/lib/tldraw-to-image.d.ts +3 -3
- package/package.json +2 -3
- package/readme.md +12 -12
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type
|
|
1
|
+
export type TldrawToImageOptions = {
|
|
2
2
|
darkMode?: boolean;
|
|
3
3
|
format?: 'png' | 'svg';
|
|
4
4
|
frames?: boolean | string[];
|
|
@@ -8,9 +8,9 @@ export type TldrawImageOptions = {
|
|
|
8
8
|
transparent?: boolean;
|
|
9
9
|
verbose?: boolean;
|
|
10
10
|
};
|
|
11
|
-
export declare function tldrawToImage(tldrPathOrUrl: string, options?:
|
|
11
|
+
export declare function tldrawToImage(tldrPathOrUrl: string, options?: TldrawToImageOptions & {
|
|
12
12
|
frames?: false | undefined;
|
|
13
13
|
}): Promise<string>;
|
|
14
|
-
export declare function tldrawToImage(tldrPathOrUrl: string, options?:
|
|
14
|
+
export declare function tldrawToImage(tldrPathOrUrl: string, options?: TldrawToImageOptions & {
|
|
15
15
|
frames: string[] | true;
|
|
16
16
|
}): Promise<string[]>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kitschpatrol/tldraw-cli",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A tiny little CLI tool for rendering tldraw URLs and .tldr files into svg or png images.",
|
|
6
6
|
"repository": {
|
|
@@ -47,12 +47,12 @@
|
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@kitschpatrol/shared-config": "^4.3.3",
|
|
50
|
+
"@sindresorhus/slugify": "^2.2.1",
|
|
50
51
|
"@tldraw/assets": "2.0.0-beta.2",
|
|
51
52
|
"@tldraw/tldraw": "2.0.0-beta.2",
|
|
52
53
|
"@types/express": "^4.17.21",
|
|
53
54
|
"@types/react": "^18.2.48",
|
|
54
55
|
"@types/react-dom": "^18.2.18",
|
|
55
|
-
"@types/voca": "^1.4.5",
|
|
56
56
|
"@types/yargs": "^17.0.32",
|
|
57
57
|
"@vitejs/plugin-react-swc": "^3.5.0",
|
|
58
58
|
"bumpp": "^9.3.0",
|
|
@@ -69,7 +69,6 @@
|
|
|
69
69
|
"untildify": "^5.0.0",
|
|
70
70
|
"vite": "^5.0.11",
|
|
71
71
|
"vitest": "^1.2.1",
|
|
72
|
-
"voca": "^1.4.1",
|
|
73
72
|
"yargs": "^17.7.2"
|
|
74
73
|
},
|
|
75
74
|
"publishConfig": {
|
package/readme.md
CHANGED
|
@@ -42,18 +42,18 @@ tldraw-cli file-or-url {options}
|
|
|
42
42
|
| ------------- | ------------------------------------------------------------------------------------------------------- |
|
|
43
43
|
| `file-or-url` | The sketch to convert to an image — either a path to a local ".tldr" file, or a tldraw\.com sketch URL. |
|
|
44
44
|
|
|
45
|
-
| Option | Alias | Description Value
|
|
46
|
-
| --------------------- | ----- |
|
|
47
|
-
| `--format <svg\|png>` | `-f` | Output image format, one of `svg` or `png`
|
|
48
|
-
| `--dark-mode ` | `-d` | Output a dark theme version of the image
|
|
49
|
-
| `--transparent ` | `-t` | Output an image with a transparent background
|
|
50
|
-
| `--output <string>` | `-o` | Output directory
|
|
51
|
-
| `--name <string>` | `-n` | Output file name without extension; by default the original file name or URL id is used
|
|
52
|
-
| `--frames <array?>` | | Export each sketch "frame" as a separate image, use the option flag alone to export all frames, or pass one or more frame names or IDs
|
|
53
|
-
| `--strip-style` | | Remove `<style>` elements from SVG output, useful to lighten the load of embedded fonts or if you are going to provide your own stylesheet for the SVG
|
|
54
|
-
| `--help ` | `-h` | Show help
|
|
55
|
-
| `--version` | `-v` | Show version number
|
|
56
|
-
| `--verbose` | | Enable verbose output
|
|
45
|
+
| Option | Alias | Description Value | Default Value |
|
|
46
|
+
| --------------------- | ----- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
|
|
47
|
+
| `--format <svg\|png>` | `-f` | Output image format, one of `svg` or `png` | `svg` |
|
|
48
|
+
| `--dark-mode ` | `-d` | Output a dark theme version of the image | `false` |
|
|
49
|
+
| `--transparent ` | `-t` | Output an image with a transparent background | `false` |
|
|
50
|
+
| `--output <string>` | `-o` | Output directory | `./` |
|
|
51
|
+
| `--name <string>` | `-n` | Output file name without extension; by default the original file name or URL id is used | |
|
|
52
|
+
| `--frames <array?>` | | Export each sketch "frame" as a separate image, use the option flag alone to export all frames, or pass one or more frame names or IDs, slugified frame names will also match | `false` |
|
|
53
|
+
| `--strip-style` | | Remove `<style>` elements from SVG output, useful to lighten the load of embedded fonts or if you are going to provide your own stylesheet for the SVG | `false` |
|
|
54
|
+
| `--help ` | `-h` | Show help | |
|
|
55
|
+
| `--version` | `-v` | Show version number | |
|
|
56
|
+
| `--verbose` | | Enable verbose output | `false` |
|
|
57
57
|
|
|
58
58
|
## Examples
|
|
59
59
|
|