Wykres commitów

2928 Commity (main)

Autor SHA1 Wiadomość Data
dependabot[bot] a2f4d35579
Bump the npm_and_yarn group across 2 directories with 6 updates (#3712)
Bumps the npm_and_yarn group with 3 updates in the / directory:
[vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite),
[tar](https://github.com/isaacs/node-tar) and
[zod](https://github.com/colinhacks/zod).
Bumps the npm_and_yarn group with 4 updates in the /templates/vite
directory:
[vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite),
[tar](https://github.com/isaacs/node-tar),
[semver](https://github.com/npm/node-semver) and
[word-wrap](https://github.com/jonschlinkert/word-wrap).

Updates `vite` from 5.2.9 to 5.2.11
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md">vite's
changelog</a>.</em></p>
<blockquote>
<h2><!-- raw HTML omitted -->5.2.11 (2024-05-02)<!-- raw HTML omitted
--></h2>
<ul>
<li>feat: improve dynamic import variable failure error message (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16519">#16519</a>)
(<a href="https://github.com/vitejs/vite/commit/f8feeea">f8feeea</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/16519">#16519</a></li>
<li>fix: dynamic-import-vars plugin normalize path issue (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16518">#16518</a>)
(<a href="https://github.com/vitejs/vite/commit/f71ba5b">f71ba5b</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/16518">#16518</a></li>
<li>fix: scripts and styles were missing from built HTML on Windows (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16421">#16421</a>)
(<a href="https://github.com/vitejs/vite/commit/0e93f58">0e93f58</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/16421">#16421</a></li>
<li>fix(deps): update all non-major dependencies (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16488">#16488</a>)
(<a href="https://github.com/vitejs/vite/commit/2d50be2">2d50be2</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/16488">#16488</a></li>
<li>fix(deps): update all non-major dependencies (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16549">#16549</a>)
(<a href="https://github.com/vitejs/vite/commit/2d6a13b">2d6a13b</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/16549">#16549</a></li>
<li>fix(dev): watch publicDir explicitly to include it outside the root
(<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16502">#16502</a>)
(<a href="https://github.com/vitejs/vite/commit/4d83eb5">4d83eb5</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/16502">#16502</a></li>
<li>fix(preload): skip preload for non-static urls (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16556">#16556</a>)
(<a href="https://github.com/vitejs/vite/commit/bb79c9b">bb79c9b</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/16556">#16556</a></li>
<li>fix(ssr): handle class declaration and expression name scoping (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16569">#16569</a>)
(<a href="https://github.com/vitejs/vite/commit/c071eb3">c071eb3</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/16569">#16569</a></li>
<li>fix(ssr): handle function expression name scoping (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16563">#16563</a>)
(<a href="https://github.com/vitejs/vite/commit/02db947">02db947</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/16563">#16563</a></li>
</ul>
<h2><!-- raw HTML omitted -->5.2.10 (2024-04-20)<!-- raw HTML omitted
--></h2>
<ul>
<li>revert: perf: use workspace root for fs cache (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/15712">#15712</a>)
(<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16476">#16476</a>)
(<a href="https://github.com/vitejs/vite/commit/77e7359">77e7359</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/15712">#15712</a>
<a
href="https://redirect.github.com/vitejs/vite/issues/16476">#16476</a></li>
<li>fix: add base to virtual html (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16442">#16442</a>)
(<a href="https://github.com/vitejs/vite/commit/721f94d">721f94d</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/16442">#16442</a></li>
<li>fix: adjust esm syntax judgment logic (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16436">#16436</a>)
(<a href="https://github.com/vitejs/vite/commit/af72eab">af72eab</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/16436">#16436</a></li>
<li>fix: don't add outDirs to watch.ignored if emptyOutDir is false (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16453">#16453</a>)
(<a href="https://github.com/vitejs/vite/commit/6a127d6">6a127d6</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/16453">#16453</a></li>
<li>fix(cspNonce): don't overwrite existing nonce values (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16415">#16415</a>)
(<a href="https://github.com/vitejs/vite/commit/b872635">b872635</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/16415">#16415</a></li>
<li>feat: show warning if root is in build.outDir (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16454">#16454</a>)
(<a href="https://github.com/vitejs/vite/commit/11444dc">11444dc</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/16454">#16454</a></li>
<li>feat: write cspNonce to style tags (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16419">#16419</a>)
(<a href="https://github.com/vitejs/vite/commit/8e54bbd">8e54bbd</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/16419">#16419</a></li>
<li>chore(deps): update dependency eslint-plugin-n to v17 (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16381">#16381</a>)
(<a href="https://github.com/vitejs/vite/commit/6cccef7">6cccef7</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/16381">#16381</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="2bc5d3de87"><code>2bc5d3d</code></a>
release: v5.2.11</li>
<li><a
href="f8feeea41c"><code>f8feeea</code></a>
feat: improve dynamic import variable failure error message (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16519">#16519</a>)</li>
<li><a
href="c071eb3822"><code>c071eb3</code></a>
fix(ssr): handle class declaration and expression name scoping (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16569">#16569</a>)</li>
<li><a
href="02db9479ac"><code>02db947</code></a>
fix(ssr): handle function expression name scoping (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16563">#16563</a>)</li>
<li><a
href="2d6a13b0aa"><code>2d6a13b</code></a>
fix(deps): update all non-major dependencies (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16549">#16549</a>)</li>
<li><a
href="0e93f588b9"><code>0e93f58</code></a>
fix: scripts and styles were missing from built HTML on Windows (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16421">#16421</a>)</li>
<li><a
href="bb79c9b653"><code>bb79c9b</code></a>
fix(preload): skip preload for non-static urls (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16556">#16556</a>)</li>
<li><a
href="f71ba5b94a"><code>f71ba5b</code></a>
fix: dynamic-import-vars plugin normalize path issue (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16518">#16518</a>)</li>
<li><a
href="2d50be2a54"><code>2d50be2</code></a>
fix(deps): update all non-major dependencies (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16488">#16488</a>)</li>
<li><a
href="4d83eb58cd"><code>4d83eb5</code></a>
fix(dev): watch publicDir explicitly to include it outside the root (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16502">#16502</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/vitejs/vite/commits/v5.2.11/packages/vite">compare
view</a></li>
</ul>
</details>
<br />

Updates `tar` from 7.0.1 to 7.1.0
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md">tar's
changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<h2>7.1</h2>
<ul>
<li>Update minipass to v7.1.0</li>
<li>Update the type definitions of <code>write()</code> and
<code>end()</code> methods on
<code>Unpack</code> and <code>Parser</code> classes to be compatible
with the
NodeJS.WritableStream type in the latest versions of
<code>@types/node</code>.</li>
</ul>
<h2>7.0</h2>
<ul>
<li>Rewrite in TypeScript, provide ESM and CommonJS hybrid
interface</li>
<li>Add tree-shake friendly exports, like
<code>import('tar/create')</code>
and <code>import('tar/read-entry')</code> to get individual functions or
classes.</li>
<li>Add <code>chmod</code> option that defaults to false, and deprecate
<code>noChmod</code>. That is, reverse the default option regarding
explicitly setting file system modes to match tar entry
settings.</li>
<li>Add <code>processUmask</code> option to avoid having to call
<code>process.umask()</code> when <code>chmod: true</code> (or
<code>noChmod: false</code>) is
set.</li>
</ul>
<h2>6.2</h2>
<ul>
<li>Add support for brotli compression</li>
<li>Add <code>maxDepth</code> option to prevent extraction into
excessively
deep folders.</li>
</ul>
<h2>6.1</h2>
<ul>
<li>remove dead link to benchmarks (<a
href="https://redirect.github.com/isaacs/node-tar/issues/313">#313</a>)
(<a href="https://github.com/yetzt"><code>@​yetzt</code></a>)</li>
<li>add examples/explanation of using tar.t (<a
href="https://github.com/isaacs"><code>@​isaacs</code></a>)</li>
<li>ensure close event is emited after stream has ended (<a
href="https://github.com/webark"><code>@​webark</code></a>)</li>
<li>replace deprecated String.prototype.substr() (<a
href="https://github.com/CommanderRoot"><code>@​CommanderRoot</code></a>,
<a
href="https://github.com/lukekarrys"><code>@​lukekarrys</code></a>)</li>
</ul>
<h2>6.0</h2>
<ul>
<li>Drop support for node 6 and 8</li>
<li>fix symlinks and hardlinks on windows being packed with
<code>\</code>-style path targets</li>
</ul>
<h2>5.0</h2>
<ul>
<li>Address unpack race conditions using path reservations</li>
<li>Change large-numbers errors from TypeError to Error</li>
<li>Add <code>TAR_*</code> error codes</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="ce612d0aa8"><code>ce612d0</code></a>
7.1.0</li>
<li><a
href="6b61030dac"><code>6b61030</code></a>
update types to comply with NodeJS.WritableStream</li>
<li><a
href="79a5c30d7b"><code>79a5c30</code></a>
update minipass</li>
<li><a
href="bead873b5c"><code>bead873</code></a>
remove more cruft, format codes</li>
<li><a
href="faf9359ca7"><code>faf9359</code></a>
remove temlate-oss stuff</li>
<li>See full diff in <a
href="https://github.com/isaacs/node-tar/compare/v7.0.1...v7.1.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `zod` from 3.22.4 to 3.23.6
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/colinhacks/zod/releases">zod's
releases</a>.</em></p>
<blockquote>
<h2>v3.23.6</h2>
<h2>Commits:</h2>
<ul>
<li>bc0095aab9e7254deb18701adc63de128ca2c742 Test on latest node</li>
<li>6e5699a30373cc22879f2bcb6902fc138518c980 Lint on latest node</li>
<li>1f466d9d00f446d7bed1962990e7a1ce813ab0d4 describe how one can
protect from cyclical objects starting an infini… (<a
href="https://redirect.github.com/colinhacks/zod/issues/3447">#3447</a>)</li>
<li>3fed6f21e0ea7adc91aa0cc44f75bcf4e526d98e Add zod playground link (<a
href="https://redirect.github.com/colinhacks/zod/issues/3454">#3454</a>)</li>
<li>04e1f379f6989d23dd45660fcabc78f76d7834f8 Fixed freezing async
ZodReadonly results (<a
href="https://redirect.github.com/colinhacks/zod/issues/3457">#3457</a>)</li>
<li>b87e59d0e4bbb4403bf27243afdcda9fcdeec258 Update sponsor tiers (<a
href="https://redirect.github.com/colinhacks/zod/issues/3453">#3453</a>)</li>
<li>143886151bba3930bdcc10d34a1cff4bf9103ba8 Add copper tier (<a
href="https://redirect.github.com/colinhacks/zod/issues/3460">#3460</a>)</li>
<li>ce3711e1384952d255769b9495f9bfadfb327291 add VSCode dev container
support and documenation</li>
<li>93b480b12ec3466cbd3b4182f7ce292e5c61528c v3.23.6</li>
</ul>
<h2>v3.23.5</h2>
<h2>Commits:</h2>
<ul>
<li>110b8211f991b3e060ab2da4fec7b63d600439ad Update README_ZH.md (<a
href="https://redirect.github.com/colinhacks/zod/issues/3433">#3433</a>)</li>
<li>c1910bdfc98709b8f14231e2cefc5a3be401e3ee Made ZodEnum take readonly
string array (<a
href="https://redirect.github.com/colinhacks/zod/issues/3444">#3444</a>)</li>
<li>541a862e978f96eb391849a6bf16be84231aa1b3 3.23.5</li>
</ul>
<h2>v3.23.4</h2>
<h2>Commits:</h2>
<ul>
<li>157b18d742c86d85b26a8421af46ad6d6d6b6ea7 Add 3.23 announcement</li>
<li>aedf93f1435a29463d915c3be45b4dcbeefa8cc1 Revert change to default
Input</li>
<li>45107f7a7230fe48ee24dc37e621422c9dc64ec4 v3.23.4</li>
</ul>
<h2>v3.23.3</h2>
<h2>Commits:</h2>
<ul>
<li>103d2436f85872ca0e0e6247652989cc93d46a39 3.23.3</li>
</ul>
<h2>v3.23.2</h2>
<h2>Commits:</h2>
<ul>
<li>c340558d14f5222a2ca177e0591463c06cc5edc3 Update protocol</li>
<li>ef588d036f3e98b832796e9a681dbaf097631ea0 Fix t3env</li>
<li>9df70dd71195df951c43f180fbe5e64ea1f835df 3.23.2</li>
</ul>
<h2>v3.23.1</h2>
<p>This changes the default generics back to <code>any</code> to prevent
breakages with common packager like
<code>@hookform/resolvers</code>:</p>
<pre lang="diff"><code>- class ZodType&lt;Output = unknown, Def extends
ZodTypeDef = ZodTypeDef, Input = unknown&gt; {}
+ class ZodType&lt;Output = any, Def extends ZodTypeDef = ZodTypeDef,
Input = any&gt; {}
</code></pre>
<h2>Commits:</h2>
<ul>
<li>59f48723d36c423d9e10b3bd52325a7998314230 Change unknown -&gt; any
for ZodType defaults</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="93b480b12e"><code>93b480b</code></a>
v3.23.6</li>
<li><a
href="ce3711e138"><code>ce3711e</code></a>
add VSCode dev container support and documenation</li>
<li><a
href="143886151b"><code>1438861</code></a>
Add copper tier (<a
href="https://redirect.github.com/colinhacks/zod/issues/3460">#3460</a>)</li>
<li><a
href="b87e59d0e4"><code>b87e59d</code></a>
Update sponsor tiers (<a
href="https://redirect.github.com/colinhacks/zod/issues/3453">#3453</a>)</li>
<li><a
href="04e1f379f6"><code>04e1f37</code></a>
Fixed freezing async ZodReadonly results (<a
href="https://redirect.github.com/colinhacks/zod/issues/3457">#3457</a>)</li>
<li><a
href="3fed6f21e0"><code>3fed6f2</code></a>
Add zod playground link (<a
href="https://redirect.github.com/colinhacks/zod/issues/3454">#3454</a>)</li>
<li><a
href="1f466d9d00"><code>1f466d9</code></a>
describe how one can protect from cyclical objects starting an infini…
(<a
href="https://redirect.github.com/colinhacks/zod/issues/3447">#3447</a>)</li>
<li><a
href="6e5699a303"><code>6e5699a</code></a>
Lint on latest node</li>
<li><a
href="bc0095aab9"><code>bc0095a</code></a>
Test on latest node</li>
<li><a
href="541a862e97"><code>541a862</code></a>
3.23.5</li>
<li>Additional commits viewable in <a
href="https://github.com/colinhacks/zod/compare/v3.22.4...v3.23.6">compare
view</a></li>
</ul>
</details>
<br />

Updates `vite` from 4.3.9 to 4.5.3
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md">vite's
changelog</a>.</em></p>
<blockquote>
<h2><!-- raw HTML omitted -->5.2.11 (2024-05-02)<!-- raw HTML omitted
--></h2>
<ul>
<li>feat: improve dynamic import variable failure error message (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16519">#16519</a>)
(<a href="https://github.com/vitejs/vite/commit/f8feeea">f8feeea</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/16519">#16519</a></li>
<li>fix: dynamic-import-vars plugin normalize path issue (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16518">#16518</a>)
(<a href="https://github.com/vitejs/vite/commit/f71ba5b">f71ba5b</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/16518">#16518</a></li>
<li>fix: scripts and styles were missing from built HTML on Windows (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16421">#16421</a>)
(<a href="https://github.com/vitejs/vite/commit/0e93f58">0e93f58</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/16421">#16421</a></li>
<li>fix(deps): update all non-major dependencies (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16488">#16488</a>)
(<a href="https://github.com/vitejs/vite/commit/2d50be2">2d50be2</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/16488">#16488</a></li>
<li>fix(deps): update all non-major dependencies (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16549">#16549</a>)
(<a href="https://github.com/vitejs/vite/commit/2d6a13b">2d6a13b</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/16549">#16549</a></li>
<li>fix(dev): watch publicDir explicitly to include it outside the root
(<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16502">#16502</a>)
(<a href="https://github.com/vitejs/vite/commit/4d83eb5">4d83eb5</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/16502">#16502</a></li>
<li>fix(preload): skip preload for non-static urls (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16556">#16556</a>)
(<a href="https://github.com/vitejs/vite/commit/bb79c9b">bb79c9b</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/16556">#16556</a></li>
<li>fix(ssr): handle class declaration and expression name scoping (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16569">#16569</a>)
(<a href="https://github.com/vitejs/vite/commit/c071eb3">c071eb3</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/16569">#16569</a></li>
<li>fix(ssr): handle function expression name scoping (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16563">#16563</a>)
(<a href="https://github.com/vitejs/vite/commit/02db947">02db947</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/16563">#16563</a></li>
</ul>
<h2><!-- raw HTML omitted -->5.2.10 (2024-04-20)<!-- raw HTML omitted
--></h2>
<ul>
<li>revert: perf: use workspace root for fs cache (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/15712">#15712</a>)
(<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16476">#16476</a>)
(<a href="https://github.com/vitejs/vite/commit/77e7359">77e7359</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/15712">#15712</a>
<a
href="https://redirect.github.com/vitejs/vite/issues/16476">#16476</a></li>
<li>fix: add base to virtual html (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16442">#16442</a>)
(<a href="https://github.com/vitejs/vite/commit/721f94d">721f94d</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/16442">#16442</a></li>
<li>fix: adjust esm syntax judgment logic (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16436">#16436</a>)
(<a href="https://github.com/vitejs/vite/commit/af72eab">af72eab</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/16436">#16436</a></li>
<li>fix: don't add outDirs to watch.ignored if emptyOutDir is false (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16453">#16453</a>)
(<a href="https://github.com/vitejs/vite/commit/6a127d6">6a127d6</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/16453">#16453</a></li>
<li>fix(cspNonce): don't overwrite existing nonce values (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16415">#16415</a>)
(<a href="https://github.com/vitejs/vite/commit/b872635">b872635</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/16415">#16415</a></li>
<li>feat: show warning if root is in build.outDir (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16454">#16454</a>)
(<a href="https://github.com/vitejs/vite/commit/11444dc">11444dc</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/16454">#16454</a></li>
<li>feat: write cspNonce to style tags (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16419">#16419</a>)
(<a href="https://github.com/vitejs/vite/commit/8e54bbd">8e54bbd</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/16419">#16419</a></li>
<li>chore(deps): update dependency eslint-plugin-n to v17 (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16381">#16381</a>)
(<a href="https://github.com/vitejs/vite/commit/6cccef7">6cccef7</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/16381">#16381</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="2bc5d3de87"><code>2bc5d3d</code></a>
release: v5.2.11</li>
<li><a
href="f8feeea41c"><code>f8feeea</code></a>
feat: improve dynamic import variable failure error message (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16519">#16519</a>)</li>
<li><a
href="c071eb3822"><code>c071eb3</code></a>
fix(ssr): handle class declaration and expression name scoping (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16569">#16569</a>)</li>
<li><a
href="02db9479ac"><code>02db947</code></a>
fix(ssr): handle function expression name scoping (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16563">#16563</a>)</li>
<li><a
href="2d6a13b0aa"><code>2d6a13b</code></a>
fix(deps): update all non-major dependencies (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16549">#16549</a>)</li>
<li><a
href="0e93f588b9"><code>0e93f58</code></a>
fix: scripts and styles were missing from built HTML on Windows (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16421">#16421</a>)</li>
<li><a
href="bb79c9b653"><code>bb79c9b</code></a>
fix(preload): skip preload for non-static urls (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16556">#16556</a>)</li>
<li><a
href="f71ba5b94a"><code>f71ba5b</code></a>
fix: dynamic-import-vars plugin normalize path issue (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16518">#16518</a>)</li>
<li><a
href="2d50be2a54"><code>2d50be2</code></a>
fix(deps): update all non-major dependencies (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16488">#16488</a>)</li>
<li><a
href="4d83eb58cd"><code>4d83eb5</code></a>
fix(dev): watch publicDir explicitly to include it outside the root (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16502">#16502</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/vitejs/vite/commits/v5.2.11/packages/vite">compare
view</a></li>
</ul>
</details>
<br />

Updates `tar` from 6.2.0 to 6.2.1
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md">tar's
changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<h2>7.1</h2>
<ul>
<li>Update minipass to v7.1.0</li>
<li>Update the type definitions of <code>write()</code> and
<code>end()</code> methods on
<code>Unpack</code> and <code>Parser</code> classes to be compatible
with the
NodeJS.WritableStream type in the latest versions of
<code>@types/node</code>.</li>
</ul>
<h2>7.0</h2>
<ul>
<li>Rewrite in TypeScript, provide ESM and CommonJS hybrid
interface</li>
<li>Add tree-shake friendly exports, like
<code>import('tar/create')</code>
and <code>import('tar/read-entry')</code> to get individual functions or
classes.</li>
<li>Add <code>chmod</code> option that defaults to false, and deprecate
<code>noChmod</code>. That is, reverse the default option regarding
explicitly setting file system modes to match tar entry
settings.</li>
<li>Add <code>processUmask</code> option to avoid having to call
<code>process.umask()</code> when <code>chmod: true</code> (or
<code>noChmod: false</code>) is
set.</li>
</ul>
<h2>6.2</h2>
<ul>
<li>Add support for brotli compression</li>
<li>Add <code>maxDepth</code> option to prevent extraction into
excessively
deep folders.</li>
</ul>
<h2>6.1</h2>
<ul>
<li>remove dead link to benchmarks (<a
href="https://redirect.github.com/isaacs/node-tar/issues/313">#313</a>)
(<a href="https://github.com/yetzt"><code>@​yetzt</code></a>)</li>
<li>add examples/explanation of using tar.t (<a
href="https://github.com/isaacs"><code>@​isaacs</code></a>)</li>
<li>ensure close event is emited after stream has ended (<a
href="https://github.com/webark"><code>@​webark</code></a>)</li>
<li>replace deprecated String.prototype.substr() (<a
href="https://github.com/CommanderRoot"><code>@​CommanderRoot</code></a>,
<a
href="https://github.com/lukekarrys"><code>@​lukekarrys</code></a>)</li>
</ul>
<h2>6.0</h2>
<ul>
<li>Drop support for node 6 and 8</li>
<li>fix symlinks and hardlinks on windows being packed with
<code>\</code>-style path targets</li>
</ul>
<h2>5.0</h2>
<ul>
<li>Address unpack race conditions using path reservations</li>
<li>Change large-numbers errors from TypeError to Error</li>
<li>Add <code>TAR_*</code> error codes</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="ce612d0aa8"><code>ce612d0</code></a>
7.1.0</li>
<li><a
href="6b61030dac"><code>6b61030</code></a>
update types to comply with NodeJS.WritableStream</li>
<li><a
href="79a5c30d7b"><code>79a5c30</code></a>
update minipass</li>
<li><a
href="bead873b5c"><code>bead873</code></a>
remove more cruft, format codes</li>
<li><a
href="faf9359ca7"><code>faf9359</code></a>
remove temlate-oss stuff</li>
<li>See full diff in <a
href="https://github.com/isaacs/node-tar/compare/v7.0.1...v7.1.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `semver` from 7.5.2 to 7.6.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/npm/node-semver/releases">semver's
releases</a>.</em></p>
<blockquote>
<h2>v7.6.0</h2>
<h2><a
href="https://github.com/npm/node-semver/compare/v7.5.4...v7.6.0">7.6.0</a>
(2024-01-31)</h2>
<h3>Features</h3>
<ul>
<li><a
href="a7ab13a462"><code>a7ab13a</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/671">#671</a>
preserve pre-release and build parts of a version on coerce (<a
href="https://redirect.github.com/npm/node-semver/issues/671">#671</a>)
(<a href="https://github.com/madtisa"><code>@​madtisa</code></a>,
madtisa, <a
href="https://github.com/wraithgar"><code>@​wraithgar</code></a>)</li>
</ul>
<h3>Chores</h3>
<ul>
<li><a
href="816c7b2cbf"><code>816c7b2</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/667">#667</a>
postinstall for dependabot template-oss PR (<a
href="https://github.com/lukekarrys"><code>@​lukekarrys</code></a>)</li>
<li><a
href="0bd24d943c"><code>0bd24d9</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/667">#667</a>
bump <code>@​npmcli/template-oss</code> from 4.21.1 to 4.21.3 (<a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot])</li>
<li><a
href="e521932f11"><code>e521932</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/652">#652</a>
postinstall for dependabot template-oss PR (<a
href="https://github.com/lukekarrys"><code>@​lukekarrys</code></a>)</li>
<li><a
href="8873991808"><code>8873991</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/652">#652</a>
chore: chore: postinstall for dependabot template-oss PR (<a
href="https://github.com/lukekarrys"><code>@​lukekarrys</code></a>)</li>
<li><a
href="f317dc8689"><code>f317dc8</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/652">#652</a>
bump <code>@​npmcli/template-oss</code> from 4.19.0 to 4.21.0 (<a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot])</li>
<li><a
href="7303db1fe5"><code>7303db1</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/658">#658</a>
add clean() test for build metadata (<a
href="https://redirect.github.com/npm/node-semver/issues/658">#658</a>)
(<a
href="https://github.com/jethrodaniel"><code>@​jethrodaniel</code></a>)</li>
<li><a
href="6240d75a7c"><code>6240d75</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/656">#656</a>
add missing quotes in README.md (<a
href="https://redirect.github.com/npm/node-semver/issues/656">#656</a>)
(<a href="https://github.com/zyxkad"><code>@​zyxkad</code></a>)</li>
<li><a
href="14d263faa1"><code>14d263f</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/625">#625</a>
postinstall for dependabot template-oss PR (<a
href="https://github.com/lukekarrys"><code>@​lukekarrys</code></a>)</li>
<li><a
href="7c34e1ac1b"><code>7c34e1a</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/625">#625</a>
bump <code>@​npmcli/template-oss</code> from 4.18.1 to 4.19.0 (<a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot])</li>
<li><a
href="123e0b0328"><code>123e0b0</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/622">#622</a>
postinstall for dependabot template-oss PR (<a
href="https://github.com/lukekarrys"><code>@​lukekarrys</code></a>)</li>
<li><a
href="737d5e1cf1"><code>737d5e1</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/622">#622</a>
bump <code>@​npmcli/template-oss</code> from 4.18.0 to 4.18.1 (<a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot])</li>
<li><a
href="cce61804ba"><code>cce6180</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/598">#598</a>
postinstall for dependabot template-oss PR (<a
href="https://github.com/lukekarrys"><code>@​lukekarrys</code></a>)</li>
<li><a
href="b914a3d0d2"><code>b914a3d</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/598">#598</a>
bump <code>@​npmcli/template-oss</code> from 4.17.0 to 4.18.0 (<a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot])</li>
</ul>
<h2>v7.5.4</h2>
<h2><a
href="https://github.com/npm/node-semver/compare/v7.5.3...v7.5.4">7.5.4</a>
(2023-07-07)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><a
href="cc6fde2d34"><code>cc6fde2</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/588">#588</a>
trim each range set before parsing (<a
href="https://github.com/lukekarrys"><code>@​lukekarrys</code></a>)</li>
<li><a
href="99d8287516"><code>99d8287</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/583">#583</a>
correctly parse long build ids as valid (<a
href="https://redirect.github.com/npm/node-semver/issues/583">#583</a>)
(<a
href="https://github.com/lukekarrys"><code>@​lukekarrys</code></a>)</li>
</ul>
<h2>v7.5.3</h2>
<h2><a
href="https://github.com/npm/node-semver/compare/v7.5.2...v7.5.3">7.5.3</a>
(2023-06-22)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><a
href="abdd93d554"><code>abdd93d</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/571">#571</a>
set max lengths in regex for numeric and build identifiers (<a
href="https://redirect.github.com/npm/node-semver/issues/571">#571</a>)
(<a
href="https://github.com/lukekarrys"><code>@​lukekarrys</code></a>)</li>
</ul>
<h3>Documentation</h3>
<ul>
<li><a
href="bf53dd8da1"><code>bf53dd8</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/569">#569</a>
add example for <code>&gt;</code> comparator (<a
href="https://redirect.github.com/npm/node-semver/issues/569">#569</a>)
(<a href="https://github.com/mbtools"><code>@​mbtools</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/npm/node-semver/blob/main/CHANGELOG.md">semver's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/npm/node-semver/compare/v7.5.4...v7.6.0">7.6.0</a>
(2024-01-31)</h2>
<h3>Features</h3>
<ul>
<li><a
href="a7ab13a462"><code>a7ab13a</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/671">#671</a>
preserve pre-release and build parts of a version on coerce (<a
href="https://redirect.github.com/npm/node-semver/issues/671">#671</a>)
(<a href="https://github.com/madtisa"><code>@​madtisa</code></a>,
madtisa, <a
href="https://github.com/wraithgar"><code>@​wraithgar</code></a>)</li>
</ul>
<h3>Chores</h3>
<ul>
<li><a
href="816c7b2cbf"><code>816c7b2</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/667">#667</a>
postinstall for dependabot template-oss PR (<a
href="https://github.com/lukekarrys"><code>@​lukekarrys</code></a>)</li>
<li><a
href="0bd24d943c"><code>0bd24d9</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/667">#667</a>
bump <code>@​npmcli/template-oss</code> from 4.21.1 to 4.21.3 (<a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot])</li>
<li><a
href="e521932f11"><code>e521932</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/652">#652</a>
postinstall for dependabot template-oss PR (<a
href="https://github.com/lukekarrys"><code>@​lukekarrys</code></a>)</li>
<li><a
href="8873991808"><code>8873991</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/652">#652</a>
chore: chore: postinstall for dependabot template-oss PR (<a
href="https://github.com/lukekarrys"><code>@​lukekarrys</code></a>)</li>
<li><a
href="f317dc8689"><code>f317dc8</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/652">#652</a>
bump <code>@​npmcli/template-oss</code> from 4.19.0 to 4.21.0 (<a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot])</li>
<li><a
href="7303db1fe5"><code>7303db1</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/658">#658</a>
add clean() test for build metadata (<a
href="https://redirect.github.com/npm/node-semver/issues/658">#658</a>)
(<a
href="https://github.com/jethrodaniel"><code>@​jethrodaniel</code></a>)</li>
<li><a
href="6240d75a7c"><code>6240d75</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/656">#656</a>
add missing quotes in README.md (<a
href="https://redirect.github.com/npm/node-semver/issues/656">#656</a>)
(<a href="https://github.com/zyxkad"><code>@​zyxkad</code></a>)</li>
<li><a
href="14d263faa1"><code>14d263f</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/625">#625</a>
postinstall for dependabot template-oss PR (<a
href="https://github.com/lukekarrys"><code>@​lukekarrys</code></a>)</li>
<li><a
href="7c34e1ac1b"><code>7c34e1a</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/625">#625</a>
bump <code>@​npmcli/template-oss</code> from 4.18.1 to 4.19.0 (<a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot])</li>
<li><a
href="123e0b0328"><code>123e0b0</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/622">#622</a>
postinstall for dependabot template-oss PR (<a
href="https://github.com/lukekarrys"><code>@​lukekarrys</code></a>)</li>
<li><a
href="737d5e1cf1"><code>737d5e1</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/622">#622</a>
bump <code>@​npmcli/template-oss</code> from 4.18.0 to 4.18.1 (<a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot])</li>
<li><a
href="cce61804ba"><code>cce6180</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/598">#598</a>
postinstall for dependabot template-oss PR (<a
href="https://github.com/lukekarrys"><code>@​lukekarrys</code></a>)</li>
<li><a
href="b914a3d0d2"><code>b914a3d</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/598">#598</a>
bump <code>@​npmcli/template-oss</code> from 4.17.0 to 4.18.0 (<a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot])</li>
</ul>
<h2><a
href="https://github.com/npm/node-semver/compare/v7.5.3...v7.5.4">7.5.4</a>
(2023-07-07)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><a
href="cc6fde2d34"><code>cc6fde2</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/588">#588</a>
trim each range set before parsing (<a
href="https://github.com/lukekarrys"><code>@​lukekarrys</code></a>)</li>
<li><a
href="99d8287516"><code>99d8287</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/583">#583</a>
correctly parse long build ids as valid (<a
href="https://redirect.github.com/npm/node-semver/issues/583">#583</a>)
(<a
href="https://github.com/lukekarrys"><code>@​lukekarrys</code></a>)</li>
</ul>
<h2><a
href="https://github.com/npm/node-semver/compare/v7.5.2...v7.5.3">7.5.3</a>
(2023-06-22)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><a
href="abdd93d554"><code>abdd93d</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/571">#571</a>
set max lengths in regex for numeric and build identifiers (<a
href="https://redirect.github.com/npm/node-semver/issues/571">#571</a>)
(<a
href="https://github.com/lukekarrys"><code>@​lukekarrys</code></a>)</li>
</ul>
<h3>Documentation</h3>
<ul>
<li><a
href="bf53dd8da1"><code>bf53dd8</code></a>
<a href="https://redirect.github.com/npm/node-semver/pull/569">#569</a>
add example for <code>&gt;</code> comparator (<a
href="https://redirect.github.com/npm/node-semver/issues/569">#569</a>)
(<a href="https://github.com/mbtools"><code>@​mbtools</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="377f709718"><code>377f709</code></a>
chore: release 7.6.0 (<a
href="https://redirect.github.com/npm/node-semver/issues/661">#661</a>)</li>
<li><a
href="a7ab13a462"><code>a7ab13a</code></a>
feat: preserve pre-release and build parts of a version on coerce (<a
href="https://redirect.github.com/npm/node-semver/issues/671">#671</a>)</li>
<li><a
href="816c7b2cbf"><code>816c7b2</code></a>
chore: postinstall for dependabot template-oss PR</li>
<li><a
href="0bd24d943c"><code>0bd24d9</code></a>
chore: bump <code>@​npmcli/template-oss</code> from 4.21.1 to
4.21.3</li>
<li><a
href="e521932f11"><code>e521932</code></a>
chore: postinstall for dependabot template-oss PR</li>
<li><a
href="8873991808"><code>8873991</code></a>
chore: chore: chore: postinstall for dependabot template-oss PR</li>
<li><a
href="f317dc8689"><code>f317dc8</code></a>
chore: bump <code>@​npmcli/template-oss</code> from 4.19.0 to
4.21.0</li>
<li><a
href="7303db1fe5"><code>7303db1</code></a>
chore: add clean() test for build metadata (<a
href="https://redirect.github.com/npm/node-semver/issues/658">#658</a>)</li>
<li><a
href="6240d75a7c"><code>6240d75</code></a>
chore: add missing quotes in README.md (<a
href="https://redirect.github.com/npm/node-semver/issues/656">#656</a>)</li>
<li><a
href="14d263faa1"><code>14d263f</code></a>
chore: postinstall for dependabot template-oss PR</li>
<li>Additional commits viewable in <a
href="https://github.com/npm/node-semver/compare/v7.5.2...v7.6.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `postcss` from 8.4.24 to 8.4.38
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/postcss/postcss/releases">postcss's
releases</a>.</em></p>
<blockquote>
<h2>8.4.38</h2>
<ul>
<li>Fixed <code>endIndex: 0</code> in errors and warnings (by <a
href="https://github.com/romainmenke"><code>@​romainmenke</code></a>).</li>
</ul>
<h2>8.4.37</h2>
<ul>
<li>Fixed <code>original.column are not numbers</code> error in another
case.</li>
</ul>
<h2>8.4.36</h2>
<ul>
<li>Fixed <code>original.column are not numbers</code> error on broken
previous source map.</li>
</ul>
<h2>8.4.35</h2>
<ul>
<li>Avoid <code>!</code> in <code>node.parent.nodes</code> type.</li>
<li>Allow to pass <code>undefined</code> to node adding method to
simplify types.</li>
</ul>
<h2>8.4.34</h2>
<ul>
<li>Fixed <code>AtRule#nodes</code> type (by <a
href="https://github.com/tim-we"><code>@​tim-we</code></a>).</li>
<li>Cleaned up code (by <a
href="https://github.com/DrKiraDmitry"><code>@​DrKiraDmitry</code></a>).</li>
</ul>
<h2>8.4.33</h2>
<ul>
<li>Fixed <code>NoWorkResult</code> behavior difference with normal mode
(by <a
href="https://github.com/romainmenke"><code>@​romainmenke</code></a>).</li>
<li>Fixed <code>NoWorkResult</code> usage conditions (by <a
href="https://github.com/ahmdammarr"><code>@​ahmdammarr</code></a>).</li>
</ul>
<h2>8.4.32</h2>
<ul>
<li>Fixed <code>postcss().process()</code> types (by <a
href="https://github.com/ferreira-tb"><code>@​ferreira-tb</code></a>).</li>
</ul>
<h2>8.4.31</h2>
<ul>
<li>Fixed <code>\r</code> parsing to fix CVE-2023-44270.</li>
</ul>
<h2>8.4.30</h2>
<ul>
<li>Improved source map performance (by <a
href="https://github.com/romainmenke"><code>@​romainmenke</code></a>).</li>
</ul>
<h2>8.4.29</h2>
<ul>
<li>Fixed <code>Node#source.offset</code> (by <a
href="https://github.com/idoros"><code>@​idoros</code></a>).</li>
<li>Fixed docs (by <a
href="https://github.com/coliff"><code>@​coliff</code></a>).</li>
</ul>
<h2>8.4.28</h2>
<ul>
<li>Fixed <code>Root.source.end</code> for better source map (by <a
href="https://github.com/romainmenke"><code>@​romainmenke</code></a>).</li>
<li>Fixed <code>Result.root</code> types when <code>process()</code> has
no parser.</li>
</ul>
<h2>8.4.27</h2>
<ul>
<li>Fixed <code>Container</code> clone methods types.</li>
</ul>
<h2>8.4.26</h2>
<ul>
<li>Fixed clone methods types.</li>
</ul>
<h2>8.4.25</h2>
<ul>
<li>Improve stringify performance (by <a
href="https://github.com/romainmenke"><code>@​romainmenke</code></a>).</li>
<li>Fixed docs (by <a
href="https://github.com/vikaskaliramna07"><code>@​vikaskaliramna07</code></a>).</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/postcss/postcss/blob/main/CHANGELOG.md">postcss's
changelog</a>.</em></p>
<blockquote>
<h2>8.4.38</h2>
<ul>
<li>Fixed <code>endIndex: 0</code> in errors and warnings (by <a
href="https://github.com/romainmenke"><code>@​romainmenke</code></a>).</li>
</ul>
<h2>8.4.37</h2>
<ul>
<li>Fixed <code>original.column are not numbers</code> error in another
case.</li>
</ul>
<h2>8.4.36</h2>
<ul>
<li>Fixed <code>original.column are not numbers</code> error on broken
previous source map.</li>
</ul>
<h2>8.4.35</h2>
<ul>
<li>Avoid <code>!</code> in <code>node.parent.nodes</code> type.</li>
<li>Allow to pass <code>undefined</code> to node adding method to
simplify types.</li>
</ul>
<h2>8.4.34</h2>
<ul>
<li>Fixed <code>AtRule#nodes</code> type (by Tim Weißenfels).</li>
<li>Cleaned up code (by Dmitry Kirillov).</li>
</ul>
<h2>8.4.33</h2>
<ul>
<li>Fixed <code>NoWorkResult</code> behavior difference with normal mode
(by Romain Menke).</li>
<li>Fixed <code>NoWorkResult</code> usage conditions (by <a
href="https://github.com/ahmdammarr"><code>@​ahmdammarr</code></a>).</li>
</ul>
<h2>8.4.32</h2>
<ul>
<li>Fixed <code>postcss().process()</code> types (by Andrew
Ferreira).</li>
</ul>
<h2>8.4.31</h2>
<ul>
<li>Fixed <code>\r</code> parsing to fix CVE-2023-44270.</li>
</ul>
<h2>8.4.30</h2>
<ul>
<li>Improved source map performance (by Romain Menke).</li>
</ul>
<h2>8.4.29</h2>
<ul>
<li>Fixed <code>Node#source.offset</code> (by Ido Rosenthal).</li>
<li>Fixed docs (by Christian Oliff).</li>
</ul>
<h2>8.4.28</h2>
<ul>
<li>Fixed <code>Root.source.end</code> for better source map (by Romain
Menke).</li>
<li>Fixed <code>Result.root</code> types when <code>process()</code> has
no parser.</li>
</ul>
<h2>8.4.27</h2>
<ul>
<li>Fixed <code>Container</code> clone methods types.</li>
</ul>
<h2>8.4.26</h2>
<ul>
<li>Fixed clone methods types.</li>
</ul>
<h2>8.4.25</h2>
<ul>
<li>Improve stringify performance (by Romain Menke).</li>
<li>Fixed docs (by <a
href="https://github.com/vikaskaliramna07"><code>@​vikaskaliramna07</code></a>).</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="a69d45ecae"><code>a69d45e</code></a>
Release 8.4.38 version</li>
<li><a
href="64e35d952c"><code>64e35d9</code></a>
Update dependencies</li>
<li><a
href="c1ad8fb402"><code>c1ad8fb</code></a>
Merge pull request <a
href="https://redirect.github.com/postcss/postcss/issues/1932">#1932</a>
from romainmenke/fix-warning-end-index--inventive-nu...</li>
<li><a
href="b45e7e9159"><code>b45e7e9</code></a>
fix endIndex</li>
<li><a
href="1bea2466db"><code>1bea246</code></a>
failing test: for endIndex 0 in rangeBy</li>
<li><a
href="0fd1d86f2d"><code>0fd1d86</code></a>
Add changelog auto release on Github</li>
<li><a
href="49c906ebc0"><code>49c906e</code></a>
Release 8.4.37 version</li>
<li><a
href="b5bd92ca41"><code>b5bd92c</code></a>
Fix another broken prev source map issue</li>
<li><a
href="28820396e1"><code>2882039</code></a>
Update dependencies</li>
<li><a
href="e5ad9394da"><code>e5ad939</code></a>
Release 8.4.36 version</li>
<li>Additional commits viewable in <a
href="https://github.com/postcss/postcss/compare/8.4.24...8.4.38">compare
view</a></li>
</ul>
</details>
<br />

Updates `word-wrap` from 1.2.3 to 1.2.5
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/jonschlinkert/word-wrap/releases">word-wrap's
releases</a>.</em></p>
<blockquote>
<h2>1.2.5</h2>
<p><strong>Changes</strong>:</p>
<p>Reverts default value for <code>options.indent</code> to two spaces
<code>' '</code>.</p>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/jonschlinkert/word-wrap/compare/1.2.4...1.2.5">https://github.com/jonschlinkert/word-wrap/compare/1.2.4...1.2.5</a></p>
<h2>1.2.4</h2>
<h2>What's Changed</h2>
<ul>
<li>Remove default indent by <a
href="https://github.com/mohd-akram"><code>@​mohd-akram</code></a> in <a
href="https://redirect.github.com/jonschlinkert/word-wrap/pull/24">jonschlinkert/word-wrap#24</a></li>
<li>🔒fix: CVE 2023 26115 (2) by <a
href="https://github.com/OlafConijn"><code>@​OlafConijn</code></a> in <a
href="https://redirect.github.com/jonschlinkert/word-wrap/pull/41">jonschlinkert/word-wrap#41</a></li>
<li>🔒 fix: CVE-2023-26115 by <a
href="https://github.com/aashutoshrathi"><code>@​aashutoshrathi</code></a>
in <a
href="https://redirect.github.com/jonschlinkert/word-wrap/pull/33">jonschlinkert/word-wrap#33</a></li>
<li>chore: publish workflow by <a
href="https://github.com/OlafConijn"><code>@​OlafConijn</code></a> in <a
href="https://redirect.github.com/jonschlinkert/word-wrap/pull/42">jonschlinkert/word-wrap#42</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/mohd-akram"><code>@​mohd-akram</code></a> made
their first contribution in <a
href="https://redirect.github.com/jonschlinkert/word-wrap/pull/24">jonschlinkert/word-wrap#24</a></li>
<li><a
href="https://github.com/OlafConijn"><code>@​OlafConijn</code></a> made
their first contribution in <a
href="https://redirect.github.com/jonschlinkert/word-wrap/pull/41">jonschlinkert/word-wrap#41</a></li>
<li><a
href="https://github.com/aashutoshrathi"><code>@​aashutoshrathi</code></a>
made their first contribution in <a
href="https://redirect.github.com/jonschlinkert/word-wrap/pull/33">jonschlinkert/word-wrap#33</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4">https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="207044ebda"><code>207044e</code></a>
1.2.5</li>
<li><a
href="9894315485"><code>9894315</code></a>
revert default indent</li>
<li><a
href="f64b188c72"><code>f64b188</code></a>
run verb to generate README</li>
<li><a
href="03ea08256b"><code>03ea082</code></a>
Merge pull request <a
href="https://redirect.github.com/jonschlinkert/word-wrap/issues/42">#42</a>
from jonschlinkert/chore/publish-workflow</li>
<li><a
href="420dce9a24"><code>420dce9</code></a>
Merge pull request <a
href="https://redirect.github.com/jonschlinkert/word-wrap/issues/41">#41</a>
from jonschlinkert/fix/CVE-2023-26115-2</li>
<li><a
href="bfa694edf5"><code>bfa694e</code></a>
Update .github/workflows/publish.yml</li>
<li><a
href="ace0b3c78f"><code>ace0b3c</code></a>
chore: bump version to 1.2.4</li>
<li><a
href="6fd7275946"><code>6fd7275</code></a>
chore: add publish workflow</li>
<li><a
href="30d6daf60f"><code>30d6daf</code></a>
chore: fix test</li>
<li><a
href="655929cabe"><code>655929c</code></a>
chore: remove package-lock</li>
<li>Additional commits viewable in <a
href="https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.5">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions
You can disable automated security fix PRs for this repo from the
[Security Alerts page](https://github.com/tldraw/tldraw/network/alerts).

</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Mime Čuvalo <mimecuvalo@gmail.com>
2024-05-07 14:54:56 +00:00
Mitja Bezenšek ec5eded41b
Add asset pruning when importing files (#3689)
Adds pruning of unused assets when importing files.

Pulled out the pruning logic from the exporting of tldraw files and we
now use the same logic for both cases.

### Change Type

<!--  Please select a 'Scope' label ️ -->

- [x] `sdk` — Changes the tldraw SDK
- [ ] `dotcom` — Changes the tldraw.com web app
- [ ] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [ ] `internal` — Does not affect user-facing stuff

<!--  Please select a 'Type' label ️ -->

- [ ] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [x] `improvement` — Improving existing features
- [ ] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [ ] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know

### Release Notes

- Prunes unused assets when loading a tldraw document.
2024-05-07 14:48:01 +00:00
Mitja Bezenšek b5caa53cee
Fix background color for patterned shapes. (#3708)
Background on exported patterned shapes was not the same as on the
shapes themselves. This was especially noticeable in dark mode.

I'm not sure if this is the colour we want to use as this changes the
existing shape colour. But it is in line to what we had a while back. In
any case
[generateImage](https://github.com/tldraw/tldraw/blob/main/packages/tldraw/src/lib/shapes/shared/defaultStyleDefs.tsx#L113)
should be using the same colour as
[HashPatternForExport](https://github.com/tldraw/tldraw/blob/main/packages/tldraw/src/lib/shapes/shared/defaultStyleDefs.tsx#L88).

### Before

![image](https://github.com/tldraw/tldraw/assets/2523721/2772818e-7461-4cea-a36b-c16c8206b9d5)


### After

![image](https://github.com/tldraw/tldraw/assets/2523721/2bbe189c-fa18-4198-b9b3-1851c2336cf1)


### Change Type

<!--  Please select a 'Scope' label ️ -->

- [x] `sdk` — Changes the tldraw SDK
- [ ] `dotcom` — Changes the tldraw.com web app
- [ ] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [ ] `internal` — Does not affect user-facing stuff

<!--  Please select a 'Type' label ️ -->

- [x] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [ ] `improvement` — Improving existing features
- [ ] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [ ] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know


### Test Plan

1. Add patterned shapes.
2. Copy them as SVG.
3. Paste them. They should look the same.

- [ ] Unit Tests
- [ ] End to end tests

### Release Notes

- Fixes an issue with copy pasting shapes as svg and png not correctly
working for patterned shapes.
2024-05-07 13:55:44 +00:00
Steve Ruiz ebc892a1a6
Camera options followups (#3701)
This PR adds a slideshow example (similar to @TodePond's slides but more
on rails) as a way to put some pressure on camera controls.

Along the way, it fixes some issues I found with animations and the new
camera controls.

- forced changes will continue to force through animations
- animations no longer set unnecessary additional listeners
- animations end correctly
- updating camera options does not immediately update the camera (to
allow for animations, etc.)

It also changes the location of the "in front of the canvas" element so
that it is not hidden by the hit test blocking element.

### Change Type

- [x] `sdk` — Changes the tldraw SDK
- [x] `improvement` — Improving existing features
2024-05-07 10:06:35 +00:00
Steve Ruiz fabba66c0f
Camera options (#3282)
This PR implements a camera options API.

- [x] Initial PR
- [x] Updated unit tests
- [x] Feedback / review
- [x] New unit tests
- [x] Update use-case examples
- [x] Ship?

## Public API

A user can provide camera options to the `Tldraw` component via the
`cameraOptions` prop. The prop is also available on the `TldrawEditor`
component and the constructor parameters of the `Editor` class.

```tsx
export default function CameraOptionsExample() {
	return (
		<div className="tldraw__editor">
			<Tldraw cameraOptions={CAMERA_OPTIONS} />
		</div>
	)
}
```

At runtime, a user can:
-  get the current camera options with `Editor.getCameraOptions`
-  update the camera options with `Editor.setCameraOptions`

Setting the camera options automatically applies them to the current
camera.

```ts
editor.setCameraOptions({...editor.getCameraOptions(), isLocked: true })
```

A user can get the "camera fit zoom" via `editor.getCameraFitZoom()`.

# Interface

The camera options themselves can look a few different ways depending on
the `type` provided.


```tsx
export type TLCameraOptions = {
	/** Whether the camera is locked. */
	isLocked: boolean
	/** The speed of a scroll wheel / trackpad pan. Default is 1. */
	panSpeed: number
	/** The speed of a scroll wheel / trackpad zoom. Default is 1. */
	zoomSpeed: number
	/** The steps that a user can zoom between with zoom in / zoom out. The first and last value will determine the min and max zoom. */
	zoomSteps: number[]
	/** Controls whether the wheel pans or zooms.
	 *
	 * - `zoom`: The wheel will zoom in and out.
	 * - `pan`: The wheel will pan the camera.
	 * - `none`: The wheel will do nothing.
	 */
	wheelBehavior: 'zoom' | 'pan' | 'none'
	/** The camera constraints. */
	constraints?: {
		/** The bounds (in page space) of the constrained space */
		bounds: BoxModel
		/** The padding inside of the viewport (in screen space) */
		padding: VecLike
		/** The origin for placement. Used to position the bounds within the viewport when an axis is fixed or contained and zoom is below the axis fit. */
		origin: VecLike
		/** The camera's initial zoom, used also when the camera is reset.
		 *
		 * - `default`: Sets the initial zoom to 100%.
		 * - `fit-x`: The x axis will completely fill the viewport bounds.
		 * - `fit-y`: The y axis will completely fill the viewport bounds.
		 * - `fit-min`: The smaller axis will completely fill the viewport bounds.
		 * - `fit-max`: The larger axis will completely fill the viewport bounds.
		 * - `fit-x-100`: The x axis will completely fill the viewport bounds, or 100% zoom, whichever is smaller.
		 * - `fit-y-100`: The y axis will completely fill the viewport bounds, or 100% zoom, whichever is smaller.
		 * - `fit-min-100`: The smaller axis will completely fill the viewport bounds, or 100% zoom, whichever is smaller.
		 * - `fit-max-100`: The larger axis will completely fill the viewport bounds, or 100% zoom, whichever is smaller.
		 */
		initialZoom:
			| 'fit-min'
			| 'fit-max'
			| 'fit-x'
			| 'fit-y'
			| 'fit-min-100'
			| 'fit-max-100'
			| 'fit-x-100'
			| 'fit-y-100'
			| 'default'
		/** The camera's base for its zoom steps.
		 *
		 * - `default`: Sets the initial zoom to 100%.
		 * - `fit-x`: The x axis will completely fill the viewport bounds.
		 * - `fit-y`: The y axis will completely fill the viewport bounds.
		 * - `fit-min`: The smaller axis will completely fill the viewport bounds.
		 * - `fit-max`: The larger axis will completely fill the viewport bounds.
		 * - `fit-x-100`: The x axis will completely fill the viewport bounds, or 100% zoom, whichever is smaller.
		 * - `fit-y-100`: The y axis will completely fill the viewport bounds, or 100% zoom, whichever is smaller.
		 * - `fit-min-100`: The smaller axis will completely fill the viewport bounds, or 100% zoom, whichever is smaller.
		 * - `fit-max-100`: The larger axis will completely fill the viewport bounds, or 100% zoom, whichever is smaller.
		 */
		baseZoom:
			| 'fit-min'
			| 'fit-max'
			| 'fit-x'
			| 'fit-y'
			| 'fit-min-100'
			| 'fit-max-100'
			| 'fit-x-100'
			| 'fit-y-100'
			| 'default'
		/** The behavior for the constraints for both axes or each axis individually.
		 *
		 * - `free`: The bounds are ignored when moving the camera.
		 * - 'fixed': The bounds will be positioned within the viewport based on the origin
		 * - `contain`: The 'fixed' behavior will be used when the zoom is below the zoom level at which the bounds would fill the viewport; and when above this zoom, the bounds will use the 'inside' behavior.
		 * - `inside`: The bounds will stay completely within the viewport.
		 * - `outside`: The bounds will stay touching the viewport.
		 */
		behavior:
			| 'free'
			| 'fixed'
			| 'inside'
			| 'outside'
			| 'contain'
			| {
					x: 'free' | 'fixed' | 'inside' | 'outside' | 'contain'
					y: 'free' | 'fixed' | 'inside' | 'outside' | 'contain'
			  }
	}
}
```

### Change Type

- [x] `sdk` — Changes the tldraw SDK
- [x] `feature` — New feature

### Test Plan

These features combine in different ways, so we'll want to write some
more tests to find surprises.

1. Add a step-by-step description of how to test your PR here.
2.

- [ ] Unit Tests

### Release Notes

- SDK: Adds camera options.

---------

Co-authored-by: Mitja Bezenšek <mitja.bezensek@gmail.com>
2024-05-04 17:39:04 +00:00
Mitja Bezenšek db7c3f59bf
Prevent duplicate from creating any shapes if we reach max allowed shapes (#3692)
This prevents duplicating shapes if we get to the max allowed shapes.
Before this change we would create as many shapes as we could and skip
the rest. After this change we don't create any shapes in this case.

We already do this for [copy
pasting](https://github.com/tldraw/tldraw/blob/mitja%2Fduplicate-shapes/packages/editor/src/lib/editor/Editor.ts#L7595-L7600)
(via `putContentOntoCurrentPage`), so no change was needed there.

Resolves https://github.com/tldraw/tldraw/issues/3669

### Change Type

<!--  Please select a 'Scope' label ️ -->

- [x] `sdk` — Changes the tldraw SDK
- [ ] `dotcom` — Changes the tldraw.com web app
- [ ] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [ ] `internal` — Does not affect user-facing stuff

<!--  Please select a 'Type' label ️ -->

- [ ] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [x] `improvement` — Improving existing features
- [ ] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [ ] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know


### Test Plan

1. Create close to 2000 shapes.
2. Select so many shapes that duplicating them would go over the 2000
shapes per page limit.
3. Duplicate.
4. You should not create any shapes even if there is space for some of
them.

- [ ] Unit Tests
- [ ] End to end tests

### Release Notes

- Prevent duplicating shapes if we would go over the maximum shape
limit. It's now an all or nothing operation, where as before some shapes
would get created.
2024-05-03 15:22:36 +00:00
Mime Čuvalo 68bc29f103
textfields: fix RTL layout for SVG exports (#3680)
Followup to https://github.com/tldraw/tldraw/pull/3188 (although this
problem was there before that PR)

This does more work for RTL rendering in SVG context, especially since
we position each span one-by-one.

I had to do a bit of esoteric spelunking and it turns out
[`unicode-bidi:
plaintext`](https://developer.mozilla.org/en-US/docs/Web/CSS/unicode-bidi)
solves our issue even though it isn't really recommend to be used by web
developers. Fun times 🙃

Before:
<img width="369" alt="Screenshot 2024-05-02 at 11 45 44"
src="https://github.com/tldraw/tldraw/assets/469604/df55e03a-4760-4b8f-adad-ed1a8c13ad51">


After:
<img width="365" alt="Screenshot 2024-05-02 at 11 54 48"
src="https://github.com/tldraw/tldraw/assets/469604/3339bbf4-041a-4fdf-8b6e-6fa19dfb0a9e">




### Change Type

<!--  Please select a 'Scope' label ️ -->

- [x] `sdk` — Changes the tldraw SDK
- [ ] `dotcom` — Changes the tldraw.com web app
- [ ] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [ ] `internal` — Does not affect user-facing stuff

<!--  Please select a 'Type' label ️ -->

- [x] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [ ] `improvement` — Improving existing features
- [ ] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [ ] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know


### Test Plan

1. Test LTR text.
2. Test RTL text.
3. Test mixed LTR/RTL on different lines.

- [ ] Unit Tests
- [x] End to end tests

### Release Notes

- [Add a brief release note for your PR here.](textfields: fix RTL
layout for SVG exports)

---------

Co-authored-by: huppy-bot[bot] <128400622+huppy-bot[bot]@users.noreply.github.com>
2024-05-03 13:40:59 +00:00
Mitja Bezenšek c308cc2edd
Prevent unnecessary fetching of readonly slugs (#3663)
Prevents unnecessary fetching of readonly slugs. We only need to fetch
it if we don't have it yet.

There was also a weird issue with `window.location.href` sometimes
returning encoded search params and sometimes decoded ones:


![image](https://github.com/tldraw/tldraw/assets/2523721/ca1e36c6-5e86-4e48-9350-c53de32a9f2e)

This then caused an additional fetch in the `setInterval` since the
[urls did not
match](https://github.com/tldraw/tldraw/blob/main/apps/dotcom/src/components/ShareMenu.tsx#L140).

![CleanShot 2024-04-30 at 14 37
12](https://github.com/tldraw/tldraw/assets/2523721/b1c540aa-902a-4574-a8e7-a0507f7dbda2)

Resolves https://github.com/tldraw/tldraw/issues/3661

### Change Type

<!--  Please select a 'Scope' label ️ -->

- [ ] `sdk` — Changes the tldraw SDK
- [x] `dotcom` — Changes the tldraw.com web app
- [ ] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [ ] `internal` — Does not affect user-facing stuff

<!--  Please select a 'Type' label ️ -->

- [ ] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [x] `improvement` — Improving existing features
- [ ] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [ ] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know


### Test Plan

1. Open a multiplayer room. You should only see one fetch for the
readonly slug.

1. Open a local room.
2. Share it. You should only see one fetch for the readonly slug.

- [ ] Unit Tests
- [ ] End to end tests

### Release Notes

- Prevent unnecessary fetching of readonly slugs.
2024-05-03 10:47:58 +00:00
Mitja Bezenšek 1366a15b7a
VS Code 2.0.33 (#3687)
VS Code version bump.

As I mentioned in the standup there's a slight issue with VS Code
releases. We usually do a release, after that I create a VS Code
extension release (bump the package version, add the changelog). Which
means that if we then do a hotfix it does not have these changes as they
were added after a deploy.

So for this hotfix I did the following:
- checked out `hotfixes` branch
- created a new branch
- bumped package.json version and added change log
- committed it to the branch
- created a vs code extension package and published it
I don't think it makes sense to merge it back to hotfixes branch as it
would just create a new deploy with no changes.

Next I created this PR to get the changes to `main`.
- went to `main`
- created this branch from there and cherry picked the commit created
above

### Change Type

<!--  Please select a 'Scope' label ️ -->

- [ ] `sdk` — Changes the tldraw SDK
- [ ] `dotcom` — Changes the tldraw.com web app
- [ ] `docs` — Changes to the documentation, examples, or templates.
- [x] `vs code` — Changes to the vscode plugin
- [ ] `internal` — Does not affect user-facing stuff

<!--  Please select a 'Type' label ️ -->

- [ ] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [ ] `improvement` — Improving existing features
- [x] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [ ] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know
2024-05-03 10:04:15 +00:00
David Sheldrick 9210655eec
delete stray error screen css import (#3683)
Removes a stray .css import from #3673 , which created some precedence
issues

### Change Type

<!--  Please select a 'Scope' label ️ -->

- [ ] `sdk` — Changes the tldraw SDK
- [x] `dotcom` — Changes the tldraw.com web app
- [ ] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [ ] `internal` — Does not affect user-facing stuff

<!--  Please select a 'Type' label ️ -->

- [x] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [ ] `improvement` — Improving existing features
- [ ] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [ ] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know


### Test Plan

1. Add a step-by-step description of how to test your PR here.
2.

- [ ] Unit Tests
- [ ] End to end tests

### Release Notes

- Add a brief release note for your PR here.
2024-05-02 14:53:40 +00:00
David Sheldrick 623788c2db
Fix viewport following (#3681)
This was my bad after refactoring how the viewport following stuff used
store queries.

### Change Type

<!--  Please select a 'Scope' label ️ -->

- [x] `sdk` — Changes the tldraw SDK
- [ ] `dotcom` — Changes the tldraw.com web app
- [ ] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [ ] `internal` — Does not affect user-facing stuff

<!--  Please select a 'Type' label ️ -->

- [x] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [ ] `improvement` — Improving existing features
- [ ] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [ ] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know


### Test Plan

1. Add a step-by-step description of how to test your PR here.
2.

- [ ] Unit Tests
- [ ] End to end tests

### Release Notes

- Fixes an issue where viewport following was not working
2024-05-02 13:54:41 +00:00
David Sheldrick f2827f6409
Allow clients to gracefully handle rejection (#3673)
This PR fixes the issue where sync clients would get into a reconnect
loop after being rejected by the sync server.

- Close the socket when in the error state (see useRemoteSyncClient)
- Show a 'plx refresh the page' screen that doesn't have a sad face on
it.
  
<img width="665" alt="image"
src="https://github.com/tldraw/tldraw/assets/1242537/96025fa3-cc20-4f53-8f58-74e473e16702">

- If older clients who can't handle rejection well need to be rejected
(e.g. due to a store migration being added) then we send them to a
special purgatory where the canvas goes blank and it shows the offline
indicator but the websocket connection stays open and it won't try to
reconnect.

### Change Type

- [x] `dotcom` — Changes the tldraw.com web app
- [x] `bugfix` — Bug fix


### Test Plan

1. Gonna manually test this one by doing sneaky deploys to a test PR
2024-05-02 13:54:21 +00:00
Lu Wilson e999316691
Lokalise: Translations update (#3665)
This pull request was initiated by Lokalise (user Mitja) at 2024-04-30
15:15:53

- [x] sdk
- [x] chore

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2024-05-02 12:41:32 +00:00
David Sheldrick ffe3e7602c
don't render the minimap if it fails to initialize the gl context (#3679)
So far 33 people have had tldraw crash due to getContext('webgl2')
returning null for some reason. Maybe it's to do with what kind of
graphics hardware they have available.

This PR adds a stopgap measure wherein the minimap manager just fails to
render anything on the canvas element instead of crashing the app.
Ideally we'd have better UX around this but that can wait.

I'm gonna hotfix this to dotcom.

### Change Type

<!--  Please select a 'Scope' label ️ -->

- [x] `sdk` — Changes the tldraw SDK
- [ ] `dotcom` — Changes the tldraw.com web app
- [ ] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [ ] `internal` — Does not affect user-facing stuff

<!--  Please select a 'Type' label ️ -->

- [x] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [ ] `improvement` — Improving existing features
- [ ] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [ ] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know
2024-05-02 11:20:02 +00:00
Steve Ruiz 9ba4f7cf2a
Fix className.includes bug (#3672)
This PR (should) fix a Sentry bug:
https://tldraw.sentry.io/share/issue/c4cda01be5d142b79136e8ae97a7a3a7/

### Change Type

- [x] `sdk` — Changes the tldraw SDK
- [x] `bugfix` — Bug fix

### Release Notes

- Fixes a rare bug effecting text shapes on mobile.
2024-05-01 10:43:27 +00:00
Eswar Prasad Clinton. A 06be91b97b
Fix link in collaboration documentation (#3662)
Describe what your pull request does. If appropriate, add GIFs or images
showing the before and after.

### Change Type

<!--  Please select a 'Scope' label ️ -->

- [ ] `sdk` — Changes the tldraw SDK
- [ ] `dotcom` — Changes the tldraw.com web app
- [x] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [ ] `internal` — Does not affect user-facing stuff

<!--  Please select a 'Type' label ️ -->

- [x] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [ ] `improvement` — Improving existing features
- [ ] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [ ] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know


### Test Plan

1. Add a step-by-step description of how to test your PR here.
2.

- [ ] Unit Tests
- [ ] End to end tests

### Release Notes

- Add a brief release note for your PR here.
2024-04-30 14:03:18 +00:00
David Sheldrick e4053a392c
[signia] perf thing again (#3645)
Will explain tomorrow

### Change Type

<!--  Please select a 'Scope' label ️ -->

- [x] `sdk` — Changes the tldraw SDK
- [ ] `dotcom` — Changes the tldraw.com web app
- [ ] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [ ] `internal` — Does not affect user-facing stuff

<!--  Please select a 'Type' label ️ -->

- [ ] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [x] `improvement` — Improving existing features
- [ ] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [ ] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know


### Test Plan

1. Add a step-by-step description of how to test your PR here.
2.

- [ ] Unit Tests
- [ ] End to end tests

### Release Notes

- Add a brief release note for your PR here.
2024-04-30 13:44:52 +00:00
Mitja Bezenšek b431c854b3
VS Code 2.0.32 (#3664)
Version bump.

### Change Type

<!--  Please select a 'Scope' label ️ -->

- [ ] `sdk` — Changes the tldraw SDK
- [ ] `dotcom` — Changes the tldraw.com web app
- [ ] `docs` — Changes to the documentation, examples, or templates.
- [x] `vs code` — Changes to the vscode plugin
- [ ] `internal` — Does not affect user-facing stuff

<!--  Please select a 'Type' label ️ -->

- [ ] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [ ] `improvement` — Improving existing features
- [x] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [ ] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know

### Release Notes

- VS Code release.
2024-04-30 13:03:27 +00:00
Mohammad Kazemi 085c3e5498
Fix textbox direction when it contains both RTL and LTR languages (#3188)
**Beofre:**

1. In a text box, text direction was set to Left-to-Right, regardless of
the text language.



**After:**
1. Text box direction is set to auto, so that it matches the direction
of text language.
2. Text dir is set to auto for each line of the text. To achieve this,
each line of text is now put in separated `<span>` tags with
`dir="auto"`.


![Screenshot_20240318_152725](https://github.com/tldraw/tldraw/assets/18334056/bfa8dd11-a2d1-46d0-b205-7a192c403fcd)


Note: Without putting each line of text into separated `<span>` tags,
whole text direction was in direction of initial line text. So each line
of text is now wrapped into separate tags.

### Change Type

<!--  Please select a 'Scope' label ️ -->

- [ ] `sdk` — Changes the tldraw SDK
- [x] `dotcom` — Changes the tldraw.com web app
- [ ] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [ ] `internal` — Does not affect user-facing stuff

<!--  Please select a 'Type' label ️ -->

- [x] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [x] `improvement` — Improving existing features
- [ ] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [ ] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know


### Test Plan

Enter a text right-to-left and left-to-right into textboxes and note the
change of direction by clicking outside of the box, before and after
this PR.

### Release Notes

Fix textbox direction when it contains both RTL and LTR languages

---------

Co-authored-by: Mime Čuvalo <mimecuvalo@gmail.com>
Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2024-04-30 11:30:43 +00:00
Mime Čuvalo 06509bf028
embed: prevent nested tldraw (#3659)
don't allow infinite nesting :)

<img width="1072" alt="Screenshot 2024-04-30 at 12 02 41"
src="https://github.com/tldraw/tldraw/assets/469604/fcb29ac8-5bde-4ff4-8c40-f093ab519c56">


### Change Type

<!--  Please select a 'Scope' label ️ -->

- [x] `sdk` — Changes the tldraw SDK
- [ ] `dotcom` — Changes the tldraw.com web app
- [ ] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [ ] `internal` — Does not affect user-facing stuff

<!--  Please select a 'Type' label ️ -->

- [x] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [ ] `improvement` — Improving existing features
- [ ] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [ ] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know


### Release Notes

- Embeds: Fix infinite nesting of tldraw rooms.
2024-04-30 11:15:17 +00:00
alex 8ba46fef49
fix undo/redo issues (#3658)
Fix some issues with the new undo/redo system - there were a few things
that were undoable that shouldn't be, and a few things that weren't but
should

### Change Type


- [x] `sdk` — Changes the tldraw SDK
- [x] `bugfix` — Bug fix
2024-04-30 11:01:39 +00:00
Steve Ruiz 29b6407cdc
Hacky fix safari transparency (#3657)
This PR fixes the missing viewport on Safari. Blending on webgl in
Safari is cursed.

### Change Type

- [x] `sdk` — Changes the tldraw SDK
- [x] `feature` — New feature
2024-04-30 10:47:17 +00:00
Lu Wilson 46a97dfe3d
fix android long press changing cursor to non-coarse (#3656)
### Change Type

<!--  Please select a 'Scope' label ️ -->

- [ ] `sdk` — Changes the tldraw SDK
- [x] `dotcom` — Changes the tldraw.com web app
- [ ] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [ ] `internal` — Does not affect user-facing stuff

<!--  Please select a 'Type' label ️ -->

- [x] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [ ] `improvement` — Improving existing features
- [ ] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [ ] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know


### Test Plan

1. Open a multip;ayer room on android chrome
2. Long press
3. Make sure coarse pointer isnt there

- [ ] Unit Tests
- [ ] End to end tests

### Release Notes

- Add a brief release note for your PR here.
2024-04-30 10:44:45 +00:00
Steve Ruiz d3fe2d06e0
Fix missing icons (#3654)
Fix more missing icons.

### Change Type

- [x] `sdk` — Changes the tldraw SDK
- [x] `bugfix` — Bug fix
2024-04-30 10:39:53 +00:00
Lu Wilson 71befbba82
Lokalise: Translations update (#3649)
This pull request was initiated by Lokalise (user Lu) at 2024-04-30
10:52:40
2024-04-30 10:23:23 +00:00
David Sheldrick c9e1238f2d
[bugfix] don't crash if a bound shape doesn't exist (#3653)
We saw this in r/ok

- somehow an arrow was created where the boundShapeId was pointing to a
shape that doesn't exist
- we do need to be tolerant of such situations until our server can
enforce binding constraints
- so let's not use `!` here

### Change Type

<!--  Please select a 'Scope' label ️ -->

- [x] `sdk` — Changes the tldraw SDK
- [x] `dotcom` — Changes the tldraw.com web app
- [ ] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [ ] `internal` — Does not affect user-facing stuff

<!--  Please select a 'Type' label ️ -->

- [x] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [ ] `improvement` — Improving existing features
- [ ] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [ ] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know


### Test Plan

I copied the data from `/r/ok` and loaded it and this fixed the error
 
### Release Notes

- fixes an edge case in multiplayer rooms where the room can crash if an
arrow's bound shape is deleted by a peer
2024-04-30 10:18:59 +00:00
Steve Ruiz 5ab285fb85
Fix missing icon (#3652)
This PR fixes the missing icon for checkbox-empty.

### Change Type

- [x] `sdk` — Changes the tldraw SDK
- [x] `bugfix` — Bug fix

### Test Plan

1. Open the page menu
2. Create a new page
3. Should be no missing icon
2024-04-30 10:17:27 +00:00
Steve Ruiz 0c68317885
Update template versions to latest (#3646)
This PR bumps the template versions to latest.

### Change Type

- [x] `internal` — Does not affect user-facing stuff
- [x] `bugfix` — Bug fix
2024-04-30 10:12:58 +00:00
Steve Ruiz 932bbf0b1e
3d example (#3647)
This PR adds a little example of using 3D transforms in tldraw.

![Kapture 2024-04-30 at 09 52
18](https://github.com/tldraw/tldraw/assets/23072548/c7620384-629b-4914-a842-5783591c9a3a)

### Change Type

- [x] `docs`
- [x] `improvement`
2024-04-30 09:24:07 +00:00
Mime Čuvalo 487addd2e8
embed: allow embeds like YouTube to link back to its site (#3609)
Fixes https://github.com/tldraw/tldraw/issues/3593

(some drive-by spelling/grammar cleanup)

### Change Type

<!--  Please select a 'Scope' label ️ -->

- [x] `sdk` — Changes the tldraw SDK
- [ ] `dotcom` — Changes the tldraw.com web app
- [ ] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [ ] `internal` — Does not affect user-facing stuff

<!--  Please select a 'Type' label ️ -->

- [x] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [ ] `improvement` — Improving existing features
- [ ] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [ ] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know


### Release Notes

- Embeds: fix being able to click on links that go back to the embed's
site (e.g. YouTube)

---------

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2024-04-29 21:25:32 +00:00
Steve Ruiz b8afbb4c43
Improve pressure-detection logic in drawing (#3639)
This PR improves handling of pressure in the draw tool. While we
differentiate between pen and not-pen in the pointer type, there are
not-pen type inputs like styluses that present as "mouse" inputs. This
PR makes the freehand options for these inputs more pen-like so that
they benefit from the dialing-in of options for pressure-using devices.

### Change Type

- [x] `sdk` — Changes the tldraw SDK
- [x] `improvement` — Improving existing features

### Test Plan

1. Use pen inputs
2. Use mouse inputs
3. Use stylus inputs

- [x] Unit Tests

### Release Notes

- Improves handling of mouse-type devices that support pressure, e.g.
wacom tablets. They now use the same freehand options as true pen-type
inputs.
2024-04-29 20:43:16 +00:00
Mime Čuvalo bf42d6e2a9
copy/paste: fix pasting not working from Edit menu (#3623)
Looks like this has been broken for a while actually. I spelunked into
the history of git blame around why we needed this but can't find when
it was added easily. (maybe it was in brivate?)

I don't _think_ we need the menu check anymore but lemme know if there's
something I'm missing here @steveruizok

### Change Type

<!--  Please select a 'Scope' label ️ -->

- [x] `sdk` — Changes the tldraw SDK
- [ ] `dotcom` — Changes the tldraw.com web app
- [ ] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [ ] `internal` — Does not affect user-facing stuff

<!--  Please select a 'Type' label ️ -->

- [x] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [ ] `improvement` — Improving existing features
- [ ] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [ ] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know


### Release Notes

- Clipboard: fix pasting from the Edit menu.
2024-04-29 14:10:05 +00:00
Mime Čuvalo 4da28a0ddd
textfields: for unfilled geo shapes fix edit->edit (#3577)
We need to treat unfilled geo shapes as hollow to click 'through' them.

Before:


https://github.com/tldraw/tldraw/assets/469604/bf7b520c-c6f5-41cd-88e9-b020fe0ebb32



After:


https://github.com/tldraw/tldraw/assets/469604/e39d9bcf-2b94-46d5-ace4-8a1053b2ee81




### Change Type

<!--  Please select a 'Scope' label ️ -->

- [x] `sdk` — Changes the tldraw SDK
- [ ] `dotcom` — Changes the tldraw.com web app
- [ ] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [ ] `internal` — Does not affect user-facing stuff

<!--  Please select a 'Type' label ️ -->

- [x] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [ ] `improvement` — Improving existing features
- [ ] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [ ] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know

### Release Notes

- Text labels: fix edit→edit not working as expected when unfilled geo
shapes are on 'top' of other shapes.
2024-04-29 13:51:12 +00:00
Mitja Bezenšek c0b192033e
Allow embedding tldraw in iframes (#3640)
Allow embedding tldraw in frames, but only certain contexts. For
example, we don't allow local rooms.

### Change Type

<!--  Please select a 'Scope' label ️ -->

- [ ] `sdk` — Changes the tldraw SDK
- [x] `dotcom` — Changes the tldraw.com web app
- [ ] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [ ] `internal` — Does not affect user-facing stuff

<!--  Please select a 'Type' label ️ -->

- [ ] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [x] `improvement` — Improving existing features
- [ ] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [ ] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know


### Release Notes

- Allow embedding tldraw inside iframes again.
2024-04-29 13:27:37 +00:00
Steve Ruiz 5601d0ee22
Separate text-align property for shapes (#3627)
This PR creates a new "text align" property for text shapes. Its default
is left align.

This means that text shapes now have their own alignment prop, separate
from the vertical / horizontal alignment used in labels.

The style panel for text has no visual change:

<img width="400" alt="image"
src="https://github.com/tldraw/tldraw/assets/23072548/aac80d2a-a069-4388-870b-1e0917d88eda">

The style panel for labels has consistent icons for label position:

<img width="487" alt="image"
src="https://github.com/tldraw/tldraw/assets/23072548/0adf7f0e-8446-4d3e-b9ea-a61e43035207">

Both may be configured separately.

<img width="458" alt="image"
src="https://github.com/tldraw/tldraw/assets/23072548/698dcfac-6eb2-4a8c-afb8-d1e5761019ef">


# Icon refresh

This PR also removes many unused icons.

It adds a special toggle icon for the context menu.

<img width="571" alt="image"
src="https://github.com/tldraw/tldraw/assets/23072548/489551e6-a370-4528-9ad4-8f93e119f26b">
<img width="492" alt="image"
src="https://github.com/tldraw/tldraw/assets/23072548/cd3d77c7-8bae-4369-8b53-ca4685b2fd0e">


### Change Type

- [x] `sdk` — Changes the tldraw SDK
- [x] `improvement` — Improving existing features

### Test Plan

1. Load files.
2. Paste excalidraw content.
3. Load v1 files.
4. Use the app as usual.

- [x] Unit Tests

### Release Notes

- Separates the text align property for text shapes and labels.

---------

Co-authored-by: huppy-bot[bot] <128400622+huppy-bot[bot]@users.noreply.github.com>
2024-04-29 10:58:15 +00:00
Steve Ruiz 79ca14454e
Fix text resizing with alt key (#3632)
This PR fixes a bug where alt-dragging the left or right handles of a
text shape would not produce the correct outcome: the width would double
but the center would change.

![Kapture 2024-04-28 at 13 48
52](https://github.com/tldraw/tldraw/assets/23072548/ad339a57-4efd-4201-86bc-c03a379f7e0c)

This is because the text shape is aspect ratio locked only when dragging
handles other than the left or right, but we didn't have the ability to
differentiate between that. We've had to add that optionality in,
together with a hard-coded override of the normal behavior for text
shapes.

### Change Type

- [x] `sdk` — Changes the tldraw SDK
- [x] `bugfix` — Bug fix

### Test Plan

1. Resize text.
2. Resize text with the alt key held.

- [x] Unit Tests

### Release Notes

- Fixed a bug with resizing text shapes from the left and right while
holding alt.
2024-04-29 10:43:02 +00:00
Steve Ruiz 0d0d38361d
Don't hover locked shapes (#3575)
This PR:
- updates `getHoveredId` to `getHoveredShapeId`
- adds an option to ignore locked shapes to `Editor.getShapeAtPoint`.

### Change Type

- [x] `sdk` — Changes the tldraw SDK
- [x] `improvement` — Improving existing features

### Test Plan

1. Put two shapes on top of eachother
2. Lock the top shape
3. Hover the shape
4. The bottom shape should be hovered
5. Right click
6. The top shape should be selected 

- [x] Unit tests

### Release Notes

- Fixed a bug with locked shapes being hoverable.
2024-04-27 17:30:24 +00:00
fakerr 8c0e3c7f93
Add desmos graph embed type (#3608)
I added a new embed type, for desmos graphing calculator
(https://www.desmos.com/calculator) that uses their supported embed URL.
I added an icon, the new embed shape, and created tests for it.


https://github.com/tldraw/tldraw/assets/111339712/acc1a6b0-2551-4f25-8f85-20e6f829930e


### Change Type

<!--  Please select a 'Scope' label ️ -->

- [ ] `sdk` — Changes the tldraw SDK
- [x] `dotcom` — Changes the tldraw.com web app
- [ ] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [ ] `internal` — Does not affect user-facing stuff

<!--  Please select a 'Type' label ️ -->

- [ ] `bugfix` — Bug fix
- [x] `feature` — New feature
- [ ] `improvement` — Improving existing features
- [ ] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [x] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know


### Test Plan

1. Add links for desmos graphing calculator (e.g.
https://www.desmos.com/calculator/4wa2im6u31) by either pasting or using
the insert embed menu.

### Release Notes

- (feature) add desmos embed

---------

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2024-04-27 12:30:58 +00:00
Taha 7442456d85
Make coarse pointer check dynamic (#3572)
When a device has both a touch screen and a mouse, pointer: coarse
evaluates to false and then doesn't change even if the user begins to
use the touch screen.

In this PR pointer: coarse is replaced with any-pointer: coarse, which
checks if a touchscreen input is available. Event listeners for
touchstart and mousemove update isCoursePointer dynamically. So if the
user begins to move the mouse it changes to pointer: fine, if they then
touch the screen the pointer is returned to coarse.


https://github.com/tldraw/tldraw/assets/98838967/fb86bb44-ec11-4161-bb2f-0e8c3ee83eb6



### Change Type

<!--  Please select a 'Scope' label ️ -->

- [ ] `sdk` — Changes the tldraw SDK
- [x] `dotcom` — Changes the tldraw.com web app
- [ ] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [ ] `internal` — Does not affect user-facing stuff

<!--  Please select a 'Type' label ️ -->

- [ ] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [x] `improvement` — Improving existing features
- [ ] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [ ] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know


### Test Plan

1. Load tldraw on a device with both coarse and fine pointer inputs
avaiable (e.g. an ipad with a keyboard and trackpad)
2. Switch between using the mouse and touch screen.
3. Handles on shapes should update dynamically. 

### Release Notes

- Add a brief release note for your PR here.

---------

Co-authored-by: Mime Čuvalo <mimecuvalo@gmail.com>
Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2024-04-27 11:14:23 +00:00
Mime Čuvalo 608f0210a0
examples: add filter input (#3625)
This was @Taha-Hassan-Git 's idea originally but I thought it wasn't
necessary at the time (with our much shorter list of examples just a
couple months ago!). I think now that we have a plethora of examples
that @Taha-Hassan-Git 's original instinct here was correct and we
should a filter box.

<img width="255" alt="Screenshot 2024-04-26 at 15 22 08"
src="https://github.com/tldraw/tldraw/assets/469604/1eabc04e-c4d0-414d-881c-7ca965dbd6a3">


### Change Type

<!--  Please select a 'Scope' label ️ -->

- [ ] `sdk` — Changes the tldraw SDK
- [ ] `dotcom` — Changes the tldraw.com web app
- [x] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [ ] `internal` — Does not affect user-facing stuff

<!--  Please select a 'Type' label ️ -->

- [ ] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [x] `improvement` — Improving existing features
- [ ] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [ ] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know

### Release Notes

- Examples: add a filter box.
2024-04-27 11:13:38 +00:00
Mime Čuvalo a771549670
stickies: make pit/pack distance the same (#3606)
Tweak default gap value to be consistent with sticky note gaps.
Fixes https://github.com/tldraw/tldraw/issues/3591

### Change Type

<!--  Please select a 'Scope' label ️ -->

- [x] `sdk` — Changes the tldraw SDK
- [ ] `dotcom` — Changes the tldraw.com web app
- [ ] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [ ] `internal` — Does not affect user-facing stuff

<!--  Please select a 'Type' label ️ -->

- [x] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [ ] `improvement` — Improving existing features
- [ ] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [ ] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know


### Release Notes

- Shapes: tweak default gap value to be consistent with sticky note
gaps.
2024-04-27 11:12:35 +00:00
Mime Čuvalo c9af23c921
make route prefixes have a single place where they are defined (#3624)
This is for maintainabilty of the paths. It's hard to track down all the
places where a route is being referenced. This helps unify them so that
it's easily searchable in the codebase. This came up during the readonly
room refactor and being able to find the way a particular route was
wired through the codebase.

### Change Type

<!--  Please select a 'Scope' label ️ -->

- [x] `sdk` — Changes the tldraw SDK
- [ ] `dotcom` — Changes the tldraw.com web app
- [ ] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [ ] `internal` — Does not affect user-facing stuff

<!--  Please select a 'Type' label ️ -->

- [ ] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [ ] `improvement` — Improving existing features
- [x] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [ ] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know
2024-04-27 10:57:55 +00:00
Mitja Bezenšek de55259c92
Fix an issue with the minimap (#3617)
In some cases (when you clicked close to the current viewport area) the
minimap would not change the camera position. This is because the
`clampedPoint` calculation would offset the clicked position slightly
and then the `clampedPoint` would land inside the currently viewport.

With this change we will treat every click outside of the viewport (but
still within allowed bounds) as a change that requires use to change the
camera position.

Before


https://github.com/tldraw/tldraw/assets/2523721/ded202d1-94d7-4b40-ba77-45d283e4fa60

After


https://github.com/tldraw/tldraw/assets/2523721/2ccee77d-ec0e-4997-b51d-c14676657a94


### Change Type

<!--  Please select a 'Scope' label ️ -->

- [ ] `sdk` — Changes the tldraw SDK
- [ ] `dotcom` — Changes the tldraw.com web app
- [ ] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [x] `internal` — Does not affect user-facing stuff

<!--  Please select a 'Type' label ️ -->

- [x] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [ ] `improvement` — Improving existing features
- [ ] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [ ] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know


### Test Plan

1. Use minimap in various ways to make sure it still works correctly.
The change targets the `pointerDown` event, but I did also refactor one
method that is also used by double click so it makes sense to test that
as well. Make sure you are not double clicking since we don't use the
same logic there.

- [ ] Unit Tests
- [ ] End to end tests

### Release Notes

- Fixes clicking on the minimap when we clicked just slightly outside of
the current viewport.
2024-04-26 13:00:43 +00:00
Mitja Bezenšek 029116fefd
Fix an issue with minimap. (#3621)
Fixes an issue where minimap would sometimes completely bug out. The
problem was when you resized the window height. We only had resize
observer for the minimap's canvas element, but we were missing the
observer for the window / container. This caused an issue with
[calculating the minimap page
point](https://github.com/tldraw/tldraw/blob/mitja%2Ffix-minimap-when-resizing-window/packages/tldraw/src/lib/ui/components/Minimap/MinimapManager.ts#L153)
via `getMinimapPagePoint`. They y coordinate would get incorrectly
calculated.

Before


https://github.com/tldraw/tldraw/assets/2523721/ecf4c860-0aa2-46ac-8b90-964bff7f04b3

After


https://github.com/tldraw/tldraw/assets/2523721/38047877-7657-45cf-89b1-31ac0c47228c



Resolves https://github.com/tldraw/tldraw/issues/3589

### Change Type

<!--  Please select a 'Scope' label ️ -->

- [x] `sdk` — Changes the tldraw SDK
- [ ] `dotcom` — Changes the tldraw.com web app
- [ ] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [ ] `internal` — Does not affect user-facing stuff

<!--  Please select a 'Type' label ️ -->

- [x] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [ ] `improvement` — Improving existing features
- [ ] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [ ] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know


### Test Plan

1. Insert some shapes.
2. Now open dev panel below or change the height of the window.
3. Use the minimap. It should no longer bug out.

- [ ] Unit Tests
- [ ] End to end tests

### Release Notes

- Fixes an issue with the minimap bugging out after you change the
window's height.
2024-04-26 08:50:08 +00:00
alex e03328faf3
delete untracked api.json and stale api-report.md files (#3619)
We don't need these

### Change Type
- [x] `internal` — Does not affect user-facing stuff
- [x] `chore` — Updating dependencies, other boring stuff
2024-04-25 17:27:28 +00:00
Mitja Bezenšek 77f19ccf8e
Bring back `/r` (#3615)
Went for straight up loading of `new` page instead of a redirect, so we
don't have a few redirects in a row (`/r` -> `/new` -> `r/something`.

### Change Type

<!--  Please select a 'Scope' label ️ -->

- [ ] `sdk` — Changes the tldraw SDK
- [x] `dotcom` — Changes the tldraw.com web app
- [ ] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [ ] `internal` — Does not affect user-facing stuff

<!--  Please select a 'Type' label ️ -->

- [ ] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [x] `improvement` — Improving existing features
- [ ] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [ ] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know


### Release Notes

- Brings back `/r` route for creating new rooms.
2024-04-25 15:27:33 +00:00
alex f78719b054
Expose migrations, validators, and versions from tlschema (#3613)
Previously, we weren't exporting migrations & validators for our default
shapes. This meant that it wasn't possible to make your own tlschema
with both our default shapes and some of your own (e.g. for custom
multiplayer). This fixes that by exposing all the migrations,
validators, and versions from tlschema.

### Change Type
- [x] `sdk` — Changes the tldraw SDK
- [x] `bugfix` — Bug fix
2024-04-25 14:31:26 +00:00
Mitja Bezenšek 15dd56a75e
Readonly / room creation omnibus (#3192)
Reworks how the readonly urls work. Till now we just used a simple
function that would scramble the slugs. Now we use a proper key value
mapping between regular and readonly slugs:

- We use two KV stores. One is for going from a slug to a readonly slug
and the other one for going the other way around. They are populated at
the same time.
- We separate preview KV stores (dev, preview, staging) from production
one. I've already created these on Cloudflare. [My understanding is
](https://developers.cloudflare.com/kv/reference/data-security/#encryption-at-rest)that
ids [can be
public](https://community.cloudflare.com/t/is-it-safe-to-keep-kv-ids-in-a-public-git-repo/517387/4)
since we can only access KV from our worker. Happy to move them to env
variables though.

- [x] Disable creating new rooms when tldraw is embedded inside iframes
on other websites (we check the referrer and if it's not the same as the
iframe's origin we don't allow it)
- [x] Fork a project when inside an iframe now opens the forked project
on tldraw.com and not inside iframe.
- [x] We allow embeding of iframes, but we now track the where they are
used via the referrer. We send this to Vercel analytics.
- [x] Improved UX of the share menu to make it less confusing. Toggle is
gone.
- [x]  `/new` and `/r` routes not redirect to `/`.
- [x] This introduces a new `/ro` route for readonly rooms. Legacy rooms
still live on `/v`.
- [x] Brought back `dotcom-shared` project to share code between BE and
FE. Mostly types.
- [x] Prevent creating of rooms by entering `/r/non-existing-slug`. 
- [x] Handle getting a readonly slug for old rooms. Added a comment
about it
[here](https://github.com/tldraw/tldraw/pull/3192/files#diff-c0954b3dc71bb7097c39656441175f3238ed60cf5cee64077c06e21da82182cbR17-R18).
- [x] We no longer expose editor on the window object for readonly
rooms. Prevents the users disabling readonly rooms manually.

### Change Type

<!--  Please select a 'Scope' label ️ -->

- [ ] `sdk` — Changes the tldraw SDK
- [x] `dotcom` — Changes the tldraw.com web app
- [ ] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [ ] `internal` — Does not affect user-facing stuff

<!--  Please select a 'Type' label ️ -->

- [ ] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [x] `improvement` — Improving existing features
- [ ] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [ ] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know


### Test Plan
1. Make sure old readonly rooms still work.
2. Creating a readonly link from an existing room should still use `/v`
path.
3. Newly created rooms should use `/ro` path for readonly rooms. Make
sure these work as well.
4. `/r` room was disabled and redirects to `/`
5. `/new` should still work when not inside iframes.

- [x] Unit Tests
- [ ] End to end tests

### Release Notes


1. This adds new functionality for readonly rooms:
- We have a new route `/ro` for newly created readonly rooms. These
rooms no longer use the scrambling logic to create readonly slugs.
Instead we now use KV storage from cloudflare to track the mapping for
slugs -> readonly slug and readonly slug -> slug.
- The old route `/v` is preserved, so that the old room still work as
they did before.
- For old rooms we will keep on generating the old readonly slugs, but
for new rooms we'll start using the new logic.
2. We no longer prevent embedding of tldraw inside iframes. 
3. We do prevent generating new rooms from inside the iframes though.
`/r`, `/new`, `/r/non-existing-id` should not allow creation of new
rooms inside iframes. Only `/new` still works when not inside iframes.
4. Forking a project from inside an iframe now opens it on tldraw.com
5. Slight copy change on the sharing menu. We no longer have a toggle
between readonly and non-readonly links.
6. `editor` and `app` are no longer exposed on the window object for
readonly rooms. Prevents users from using the `updateInstanceState` to
escape readonly rooms.

---------

Co-authored-by: Mime Čuvalo <mimecuvalo@gmail.com>
2024-04-25 14:10:40 +00:00
alex 4c5abe888c
Revert "[signia] Smart dirty checking of active computeds (#3516)" (#3612)
This reverts commit 741ed00bda.

This was causing a bug with computed's not getting invalidated
correctly. To reproduce:
- Draw a rectangle
- Hold alt to drag out a duplicate
- Delete the duplicate

We'd then get errors and sometimes a crash where the indicator continued
trying to render a now-deleted shape.

### Change Type
- [x] `sdk` — Changes the tldraw SDK
- [x] `bugfix` — Bug fix
2024-04-25 12:45:36 +00:00
alex 8151e6f586
Automatic undo/redo (#3364)
Our undo-redo system before this diff is based on commands. A command
is:
- A function that produces some data required to perform and undo a
change
- A function that actually performs the change, based on the data
- Another function that undoes the change, based on the data
- Optionally, a function to _redo_ the change, although in practice we
never use this

Each command that gets run is added to the undo/redo stack unless it
says it shouldn't be.

This diff replaces this system of commands with a new one where all
changes to the store are automatically recorded in the undo/redo stack.
You can imagine the new history manager like a tape recorder - it
automatically records everything that happens to the store in a special
diff, unless you "pause" the recording and ask it not to. Undo and redo
rewind/fast-forward the tape to certain marks.

As the command concept is gone, the things that were commands are now
just functions that manipulate the store.

One other change here is that the store's after-phase callbacks (and the
after-phase side-effects as a result) are now batched up and called at
the end of certain key operations. For example, `applyDiff` would
previously call all the `afterCreate` callbacks before making any
removals from the diff. Now, it (and anything else that uses
`store.atomic(fn)` will defer firing any after callbacks until the end
of an operation. before callbacks are still called part-way through
operations.

## Design options
Automatic recording is a fairly large big semantic change, particularly
to the standalone `store.put`/`store.remove` etc. commands. We could
instead make not-recording the default, and make recording opt-in
instead. However, I think auto-record-by-default is the right choice for
a few reasons:

1. Switching to a recording-based vs command-based undo-redo model is
fundamentally a big semantic change. In the past, `store.put` etc. were
always ignored. Now, regardless of whether we choose record-by-default
or ignore-by-default, the behaviour of `store.put` is _context_
dependant.
2. Switching to ignore-by-default means that either our commands don't
record undo/redo history any more (unless wrapped in
`editor.history.record`, a far larger semantic change) or they have to
always-record/all accept a history options bag. If we choose
always-record, we can't use commands within `history.ignore` as they'll
start recording again. If we choose the history options bag, we have to
accept those options in 10s of methods - basically the entire `Editor`
api surface.

Overall, given that some breaking semantic change here is unavoidable, I
think that record-by-default hits the right balance of tradeoffs. I
think it's a better API going forward, whilst also not being too
disruptive as the APIs it affects are very "deep" ones that we don't
typically encourage people to use.



### Change Type

- [x] `sdk` — Changes the tldraw SDK
- [x] `improvement` — Improving existing features
- [x] `galaxy brain` — Architectural changes

### Release Note
#### Breaking changes
##### 1. History Options
Previously, some (not all!) commands accepted a history options object
with `squashing`, `ephemeral`, and `preserveRedoStack` flags. Squashing
enabled/disabled a memory optimisation (storing individual commands vs
squashing them together). Ephemeral stopped a command from affecting the
undo/redo stack at all. Preserve redo stack stopped commands from wiping
the redo stack. These flags were never available consistently - some
commands had them and others didn't.

In this version, most of these flags have been removed. `squashing` is
gone entirely (everything squashes & does so much faster than before).
There were a couple of commands that had a special default - for
example, `updateInstanceState` used to default to being `ephemeral`.
Those maintain the defaults, but the options look a little different now
- `{ephemeral: true}` is now `{history: 'ignore'}` and
`{preserveRedoStack: true}` is now `{history:
'record-preserveRedoStack'}`.

If you were previously using these options in places where they've now
been removed, you can use wrap them with `editor.history.ignore(fn)` or
`editor.history.batch(fn, {history: 'record-preserveRedoStack'})`. For
example,
```ts
editor.nudgeShapes(..., { ephemeral: true })
```
can now be written as
```ts
editor.history.ignore(() => {
    editor.nudgeShapes(...)
})
```

##### 2. Automatic recording
Previously, only commands (e.g. `editor.updateShapes` and things that
use it) were added to the undo/redo stack. Everything else (e.g.
`editor.store.put`) wasn't. Now, _everything_ that touches the store is
recorded in the undo/redo stack (unless it's part of
`mergeRemoteChanges`). You can use `editor.history.ignore(fn)` as above
if you want to make other changes to the store that aren't recorded -
this is short for `editor.history.batch(fn, {history: 'ignore'})`

When upgrading to this version of tldraw, you shouldn't need to change
anything unless you're using `store.put`, `store.remove`, or
`store.applyDiff` outside of `store.mergeRemoteChanges`. If you are, you
can preserve the functionality of those not being recorded by wrapping
them either in `mergeRemoteChanges` (if they're multiplayer-related) or
`history.ignore` as appropriate.

##### 3. Side effects
Before this diff, any changes in side-effects weren't captured by the
undo-redo stack. This was actually the motivation for this change in the
first place! But it's a pretty big change, and if you're using side
effects we recommend you double-check how they interact with undo/redo
before/after this change. To get the old behaviour back, wrap your side
effects in `editor.history.ignore`.

##### 4. Mark options
Previously, `editor.mark(id)` accepted two additional boolean
parameters: `onUndo` and `onRedo`. If these were set to false, then when
undoing or redoing we'd skip over that mark and keep going until we
found one with those values set to true. We've removed those options -
if you're using them, let us know and we'll figure out an alternative!
2024-04-24 18:26:10 +00:00