@opsydyn/astro-foldkit 0.3.0 → 0.5.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/CHANGELOG.md CHANGED
@@ -1,24 +1,35 @@
1
1
  # Changelog
2
2
 
3
- ## [0.3.0](https://github.com/opsydyn/fold-kit-experiments/compare/astro-foldkit-v0.2.1...astro-foldkit-v0.3.0) (2026-07-15)
3
+ ## [0.5.0](https://github.com/opsydyn/fold-kit-experiments/compare/astro-foldkit-v0.4.0...astro-foldkit-v0.5.0) (2026-07-18)
4
+
5
+
6
+ ### Features
7
+
8
+ * **astro-foldkit:** add lazy app entry API ([9786bdd](https://github.com/opsydyn/fold-kit-experiments/commit/9786bdd226cfd2200b6e64d5b198a53a7aad6d13))
4
9
 
10
+ ## [0.4.0](https://github.com/opsydyn/fold-kit-experiments/compare/astro-foldkit-v0.3.0...astro-foldkit-v0.4.0) (2026-07-18)
5
11
 
6
12
  ### Features
7
13
 
8
- * **astro-foldkit:** add navigation event contract ([5d4678d](https://github.com/opsydyn/fold-kit-experiments/commit/5d4678d94eac9e5e9f6d6f15e9d4074f1e99df3d))
9
- * **astro-foldkit:** define stable ssr shell ([e325b89](https://github.com/opsydyn/fold-kit-experiments/commit/e325b89f63515194abf37a85f568dddef4d97855))
10
- * **astro-foldkit:** forward navigation through inbound ports ([da6ade5](https://github.com/opsydyn/fold-kit-experiments/commit/da6ade569a312b886a5732f1a401a47b065f4f20))
11
- * **astro-foldkit:** type application contract ([9fbc36d](https://github.com/opsydyn/fold-kit-experiments/commit/9fbc36de9fde1e17b2d29d791d620bc9eddf573a))
14
+ - **astro-foldkit:** support foldkit 0.129 ([345b18c](https://github.com/opsydyn/fold-kit-experiments/commit/345b18c325706ae2aebbe7c1c3a5bded2248e343))
15
+
16
+ ## [0.3.0](https://github.com/opsydyn/fold-kit-experiments/compare/astro-foldkit-v0.2.1...astro-foldkit-v0.3.0) (2026-07-15)
17
+
18
+ ### Features
12
19
 
20
+ - **astro-foldkit:** add navigation event contract ([5d4678d](https://github.com/opsydyn/fold-kit-experiments/commit/5d4678d94eac9e5e9f6d6f15e9d4074f1e99df3d))
21
+ - **astro-foldkit:** define stable ssr shell ([e325b89](https://github.com/opsydyn/fold-kit-experiments/commit/e325b89f63515194abf37a85f568dddef4d97855))
22
+ - **astro-foldkit:** forward navigation through inbound ports ([da6ade5](https://github.com/opsydyn/fold-kit-experiments/commit/da6ade569a312b886a5732f1a401a47b065f4f20))
23
+ - **astro-foldkit:** type application contract ([9fbc36d](https://github.com/opsydyn/fold-kit-experiments/commit/9fbc36de9fde1e17b2d29d791d620bc9eddf573a))
13
24
 
14
25
  ### Bug Fixes
15
26
 
16
- * address astro navigation review findings ([ec6faad](https://github.com/opsydyn/fold-kit-experiments/commit/ec6faad38c05d9a1b5d5fe32a710215864fe8fb6))
17
- * align packages with foldkit 0.128.1 ([ebadeaa](https://github.com/opsydyn/fold-kit-experiments/commit/ebadeaaf29e854660aa2d5c9eba04c017269d075))
18
- * **astro-foldkit:** make island disposal one-shot ([694e17a](https://github.com/opsydyn/fold-kit-experiments/commit/694e17a32453c6f98561f6f2cb767d3c4c59ab8a))
19
- * **astro-foldkit:** preserve schema overlay compatibility ([4f4be0b](https://github.com/opsydyn/fold-kit-experiments/commit/4f4be0b5da7bebb7c40acb535727acd8f448a903))
20
- * **astro-foldkit:** scope navigation to island lifecycle ([e8627d8](https://github.com/opsydyn/fold-kit-experiments/commit/e8627d82cb7a76e4887b7e40121e2d6cf3906347))
21
- * resolve final astro navigation review findings ([baefd61](https://github.com/opsydyn/fold-kit-experiments/commit/baefd615231832ffca5dc10d18f4919e7672d3f9))
27
+ - address astro navigation review findings ([ec6faad](https://github.com/opsydyn/fold-kit-experiments/commit/ec6faad38c05d9a1b5d5fe32a710215864fe8fb6))
28
+ - align packages with foldkit 0.128.1 ([ebadeaa](https://github.com/opsydyn/fold-kit-experiments/commit/ebadeaaf29e854660aa2d5c9eba04c017269d075))
29
+ - **astro-foldkit:** make island disposal one-shot ([694e17a](https://github.com/opsydyn/fold-kit-experiments/commit/694e17a32453c6f98561f6f2cb767d3c4c59ab8a))
30
+ - **astro-foldkit:** preserve schema overlay compatibility ([4f4be0b](https://github.com/opsydyn/fold-kit-experiments/commit/4f4be0b5da7bebb7c40acb535727acd8f448a903))
31
+ - **astro-foldkit:** scope navigation to island lifecycle ([e8627d8](https://github.com/opsydyn/fold-kit-experiments/commit/e8627d82cb7a76e4887b7e40121e2d6cf3906347))
32
+ - resolve final astro navigation review findings ([baefd61](https://github.com/opsydyn/fold-kit-experiments/commit/baefd615231832ffca5dc10d18f4919e7672d3f9))
22
33
 
23
34
  ## [0.2.1](https://github.com/opsydyn/fold-kit-experiments/compare/astro-foldkit-v0.2.0...astro-foldkit-v0.2.1) (2026-06-12)
24
35
 
package/README.md CHANGED
@@ -12,6 +12,13 @@ npm install @opsydyn/astro-foldkit
12
12
  npm install astro foldkit
13
13
  ```
14
14
 
15
+ ## FoldKit compatibility
16
+
17
+ `@opsydyn/astro-foldkit` requires FoldKit `0.129.0` or later. Applications can
18
+ use `Command.Interruptible` for request cancellation inside their own update
19
+ loop; this integration continues to own only Astro hydration and lifecycle
20
+ event delivery.
21
+
15
22
  ## Setup
16
23
 
17
24
  Add the integration to `astro.config.ts`:
@@ -27,13 +34,13 @@ export default defineConfig({
27
34
 
28
35
  ## Defining an app
29
36
 
30
- Use `defineApp` to register a FoldKit app for lazy loading. The loader returns your `main.ts` module which must export a value that satisfies `AppConfig`.
37
+ Use `lazyApp` to register a FoldKit app for lazy loading. The literal loader keeps each Astro island as an explicit code-splitting boundary; it returns your `main.ts` module, which must export a value that satisfies `AppConfig`. `defineApp` remains available as a backwards-compatible alias.
31
38
 
32
39
  ```ts
33
40
  // src/apps/counter/app.ts
34
- import { defineApp } from '@opsydyn/astro-foldkit/define-app';
41
+ import { lazyApp } from '@opsydyn/astro-foldkit/define-app';
35
42
 
36
- export default defineApp(() => import('./main'));
43
+ export default lazyApp(() => import('./main'));
37
44
  ```
38
45
 
39
46
  ```ts
@@ -62,14 +69,14 @@ The demo app's [`/request-diagnostics`](../../apps/web/src/pages/request-diagnos
62
69
 
63
70
  ## Passing props
64
71
 
65
- `defineApp` accepts a type parameter for the props your FoldKit app expects. This makes the component callable with typed attributes in `.astro` files.
72
+ `lazyApp` accepts a type parameter for the props your FoldKit app expects. This makes the component callable with typed attributes in `.astro` files.
66
73
 
67
74
  ```ts
68
75
  // src/apps/greeting/app.ts
69
- import { defineApp } from '@opsydyn/astro-foldkit/define-app';
76
+ import { lazyApp } from '@opsydyn/astro-foldkit/define-app';
70
77
  import type { Name } from './model';
71
78
 
72
- export default defineApp<{ name: Name }>(() => import('./main'));
79
+ export default lazyApp<{ name: Name }>(() => import('./main'));
73
80
  ```
74
81
 
75
82
  Props are forwarded from Astro's `<astro-island>` serialisation into your `init` function. Declare `init` to accept `props: unknown` and validate at the boundary with Effect Schema:
@@ -168,10 +175,10 @@ The module returned by your loader must export:
168
175
 
169
176
  ## Exports
170
177
 
171
- | Entry point | Description |
172
- | :---------------------------------- | :-------------------------------------- |
173
- | `@opsydyn/astro-foldkit` | Default Astro integration (`foldkit()`) |
174
- | `@opsydyn/astro-foldkit/define-app` | `defineApp` helper and `AppConfig` type |
178
+ | Entry point | Description |
179
+ | :---------------------------------- | :-------------------------------------------------------- |
180
+ | `@opsydyn/astro-foldkit` | Default Astro integration (`foldkit()`) |
181
+ | `@opsydyn/astro-foldkit/define-app` | `lazyApp` helper (`defineApp` alias) and `AppConfig` type |
175
182
 
176
183
  The root entry point also exports the `NavigationConfig`, `NavigationEvent`, and `NavigationPhase` types.
177
184
 
@@ -2,5 +2,7 @@ import { n as AppConfigShape, r as FoldkitApp, t as AppConfig } from "./types-BO
2
2
 
3
3
  //#region src/define-app.d.ts
4
4
  declare function defineApp<Props extends Record<string, unknown> = Record<string, unknown>, Config extends AppConfigShape<Props> = AppConfigShape<Props>>(load: () => Promise<Config>): FoldkitApp<Props, Config>;
5
+ /** Preferred name for Astro's intentional lazy island entry boundary. */
6
+ declare const lazyApp: typeof defineApp;
5
7
  //#endregion
6
- export { type AppConfig, type FoldkitApp, defineApp };
8
+ export { type AppConfig, type FoldkitApp, defineApp, lazyApp };
@@ -5,5 +5,7 @@ function defineApp(load) {
5
5
  load
6
6
  });
7
7
  }
8
+ /** Preferred name for Astro's intentional lazy island entry boundary. */
9
+ const lazyApp = defineApp;
8
10
  //#endregion
9
- export { defineApp };
11
+ export { defineApp, lazyApp };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opsydyn/astro-foldkit",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "description": "Astro integration and renderer for FoldKit.",
5
5
  "keywords": [
6
6
  "astro",
@@ -62,16 +62,16 @@
62
62
  },
63
63
  "devDependencies": {
64
64
  "@types/node": "^22.0.0",
65
- "astro": "^7.0.6",
65
+ "astro": "7.1.1",
66
66
  "bun-types": "^1.3.14",
67
67
  "fast-check": "^4.8.0",
68
- "foldkit": "^0.128.1",
68
+ "foldkit": "^0.129.0",
69
69
  "tsdown": "^0.21.8",
70
70
  "typescript": "^6.0.3"
71
71
  },
72
72
  "peerDependencies": {
73
73
  "astro": ">=5.0.0",
74
- "foldkit": ">=0.128.1"
74
+ "foldkit": ">=0.129.0"
75
75
  },
76
76
  "engines": {
77
77
  "node": ">=22.0.0"