foldkit 0.158.2 → 0.159.0-canary.4e90e99d9ad3

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.
Files changed (82) hide show
  1. package/README.md +2 -2
  2. package/dist/customElement/index.d.ts +15 -8
  3. package/dist/customElement/index.d.ts.map +1 -1
  4. package/dist/customElement/index.js +28 -5
  5. package/dist/customElement/public.d.ts +1 -1
  6. package/dist/customElement/public.d.ts.map +1 -1
  7. package/dist/dom/dom.d.ts +7 -4
  8. package/dist/dom/dom.d.ts.map +1 -1
  9. package/dist/dom/dom.js +8 -5
  10. package/dist/experimental/server/fetch.d.ts +42 -0
  11. package/dist/experimental/server/fetch.d.ts.map +1 -0
  12. package/dist/experimental/server/fetch.js +75 -0
  13. package/dist/experimental/server/index.d.ts +1 -0
  14. package/dist/experimental/server/index.d.ts.map +1 -1
  15. package/dist/experimental/server/index.js +1 -0
  16. package/dist/experimental/server/public.d.ts +2 -2
  17. package/dist/experimental/server/public.d.ts.map +1 -1
  18. package/dist/experimental/server/public.js +1 -1
  19. package/dist/experimental/server/server.d.ts +3 -2
  20. package/dist/experimental/server/server.d.ts.map +1 -1
  21. package/dist/experimental/server/template.js +4 -4
  22. package/dist/html/index.d.ts +42 -3
  23. package/dist/html/index.d.ts.map +1 -1
  24. package/dist/html/index.js +147 -10
  25. package/dist/hydrationMarker.d.ts +2 -2
  26. package/dist/hydrationMarker.d.ts.map +1 -1
  27. package/dist/hydrationMarker.js +2 -2
  28. package/dist/runtime/devToolsConfig.d.ts +3 -3
  29. package/dist/runtime/devToolsConfig.d.ts.map +1 -1
  30. package/dist/runtime/devToolsConfig.js +3 -3
  31. package/dist/runtime/hydrationHandoff.d.ts +5 -4
  32. package/dist/runtime/hydrationHandoff.d.ts.map +1 -1
  33. package/dist/runtime/hydrationHandoff.js +14 -13
  34. package/dist/runtime/{hmrProtocol.d.ts → modelPreservation.d.ts} +3 -3
  35. package/dist/runtime/modelPreservation.d.ts.map +1 -0
  36. package/dist/runtime/{hmrProtocol.js → modelPreservation.js} +2 -2
  37. package/dist/runtime/modelPreservationBridge.d.ts +4 -0
  38. package/dist/runtime/modelPreservationBridge.d.ts.map +1 -0
  39. package/dist/runtime/{hmrModelBridge.js → modelPreservationBridge.js} +7 -7
  40. package/dist/runtime/modelPreservationPublic.d.ts +2 -0
  41. package/dist/runtime/modelPreservationPublic.d.ts.map +1 -0
  42. package/dist/runtime/{hmrProtocolPublic.js → modelPreservationPublic.js} +1 -1
  43. package/dist/runtime/preserveScheduler.d.ts +1 -1
  44. package/dist/runtime/runtime.d.ts +8 -7
  45. package/dist/runtime/runtime.d.ts.map +1 -1
  46. package/dist/runtime/runtime.js +16 -16
  47. package/dist/runtime/{hmrScroll.d.ts → scrollPreservation.d.ts} +1 -1
  48. package/dist/runtime/scrollPreservation.d.ts.map +1 -0
  49. package/dist/runtime/{hmrScroll.js → scrollPreservation.js} +3 -3
  50. package/dist/runtime/slowPhase.d.ts +2 -1
  51. package/dist/runtime/slowPhase.d.ts.map +1 -1
  52. package/dist/runtime/start.d.ts +10 -7
  53. package/dist/runtime/start.d.ts.map +1 -1
  54. package/dist/runtime/start.js +21 -9
  55. package/dist/runtime/visibility.d.ts +2 -2
  56. package/dist/runtime/visibility.d.ts.map +1 -1
  57. package/dist/runtime/visibility.js +2 -2
  58. package/dist/schema/index.d.ts +42 -12
  59. package/dist/schema/index.d.ts.map +1 -1
  60. package/dist/schema/index.js +12 -10
  61. package/dist/test/apps/contentEditableEditor.d.ts +32 -0
  62. package/dist/test/apps/contentEditableEditor.d.ts.map +1 -0
  63. package/dist/test/apps/contentEditableEditor.js +39 -0
  64. package/dist/test/apps/fileUpload.d.ts.map +1 -1
  65. package/dist/test/apps/fileUpload.js +2 -1
  66. package/dist/test/apps/formChild.js +1 -1
  67. package/dist/test/apps/keypressSelf.d.ts +26 -0
  68. package/dist/test/apps/keypressSelf.d.ts.map +1 -0
  69. package/dist/test/apps/keypressSelf.js +30 -0
  70. package/dist/test/apps/pointer.d.ts.map +1 -1
  71. package/dist/test/apps/pointer.js +10 -11
  72. package/dist/test/scene.d.ts +28 -6
  73. package/dist/test/scene.d.ts.map +1 -1
  74. package/dist/test/scene.js +38 -13
  75. package/dist/vdom.js +5 -5
  76. package/package.json +4 -4
  77. package/dist/runtime/hmrModelBridge.d.ts +0 -4
  78. package/dist/runtime/hmrModelBridge.d.ts.map +0 -1
  79. package/dist/runtime/hmrProtocol.d.ts.map +0 -1
  80. package/dist/runtime/hmrProtocolPublic.d.ts +0 -2
  81. package/dist/runtime/hmrProtocolPublic.d.ts.map +0 -1
  82. package/dist/runtime/hmrScroll.d.ts.map +0 -1
@@ -1,7 +1,7 @@
1
1
  /** Attribute stamped on a hydratable server-rendered application root. Its
2
2
  * nonempty value is the runtime id used to pair the root with its Flags
3
- * payload and scope preserved HMR state. `makeApplication` locates the root;
4
- * `Runtime.hydrate` adopts it. */
3
+ * payload and scope Model and scroll preservation. `makeApplication` locates
4
+ * the root; `Runtime.hydrate` adopts it. */
5
5
  export const FOLDKIT_APP_ATTRIBUTE = 'data-foldkit-app';
6
6
  /** Attribute on the JSON script tag carrying the Schema-encoded flags the
7
7
  * server rendered with. A hydrating runtime decodes this payload instead of
@@ -72,9 +72,9 @@ export type ResolvedDevToolsConfig = Readonly<{
72
72
  maybeOverlay: Option.Option<DevToolsOverlay>;
73
73
  }>;
74
74
  /** Resolves the DevTools config for this boot, or `Option.none()` when
75
- * DevTools is disabled or hidden. `'Development'` visibility requires Vite
76
- * HMR and a top-level window, so an app previewed inside an iframe does not
77
- * stack a second panel over its host's. */
75
+ * DevTools is disabled or hidden. `'Development'` visibility requires Vite's
76
+ * dev server and a top-level window, so an app previewed inside an iframe does
77
+ * not stack a second panel over its host's. */
78
78
  export declare const resolveDevToolsConfig: (devTools: DevToolsConfig | undefined) => Option.Option<ResolvedDevToolsConfig>;
79
79
  /** The Message tags `excludeFromHistory` keeps out of the DevTools history. */
80
80
  export declare const resolveExcludeFromHistoryTags: (devTools: DevToolsConfig | undefined) => ReadonlySet<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"devToolsConfig.d.ts","sourceRoot":"","sources":["../../src/runtime/devToolsConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAQ,MAAM,QAAQ,CAAA;AAE5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,KAAK,UAAU,EAAa,MAAM,iBAAiB,CAAA;AAE5D,0DAA0D;AAC1D,MAAM,MAAM,gBAAgB,GACxB,aAAa,GACb,YAAY,GACZ,UAAU,GACV,SAAS,CAAA;AAEb;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,YAAY,CAAA;AAEnD;;;;gFAIgF;AAChF,MAAM,MAAM,kBAAkB,GAC1B,YAAY,GACZ,QAAQ,CAAC;IAAE,WAAW,EAAE,YAAY,CAAC;IAAC,UAAU,EAAE,YAAY,CAAA;CAAE,CAAC,CAAA;AAErE;;;;;;;;;GASG;AACH,MAAM,MAAM,eAAe,GAAG,CAC5B,KAAK,EAAE,aAAa,EACpB,QAAQ,EAAE,gBAAgB,EAC1B,IAAI,EAAE,YAAY,EAClB,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,KAC/B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAA;AAE5C;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,cAAc,GACtB,KAAK,GACL,QAAQ,CAAC;IACP,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB,QAAQ,CAAC,EAAE,gBAAgB,CAAA;IAC3B,IAAI,CAAC,EAAE,kBAAkB,CAAA;IACzB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,kBAAkB,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;IAC1C,UAAU,CA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AAsB,GAAG,QAAQ,CAAC;IAC5C,QAAQ,EAAE,gBAAgB,CAAA;IAC1B,IAAI,EAAE,YAAY,CAAA;IAClB,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IAClC,YAAY,EAAE,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,CAAA;CAC7C,CAAC,CAAA;AAEF;;;gDAGgD;AAChD,eAAO,MAAM,qBAAqB,aACtB,cAAc,GAAG,SAAS,KACnC,MAAM,CAAC,MAAM,CAAC,sBAAsB,CAmBtC,CAAA;AAED,+EAA+E;AAC/E,eAAO,MAAM,6BAA6B,aAC9B,cAAc,GAAG,SAAS,KACnC,WAAW,CAAC,MAAM,CASlB,CAAA;AAEH,mEAAmE;AACnE,eAAO,MAAM,yBAAyB,aAC1B,cAAc,GAAG,SAAS,KACnC,MAAM,GAAG,SAaT,CAAA;AAEH,6EAA6E;AAC7E,eAAO,MAAM,+BAA+B,aAChC,cAAc,GAAG,SAAS,KACnC,MAAM,GAAG,SAUT,CAAA"}
@@ -20,9 +20,9 @@ const DEV_TOOLS_MAX_ENTRIES_MIN = 20;
20
20
  const DEV_TOOLS_MAX_ENTRIES_MAX = 500;
21
21
  const DEV_TOOLS_KEYFRAME_INTERVAL_MIN = 1;
22
22
  /** Resolves the DevTools config for this boot, or `Option.none()` when
23
- * DevTools is disabled or hidden. `'Development'` visibility requires Vite
24
- * HMR and a top-level window, so an app previewed inside an iframe does not
25
- * stack a second panel over its host's. */
23
+ * DevTools is disabled or hidden. `'Development'` visibility requires Vite's
24
+ * dev server and a top-level window, so an app previewed inside an iframe does
25
+ * not stack a second panel over its host's. */
26
26
  export const resolveDevToolsConfig = (devTools) => {
27
27
  const isInIframe = window.self !== window.top;
28
28
  return pipe(devTools ?? {}, Option.liftPredicate(config => config !== false), Option.filter(config => isVisible(config.show ?? DEFAULT_DEV_TOOLS_SHOW, !!import.meta.hot && !isInIframe)), Option.map(config => ({
@@ -26,17 +26,18 @@ export type ResolvedHydrationHandoff<Flags> = Readonly<{
26
26
  * another deployment, or a missing, duplicated, or undecodable Flags
27
27
  * payload contains the served page and stops startup. The build id is
28
28
  * compared before the payload text is read and before `init` runs, so
29
- * nothing acts on another deployment's data. An HMR-restored Model skips
30
- * adoption and gets a fresh patch against the stamped root.
29
+ * nothing acts on another deployment's data. A Model restored after a
30
+ * development reload skips adoption and gets a fresh patch against the
31
+ * stamped root.
31
32
  */
32
- export declare const resolveHydrationHandoff: <Flags, Resources>({ bootMode, hydration, bootFlags, configuredFlags, isFlagsRequired, FlagsCodec, hmrModel, container, buildId, provideResources, }: Readonly<{
33
+ export declare const resolveHydrationHandoff: <Flags, Resources>({ bootMode, hydration, bootFlags, configuredFlags, isFlagsRequired, FlagsCodec, preservedModel, container, buildId, provideResources, }: Readonly<{
33
34
  bootMode: BootMode;
34
35
  hydration: HydrationConfig | undefined;
35
36
  bootFlags: Effect.Effect<Flags, never, Resources> | undefined;
36
37
  configuredFlags: Option.Option<Effect.Effect<Flags, never, Resources>>;
37
38
  isFlagsRequired: boolean;
38
39
  FlagsCodec: Schema.Codec<Flags, any, unknown, unknown>;
39
- hmrModel: unknown;
40
+ preservedModel: unknown;
40
41
  container: HTMLElement;
41
42
  buildId: string | undefined;
42
43
  provideResources: <A>(effect: Effect.Effect<A, never, Resources>) => Effect.Effect<A>;
@@ -1 +1 @@
1
- {"version":3,"file":"hydrationHandoff.d.ts","sourceRoot":"","sources":["../../src/runtime/hydrationHandoff.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,MAAM,EAAE,MAAM,EAAa,MAAM,EAAQ,MAAM,QAAQ,CAAA;AAQvE;wCACwC;AACxC,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAA;AAK1C,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;IACrC,IAAI,EAAE,WAAW,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAA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D,QAAQ,CAAC;IACV,QAAQ,EAAE,QAAQ,CAAA;IAClB,SAAS,EAAE,eAAe,GAAG,SAAS,CAAA;IACtC,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,CAAC,GAAG,SAAS,CAAA;IAC7D,eAAe,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAA;IACtE,eAAe,EAAE,OAAO,CAAA;IACxB,UAAU,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;IACtD,cAAc,EAAE,OAAO,CAAA;IACvB,SAAS,EAAE,WAAW,CAAA;IACtB,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,gBAAgB,EAAE,CAAC,CAAC,EAClB,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,KACvC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;CACtB,CAAC,KAAG,MAAM,CAAC,MAAM,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAuK9C,CAAA"}
@@ -18,8 +18,8 @@ const hydrationForRoot = (root, isFlagsRequired) => {
18
18
  // replace-parity case, where the server root took the placeholder's place and
19
19
  // `getElementById` no longer finds it, so the stamp is the only handle.
20
20
  // A runtime id names one application for the whole page: it pairs a root with
21
- // its Flags payload, and it keys the Model and scroll position hot reloading
22
- // preserves. Two roots sharing one are not two applications but one claimed
21
+ // its Flags payload, and it keys the preserved Model and scroll position. Two
22
+ // roots sharing one are not two applications but one claimed
23
23
  // twice, so whichever boots second would read the other's handoff and restore
24
24
  // the other's Model. `injectIntoTemplate` refuses to build such a page; this is
25
25
  // the check for a page assembled some other way.
@@ -35,8 +35,8 @@ const assertRuntimeIdsAreUnique = (stampedRoots) => {
35
35
  containRefusedPage(root.ownerDocument);
36
36
  throw new Error('[foldkit] Found a server-rendered root with an empty ' +
37
37
  `\`${FOLDKIT_APP_ATTRIBUTE}\` stamp. A hydratable root must carry ` +
38
- 'a nonempty runtime id so the runtime can pair it with its Flags ' +
39
- 'payload and preserved HMR state.');
38
+ 'a nonempty runtime id so the runtime can scope its Flags, Model, ' +
39
+ 'and scroll preservation.');
40
40
  }
41
41
  if (!root.ownerDocument.body?.contains(root)) {
42
42
  containRefusedPage(root.ownerDocument);
@@ -49,8 +49,8 @@ const assertRuntimeIdsAreUnique = (stampedRoots) => {
49
49
  containRefusedPage(root.ownerDocument);
50
50
  throw new Error(`[foldkit] Found more than one server-rendered root stamped ` +
51
51
  `"${runtimeId}". A runtime id names one application for the whole ` +
52
- 'page: it pairs a root with its Flags payload and keys the Model and ' +
53
- 'scroll position hot reloading preserves, so two roots sharing one ' +
52
+ 'page: it pairs a root with its Flags payload and keys the preserved ' +
53
+ 'Model and scroll position, so two roots sharing one ' +
54
54
  "would take each other's state. Remove the duplicate root. Foldkit " +
55
55
  'hydrates one page-owning application per document.');
56
56
  }
@@ -303,10 +303,11 @@ export const findDocumentHydration = (container, isFlagsRequired) => {
303
303
  * another deployment, or a missing, duplicated, or undecodable Flags
304
304
  * payload contains the served page and stops startup. The build id is
305
305
  * compared before the payload text is read and before `init` runs, so
306
- * nothing acts on another deployment's data. An HMR-restored Model skips
307
- * adoption and gets a fresh patch against the stamped root.
306
+ * nothing acts on another deployment's data. A Model restored after a
307
+ * development reload skips adoption and gets a fresh patch against the
308
+ * stamped root.
308
309
  */
309
- export const resolveHydrationHandoff = ({ bootMode, hydration, bootFlags, configuredFlags, isFlagsRequired, FlagsCodec, hmrModel, container, buildId, provideResources, }) => Effect.gen(function* () {
310
+ export const resolveHydrationHandoff = ({ bootMode, hydration, bootFlags, configuredFlags, isFlagsRequired, FlagsCodec, preservedModel, container, buildId, provideResources, }) => Effect.gen(function* () {
310
311
  const maybeResolveFreshFlags = Option.orElse(Option.fromNullishOr(bootFlags), () => configuredFlags);
311
312
  const resolveFreshFlags = Option.match(maybeResolveFreshFlags, {
312
313
  onNone: () => isFlagsRequired
@@ -364,11 +365,11 @@ export const resolveHydrationHandoff = ({ bootMode, hydration, bootFlags, config
364
365
  return yield* Effect.die(skew);
365
366
  }
366
367
  }
367
- // NOTE: an HMR-restored Model wins over DOM adoption because the
368
- // server DOM reflects older code. The hydration handoff is still
369
- // required, but the restored Model gets a fresh patch against its
368
+ // NOTE: a Model restored after a development reload wins over DOM adoption
369
+ // because the server DOM reflects older code. The hydration handoff is
370
+ // still required, but the restored Model gets a fresh patch against its
370
371
  // stamped root.
371
- const maybeHydrationRoot = Predicate.isUndefined(hmrModel)
372
+ const maybeHydrationRoot = Predicate.isUndefined(preservedModel)
372
373
  ? Option.map(maybeRequestedHydration, requestedHydration => requestedHydration.root)
373
374
  : Option.none();
374
375
  const maybeHydrationFlags = yield* Option.match(maybeRequestedHydration, {
@@ -1,9 +1,9 @@
1
1
  import { Schema } from 'effect';
2
- /** Browser → plugin: the runtime preserves its current Model under a stable id so it can be restored after a full reload. `isHmrReload` is set by the runtime when flushing on `vite:beforeFullReload` to mark the entry as eligible for restoration; absent or `false` for ordinary debounced preserves. */
2
+ /** Browser → plugin: the runtime preserves its current Model under a stable id so it can be restored after a full reload. `isReloadFlush` is set by the runtime when flushing on `vite:beforeFullReload` to mark the entry as eligible for restoration; absent or `false` for ordinary debounced preserves. */
3
3
  export declare const PreserveModelMessage: Schema.Struct<{
4
4
  readonly id: Schema.String;
5
5
  readonly model: Schema.Unknown;
6
- readonly isHmrReload: Schema.optional<Schema.Boolean>;
6
+ readonly isReloadFlush: Schema.optional<Schema.Boolean>;
7
7
  }>;
8
8
  /** Browser → plugin: the runtime preserves its current Model under a stable id. */
9
9
  export type PreserveModelMessage = typeof PreserveModelMessage.Type;
@@ -20,4 +20,4 @@ export declare const RestoreModelMessage: Schema.Struct<{
20
20
  }>;
21
21
  /** Plugin → browser: the plugin returns the preserved Model for a given runtime id. */
22
22
  export type RestoreModelMessage = typeof RestoreModelMessage.Type;
23
- //# sourceMappingURL=hmrProtocol.d.ts.map
23
+ //# sourceMappingURL=modelPreservation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modelPreservation.d.ts","sourceRoot":"","sources":["../../src/runtime/modelPreservation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B,+SAA+S;AAC/S,eAAO,MAAM,oBAAoB;;;;EAI/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"}
@@ -1,9 +1,9 @@
1
1
  import { Schema } from 'effect';
2
- /** Browser → plugin: the runtime preserves its current Model under a stable id so it can be restored after a full reload. `isHmrReload` is set by the runtime when flushing on `vite:beforeFullReload` to mark the entry as eligible for restoration; absent or `false` for ordinary debounced preserves. */
2
+ /** Browser → plugin: the runtime preserves its current Model under a stable id so it can be restored after a full reload. `isReloadFlush` is set by the runtime when flushing on `vite:beforeFullReload` to mark the entry as eligible for restoration; absent or `false` for ordinary debounced preserves. */
3
3
  export const PreserveModelMessage = Schema.Struct({
4
4
  id: Schema.String,
5
5
  model: Schema.Unknown,
6
- isHmrReload: Schema.optional(Schema.Boolean),
6
+ isReloadFlush: Schema.optional(Schema.Boolean),
7
7
  });
8
8
  /** Browser → plugin: the runtime requests its previously-preserved Model on startup, scoped by id. */
9
9
  export const RequestModelMessage = Schema.Struct({
@@ -0,0 +1,4 @@
1
+ import { Effect } from 'effect';
2
+ export declare const preserveModel: (id: string, encodedModel: unknown, isReloadFlush: boolean) => void;
3
+ export declare const resolvePreservedModel: (runtimeId: string) => Effect.Effect<unknown>;
4
+ //# sourceMappingURL=modelPreservationBridge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modelPreservationBridge.d.ts","sourceRoot":"","sources":["../../src/runtime/modelPreservationBridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAgC,MAAM,QAAQ,CAAA;AAa7D,eAAO,MAAM,aAAa,OACpB,MAAM,gBACI,OAAO,iBACN,OAAO,KACrB,IASF,CAAA;AAQD,eAAO,MAAM,qBAAqB,cACrB,MAAM,KAChB,MAAM,CAAC,MAAM,CAAC,OAAO,CAqCvB,CAAA"}
@@ -1,19 +1,19 @@
1
1
  import { Effect, Exit, Function, Schema, pipe } from 'effect';
2
- import { PreserveModelMessage, RequestModelMessage, RestoreModelMessage, } from './hmrProtocol.js';
2
+ import { PreserveModelMessage, RequestModelMessage, RestoreModelMessage, } from './modelPreservation.js';
3
3
  const encodePreserveModelMessage = Schema.encodeUnknownSync(PreserveModelMessage);
4
4
  const encodeRequestModelMessage = Schema.encodeUnknownSync(RequestModelMessage);
5
5
  const decodeRestoreModelMessage = Schema.decodeUnknownExit(RestoreModelMessage);
6
- export const preserveModel = (id, encodedModel, isHmrReload) => {
6
+ export const preserveModel = (id, encodedModel, isReloadFlush) => {
7
7
  if (import.meta.hot) {
8
- import.meta.hot.send('foldkit:preserve-model', encodePreserveModelMessage(PreserveModelMessage.make({ id, model: encodedModel, isHmrReload })));
8
+ import.meta.hot.send('foldkit:preserve-model', encodePreserveModelMessage(PreserveModelMessage.make({ id, model: encodedModel, isReloadFlush })));
9
9
  }
10
10
  };
11
11
  const PLUGIN_RESPONSE_TIMEOUT_MS = 500;
12
- // NOTE: asks @foldkit/vite-plugin for a model preserved across the last HMR
12
+ // NOTE: asks @foldkit/vite-plugin for a model preserved across the last
13
13
  // reload. The plugin only serves a model whose preservation was flushed by a
14
14
  // reload, so a host-driven dispose-then-embed remount initializes fresh while
15
15
  // a code reload restores state.
16
- export const resolveHmrModel = (runtimeId) => {
16
+ export const resolvePreservedModel = (runtimeId) => {
17
17
  const hot = import.meta.hot;
18
18
  if (!hot) {
19
19
  return Effect.succeed(undefined);
@@ -34,10 +34,10 @@ export const resolveHmrModel = (runtimeId) => {
34
34
  hot.send('foldkit:request-model', encodeRequestModelMessage(RequestModelMessage.make({ id: runtimeId })));
35
35
  return Effect.sync(() => hot.off('foldkit:restore-model', handler));
36
36
  }), Effect.timeout(PLUGIN_RESPONSE_TIMEOUT_MS), Effect.catchTag('TimeoutError', () => {
37
- console.warn('[foldkit] No response from @foldkit/vite-plugin. Add it to your vite.config.ts for HMR model preservation:\n\n' +
37
+ console.warn('[foldkit] No response from @foldkit/vite-plugin. Add it to your vite.config.ts for Model preservation across reloads:\n\n' +
38
38
  " import { foldkit } from '@foldkit/vite-plugin'\n\n" +
39
39
  ' export default defineConfig({ plugins: [foldkit()] })\n\n' +
40
- 'Starting without HMR support.');
40
+ 'Starting without Model preservation.');
41
41
  return Effect.succeed(undefined);
42
42
  }));
43
43
  };
@@ -0,0 +1,2 @@
1
+ export { PreserveModelMessage, RequestModelMessage, RestoreModelMessage, } from './modelPreservation.js';
2
+ //# sourceMappingURL=modelPreservationPublic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modelPreservationPublic.d.ts","sourceRoot":"","sources":["../../src/runtime/modelPreservationPublic.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,wBAAwB,CAAA"}
@@ -1 +1 @@
1
- export { PreserveModelMessage, RequestModelMessage, RestoreModelMessage, } from './hmrProtocol.js';
1
+ export { PreserveModelMessage, RequestModelMessage, RestoreModelMessage, } from './modelPreservation.js';
@@ -10,7 +10,7 @@ import { type Duration, Effect, type Scope } from 'effect';
10
10
  * as a no-op. Synchronous semantics let the runtime call this from
11
11
  * `vite:beforeFullReload` via `Effect.runSync`, with no race against Vite's
12
12
  * `location.reload()`. The two-callback split lets the flush path send
13
- * `isHmrReload: true` while debounced calls send `false`.
13
+ * `isReloadFlush: true` while debounced calls send `false`.
14
14
  *
15
15
  * `cancel` drops the pending model and interrupts the in-flight fiber.
16
16
  * Forked fibers are tied to the construction scope via `forkIn`, so scope
@@ -40,8 +40,9 @@ export type RuntimeConfig<Model, Message, Flags, Resources = never, ManagedResou
40
40
  * instead of replacing it, and when the config declares Flags, `init` is
41
41
  * fed the Schema-decoded Flags payload the server embedded, so both sides
42
42
  * compute the same Model. Missing or undecodable handoff data is fatal.
43
- * An HMR-restored Model gets a fresh replace boot against the stamped root
44
- * because the restored code may no longer match the served DOM.
43
+ * A Model restored after a development reload gets a fresh replace boot
44
+ * against the stamped root because the restored code may no longer match the
45
+ * served DOM.
45
46
  */
46
47
  hydration?: HydrationConfig;
47
48
  routing?: RoutingConfig<Message>;
@@ -73,7 +74,7 @@ export type RuntimeConfig<Model, Message, Flags, Resources = never, ManagedResou
73
74
  * write site with a stack trace, rather than silently corrupting state or
74
75
  * breaking reference-equality change detection.
75
76
  *
76
- * Defaults to `true`. Activates only when Vite HMR is available, so production
77
+ * Defaults to `true`. Activates only under Vite's dev server, so production
77
78
  * builds pay nothing. Pass `false` to disable.
78
79
  *
79
80
  * Scope: only the Model is frozen. Messages are short-lived and are not
@@ -81,13 +82,13 @@ export type RuntimeConfig<Model, Message, Flags, Resources = never, ManagedResou
81
82
  */
82
83
  freezeModel?: boolean;
83
84
  /**
84
- * Restores the window scroll position across Vite HMR reloads. Every edit
85
+ * Restores the window scroll position across Vite dev reloads. Every edit
85
86
  * triggers a full page reload, which resets scroll to the top; this captures
86
87
  * `window.scrollX`/`scrollY` just before the reload and reapplies it once the
87
88
  * restored view has rendered, so editing a page you've scrolled deep into
88
89
  * doesn't bounce you back to the top on every save.
89
90
  *
90
- * Defaults to `true`. Activates only when Vite HMR is available and the
91
+ * Defaults to `true`. Activates only under Vite's dev server and the
91
92
  * runtime owns the document, so production builds and embedded `makeElement`
92
93
  * apps (which do not own the page's scroll) pay nothing. Pass `false` to
93
94
  * disable, for an app that drives its own scroll restoration.
@@ -152,7 +153,7 @@ export type FlagsSchemaConfig<Flags> = Readonly<{
152
153
  */
153
154
  export type MakeRuntimeReturn<P extends Ports | undefined = undefined, Flags = void, Resources = never, Kind extends 'Application' | 'Element' = 'Application' | 'Element'> = Readonly<{
154
155
  runtimeId: string;
155
- start: (hmrModel?: unknown) => Effect.Effect<void>;
156
+ start: (preservedModel?: unknown) => Effect.Effect<void>;
156
157
  ports: P;
157
158
  '~foldkit/RuntimeBoot'?: Readonly<{
158
159
  Flags: (flags: Flags) => Flags;
@@ -161,7 +162,7 @@ export type MakeRuntimeReturn<P extends Ports | undefined = undefined, Flags = v
161
162
  }>;
162
163
  }>;
163
164
  type RuntimeInternals = {
164
- startWith: (maybeConnector: Option.Option<HostConnector>, hmrModel?: unknown, bootMode?: BootMode, flags?: Effect.Effect<any, never, any>, buildId?: string) => Effect.Effect<void>;
165
+ startWith: (maybeConnector: Option.Option<HostConnector>, preservedModel?: unknown, bootMode?: BootMode, flags?: Effect.Effect<any, never, any>, buildId?: string) => Effect.Effect<void>;
165
166
  kind: 'Application' | 'Element';
166
167
  isEmbedActive: boolean;
167
168
  maybeActiveFiber: Option.Option<Fiber.Fiber<void>>;
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/runtime/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,MAAM,EAEN,KAAK,EACL,KAAK,EACL,MAAM,EAGN,MAAM,EAEP,MAAM,QAAQ,CAAA;AAEf,OAAO,EACL,QAAQ,EACR,KAAK,WAAW,EAEjB,MAAM,kBAAkB,CAAA;AACzB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AACnE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,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T,uBAAuB,EACvB,CAAC,EACD,IAAI,CACL,KAAG,iBAAiB,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,CAygB9C,CAAA"}
@@ -6,16 +6,16 @@ import { addNavigationEventListeners, } from './browserListeners.js';
6
6
  import { deepFreeze } from './deepFreeze.js';
7
7
  import { makeDevToolsIntegration } from './devToolsIntegration.js';
8
8
  import { createDuplicateIdScanner } from './duplicateIdScanner.js';
9
- import { preserveModel } from './hmrModelBridge.js';
10
- import { preserveScrollPosition, restorePreservedScrollPosition, } from './hmrScroll.js';
11
9
  import { makePortChannels, validatePorts, } from './hostConnector.js';
12
10
  import { resolveHydrationHandoff, } from './hydrationHandoff.js';
13
11
  import { forkManagedResourceFibers } from './managedResourceFibers.js';
14
12
  import { makeMessageQueue } from './messageQueue.js';
13
+ import { preserveModel } from './modelPreservationBridge.js';
15
14
  import { makePreserveScheduler } from './preserveScheduler.js';
16
15
  import { makeRenderer } from './renderer.js';
17
16
  import { makeResourceProvider } from './resourceProvider.js';
18
17
  import { makeRuntimeStatus } from './runtimeStatus.js';
18
+ import { preserveScrollPosition, restorePreservedScrollPosition, } from './scrollPreservation.js';
19
19
  import { __resolveSlowConfig, measureSlowPhase, reportSlowPhase, } from './slowPhase.js';
20
20
  import { forkSubscriptionFibers } from './subscriptionFibers.js';
21
21
  import { __resolveStartViewTransition, } from './viewTransition.js';
@@ -50,7 +50,7 @@ export const makeRuntime = ({ ports, kind, Model, Flags: FlagsCodec, configuredF
50
50
  const runtimeId = hydration !== undefined && hydration.runtimeId !== ''
51
51
  ? hydration.runtimeId
52
52
  : (container?.id ?? '');
53
- const startWith = (maybeConnector, hmrModel, bootMode = 'Fresh', bootFlags, buildId) => {
53
+ const startWith = (maybeConnector, preservedModel, bootMode = 'Fresh', bootFlags, buildId) => {
54
54
  // NOTE: one notifier per runtime, provided across the whole runtime
55
55
  // Effect so Commands, Subscriptions, and Mount-forked Effects all resolve
56
56
  // the same signal. A commit in one embedded application must never wake a
@@ -58,7 +58,7 @@ export const makeRuntime = ({ ports, kind, Model, Flags: FlagsCodec, configuredF
58
58
  const commitNotifier = createCommitNotifier();
59
59
  return Effect.scoped(Effect.gen(function* () {
60
60
  if (runtimeId === '') {
61
- return yield* Effect.die(new Error('[foldkit] Runtime container must have an `id` for HMR model preservation. ' +
61
+ return yield* Effect.die(new Error('[foldkit] Runtime container must have an `id` for Model preservation across reloads. ' +
62
62
  'Set `container.id = "app"` (or any unique string) before passing it to makeApplication or makeElement. ' +
63
63
  'On a server-rendered page the id comes from the `data-foldkit-app` root stamp instead.'));
64
64
  }
@@ -89,7 +89,7 @@ export const makeRuntime = ({ ports, kind, Model, Flags: FlagsCodec, configuredF
89
89
  configuredFlags,
90
90
  isFlagsRequired,
91
91
  FlagsCodec,
92
- hmrModel,
92
+ preservedModel,
93
93
  container,
94
94
  buildId,
95
95
  provideResources,
@@ -97,33 +97,33 @@ export const makeRuntime = ({ ports, kind, Model, Flags: FlagsCodec, configuredF
97
97
  const ModelJsonCodec = Schema.toCodecJson(
98
98
  /* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
99
99
  Model);
100
- const decodeHmrModel = Schema.decodeUnknownExit(ModelJsonCodec);
101
- const encodeHmrModel = Schema.encodeUnknownSync(ModelJsonCodec);
100
+ const decodePreservedModel = Schema.decodeUnknownExit(ModelJsonCodec);
101
+ const encodePreservedModel = Schema.encodeUnknownSync(ModelJsonCodec);
102
102
  const currentUrl = Option.fromNullishOr(routingConfig).pipe(Option.flatMap(() => urlFromString(window.location.href)));
103
103
  // NOTE: a restored Model skips `init`, so resolving Flags on that
104
104
  // path would build the `resources` Layer only to discard what it
105
105
  // produced. Gating the resolution on the restore decision is what
106
106
  // stops a reload from reconnecting whatever the Layer holds. It has
107
- // to stay ahead of the preserve-scheduler and HMR finalizers: a
107
+ // to stay ahead of the preserve-scheduler and preservation finalizers: a
108
108
  // Flags Effect that fails after those are registered tears down more
109
109
  // than it used to, and their release defects would bury its cause.
110
110
  const runInit = Effect.map(resolveFlags, flags => init(flags, Option.getOrUndefined(currentUrl)));
111
- const init_ = yield* hmrModel !== undefined
112
- ? Exit.match(decodeHmrModel(hmrModel), {
111
+ const init_ = yield* preservedModel !== undefined
112
+ ? Exit.match(decodePreservedModel(preservedModel), {
113
113
  onFailure: () => runInit,
114
114
  onSuccess: restoredModel => Effect.succeed({ model: restoredModel }),
115
115
  })
116
116
  : runInit;
117
117
  const initModelRaw = init_.model;
118
118
  const initCommands = init_.commands ?? [];
119
- // NOTE: keep `encodeHmrModel` off the dispatch hot path. It walks
119
+ // NOTE: keep `encodePreservedModel` off the dispatch hot path. It walks
120
120
  // the entire Model graph (O(modelSize) per call) and blocks input
121
121
  // on large Models. The scheduler defers encoding to a quiet window
122
- // and the `vite:beforeFullReload` flush covers the HMR boundary.
122
+ // and the `vite:beforeFullReload` flush covers the reload boundary.
123
123
  const PRESERVE_DEBOUNCE = Duration.millis(200);
124
124
  const preserveScheduler = yield* makePreserveScheduler({
125
- onDebounce: model => Effect.sync(() => preserveModel(runtimeId, encodeHmrModel(model), false)),
126
- onFlush: model => Effect.sync(() => preserveModel(runtimeId, encodeHmrModel(model), true)),
125
+ onDebounce: model => Effect.sync(() => preserveModel(runtimeId, encodePreservedModel(model), false)),
126
+ onFlush: model => Effect.sync(() => preserveModel(runtimeId, encodePreservedModel(model), true)),
127
127
  }, PRESERVE_DEBOUNCE);
128
128
  const hot = import.meta.hot;
129
129
  if (hot) {
@@ -342,14 +342,14 @@ export const makeRuntime = ({ ports, kind, Model, Flags: FlagsCodec, configuredF
342
342
  yield* Effect.never;
343
343
  })).pipe(Effect.provideService(RenderCommit, commitNotifier.service));
344
344
  };
345
- const start = (hmrModel) => startWith(Option.none(), hmrModel, 'Fresh');
345
+ const start = (preservedModel) => startWith(Option.none(), preservedModel, 'Fresh');
346
346
  const program = {
347
347
  runtimeId,
348
348
  start,
349
349
  ports,
350
350
  };
351
351
  runtimeInternals.set(program, {
352
- startWith: (maybeConnector, hmrModel, bootMode, flags, buildId) => startWith(maybeConnector, hmrModel, bootMode, flags, buildId),
352
+ startWith: (maybeConnector, preservedModel, bootMode, flags, buildId) => startWith(maybeConnector, preservedModel, bootMode, flags, buildId),
353
353
  kind,
354
354
  isEmbedActive: false,
355
355
  maybeActiveFiber: Option.none(),
@@ -18,4 +18,4 @@ export declare const takePreservedScrollPosition: (runtimeId: string) => Option.
18
18
  * defeating any CSS `scroll-behavior: smooth`. A no-op when nothing was
19
19
  * preserved. Consumes the stored offset, so a second call restores nothing. */
20
20
  export declare const restorePreservedScrollPosition: (runtimeId: string) => Effect.Effect<void>;
21
- //# sourceMappingURL=hmrScroll.d.ts.map
21
+ //# sourceMappingURL=scrollPreservation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scrollPreservation.d.ts","sourceRoot":"","sources":["../../src/runtime/scrollPreservation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAU,MAAM,QAAQ,CAAA;AAiB/C;+EAC+E;AAC/E,eAAO,MAAM,yBAAyB,cAAe,MAAM,KAAG,MAC/B,CAAA;AAE/B;;oCAEoC;AACpC,eAAO,MAAM,sBAAsB,cAAe,MAAM,KAAG,IAW1D,CAAA;AAED;;;0BAG0B;AAC1B,eAAO,MAAM,2BAA2B,cAC3B,MAAM,KAChB,MAAM,CAAC,MAAM,CAAC;IAAE,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAS1D,CAAA;AAED;;gFAEgF;AAChF,eAAO,MAAM,8BAA8B,cAC9B,MAAM,KAChB,MAAM,CAAC,MAAM,CAAC,IAAI,CAOjB,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import { Effect, Option, Schema } from 'effect';
2
2
  /**
3
- * Window scroll offset persisted across a Vite HMR full reload. Held in
3
+ * Window scroll offset persisted across a Vite dev full reload. Held in
4
4
  * `sessionStorage` as a JSON string so it survives the reload and can be
5
5
  * reapplied synchronously at the next init render, before the browser paints.
6
6
  */
@@ -9,7 +9,7 @@ const encodePreservedScrollPosition = Schema.encodeUnknownSync(PreservedScrollPo
9
9
  const decodePreservedScrollPosition = Schema.decodeUnknownOption(PreservedScrollPosition);
10
10
  /** The `sessionStorage` key a runtime uses for its preserved scroll offset,
11
11
  * scoped by runtime id so multiple runtimes never read each other's value. */
12
- export const preservedScrollStorageKey = (runtimeId) => `foldkit:hmr-scroll:${runtimeId}`;
12
+ export const preservedScrollStorageKey = (runtimeId) => `foldkit:scroll:${runtimeId}`;
13
13
  /** Captures the current window scroll offset under the runtime's key. Called
14
14
  * from the `vite:beforeFullReload` handler so the offset is stored just
15
15
  * before Vite reloads the page. */
@@ -20,7 +20,7 @@ export const preserveScrollPosition = (runtimeId) => {
20
20
  catch {
21
21
  // NOTE: sessionStorage throws when storage is disabled or blocked by a
22
22
  // privacy mode. Scroll restoration is a dev-only convenience, so a failure
23
- // here must never break the HMR reload this runs inside.
23
+ // here must never break the dev reload this runs inside.
24
24
  }
25
25
  };
26
26
  /** Reads and clears the preserved scroll offset for a runtime. Returns
@@ -63,7 +63,8 @@ type ResolvedSlowConfig<Model, Message> = Readonly<{
63
63
  * thresholds. Pass `false` to disable warnings entirely. Pass an object to
64
64
  * refine those defaults.
65
65
  *
66
- * - `show`: `'Development'` (default) enables warnings only when Vite HMR is active. `'Always'` enables them in every environment.
66
+ * - `show`: `'Development'` (default) enables warnings only under Vite's dev
67
+ * server. `'Always'` enables them in every environment.
67
68
  * - `measuredPhases`: Phases to measure. Defaults to every slow warning phase.
68
69
  * - `thresholdOverrides`: Per-phase budget overrides. Omitted fields keep defaults; overrides for unmeasured phases are ignored.
69
70
  * - `onSlow`: Callback for every measured phase that exceeds its budget. Replaces Foldkit's default `console.warn`; Foldkit will not also warn for tags your callback ignores.
@@ -1 +1 @@
1
- {"version":3,"file":"slowPhase.d.ts","sourceRoot":"","sources":["../../src/runtime/slowPhase.ts"],"names":[],"mappings":"AA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AAA;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,UAAU,CAAC,KAAK,EAAE,OAAO,IACjC,KAAK,GACL,QAAQ,CAAC;IACP,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB,cAAc,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,CAAA;IACzC,kBAAkB,CAAC,EAAE,sBAAsB,CAAA;IAC3C,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,CAAA;CACxD,CAAC,CAAA;AA4BN,eAAO,MAAM,mBAAmB,GAAI,KAAK,EAAE,OAAO,QAC1C,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,GAAG,SAAS,iBAC7B,CAAC,IAAI,EAAE,UAAU,KAAK,OAAO,KAC3C,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC,KAAK,EAAE,OAAO,CAAC,CA8ClD,CAAA;AAED,eAAO,MAAM,gBAAgB,GAAI,OAAO,EAAE,MAAM,eACjC,MAAM,CAAC,MAAM,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC,OACvD,MAAM,MAAM,KAChB,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CASzC,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,OAAO,eACxB,MAAM,CAAC,MAAM,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC,mBAC3C,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,eACzB,CAAC,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,KAAK,OAAO,KAChE,IAYF,CAAA;AAsBD,eAAO,MAAM,mBAAmB,YACrB,WAAW,CAAC,OAAO,EAAE,OAAO,CAAC,KACrC,IAgCF,CAAA"}
@@ -1,4 +1,4 @@
1
- import { Effect } from 'effect';
1
+ import { Cause, Effect } from 'effect';
2
2
  import type { Ports } from '../port/index.js';
3
3
  import { type EmbedHandle } from './hostConnector.js';
4
4
  import type { BootMode } from './hydrationHandoff.js';
@@ -12,17 +12,20 @@ export type RunOptions<Flags, Resources = never> = Readonly<{
12
12
  }>;
13
13
  type RuntimeProgram = Readonly<{
14
14
  runtimeId: string;
15
- start: (hmrModel?: unknown) => Effect.Effect<void>;
15
+ start: (preservedModel?: unknown) => Effect.Effect<void>;
16
16
  ports: Ports | undefined;
17
17
  }>;
18
18
  /** Starts a program Effect with explicit boot inputs for runtime tests.
19
19
  * @internal */
20
- export declare const __startProgram: (program: RuntimeProgram, hmrModel: unknown, bootMode: BootMode, flags?: Effect.Effect<unknown, never, any>, buildId?: string) => Effect.Effect<void>;
20
+ export declare const __startProgram: (program: RuntimeProgram, preservedModel: unknown, bootMode: BootMode, flags?: Effect.Effect<unknown, never, any>, buildId?: string) => Effect.Effect<void>;
21
+ /** Reports unhandled non-interrupt Causes using Effect's runtime policy.
22
+ * @internal */
23
+ export declare const __reportUnhandledCause: <E>(cause: Cause.Cause<E>) => Effect.Effect<void>;
21
24
  /** Starts a Foldkit runtime that owns the page for the page's whole lifetime,
22
- * with HMR support for development. The first render builds the DOM fresh in
23
- * the container, replacing whatever is there. On a server-rendered page use
24
- * `hydrate` instead, which adopts the existing DOM. To start a runtime under a
25
- * host-controlled lifecycle, use `embed`. */
25
+ * with state-preserving live reload for development. The first render builds
26
+ * the DOM fresh in the container, replacing whatever is there. On a
27
+ * server-rendered page use `hydrate` instead, which adopts the existing DOM.
28
+ * To start a runtime under a host-controlled lifecycle, use `embed`. */
26
29
  export declare function run<P extends Ports | undefined, Resources, Kind extends 'Application' | 'Element'>(program: MakeRuntimeReturn<P, void, Resources, Kind>): void;
27
30
  export declare function run<P extends Ports | undefined, Flags, Resources, Kind extends 'Application' | 'Element'>(program: MakeRuntimeReturn<P, Flags, Resources, Kind>, options: RunOptions<Flags, Resources>): void;
28
31
  /** Options for {@link hydrate}. */
@@ -1 +1 @@
1
- {"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../../src/runtime/start.ts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