create-foldkit-app 0.21.0 → 0.22.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/README.md +1 -0
- package/dist/examples.js +6 -0
- package/package.json +5 -5
- package/templates/base/AGENTS.md +1 -1
package/README.md
CHANGED
|
@@ -32,6 +32,7 @@ The CLI prompts you for a project name, starter example, and package manager. Pa
|
|
|
32
32
|
| `api-cache` | Query caching in the Model with stale-while-revalidate, request deduplication, and interval refetching |
|
|
33
33
|
| `charting` | Live GitHub and npm telemetry rendered through an ECharts Mount adapter |
|
|
34
34
|
| `routing` | URL routing with parser combinators and route parameters |
|
|
35
|
+
| `upload` | Simulated file uploads with cancellable, restartable interruptible Commands |
|
|
35
36
|
| `query-sync` | URL-driven filtering, sorting, and search with query parameters |
|
|
36
37
|
| `snake` | Classic game built with Subscriptions |
|
|
37
38
|
| `canvas-art` | Declarative 2D canvas with shapes, animation-frame Subscriptions, and pointer events |
|
package/dist/examples.js
CHANGED
|
@@ -12,6 +12,7 @@ export const EXAMPLE_VALUES = [
|
|
|
12
12
|
'charting',
|
|
13
13
|
'routing',
|
|
14
14
|
'route-transitions',
|
|
15
|
+
'interrupting-commands',
|
|
15
16
|
'query-sync',
|
|
16
17
|
'snake',
|
|
17
18
|
'canvas-art',
|
|
@@ -94,6 +95,11 @@ export const examples = [
|
|
|
94
95
|
title: 'route-transitions',
|
|
95
96
|
description: 'Live transition log with entry, exit, and stayed navigation policies',
|
|
96
97
|
},
|
|
98
|
+
{
|
|
99
|
+
value: 'interrupting-commands',
|
|
100
|
+
title: 'interrupting-commands',
|
|
101
|
+
description: 'Simulated file uploads with cancellable, restartable interruptible Commands',
|
|
102
|
+
},
|
|
97
103
|
{
|
|
98
104
|
value: 'query-sync',
|
|
99
105
|
title: 'query-sync',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-foldkit-app",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"description": "Create Foldkit applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -12,15 +12,15 @@
|
|
|
12
12
|
"templates"
|
|
13
13
|
],
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@effect/platform-node": "4.0.0-beta.
|
|
16
|
-
"@effect/platform-node-shared": "4.0.0-beta.
|
|
15
|
+
"@effect/platform-node": "4.0.0-beta.97",
|
|
16
|
+
"@effect/platform-node-shared": "4.0.0-beta.97",
|
|
17
17
|
"chalk": "^5.6.2",
|
|
18
|
-
"effect": "4.0.0-beta.
|
|
18
|
+
"effect": "4.0.0-beta.97",
|
|
19
19
|
"rimraf": "^6.1.3",
|
|
20
20
|
"typescript": "^6.0.3"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@effect/vitest": "4.0.0-beta.
|
|
23
|
+
"@effect/vitest": "4.0.0-beta.97",
|
|
24
24
|
"@types/node": "^25.9.3",
|
|
25
25
|
"vitest": "^4.1.9"
|
|
26
26
|
},
|
package/templates/base/AGENTS.md
CHANGED
|
@@ -54,7 +54,7 @@ Use `evo()` from `foldkit/struct` for immutable model updates. Never spread or `
|
|
|
54
54
|
|
|
55
55
|
Bind the `html` factory inside each view function with `const h = html<Message>()` (never at module level), then reach for `h.div`, `h.OnClick`, etc. off the returned record. Use `empty` (not `null`) for conditional rendering, `M.value().pipe(M.tagsExhaustive({...}))` for discriminated unions, and `Array.match` for lists that may be empty.
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
Keys are for mapped list items only: key each row by a stable Model identifier (`h.keyed('li')(item.id, [], [...])`), never by array position, and never derive a key from displayed data. Never key branches; the build gives each view function's output its own identity, so branch switches replace DOM automatically. When switching an inline same-tag ternary must reset DOM state, extract each arm into its own named view function.
|
|
58
58
|
|
|
59
59
|
### Commands
|
|
60
60
|
|