@solidrt/cli 0.0.13 → 0.0.14
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 +6 -6
- package/scaffold/AGENTS.md +28 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solidrt/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.14",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Antoine van Wel",
|
|
6
6
|
"type": "module",
|
|
@@ -16,17 +16,17 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@babel/core": "^7.28.5",
|
|
18
18
|
"@babel/preset-typescript": "^7.28.5",
|
|
19
|
-
"babel-preset-solid": "2.0.0-beta.
|
|
19
|
+
"babel-preset-solid": "2.0.0-beta.15",
|
|
20
20
|
"bonjour-service": "^1.4.0",
|
|
21
21
|
"qrcode-generator": "^2.0.4"
|
|
22
22
|
},
|
|
23
23
|
"optionalDependencies": {
|
|
24
|
-
"@solidrt/darwin-arm64": "0.0.
|
|
25
|
-
"@solidrt/linux-x64-gnu": "0.0.
|
|
26
|
-
"@solidrt/win32-x64-msvc": "0.0.
|
|
24
|
+
"@solidrt/darwin-arm64": "0.0.0",
|
|
25
|
+
"@solidrt/linux-x64-gnu": "0.0.0",
|
|
26
|
+
"@solidrt/win32-x64-msvc": "0.0.0"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"@solidrt/core": "0.0.
|
|
29
|
+
"@solidrt/core": "0.0.0",
|
|
30
30
|
"typescript": "^6"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
package/scaffold/AGENTS.md
CHANGED
|
@@ -15,10 +15,16 @@ Authoritative references ship inside the installed packages - read them:
|
|
|
15
15
|
|
|
16
16
|
## The things assistants get wrong (this is not React/DOM)
|
|
17
17
|
|
|
18
|
-
1. SolidJS 2.0, not React (and not Solid 1.x).
|
|
19
|
-
@
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
1. SolidJS 2.0, not React (and not Solid 1.x). Import the whole authoring
|
|
19
|
+
surface from @solidrt/core - it re-exports the substrate so you do not have to
|
|
20
|
+
know which package a symbol lives in: render plus the window/paint/event APIs,
|
|
21
|
+
the reactive primitives (createSignal, createMemo, createEffect, createStore,
|
|
22
|
+
reconcile, mapArray, untrack, onCleanup), and the control-flow components (For,
|
|
23
|
+
Show, Switch/Match, Repeat, Loading, Errored). No hooks, no virtual DOM, the
|
|
24
|
+
component body runs once. Render lists with <For each={...}>{item => ...}</For>,
|
|
25
|
+
never array.map. createEffect has the 2.0 two-function shape - a TRACKED
|
|
26
|
+
compute that reads signals and returns a value, then an UNTRACKED effect that
|
|
27
|
+
receives it:
|
|
22
28
|
createEffect(() => count(), (c) => console.log(c))
|
|
23
29
|
The Solid 1.x single-callback form, createEffect(() => console.log(count())),
|
|
24
30
|
does NOT track in 2.0.
|
|
@@ -32,12 +38,29 @@ Authoritative references ship inside the installed packages - read them:
|
|
|
32
38
|
6. No onClick/onPress. A button is a <view>/<rect> with onPointerDown.
|
|
33
39
|
7. d- prefix = detached from layout: a plain element is laid out by Taffy, a
|
|
34
40
|
d-element you position with x/y (omit to fill the parent = how backgrounds
|
|
35
|
-
work).
|
|
41
|
+
work). A detached node cannot have attached (regular, Taffy-laid-out)
|
|
42
|
+
children - everything under a d-element must itself be detached. Nesting a
|
|
43
|
+
plain <view>/<text> inside a d-element is an error.
|
|
36
44
|
8. Per-frame work: onFrame((tick, frame) => {}), or the standard
|
|
37
45
|
requestAnimationFrame(t => {}) for animations. Also onResize, onLayout.
|
|
38
46
|
9. Device/GPU via subpath imports: @solidrt/core/camera, /microphone, /gpu.
|
|
39
47
|
10. tsconfig needs jsx:"preserve" + jsxImportSource:"@solidrt/core". Solid peer
|
|
40
48
|
deps are pinned betas - do not bump them casually.
|
|
49
|
+
11. Use ASCII characters whenever possible in code and text - for example, no
|
|
50
|
+
em-dashes (use a hyphen), no smart/curly quotes, no unicode symbols.
|
|
51
|
+
12. Mind the safe area. safeArea() from @solidrt/core is a reactive accessor
|
|
52
|
+
returning { top, left, right, bottom } insets (like CSS
|
|
53
|
+
env(safe-area-inset-*)). It is fine to place content outside the safe-area
|
|
54
|
+
zone (e.g. full-bleed backgrounds), just be aware it may not be visible and
|
|
55
|
+
cannot be interacted with (touch gestures). Keep interactive or essential
|
|
56
|
+
content inside the safe area by padding the edges.
|
|
57
|
+
13. Prefer let over const. Use const only for real constants - a single fixed
|
|
58
|
+
string or number value - and name those in ALL_CAPS.
|
|
59
|
+
14. SolidJS/SolidRT is a reactive framework: strongly prefer reactive primitives
|
|
60
|
+
(signals, memos, effects, the control-flow components) over imperative code.
|
|
61
|
+
Derive state with createMemo, react with createEffect, render conditionally
|
|
62
|
+
with <Show>/<Switch> and lists with <For> - do not hand-roll imperative
|
|
63
|
+
updates, manual subscriptions, or DOM-style mutation.
|
|
41
64
|
|
|
42
65
|
## Run / verify
|
|
43
66
|
|