@opsydyn/astro-foldkit 0.7.2 → 0.8.1
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 +28 -2
- package/README.md +27 -16
- package/dist/build-id.d.mts +1 -1
- package/dist/build-id.mjs +1 -1
- package/dist/client.d.mts +1 -1
- package/dist/index.mjs +1 -2
- package/dist/server-render.d.mts +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,37 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## [0.
|
|
3
|
+
## [0.8.1](https://github.com/opsydyn/fold-kit-experiments/compare/astro-foldkit-v0.8.0...astro-foldkit-v0.8.1) (2026-10-10)
|
|
4
|
+
|
|
5
|
+
Example-site maintenance release: Stateflow Observatory is linked from the
|
|
6
|
+
Charts dashboard and shared navigation, which now wraps on narrow screens.
|
|
7
|
+
Rendered-page smoke tests cover both links. Public package APIs and the
|
|
8
|
+
FoldKit `>=0.167.0 <0.168.0` compatibility range are unchanged.
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
- **web:** link Stateflow from examples dashboard ([53f7856](https://github.com/opsydyn/fold-kit-experiments/commit/53f78568fd4dd84c06d7af805fa3acfb78ce07b5))
|
|
13
|
+
|
|
14
|
+
## [0.8.0](https://github.com/opsydyn/fold-kit-experiments/compare/astro-foldkit-v0.7.2...astro-foldkit-v0.8.0) (2026-10-09)
|
|
15
|
+
|
|
16
|
+
Upgrade FoldKit alongside this package: the supported peer range is now
|
|
17
|
+
`>=0.167.0 <0.168.0`, with Effect `4.0.0`. Public app and server APIs are unchanged.
|
|
18
|
+
The integration uses `@foldkit/vite-plugin` 0.27.x for coordinated client/server
|
|
19
|
+
build identity. See the [migration guide](https://github.com/opsydyn/fold-kit-experiments/blob/main/docs/migrations/foldkit-0.167.md)
|
|
20
|
+
and [release notes](https://github.com/opsydyn/fold-kit-experiments/blob/main/docs/releases/foldkit-0.167.md).
|
|
4
21
|
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
- support FoldKit 0.167 and keyed chart comparison ([6e3edf7](https://github.com/opsydyn/fold-kit-experiments/commit/6e3edf76d0e04047652c052e2254ccd67a2458d9))
|
|
25
|
+
|
|
26
|
+
### Bug Fixes
|
|
27
|
+
|
|
28
|
+
- **deps:** patch Astro to 7.2.8 ([65ebdb7](https://github.com/opsydyn/fold-kit-experiments/commit/65ebdb74999e7bcafb127f3c87e424dc165a3a7d))
|
|
29
|
+
|
|
30
|
+
## [0.7.2](https://github.com/opsydyn/fold-kit-experiments/compare/astro-foldkit-v0.7.1...astro-foldkit-v0.7.2) (2026-10-05)
|
|
5
31
|
|
|
6
32
|
### Bug Fixes
|
|
7
33
|
|
|
8
|
-
|
|
34
|
+
- support FoldKit 0.166.0 ([248636e](https://github.com/opsydyn/fold-kit-experiments/commit/248636efea03a2048432260da6261bb657a282dc))
|
|
9
35
|
|
|
10
36
|
## [0.7.1](https://github.com/opsydyn/fold-kit-experiments/compare/astro-foldkit-v0.7.0...astro-foldkit-v0.7.1) (2026-10-04)
|
|
11
37
|
|
package/README.md
CHANGED
|
@@ -20,8 +20,8 @@ npm install astro foldkit
|
|
|
20
20
|
|
|
21
21
|
## FoldKit compatibility
|
|
22
22
|
|
|
23
|
-
`@opsydyn/astro-foldkit`
|
|
24
|
-
`4.0.0`, and the matching `@foldkit/vite-plugin` `0.
|
|
23
|
+
`@opsydyn/astro-foldkit` targets FoldKit `0.167.x`, stable Effect
|
|
24
|
+
`4.0.0`, and the matching `@foldkit/vite-plugin` `0.27.x` line.
|
|
25
25
|
Applications can define interruptible work with
|
|
26
26
|
`Command.define(name, { interrupt: true, ... })` inside their own update loop;
|
|
27
27
|
this integration continues to own Astro rendering, hydration, and lifecycle
|
|
@@ -36,21 +36,25 @@ import { defineConfig } from 'astro/config';
|
|
|
36
36
|
import foldkit from '@opsydyn/astro-foldkit';
|
|
37
37
|
|
|
38
38
|
export default defineConfig({
|
|
39
|
-
integrations: [
|
|
40
|
-
foldkit({
|
|
41
|
-
server: {
|
|
42
|
-
buildId: process.env.FOLDKIT_BUILD_ID ?? 'development',
|
|
43
|
-
},
|
|
44
|
-
}),
|
|
45
|
-
],
|
|
39
|
+
integrations: [foldkit()],
|
|
46
40
|
});
|
|
47
41
|
```
|
|
48
42
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
43
|
+
FoldKit generates one public build identity for the coordinated client and server
|
|
44
|
+
artifacts. The integration uses that compiled identity by default, including
|
|
45
|
+
Astro's prerender and Cloudflare environments. Astro continues to own the HTML
|
|
46
|
+
document, assets, and deployment adapter; do not enable the standalone FoldKit
|
|
47
|
+
`ssr.build` pipeline inside this integration.
|
|
48
|
+
|
|
49
|
+
For separately built artifacts, supply the same deployment-specific
|
|
50
|
+
`FOLDKIT_BUILD_ID` environment variable to every build, or configure
|
|
51
|
+
`foldkit({ server: { buildId: 'release-unique-deployment-id' } })`. The ID appears
|
|
52
|
+
in public HTML, so it must not contain secrets. Do not reuse it across deployments
|
|
53
|
+
with different rendering inputs. Blank `server.buildId` options are rejected, and FoldKit
|
|
54
|
+
fails closed when neither a compiled identity nor an explicit override is available.
|
|
55
|
+
|
|
56
|
+
See the [0.167 migration guide](../../docs/migrations/foldkit-0.167.md) for the
|
|
57
|
+
subscription API changes and package compatibility checks.
|
|
54
58
|
|
|
55
59
|
## Defining an app
|
|
56
60
|
|
|
@@ -97,6 +101,13 @@ serialisation and client directive behavior.
|
|
|
97
101
|
|
|
98
102
|
The demo app's [`/request-diagnostics`](../../apps/web/src/pages/request-diagnostics.astro) page shows the integration boundary with a practical machine-driven chart workflow. The page uses `@opsydyn/astro-foldkit` for hydration, `@opsydyn/foldkit-viz` for chart primitives, and `foldkit/experimental/machine` in the application update layer.
|
|
99
103
|
|
|
104
|
+
The [`/comparison`](../../apps/web/src/pages/comparison.astro) example hosts
|
|
105
|
+
dynamic scatter/histogram panels using the same `lazyApp` island contract.
|
|
106
|
+
Stable panel IDs, `foldChildAt`, linked selection, measurements and focus policy
|
|
107
|
+
belong to the application. Astro provides hydration and lifecycle facts only;
|
|
108
|
+
no additional integration API or server-rendering opt-in is required. The promo
|
|
109
|
+
hosts the maintained workbench with source inspection and standalone exports.
|
|
110
|
+
|
|
100
111
|
## Server-rendered pages (opt-in)
|
|
101
112
|
|
|
102
113
|
Use `definePage` when one FoldKit application owns the document content for an
|
|
@@ -486,7 +497,7 @@ element.addEventListener(
|
|
|
486
497
|
| Package | Version |
|
|
487
498
|
| :-------- | :-------------------- |
|
|
488
499
|
| `astro` | `≥ 5.0` |
|
|
489
|
-
| `foldkit` | `≥ 0.
|
|
500
|
+
| `foldkit` | `≥ 0.167.0 < 0.168.0` |
|
|
490
501
|
|
|
491
502
|
## Stateflow Observatory example
|
|
492
503
|
|
|
@@ -499,7 +510,7 @@ replay policy, and trace inspector. The graph consumes plain layout records.
|
|
|
499
510
|
This slice adds no Astro integration API and moves no async work into the
|
|
500
511
|
integration. Commands and subscriptions remain app-owned, including telemetry
|
|
501
512
|
emission, validation of inbound replay events, and the reduced-motion
|
|
502
|
-
`
|
|
513
|
+
`Dom.streamFromMediaQuery` stream in a `Subscription.persistentEntry`. That subscription is the app's
|
|
503
514
|
example of FoldKit PR [#1424](https://github.com/foldkit/foldkit/pull/1424): it
|
|
504
515
|
records the browser's initial media-query match and subsequent changes, then
|
|
505
516
|
lets the Model decide whether visual motion is allowed.
|
package/dist/build-id.d.mts
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
type FoldkitEnv = Readonly<{
|
|
3
3
|
FOLDKIT_BUILD_ID?: string;
|
|
4
4
|
}>;
|
|
5
|
-
declare function readFoldkitBuildId(env?: FoldkitEnv | undefined): string;
|
|
5
|
+
declare function readFoldkitBuildId(env?: FoldkitEnv | undefined): string | undefined;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { readFoldkitBuildId };
|
package/dist/build-id.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
//#region src/build-id.ts
|
|
2
2
|
function readFoldkitBuildId(env = import.meta.env) {
|
|
3
3
|
const buildId = env?.FOLDKIT_BUILD_ID;
|
|
4
|
-
if (buildId
|
|
4
|
+
if (buildId !== void 0 && buildId.trim() === "") throw new Error("FOLDKIT_BUILD_ID must be non-empty when configured. Omit it to use the generated build identity.");
|
|
5
5
|
return buildId;
|
|
6
6
|
}
|
|
7
7
|
//#endregion
|
package/dist/client.d.mts
CHANGED
|
@@ -5,7 +5,7 @@ import { a as FoldkitApp, n as AppConfigContract } from "./types-DDk3MMb7.mjs";
|
|
|
5
5
|
interface RuntimeConfigInput {}
|
|
6
6
|
interface RuntimeProgram {}
|
|
7
7
|
interface RuntimeHydrationOptions {
|
|
8
|
-
readonly buildId
|
|
8
|
+
readonly buildId?: string;
|
|
9
9
|
}
|
|
10
10
|
interface ClientSlots {}
|
|
11
11
|
type EventTargetLike = {
|
package/dist/index.mjs
CHANGED
|
@@ -4,7 +4,6 @@ import { foldkit as foldkit$1 } from "@foldkit/vite-plugin";
|
|
|
4
4
|
function foldkit(options = {}) {
|
|
5
5
|
const configuredBuildId = options.server?.buildId;
|
|
6
6
|
if (configuredBuildId !== void 0 && configuredBuildId.trim() === "") throw new Error("foldkit({ server: { buildId } }) requires a non-empty server.buildId.");
|
|
7
|
-
const buildId = configuredBuildId ?? "development";
|
|
8
7
|
return {
|
|
9
8
|
name: "astro-foldkit",
|
|
10
9
|
hooks: { "astro:config:setup": ({ addRenderer, updateConfig }) => {
|
|
@@ -13,7 +12,7 @@ function foldkit(options = {}) {
|
|
|
13
12
|
clientEntrypoint: fileURLToPath(new URL("./client.mjs", import.meta.url)),
|
|
14
13
|
serverEntrypoint: fileURLToPath(new URL("./server.mjs", import.meta.url))
|
|
15
14
|
});
|
|
16
|
-
updateConfig({ vite: { plugins: [foldkit$1(
|
|
15
|
+
updateConfig({ vite: { plugins: [foldkit$1(options.server)] } });
|
|
17
16
|
} }
|
|
18
17
|
};
|
|
19
18
|
}
|
package/dist/server-render.d.mts
CHANGED
|
@@ -3,6 +3,6 @@ import { RenderedApplication } from "foldkit/experimental/server";
|
|
|
3
3
|
|
|
4
4
|
//#region src/server-render.d.ts
|
|
5
5
|
type ServerConfig<Flags extends object> = Pick<PageConfigContract<Flags>, 'Flags' | 'init' | 'view'>;
|
|
6
|
-
declare function renderFoldkitServerApplication<Flags extends object>(config: ServerConfig<Flags>, flags: Flags, buildId
|
|
6
|
+
declare function renderFoldkitServerApplication<Flags extends object>(config: ServerConfig<Flags>, flags: Flags, buildId?: string): Promise<RenderedApplication>;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { renderFoldkitServerApplication };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opsydyn/astro-foldkit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "Astro integration and renderer for FoldKit.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"astro",
|
|
@@ -72,21 +72,21 @@
|
|
|
72
72
|
"check:fix": "oxfmt . && NODE_OPTIONS=\"--experimental-strip-types\" oxlint --fix ."
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"@foldkit/vite-plugin": "^0.
|
|
75
|
+
"@foldkit/vite-plugin": "^0.27.0",
|
|
76
76
|
"effect": "4.0.0"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
79
|
"@types/node": "^22.0.0",
|
|
80
|
-
"astro": "7.
|
|
80
|
+
"astro": "7.2.8",
|
|
81
81
|
"bun-types": "^1.3.14",
|
|
82
82
|
"fast-check": "^4.8.0",
|
|
83
|
-
"foldkit": "0.
|
|
83
|
+
"foldkit": "0.167.0",
|
|
84
84
|
"tsdown": "^0.21.8",
|
|
85
85
|
"typescript": "^6.0.3"
|
|
86
86
|
},
|
|
87
87
|
"peerDependencies": {
|
|
88
88
|
"astro": ">=5.0.0",
|
|
89
|
-
"foldkit": ">=0.
|
|
89
|
+
"foldkit": ">=0.167.0 <0.168.0"
|
|
90
90
|
},
|
|
91
91
|
"engines": {
|
|
92
92
|
"node": ">=22.0.0"
|