tsquare 0.9.1 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/README.md +1 -1
- package/dist/browser/THIRD_PARTY_LICENSES.txt +1033 -0
- package/dist/browser/index.js +23495 -0
- package/dist/chunks/{chunk-W3OU5IS6.js → chunk-EY7YIRMK.js} +5 -3
- package/dist/chunks/{chunk-GTWUMF6W.js → chunk-QWQT7224.js} +1 -1
- package/dist/cli.js +1 -1
- package/dist/deflate.d.ts +2 -0
- package/dist/fonts.d.ts +1 -0
- package/dist/index.js +7 -5
- package/dist/playground/index.js +2 -2
- package/package.json +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.10.0
|
|
4
|
+
|
|
5
|
+
The language and the renderer haven't changed: every wireframe renders exactly as in 0.9.1, and render URLs give the same images.
|
|
6
|
+
|
|
7
|
+
- **tsquare runs in browsers.** The package has a `browser` build that bundlers pick automatically (esbuild, Vite, webpack, and the Obsidian plugin template): `renderWireframe`, `renderWireframeSvg`, `compileWireframe`, `boardLayout` and the rest work the same, with Inter embedded as bytes, so nothing is read from disk and no build settings are needed. It renders exactly the same SVG as Node (checked byte for byte on every example, in a test and in Chrome). PNG output and share links (`encodeWireframe`, `decodeWireframe`) still need Node and throw an error saying so. Node users get the same build as before, and renders are unchanged.
|
|
8
|
+
- `satori` is now a direct dependency, pinned exactly like the other renderer dependencies: a new version can change how boards are drawn.
|
|
9
|
+
- The browser build bundles satori, `@json-render/image` and the Inter font, so it ships their license notices in `dist/browser/THIRD_PARTY_LICENSES.txt`.
|
|
10
|
+
|
|
3
11
|
## 0.9.1
|
|
4
12
|
|
|
5
13
|
- **Fix: `tsquare/viewer` keeps the board at its size on pages that cap images.** VS Code's webviews, Tailwind's base styles and many CSS resets set `img { max-width: 100% }`. The viewer draws the board image at its own size and zooms it with a transform, so the cap squeezed the board to the width of its frame while it kept its height: it showed up small, centered in a tall empty box. The viewer now sets the image's size itself. The playground wasn't affected; rendering and render URLs are unchanged.
|
package/README.md
CHANGED
|
@@ -123,7 +123,7 @@ const { issues } = compileWireframe(source); // problems by line, empt
|
|
|
123
123
|
const png = await renderWireframe(source, { format: "png", scale: 2 });
|
|
124
124
|
```
|
|
125
125
|
|
|
126
|
-
`tsquare/playground` exports the playground's request handler, for hosting it inside your own Node server. `tsquare/viewer` is the playground's zoomable board (zoom, pan, pinch, a chip per screen) for your own page: pass it the elements, then `show()` the SVG from `renderWireframeSvg` with the size and screens from `boardLayout`. It sets the styles its zoom math needs itself; give the stage a size, and optionally style the classes it toggles on the stage: `panning` (while dragging), `animate` (while fitting or zooming to a screen, e.g. `.animate > * { transition: transform .25s }`) and `stale` (from `setStale`, e.g. `.stale img { opacity: .35 }`). `languageData()` lists every component, prop, option word, icon and accent, for editor highlighting and autocomplete. See [Using it with AI](docs/ai.md) for the prompt and the repair loop.
|
|
126
|
+
`tsquare/playground` exports the playground's request handler, for hosting it inside your own Node server. `tsquare/viewer` is the playground's zoomable board (zoom, pan, pinch, a chip per screen) for your own page: pass it the elements, then `show()` the SVG from `renderWireframeSvg` with the size and screens from `boardLayout`. It sets the styles its zoom math needs itself; give the stage a size, and optionally style the classes it toggles on the stage: `panning` (while dragging), `animate` (while fitting or zooming to a screen, e.g. `.animate > * { transition: transform .25s }`) and `stale` (from `setStale`, e.g. `.stale img { opacity: .35 }`). `languageData()` lists every component, prop, option word, icon and accent, for editor highlighting and autocomplete. In a browser bundle (esbuild, Vite, webpack) the same imports render SVG with no setup; PNG and share links need Node. See [Using it with AI](docs/ai.md) for the prompt and the repair loop.
|
|
127
127
|
|
|
128
128
|
## Using it with Claude (skill)
|
|
129
129
|
|