foldkit 0.69.0 → 0.71.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/dist/ui/index.d.ts +2 -0
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +2 -0
- package/dist/ui/toast/index.d.ts +620 -0
- package/dist/ui/toast/index.d.ts.map +1 -0
- package/dist/ui/toast/index.js +158 -0
- package/dist/ui/toast/public.d.ts +4 -0
- package/dist/ui/toast/public.d.ts.map +1 -0
- package/dist/ui/toast/public.js +1 -0
- package/dist/ui/toast/schema.d.ts +143 -0
- package/dist/ui/toast/schema.d.ts.map +1 -0
- package/dist/ui/toast/schema.js +71 -0
- package/dist/ui/toast/update.d.ts +484 -0
- package/dist/ui/toast/update.d.ts.map +1 -0
- package/dist/ui/toast/update.js +203 -0
- package/dist/ui/tooltip/index.d.ts +96 -0
- package/dist/ui/tooltip/index.d.ts.map +1 -0
- package/dist/ui/tooltip/index.js +244 -0
- package/dist/ui/tooltip/public.d.ts +4 -0
- package/dist/ui/tooltip/public.d.ts.map +1 -0
- package/dist/ui/tooltip/public.js +1 -0
- package/package.json +9 -1
|
@@ -0,0 +1,484 @@
|
|
|
1
|
+
import { Duration, Effect, Option, Schema as S } from 'effect';
|
|
2
|
+
import * as Command from '../../command';
|
|
3
|
+
import { type InitConfig, type Variant } from './schema';
|
|
4
|
+
/** Input for `show()`. `payload` is the consumer-defined content shape for an
|
|
5
|
+
* entry. Omit `duration` to use the container's `defaultDuration`; pass
|
|
6
|
+
* `sticky: true` to skip auto-dismiss entirely. */
|
|
7
|
+
export type ShowInput<A> = Readonly<{
|
|
8
|
+
payload: A;
|
|
9
|
+
variant?: Variant;
|
|
10
|
+
duration?: Duration.DurationInput;
|
|
11
|
+
sticky?: boolean;
|
|
12
|
+
}>;
|
|
13
|
+
/** Schedules an auto-dismiss timer for an entry. The result Message carries a
|
|
14
|
+
* version so stale timers (from hover or manual dismiss) are discarded in
|
|
15
|
+
* the update function. Static — the Command definition doesn't depend on
|
|
16
|
+
* payload. */
|
|
17
|
+
export declare const DismissAfter: Command.CommandDefinition<"DismissAfter", {
|
|
18
|
+
readonly _tag: "ElapsedDuration";
|
|
19
|
+
readonly version: number;
|
|
20
|
+
readonly entryId: string;
|
|
21
|
+
}>;
|
|
22
|
+
/** Factory that binds Toast's runtime (update fn, helpers, commands) to a
|
|
23
|
+
* specific payload schema. Called by `make` in index.ts; inner helpers close
|
|
24
|
+
* over the payload-specific Entry / Model / Added types so generics don't
|
|
25
|
+
* have to propagate through every helper signature.
|
|
26
|
+
*
|
|
27
|
+
* @internal Consumers should use `Ui.Toast.make(PayloadSchema)`. This is
|
|
28
|
+
* only exported so `index.ts` can wire the view into the bound runtime. */
|
|
29
|
+
export declare const makeRuntime: <A, I>(payloadSchema: S.Schema<A, I>) => {
|
|
30
|
+
readonly Entry: S.Struct<{
|
|
31
|
+
id: typeof S.String;
|
|
32
|
+
variant: S.Literal<["Info", "Success", "Warning", "Error"]>;
|
|
33
|
+
transition: S.Struct<{
|
|
34
|
+
id: typeof S.String;
|
|
35
|
+
isShowing: typeof S.Boolean;
|
|
36
|
+
transitionState: S.Literal<["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
|
|
37
|
+
}>;
|
|
38
|
+
maybeDuration: S.OptionFromSelf<typeof S.DurationFromMillis>;
|
|
39
|
+
pendingDismissVersion: typeof S.Number;
|
|
40
|
+
isHovered: typeof S.Boolean;
|
|
41
|
+
payload: S.Schema<A, I, never>;
|
|
42
|
+
}>;
|
|
43
|
+
readonly Model: S.Struct<{
|
|
44
|
+
id: typeof S.String;
|
|
45
|
+
defaultDuration: typeof S.DurationFromMillis;
|
|
46
|
+
entries: S.Array$<S.Struct<{
|
|
47
|
+
id: typeof S.String;
|
|
48
|
+
variant: S.Literal<["Info", "Success", "Warning", "Error"]>;
|
|
49
|
+
transition: S.Struct<{
|
|
50
|
+
id: typeof S.String;
|
|
51
|
+
isShowing: typeof S.Boolean;
|
|
52
|
+
transitionState: S.Literal<["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
|
|
53
|
+
}>;
|
|
54
|
+
maybeDuration: S.OptionFromSelf<typeof S.DurationFromMillis>;
|
|
55
|
+
pendingDismissVersion: typeof S.Number;
|
|
56
|
+
isHovered: typeof S.Boolean;
|
|
57
|
+
payload: S.Schema<A, I, never>;
|
|
58
|
+
}>>;
|
|
59
|
+
nextEntryKey: typeof S.Number;
|
|
60
|
+
}>;
|
|
61
|
+
readonly Message: S.Union<[import("../../schema").CallableTaggedStruct<"Added", {
|
|
62
|
+
entry: S.Struct<{
|
|
63
|
+
id: typeof S.String;
|
|
64
|
+
variant: S.Literal<["Info", "Success", "Warning", "Error"]>;
|
|
65
|
+
transition: S.Struct<{
|
|
66
|
+
id: typeof S.String;
|
|
67
|
+
isShowing: typeof S.Boolean;
|
|
68
|
+
transitionState: S.Literal<["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
|
|
69
|
+
}>;
|
|
70
|
+
maybeDuration: S.OptionFromSelf<typeof S.DurationFromMillis>;
|
|
71
|
+
pendingDismissVersion: typeof S.Number;
|
|
72
|
+
isHovered: typeof S.Boolean;
|
|
73
|
+
payload: S.Schema<A, I, never>;
|
|
74
|
+
}>;
|
|
75
|
+
}>, import("../../schema").CallableTaggedStruct<"Dismissed", {
|
|
76
|
+
entryId: typeof S.String;
|
|
77
|
+
}>, import("../../schema").CallableTaggedStruct<"DismissedAll", {}>, import("../../schema").CallableTaggedStruct<"ElapsedDuration", {
|
|
78
|
+
entryId: typeof S.String;
|
|
79
|
+
version: typeof S.Number;
|
|
80
|
+
}>, import("../../schema").CallableTaggedStruct<"HoveredEntry", {
|
|
81
|
+
entryId: typeof S.String;
|
|
82
|
+
}>, import("../../schema").CallableTaggedStruct<"LeftEntry", {
|
|
83
|
+
entryId: typeof S.String;
|
|
84
|
+
}>, import("../../schema").CallableTaggedStruct<"GotTransitionMessage", {
|
|
85
|
+
entryId: typeof S.String;
|
|
86
|
+
message: S.Union<[import("../../schema").CallableTaggedStruct<"Showed", {}>, import("../../schema").CallableTaggedStruct<"Hid", {}>, import("../../schema").CallableTaggedStruct<"AdvancedTransitionFrame", {}>, import("../../schema").CallableTaggedStruct<"EndedTransition", {}>]>;
|
|
87
|
+
}>]>;
|
|
88
|
+
readonly Added: import("../../schema").CallableTaggedStruct<"Added", {
|
|
89
|
+
entry: S.Struct<{
|
|
90
|
+
id: typeof S.String;
|
|
91
|
+
variant: S.Literal<["Info", "Success", "Warning", "Error"]>;
|
|
92
|
+
transition: S.Struct<{
|
|
93
|
+
id: typeof S.String;
|
|
94
|
+
isShowing: typeof S.Boolean;
|
|
95
|
+
transitionState: S.Literal<["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
|
|
96
|
+
}>;
|
|
97
|
+
maybeDuration: S.OptionFromSelf<typeof S.DurationFromMillis>;
|
|
98
|
+
pendingDismissVersion: typeof S.Number;
|
|
99
|
+
isHovered: typeof S.Boolean;
|
|
100
|
+
payload: S.Schema<A, I, never>;
|
|
101
|
+
}>;
|
|
102
|
+
}>;
|
|
103
|
+
readonly init: (config: InitConfig) => {
|
|
104
|
+
readonly entries: readonly {
|
|
105
|
+
readonly id: string;
|
|
106
|
+
readonly transition: {
|
|
107
|
+
readonly id: string;
|
|
108
|
+
readonly isShowing: boolean;
|
|
109
|
+
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
110
|
+
};
|
|
111
|
+
readonly variant: "Info" | "Success" | "Warning" | "Error";
|
|
112
|
+
readonly maybeDuration: Option.Option<Duration.Duration>;
|
|
113
|
+
readonly pendingDismissVersion: number;
|
|
114
|
+
readonly isHovered: boolean;
|
|
115
|
+
readonly payload: A;
|
|
116
|
+
}[];
|
|
117
|
+
readonly id: string;
|
|
118
|
+
readonly defaultDuration: Duration.Duration;
|
|
119
|
+
readonly nextEntryKey: number;
|
|
120
|
+
};
|
|
121
|
+
readonly update: (model: {
|
|
122
|
+
readonly entries: readonly {
|
|
123
|
+
readonly id: string;
|
|
124
|
+
readonly transition: {
|
|
125
|
+
readonly id: string;
|
|
126
|
+
readonly isShowing: boolean;
|
|
127
|
+
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
128
|
+
};
|
|
129
|
+
readonly variant: "Info" | "Success" | "Warning" | "Error";
|
|
130
|
+
readonly maybeDuration: Option.Option<Duration.Duration>;
|
|
131
|
+
readonly pendingDismissVersion: number;
|
|
132
|
+
readonly isHovered: boolean;
|
|
133
|
+
readonly payload: A;
|
|
134
|
+
}[];
|
|
135
|
+
readonly id: string;
|
|
136
|
+
readonly defaultDuration: Duration.Duration;
|
|
137
|
+
readonly nextEntryKey: number;
|
|
138
|
+
}, message: {
|
|
139
|
+
readonly _tag: "Dismissed";
|
|
140
|
+
readonly entryId: string;
|
|
141
|
+
} | {
|
|
142
|
+
readonly _tag: "DismissedAll";
|
|
143
|
+
} | {
|
|
144
|
+
readonly _tag: "ElapsedDuration";
|
|
145
|
+
readonly version: number;
|
|
146
|
+
readonly entryId: string;
|
|
147
|
+
} | {
|
|
148
|
+
readonly _tag: "HoveredEntry";
|
|
149
|
+
readonly entryId: string;
|
|
150
|
+
} | {
|
|
151
|
+
readonly _tag: "LeftEntry";
|
|
152
|
+
readonly entryId: string;
|
|
153
|
+
} | {
|
|
154
|
+
readonly _tag: "GotTransitionMessage";
|
|
155
|
+
readonly message: {
|
|
156
|
+
readonly _tag: "Showed";
|
|
157
|
+
} | {
|
|
158
|
+
readonly _tag: "Hid";
|
|
159
|
+
} | {
|
|
160
|
+
readonly _tag: "AdvancedTransitionFrame";
|
|
161
|
+
} | {
|
|
162
|
+
readonly _tag: "EndedTransition";
|
|
163
|
+
};
|
|
164
|
+
readonly entryId: string;
|
|
165
|
+
} | {
|
|
166
|
+
readonly _tag: "Added";
|
|
167
|
+
readonly entry: {
|
|
168
|
+
readonly id: string;
|
|
169
|
+
readonly transition: {
|
|
170
|
+
readonly id: string;
|
|
171
|
+
readonly isShowing: boolean;
|
|
172
|
+
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
173
|
+
};
|
|
174
|
+
readonly variant: "Info" | "Success" | "Warning" | "Error";
|
|
175
|
+
readonly maybeDuration: Option.Option<Duration.Duration>;
|
|
176
|
+
readonly pendingDismissVersion: number;
|
|
177
|
+
readonly isHovered: boolean;
|
|
178
|
+
readonly payload: A;
|
|
179
|
+
};
|
|
180
|
+
}) => readonly [{
|
|
181
|
+
readonly entries: readonly {
|
|
182
|
+
readonly id: string;
|
|
183
|
+
readonly transition: {
|
|
184
|
+
readonly id: string;
|
|
185
|
+
readonly isShowing: boolean;
|
|
186
|
+
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
187
|
+
};
|
|
188
|
+
readonly variant: "Info" | "Success" | "Warning" | "Error";
|
|
189
|
+
readonly maybeDuration: Option.Option<Duration.Duration>;
|
|
190
|
+
readonly pendingDismissVersion: number;
|
|
191
|
+
readonly isHovered: boolean;
|
|
192
|
+
readonly payload: A;
|
|
193
|
+
}[];
|
|
194
|
+
readonly id: string;
|
|
195
|
+
readonly defaultDuration: Duration.Duration;
|
|
196
|
+
readonly nextEntryKey: number;
|
|
197
|
+
}, readonly Readonly<{
|
|
198
|
+
name: string;
|
|
199
|
+
effect: Effect.Effect<{
|
|
200
|
+
readonly _tag: "Dismissed";
|
|
201
|
+
readonly entryId: string;
|
|
202
|
+
} | {
|
|
203
|
+
readonly _tag: "DismissedAll";
|
|
204
|
+
} | {
|
|
205
|
+
readonly _tag: "ElapsedDuration";
|
|
206
|
+
readonly version: number;
|
|
207
|
+
readonly entryId: string;
|
|
208
|
+
} | {
|
|
209
|
+
readonly _tag: "HoveredEntry";
|
|
210
|
+
readonly entryId: string;
|
|
211
|
+
} | {
|
|
212
|
+
readonly _tag: "LeftEntry";
|
|
213
|
+
readonly entryId: string;
|
|
214
|
+
} | {
|
|
215
|
+
readonly _tag: "GotTransitionMessage";
|
|
216
|
+
readonly message: {
|
|
217
|
+
readonly _tag: "Showed";
|
|
218
|
+
} | {
|
|
219
|
+
readonly _tag: "Hid";
|
|
220
|
+
} | {
|
|
221
|
+
readonly _tag: "AdvancedTransitionFrame";
|
|
222
|
+
} | {
|
|
223
|
+
readonly _tag: "EndedTransition";
|
|
224
|
+
};
|
|
225
|
+
readonly entryId: string;
|
|
226
|
+
} | {
|
|
227
|
+
readonly _tag: "Added";
|
|
228
|
+
readonly entry: {
|
|
229
|
+
readonly id: string;
|
|
230
|
+
readonly transition: {
|
|
231
|
+
readonly id: string;
|
|
232
|
+
readonly isShowing: boolean;
|
|
233
|
+
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
234
|
+
};
|
|
235
|
+
readonly variant: "Info" | "Success" | "Warning" | "Error";
|
|
236
|
+
readonly maybeDuration: Option.Option<Duration.Duration>;
|
|
237
|
+
readonly pendingDismissVersion: number;
|
|
238
|
+
readonly isHovered: boolean;
|
|
239
|
+
readonly payload: A;
|
|
240
|
+
};
|
|
241
|
+
}, never, never>;
|
|
242
|
+
}>[]];
|
|
243
|
+
readonly show: (model: {
|
|
244
|
+
readonly entries: readonly {
|
|
245
|
+
readonly id: string;
|
|
246
|
+
readonly transition: {
|
|
247
|
+
readonly id: string;
|
|
248
|
+
readonly isShowing: boolean;
|
|
249
|
+
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
250
|
+
};
|
|
251
|
+
readonly variant: "Info" | "Success" | "Warning" | "Error";
|
|
252
|
+
readonly maybeDuration: Option.Option<Duration.Duration>;
|
|
253
|
+
readonly pendingDismissVersion: number;
|
|
254
|
+
readonly isHovered: boolean;
|
|
255
|
+
readonly payload: A;
|
|
256
|
+
}[];
|
|
257
|
+
readonly id: string;
|
|
258
|
+
readonly defaultDuration: Duration.Duration;
|
|
259
|
+
readonly nextEntryKey: number;
|
|
260
|
+
}, input: ShowInput<A>) => readonly [{
|
|
261
|
+
readonly entries: readonly {
|
|
262
|
+
readonly id: string;
|
|
263
|
+
readonly transition: {
|
|
264
|
+
readonly id: string;
|
|
265
|
+
readonly isShowing: boolean;
|
|
266
|
+
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
267
|
+
};
|
|
268
|
+
readonly variant: "Info" | "Success" | "Warning" | "Error";
|
|
269
|
+
readonly maybeDuration: Option.Option<Duration.Duration>;
|
|
270
|
+
readonly pendingDismissVersion: number;
|
|
271
|
+
readonly isHovered: boolean;
|
|
272
|
+
readonly payload: A;
|
|
273
|
+
}[];
|
|
274
|
+
readonly id: string;
|
|
275
|
+
readonly defaultDuration: Duration.Duration;
|
|
276
|
+
readonly nextEntryKey: number;
|
|
277
|
+
}, readonly Readonly<{
|
|
278
|
+
name: string;
|
|
279
|
+
effect: Effect.Effect<{
|
|
280
|
+
readonly _tag: "Dismissed";
|
|
281
|
+
readonly entryId: string;
|
|
282
|
+
} | {
|
|
283
|
+
readonly _tag: "DismissedAll";
|
|
284
|
+
} | {
|
|
285
|
+
readonly _tag: "ElapsedDuration";
|
|
286
|
+
readonly version: number;
|
|
287
|
+
readonly entryId: string;
|
|
288
|
+
} | {
|
|
289
|
+
readonly _tag: "HoveredEntry";
|
|
290
|
+
readonly entryId: string;
|
|
291
|
+
} | {
|
|
292
|
+
readonly _tag: "LeftEntry";
|
|
293
|
+
readonly entryId: string;
|
|
294
|
+
} | {
|
|
295
|
+
readonly _tag: "GotTransitionMessage";
|
|
296
|
+
readonly message: {
|
|
297
|
+
readonly _tag: "Showed";
|
|
298
|
+
} | {
|
|
299
|
+
readonly _tag: "Hid";
|
|
300
|
+
} | {
|
|
301
|
+
readonly _tag: "AdvancedTransitionFrame";
|
|
302
|
+
} | {
|
|
303
|
+
readonly _tag: "EndedTransition";
|
|
304
|
+
};
|
|
305
|
+
readonly entryId: string;
|
|
306
|
+
} | {
|
|
307
|
+
readonly _tag: "Added";
|
|
308
|
+
readonly entry: {
|
|
309
|
+
readonly id: string;
|
|
310
|
+
readonly transition: {
|
|
311
|
+
readonly id: string;
|
|
312
|
+
readonly isShowing: boolean;
|
|
313
|
+
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
314
|
+
};
|
|
315
|
+
readonly variant: "Info" | "Success" | "Warning" | "Error";
|
|
316
|
+
readonly maybeDuration: Option.Option<Duration.Duration>;
|
|
317
|
+
readonly pendingDismissVersion: number;
|
|
318
|
+
readonly isHovered: boolean;
|
|
319
|
+
readonly payload: A;
|
|
320
|
+
};
|
|
321
|
+
}, never, never>;
|
|
322
|
+
}>[]];
|
|
323
|
+
readonly dismiss: (model: {
|
|
324
|
+
readonly entries: readonly {
|
|
325
|
+
readonly id: string;
|
|
326
|
+
readonly transition: {
|
|
327
|
+
readonly id: string;
|
|
328
|
+
readonly isShowing: boolean;
|
|
329
|
+
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
330
|
+
};
|
|
331
|
+
readonly variant: "Info" | "Success" | "Warning" | "Error";
|
|
332
|
+
readonly maybeDuration: Option.Option<Duration.Duration>;
|
|
333
|
+
readonly pendingDismissVersion: number;
|
|
334
|
+
readonly isHovered: boolean;
|
|
335
|
+
readonly payload: A;
|
|
336
|
+
}[];
|
|
337
|
+
readonly id: string;
|
|
338
|
+
readonly defaultDuration: Duration.Duration;
|
|
339
|
+
readonly nextEntryKey: number;
|
|
340
|
+
}, entryId: string) => readonly [{
|
|
341
|
+
readonly entries: readonly {
|
|
342
|
+
readonly id: string;
|
|
343
|
+
readonly transition: {
|
|
344
|
+
readonly id: string;
|
|
345
|
+
readonly isShowing: boolean;
|
|
346
|
+
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
347
|
+
};
|
|
348
|
+
readonly variant: "Info" | "Success" | "Warning" | "Error";
|
|
349
|
+
readonly maybeDuration: Option.Option<Duration.Duration>;
|
|
350
|
+
readonly pendingDismissVersion: number;
|
|
351
|
+
readonly isHovered: boolean;
|
|
352
|
+
readonly payload: A;
|
|
353
|
+
}[];
|
|
354
|
+
readonly id: string;
|
|
355
|
+
readonly defaultDuration: Duration.Duration;
|
|
356
|
+
readonly nextEntryKey: number;
|
|
357
|
+
}, readonly Readonly<{
|
|
358
|
+
name: string;
|
|
359
|
+
effect: Effect.Effect<{
|
|
360
|
+
readonly _tag: "Dismissed";
|
|
361
|
+
readonly entryId: string;
|
|
362
|
+
} | {
|
|
363
|
+
readonly _tag: "DismissedAll";
|
|
364
|
+
} | {
|
|
365
|
+
readonly _tag: "ElapsedDuration";
|
|
366
|
+
readonly version: number;
|
|
367
|
+
readonly entryId: string;
|
|
368
|
+
} | {
|
|
369
|
+
readonly _tag: "HoveredEntry";
|
|
370
|
+
readonly entryId: string;
|
|
371
|
+
} | {
|
|
372
|
+
readonly _tag: "LeftEntry";
|
|
373
|
+
readonly entryId: string;
|
|
374
|
+
} | {
|
|
375
|
+
readonly _tag: "GotTransitionMessage";
|
|
376
|
+
readonly message: {
|
|
377
|
+
readonly _tag: "Showed";
|
|
378
|
+
} | {
|
|
379
|
+
readonly _tag: "Hid";
|
|
380
|
+
} | {
|
|
381
|
+
readonly _tag: "AdvancedTransitionFrame";
|
|
382
|
+
} | {
|
|
383
|
+
readonly _tag: "EndedTransition";
|
|
384
|
+
};
|
|
385
|
+
readonly entryId: string;
|
|
386
|
+
} | {
|
|
387
|
+
readonly _tag: "Added";
|
|
388
|
+
readonly entry: {
|
|
389
|
+
readonly id: string;
|
|
390
|
+
readonly transition: {
|
|
391
|
+
readonly id: string;
|
|
392
|
+
readonly isShowing: boolean;
|
|
393
|
+
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
394
|
+
};
|
|
395
|
+
readonly variant: "Info" | "Success" | "Warning" | "Error";
|
|
396
|
+
readonly maybeDuration: Option.Option<Duration.Duration>;
|
|
397
|
+
readonly pendingDismissVersion: number;
|
|
398
|
+
readonly isHovered: boolean;
|
|
399
|
+
readonly payload: A;
|
|
400
|
+
};
|
|
401
|
+
}, never, never>;
|
|
402
|
+
}>[]];
|
|
403
|
+
readonly dismissAll: (model: {
|
|
404
|
+
readonly entries: readonly {
|
|
405
|
+
readonly id: string;
|
|
406
|
+
readonly transition: {
|
|
407
|
+
readonly id: string;
|
|
408
|
+
readonly isShowing: boolean;
|
|
409
|
+
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
410
|
+
};
|
|
411
|
+
readonly variant: "Info" | "Success" | "Warning" | "Error";
|
|
412
|
+
readonly maybeDuration: Option.Option<Duration.Duration>;
|
|
413
|
+
readonly pendingDismissVersion: number;
|
|
414
|
+
readonly isHovered: boolean;
|
|
415
|
+
readonly payload: A;
|
|
416
|
+
}[];
|
|
417
|
+
readonly id: string;
|
|
418
|
+
readonly defaultDuration: Duration.Duration;
|
|
419
|
+
readonly nextEntryKey: number;
|
|
420
|
+
}) => readonly [{
|
|
421
|
+
readonly entries: readonly {
|
|
422
|
+
readonly id: string;
|
|
423
|
+
readonly transition: {
|
|
424
|
+
readonly id: string;
|
|
425
|
+
readonly isShowing: boolean;
|
|
426
|
+
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
427
|
+
};
|
|
428
|
+
readonly variant: "Info" | "Success" | "Warning" | "Error";
|
|
429
|
+
readonly maybeDuration: Option.Option<Duration.Duration>;
|
|
430
|
+
readonly pendingDismissVersion: number;
|
|
431
|
+
readonly isHovered: boolean;
|
|
432
|
+
readonly payload: A;
|
|
433
|
+
}[];
|
|
434
|
+
readonly id: string;
|
|
435
|
+
readonly defaultDuration: Duration.Duration;
|
|
436
|
+
readonly nextEntryKey: number;
|
|
437
|
+
}, readonly Readonly<{
|
|
438
|
+
name: string;
|
|
439
|
+
effect: Effect.Effect<{
|
|
440
|
+
readonly _tag: "Dismissed";
|
|
441
|
+
readonly entryId: string;
|
|
442
|
+
} | {
|
|
443
|
+
readonly _tag: "DismissedAll";
|
|
444
|
+
} | {
|
|
445
|
+
readonly _tag: "ElapsedDuration";
|
|
446
|
+
readonly version: number;
|
|
447
|
+
readonly entryId: string;
|
|
448
|
+
} | {
|
|
449
|
+
readonly _tag: "HoveredEntry";
|
|
450
|
+
readonly entryId: string;
|
|
451
|
+
} | {
|
|
452
|
+
readonly _tag: "LeftEntry";
|
|
453
|
+
readonly entryId: string;
|
|
454
|
+
} | {
|
|
455
|
+
readonly _tag: "GotTransitionMessage";
|
|
456
|
+
readonly message: {
|
|
457
|
+
readonly _tag: "Showed";
|
|
458
|
+
} | {
|
|
459
|
+
readonly _tag: "Hid";
|
|
460
|
+
} | {
|
|
461
|
+
readonly _tag: "AdvancedTransitionFrame";
|
|
462
|
+
} | {
|
|
463
|
+
readonly _tag: "EndedTransition";
|
|
464
|
+
};
|
|
465
|
+
readonly entryId: string;
|
|
466
|
+
} | {
|
|
467
|
+
readonly _tag: "Added";
|
|
468
|
+
readonly entry: {
|
|
469
|
+
readonly id: string;
|
|
470
|
+
readonly transition: {
|
|
471
|
+
readonly id: string;
|
|
472
|
+
readonly isShowing: boolean;
|
|
473
|
+
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
474
|
+
};
|
|
475
|
+
readonly variant: "Info" | "Success" | "Warning" | "Error";
|
|
476
|
+
readonly maybeDuration: Option.Option<Duration.Duration>;
|
|
477
|
+
readonly pendingDismissVersion: number;
|
|
478
|
+
readonly isHovered: boolean;
|
|
479
|
+
readonly payload: A;
|
|
480
|
+
};
|
|
481
|
+
}, never, never>;
|
|
482
|
+
}>[]];
|
|
483
|
+
};
|
|
484
|
+
//# sourceMappingURL=update.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../src/ui/toast/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EACR,MAAM,EAGN,MAAM,EACN,MAAM,IAAI,CAAC,EACZ,MAAM,QAAQ,CAAA;AAEf,OAAO,KAAK,OAAO,MAAM,eAAe,CAAA;AAexC,OAAO,EAML,KAAK,UAAU,EACf,KAAK,OAAO,EAKb,MAAM,UAAU,CAAA;AAIjB;;oDAEoD;AACpD,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI,QAAQ,CAAC;IAClC,OAAO,EAAE,CAAC,CAAA;IACV,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,QAAQ,CAAC,aAAa,CAAA;IACjC,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAC,CAAA;AAEF;;;eAGe;AACf,eAAO,MAAM,YAAY;;;;EAAkD,CAAA;AAI3E;;;;;;4EAM4E;AAC5E,eAAO,MAAM,WAAW,GAAI,CAAC,EAAE,CAAC,EAAE,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BA0IvC,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA2IG,SAAS,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAIP,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkB/C,CAAA"}
|