@tarve/headless 0.13.6 → 0.13.8
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/README.md +1 -1
- package/package.json +2 -2
- package/src/tree.ts +13 -1
- package/wasm/baseline/tarve_web_bg.wasm +0 -0
- package/wasm/tarve_web_bg.wasm +0 -0
package/README.md
CHANGED
|
@@ -97,7 +97,7 @@ resolves on every runtime.
|
|
|
97
97
|
|---|---|---|
|
|
98
98
|
| Bun 1.4+ | `bun app.tsx`, `bun test` | Everything |
|
|
99
99
|
| Node.js 26.10+ | `tarve run --runtime node app.tsx` (bundles the TSX and its files) | Everything |
|
|
100
|
-
| txiki.js 26.
|
|
100
|
+
| txiki.js 26.11 | `tarve build --runtime txiki app.tsx`, then run the executable | Everything |
|
|
101
101
|
|
|
102
102
|
The WebAssembly runtime comes in two builds, chosen by feature detection: `simd` (wasm simd128,
|
|
103
103
|
about twice as fast to paint) and `baseline`, for engines without WebAssembly SIMD such as
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarve/headless",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.8",
|
|
4
4
|
"description": "Render Tarve UIs to pixels without a window or GPU: tests, visual snapshots and image generation on any platform",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"keywords": [
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"verify:pack": "bun scripts/verify-pack.ts"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@tarve/core": "^0.13.
|
|
43
|
+
"@tarve/core": "^0.13.8"
|
|
44
44
|
},
|
|
45
45
|
"engines": {
|
|
46
46
|
"bun": ">=1.4.0",
|
package/src/tree.ts
CHANGED
|
@@ -8,7 +8,7 @@ export type SceneNode = SceneDocument["root"];
|
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* The scene tree as the app last sent it to the bridge: the start document with every `update`,
|
|
11
|
-
* `patch` and `mutate` command applied. It is what the native tree holds (ids, kinds, text,
|
|
11
|
+
* `patch`, `setNodes` and `mutate` command applied. It is what the native tree holds (ids, kinds, text,
|
|
12
12
|
* values, `control` roles and labels, `labelledBy`), without layout.
|
|
13
13
|
*/
|
|
14
14
|
export class SceneTreeMirror {
|
|
@@ -36,6 +36,18 @@ export class SceneTreeMirror {
|
|
|
36
36
|
case "patch":
|
|
37
37
|
for (const node of command.nodes) this.patch(node);
|
|
38
38
|
break;
|
|
39
|
+
case "setNodes":
|
|
40
|
+
// Signal values and texts set in place: new style values and text over the node's own.
|
|
41
|
+
for (const set of command.nodes) {
|
|
42
|
+
const node = this.nodes.get(set.id);
|
|
43
|
+
if (!node) continue;
|
|
44
|
+
this.nodes.set(set.id, {
|
|
45
|
+
...node,
|
|
46
|
+
...(set.style ? { style: { ...node.style, ...set.style } as SceneNode["style"] } : {}),
|
|
47
|
+
...(set.text !== undefined ? { text: set.text } : {}),
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
break;
|
|
39
51
|
case "mutate":
|
|
40
52
|
for (const mutation of command.mutations) {
|
|
41
53
|
if (mutation.type === "create") this.add(mutation.node);
|
|
Binary file
|
package/wasm/tarve_web_bg.wasm
CHANGED
|
Binary file
|