foldkit 0.35.1 → 0.36.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.
- package/README.md +1 -1
- package/dist/devtools/overlay.js +1 -1
- package/dist/runtime/{errorUI.d.ts → crashUI.d.ts} +4 -2
- package/dist/runtime/crashUI.d.ts.map +1 -0
- package/dist/runtime/{errorUI.js → crashUI.js} +8 -8
- package/dist/runtime/public.d.ts +1 -1
- package/dist/runtime/public.d.ts.map +1 -1
- package/dist/runtime/runtime.d.ts +44 -10
- package/dist/runtime/runtime.d.ts.map +1 -1
- package/dist/runtime/runtime.js +261 -203
- package/dist/ui/combobox/shared.d.ts +22 -21
- package/dist/ui/combobox/shared.d.ts.map +1 -1
- package/dist/ui/dialog/index.d.ts +8 -1
- package/dist/ui/dialog/index.d.ts.map +1 -1
- package/dist/ui/disclosure/index.d.ts +5 -1
- package/dist/ui/disclosure/index.d.ts.map +1 -1
- package/dist/ui/listbox/multi.d.ts +5 -5
- package/dist/ui/listbox/shared.d.ts +31 -27
- package/dist/ui/listbox/shared.d.ts.map +1 -1
- package/dist/ui/listbox/single.d.ts +5 -5
- package/dist/ui/menu/index.d.ts +28 -29
- package/dist/ui/menu/index.d.ts.map +1 -1
- package/dist/ui/popover/index.d.ts +17 -4
- package/dist/ui/popover/index.d.ts.map +1 -1
- package/dist/ui/radioGroup/index.d.ts +4 -4
- package/dist/ui/radioGroup/index.d.ts.map +1 -1
- package/dist/ui/tabs/index.d.ts +5 -5
- package/dist/ui/tabs/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/runtime/errorUI.d.ts.map +0 -1
package/dist/runtime/runtime.js
CHANGED
|
@@ -6,208 +6,243 @@ import { createDevtoolsStore } from '../devtools/store';
|
|
|
6
6
|
import { fromString as urlFromString } from '../url';
|
|
7
7
|
import { patch, toVNode } from '../vdom';
|
|
8
8
|
import { addBfcacheRestoreListener, addNavigationEventListeners, } from './browserListeners';
|
|
9
|
-
import {
|
|
10
|
-
const SLOW_VIEW_THRESHOLD_MS = 16;
|
|
9
|
+
import { defaultCrashView, noOpDispatch } from './crashUI';
|
|
11
10
|
const DEFAULT_DEVTOOLS_SHOW = 'Development';
|
|
12
11
|
const DEFAULT_DEVTOOLS_POSITION = 'BottomRight';
|
|
13
12
|
const DEFAULT_DEVTOOLS_MODE = 'TimeTravel';
|
|
13
|
+
const DEFAULT_SLOW_VIEW_SHOW = 'Development';
|
|
14
|
+
const DEFAULT_SLOW_VIEW_THRESHOLD_MS = 16;
|
|
15
|
+
const defaultSlowViewCallback = (context) => {
|
|
16
|
+
const trigger = Option.match(context.message, {
|
|
17
|
+
onNone: () => 'init',
|
|
18
|
+
onSome: message => {
|
|
19
|
+
const tag = Predicate.isRecord(message) && '_tag' in message
|
|
20
|
+
? String(message['_tag'])
|
|
21
|
+
: 'unknown';
|
|
22
|
+
return tag;
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
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));
|
|
26
|
+
};
|
|
14
27
|
/** Effect service tag that provides message dispatching to the view layer. */
|
|
15
28
|
export class Dispatch extends Context.Tag('@foldkit/Dispatch')() {
|
|
16
29
|
}
|
|
17
|
-
const makeRuntime = ({ Model, flags: resolveFlags, init, update, view, subscriptions, container, browser: browserConfig,
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
const makeRuntime = ({ Model, flags: resolveFlags, init, update, view, subscriptions, container, browser: browserConfig, crash, slowView, resources, managedResources, devtools, }) => {
|
|
31
|
+
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 => ({
|
|
32
|
+
thresholdMs: config.thresholdMs ?? DEFAULT_SLOW_VIEW_THRESHOLD_MS,
|
|
33
|
+
onSlowView: config.onSlowView ?? defaultSlowViewCallback,
|
|
34
|
+
})));
|
|
35
|
+
return (hmrModel) => Effect.scoped(Effect.gen(function* () {
|
|
36
|
+
const maybeResourceLayer = resources
|
|
37
|
+
? Option.some(yield* Layer.memoize(resources))
|
|
38
|
+
: Option.none();
|
|
39
|
+
const managedResourceEntries = managedResources
|
|
40
|
+
? /* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
|
|
41
|
+
Record.toEntries(managedResources)
|
|
42
|
+
: [];
|
|
43
|
+
const managedResourceRefs = yield* Effect.forEach(managedResourceEntries, ([_key, config]) => Ref.make(Option.none()).pipe(Effect.map(ref => ({ config, ref }))));
|
|
44
|
+
const mergeResourceIntoLayer = (layer, { config, ref }) => Layer.merge(layer, Layer.succeed(
|
|
32
45
|
/* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
onNone: () => effect,
|
|
38
|
-
onSome: resourceLayer => Effect.provide(effect, resourceLayer),
|
|
39
|
-
});
|
|
40
|
-
return Option.match(maybeManagedResourceLayer, {
|
|
41
|
-
/* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
|
|
42
|
-
onNone: () => withResources,
|
|
43
|
-
onSome: managedLayer =>
|
|
46
|
+
config.resource._tag, ref));
|
|
47
|
+
const maybeManagedResourceLayer = Array.match(managedResourceRefs, {
|
|
48
|
+
onEmpty: () => Option.none(),
|
|
49
|
+
onNonEmpty: refs => Option.some(Array.reduce(refs,
|
|
44
50
|
/* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
|
|
45
|
-
|
|
51
|
+
Layer.empty, mergeResourceIntoLayer)),
|
|
46
52
|
});
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
onSome: ({ stateRef }) => SubscriptionRef.get(stateRef).pipe(Effect.map(({ isPaused }) => isPaused)),
|
|
76
|
-
})));
|
|
77
|
-
if (!isPaused) {
|
|
78
|
-
yield* render(nextModel);
|
|
79
|
-
}
|
|
80
|
-
if (!modelEquivalence(currentModel, nextModel)) {
|
|
81
|
-
yield* SubscriptionRef.set(modelSubscriptionRef, nextModel);
|
|
82
|
-
preserveModel(nextModel);
|
|
83
|
-
}
|
|
53
|
+
const provideAllResources = (effect) => {
|
|
54
|
+
const withResources = Option.match(maybeResourceLayer, {
|
|
55
|
+
onNone: () => effect,
|
|
56
|
+
onSome: resourceLayer => Effect.provide(effect, resourceLayer),
|
|
57
|
+
});
|
|
58
|
+
return Option.match(maybeManagedResourceLayer, {
|
|
59
|
+
/* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
|
|
60
|
+
onNone: () => withResources,
|
|
61
|
+
onSome: managedLayer =>
|
|
62
|
+
/* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
|
|
63
|
+
Effect.provide(withResources, managedLayer),
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
const flags = yield* resolveFlags;
|
|
67
|
+
const modelEquivalence = Schema.equivalence(Model);
|
|
68
|
+
const messageQueue = yield* Queue.unbounded();
|
|
69
|
+
const enqueueMessage = (message) => Queue.offer(messageQueue, message);
|
|
70
|
+
const currentUrl = Option.fromNullable(browserConfig).pipe(Option.flatMap(() => urlFromString(window.location.href)));
|
|
71
|
+
const [initModel, initCommands] = Predicate.isNotUndefined(hmrModel)
|
|
72
|
+
? pipe(hmrModel, Schema.decodeUnknownEither(Model), Either.match({
|
|
73
|
+
onLeft: () => init(flags, Option.getOrUndefined(currentUrl)),
|
|
74
|
+
onRight: restoredModel => [restoredModel, []],
|
|
75
|
+
}))
|
|
76
|
+
: init(flags, Option.getOrUndefined(currentUrl));
|
|
77
|
+
const modelSubscriptionRef = yield* SubscriptionRef.make(initModel);
|
|
78
|
+
yield* Effect.forEach(initCommands, command => Effect.forkDaemon(command.pipe(provideAllResources, Effect.flatMap(enqueueMessage))));
|
|
79
|
+
if (browserConfig) {
|
|
80
|
+
addNavigationEventListeners(messageQueue, browserConfig);
|
|
84
81
|
}
|
|
85
|
-
|
|
86
|
-
const
|
|
87
|
-
yield* Option.
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
82
|
+
const modelRef = yield* Ref.make(initModel);
|
|
83
|
+
const maybeCurrentVNodeRef = yield* Ref.make(Option.none());
|
|
84
|
+
const currentMessageRef = yield* Ref.make(Option.none());
|
|
85
|
+
const maybeRuntimeRef = yield* Ref.make(Option.none());
|
|
86
|
+
const maybeDevtoolsStoreRef = yield* Ref.make(Option.none());
|
|
87
|
+
const processMessage = (message) => Effect.gen(function* () {
|
|
88
|
+
const currentModel = yield* Ref.get(modelRef);
|
|
89
|
+
const [nextModel, commands] = update(currentModel, message);
|
|
90
|
+
if (currentModel !== nextModel) {
|
|
91
|
+
yield* Ref.set(modelRef, nextModel);
|
|
92
|
+
const isPaused = yield* pipe(maybeDevtoolsStoreRef, Ref.get, Effect.flatMap(Option.match({
|
|
93
|
+
onNone: () => Effect.succeed(false),
|
|
94
|
+
onSome: ({ stateRef }) => SubscriptionRef.get(stateRef).pipe(Effect.map(({ isPaused }) => isPaused)),
|
|
95
|
+
})));
|
|
96
|
+
if (!isPaused) {
|
|
97
|
+
yield* render(nextModel, Option.some(message));
|
|
98
|
+
}
|
|
99
|
+
if (!modelEquivalence(currentModel, nextModel)) {
|
|
100
|
+
yield* SubscriptionRef.set(modelSubscriptionRef, nextModel);
|
|
101
|
+
preserveModel(nextModel);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
yield* Effect.forEach(commands, command => Effect.forkDaemon(command.pipe(provideAllResources, Effect.flatMap(enqueueMessage))));
|
|
105
|
+
const maybeDevtoolsStore = yield* Ref.get(maybeDevtoolsStoreRef);
|
|
106
|
+
yield* Option.match(maybeDevtoolsStore, {
|
|
107
|
+
onNone: () => Effect.void,
|
|
108
|
+
onSome: store => store.recordMessage(
|
|
109
|
+
/* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
|
|
110
|
+
message, nextModel, commands.length, !modelEquivalence(currentModel, nextModel)),
|
|
111
|
+
});
|
|
92
112
|
});
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
113
|
+
const runProcessMessage = (message, messageEffect) => (runtime) => {
|
|
114
|
+
try {
|
|
115
|
+
Runtime.runSync(runtime, messageEffect);
|
|
116
|
+
}
|
|
117
|
+
catch (error) {
|
|
118
|
+
const squashed = Runtime.isFiberFailure(error)
|
|
119
|
+
? Cause.squash(error[Runtime.FiberFailureCauseId])
|
|
120
|
+
: error;
|
|
121
|
+
const appError = squashed instanceof Error
|
|
122
|
+
? squashed
|
|
123
|
+
: new Error(String(squashed));
|
|
124
|
+
const model = Ref.get(modelRef).pipe(Effect.runSync);
|
|
125
|
+
renderCrashView({ error: appError, model, message }, crash, container, maybeCurrentVNodeRef);
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
const dispatchSync = (message) => {
|
|
129
|
+
const maybeRuntime = Ref.get(maybeRuntimeRef).pipe(Effect.runSync);
|
|
130
|
+
Option.match(maybeRuntime, {
|
|
131
|
+
onNone: Function.constVoid,
|
|
132
|
+
onSome: runProcessMessage(
|
|
133
|
+
/* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
|
|
134
|
+
message,
|
|
135
|
+
/* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
|
|
136
|
+
processMessage(message)),
|
|
137
|
+
});
|
|
138
|
+
};
|
|
139
|
+
const dispatchAsync = (message) =>
|
|
140
|
+
/* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
|
|
141
|
+
enqueueMessage(message);
|
|
142
|
+
const render = (model, message) => Effect.gen(function* () {
|
|
143
|
+
const viewStart = performance.now();
|
|
144
|
+
const nextVNodeNullish = yield* view(model);
|
|
145
|
+
const viewDuration = performance.now() - viewStart;
|
|
146
|
+
Option.match(resolvedSlowView, {
|
|
147
|
+
onNone: Function.constVoid,
|
|
148
|
+
onSome: ({ thresholdMs, onSlowView }) => {
|
|
149
|
+
if (viewDuration > thresholdMs) {
|
|
150
|
+
onSlowView({
|
|
151
|
+
model,
|
|
152
|
+
message,
|
|
153
|
+
durationMs: viewDuration,
|
|
154
|
+
thresholdMs,
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
});
|
|
159
|
+
const maybeCurrentVNode = yield* Ref.get(maybeCurrentVNodeRef);
|
|
160
|
+
const patchedVNode = yield* Effect.sync(() => patchVNode(maybeCurrentVNode, nextVNodeNullish, container));
|
|
161
|
+
yield* Ref.set(maybeCurrentVNodeRef, Option.some(patchedVNode));
|
|
162
|
+
}).pipe(Effect.provideService(Dispatch, {
|
|
163
|
+
dispatchAsync,
|
|
164
|
+
dispatchSync,
|
|
165
|
+
}));
|
|
166
|
+
const runtime = yield* Effect.runtime();
|
|
167
|
+
yield* Ref.set(maybeRuntimeRef, Option.some(runtime));
|
|
168
|
+
const isInIframe = window.self !== window.top;
|
|
169
|
+
const resolvedDevtools = pipe(devtools ?? {}, Option.liftPredicate(config => config !== false), Option.filter(config => Match.value(config.show ?? DEFAULT_DEVTOOLS_SHOW).pipe(Match.when('Always', () => true), Match.when('Development', () => !!import.meta.hot && !isInIframe), Match.exhaustive)), Option.map(config => ({
|
|
170
|
+
position: config.position ?? DEFAULT_DEVTOOLS_POSITION,
|
|
171
|
+
mode: config.mode ?? DEFAULT_DEVTOOLS_MODE,
|
|
172
|
+
maybeBanner: Option.fromNullable(config.banner),
|
|
173
|
+
})));
|
|
174
|
+
if (Option.isSome(resolvedDevtools)) {
|
|
175
|
+
const { position, mode, maybeBanner } = resolvedDevtools.value;
|
|
176
|
+
const devtoolsStore = yield* createDevtoolsStore({
|
|
177
|
+
replay: (model, message) =>
|
|
178
|
+
/* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
|
|
179
|
+
Tuple.getFirst(update(model, message)),
|
|
180
|
+
render: model =>
|
|
181
|
+
/* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
|
|
182
|
+
render(model, Option.none()),
|
|
183
|
+
getCurrentModel: Ref.get(modelRef),
|
|
184
|
+
});
|
|
185
|
+
yield* Ref.set(maybeDevtoolsStoreRef, Option.some(devtoolsStore));
|
|
186
|
+
yield* devtoolsStore.recordInit(initModel);
|
|
187
|
+
yield* createOverlay(devtoolsStore, position, mode, maybeBanner);
|
|
106
188
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
const dispatchAsync = (message) =>
|
|
118
|
-
/* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
|
|
119
|
-
enqueueMessage(message);
|
|
120
|
-
const render = (model) => Effect.gen(function* () {
|
|
121
|
-
const viewStart = performance.now();
|
|
122
|
-
const nextVNodeNullish = yield* view(model);
|
|
123
|
-
const viewDuration = performance.now() - viewStart;
|
|
124
|
-
if (import.meta.hot &&
|
|
125
|
-
slowViewThresholdMs !== false &&
|
|
126
|
-
viewDuration > slowViewThresholdMs) {
|
|
127
|
-
console.warn(`[foldkit] Slow view: ${viewDuration.toFixed(1)}ms (budget: ${slowViewThresholdMs}ms). Consider moving computation to update or memoizing with createLazy.`);
|
|
189
|
+
yield* render(initModel, Option.none());
|
|
190
|
+
addBfcacheRestoreListener();
|
|
191
|
+
if (subscriptions) {
|
|
192
|
+
yield* pipe(subscriptions, Record.toEntries, Effect.forEach(([_key, { schema, modelToDependencies, depsToStream }]) => {
|
|
193
|
+
const modelStream = Stream.concat(Stream.make(initModel), modelSubscriptionRef.changes);
|
|
194
|
+
return Effect.forkDaemon(modelStream.pipe(Stream.map(modelToDependencies), Stream.changesWith(Schema.equivalence(schema)), Stream.flatMap(depsToStream, { switch: true }), Stream.runForEach(command => command.pipe(Effect.flatMap(enqueueMessage))), provideAllResources));
|
|
195
|
+
}, {
|
|
196
|
+
concurrency: 'unbounded',
|
|
197
|
+
discard: true,
|
|
198
|
+
}));
|
|
128
199
|
}
|
|
129
|
-
const
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
/* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
|
|
151
|
-
render(model),
|
|
152
|
-
getCurrentModel: Ref.get(modelRef),
|
|
153
|
-
});
|
|
154
|
-
yield* Ref.set(maybeDevtoolsStoreRef, Option.some(devtoolsStore));
|
|
155
|
-
yield* devtoolsStore.recordInit(initModel);
|
|
156
|
-
yield* createOverlay(devtoolsStore, devtoolsPosition, devtoolsMode, maybeDevtoolsBanner);
|
|
157
|
-
}
|
|
158
|
-
yield* render(initModel);
|
|
159
|
-
addBfcacheRestoreListener();
|
|
160
|
-
if (subscriptions) {
|
|
161
|
-
yield* pipe(subscriptions, Record.toEntries, Effect.forEach(([_key, { schema, modelToDependencies, depsToStream }]) => {
|
|
200
|
+
const maybeRequirementsToLifecycle = (config, resourceRef) => (maybeRequirements) => {
|
|
201
|
+
if (Option.isOption(maybeRequirements) &&
|
|
202
|
+
Option.isNone(maybeRequirements)) {
|
|
203
|
+
return Stream.empty;
|
|
204
|
+
}
|
|
205
|
+
const requirements = Option.isOption(maybeRequirements)
|
|
206
|
+
? Option.getOrThrow(maybeRequirements)
|
|
207
|
+
: maybeRequirements;
|
|
208
|
+
const acquire = Effect.gen(function* () {
|
|
209
|
+
const value = yield* config.acquire(requirements);
|
|
210
|
+
yield* Ref.set(resourceRef, Option.some(value));
|
|
211
|
+
return value;
|
|
212
|
+
});
|
|
213
|
+
const release = (value) => Effect.gen(function* () {
|
|
214
|
+
yield* config.release(value);
|
|
215
|
+
yield* Ref.set(resourceRef, Option.none());
|
|
216
|
+
yield* enqueueMessage(config.onReleased());
|
|
217
|
+
}).pipe(Effect.catchAllCause(() => Effect.void));
|
|
218
|
+
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)))));
|
|
219
|
+
};
|
|
220
|
+
const forkManagedResourceLifecycle = ({ config, ref: resourceRef, }) => Effect.gen(function* () {
|
|
162
221
|
const modelStream = Stream.concat(Stream.make(initModel), modelSubscriptionRef.changes);
|
|
163
|
-
|
|
164
|
-
|
|
222
|
+
const equivalence = Schema.equivalence(config.schema);
|
|
223
|
+
yield* Effect.forkDaemon(modelStream.pipe(Stream.map(config.modelToMaybeRequirements), Stream.changesWith(equivalence), Stream.flatMap(maybeRequirementsToLifecycle(config, resourceRef), {
|
|
224
|
+
switch: true,
|
|
225
|
+
}), Stream.runForEach(Effect.flatMap(enqueueMessage))));
|
|
226
|
+
});
|
|
227
|
+
yield* Effect.forEach(managedResourceRefs, forkManagedResourceLifecycle, {
|
|
165
228
|
concurrency: 'unbounded',
|
|
166
229
|
discard: true,
|
|
167
|
-
}));
|
|
168
|
-
}
|
|
169
|
-
const maybeRequirementsToLifecycle = (config, resourceRef) => (maybeRequirements) => {
|
|
170
|
-
if (Option.isOption(maybeRequirements) &&
|
|
171
|
-
Option.isNone(maybeRequirements)) {
|
|
172
|
-
return Stream.empty;
|
|
173
|
-
}
|
|
174
|
-
const requirements = Option.isOption(maybeRequirements)
|
|
175
|
-
? Option.getOrThrow(maybeRequirements)
|
|
176
|
-
: maybeRequirements;
|
|
177
|
-
const acquire = Effect.gen(function* () {
|
|
178
|
-
const value = yield* config.acquire(requirements);
|
|
179
|
-
yield* Ref.set(resourceRef, Option.some(value));
|
|
180
|
-
return value;
|
|
181
230
|
});
|
|
182
|
-
|
|
183
|
-
yield*
|
|
184
|
-
yield* Ref.set(
|
|
185
|
-
yield*
|
|
186
|
-
}).
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
})
|
|
195
|
-
});
|
|
196
|
-
|
|
197
|
-
concurrency: 'unbounded',
|
|
198
|
-
discard: true,
|
|
199
|
-
});
|
|
200
|
-
yield* pipe(Effect.forever(Effect.gen(function* () {
|
|
201
|
-
const message = yield* Queue.take(messageQueue);
|
|
202
|
-
yield* processMessage(message);
|
|
203
|
-
})), Effect.catchAllCause(cause => Effect.sync(() => {
|
|
204
|
-
const squashed = Cause.squash(cause);
|
|
205
|
-
const appError = squashed instanceof Error
|
|
206
|
-
? squashed
|
|
207
|
-
: new Error(String(squashed));
|
|
208
|
-
renderErrorView(appError, errorView, container, maybeCurrentVNodeRef);
|
|
209
|
-
})));
|
|
210
|
-
}));
|
|
231
|
+
yield* pipe(Effect.forever(Effect.gen(function* () {
|
|
232
|
+
const message = yield* Queue.take(messageQueue);
|
|
233
|
+
yield* Ref.set(currentMessageRef, Option.some(message));
|
|
234
|
+
yield* processMessage(message);
|
|
235
|
+
})), Effect.catchAllCause(cause => Effect.sync(() => {
|
|
236
|
+
const squashed = Cause.squash(cause);
|
|
237
|
+
const appError = squashed instanceof Error
|
|
238
|
+
? squashed
|
|
239
|
+
: new Error(String(squashed));
|
|
240
|
+
const model = Ref.get(modelRef).pipe(Effect.runSync);
|
|
241
|
+
const message = Ref.get(currentMessageRef).pipe(Effect.runSync, Option.getOrThrow);
|
|
242
|
+
renderCrashView({ error: appError, model, message }, crash, container, maybeCurrentVNodeRef);
|
|
243
|
+
})));
|
|
244
|
+
}));
|
|
245
|
+
};
|
|
211
246
|
const patchVNode = (maybeCurrentVNode, nextVNodeNullish, container) => {
|
|
212
247
|
const nextVNode = Predicate.isNotNull(nextVNodeNullish)
|
|
213
248
|
? nextVNodeNullish
|
|
@@ -217,21 +252,29 @@ const patchVNode = (maybeCurrentVNode, nextVNodeNullish, container) => {
|
|
|
217
252
|
onSome: currentVNode => patch(currentVNode, nextVNode),
|
|
218
253
|
});
|
|
219
254
|
};
|
|
220
|
-
const
|
|
221
|
-
console.error('[foldkit] Application
|
|
255
|
+
const renderCrashView = (context, crash, container, maybeCurrentVNodeRef) => {
|
|
256
|
+
console.error('[foldkit] Application crash:', context.error);
|
|
257
|
+
if (crash?.report) {
|
|
258
|
+
try {
|
|
259
|
+
crash.report(context);
|
|
260
|
+
}
|
|
261
|
+
catch (reportError) {
|
|
262
|
+
console.error('[foldkit] crash.report failed:', reportError);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
222
265
|
try {
|
|
223
|
-
const
|
|
224
|
-
?
|
|
225
|
-
:
|
|
266
|
+
const crashHtml = crash?.view
|
|
267
|
+
? crash.view(context)
|
|
268
|
+
: defaultCrashView(context);
|
|
226
269
|
const maybeCurrentVNode = Ref.get(maybeCurrentVNodeRef).pipe(Effect.runSync);
|
|
227
|
-
const vnode =
|
|
270
|
+
const vnode = crashHtml.pipe(Effect.provideService(Dispatch, noOpDispatch), Effect.runSync);
|
|
228
271
|
patchVNode(maybeCurrentVNode, vnode, container);
|
|
229
272
|
}
|
|
230
273
|
catch (viewError) {
|
|
231
|
-
console.error('[foldkit]
|
|
274
|
+
console.error('[foldkit] crash.view failed:', viewError);
|
|
232
275
|
const maybeCurrentVNode = Ref.get(maybeCurrentVNodeRef).pipe(Effect.runSync);
|
|
233
276
|
const fallbackViewError = viewError instanceof Error ? viewError : new Error(String(viewError));
|
|
234
|
-
const vnode =
|
|
277
|
+
const vnode = defaultCrashView(context, fallbackViewError).pipe(Effect.provideService(Dispatch, noOpDispatch), Effect.runSync);
|
|
235
278
|
patchVNode(maybeCurrentVNode, vnode, container);
|
|
236
279
|
}
|
|
237
280
|
};
|
|
@@ -242,9 +285,9 @@ export function makeElement(config) {
|
|
|
242
285
|
view: config.view,
|
|
243
286
|
...(config.subscriptions && { subscriptions: config.subscriptions }),
|
|
244
287
|
container: config.container,
|
|
245
|
-
...(config.
|
|
246
|
-
...(Predicate.isNotUndefined(config.
|
|
247
|
-
|
|
288
|
+
...(config.crash && { crash: config.crash }),
|
|
289
|
+
...(Predicate.isNotUndefined(config.slowView) && {
|
|
290
|
+
slowView: config.slowView,
|
|
248
291
|
}),
|
|
249
292
|
...(config.resources && { resources: config.resources }),
|
|
250
293
|
...(config.managedResources && {
|
|
@@ -284,9 +327,9 @@ export function makeApplication(config) {
|
|
|
284
327
|
...(config.subscriptions && { subscriptions: config.subscriptions }),
|
|
285
328
|
container: config.container,
|
|
286
329
|
browser: config.browser,
|
|
287
|
-
...(config.
|
|
288
|
-
...(Predicate.isNotUndefined(config.
|
|
289
|
-
|
|
330
|
+
...(config.crash && { crash: config.crash }),
|
|
331
|
+
...(Predicate.isNotUndefined(config.slowView) && {
|
|
332
|
+
slowView: config.slowView,
|
|
290
333
|
}),
|
|
291
334
|
...(config.resources && { resources: config.resources }),
|
|
292
335
|
...(config.managedResources && {
|
|
@@ -322,13 +365,28 @@ const preserveModel = (model) => {
|
|
|
322
365
|
import.meta.hot.send('foldkit:preserve-model', model);
|
|
323
366
|
}
|
|
324
367
|
};
|
|
368
|
+
const PLUGIN_RESPONSE_TIMEOUT_MS = 500;
|
|
325
369
|
/** Starts a Foldkit runtime, with HMR support for development. */
|
|
326
370
|
export const run = (foldkitRuntime) => {
|
|
327
371
|
if (import.meta.hot) {
|
|
328
|
-
import.meta.hot
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
372
|
+
const hot = import.meta.hot;
|
|
373
|
+
const requestPreservedModel = pipe(Effect.async(resume => {
|
|
374
|
+
hot.on('foldkit:restore-model', model => {
|
|
375
|
+
resume(Effect.succeed(model));
|
|
376
|
+
});
|
|
377
|
+
hot.send('foldkit:request-model');
|
|
378
|
+
}), Effect.timeoutTo({
|
|
379
|
+
onTimeout: () => {
|
|
380
|
+
console.warn('[foldkit] No response from vite-plugin-foldkit. Add it to your vite.config.ts for HMR model preservation:\n\n' +
|
|
381
|
+
" import foldkit from 'vite-plugin-foldkit'\n\n" +
|
|
382
|
+
' export default defineConfig({ plugins: [foldkit()] })\n\n' +
|
|
383
|
+
'Starting without HMR support.');
|
|
384
|
+
return undefined;
|
|
385
|
+
},
|
|
386
|
+
onSuccess: Function.identity,
|
|
387
|
+
duration: PLUGIN_RESPONSE_TIMEOUT_MS,
|
|
388
|
+
}), Effect.flatMap(foldkitRuntime));
|
|
389
|
+
BrowserRuntime.runMain(requestPreservedModel);
|
|
332
390
|
}
|
|
333
391
|
else {
|
|
334
392
|
BrowserRuntime.runMain(foldkitRuntime());
|
|
@@ -98,27 +98,28 @@ export declare const UpdatedInputValue: import("../../schema").CallableTaggedStr
|
|
|
98
98
|
/** Sent when the optional toggle button is clicked. */
|
|
99
99
|
export declare const PressedToggleButton: import("../../schema").CallableTaggedStruct<"PressedToggleButton", {}>;
|
|
100
100
|
/** Union of all messages the combobox component can produce. */
|
|
101
|
-
export declare const Message: S.Union<[
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
101
|
+
export declare const Message: S.Union<[
|
|
102
|
+
typeof Opened,
|
|
103
|
+
typeof Closed,
|
|
104
|
+
typeof ClosedByTab,
|
|
105
|
+
typeof ActivatedItem,
|
|
106
|
+
typeof DeactivatedItem,
|
|
107
|
+
typeof SelectedItem,
|
|
108
|
+
typeof MovedPointerOverItem,
|
|
109
|
+
typeof RequestedItemClick,
|
|
110
|
+
typeof CompletedScrollLock,
|
|
111
|
+
typeof CompletedScrollUnlock,
|
|
112
|
+
typeof CompletedInertSetup,
|
|
113
|
+
typeof CompletedInertTeardown,
|
|
114
|
+
typeof CompletedInputFocus,
|
|
115
|
+
typeof CompletedScrollIntoView,
|
|
116
|
+
typeof CompletedItemClick,
|
|
117
|
+
typeof AdvancedTransitionFrame,
|
|
118
|
+
typeof EndedTransition,
|
|
119
|
+
typeof DetectedInputMovement,
|
|
120
|
+
typeof UpdatedInputValue,
|
|
121
|
+
typeof PressedToggleButton
|
|
122
|
+
]>;
|
|
122
123
|
export type Opened = typeof Opened.Type;
|
|
123
124
|
export type Closed = typeof Closed.Type;
|
|
124
125
|
export type ClosedByTab = typeof ClosedByTab.Type;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/ui/combobox/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,MAAM,EAEN,MAAM,IAAI,CAAC,EAEZ,MAAM,QAAQ,CAAA;AAEf,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAE5C,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,IAAI,EAAQ,MAAM,YAAY,CAAA;AAK5D,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