foldkit 0.81.1 → 0.82.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.
Files changed (200) hide show
  1. package/README.md +3 -3
  2. package/dist/calendar/calendarDate.d.ts +11 -11
  3. package/dist/calendar/calendarDate.d.ts.map +1 -1
  4. package/dist/calendar/calendarDate.js +14 -13
  5. package/dist/calendar/comparison.d.ts +3 -3
  6. package/dist/calendar/comparison.d.ts.map +1 -1
  7. package/dist/calendar/comparison.js +5 -5
  8. package/dist/calendar/info.d.ts +1 -1
  9. package/dist/calendar/info.d.ts.map +1 -1
  10. package/dist/calendar/info.js +9 -1
  11. package/dist/calendar/locale.d.ts +5 -5
  12. package/dist/calendar/locale.js +23 -2
  13. package/dist/command/index.d.ts +2 -2
  14. package/dist/command/index.d.ts.map +1 -1
  15. package/dist/devTools/overlay.d.ts.map +1 -1
  16. package/dist/devTools/overlay.js +49 -27
  17. package/dist/devTools/protocol.d.ts +192 -192
  18. package/dist/devTools/protocol.d.ts.map +1 -1
  19. package/dist/devTools/protocol.js +36 -12
  20. package/dist/devTools/serialize.d.ts.map +1 -1
  21. package/dist/devTools/serialize.js +4 -4
  22. package/dist/devTools/store.d.ts.map +1 -1
  23. package/dist/devTools/store.js +1 -2
  24. package/dist/devTools/submodelPath.d.ts +1 -1
  25. package/dist/devTools/summarize.d.ts +6 -6
  26. package/dist/devTools/summarize.d.ts.map +1 -1
  27. package/dist/devTools/summarize.js +6 -6
  28. package/dist/devTools/webSocketBridge.d.ts +1 -1
  29. package/dist/devTools/webSocketBridge.d.ts.map +1 -1
  30. package/dist/devTools/webSocketBridge.js +19 -18
  31. package/dist/fieldValidation/index.d.ts +11 -11
  32. package/dist/fieldValidation/index.d.ts.map +1 -1
  33. package/dist/fieldValidation/index.js +8 -7
  34. package/dist/file/error.d.ts +1 -1
  35. package/dist/file/file.d.ts +1 -1
  36. package/dist/file/file.js +1 -1
  37. package/dist/file/reader.d.ts +4 -4
  38. package/dist/file/reader.js +5 -5
  39. package/dist/file/select.js +1 -1
  40. package/dist/html/index.d.ts.map +1 -1
  41. package/dist/html/index.js +4 -3
  42. package/dist/html/lazy.d.ts.map +1 -1
  43. package/dist/html/lazy.js +6 -7
  44. package/dist/managedResource/index.d.ts +2 -2
  45. package/dist/managedResource/index.d.ts.map +1 -1
  46. package/dist/managedResource/index.js +2 -2
  47. package/dist/mount/index.d.ts +1 -1
  48. package/dist/mount/index.d.ts.map +1 -1
  49. package/dist/route/parser.d.ts +2 -2
  50. package/dist/route/parser.d.ts.map +1 -1
  51. package/dist/route/parser.js +5 -5
  52. package/dist/runtime/browserListeners.d.ts.map +1 -1
  53. package/dist/runtime/browserListeners.js +6 -7
  54. package/dist/runtime/deepFreeze.d.ts +1 -1
  55. package/dist/runtime/deepFreeze.js +2 -2
  56. package/dist/runtime/hmrProtocol.d.ts +22 -0
  57. package/dist/runtime/hmrProtocol.d.ts.map +1 -0
  58. package/dist/runtime/hmrProtocol.js +15 -0
  59. package/dist/runtime/hmrProtocolPublic.d.ts +2 -0
  60. package/dist/runtime/hmrProtocolPublic.d.ts.map +1 -0
  61. package/dist/runtime/hmrProtocolPublic.js +1 -0
  62. package/dist/runtime/runtime.d.ts +10 -7
  63. package/dist/runtime/runtime.d.ts.map +1 -1
  64. package/dist/runtime/runtime.js +116 -114
  65. package/dist/runtime/subscription.d.ts +5 -5
  66. package/dist/runtime/subscription.d.ts.map +1 -1
  67. package/dist/runtime/urlRequest.d.ts +15 -15
  68. package/dist/runtime/urlRequest.d.ts.map +1 -1
  69. package/dist/runtime/urlRequest.js +1 -1
  70. package/dist/schema/index.d.ts +3 -3
  71. package/dist/schema/index.d.ts.map +1 -1
  72. package/dist/schema/index.js +10 -4
  73. package/dist/task/dom.js +1 -1
  74. package/dist/task/elementMovement.js +1 -1
  75. package/dist/task/error.d.ts +2 -2
  76. package/dist/task/inert.d.ts.map +1 -1
  77. package/dist/task/inert.js +4 -7
  78. package/dist/task/time.d.ts +1 -1
  79. package/dist/task/time.js +1 -1
  80. package/dist/task/timing.d.ts +1 -1
  81. package/dist/task/timing.d.ts.map +1 -1
  82. package/dist/task/timing.js +2 -2
  83. package/dist/test/apps/bubbling.d.ts +3 -3
  84. package/dist/test/apps/bubbling.d.ts.map +1 -1
  85. package/dist/test/apps/bubbling.js +1 -1
  86. package/dist/test/apps/counter.d.ts +6 -6
  87. package/dist/test/apps/counter.d.ts.map +1 -1
  88. package/dist/test/apps/counter.js +7 -1
  89. package/dist/test/apps/disabledButton.d.ts +11 -11
  90. package/dist/test/apps/disabledButton.d.ts.map +1 -1
  91. package/dist/test/apps/disabledButton.js +1 -1
  92. package/dist/test/apps/fileUpload.d.ts +4 -4
  93. package/dist/test/apps/fileUpload.d.ts.map +1 -1
  94. package/dist/test/apps/fileUpload.js +1 -1
  95. package/dist/test/apps/formChild.d.ts +16 -16
  96. package/dist/test/apps/formChild.d.ts.map +1 -1
  97. package/dist/test/apps/formChild.js +9 -4
  98. package/dist/test/apps/interactions.d.ts +8 -8
  99. package/dist/test/apps/interactions.d.ts.map +1 -1
  100. package/dist/test/apps/interactions.js +8 -1
  101. package/dist/test/apps/keypress.d.ts +7 -7
  102. package/dist/test/apps/keypress.d.ts.map +1 -1
  103. package/dist/test/apps/keypress.js +1 -1
  104. package/dist/test/apps/login.d.ts +14 -14
  105. package/dist/test/apps/login.d.ts.map +1 -1
  106. package/dist/test/apps/login.js +9 -2
  107. package/dist/test/apps/logoutButton.d.ts +3 -3
  108. package/dist/test/apps/logoutButton.d.ts.map +1 -1
  109. package/dist/test/apps/logoutButton.js +2 -2
  110. package/dist/test/apps/multiRole.d.ts +2 -2
  111. package/dist/test/apps/multiRole.d.ts.map +1 -1
  112. package/dist/test/apps/multiRole.js +1 -1
  113. package/dist/test/apps/pointer.d.ts +6 -6
  114. package/dist/test/apps/pointer.d.ts.map +1 -1
  115. package/dist/test/apps/pointer.js +1 -1
  116. package/dist/test/apps/resumeUpload.d.ts +8 -8
  117. package/dist/test/apps/resumeUpload.d.ts.map +1 -1
  118. package/dist/test/apps/resumeUpload.js +12 -5
  119. package/dist/test/internal.js +10 -10
  120. package/dist/test/matchers.js +1 -1
  121. package/dist/test/query.d.ts.map +1 -1
  122. package/dist/test/query.js +13 -13
  123. package/dist/test/scene.d.ts.map +1 -1
  124. package/dist/test/scene.js +3 -3
  125. package/dist/test/story.js +1 -1
  126. package/dist/ui/animation/schema.d.ts +5 -5
  127. package/dist/ui/animation/schema.d.ts.map +1 -1
  128. package/dist/ui/animation/schema.js +9 -3
  129. package/dist/ui/calendar/index.d.ts +77 -77
  130. package/dist/ui/calendar/index.d.ts.map +1 -1
  131. package/dist/ui/calendar/index.js +26 -11
  132. package/dist/ui/checkbox/index.d.ts +2 -2
  133. package/dist/ui/combobox/multi.d.ts +38 -42
  134. package/dist/ui/combobox/multi.d.ts.map +1 -1
  135. package/dist/ui/combobox/multi.js +4 -1
  136. package/dist/ui/combobox/shared.d.ts +31 -31
  137. package/dist/ui/combobox/shared.d.ts.map +1 -1
  138. package/dist/ui/combobox/shared.js +34 -12
  139. package/dist/ui/combobox/single.d.ts +39 -43
  140. package/dist/ui/combobox/single.d.ts.map +1 -1
  141. package/dist/ui/combobox/single.js +7 -6
  142. package/dist/ui/datePicker/index.d.ts +86 -86
  143. package/dist/ui/datePicker/index.d.ts.map +1 -1
  144. package/dist/ui/datePicker/index.js +10 -3
  145. package/dist/ui/dialog/index.d.ts +8 -8
  146. package/dist/ui/dialog/index.d.ts.map +1 -1
  147. package/dist/ui/dialog/index.js +9 -3
  148. package/dist/ui/disclosure/index.d.ts +2 -2
  149. package/dist/ui/disclosure/index.d.ts.map +1 -1
  150. package/dist/ui/disclosure/index.js +1 -1
  151. package/dist/ui/dragAndDrop/index.d.ts +76 -76
  152. package/dist/ui/dragAndDrop/index.d.ts.map +1 -1
  153. package/dist/ui/dragAndDrop/index.js +47 -29
  154. package/dist/ui/fileDrop/index.d.ts +8 -8
  155. package/dist/ui/fileDrop/index.d.ts.map +1 -1
  156. package/dist/ui/fileDrop/index.js +7 -2
  157. package/dist/ui/listbox/multi.d.ts +36 -40
  158. package/dist/ui/listbox/multi.d.ts.map +1 -1
  159. package/dist/ui/listbox/multi.js +4 -1
  160. package/dist/ui/listbox/shared.d.ts +32 -32
  161. package/dist/ui/listbox/shared.d.ts.map +1 -1
  162. package/dist/ui/listbox/shared.js +36 -11
  163. package/dist/ui/listbox/single.d.ts +36 -40
  164. package/dist/ui/listbox/single.d.ts.map +1 -1
  165. package/dist/ui/listbox/single.js +5 -2
  166. package/dist/ui/menu/index.d.ts +40 -40
  167. package/dist/ui/menu/index.d.ts.map +1 -1
  168. package/dist/ui/menu/index.js +38 -11
  169. package/dist/ui/popover/index.d.ts +12 -12
  170. package/dist/ui/popover/index.d.ts.map +1 -1
  171. package/dist/ui/popover/index.js +17 -2
  172. package/dist/ui/radioGroup/index.d.ts +6 -6
  173. package/dist/ui/radioGroup/index.d.ts.map +1 -1
  174. package/dist/ui/radioGroup/index.js +5 -5
  175. package/dist/ui/slider/index.d.ts +26 -26
  176. package/dist/ui/slider/index.d.ts.map +1 -1
  177. package/dist/ui/slider/index.js +30 -16
  178. package/dist/ui/switch/index.d.ts +2 -2
  179. package/dist/ui/tabs/index.d.ts +8 -8
  180. package/dist/ui/tabs/index.d.ts.map +1 -1
  181. package/dist/ui/tabs/index.js +3 -3
  182. package/dist/ui/toast/index.d.ts +75 -75
  183. package/dist/ui/toast/index.d.ts.map +1 -1
  184. package/dist/ui/toast/index.js +1 -1
  185. package/dist/ui/toast/schema.d.ts +63 -63
  186. package/dist/ui/toast/schema.d.ts.map +1 -1
  187. package/dist/ui/toast/schema.js +19 -4
  188. package/dist/ui/toast/update.d.ts +67 -67
  189. package/dist/ui/toast/update.d.ts.map +1 -1
  190. package/dist/ui/toast/update.js +2 -2
  191. package/dist/ui/tooltip/index.d.ts +15 -15
  192. package/dist/ui/tooltip/index.d.ts.map +1 -1
  193. package/dist/ui/tooltip/index.js +14 -4
  194. package/dist/ui/virtualList/index.d.ts +16 -16
  195. package/dist/ui/virtualList/index.d.ts.map +1 -1
  196. package/dist/ui/virtualList/index.js +46 -42
  197. package/dist/url/index.d.ts +8 -8
  198. package/dist/url/index.d.ts.map +1 -1
  199. package/dist/url/index.js +14 -14
  200. package/package.json +11 -7
@@ -39,7 +39,7 @@ export type DevToolsConfig = false | Readonly<{
39
39
  * Without this field, `RequestDispatchMessage` is rejected with an
40
40
  * informative error.
41
41
  */
42
- Message?: Schema.Schema<any, any, never>;
42
+ Message?: Schema.Codec<any, any, unknown, unknown>;
43
43
  }>;
44
44
  /** Context provided to the slow view callback when a view exceeds the time budget. */
45
45
  export type SlowViewContext<Model, Message> = Readonly<{
@@ -62,7 +62,7 @@ export type SlowViewConfig<Model, Message> = false | Readonly<{
62
62
  thresholdMs?: number;
63
63
  onSlowView?: (context: SlowViewContext<Model, Message>) => void;
64
64
  }>;
65
- declare const Dispatch_base: Context.TagClass<Dispatch, "@foldkit/Dispatch", {
65
+ declare const Dispatch_base: Context.ServiceClass<Dispatch, "@foldkit/Dispatch", {
66
66
  readonly dispatchAsync: (message: unknown) => Effect.Effect<void>;
67
67
  readonly dispatchSync: (message: unknown) => void;
68
68
  }>;
@@ -87,7 +87,7 @@ export type CrashConfig<Model, Message> = Readonly<{
87
87
  report?: (context: CrashContext<Model, Message>) => void;
88
88
  }>;
89
89
  type BaseProgramConfig<Model, Message, StreamDepsMap extends Schema.Struct<Schema.Struct.Fields>, Resources = never, ManagedResourceServices = never> = Readonly<{
90
- Model: Schema.Schema<Model, any, never>;
90
+ Model: Schema.Codec<Model, any, unknown, unknown>;
91
91
  update: (model: Model, message: Message) => readonly [
92
92
  Model,
93
93
  ReadonlyArray<Command<Message, never, Resources | ManagedResourceServices>>
@@ -104,7 +104,7 @@ type BaseProgramConfig<Model, Message, StreamDepsMap extends Schema.Struct<Schem
104
104
  }>;
105
105
  /** Configuration for `makeProgram` with flags and URL routing. */
106
106
  export type RoutingProgramConfigWithFlags<Model, Message, StreamDepsMap extends Schema.Struct<Schema.Struct.Fields>, Flags, Resources = never, ManagedResourceServices = never> = BaseProgramConfig<Model, Message, StreamDepsMap, Resources, ManagedResourceServices> & Readonly<{
107
- Flags: Schema.Schema<Flags, any, never>;
107
+ Flags: Schema.Codec<Flags, any, unknown, unknown>;
108
108
  flags: Effect.Effect<Flags>;
109
109
  routing: RoutingConfig<Message>;
110
110
  init: (flags: Flags, url: Url) => readonly [
@@ -122,7 +122,7 @@ export type RoutingProgramConfig<Model, Message, StreamDepsMap extends Schema.St
122
122
  }>;
123
123
  /** Configuration for `makeProgram` with flags but no URL routing. */
124
124
  export type ProgramConfigWithFlags<Model, Message, StreamDepsMap extends Schema.Struct<Schema.Struct.Fields>, Flags, Resources = never, ManagedResourceServices = never> = BaseProgramConfig<Model, Message, StreamDepsMap, Resources, ManagedResourceServices> & Readonly<{
125
- Flags: Schema.Schema<Flags, any, never>;
125
+ Flags: Schema.Codec<Flags, any, unknown, unknown>;
126
126
  flags: Effect.Effect<Flags>;
127
127
  init: (flags: Flags) => readonly [
128
128
  Model,
@@ -153,7 +153,10 @@ export type RoutingProgramInit<Model, Message, Flags = void, Resources = never,
153
153
  ReadonlyArray<Command<Message, never, Resources | ManagedResourceServices>>
154
154
  ];
155
155
  /** A configured Foldkit runtime returned by `makeProgram`, passed to `run` to start the application. */
156
- export type MakeRuntimeReturn = (hmrModel?: unknown) => Effect.Effect<void>;
156
+ export type MakeRuntimeReturn = Readonly<{
157
+ runtimeId: string;
158
+ start: (hmrModel?: unknown) => Effect.Effect<void>;
159
+ }>;
157
160
  /** Creates a Foldkit program and returns a runtime that can be passed to `run`. Add a `routing` config for URL routing. */
158
161
  export declare function makeProgram<Model, Message extends {
159
162
  _tag: string;
@@ -168,5 +171,5 @@ export declare function makeProgram<Model, Message extends {
168
171
  _tag: string;
169
172
  }, StreamDepsMap extends Schema.Struct<Schema.Struct.Fields>, Resources = never, ManagedResourceServices = never>(config: ProgramConfig<Model, Message, StreamDepsMap, Resources, ManagedResourceServices>): MakeRuntimeReturn;
170
173
  /** Starts a Foldkit runtime, with HMR support for development. */
171
- export declare const run: (foldkitRuntime: MakeRuntimeReturn) => void;
174
+ export declare const run: (program: MakeRuntimeReturn) => void;
172
175
  //# sourceMappingURL=runtime.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/runtime/runtime.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,OAAO,EACP,MAAM,EAGN,KAAK,EAEL,MAAM,EAMN,MAAM,EAKP,MAAM,QAAQ,CAAA;AAGf,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAIlD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAE,GAAG,EAA+B,MAAM,iBAAiB,CAAA;AAQlE,OAAO,KAAK,EAEV,gBAAgB,EACjB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAO5C,0DAA0D;AAC1D,MAAM,MAAM,gBAAgB,GACxB,aAAa,GACb,YAAY,GACZ,UAAU,GACV,SAAS,CAAA;AAEb,wCAAwC;AACxC,MAAM,MAAM,UAAU,GAAG,aAAa,GAAG,QAAQ,CAAA;AAEjD;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,YAAY,CAAA;AAEnD;;;;;;;;;GASG;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,YAAY,CAAA;IACnB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,EAA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AM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,EACzD,SAAS,GAAG,KAAK,EACjB,uBAAuB,GAAG,KAAK,EAE/B,MAAM,EAAE,oBAAoB,CAC1B,KAAK,EACL,OAAO,EACP,aAAa,EACb,SAAS,EACT,uBAAuB,CACxB,GACA,iBAAiB,CAAA;AAEpB,wBAAgB,WAAW,CACzB,KAAK,EACL,OAAO,SAAS;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,EAChC,aAAa,SAAS,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,EACzD,KAAK,EACL,SAAS,GAAG,KAAK,EACjB,uBAAuB,GAAG,KAAK,EAE/B,MAAM,EAAE,sBAAsB,CAC5B,KAAK,EACL,OAAO,EACP,aAAa,EACb,KAAK,EACL,SAAS,EACT,uBAAuB,CACxB,GACA,iBAAiB,CAAA;AAEpB,wBAAgB,WAAW,CACzB,KAAK,EACL,OAAO,SAAS;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,EAChC,aAAa,SAAS,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,EACzD,SAAS,GAAG,KAAK,EACjB,uBAAuB,GAAG,KAAK,EAE/B,MAAM,EAAE,aAAa,CACnB,KAAK,EACL,OAAO,EACP,aAAa,EACb,SAAS,EACT,uBAAuB,CACxB,GACA,iBAAiB,CAAA;AAqNpB,kEAAkE;AAClE,eAAO,MAAM,GAAG,GAAI,SAAS,iBAAiB,KAAG,IA4ChD,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { BrowserRuntime } from '@effect/platform-browser';
2
- import { Array, Cause, Context, Effect, Either, Function, Layer, Match, Option, Predicate, Queue, Record, Ref, Runtime, Schema, Stream, SubscriptionRef, Tuple, pipe, } from 'effect';
2
+ import { Array, Cause, Context, Effect, Exit, Function, Layer, Match, Option, Predicate, PubSub, Queue, Record, Ref, Scheduler, Schema, Stream, SubscriptionRef, pipe, } from 'effect';
3
3
  import { h } from 'snabbdom';
4
4
  import { createOverlay } from '../devTools/overlay.js';
5
5
  import { createDevToolsStore } from '../devTools/store.js';
@@ -9,6 +9,7 @@ import { patch, toVNode } from '../vdom.js';
9
9
  import { addBfcacheRestoreListener, addNavigationEventListeners, } from './browserListeners.js';
10
10
  import { defaultCrashView, noOpDispatch } from './crashUI.js';
11
11
  import { deepFreeze } from './deepFreeze.js';
12
+ import { PreserveModelMessage, RequestModelMessage, RestoreModelMessage, } from './hmrProtocol.js';
12
13
  const DEFAULT_DEV_TOOLS_SHOW = 'Development';
13
14
  const DEFAULT_DEV_TOOLS_POSITION = 'BottomRight';
14
15
  const DEFAULT_DEV_TOOLS_MODE = 'TimeTravel';
@@ -18,7 +19,7 @@ const defaultSlowViewCallback = (context) => {
18
19
  const trigger = Option.match(context.message, {
19
20
  onNone: () => 'init',
20
21
  onSome: message => {
21
- const tag = Predicate.isRecord(message) && '_tag' in message
22
+ const tag = Predicate.isObject(message) && '_tag' in message
22
23
  ? String(message['_tag'])
23
24
  : 'unknown';
24
25
  return tag;
@@ -27,7 +28,7 @@ const defaultSlowViewCallback = (context) => {
27
28
  console.warn(`[foldkit] Slow view: ${context.durationMs.toFixed(1)}ms (budget: ${context.thresholdMs}ms), triggered by ${trigger}. Consider moving computation to update or memoizing with createLazy.`, ...Option.toArray(context.message));
28
29
  };
29
30
  /** Effect service tag that provides message dispatching to the view layer. */
30
- export class Dispatch extends Context.Tag('@foldkit/Dispatch')() {
31
+ export class Dispatch extends Context.Service()('@foldkit/Dispatch') {
31
32
  }
32
33
  const makeRuntime = ({ Model, flags: resolveFlags, init, update, view, subscriptions, container, routing: routingConfig, crash, slowView, freezeModel, resources, managedResources, devTools, }) => {
33
34
  const resolvedSlowView = pipe(slowView ?? {}, Option.liftPredicate(config => config !== false), Option.filter(config => Match.value(config.show ?? DEFAULT_SLOW_VIEW_SHOW).pipe(Match.when('Always', () => true), Match.when('Development', () => !!import.meta.hot), Match.exhaustive)), Option.map(config => ({
@@ -36,9 +37,14 @@ const makeRuntime = ({ Model, flags: resolveFlags, init, update, view, subscript
36
37
  })));
37
38
  const isFreezeModelActive = freezeModel !== false && !!import.meta.hot;
38
39
  const maybeFreezeModel = (model) => isFreezeModelActive ? deepFreeze(model) : model;
39
- return (hmrModel) => Effect.scoped(Effect.gen(function* () {
40
+ const runtimeId = container?.id ?? '';
41
+ const start = (hmrModel) => Effect.scoped(Effect.gen(function* () {
42
+ if (runtimeId === '') {
43
+ return yield* Effect.die(new Error('[foldkit] Runtime container must have an `id` for HMR model preservation. ' +
44
+ 'Set `container.id = "app"` (or any unique string) before passing it to makeProgram.'));
45
+ }
40
46
  const maybeResourceLayer = resources
41
- ? Option.some(yield* Layer.memoize(resources))
47
+ ? Option.some(resources)
42
48
  : Option.none();
43
49
  const managedResourceEntries = managedResources
44
50
  ? /* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
@@ -68,40 +74,41 @@ const makeRuntime = ({ Model, flags: resolveFlags, init, update, view, subscript
68
74
  });
69
75
  };
70
76
  const flags = yield* resolveFlags;
71
- const modelEquivalence = Schema.equivalence(Model);
77
+ const modelEquivalence = Schema.toEquivalence(Model);
78
+ const ModelJsonCodec = Schema.toCodecJson(
79
+ /* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
80
+ Model);
81
+ const decodeHmrModel = Schema.decodeUnknownExit(ModelJsonCodec);
82
+ const encodeHmrModel = Schema.encodeUnknownSync(ModelJsonCodec);
72
83
  const messageQueue = yield* Queue.unbounded();
73
84
  const enqueueMessage = (message) => Queue.offer(messageQueue, message);
74
- const currentUrl = Option.fromNullable(routingConfig).pipe(Option.flatMap(() => urlFromString(window.location.href)));
85
+ const currentUrl = Option.fromNullishOr(routingConfig).pipe(Option.flatMap(() => urlFromString(window.location.href)));
75
86
  const [initModelRaw, initCommands] = Predicate.isNotUndefined(hmrModel)
76
- ? pipe(hmrModel, Schema.decodeUnknownEither(Model), Either.match({
77
- onLeft: () => init(flags, Option.getOrUndefined(currentUrl)),
78
- onRight: restoredModel => [restoredModel, []],
79
- }))
87
+ ? Exit.match(decodeHmrModel(hmrModel), {
88
+ onFailure: () => init(flags, Option.getOrUndefined(currentUrl)),
89
+ onSuccess: (restoredModel) => [restoredModel, []],
90
+ })
80
91
  : init(flags, Option.getOrUndefined(currentUrl));
81
92
  const initModel = maybeFreezeModel(initModelRaw);
82
- const modelSubscriptionRef = yield* SubscriptionRef.make(initModel);
93
+ const modelPubSub = yield* PubSub.unbounded();
83
94
  yield* Effect.forEach(
84
95
  /* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
85
- initCommands, command => Effect.forkDaemon(command.effect.pipe(Effect.withSpan(command.name), provideAllResources, Effect.flatMap(enqueueMessage))));
96
+ initCommands, command => Effect.forkDetach(command.effect.pipe(Effect.withSpan(command.name), provideAllResources, Effect.flatMap(enqueueMessage))));
86
97
  if (routingConfig) {
87
98
  addNavigationEventListeners(messageQueue, routingConfig);
88
99
  }
89
100
  const modelRef = yield* Ref.make(initModel);
90
101
  const maybeCurrentVNodeRef = yield* Ref.make(Option.none());
91
102
  const currentMessageRef = yield* Ref.make(Option.none());
92
- const maybeRuntimeRef = yield* Ref.make(Option.none());
93
103
  const maybeDevToolsStoreRef = yield* Ref.make(Option.none());
94
- /** `true` while a render is patching the DOM. Synchronous events
95
- * that fire as a side-effect of DOM mutations (e.g. Chrome firing
96
- * `blur` when a focused element is removed) call `dispatchSync`; if
97
- * they do so while the flag is set, the message is offered to
98
- * `pendingMessagesQueue` and processed after the current render
99
- * completes. Without this lock, nested dispatches during a patch
100
- * see a stale `maybeCurrentVNodeRef` and double-patch the DOM. */
101
- const isRenderingRef = yield* Ref.make(false);
102
- /** Messages offered by `dispatchSync` calls that land while a render
103
- * is in progress. Drained at the end of each render. */
104
- const pendingMessagesQueue = yield* Queue.unbounded();
104
+ const dispatchSync = (message) => {
105
+ /* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
106
+ Queue.offerUnsafe(messageQueue, message);
107
+ };
108
+ const dispatchAsync = (message) =>
109
+ /* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
110
+ enqueueMessage(message);
111
+ const dispatch = { dispatchAsync, dispatchSync };
105
112
  const processMessage = (message) => Effect.gen(function* () {
106
113
  const currentModel = yield* Ref.get(modelRef);
107
114
  const [nextModelRaw, commands] = update(currentModel, message);
@@ -116,13 +123,13 @@ const makeRuntime = ({ Model, flags: resolveFlags, init, update, view, subscript
116
123
  yield* render(nextModel, Option.some(message));
117
124
  }
118
125
  if (!modelEquivalence(currentModel, nextModel)) {
119
- yield* SubscriptionRef.set(modelSubscriptionRef, nextModel);
120
- preserveModel(nextModel);
126
+ PubSub.publishUnsafe(modelPubSub, nextModel);
127
+ preserveModel(runtimeId, encodeHmrModel(nextModel));
121
128
  }
122
129
  }
123
130
  yield* Effect.forEach(
124
131
  /* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
125
- commands, command => Effect.forkDaemon(command.effect.pipe(Effect.withSpan(command.name), provideAllResources, Effect.flatMap(enqueueMessage))));
132
+ commands, command => Effect.forkDetach(command.effect.pipe(Effect.withSpan(command.name), provideAllResources, Effect.flatMap(enqueueMessage))));
126
133
  const maybeDevToolsStore = yield* Ref.get(maybeDevToolsStoreRef);
127
134
  yield* Option.match(maybeDevToolsStore, {
128
135
  onNone: () => Effect.void,
@@ -133,46 +140,6 @@ const makeRuntime = ({ Model, flags: resolveFlags, init, update, view, subscript
133
140
  commands, command => command.name), currentModel !== nextModel),
134
141
  });
135
142
  });
136
- const runProcessMessage = (message, messageEffect) => (runtime) => {
137
- try {
138
- Runtime.runSync(runtime, messageEffect);
139
- }
140
- catch (error) {
141
- const squashed = Runtime.isFiberFailure(error)
142
- ? Cause.squash(error[Runtime.FiberFailureCauseId])
143
- : error;
144
- const appError = squashed instanceof Error
145
- ? squashed
146
- : new Error(String(squashed));
147
- const model = Effect.runSync(Ref.get(modelRef));
148
- renderCrashView({ error: appError, model, message }, crash, container, maybeCurrentVNodeRef);
149
- }
150
- };
151
- const dispatchSync = (message) => {
152
- const isRendering = Effect.runSync(Ref.get(isRenderingRef));
153
- if (isRendering) {
154
- /* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
155
- Queue.offer(pendingMessagesQueue, message).pipe(Effect.runSync);
156
- return;
157
- }
158
- const maybeRuntime = Effect.runSync(Ref.get(maybeRuntimeRef));
159
- Option.match(maybeRuntime, {
160
- onNone: Function.constVoid,
161
- onSome: runProcessMessage(
162
- /* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
163
- message,
164
- /* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
165
- processMessage(message)),
166
- });
167
- };
168
- const dispatchAsync = (message) =>
169
- /* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
170
- enqueueMessage(message);
171
- const dispatch = { dispatchAsync, dispatchSync };
172
- const drainPendingMessages = Effect.gen(function* () {
173
- const pending = yield* Queue.takeAll(pendingMessagesQueue);
174
- yield* Effect.forEach(pending, queuedMessage => Effect.sync(() => dispatchSync(queuedMessage)));
175
- });
176
143
  const render = (model, message) => Effect.gen(function* () {
177
144
  const viewStart = performance.now();
178
145
  const nextDocument = view(model);
@@ -192,25 +159,24 @@ const makeRuntime = ({ Model, flags: resolveFlags, init, update, view, subscript
192
159
  },
193
160
  });
194
161
  const maybeCurrentVNode = yield* Ref.get(maybeCurrentVNodeRef);
195
- const patchedVNode = yield* Effect.acquireUseRelease(Ref.set(isRenderingRef, true), () => Effect.sync(() => patchVNode(maybeCurrentVNode, nullableNextVNode, container)), () => Ref.set(isRenderingRef, false));
162
+ const patchedVNode = yield* Effect.sync(() => patchVNode(maybeCurrentVNode, nullableNextVNode, container));
196
163
  yield* Ref.set(maybeCurrentVNodeRef, Option.some(patchedVNode));
197
164
  yield* Effect.sync(() => applyDocumentMetadata(nextDocument, container));
198
- yield* drainPendingMessages;
199
165
  }).pipe(Effect.provideService(Dispatch, dispatch));
200
- const runtime = yield* Effect.runtime();
201
- yield* Ref.set(maybeRuntimeRef, Option.some(runtime));
202
166
  const isInIframe = window.self !== window.top;
203
167
  const resolvedDevTools = pipe(devTools ?? {}, Option.liftPredicate(config => config !== false), Option.filter(config => Match.value(config.show ?? DEFAULT_DEV_TOOLS_SHOW).pipe(Match.when('Always', () => true), Match.when('Development', () => !!import.meta.hot && !isInIframe), Match.exhaustive)), Option.map(config => ({
204
168
  position: config.position ?? DEFAULT_DEV_TOOLS_POSITION,
205
169
  mode: config.mode ?? DEFAULT_DEV_TOOLS_MODE,
206
- maybeBanner: Option.fromNullable(config.banner),
170
+ maybeBanner: Option.fromNullishOr(config.banner),
207
171
  })));
208
172
  if (Option.isSome(resolvedDevTools)) {
209
173
  const { position, mode, maybeBanner } = resolvedDevTools.value;
210
174
  const devToolsStore = yield* createDevToolsStore({
211
- replay: (model, message) => maybeFreezeModel(
212
- /* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
213
- Tuple.getFirst(update(model, message))),
175
+ replay: (model, message) => {
176
+ /* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
177
+ const [updatedModel] = update(model, message);
178
+ return maybeFreezeModel(updatedModel);
179
+ },
214
180
  render: model =>
215
181
  /* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
216
182
  render(model, Option.none()),
@@ -221,11 +187,13 @@ const makeRuntime = ({ Model, flags: resolveFlags, init, update, view, subscript
221
187
  yield* createOverlay(devToolsStore, position, mode, maybeBanner);
222
188
  if (import.meta.hot) {
223
189
  const maybeMessageSchema = devTools !== undefined && devTools !== false
224
- ? Option.fromNullable(devTools.Message)
190
+ ? Option.fromNullishOr(devTools.Message)
225
191
  : Option.none();
226
192
  yield* startWebSocketBridge(devToolsStore, import.meta.hot,
227
193
  /* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
228
- message => enqueueMessage(message), maybeMessageSchema);
194
+ message => enqueueMessage(message),
195
+ /* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
196
+ maybeMessageSchema);
229
197
  }
230
198
  }
231
199
  yield* render(initModel, Option.none());
@@ -233,9 +201,9 @@ const makeRuntime = ({ Model, flags: resolveFlags, init, update, view, subscript
233
201
  if (subscriptions) {
234
202
  yield* pipe(subscriptions, Record.toEntries, Effect.forEach(([_key, { schema, modelToDependencies, equivalence: customEquivalence, dependenciesToStream, },]) => {
235
203
  let latestDependencies = modelToDependencies(initModel);
236
- const equivalence = customEquivalence ?? Schema.equivalence(schema);
237
- const modelStream = Stream.concat(Stream.make(initModel), modelSubscriptionRef.changes);
238
- return Effect.forkDaemon(modelStream.pipe(
204
+ const equivalence = customEquivalence ?? Schema.toEquivalence(schema);
205
+ const modelStream = Stream.concat(Stream.make(initModel), Stream.fromPubSub(modelPubSub));
206
+ return Effect.forkDetach(modelStream.pipe(
239
207
  // NOTE: updates latestDependencies on every model change so
240
208
  // readDependencies() returns current values even when the
241
209
  // stream hasn't restarted (when equivalence filters the change).
@@ -243,7 +211,9 @@ const makeRuntime = ({ Model, flags: resolveFlags, init, update, view, subscript
243
211
  const dependencies = modelToDependencies(model);
244
212
  latestDependencies = dependencies;
245
213
  return dependencies;
246
- }), Stream.changesWith(equivalence), Stream.flatMap(dependencies => dependenciesToStream(dependencies, () => latestDependencies), { switch: true }), Stream.runForEach(enqueueMessage), provideAllResources));
214
+ }), Stream.changesWith(equivalence), Stream.switchMap(dependencies => dependenciesToStream(dependencies, () => latestDependencies)), Stream.runForEach(message =>
215
+ /* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
216
+ enqueueMessage(message)), provideAllResources));
247
217
  }, {
248
218
  concurrency: 'unbounded',
249
219
  discard: true,
@@ -266,25 +236,28 @@ const makeRuntime = ({ Model, flags: resolveFlags, init, update, view, subscript
266
236
  yield* config.release(value);
267
237
  yield* Ref.set(resourceRef, Option.none());
268
238
  yield* enqueueMessage(config.onReleased());
269
- }).pipe(Effect.catchAllCause(() => Effect.void));
270
- return pipe(Stream.scoped(Effect.acquireRelease(acquire, release)), Stream.flatMap(value => Stream.concat(Stream.make(config.onAcquired(value)), Stream.never)), Stream.map(Effect.succeed), Stream.catchAll(error => Stream.make(Effect.succeed(config.onAcquireError(error)))));
239
+ }).pipe(Effect.catchCause(() => Effect.void));
240
+ return pipe(Stream.scoped(Stream.fromEffect(Effect.acquireRelease(acquire, release))), Stream.flatMap(value => Stream.concat(Stream.make(config.onAcquired(value)), Stream.never)), Stream.map(Effect.succeed), Stream.catch(error => Stream.make(Effect.succeed(config.onAcquireError(error)))));
271
241
  };
272
242
  const forkManagedResourceLifecycle = ({ config, ref: resourceRef, }) => Effect.gen(function* () {
273
- const modelStream = Stream.concat(Stream.make(initModel), modelSubscriptionRef.changes);
274
- const equivalence = Schema.equivalence(config.schema);
275
- yield* Effect.forkDaemon(modelStream.pipe(Stream.map(config.modelToMaybeRequirements), Stream.changesWith(equivalence), Stream.flatMap(maybeRequirementsToLifecycle(config, resourceRef), {
276
- switch: true,
277
- }), Stream.runForEach(Effect.flatMap(enqueueMessage))));
243
+ const modelStream = Stream.concat(Stream.make(initModel), Stream.fromPubSub(modelPubSub));
244
+ const equivalence = Schema.toEquivalence(config.schema);
245
+ yield* Effect.forkDetach(modelStream.pipe(Stream.map(config.modelToMaybeRequirements), Stream.changesWith(equivalence), Stream.switchMap(maybeRequirementsToLifecycle(config, resourceRef)), Stream.runForEach(Effect.flatMap(enqueueMessage))));
278
246
  });
279
247
  yield* Effect.forEach(managedResourceRefs, forkManagedResourceLifecycle, {
280
248
  concurrency: 'unbounded',
281
249
  discard: true,
282
250
  });
283
251
  yield* pipe(Effect.forever(Effect.gen(function* () {
284
- const message = yield* Queue.take(messageQueue);
285
- yield* Ref.set(currentMessageRef, Option.some(message));
286
- yield* processMessage(message);
287
- })), Effect.catchAllCause(cause => Effect.sync(() => {
252
+ const first = yield* Queue.take(messageQueue);
253
+ yield* Ref.set(currentMessageRef, Option.some(first));
254
+ yield* processMessage(first);
255
+ const more = yield* Queue.takeAll(messageQueue);
256
+ for (const message of more) {
257
+ yield* Ref.set(currentMessageRef, Option.some(message));
258
+ yield* processMessage(message);
259
+ }
260
+ })), Effect.catchCause(cause => Effect.sync(() => {
288
261
  const squashed = Cause.squash(cause);
289
262
  const appError = squashed instanceof Error
290
263
  ? squashed
@@ -294,6 +267,7 @@ const makeRuntime = ({ Model, flags: resolveFlags, init, update, view, subscript
294
267
  renderCrashView({ error: appError, model, message }, crash, container, maybeCurrentVNodeRef);
295
268
  })));
296
269
  }));
270
+ return { runtimeId, start };
297
271
  };
298
272
  const patchVNode = (maybeCurrentVNode, nullableNextVNode, container) => {
299
273
  const nextVNode = Predicate.isNotNull(nullableNextVNode)
@@ -425,35 +399,63 @@ export function makeProgram(config) {
425
399
  }
426
400
  /* eslint-enable @typescript-eslint/consistent-type-assertions */
427
401
  }
428
- const preserveModel = (model) => {
402
+ const encodePreserveModelMessage = Schema.encodeUnknownSync(PreserveModelMessage);
403
+ const encodeRequestModelMessage = Schema.encodeUnknownSync(RequestModelMessage);
404
+ const decodeRestoreModelMessage = Schema.decodeUnknownExit(RestoreModelMessage);
405
+ const preserveModel = (id, model) => {
429
406
  if (import.meta.hot) {
430
- import.meta.hot.send('foldkit:preserve-model', model);
407
+ import.meta.hot.send('foldkit:preserve-model', encodePreserveModelMessage(PreserveModelMessage.make({ id, model })));
431
408
  }
432
409
  };
433
410
  const PLUGIN_RESPONSE_TIMEOUT_MS = 500;
411
+ // NOTE: scheduling fix for browser performance. Effect needs to defer work
412
+ // onto a future tick of the event loop. The default browser scheduler picks
413
+ // `setTimeout(f, 0)`, but browsers clamp `setTimeout` to a minimum of 4ms.
414
+ // `queueMicrotask` runs on the very next tick (sub-millisecond). Without this
415
+ // override, every dispatched message takes an extra 4-16ms round-trip,
416
+ // sharply visible on hover and drag.
417
+ const microtaskSetImmediate = (callback) => {
418
+ let cancelled = false;
419
+ queueMicrotask(() => {
420
+ if (!cancelled)
421
+ callback();
422
+ });
423
+ return () => {
424
+ cancelled = true;
425
+ };
426
+ };
427
+ const browserScheduler = new Scheduler.MixedScheduler('async', microtaskSetImmediate);
428
+ const provideBrowserScheduler = (effect) => Effect.provide(effect, Layer.succeed(Scheduler.Scheduler, browserScheduler));
434
429
  /** Starts a Foldkit runtime, with HMR support for development. */
435
- export const run = (foldkitRuntime) => {
430
+ export const run = (program) => {
436
431
  if (import.meta.hot) {
437
432
  const hot = import.meta.hot;
438
- const requestPreservedModel = pipe(Effect.async(resume => {
439
- hot.on('foldkit:restore-model', model => {
440
- resume(Effect.succeed(model));
441
- });
442
- hot.send('foldkit:request-model');
443
- }), Effect.timeoutTo({
444
- onTimeout: () => {
445
- console.warn('[foldkit] No response from vite-plugin-foldkit. Add it to your vite.config.ts for HMR model preservation:\n\n' +
446
- " import foldkit from 'vite-plugin-foldkit'\n\n" +
447
- ' export default defineConfig({ plugins: [foldkit()] })\n\n' +
448
- 'Starting without HMR support.');
449
- return undefined;
450
- },
451
- onSuccess: Function.identity,
452
- duration: PLUGIN_RESPONSE_TIMEOUT_MS,
453
- }), Effect.flatMap(foldkitRuntime));
454
- BrowserRuntime.runMain(requestPreservedModel);
433
+ const { runtimeId, start } = program;
434
+ const requestPreservedModel = pipe(Effect.callback(resume => {
435
+ const handler = (message) => {
436
+ Exit.match(decodeRestoreModelMessage(message), {
437
+ onFailure: Function.constVoid,
438
+ onSuccess: ({ id, model }) => {
439
+ if (id === runtimeId) {
440
+ hot.off('foldkit:restore-model', handler);
441
+ resume(Effect.succeed(model));
442
+ }
443
+ },
444
+ });
445
+ };
446
+ hot.on('foldkit:restore-model', handler);
447
+ hot.send('foldkit:request-model', encodeRequestModelMessage(RequestModelMessage.make({ id: runtimeId })));
448
+ return Effect.sync(() => hot.off('foldkit:restore-model', handler));
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" +
452
+ ' export default defineConfig({ plugins: [foldkit()] })\n\n' +
453
+ 'Starting without HMR support.');
454
+ return Effect.succeed(undefined);
455
+ }), Effect.flatMap(start));
456
+ BrowserRuntime.runMain(provideBrowserScheduler(requestPreservedModel));
455
457
  }
456
458
  else {
457
- BrowserRuntime.runMain(foldkitRuntime());
459
+ BrowserRuntime.runMain(provideBrowserScheduler(program.start()));
458
460
  }
459
461
  };
@@ -1,5 +1,5 @@
1
1
  import { type Equivalence, type Schema, type Stream } from 'effect';
2
- type ResolveMessage<T> = [T] extends [Schema.Schema.Any] ? Schema.Schema.Type<T> : T;
2
+ type ResolveMessage<T> = T extends Schema.Top ? Schema.Schema.Type<T> : T;
3
3
  /** A reactive binding between Model state and a long-running stream of Messages. */
4
4
  export type Subscription<Model, Message, StreamDeps, Resources = never> = {
5
5
  readonly modelToDependencies: (model: Model) => StreamDeps;
@@ -14,10 +14,10 @@ export type Subscriptions<Model, Message, SubscriptionDeps extends Schema.Struct
14
14
  readonly [K in keyof Schema.Schema.Type<SubscriptionDeps>]: SubscriptionConfig<Model, Message, Schema.Schema.Type<SubscriptionDeps>[K], Resources>;
15
15
  };
16
16
  /** Creates type-safe subscription configurations from a dependency schema. */
17
- export declare const makeSubscriptions: <SubscriptionDeps extends Schema.Struct<any>>(SubscriptionDeps: SubscriptionDeps) => <Model, Message, Resources = never>(configs: { [K in keyof Schema.Schema.Type<SubscriptionDeps>]: {
18
- modelToDependencies: (model: Model) => Schema.Schema.Type<SubscriptionDeps>[K];
19
- equivalence?: Equivalence.Equivalence<Schema.Schema.Type<SubscriptionDeps>[K]>;
20
- dependenciesToStream: (deps: Schema.Schema.Type<SubscriptionDeps>[K], readDependencies: () => Schema.Schema.Type<SubscriptionDeps>[K]) => Stream.Stream<ResolveMessage<Message>, never, Resources>;
17
+ export declare const makeSubscriptions: <SubscriptionDeps extends Schema.Struct<any>>(SubscriptionDeps: SubscriptionDeps) => <Model, Message, Resources = never>(configs: { readonly [K in keyof Schema.Schema.Type<SubscriptionDeps>]: {
18
+ readonly modelToDependencies: (model: Model) => Schema.Schema.Type<SubscriptionDeps>[K];
19
+ readonly equivalence?: Equivalence.Equivalence<Schema.Schema.Type<SubscriptionDeps>[K]> | undefined;
20
+ readonly dependenciesToStream: (deps: Schema.Schema.Type<SubscriptionDeps>[K], readDependencies: () => Schema.Schema.Type<SubscriptionDeps>[K]) => Stream.Stream<ResolveMessage<Message>, never, Resources>;
21
21
  }; }) => Subscriptions<Model, Message, SubscriptionDeps, Resources>;
22
22
  export {};
23
23
  //# sourceMappingURL=subscription.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"subscription.d.ts","sourceRoot":"","sources":["../../src/runtime/subscription.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAU,KAAK,MAAM,EAAE,KAAK,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE3E,KAAK,cAAc,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,GACpD,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,GACrB,CAAC,CAAA;AAEL,oFAAoF;AACpF,MAAM,MAAM,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,GAAG,KAAK,IAAI;IACxE,QAAQ,CAAC,mBAAmB,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,UAAU,CAAA;IAC1D,QAAQ,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,UAAU,CAAC,CAAA;IAC1D,QAAQ,CAAC,oBAAoB,EAAE,CAC7B,IAAI,EAAE,UAAU,EAChB,gBAAgB,EAAE,MAAM,UAAU,KAC/B,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,CAAA;CAC9D,CAAA;AAED,KAAK,kBAAkB,CAAC,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,GAAG,K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AAA;CAC9D,GACF,KAAG,aAAa,CAAC,KAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,SAAS,CAUe,CAAA"}
@@ -2,34 +2,34 @@ import { Schema as S } from 'effect';
2
2
  /** A URL request to a page within the application (same origin). */
3
3
  export declare const Internal: import("../schema/index.js").CallableTaggedStruct<"Internal", {
4
4
  url: S.Struct<{
5
- protocol: typeof S.String;
6
- host: typeof S.String;
7
- port: S.OptionFromSelf<typeof S.String>;
8
- pathname: typeof S.String;
9
- search: S.OptionFromSelf<typeof S.String>;
10
- hash: S.OptionFromSelf<typeof S.String>;
5
+ readonly protocol: S.String;
6
+ readonly host: S.String;
7
+ readonly port: S.Option<S.String>;
8
+ readonly pathname: S.String;
9
+ readonly search: S.Option<S.String>;
10
+ readonly hash: S.Option<S.String>;
11
11
  }>;
12
12
  }>;
13
13
  /** A URL request to a page within the application (same origin). */
14
14
  export type Internal = typeof Internal.Type;
15
15
  /** A URL request to an external page (different origin). */
16
16
  export declare const External: import("../schema/index.js").CallableTaggedStruct<"External", {
17
- href: typeof S.String;
17
+ href: S.String;
18
18
  }>;
19
19
  /** A URL request to an external page (different origin). */
20
20
  export type External = typeof External.Type;
21
21
  /** Union of `Internal` and `External` URL request types. */
22
- export declare const UrlRequest: S.Union<[import("../schema/index.js").CallableTaggedStruct<"Internal", {
22
+ export declare const UrlRequest: S.Union<readonly [import("../schema/index.js").CallableTaggedStruct<"Internal", {
23
23
  url: S.Struct<{
24
- protocol: typeof S.String;
25
- host: typeof S.String;
26
- port: S.OptionFromSelf<typeof S.String>;
27
- pathname: typeof S.String;
28
- search: S.OptionFromSelf<typeof S.String>;
29
- hash: S.OptionFromSelf<typeof S.String>;
24
+ readonly protocol: S.String;
25
+ readonly host: S.String;
26
+ readonly port: S.Option<S.String>;
27
+ readonly pathname: S.String;
28
+ readonly search: S.Option<S.String>;
29
+ readonly hash: S.Option<S.String>;
30
30
  }>;
31
31
  }>, import("../schema/index.js").CallableTaggedStruct<"External", {
32
- href: typeof S.String;
32
+ href: S.String;
33
33
  }>]>;
34
34
  /** Union of `Internal` and `External` URL request types. */
35
35
  export type UrlRequest = typeof UrlRequest.Type;
@@ -1 +1 @@
1
- {"version":3,"file":"urlRequest.d.ts","sourceRoot":"","sources":["../../src/runtime/urlRequest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,QAAQ,CAAA;AAKpC,oEAAoE;AACpE,eAAO,MAAM,QAAQ;;;;;;;;;EAEnB,CAAA;AACF,oEAAoE;AACpE,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAC,IAAI,CAAA;AAE3C,4DAA4D;AAC5D,eAAO,MAAM,QAAQ;;EAEnB,CAAA;AACF,4DAA4D;AAC5D,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAC,IAAI,CAAA;AAE3C,4DAA4D;AAC5D,eAAO,MAAM,UAAU;;;;;;;;;;;IAA8B,CAAA;AACrD,4DAA4D;AAC5D,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAC,IAAI,CAAA"}
1
+ {"version":3,"file":"urlRequest.d.ts","sourceRoot":"","sources":["../../src/runtime/urlRequest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,QAAQ,CAAA;AAKpC,oEAAoE;AACpE,eAAO,MAAM,QAAQ;;;;;;;;;EAEnB,CAAA;AACF,oEAAoE;AACpE,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAC,IAAI,CAAA;AAE3C,4DAA4D;AAC5D,eAAO,MAAM,QAAQ;;EAEnB,CAAA;AACF,4DAA4D;AAC5D,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAC,IAAI,CAAA;AAE3C,4DAA4D;AAC5D,eAAO,MAAM,UAAU;;;;;;;;;;;IAAgC,CAAA;AACvD,4DAA4D;AAC5D,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAC,IAAI,CAAA"}
@@ -10,4 +10,4 @@ export const External = ts('External', {
10
10
  href: S.String,
11
11
  });
12
12
  /** Union of `Internal` and `External` URL request types. */
13
- export const UrlRequest = S.Union(Internal, External);
13
+ export const UrlRequest = S.Union([Internal, External]);
@@ -1,8 +1,8 @@
1
- import { Schema as S } from 'effect';
1
+ import { Schema as S, Types } from 'effect';
2
2
  /** A `TaggedStruct` schema that can be called directly as a constructor: `Foo({ count: 1 })` instead of `Foo.make({ count: 1 })`. */
3
- export type CallableTaggedStruct<Tag extends string, Fields extends S.Struct.Fields> = S.TaggedStruct<Tag, Fields> & (keyof Fields extends never ? (value?: Parameters<S.TaggedStruct<Tag, Fields>['make']>[0] | void) => S.Simplify<S.Struct.Type<{
3
+ export type CallableTaggedStruct<Tag extends string, Fields extends S.Struct.Fields> = S.TaggedStruct<Tag, Fields> & (keyof Fields extends never ? (value?: Parameters<S.TaggedStruct<Tag, Fields>['make']>[0] | void) => Types.Simplify<S.Struct.Type<{
4
4
  readonly _tag: S.tag<Tag>;
5
- } & Fields>> : (value: Parameters<S.TaggedStruct<Tag, Fields>['make']>[0]) => S.Simplify<S.Struct.Type<{
5
+ } & Fields>> : (value: Parameters<S.TaggedStruct<Tag, Fields>['make']>[0]) => Types.Simplify<S.Struct.Type<{
6
6
  readonly _tag: S.tag<Tag>;
7
7
  } & Fields>>);
8
8
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schema/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,QAAQ,CAAA;AAEpC,qIAAqI;AACrI,MAAM,MAAM,oBAAoB,CAC9B,GAAG,SAAS,MAAM,EAClB,MAAM,SAAS,CAAC,CAAC,MAAM,CAAC,MAAM,IAC5B,CAAC,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,GAC7B,CAAC,MAAM,MAAM,SAAS,KAAK,GACvB,CACE,KAAK,CAAC,EAAE,UAAU,CAAC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