@kitschpatrol/tldraw-cli 4.6.2 → 4.6.4

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.
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" fill="none"><path fill="#000" fill-rule="evenodd" d="M26 4H8v2h14a2 2 0 0 1 2 2v14h2zM6 4v2H4a2 2 0 0 0-2 2v18a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2v-2h2a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2m16 22H4V8h18z" clip-rule="evenodd"/><path fill="#000" d="M3 7h20v20H3z"/></svg>
@@ -46,6 +46,7 @@
46
46
  "duplicate",
47
47
  "edit",
48
48
  "external-link",
49
+ "fill-fill",
49
50
  "fill-none",
50
51
  "fill-pattern",
51
52
  "fill-semi",
@@ -4,8 +4,8 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>tldraw via tldraw-cli</title>
7
- <script type="module" crossorigin src="/assets/index-D-GZHgLq.js"></script>
8
- <link rel="stylesheet" crossorigin href="/assets/index-B-e5Wj_i.css">
7
+ <script type="module" crossorigin src="/assets/index-DNvBYIp4.js"></script>
8
+ <link rel="stylesheet" crossorigin href="/assets/index-CY4X3CGC.css">
9
9
  </head>
10
10
  <body>
11
11
  <div id="root"></div>
@@ -93,9 +93,12 @@
93
93
  "action.toggle-debug-mode": "Toggle debug mode",
94
94
  "action.toggle-focus-mode.menu": "Focus mode",
95
95
  "action.toggle-focus-mode": "Toggle focus mode",
96
+ "action.toggle-dynamic-size-mode.menu": "Dynamic size",
97
+ "action.toggle-dynamic-size-mode": "Toggle dynamic size",
96
98
  "action.toggle-grid.menu": "Show grid",
97
99
  "action.toggle-grid": "Toggle grid",
98
100
  "action.toggle-lock": "Toggle locked",
101
+ "action.flatten-to-image": "Flatten",
99
102
  "action.toggle-snap-mode.menu": "Always snap",
100
103
  "action.toggle-snap-mode": "Toggle always snap",
101
104
  "action.toggle-tool-lock.menu": "Tool lock",
@@ -112,6 +115,9 @@
112
115
  "action.zoom-to-selection": "Zoom to selection",
113
116
  "assets.files.upload-failed": "Upload failed",
114
117
  "assets.url.failed": "Couldn't load URL preview",
118
+ "color-scheme.dark": "Dark",
119
+ "color-scheme.light": "Light",
120
+ "color-scheme.system": "System",
115
121
  "color-style.white": "White",
116
122
  "color-style.black": "Black",
117
123
  "color-style.blue": "Blue",
@@ -130,6 +136,7 @@
130
136
  "fill-style.semi": "Semi",
131
137
  "fill-style.solid": "Solid",
132
138
  "fill-style.pattern": "Pattern",
139
+ "fill-style.fill": "Fill",
133
140
  "dash-style.dashed": "Dashed",
134
141
  "dash-style.dotted": "Dotted",
135
142
  "dash-style.draw": "Draw",
@@ -225,6 +232,7 @@
225
232
  "tool.embed": "Embed",
226
233
  "tool.text": "Text",
227
234
  "menu.title": "Menu",
235
+ "menu.color-scheme": "Color scheme",
228
236
  "menu.copy-as": "Copy as",
229
237
  "menu.edit": "Edit",
230
238
  "menu.export-as": "Export as",
@@ -232,6 +240,7 @@
232
240
  "menu.language": "Language",
233
241
  "menu.preferences": "Preferences",
234
242
  "menu.view": "View",
243
+ "context-menu.edit": "Edit",
235
244
  "context-menu.arrange": "Arrange",
236
245
  "context-menu.copy-as": "Copy as",
237
246
  "context-menu.export-as": "Export as",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitschpatrol/tldraw-cli",
3
- "version": "4.6.2",
3
+ "version": "4.6.4",
4
4
  "type": "module",
5
5
  "description": "A CLI tool for exporting tldraw sketch URLs and local .tldr files to SVG or PNG images.",
6
6
  "repository": {
@@ -46,14 +46,14 @@
46
46
  "dependencies": {
47
47
  "@fontsource/inter": "^5.0.18",
48
48
  "express": "^4.19.2",
49
- "puppeteer": "^22.10.1",
49
+ "puppeteer": "^22.11.2",
50
50
  "uint8array-extras": "^1.1.0",
51
51
  "yargs": "^17.7.2"
52
52
  },
53
53
  "devDependencies": {
54
- "@kitschpatrol/shared-config": "^4.7.1",
54
+ "@kitschpatrol/shared-config": "^4.7.2",
55
55
  "@sindresorhus/slugify": "^2.2.1",
56
- "@tldraw/assets": "2.2.0",
56
+ "@tldraw/assets": "2.3.0-canary.fef462bd67aa",
57
57
  "@types/express": "^4.17.21",
58
58
  "@types/react": "^18.3.3",
59
59
  "@types/react-dom": "^18.3.0",
@@ -77,11 +77,11 @@
77
77
  "sharp": "^0.33.4",
78
78
  "sharp-phash": "^2.1.0",
79
79
  "strip-ansi": "^7.1.0",
80
- "tldraw": "2.2.0",
81
- "tsx": "^4.15.2",
80
+ "tldraw": "2.3.0-canary.fef462bd67aa",
81
+ "tsx": "^4.15.6",
82
82
  "typescript": "^5.4.5",
83
83
  "untildify": "^5.0.0",
84
- "vite": "^5.2.13",
84
+ "vite": "^5.3.1",
85
85
  "vitest": "^1.6.0"
86
86
  },
87
87
  "publishConfig": {
package/readme.md CHANGED
@@ -93,10 +93,10 @@ tldraw <command>
93
93
  | `export` | `<files-or-urls..>` | Export a local tldraw ".tldr" file or a tldraw\.com URL to an svg, png, json, or tldr file. Prints the absolute path(s) to the exported image(s) to stdout. |
94
94
  | `open` | `[files-or-urls..]` | Open a tldraw `.tldr` file or tldraw\.com URL in your default browser with either the official tldraw\.com site or a locally-hosted instance of the editor. Call `open` without an argument to open a blank sketch. Sketches opened via URL with the `--local` flag will be temporarily copied to the local system, and will not be kept in sync with tldraw\.com. This process does not exit until the browser is closed. Warning: Passing a local .tldr file without the `--local` option will upload and share the sketch on tldraw\.com. |
95
95
 
96
- | Option | Alias | Description | Type |
97
- | ----------- | ----- | ------------------- | --------- |
98
- | `--help` | `-h` | Show help | `boolean` |
99
- | `--version` | `-v` | Show version number | `boolean` |
96
+ | Option | Description | Type |
97
+ | ------------------- | ------------------- | --------- |
98
+ | `--help`<br>`-h` | Show help | `boolean` |
99
+ | `--version`<br>`-v` | Show version number | `boolean` |
100
100
 
101
101
  _See the sections below for more information on each subcommand._
102
102
 
@@ -114,22 +114,22 @@ tldraw export <files-or-urls..>
114
114
  | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
115
115
  | `files-or-urls` | The tldraw sketch to export. May be one or more paths to local `.tldr` files, or tldraw\.com sketch URLs. Accepts a mix of both file paths and URLs, and supports glob matching via your shell. Prints the absolute path(s) to the exported image(s) to `stdout`. _(Required.)_ | `array` |
116
116
 
117
- | Option | Alias | Argument | Description | Type | Default |
118
- | --------------- | ----- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ----------------------------------------- |
119
- | `--format` | `-f` | | Output image format. | `string` | `"svg"` |
120
- | `--output` | `-o` | | Output image directory. | `string` | `"./"` |
121
- | `--name` | `-n` | | Output image name (without extension). | `string` | The original file name or URL id is used. |
122
- | `--frames` | | | Export each sketch "frame" as a separate image. Pass one or more frame names or IDs to export specific frames, or pass the flag without the arguments to export all frames. By default, the entire first page is exported with all frames. | `array` | `false` |
123
- | `--pages` | | | Export each sketch "page" as a separate image. Pass one or more page names or IDs to export specific page, or pass one or more page index numbers (from 0), or pass the flag without the arguments to export all pages. By default, only the first page is exported. | `array` | `false` |
124
- | `--transparent` | `-t` | | Export an image with a transparent background. | `boolean` | `false` |
125
- | `--dark` | `-d` | | Export a dark theme version of the image. | `boolean` | `false` |
126
- | `--padding` | | `[number]` | Set a specific padding amount around the exported image. | | `32` |
127
- | `--scale` | | `[number]` | Set a sampling factor for raster image exports. | | `1` |
128
- | `--strip-style` | | | Remove `<style>` elements from SVG output, useful to lighten the load of embedded fonts if you intend to provide your own stylesheets. Applies to SVG output only. | `boolean` | `false` |
129
- | `--print` | `-p` | | Print the exported image(s) to stdout instead of saving to a file. Incompatible with `--output`, and disregards `--name`. PNGs are printed as base64-encoded strings. | `boolean` | `false` |
130
- | `--verbose` | | | Enable verbose logging. All verbose logs and prefixed with their log level and are printed to `stderr` for ease of redirection. | `boolean` | `false` |
131
- | `--help` | `-h` | | Show help | `boolean` | |
132
- | `--version` | `-v` | | Show version number | `boolean` | |
117
+ | Option | Description | Type | Default |
118
+ | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- | ----------------------------------------- |
119
+ | `--format`<br>`-f` | Output image format. | `"png"` `"svg"` `"json"` `"tldr"` | `"svg"` |
120
+ | `--output`<br>`-o` | Output image directory. | `string` | `"./"` |
121
+ | `--name`<br>`-n` | Output image name (without extension). | `string` | The original file name or URL id is used. |
122
+ | `--frames` | Export each sketch "frame" as a separate image. Pass one or more frame names or IDs to export specific frames, or pass the flag without the arguments to export all frames. By default, the entire first page is exported with all frames. | `array` | `false` |
123
+ | `--pages` | Export each sketch "page" as a separate image. Pass one or more page names or IDs to export specific page, or pass one or more page index numbers (from 0), or pass the flag without the arguments to export all pages. By default, only the first page is exported. | `array` | `false` |
124
+ | `--transparent`<br>`-t` | Export an image with a transparent background. | `boolean` | `false` |
125
+ | `--dark`<br>`-d` | Export a dark theme version of the image. | `boolean` | `false` |
126
+ | `--padding` | Set a specific padding amount around the exported image. | `number` | `32` |
127
+ | `--scale` | Set a sampling factor for raster image exports. | `number` | `1` |
128
+ | `--strip-style` | Remove `<style>` elements from SVG output, useful to lighten the load of embedded fonts if you intend to provide your own stylesheets. Applies to SVG output only. | `boolean` | `false` |
129
+ | `--print`<br>`-p` | Print the exported image(s) to stdout instead of saving to a file. Incompatible with `--output`, and disregards `--name`. PNGs are printed as base64-encoded strings. | `boolean` | `false` |
130
+ | `--verbose` | Enable verbose logging. All verbose logs and prefixed with their log level and are printed to `stderr` for ease of redirection. | `boolean` | `false` |
131
+ | `--help`<br>`-h` | Show help | `boolean` | |
132
+ | `--version`<br>`-v` | Show version number | `boolean` | |
133
133
 
134
134
  #### Subcommand: `tldraw open`
135
135
 
@@ -141,16 +141,16 @@ Usage:
141
141
  tldraw open [files-or-urls..]
142
142
  ```
143
143
 
144
- | Positional Argument | Description | Type |
145
- | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
146
- | `files-or-urls` | The `.tldr` file(s) or tldraw\.com sketch URL(s) to open. Omit the argument to open a blank sketch. Supports glob matching via your shell. Prints the URL of the local server to `stdout`. _(Optional.)_ | `array` |
144
+ | Positional Argument | Description | Type |
145
+ | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------- |
146
+ | `files-or-urls` | The `.tldr` file(s) or tldraw\.com sketch URL(s) to open. Omit the argument to open a blank sketch. Supports glob matching via your shell. Prints the URL of the local server to `stdout`. | `array` |
147
147
 
148
- | Option | Alias | Description | Type | Default |
149
- | ----------- | ----- | ------------------------------------------------------------------------------------------------------------------------------- | --------- | ------- |
150
- | `--local` | `-l` | Open the file or URL in a local instance of tldraw, instead of tldraw\.com. | `boolean` | `false` |
151
- | `--verbose` | | Enable verbose logging. All verbose logs and prefixed with their log level and are printed to `stderr` for ease of redirection. | `boolean` | `false` |
152
- | `--help` | `-h` | Show help | `boolean` | |
153
- | `--version` | `-v` | Show version number | `boolean` | |
148
+ | Option | Description | Type | Default |
149
+ | ------------------- | ------------------------------------------------------------------------------------------------------------------------------- | --------- | ------- |
150
+ | `--local`<br>`-l` | Open the file or URL in a local instance of tldraw, instead of tldraw\.com. | `boolean` | `false` |
151
+ | `--verbose` | Enable verbose logging. All verbose logs and prefixed with their log level and are printed to `stderr` for ease of redirection. | `boolean` | `false` |
152
+ | `--help`<br>`-h` | Show help | `boolean` | |
153
+ | `--version`<br>`-v` | Show version number | `boolean` | |
154
154
 
155
155
  <!-- /cli-help -->
156
156
 
package/dist/.DS_Store DELETED
Binary file