@solidrt/cli 0.0.29 → 0.0.32

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solidrt/cli",
3
- "version": "0.0.29",
3
+ "version": "0.0.32",
4
4
  "license": "MIT",
5
5
  "author": "Antoine van Wel",
6
6
  "type": "module",
@@ -21,23 +21,23 @@
21
21
  "@jridgewell/remapping": "^2.3.0",
22
22
  "@jridgewell/trace-mapping": "^0.3.25",
23
23
  "@modelcontextprotocol/sdk": "^1.29.0",
24
- "babel-preset-solid": "2.0.0-beta.17",
24
+ "babel-preset-solid": "2.0.0-beta.20",
25
25
  "bonjour-service": "^1.4.0",
26
26
  "qrcode-generator": "^2.0.4",
27
27
  "zod": "^4.4.3"
28
28
  },
29
29
  "optionalDependencies": {
30
- "@solidrt/darwin-arm64": "0.0.29",
31
- "@solidrt/linux-arm64-gnu": "0.0.29",
32
- "@solidrt/linux-x64-gnu": "0.0.29",
33
- "@solidrt/win32-x64-msvc": "0.0.29"
30
+ "@solidrt/darwin-arm64": "0.0.32",
31
+ "@solidrt/linux-arm64-gnu": "0.0.32",
32
+ "@solidrt/linux-x64-gnu": "0.0.32",
33
+ "@solidrt/win32-x64-msvc": "0.0.32"
34
34
  },
35
35
  "peerDependencies": {
36
- "@solidrt/core": "0.0.29",
36
+ "@solidrt/core": "0.0.32",
37
37
  "typescript": "^7"
38
38
  },
39
39
  "devDependencies": {
40
- "@solidrt/flux-types": "0.0.29",
40
+ "@solidrt/flux-types": "0.0.32",
41
41
  "@types/bun": "latest"
42
42
  }
43
43
  }
@@ -118,6 +118,41 @@ Authoritative references ship inside the installed packages - read them:
118
118
  first with the children() helper (re-exported from @solidrt/core) and
119
119
  probe the resolved memo - never `typeof props.children` on the raw prop.
120
120
 
121
+ ## Performance model (JS is the slow lane)
122
+
123
+ The JS engine is interpreted and every property write crosses an FFI boundary
124
+ into the runtime, so per-frame JS work is the expensive path while GPU work is
125
+ nearly free. Rules, in order of leverage:
126
+
127
+ 1. Continuous effects (snow, particles, animated backgrounds) belong in a
128
+ fragment shader: createShader (from @solidrt/core/gpu) + `<texture
129
+ params={{ iTime }}>`. The whole effect then costs one setProperty per
130
+ frame - the iTime write - regardless of visual complexity. Shader output
131
+ must be premultiplied alpha (white flakes are `vec4(vec3(a), a)`);
132
+ straight alpha (`vec4(1,1,1,a)`) composites as opaque white.
133
+ 2. Reduce setProperty calls wherever possible: one path string rebuilt per
134
+ frame beats N elements with N animated positions; a shader beats the path
135
+ string. get_stats' setPropsPerFrame is the counter to watch.
136
+ 3. Never leave onFrame registered while nothing animates: a pending onFrame
137
+ is a standing frame request, so the runtime renders and presents every
138
+ vsync even when the callback body does nothing - an invisible 60fps GPU
139
+ burn that also drags the OS compositor along with it. For an on-demand
140
+ animation pump (tweens), use a self-rechaining one-shot
141
+ requestAnimationFrame that stops re-requesting when its work list
142
+ empties. (Registering onFrame outside a component body also warns
143
+ NO_OWNER_CLEANUP - it assumes a reactive owner.)
144
+ 4. repaintBoundary works like Flutter's: transforms and opacity on the
145
+ boundary node itself (or any ancestor) are hoisted out of the cache and
146
+ applied at composite time, so animating x/y/scale/rotate/opacity of a
147
+ boundary does NOT re-raster it (verified by A/B measurement - the damage
148
+ system classifies these as Transform and keeps the node's own cache).
149
+ What DOES invalidate the cache is any paint or content change inside the
150
+ subtree - colors, path data, text, a Show toggling - so drive animation
151
+ with transforms and keep the cached content itself static.
152
+ 5. "snapshot" boundaries pay first-frame texture allocation + raster:
153
+ creating many at once (dealing a board of 64 sprites) is a visible
154
+ one-frame hiccup - pool or pre-warm if that moment matters.
155
+
121
156
  ## Run / verify
122
157
 
123
158
  - bunx srt run src/index.tsx - dev server + window (needs a display)
@@ -9,12 +9,12 @@
9
9
  "android": "srt client --android"
10
10
  },
11
11
  "dependencies": {
12
- "@solidrt/core": "0.0.29",
13
- "@solidrt/components": "0.0.29"
12
+ "@solidrt/core": "0.0.32",
13
+ "@solidrt/components": "0.0.32"
14
14
  },
15
15
  "devDependencies": {
16
- "@solidrt/cli": "0.0.29",
17
- "@solidrt/flux-types": "0.0.29",
16
+ "@solidrt/cli": "0.0.32",
17
+ "@solidrt/flux-types": "0.0.32",
18
18
  "typescript": "^7"
19
19
  }
20
20
  }