@opsydyn/astro-foldkit 0.4.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,31 +1,35 @@
1
1
  # Changelog
2
2
 
3
- ## [0.4.0](https://github.com/opsydyn/fold-kit-experiments/compare/astro-foldkit-v0.3.0...astro-foldkit-v0.4.0) (2026-07-18)
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
4
 
5
5
 
6
6
  ### Features
7
7
 
8
- * **astro-foldkit:** support foldkit 0.129 ([345b18c](https://github.com/opsydyn/fold-kit-experiments/commit/345b18c325706ae2aebbe7c1c3a5bded2248e343))
9
-
10
- ## [0.3.0](https://github.com/opsydyn/fold-kit-experiments/compare/astro-foldkit-v0.2.1...astro-foldkit-v0.3.0) (2026-07-15)
8
+ * **astro-foldkit:** add lazy app entry API ([9786bdd](https://github.com/opsydyn/fold-kit-experiments/commit/9786bdd226cfd2200b6e64d5b198a53a7aad6d13))
11
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)
12
11
 
13
12
  ### Features
14
13
 
15
- * **astro-foldkit:** add navigation event contract ([5d4678d](https://github.com/opsydyn/fold-kit-experiments/commit/5d4678d94eac9e5e9f6d6f15e9d4074f1e99df3d))
16
- * **astro-foldkit:** define stable ssr shell ([e325b89](https://github.com/opsydyn/fold-kit-experiments/commit/e325b89f63515194abf37a85f568dddef4d97855))
17
- * **astro-foldkit:** forward navigation through inbound ports ([da6ade5](https://github.com/opsydyn/fold-kit-experiments/commit/da6ade569a312b886a5732f1a401a47b065f4f20))
18
- * **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
19
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))
20
24
 
21
25
  ### Bug Fixes
22
26
 
23
- * address astro navigation review findings ([ec6faad](https://github.com/opsydyn/fold-kit-experiments/commit/ec6faad38c05d9a1b5d5fe32a710215864fe8fb6))
24
- * align packages with foldkit 0.128.1 ([ebadeaa](https://github.com/opsydyn/fold-kit-experiments/commit/ebadeaaf29e854660aa2d5c9eba04c017269d075))
25
- * **astro-foldkit:** make island disposal one-shot ([694e17a](https://github.com/opsydyn/fold-kit-experiments/commit/694e17a32453c6f98561f6f2cb767d3c4c59ab8a))
26
- * **astro-foldkit:** preserve schema overlay compatibility ([4f4be0b](https://github.com/opsydyn/fold-kit-experiments/commit/4f4be0b5da7bebb7c40acb535727acd8f448a903))
27
- * **astro-foldkit:** scope navigation to island lifecycle ([e8627d8](https://github.com/opsydyn/fold-kit-experiments/commit/e8627d82cb7a76e4887b7e40121e2d6cf3906347))
28
- * 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))
29
33
 
30
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)
31
35
 
package/README.md CHANGED
@@ -34,13 +34,13 @@ export default defineConfig({
34
34
 
35
35
  ## Defining an app
36
36
 
37
- 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.
38
38
 
39
39
  ```ts
40
40
  // src/apps/counter/app.ts
41
- import { defineApp } from '@opsydyn/astro-foldkit/define-app';
41
+ import { lazyApp } from '@opsydyn/astro-foldkit/define-app';
42
42
 
43
- export default defineApp(() => import('./main'));
43
+ export default lazyApp(() => import('./main'));
44
44
  ```
45
45
 
46
46
  ```ts
@@ -69,14 +69,14 @@ The demo app's [`/request-diagnostics`](../../apps/web/src/pages/request-diagnos
69
69
 
70
70
  ## Passing props
71
71
 
72
- `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.
73
73
 
74
74
  ```ts
75
75
  // src/apps/greeting/app.ts
76
- import { defineApp } from '@opsydyn/astro-foldkit/define-app';
76
+ import { lazyApp } from '@opsydyn/astro-foldkit/define-app';
77
77
  import type { Name } from './model';
78
78
 
79
- export default defineApp<{ name: Name }>(() => import('./main'));
79
+ export default lazyApp<{ name: Name }>(() => import('./main'));
80
80
  ```
81
81
 
82
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:
@@ -175,10 +175,10 @@ The module returned by your loader must export:
175
175
 
176
176
  ## Exports
177
177
 
178
- | Entry point | Description |
179
- | :---------------------------------- | :-------------------------------------- |
180
- | `@opsydyn/astro-foldkit` | Default Astro integration (`foldkit()`) |
181
- | `@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 |
182
182
 
183
183
  The root entry point also exports the `NavigationConfig`, `NavigationEvent`, and `NavigationPhase` types.
184
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.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Astro integration and renderer for FoldKit.",
5
5
  "keywords": [
6
6
  "astro",
@@ -62,7 +62,7 @@
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
68
  "foldkit": "^0.129.0",