foldkit 0.105.0 → 0.107.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 (41) hide show
  1. package/README.md +5 -4
  2. package/dist/devTools/overlay.d.ts +1 -1
  3. package/dist/devTools/overlay.d.ts.map +1 -1
  4. package/dist/devTools/overlay.js +11 -12
  5. package/dist/devTools/webSocketBridge.d.ts +2 -2
  6. package/dist/devTools/webSocketBridge.d.ts.map +1 -1
  7. package/dist/devTools/webSocketBridge.js +9 -0
  8. package/dist/html/index.d.ts +5 -1
  9. package/dist/html/index.d.ts.map +1 -1
  10. package/dist/index.d.ts +1 -0
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +1 -0
  13. package/dist/port/index.d.ts +2 -0
  14. package/dist/port/index.d.ts.map +1 -0
  15. package/dist/port/index.js +1 -0
  16. package/dist/port/port.d.ts +143 -0
  17. package/dist/port/port.d.ts.map +1 -0
  18. package/dist/port/port.js +156 -0
  19. package/dist/port/public.d.ts +3 -0
  20. package/dist/port/public.d.ts.map +1 -0
  21. package/dist/port/public.js +1 -0
  22. package/dist/runtime/browserListeners.d.ts +3 -3
  23. package/dist/runtime/browserListeners.d.ts.map +1 -1
  24. package/dist/runtime/browserListeners.js +23 -5
  25. package/dist/runtime/crashUI.d.ts.map +1 -1
  26. package/dist/runtime/crashUI.js +1 -3
  27. package/dist/runtime/public.d.ts +2 -2
  28. package/dist/runtime/public.d.ts.map +1 -1
  29. package/dist/runtime/public.js +1 -1
  30. package/dist/runtime/runtime.d.ts +172 -28
  31. package/dist/runtime/runtime.d.ts.map +1 -1
  32. package/dist/runtime/runtime.js +407 -49
  33. package/dist/runtime/subscription.d.ts +6 -1
  34. package/dist/runtime/subscription.d.ts.map +1 -1
  35. package/dist/ui/dragAndDrop/index.d.ts +212 -246
  36. package/dist/ui/dragAndDrop/index.d.ts.map +1 -1
  37. package/dist/ui/slider/index.d.ts +124 -179
  38. package/dist/ui/slider/index.d.ts.map +1 -1
  39. package/dist/ui/virtualList/index.d.ts +28 -38
  40. package/dist/ui/virtualList/index.d.ts.map +1 -1
  41. package/package.json +10 -6
@@ -0,0 +1,156 @@
1
+ import { Context, Effect, Option, Queue, Schema, Stream } from 'effect';
2
+ import { persistent } from '../runtime/subscription.js';
3
+ /** Type-level brand for inbound Port values. */
4
+ /* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
5
+ export const InboundTypeId = Symbol.for('foldkit/Port/Inbound');
6
+ /** Type-level brand for outbound Port values. */
7
+ /* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
8
+ export const OutboundTypeId = Symbol.for('foldkit/Port/Outbound');
9
+ /**
10
+ * Declares an inbound Port carrying values of the given Schema. The host
11
+ * sends values in the Schema's Encoded form; they are validated by decoding
12
+ * at the boundary, so only well-formed `Value`s ever reach the app.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * export const ports = {
17
+ * inbound: { stepChanged: Port.inbound(S.Number) },
18
+ * outbound: { countChanged: Port.outbound(S.Number) },
19
+ * }
20
+ * ```
21
+ */
22
+ export const inbound = (schema) => ({
23
+ [InboundTypeId]: InboundTypeId,
24
+ schema,
25
+ });
26
+ /**
27
+ * Declares an outbound Port carrying values of the given Schema. The app
28
+ * emits `Value`s with `Port.emit`; they are encoded at the boundary, so host
29
+ * listeners receive the Schema's Encoded form.
30
+ *
31
+ * @example
32
+ * ```ts
33
+ * export const ports = {
34
+ * inbound: { stepChanged: Port.inbound(S.Number) },
35
+ * outbound: { countChanged: Port.outbound(S.Number) },
36
+ * }
37
+ * ```
38
+ */
39
+ export const outbound = (schema) => ({
40
+ [OutboundTypeId]: OutboundTypeId,
41
+ schema,
42
+ });
43
+ const defaultPortChannels = {
44
+ isConfigured: false,
45
+ lookupInbound: () => Option.none(),
46
+ lookupOutbound: () => Option.none(),
47
+ };
48
+ /** Reference through which the runtime provides the current instance's Port
49
+ * wiring to Subscription Streams and Command Effects. A Reference has a
50
+ * default value, so reading it never adds a service requirement; the default
51
+ * marks Ports as unconfigured. Internal to the runtime. */
52
+ export const __CurrentPortChannels = Context.Reference('foldkit/Port/CurrentPortChannels', { defaultValue: () => defaultPortChannels });
53
+ /** Creates the channel for one inbound Port. Internal to the runtime. */
54
+ export const __makeInboundChannel = () => {
55
+ const subscribers = new Set();
56
+ let maybeBacklog = Option.some([]);
57
+ const deliver = (value) => {
58
+ if (subscribers.size > 0) {
59
+ subscribers.forEach(push => push(value));
60
+ }
61
+ else if (Option.isSome(maybeBacklog)) {
62
+ maybeBacklog.value.push(value);
63
+ }
64
+ };
65
+ const attach = (push) => {
66
+ subscribers.add(push);
67
+ if (Option.isSome(maybeBacklog)) {
68
+ const backlog = maybeBacklog.value;
69
+ maybeBacklog = Option.none();
70
+ backlog.forEach(push);
71
+ }
72
+ return () => {
73
+ subscribers.delete(push);
74
+ };
75
+ };
76
+ return { deliver, attach };
77
+ };
78
+ const notConfiguredMessage = (functionName) => `[foldkit] ${functionName} was called, but this program has no ports config. ` +
79
+ 'Declare Ports with Port.inbound and Port.outbound and pass the record to ' +
80
+ 'makeApplication or makeElement via the ports field.';
81
+ const unknownPortMessage = (functionName) => `[foldkit] ${functionName} was called with a Port that is not in this ` +
82
+ "program's ports config. Every Port the app uses must appear in the ports " +
83
+ 'record passed to makeApplication or makeElement.';
84
+ /**
85
+ * The decoded values arriving on an inbound Port, as a Stream. This is the
86
+ * atomic primitive for consuming a Port inside a Subscription entry; reach
87
+ * for `Port.subscription` when you want the common always-on form. Values
88
+ * sent while no Stream for the Port is running are dropped, except for
89
+ * values sent before the first Stream attaches, which are buffered and
90
+ * delivered to it in order (so host sends issued right after `Runtime.embed`
91
+ * are not lost during startup).
92
+ */
93
+ export const stream = (port) => Stream.unwrap(Effect.gen(function* () {
94
+ const channels = yield* __CurrentPortChannels;
95
+ if (!channels.isConfigured) {
96
+ return yield* Effect.die(new Error(notConfiguredMessage('Port.stream')));
97
+ }
98
+ const channel = yield* Option.match(channels.lookupInbound(port), {
99
+ onNone: () => Effect.die(new Error(unknownPortMessage('Port.stream'))),
100
+ onSome: Effect.succeed,
101
+ });
102
+ return Stream.callback(queue => Effect.acquireRelease(Effect.sync(() => channel.attach(value => {
103
+ /* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
104
+ Queue.offerUnsafe(queue, value);
105
+ })), detach => Effect.sync(() => detach())).pipe(Effect.flatMap(() => Effect.never)));
106
+ }));
107
+ /**
108
+ * Builds a Subscription entry that wraps every decoded value arriving on an
109
+ * inbound Port into a Message. The entry is persistent: it runs for the
110
+ * runtime's lifetime, independent of the Model. Pass it as an entry value
111
+ * inside `Subscription.make`. For a Model-gated entry, build one yourself
112
+ * from `Port.stream`.
113
+ *
114
+ * @example
115
+ * ```ts
116
+ * const subscriptions = Subscription.make<Model, Message>()(_entry => ({
117
+ * hostStep: Port.subscription(ports.inbound.stepChanged, step =>
118
+ * ChangedStep({ step }),
119
+ * ),
120
+ * }))
121
+ * ```
122
+ */
123
+ export const subscription = (port, toMessage) => persistent(Stream.map(stream(port), toMessage));
124
+ /**
125
+ * Emits a value on an outbound Port. The value is encoded against the Port's
126
+ * Schema and delivered to every host listener subscribed through the
127
+ * `EmbedHandle`. Compose it into the app's own Commands like any other
128
+ * Effect:
129
+ *
130
+ * ```ts
131
+ * const ReportCount = Command.define(
132
+ * 'ReportCount',
133
+ * { count: S.Number },
134
+ * CompletedReportCount,
135
+ * )(({ count }) =>
136
+ * Port.emit(ports.outbound.countChanged, count).pipe(
137
+ * Effect.as(CompletedReportCount()),
138
+ * ),
139
+ * )
140
+ * ```
141
+ *
142
+ * When the program runs without an embed handle (started with `Runtime.run`),
143
+ * emitting is a no-op.
144
+ */
145
+ export const emit = (port, value) => Effect.gen(function* () {
146
+ const channels = yield* __CurrentPortChannels;
147
+ if (!channels.isConfigured) {
148
+ return yield* Effect.die(new Error(notConfiguredMessage('Port.emit')));
149
+ }
150
+ const deliver = yield* Option.match(channels.lookupOutbound(port), {
151
+ onNone: () => Effect.die(new Error(unknownPortMessage('Port.emit'))),
152
+ onSome: Effect.succeed,
153
+ });
154
+ const encodedValue = yield* Effect.orDie(Schema.encodeEffect(port.schema)(value));
155
+ deliver(encodedValue);
156
+ });
@@ -0,0 +1,3 @@
1
+ export { InboundTypeId, OutboundTypeId, emit, inbound, outbound, stream, subscription, } from './index.js';
2
+ export type { Inbound, Outbound, Ports } from './index.js';
3
+ //# sourceMappingURL=public.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../src/port/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,cAAc,EACd,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,MAAM,EACN,YAAY,GACb,MAAM,YAAY,CAAA;AAEnB,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA"}
@@ -0,0 +1 @@
1
+ export { InboundTypeId, OutboundTypeId, emit, inbound, outbound, stream, subscription, } from './index.js';
@@ -1,5 +1,5 @@
1
1
  import { RoutingConfig } from './runtime.js';
2
- export declare const addNavigationEventListeners: <Message>(dispatch: (message: Message) => void, routingConfig: RoutingConfig<Message>) => void;
3
- export declare const addLinkClickListener: <Message>(dispatch: (message: Message) => void, routingConfig: RoutingConfig<Message>) => void;
4
- export declare const addBfcacheRestoreListener: () => void;
2
+ export declare const addNavigationEventListeners: <Message>(dispatch: (message: Message) => void, routingConfig: RoutingConfig<Message>) => (() => void);
3
+ export declare const addLinkClickListener: <Message>(dispatch: (message: Message) => void, routingConfig: RoutingConfig<Message>) => (() => void);
4
+ export declare const addBfcacheRestoreListener: () => (() => void);
5
5
  //# sourceMappingURL=browserListeners.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"browserListeners.d.ts","sourceRoot":"","sources":["../../src/runtime/browserListeners.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAE5C,eAAO,MAAM,2BAA2B,GAAI,OAAO,EACjD,UAAU,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,EACpC,eAAe,aAAa,CAAC,OAAO,CAAC,SAKtC,CAAA;AAaD,eAAO,MAAM,oBAAoB,GAAI,OAAO,EAC1C,UAAU,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,EACpC,eAAe,aAAa,CAAC,OAAO,CAAC,SAoDtC,CAAA;AA4BD,eAAO,MAAM,yBAAyB,YASrC,CAAA"}
1
+ {"version":3,"file":"browserListeners.d.ts","sourceRoot":"","sources":["../../src/runtime/browserListeners.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAE5C,eAAO,MAAM,2BAA2B,GAAI,OAAO,EACjD,UAAU,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,EACpC,eAAe,aAAa,CAAC,OAAO,CAAC,KACpC,CAAC,MAAM,IAAI,CAWb,CAAA;AAgBD,eAAO,MAAM,oBAAoB,GAAI,OAAO,EAC1C,UAAU,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,EACpC,eAAe,aAAa,CAAC,OAAO,CAAC,KACpC,CAAC,MAAM,IAAI,CAsDb,CAAA;AA+BD,eAAO,MAAM,yBAAyB,QAAO,CAAC,MAAM,IAAI,CAavD,CAAA"}
@@ -2,15 +2,23 @@ import { Option, String } from 'effect';
2
2
  import { OptionExt, StringExt } from '../effectExtensions/index.js';
3
3
  import { External, Internal } from '../navigation/urlRequest.js';
4
4
  export const addNavigationEventListeners = (dispatch, routingConfig) => {
5
- addPopStateListener(dispatch, routingConfig);
6
- addLinkClickListener(dispatch, routingConfig);
7
- addProgrammaticNavigationListener(dispatch, routingConfig);
5
+ const removePopStateListener = addPopStateListener(dispatch, routingConfig);
6
+ const removeLinkClickListener = addLinkClickListener(dispatch, routingConfig);
7
+ const removeProgrammaticNavigationListener = addProgrammaticNavigationListener(dispatch, routingConfig);
8
+ return () => {
9
+ removePopStateListener();
10
+ removeLinkClickListener();
11
+ removeProgrammaticNavigationListener();
12
+ };
8
13
  };
9
14
  const addPopStateListener = (dispatch, routingConfig) => {
10
15
  const onPopState = () => {
11
16
  dispatch(routingConfig.onUrlChange(locationToUrl()));
12
17
  };
13
18
  window.addEventListener('popstate', onPopState);
19
+ return () => {
20
+ window.removeEventListener('popstate', onPopState);
21
+ };
14
22
  };
15
23
  export const addLinkClickListener = (dispatch, routingConfig) => {
16
24
  const onLinkClick = (event) => {
@@ -48,12 +56,18 @@ export const addLinkClickListener = (dispatch, routingConfig) => {
48
56
  dispatch(routingConfig.onUrlRequest(Internal({ url: urlToFoldkitUrl(linkUrl) })));
49
57
  };
50
58
  document.addEventListener('click', onLinkClick);
59
+ return () => {
60
+ document.removeEventListener('click', onLinkClick);
61
+ };
51
62
  };
52
63
  const addProgrammaticNavigationListener = (dispatch, routingConfig) => {
53
64
  const onProgrammaticNavigation = () => {
54
65
  dispatch(routingConfig.onUrlChange(locationToUrl()));
55
66
  };
56
67
  window.addEventListener('foldkit:urlchange', onProgrammaticNavigation);
68
+ return () => {
69
+ window.removeEventListener('foldkit:urlchange', onProgrammaticNavigation);
70
+ };
57
71
  };
58
72
  const urlToFoldkitUrl = (url) => {
59
73
  const { protocol, hostname, port, pathname, search, hash } = url;
@@ -68,9 +82,13 @@ const urlToFoldkitUrl = (url) => {
68
82
  };
69
83
  const locationToUrl = () => urlToFoldkitUrl(new URL(window.location.href));
70
84
  export const addBfcacheRestoreListener = () => {
71
- window.addEventListener('pageshow', ({ persisted: isRestoredFromBfcache }) => {
85
+ const onPageShow = ({ persisted: isRestoredFromBfcache, }) => {
72
86
  if (isRestoredFromBfcache) {
73
87
  location.reload();
74
88
  }
75
- });
89
+ };
90
+ window.addEventListener('pageshow', onPageShow);
91
+ return () => {
92
+ window.removeEventListener('pageshow', onPageShow);
93
+ };
76
94
  };
@@ -1 +1 @@
1
- {"version":3,"file":"crashUI.d.ts","sourceRoot":"","sources":["../../src/runtime/crashUI.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B,OAAO,EAAE,QAAQ,EAAQ,MAAM,kBAAkB,CAAA;AAEjD,eAAO,MAAM,YAAY;8BACG,OAAO;6BACR,OAAO;CACjC,CAAA;AAmBD,eAAO,MAAM,gBAAgB,GAC3B,SAAS,QAAQ,CAAC;IAAE,KAAK,EAAE,KAAK,CAAA;CAAE,CAAC,EACnC,YAAY,OAAO,KAClB,QA4LF,CAAA"}
1
+ {"version":3,"file":"crashUI.d.ts","sourceRoot":"","sources":["../../src/runtime/crashUI.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B,OAAO,EAAE,QAAQ,EAAQ,MAAM,kBAAkB,CAAA;AAEjD,eAAO,MAAM,YAAY;8BACG,OAAO;6BACR,OAAO;CACjC,CAAA;AAmBD,eAAO,MAAM,gBAAgB,GAC3B,SAAS,QAAQ,CAAC;IAAE,KAAK,EAAE,KAAK,CAAA;CAAE,CAAC,EACnC,YAAY,OAAO,KAClB,QA0LF,CAAA"}
@@ -91,9 +91,7 @@ export const defaultCrashView = (context, viewError) => {
91
91
  ], [
92
92
  'This is the default crash view. You can customize it by providing a ',
93
93
  h.span([inlineCodeStyle], ['crash.view']),
94
- ' function to ',
95
- h.span([inlineCodeStyle], ['makeProgram']),
96
- '.',
94
+ ' function.',
97
95
  ]),
98
96
  ];
99
97
  const body = h.div([
@@ -1,3 +1,3 @@
1
- export { makeProgram, run } from './runtime.js';
2
- export type { RoutingConfig, CrashConfig, CrashContext, RoutingProgramConfigWithFlags, RoutingProgramConfig, ProgramConfigWithFlags, ProgramConfig, ProgramInit, RoutingProgramInit, MakeRuntimeReturn, Visibility, SlowViewContext, SlowViewConfig, DevToolsConfig, DevToolsMode, DevToolsModeConfig, } from './runtime.js';
1
+ export { embed, makeApplication, makeElement, run } from './runtime.js';
2
+ export type { RoutingConfig, CrashConfig, CrashContext, ElementCrashConfig, RoutingApplicationConfigWithFlags, RoutingApplicationConfig, ApplicationConfigWithFlags, ApplicationConfig, ElementConfigWithFlags, ElementConfig, ApplicationInit, RoutingApplicationInit, ElementInit, EmbedHandle, InboundPortHandle, InboundPortHandles, OutboundPortHandle, OutboundPortHandles, PortHandles, MakeRuntimeReturn, Visibility, SlowViewContext, SlowViewConfig, DevToolsConfig, DevToolsMode, DevToolsModeConfig, } from './runtime.js';
3
3
  //# sourceMappingURL=public.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../src/runtime/public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAE/C,YAAY,EACV,aAAa,EACb,WAAW,EACX,YAAY,EACZ,6BAA6B,EAC7B,oBAAoB,EACpB,sBAAsB,EACtB,aAAa,EACb,WAAW,EACX,kBAAkB,EAClB,iBAAiB,EACjB,UAAU,EACV,eAAe,EACf,cAAc,EACd,cAAc,EACd,YAAY,EACZ,kBAAkB,GACnB,MAAM,cAAc,CAAA"}
1
+ {"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../src/runtime/public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAEvE,YAAY,EACV,aAAa,EACb,WAAW,EACX,YAAY,EACZ,kBAAkB,EAClB,iCAAiC,EACjC,wBAAwB,EACxB,0BAA0B,EAC1B,iBAAiB,EACjB,sBAAsB,EACtB,aAAa,EACb,eAAe,EACf,sBAAsB,EACtB,WAAW,EACX,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,WAAW,EACX,iBAAiB,EACjB,UAAU,EACV,eAAe,EACf,cAAc,EACd,cAAc,EACd,YAAY,EACZ,kBAAkB,GACnB,MAAM,cAAc,CAAA"}
@@ -1 +1 @@
1
- export { makeProgram, run } from './runtime.js';
1
+ export { embed, makeApplication, makeElement, run } from './runtime.js';
@@ -1,7 +1,8 @@
1
- import { Context, Effect, Layer, Option, Schema } from 'effect';
1
+ import { Context, Effect, Exit, Layer, Option, Schema } from 'effect';
2
2
  import type { Command } from '../command/index.js';
3
- import { Document } from '../html/index.js';
3
+ import { Document, Html } from '../html/index.js';
4
4
  import { UrlRequest } from '../navigation/urlRequest.js';
5
+ import { type Inbound, type Outbound, type Ports } from '../port/index.js';
5
6
  import { Url } from '../url/index.js';
6
7
  import { VNode } from '../vdom.js';
7
8
  import type { ManagedResources } from './managedResource.js';
@@ -103,7 +104,7 @@ export type CrashConfig<Model, Message> = Readonly<{
103
104
  view?: (context: CrashContext<Model, Message>) => Document;
104
105
  report?: (context: CrashContext<Model, Message>) => void;
105
106
  }>;
106
- type BaseProgramConfig<Model, Message, Resources = never, ManagedResourceServices = never> = Readonly<{
107
+ type BaseApplicationConfig<Model, Message, Resources = never, ManagedResourceServices = never, P extends Ports | undefined = undefined> = Readonly<{
107
108
  Model: Schema.Codec<Model, any, unknown, unknown>;
108
109
  update: (model: Model, message: Message) => readonly [
109
110
  Model,
@@ -112,6 +113,7 @@ type BaseProgramConfig<Model, Message, Resources = never, ManagedResourceService
112
113
  view: (model: Model) => Document;
113
114
  subscriptions?: Subscriptions<Model, Message, Resources | ManagedResourceServices>;
114
115
  container: HTMLElement | null;
116
+ ports?: P;
115
117
  crash?: CrashConfig<Model, Message>;
116
118
  slowView?: SlowViewConfig<Model, Message>;
117
119
  freezeModel?: boolean;
@@ -119,8 +121,8 @@ type BaseProgramConfig<Model, Message, Resources = never, ManagedResourceService
119
121
  managedResources?: ManagedResources<Model, Message, ManagedResourceServices>;
120
122
  devTools?: DevToolsConfig;
121
123
  }>;
122
- /** Configuration for `makeProgram` with flags and URL routing. */
123
- export type RoutingProgramConfigWithFlags<Model, Message, Flags, Resources = never, ManagedResourceServices = never> = BaseProgramConfig<Model, Message, Resources, ManagedResourceServices> & Readonly<{
124
+ /** Configuration for `makeApplication` with flags and URL routing. */
125
+ export type RoutingApplicationConfigWithFlags<Model, Message, Flags, Resources = never, ManagedResourceServices = never, P extends Ports | undefined = undefined> = BaseApplicationConfig<Model, Message, Resources, ManagedResourceServices, P> & Readonly<{
124
126
  Flags: Schema.Codec<Flags, any, unknown, unknown>;
125
127
  flags: Effect.Effect<Flags>;
126
128
  routing: RoutingConfig<Message>;
@@ -129,16 +131,16 @@ export type RoutingProgramConfigWithFlags<Model, Message, Flags, Resources = nev
129
131
  ReadonlyArray<Command<Message, never, Resources | ManagedResourceServices>>
130
132
  ];
131
133
  }>;
132
- /** Configuration for `makeProgram` with URL routing but no flags. */
133
- export type RoutingProgramConfig<Model, Message, Resources = never, ManagedResourceServices = never> = BaseProgramConfig<Model, Message, Resources, ManagedResourceServices> & Readonly<{
134
+ /** Configuration for `makeApplication` with URL routing but no flags. */
135
+ export type RoutingApplicationConfig<Model, Message, Resources = never, ManagedResourceServices = never, P extends Ports | undefined = undefined> = BaseApplicationConfig<Model, Message, Resources, ManagedResourceServices, P> & Readonly<{
134
136
  routing: RoutingConfig<Message>;
135
137
  init: (url: Url) => readonly [
136
138
  Model,
137
139
  ReadonlyArray<Command<Message, never, Resources | ManagedResourceServices>>
138
140
  ];
139
141
  }>;
140
- /** Configuration for `makeProgram` with flags but no URL routing. */
141
- export type ProgramConfigWithFlags<Model, Message, Flags, Resources = never, ManagedResourceServices = never> = BaseProgramConfig<Model, Message, Resources, ManagedResourceServices> & Readonly<{
142
+ /** Configuration for `makeApplication` with flags but no URL routing. */
143
+ export type ApplicationConfigWithFlags<Model, Message, Flags, Resources = never, ManagedResourceServices = never, P extends Ports | undefined = undefined> = BaseApplicationConfig<Model, Message, Resources, ManagedResourceServices, P> & Readonly<{
142
144
  Flags: Schema.Codec<Flags, any, unknown, unknown>;
143
145
  flags: Effect.Effect<Flags>;
144
146
  init: (flags: Flags) => readonly [
@@ -146,48 +148,190 @@ export type ProgramConfigWithFlags<Model, Message, Flags, Resources = never, Man
146
148
  ReadonlyArray<Command<Message, never, Resources | ManagedResourceServices>>
147
149
  ];
148
150
  }>;
149
- /** Configuration for `makeProgram` without flags or URL routing. */
150
- export type ProgramConfig<Model, Message, Resources = never, ManagedResourceServices = never> = BaseProgramConfig<Model, Message, Resources, ManagedResourceServices> & Readonly<{
151
+ /** Configuration for `makeApplication` without flags or URL routing. */
152
+ export type ApplicationConfig<Model, Message, Resources = never, ManagedResourceServices = never, P extends Ports | undefined = undefined> = BaseApplicationConfig<Model, Message, Resources, ManagedResourceServices, P> & Readonly<{
151
153
  init: () => readonly [
152
154
  Model,
153
155
  ReadonlyArray<Command<Message, never, Resources | ManagedResourceServices>>
154
156
  ];
155
157
  }>;
156
- /** The `init` function type for programs without URL routing. */
157
- export type ProgramInit<Model, Message, Flags = void, Resources = never, ManagedResourceServices = never> = Flags extends void ? () => readonly [
158
+ /** Configuration for crash handling in a `makeElement` app. The crash view
159
+ * returns `Html`, not a `Document`, because a scoped app never owns the
160
+ * document `<head>`. */
161
+ export type ElementCrashConfig<Model, Message> = Readonly<{
162
+ view?: (context: CrashContext<Model, Message>) => Html;
163
+ report?: (context: CrashContext<Model, Message>) => void;
164
+ }>;
165
+ type BaseElementConfig<Model, Message, Resources = never, ManagedResourceServices = never, P extends Ports | undefined = undefined> = Readonly<{
166
+ Model: Schema.Codec<Model, any, unknown, unknown>;
167
+ update: (model: Model, message: Message) => readonly [
168
+ Model,
169
+ ReadonlyArray<Command<Message, never, Resources | ManagedResourceServices>>
170
+ ];
171
+ view: (model: Model) => Html;
172
+ subscriptions?: Subscriptions<Model, Message, Resources | ManagedResourceServices>;
173
+ container: HTMLElement | null;
174
+ ports?: P;
175
+ crash?: ElementCrashConfig<Model, Message>;
176
+ slowView?: SlowViewConfig<Model, Message>;
177
+ freezeModel?: boolean;
178
+ resources?: Layer.Layer<Resources>;
179
+ managedResources?: ManagedResources<Model, Message, ManagedResourceServices>;
180
+ devTools?: DevToolsConfig;
181
+ }>;
182
+ /** Configuration for `makeElement` with flags. */
183
+ export type ElementConfigWithFlags<Model, Message, Flags, Resources = never, ManagedResourceServices = never, P extends Ports | undefined = undefined> = BaseElementConfig<Model, Message, Resources, ManagedResourceServices, P> & Readonly<{
184
+ Flags: Schema.Codec<Flags, any, unknown, unknown>;
185
+ flags: Effect.Effect<Flags>;
186
+ init: (flags: Flags) => readonly [
187
+ Model,
188
+ ReadonlyArray<Command<Message, never, Resources | ManagedResourceServices>>
189
+ ];
190
+ }>;
191
+ /** Configuration for `makeElement` without flags. */
192
+ export type ElementConfig<Model, Message, Resources = never, ManagedResourceServices = never, P extends Ports | undefined = undefined> = BaseElementConfig<Model, Message, Resources, ManagedResourceServices, P> & Readonly<{
193
+ init: () => readonly [
194
+ Model,
195
+ ReadonlyArray<Command<Message, never, Resources | ManagedResourceServices>>
196
+ ];
197
+ }>;
198
+ /** The `init` function type for a `makeApplication` app without URL routing. */
199
+ export type ApplicationInit<Model, Message, Flags = void, Resources = never, ManagedResourceServices = never> = Flags extends void ? () => readonly [
158
200
  Model,
159
201
  ReadonlyArray<Command<Message, never, Resources | ManagedResourceServices>>
160
202
  ] : (flags: Flags) => readonly [
161
203
  Model,
162
204
  ReadonlyArray<Command<Message, never, Resources | ManagedResourceServices>>
163
205
  ];
164
- /** The `init` function type for programs with URL routing, receives the current URL and optional flags. */
165
- export type RoutingProgramInit<Model, Message, Flags = void, Resources = never, ManagedResourceServices = never> = Flags extends void ? (url: Url) => readonly [
206
+ /** The `init` function type for a `makeApplication` app with URL routing, receives the current URL and optional flags. */
207
+ export type RoutingApplicationInit<Model, Message, Flags = void, Resources = never, ManagedResourceServices = never> = Flags extends void ? (url: Url) => readonly [
166
208
  Model,
167
209
  ReadonlyArray<Command<Message, never, Resources | ManagedResourceServices>>
168
210
  ] : (flags: Flags, url: Url) => readonly [
169
211
  Model,
170
212
  ReadonlyArray<Command<Message, never, Resources | ManagedResourceServices>>
171
213
  ];
172
- /** A configured Foldkit runtime returned by `makeProgram`, passed to `run` to start the application. */
173
- export type MakeRuntimeReturn = Readonly<{
214
+ /** The `init` function type for a `makeElement` app. A scoped app never owns
215
+ * the URL, so its `init` has the same shape as a non-routing
216
+ * `ApplicationInit`: argless, or receiving flags when `Flags` is set. */
217
+ export type ElementInit<Model, Message, Flags = void, Resources = never, ManagedResourceServices = never> = ApplicationInit<Model, Message, Flags, Resources, ManagedResourceServices>;
218
+ /** A configured Foldkit runtime returned by `makeApplication` or `makeElement`.
219
+ * Pass it to `run` to start a page-owning app, or to `embed` to start it under
220
+ * a host-controlled lifecycle handle. `ports` is the Ports record from the
221
+ * config (or `undefined` when the config declared none); it types the
222
+ * `EmbedHandle` that `embed` returns. */
223
+ export type MakeRuntimeReturn<P extends Ports | undefined = undefined> = Readonly<{
174
224
  runtimeId: string;
175
225
  start: (hmrModel?: unknown) => Effect.Effect<void>;
226
+ ports: P;
227
+ }>;
228
+ /** Host-side handle for one inbound Port. `send` validates the value by
229
+ * decoding it against the Port's Schema: on success the decoded value enters
230
+ * the app through the Port's Subscription; on failure nothing reaches the
231
+ * app, the failure is logged, and the returned `Exit` carries the
232
+ * `SchemaError`. Sends after `dispose` are no-ops. */
233
+ export type InboundPortHandle<Encoded> = Readonly<{
234
+ send: (value: Encoded) => Exit.Exit<void, Schema.SchemaError>;
235
+ }>;
236
+ /** Host-side handle for one outbound Port. `subscribe` registers a listener
237
+ * for the encoded values the app emits with `Port.emit` and returns an
238
+ * unsubscribe function. Multiple listeners receive each value in
239
+ * registration order. */
240
+ export type OutboundPortHandle<Encoded> = Readonly<{
241
+ subscribe: (listener: (value: Encoded) => void) => () => void;
242
+ }>;
243
+ /** The inbound half of `PortHandles`: one `InboundPortHandle` per declared
244
+ * inbound Port, keyed by Port name. */
245
+ export type InboundPortHandles<InboundPorts> = InboundPorts extends Readonly<Record<string, Inbound<any, any>>> ? {
246
+ readonly [Name in keyof InboundPorts]: InboundPorts[Name] extends Inbound<any, infer Encoded> ? InboundPortHandle<Encoded> : never;
247
+ } : unknown;
248
+ /** The outbound half of `PortHandles`: one `OutboundPortHandle` per declared
249
+ * outbound Port, keyed by Port name. */
250
+ export type OutboundPortHandles<OutboundPorts> = OutboundPorts extends Readonly<Record<string, Outbound<any, any>>> ? {
251
+ readonly [Name in keyof OutboundPorts]: OutboundPorts[Name] extends Outbound<any, infer Encoded> ? OutboundPortHandle<Encoded> : never;
252
+ } : unknown;
253
+ /** The `ports` field of an `EmbedHandle`: one `InboundPortHandle` or
254
+ * `OutboundPortHandle` per declared Port, keyed by Port name. */
255
+ export type PortHandles<P extends Ports | undefined> = P extends Ports ? InboundPortHandles<P['inbound']> & OutboundPortHandles<P['outbound']> : unknown;
256
+ /**
257
+ * The handle returned by `embed`. The host talks to the embedded app only
258
+ * through it: `ports.<name>.send` pushes values in, `ports.<name>.subscribe`
259
+ * listens to values the app emits, and `dispose` shuts the runtime down.
260
+ *
261
+ * `dispose` is idempotent. It interrupts the runtime and runs all cleanup:
262
+ * Subscriptions, ManagedResources, Mounts, listeners, and in-flight Commands
263
+ * stop, and the rendered DOM is removed with the container element restored
264
+ * empty in its place, ready for a fresh `embed`.
265
+ */
266
+ export type EmbedHandle<P extends Ports | undefined = undefined> = Readonly<{
267
+ ports: PortHandles<P>;
268
+ dispose: () => void;
176
269
  }>;
177
270
  export declare const patchVNode: (maybeCurrentVNode: Option.Option<VNode>, nextVNode: VNode | null, container: HTMLElement) => VNode;
178
- /** Creates a Foldkit program and returns a runtime that can be passed to `run`. Add a `routing` config for URL routing. */
179
- export declare function makeProgram<Model, Message extends {
271
+ /** Creates a Foldkit application that owns the page and returns a runtime that
272
+ * can be passed to `run`. The `view` returns a `Document`, so the runtime
273
+ * manages `document.title` and the canonical / og:url tags. Add a `routing`
274
+ * config for URL routing. To mount an app scoped to a node without touching the
275
+ * document `<head>`, use `makeElement`. */
276
+ export declare function makeApplication<Model, Message extends {
277
+ _tag: string;
278
+ }, Flags, Resources = never, ManagedResourceServices = never, P extends Ports | undefined = undefined>(config: RoutingApplicationConfigWithFlags<Model, Message, Flags, Resources, ManagedResourceServices, P>): MakeRuntimeReturn<P>;
279
+ export declare function makeApplication<Model, Message extends {
180
280
  _tag: string;
181
- }, Flags, Resources = never, ManagedResourceServices = never>(config: RoutingProgramConfigWithFlags<Model, Message, Flags, Resources, ManagedResourceServices>): MakeRuntimeReturn;
182
- export declare function makeProgram<Model, Message extends {
281
+ }, Resources = never, ManagedResourceServices = never, P extends Ports | undefined = undefined>(config: RoutingApplicationConfig<Model, Message, Resources, ManagedResourceServices, P>): MakeRuntimeReturn<P>;
282
+ export declare function makeApplication<Model, Message extends {
183
283
  _tag: string;
184
- }, Resources = never, ManagedResourceServices = never>(config: RoutingProgramConfig<Model, Message, Resources, ManagedResourceServices>): MakeRuntimeReturn;
185
- export declare function makeProgram<Model, Message extends {
284
+ }, Flags, Resources = never, ManagedResourceServices = never, P extends Ports | undefined = undefined>(config: ApplicationConfigWithFlags<Model, Message, Flags, Resources, ManagedResourceServices, P>): MakeRuntimeReturn<P>;
285
+ export declare function makeApplication<Model, Message extends {
186
286
  _tag: string;
187
- }, Flags, Resources = never, ManagedResourceServices = never>(config: ProgramConfigWithFlags<Model, Message, Flags, Resources, ManagedResourceServices>): MakeRuntimeReturn;
188
- export declare function makeProgram<Model, Message extends {
287
+ }, Resources = never, ManagedResourceServices = never, P extends Ports | undefined = undefined>(config: ApplicationConfig<Model, Message, Resources, ManagedResourceServices, P>): MakeRuntimeReturn<P>;
288
+ /**
289
+ * Creates a Foldkit app scoped to its container and returns a runtime that
290
+ * can be passed to `run`.
291
+ *
292
+ * Unlike `makeApplication`, the `view` returns `Html` directly rather than a
293
+ * `Document`, and the runtime never touches the document `<head>`. This lets a
294
+ * Foldkit app be embedded at a node (a widget on a page it does not own)
295
+ * without clobbering the host page's `title`, `canonical`, or `og:url`. Use
296
+ * `makeApplication` when the app owns the page and should manage those tags, and
297
+ * `makeElement` when it is one component among others on a page it does not
298
+ * control. Embedded apps do not own the URL bar, so `makeElement` has no
299
+ * `routing` config.
300
+ */
301
+ export declare function makeElement<Model, Message extends {
189
302
  _tag: string;
190
- }, Resources = never, ManagedResourceServices = never>(config: ProgramConfig<Model, Message, Resources, ManagedResourceServices>): MakeRuntimeReturn;
191
- /** Starts a Foldkit runtime, with HMR support for development. */
192
- export declare const run: (program: MakeRuntimeReturn) => void;
303
+ }, Flags, Resources = never, ManagedResourceServices = never, P extends Ports | undefined = undefined>(config: ElementConfigWithFlags<Model, Message, Flags, Resources, ManagedResourceServices, P>): MakeRuntimeReturn<P>;
304
+ export declare function makeElement<Model, Message extends {
305
+ _tag: string;
306
+ }, Resources = never, ManagedResourceServices = never, P extends Ports | undefined = undefined>(config: ElementConfig<Model, Message, Resources, ManagedResourceServices, P>): MakeRuntimeReturn<P>;
307
+ /** Starts a Foldkit runtime that owns the page for the page's whole lifetime,
308
+ * with HMR support for development. To start a runtime under a
309
+ * host-controlled lifecycle instead, use `embed`. */
310
+ export declare const run: (program: MakeRuntimeReturn<Ports | undefined>) => void;
311
+ /**
312
+ * Starts a Foldkit runtime under a host-controlled lifecycle and returns an
313
+ * `EmbedHandle`. This is the entry point for embedding a Foldkit app inside
314
+ * another application: the host pushes values in through the handle's inbound
315
+ * Ports, listens to outbound Ports, and calls `dispose` when it unmounts the
316
+ * app. The host never touches the Model or dispatches Messages directly; the
317
+ * Schema-typed Ports are the whole boundary.
318
+ *
319
+ * Works with programs from both `makeApplication` and `makeElement`; for a
320
+ * widget on a page the host owns, `makeElement` is the natural fit.
321
+ *
322
+ * A program can be embedded once at a time (it owns one container). After
323
+ * `dispose`, the same container can be embedded again with a fresh program.
324
+ *
325
+ * ```ts
326
+ * const handle = Runtime.embed(element)
327
+ *
328
+ * handle.ports.stepChanged.send(5)
329
+ * const unsubscribe = handle.ports.countChanged.subscribe(count => {
330
+ * console.log(count)
331
+ * })
332
+ *
333
+ * handle.dispose()
334
+ * ```
335
+ */
336
+ export declare const embed: <P extends Ports | undefined = undefined>(program: MakeRuntimeReturn<P>) => EmbedHandle<P>;
193
337
  //# sourceMapping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