create-foldkit-app 0.13.0 → 0.14.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 +1 -1
- 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
|
| `shopping-cart` | Complex state management with nested Models |
|
|
33
33
|
| `websocket-chat` | Managed resources with WebSocket |
|
|
34
34
|
| `auth` | Authentication with Submodels, OutMessage, and protected routes |
|
|
35
|
+
| `embedding` | A Foldkit widget embedded in a plain TypeScript host page with Ports and dispose |
|
|
35
36
|
| `ui-showcase` | Every Foldkit UI component with routing |
|
|
36
37
|
|
|
37
38
|
## License
|
package/dist/examples.js
CHANGED
|
@@ -18,6 +18,7 @@ export const EXAMPLE_VALUES = [
|
|
|
18
18
|
'websocket-chat',
|
|
19
19
|
'kanban',
|
|
20
20
|
'web-components',
|
|
21
|
+
'embedding',
|
|
21
22
|
'ui-showcase',
|
|
22
23
|
];
|
|
23
24
|
export const examples = [
|
|
@@ -116,6 +117,11 @@ export const examples = [
|
|
|
116
117
|
title: 'web-components',
|
|
117
118
|
description: 'QR code designer wiring two real third-party web components into Foldkit with CustomElement.define (vanilla-colorful and Shoelace)',
|
|
118
119
|
},
|
|
120
|
+
{
|
|
121
|
+
value: 'embedding',
|
|
122
|
+
title: 'embedding',
|
|
123
|
+
description: 'A Foldkit widget embedded in a plain TypeScript host page via Runtime.embed, with Flags in, typed Ports in both directions, and dispose on unmount',
|
|
124
|
+
},
|
|
119
125
|
{
|
|
120
126
|
value: 'ui-showcase',
|
|
121
127
|
title: 'ui-showcase',
|
package/package.json
CHANGED
package/templates/base/AGENTS.md
CHANGED
|
@@ -66,7 +66,7 @@ For DOM operations (focus, scroll, modals, scroll lock), Foldkit ships a `Dom` m
|
|
|
66
66
|
|
|
67
67
|
### File Organization
|
|
68
68
|
|
|
69
|
-
A Foldkit app lives in two files. `src/main.ts` holds the pure definitions (Model, Messages, init, update, view). `src/entry.ts` imports them and boots the runtime with `Runtime.
|
|
69
|
+
A Foldkit app lives in two files. `src/main.ts` holds the pure definitions (Model, Messages, init, update, view). `src/entry.ts` imports them and boots the runtime with `Runtime.makeApplication` and `Runtime.run`. `index.html` references `entry.ts`. The split keeps `main.ts` importable from tests without booting a runtime as a side effect. Never call `Runtime.run` from `main.ts`.
|
|
70
70
|
|
|
71
71
|
Use uppercase section headers (`// MODEL`, `// MESSAGE`, `// INIT`, `// UPDATE`, `// COMMAND`, `// VIEW`) for wayfinding.
|
|
72
72
|
|