foldkit 0.82.0 → 0.82.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.
@@ -12,10 +12,10 @@ export declare const RequestModelMessage: S.Struct<{
12
12
  }>;
13
13
  /** Browser → plugin: the runtime requests its previously-preserved Model on startup. */
14
14
  export type RequestModelMessage = typeof RequestModelMessage.Type;
15
- /** Plugin → browser: the plugin returns the preserved Model for a given runtime id. `model` is `undefined` when nothing is preserved (cold start, manual refresh). */
15
+ /** Plugin → browser: the plugin returns the preserved Model for a given runtime id. `model` is omitted when nothing is preserved (cold start, manual refresh). */
16
16
  export declare const RestoreModelMessage: S.Struct<{
17
17
  readonly id: S.String;
18
- readonly model: S.Unknown;
18
+ readonly model: S.optional<S.Unknown>;
19
19
  }>;
20
20
  /** Plugin → browser: the plugin returns the preserved Model for a given runtime id. */
21
21
  export type RestoreModelMessage = typeof RestoreModelMessage.Type;
@@ -1 +1 @@
1
- {"version":3,"file":"hmrProtocol.d.ts","sourceRoot":"","sources":["../../src/runtime/hmrProtocol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,QAAQ,CAAA;AAEpC,6HAA6H;AAC7H,eAAO,MAAM,oBAAoB;;;EAG/B,CAAA;AACF,mFAAmF;AACnF,MAAM,MAAM,oBAAoB,GAAG,OAAO,oBAAoB,CAAC,IAAI,CAAA;AAEnE,sGAAsG;AACtG,eAAO,MAAM,mBAAmB;;EAE9B,CAAA;AACF,wFAAwF;AACxF,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAC,IAAI,CAAA;AAEjE,sKAAsK;AACtK,eAAO,MAAM,mBAAmB;;;EAG9B,CAAA;AACF,uFAAuF;AACvF,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAC,IAAI,CAAA"}
1
+ {"version":3,"file":"hmrProtocol.d.ts","sourceRoot":"","sources":["../../src/runtime/hmrProtocol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,QAAQ,CAAA;AAEpC,6HAA6H;AAC7H,eAAO,MAAM,oBAAoB;;;EAG/B,CAAA;AACF,mFAAmF;AACnF,MAAM,MAAM,oBAAoB,GAAG,OAAO,oBAAoB,CAAC,IAAI,CAAA;AAEnE,sGAAsG;AACtG,eAAO,MAAM,mBAAmB;;EAE9B,CAAA;AACF,wFAAwF;AACxF,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAC,IAAI,CAAA;AAEjE,kKAAkK;AAClK,eAAO,MAAM,mBAAmB;;;EAG9B,CAAA;AACF,uFAAuF;AACvF,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAC,IAAI,CAAA"}
@@ -8,8 +8,8 @@ export const PreserveModelMessage = S.Struct({
8
8
  export const RequestModelMessage = S.Struct({
9
9
  id: S.String,
10
10
  });
11
- /** Plugin → browser: the plugin returns the preserved Model for a given runtime id. `model` is `undefined` when nothing is preserved (cold start, manual refresh). */
11
+ /** Plugin → browser: the plugin returns the preserved Model for a given runtime id. `model` is omitted when nothing is preserved (cold start, manual refresh). */
12
12
  export const RestoreModelMessage = S.Struct({
13
13
  id: S.String,
14
- model: S.Unknown,
14
+ model: S.optional(S.Unknown),
15
15
  });
@@ -447,8 +447,8 @@ export const run = (program) => {
447
447
  hot.send('foldkit:request-model', encodeRequestModelMessage(RequestModelMessage.make({ id: runtimeId })));
448
448
  return Effect.sync(() => hot.off('foldkit:restore-model', handler));
449
449
  }), Effect.timeout(PLUGIN_RESPONSE_TIMEOUT_MS), Effect.catchTag('TimeoutError', () => {
450
- console.warn('[foldkit] No response from vite-plugin-foldkit. Add it to your vite.config.ts for HMR model preservation:\n\n' +
451
- " import foldkit from 'vite-plugin-foldkit'\n\n" +
450
+ console.warn('[foldkit] No response from @foldkit/vite-plugin. Add it to your vite.config.ts for HMR model preservation:\n\n' +
451
+ " import { foldkit } from '@foldkit/vite-plugin'\n\n" +
452
452
  ' export default defineConfig({ plugins: [foldkit()] })\n\n' +
453
453
  'Starting without HMR support.');
454
454
  return Effect.succeed(undefined);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foldkit",
3
- "version": "0.82.0",
3
+ "version": "0.82.1",
4
4
  "description": "A TypeScript frontend framework, built on Effect and architected like Elm",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -191,7 +191,7 @@
191
191
  "@effect/platform-browser": "4.0.0-beta.59",
192
192
  "@effect/vitest": "4.0.0-beta.59",
193
193
  "effect": "4.0.0-beta.59",
194
- "happy-dom": "^18.0.1",
194
+ "happy-dom": "^20.0.0",
195
195
  "typescript": "^6.0.2",
196
196
  "vitest": "^3.2.4"
197
197
  },