@kitschpatrol/tldraw-cli 4.6.2 → 4.6.3

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 CHANGED
@@ -786,7 +786,7 @@ var require_irregular_plurals2 = __commonJS({
786
786
  });
787
787
 
788
788
  // package.json
789
- var version = "4.6.2";
789
+ var version = "4.6.3";
790
790
 
791
791
  // node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/ansi-styles/index.js
792
792
  var ANSI_BACKGROUND_OFFSET = 10;
@@ -1,4 +1,4 @@
1
- var eD=Object.defineProperty;var tD=(e,n,t)=>n in e?eD(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var g=(e,n,t)=>(tD(e,typeof n!="symbol"?n+"":n,t),t);function nD(e,n){for(var t=0;t<n.length;t++){const r=n[t];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function t(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=t(o);fetch(o.href,i)}})();var tn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ki(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var RI={exports:{}},yp={},LI={exports:{}},xe={};/**
1
+ var eD=Object.defineProperty;var tD=(e,n,t)=>n in e?eD(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var g=(e,n,t)=>tD(e,typeof n!="symbol"?n+"":n,t);function nD(e,n){for(var t=0;t<n.length;t++){const r=n[t];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function t(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=t(o);fetch(o.href,i)}})();var tn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ki(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var RI={exports:{}},yp={},LI={exports:{}},xe={};/**
2
2
  * @license React
3
3
  * react.production.min.js
4
4
  *
@@ -4,7 +4,7 @@
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>
7
+ <script type="module" crossorigin src="/assets/index-DULwZbef.js"></script>
8
8
  <link rel="stylesheet" crossorigin href="/assets/index-B-e5Wj_i.css">
9
9
  </head>
10
10
  <body>
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.3",
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,12 +46,12 @@
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.0",
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
56
  "@tldraw/assets": "2.2.0",
57
57
  "@types/express": "^4.17.21",
@@ -78,10 +78,10 @@
78
78
  "sharp-phash": "^2.1.0",
79
79
  "strip-ansi": "^7.1.0",
80
80
  "tldraw": "2.2.0",
81
- "tsx": "^4.15.2",
81
+ "tsx": "^4.15.4",
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