foldkit 0.98.1 → 0.99.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.
@@ -20,8 +20,8 @@ export declare const DismissAfter: Command.CommandDefinitionWithArgs<"DismissAft
20
20
  duration: S.DurationFromMillis;
21
21
  }, Effect.Effect<{
22
22
  readonly _tag: "ElapsedDuration";
23
- readonly version: number;
24
23
  readonly entryId: string;
24
+ readonly version: number;
25
25
  }, never, never>>;
26
26
  /** Factory that binds Toast's runtime (update fn, helpers, commands) to a
27
27
  * specific payload schema. Called by `make` in index.ts; inner helpers close
@@ -105,39 +105,39 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
105
105
  }>;
106
106
  }>;
107
107
  readonly init: (config: InitConfig) => {
108
+ readonly id: string;
109
+ readonly defaultDuration: Duration.Duration;
108
110
  readonly entries: readonly {
109
111
  readonly id: string;
112
+ readonly variant: "Success" | "Error" | "Info" | "Warning";
110
113
  readonly animation: {
111
114
  readonly id: string;
112
115
  readonly isShowing: boolean;
113
116
  readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
114
117
  };
115
118
  readonly maybeDuration: Option.Option<Duration.Duration>;
116
- readonly variant: "Success" | "Error" | "Info" | "Warning";
117
119
  readonly pendingDismissVersion: number;
118
120
  readonly isHovered: boolean;
119
121
  readonly payload: A;
120
122
  }[];
121
- readonly id: string;
122
- readonly defaultDuration: Duration.Duration;
123
123
  readonly nextEntryKey: number;
124
124
  };
125
125
  readonly update: (model: {
126
+ readonly id: string;
127
+ readonly defaultDuration: Duration.Duration;
126
128
  readonly entries: readonly {
127
129
  readonly id: string;
130
+ readonly variant: "Success" | "Error" | "Info" | "Warning";
128
131
  readonly animation: {
129
132
  readonly id: string;
130
133
  readonly isShowing: boolean;
131
134
  readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
132
135
  };
133
136
  readonly maybeDuration: Option.Option<Duration.Duration>;
134
- readonly variant: "Success" | "Error" | "Info" | "Warning";
135
137
  readonly pendingDismissVersion: number;
136
138
  readonly isHovered: boolean;
137
139
  readonly payload: A;
138
140
  }[];
139
- readonly id: string;
140
- readonly defaultDuration: Duration.Duration;
141
141
  readonly nextEntryKey: number;
142
142
  }, message: {
143
143
  readonly _tag: "Dismissed";
@@ -146,8 +146,8 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
146
146
  readonly _tag: "DismissedAll";
147
147
  } | {
148
148
  readonly _tag: "ElapsedDuration";
149
- readonly version: number;
150
149
  readonly entryId: string;
150
+ readonly version: number;
151
151
  } | {
152
152
  readonly _tag: "HoveredEntry";
153
153
  readonly entryId: string;
@@ -156,6 +156,7 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
156
156
  readonly entryId: string;
157
157
  } | {
158
158
  readonly _tag: "GotAnimationMessage";
159
+ readonly entryId: string;
159
160
  readonly message: {
160
161
  readonly _tag: "Showed";
161
162
  } | {
@@ -165,38 +166,37 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
165
166
  } | {
166
167
  readonly _tag: "EndedAnimation";
167
168
  };
168
- readonly entryId: string;
169
169
  } | {
170
170
  readonly _tag: "Added";
171
171
  readonly entry: {
172
172
  readonly id: string;
173
+ readonly variant: "Success" | "Error" | "Info" | "Warning";
173
174
  readonly animation: {
174
175
  readonly id: string;
175
176
  readonly isShowing: boolean;
176
177
  readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
177
178
  };
178
179
  readonly maybeDuration: Option.Option<Duration.Duration>;
179
- readonly variant: "Success" | "Error" | "Info" | "Warning";
180
180
  readonly pendingDismissVersion: number;
181
181
  readonly isHovered: boolean;
182
182
  readonly payload: A;
183
183
  };
184
184
  }) => readonly [{
185
+ readonly id: string;
186
+ readonly defaultDuration: Duration.Duration;
185
187
  readonly entries: readonly {
186
188
  readonly id: string;
189
+ readonly variant: "Success" | "Error" | "Info" | "Warning";
187
190
  readonly animation: {
188
191
  readonly id: string;
189
192
  readonly isShowing: boolean;
190
193
  readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
191
194
  };
192
195
  readonly maybeDuration: Option.Option<Duration.Duration>;
193
- readonly variant: "Success" | "Error" | "Info" | "Warning";
194
196
  readonly pendingDismissVersion: number;
195
197
  readonly isHovered: boolean;
196
198
  readonly payload: A;
197
199
  }[];
198
- readonly id: string;
199
- readonly defaultDuration: Duration.Duration;
200
200
  readonly nextEntryKey: number;
201
201
  }, readonly Readonly<{
202
202
  name: string;
@@ -208,8 +208,8 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
208
208
  readonly _tag: "DismissedAll";
209
209
  } | {
210
210
  readonly _tag: "ElapsedDuration";
211
- readonly version: number;
212
211
  readonly entryId: string;
212
+ readonly version: number;
213
213
  } | {
214
214
  readonly _tag: "HoveredEntry";
215
215
  readonly entryId: string;
@@ -218,6 +218,7 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
218
218
  readonly entryId: string;
219
219
  } | {
220
220
  readonly _tag: "GotAnimationMessage";
221
+ readonly entryId: string;
221
222
  readonly message: {
222
223
  readonly _tag: "Showed";
223
224
  } | {
@@ -227,18 +228,17 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
227
228
  } | {
228
229
  readonly _tag: "EndedAnimation";
229
230
  };
230
- readonly entryId: string;
231
231
  } | {
232
232
  readonly _tag: "Added";
233
233
  readonly entry: {
234
234
  readonly id: string;
235
+ readonly variant: "Success" | "Error" | "Info" | "Warning";
235
236
  readonly animation: {
236
237
  readonly id: string;
237
238
  readonly isShowing: boolean;
238
239
  readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
239
240
  };
240
241
  readonly maybeDuration: Option.Option<Duration.Duration>;
241
- readonly variant: "Success" | "Error" | "Info" | "Warning";
242
242
  readonly pendingDismissVersion: number;
243
243
  readonly isHovered: boolean;
244
244
  readonly payload: A;
@@ -246,38 +246,38 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
246
246
  }, never, never>;
247
247
  }>[]];
248
248
  readonly show: (model: {
249
+ readonly id: string;
250
+ readonly defaultDuration: Duration.Duration;
249
251
  readonly entries: readonly {
250
252
  readonly id: string;
253
+ readonly variant: "Success" | "Error" | "Info" | "Warning";
251
254
  readonly animation: {
252
255
  readonly id: string;
253
256
  readonly isShowing: boolean;
254
257
  readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
255
258
  };
256
259
  readonly maybeDuration: Option.Option<Duration.Duration>;
257
- readonly variant: "Success" | "Error" | "Info" | "Warning";
258
260
  readonly pendingDismissVersion: number;
259
261
  readonly isHovered: boolean;
260
262
  readonly payload: A;
261
263
  }[];
262
- readonly id: string;
263
- readonly defaultDuration: Duration.Duration;
264
264
  readonly nextEntryKey: number;
265
265
  }, input: ShowInput<A>) => readonly [{
266
+ readonly id: string;
267
+ readonly defaultDuration: Duration.Duration;
266
268
  readonly entries: readonly {
267
269
  readonly id: string;
270
+ readonly variant: "Success" | "Error" | "Info" | "Warning";
268
271
  readonly animation: {
269
272
  readonly id: string;
270
273
  readonly isShowing: boolean;
271
274
  readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
272
275
  };
273
276
  readonly maybeDuration: Option.Option<Duration.Duration>;
274
- readonly variant: "Success" | "Error" | "Info" | "Warning";
275
277
  readonly pendingDismissVersion: number;
276
278
  readonly isHovered: boolean;
277
279
  readonly payload: A;
278
280
  }[];
279
- readonly id: string;
280
- readonly defaultDuration: Duration.Duration;
281
281
  readonly nextEntryKey: number;
282
282
  }, readonly Readonly<{
283
283
  name: string;
@@ -289,8 +289,8 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
289
289
  readonly _tag: "DismissedAll";
290
290
  } | {
291
291
  readonly _tag: "ElapsedDuration";
292
- readonly version: number;
293
292
  readonly entryId: string;
293
+ readonly version: number;
294
294
  } | {
295
295
  readonly _tag: "HoveredEntry";
296
296
  readonly entryId: string;
@@ -299,6 +299,7 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
299
299
  readonly entryId: string;
300
300
  } | {
301
301
  readonly _tag: "GotAnimationMessage";
302
+ readonly entryId: string;
302
303
  readonly message: {
303
304
  readonly _tag: "Showed";
304
305
  } | {
@@ -308,18 +309,17 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
308
309
  } | {
309
310
  readonly _tag: "EndedAnimation";
310
311
  };
311
- readonly entryId: string;
312
312
  } | {
313
313
  readonly _tag: "Added";
314
314
  readonly entry: {
315
315
  readonly id: string;
316
+ readonly variant: "Success" | "Error" | "Info" | "Warning";
316
317
  readonly animation: {
317
318
  readonly id: string;
318
319
  readonly isShowing: boolean;
319
320
  readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
320
321
  };
321
322
  readonly maybeDuration: Option.Option<Duration.Duration>;
322
- readonly variant: "Success" | "Error" | "Info" | "Warning";
323
323
  readonly pendingDismissVersion: number;
324
324
  readonly isHovered: boolean;
325
325
  readonly payload: A;
@@ -327,38 +327,38 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
327
327
  }, never, never>;
328
328
  }>[]];
329
329
  readonly dismiss: (model: {
330
+ readonly id: string;
331
+ readonly defaultDuration: Duration.Duration;
330
332
  readonly entries: readonly {
331
333
  readonly id: string;
334
+ readonly variant: "Success" | "Error" | "Info" | "Warning";
332
335
  readonly animation: {
333
336
  readonly id: string;
334
337
  readonly isShowing: boolean;
335
338
  readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
336
339
  };
337
340
  readonly maybeDuration: Option.Option<Duration.Duration>;
338
- readonly variant: "Success" | "Error" | "Info" | "Warning";
339
341
  readonly pendingDismissVersion: number;
340
342
  readonly isHovered: boolean;
341
343
  readonly payload: A;
342
344
  }[];
343
- readonly id: string;
344
- readonly defaultDuration: Duration.Duration;
345
345
  readonly nextEntryKey: number;
346
346
  }, entryId: string) => readonly [{
347
+ readonly id: string;
348
+ readonly defaultDuration: Duration.Duration;
347
349
  readonly entries: readonly {
348
350
  readonly id: string;
351
+ readonly variant: "Success" | "Error" | "Info" | "Warning";
349
352
  readonly animation: {
350
353
  readonly id: string;
351
354
  readonly isShowing: boolean;
352
355
  readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
353
356
  };
354
357
  readonly maybeDuration: Option.Option<Duration.Duration>;
355
- readonly variant: "Success" | "Error" | "Info" | "Warning";
356
358
  readonly pendingDismissVersion: number;
357
359
  readonly isHovered: boolean;
358
360
  readonly payload: A;
359
361
  }[];
360
- readonly id: string;
361
- readonly defaultDuration: Duration.Duration;
362
362
  readonly nextEntryKey: number;
363
363
  }, readonly Readonly<{
364
364
  name: string;
@@ -370,8 +370,8 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
370
370
  readonly _tag: "DismissedAll";
371
371
  } | {
372
372
  readonly _tag: "ElapsedDuration";
373
- readonly version: number;
374
373
  readonly entryId: string;
374
+ readonly version: number;
375
375
  } | {
376
376
  readonly _tag: "HoveredEntry";
377
377
  readonly entryId: string;
@@ -380,6 +380,7 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
380
380
  readonly entryId: string;
381
381
  } | {
382
382
  readonly _tag: "GotAnimationMessage";
383
+ readonly entryId: string;
383
384
  readonly message: {
384
385
  readonly _tag: "Showed";
385
386
  } | {
@@ -389,18 +390,17 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
389
390
  } | {
390
391
  readonly _tag: "EndedAnimation";
391
392
  };
392
- readonly entryId: string;
393
393
  } | {
394
394
  readonly _tag: "Added";
395
395
  readonly entry: {
396
396
  readonly id: string;
397
+ readonly variant: "Success" | "Error" | "Info" | "Warning";
397
398
  readonly animation: {
398
399
  readonly id: string;
399
400
  readonly isShowing: boolean;
400
401
  readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
401
402
  };
402
403
  readonly maybeDuration: Option.Option<Duration.Duration>;
403
- readonly variant: "Success" | "Error" | "Info" | "Warning";
404
404
  readonly pendingDismissVersion: number;
405
405
  readonly isHovered: boolean;
406
406
  readonly payload: A;
@@ -408,38 +408,38 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
408
408
  }, never, never>;
409
409
  }>[]];
410
410
  readonly dismissAll: (model: {
411
+ readonly id: string;
412
+ readonly defaultDuration: Duration.Duration;
411
413
  readonly entries: readonly {
412
414
  readonly id: string;
415
+ readonly variant: "Success" | "Error" | "Info" | "Warning";
413
416
  readonly animation: {
414
417
  readonly id: string;
415
418
  readonly isShowing: boolean;
416
419
  readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
417
420
  };
418
421
  readonly maybeDuration: Option.Option<Duration.Duration>;
419
- readonly variant: "Success" | "Error" | "Info" | "Warning";
420
422
  readonly pendingDismissVersion: number;
421
423
  readonly isHovered: boolean;
422
424
  readonly payload: A;
423
425
  }[];
424
- readonly id: string;
425
- readonly defaultDuration: Duration.Duration;
426
426
  readonly nextEntryKey: number;
427
427
  }) => readonly [{
428
+ readonly id: string;
429
+ readonly defaultDuration: Duration.Duration;
428
430
  readonly entries: readonly {
429
431
  readonly id: string;
432
+ readonly variant: "Success" | "Error" | "Info" | "Warning";
430
433
  readonly animation: {
431
434
  readonly id: string;
432
435
  readonly isShowing: boolean;
433
436
  readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
434
437
  };
435
438
  readonly maybeDuration: Option.Option<Duration.Duration>;
436
- readonly variant: "Success" | "Error" | "Info" | "Warning";
437
439
  readonly pendingDismissVersion: number;
438
440
  readonly isHovered: boolean;
439
441
  readonly payload: A;
440
442
  }[];
441
- readonly id: string;
442
- readonly defaultDuration: Duration.Duration;
443
443
  readonly nextEntryKey: number;
444
444
  }, readonly Readonly<{
445
445
  name: string;
@@ -451,8 +451,8 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
451
451
  readonly _tag: "DismissedAll";
452
452
  } | {
453
453
  readonly _tag: "ElapsedDuration";
454
- readonly version: number;
455
454
  readonly entryId: string;
455
+ readonly version: number;
456
456
  } | {
457
457
  readonly _tag: "HoveredEntry";
458
458
  readonly entryId: string;
@@ -461,6 +461,7 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
461
461
  readonly entryId: string;
462
462
  } | {
463
463
  readonly _tag: "GotAnimationMessage";
464
+ readonly entryId: string;
464
465
  readonly message: {
465
466
  readonly _tag: "Showed";
466
467
  } | {
@@ -470,18 +471,17 @@ export declare const makeRuntime: <A, I>(payloadSchema: S.Codec<A, I>) => {
470
471
  } | {
471
472
  readonly _tag: "EndedAnimation";
472
473
  };
473
- readonly entryId: string;
474
474
  } | {
475
475
  readonly _tag: "Added";
476
476
  readonly entry: {
477
477
  readonly id: string;
478
+ readonly variant: "Success" | "Error" | "Info" | "Warning";
478
479
  readonly animation: {
479
480
  readonly id: string;
480
481
  readonly isShowing: boolean;
481
482
  readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
482
483
  };
483
484
  readonly maybeDuration: Option.Option<Duration.Duration>;
484
- readonly variant: "Success" | "Error" | "Info" | "Warning";
485
485
  readonly pendingDismissVersion: number;
486
486
  readonly isHovered: boolean;
487
487
  readonly payload: A;
@@ -145,8 +145,8 @@ export declare const SubscriptionDependencies: S.Struct<{
145
145
  * the consumer having to teach the framework about navigation. */
146
146
  export declare const subscriptions: import("../../runtime/subscription.js").Subscriptions<{
147
147
  readonly id: string;
148
- readonly scrollTop: number;
149
148
  readonly rowHeightPx: number;
149
+ readonly scrollTop: number;
150
150
  readonly measurement: {
151
151
  readonly _tag: "Unmeasured";
152
152
  } | {
@@ -11,12 +11,12 @@ export declare const Url: S.Struct<{
11
11
  export type Url = typeof Url.Type;
12
12
  /** Parses a URL string into a `Url`, returning `Option.None` if invalid. */
13
13
  export declare const fromString: (str: string) => Option.Option<{
14
- readonly search: Option.Option<string>;
15
- readonly port: Option.Option<string>;
16
- readonly hash: Option.Option<string>;
17
14
  readonly protocol: string;
18
15
  readonly host: string;
16
+ readonly port: Option.Option<string>;
19
17
  readonly pathname: string;
18
+ readonly search: Option.Option<string>;
19
+ readonly hash: Option.Option<string>;
20
20
  }>;
21
21
  /** Serializes a `Url` back to a string. */
22
22
  export declare const toString: (url: Url) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foldkit",
3
- "version": "0.98.1",
3
+ "version": "0.99.0",
4
4
  "description": "A TypeScript frontend framework, built on Effect and architected like Elm",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -204,13 +204,13 @@
204
204
  "dist"
205
205
  ],
206
206
  "peerDependencies": {
207
- "@effect/platform-browser": "4.0.0-beta.64",
208
- "effect": "4.0.0-beta.64"
207
+ "@effect/platform-browser": "4.0.0-beta.66",
208
+ "effect": "4.0.0-beta.66"
209
209
  },
210
210
  "devDependencies": {
211
- "@effect/platform-browser": "4.0.0-beta.64",
212
- "@effect/vitest": "4.0.0-beta.64",
213
- "effect": "4.0.0-beta.64",
211
+ "@effect/platform-browser": "4.0.0-beta.66",
212
+ "@effect/vitest": "4.0.0-beta.66",
213
+ "effect": "4.0.0-beta.66",
214
214
  "happy-dom": "^20.9.0",
215
215
  "rimraf": "^6.1.3",
216
216
  "typedoc": "^0.28.19",