create-foldkit-app 0.12.4 → 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 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-foldkit-app",
3
- "version": "0.12.4",
3
+ "version": "0.14.0",
4
4
  "description": "Create Foldkit applications",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -12,10 +12,10 @@
12
12
  "templates"
13
13
  ],
14
14
  "dependencies": {
15
- "@effect/platform-node": "4.0.0-beta.66",
16
- "@effect/platform-node-shared": "4.0.0-beta.66",
15
+ "@effect/platform-node": "4.0.0-beta.78",
16
+ "@effect/platform-node-shared": "4.0.0-beta.78",
17
17
  "chalk": "^5.6.2",
18
- "effect": "4.0.0-beta.66",
18
+ "effect": "4.0.0-beta.78",
19
19
  "rimraf": "^6.1.3",
20
20
  "typescript": "^6.0.3"
21
21
  },
@@ -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.makeProgram` 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`.
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