foldkit 0.81.1 → 0.82.1
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 +3 -3
- package/dist/calendar/calendarDate.d.ts +11 -11
- package/dist/calendar/calendarDate.d.ts.map +1 -1
- package/dist/calendar/calendarDate.js +14 -13
- package/dist/calendar/comparison.d.ts +3 -3
- package/dist/calendar/comparison.d.ts.map +1 -1
- package/dist/calendar/comparison.js +5 -5
- package/dist/calendar/info.d.ts +1 -1
- package/dist/calendar/info.d.ts.map +1 -1
- package/dist/calendar/info.js +9 -1
- package/dist/calendar/locale.d.ts +5 -5
- package/dist/calendar/locale.js +23 -2
- package/dist/command/index.d.ts +2 -2
- package/dist/command/index.d.ts.map +1 -1
- package/dist/devTools/overlay.d.ts.map +1 -1
- package/dist/devTools/overlay.js +49 -27
- package/dist/devTools/protocol.d.ts +192 -192
- package/dist/devTools/protocol.d.ts.map +1 -1
- package/dist/devTools/protocol.js +36 -12
- package/dist/devTools/serialize.d.ts.map +1 -1
- package/dist/devTools/serialize.js +4 -4
- package/dist/devTools/store.d.ts.map +1 -1
- package/dist/devTools/store.js +1 -2
- package/dist/devTools/submodelPath.d.ts +1 -1
- package/dist/devTools/summarize.d.ts +6 -6
- package/dist/devTools/summarize.d.ts.map +1 -1
- package/dist/devTools/summarize.js +6 -6
- package/dist/devTools/webSocketBridge.d.ts +1 -1
- package/dist/devTools/webSocketBridge.d.ts.map +1 -1
- package/dist/devTools/webSocketBridge.js +19 -18
- package/dist/fieldValidation/index.d.ts +11 -11
- package/dist/fieldValidation/index.d.ts.map +1 -1
- package/dist/fieldValidation/index.js +8 -7
- package/dist/file/error.d.ts +1 -1
- package/dist/file/file.d.ts +1 -1
- package/dist/file/file.js +1 -1
- package/dist/file/reader.d.ts +4 -4
- package/dist/file/reader.js +5 -5
- package/dist/file/select.js +1 -1
- package/dist/html/index.d.ts.map +1 -1
- package/dist/html/index.js +4 -3
- package/dist/html/lazy.d.ts.map +1 -1
- package/dist/html/lazy.js +6 -7
- package/dist/managedResource/index.d.ts +2 -2
- package/dist/managedResource/index.d.ts.map +1 -1
- package/dist/managedResource/index.js +2 -2
- package/dist/mount/index.d.ts +1 -1
- package/dist/mount/index.d.ts.map +1 -1
- package/dist/route/parser.d.ts +2 -2
- package/dist/route/parser.d.ts.map +1 -1
- package/dist/route/parser.js +5 -5
- package/dist/runtime/browserListeners.d.ts.map +1 -1
- package/dist/runtime/browserListeners.js +6 -7
- package/dist/runtime/deepFreeze.d.ts +1 -1
- package/dist/runtime/deepFreeze.js +2 -2
- package/dist/runtime/hmrProtocol.d.ts +22 -0
- package/dist/runtime/hmrProtocol.d.ts.map +1 -0
- package/dist/runtime/hmrProtocol.js +15 -0
- package/dist/runtime/hmrProtocolPublic.d.ts +2 -0
- package/dist/runtime/hmrProtocolPublic.d.ts.map +1 -0
- package/dist/runtime/hmrProtocolPublic.js +1 -0
- package/dist/runtime/runtime.d.ts +10 -7
- package/dist/runtime/runtime.d.ts.map +1 -1
- package/dist/runtime/runtime.js +116 -114
- package/dist/runtime/subscription.d.ts +5 -5
- package/dist/runtime/subscription.d.ts.map +1 -1
- package/dist/runtime/urlRequest.d.ts +15 -15
- package/dist/runtime/urlRequest.d.ts.map +1 -1
- package/dist/runtime/urlRequest.js +1 -1
- package/dist/schema/index.d.ts +3 -3
- package/dist/schema/index.d.ts.map +1 -1
- package/dist/schema/index.js +10 -4
- package/dist/task/dom.js +1 -1
- package/dist/task/elementMovement.js +1 -1
- package/dist/task/error.d.ts +2 -2
- package/dist/task/inert.d.ts.map +1 -1
- package/dist/task/inert.js +4 -7
- package/dist/task/time.d.ts +1 -1
- package/dist/task/time.js +1 -1
- package/dist/task/timing.d.ts +1 -1
- package/dist/task/timing.d.ts.map +1 -1
- package/dist/task/timing.js +2 -2
- package/dist/test/apps/bubbling.d.ts +3 -3
- package/dist/test/apps/bubbling.d.ts.map +1 -1
- package/dist/test/apps/bubbling.js +1 -1
- package/dist/test/apps/counter.d.ts +6 -6
- package/dist/test/apps/counter.d.ts.map +1 -1
- package/dist/test/apps/counter.js +7 -1
- package/dist/test/apps/disabledButton.d.ts +11 -11
- package/dist/test/apps/disabledButton.d.ts.map +1 -1
- package/dist/test/apps/disabledButton.js +1 -1
- package/dist/test/apps/fileUpload.d.ts +4 -4
- package/dist/test/apps/fileUpload.d.ts.map +1 -1
- package/dist/test/apps/fileUpload.js +1 -1
- package/dist/test/apps/formChild.d.ts +16 -16
- package/dist/test/apps/formChild.d.ts.map +1 -1
- package/dist/test/apps/formChild.js +9 -4
- package/dist/test/apps/interactions.d.ts +8 -8
- package/dist/test/apps/interactions.d.ts.map +1 -1
- package/dist/test/apps/interactions.js +8 -1
- package/dist/test/apps/keypress.d.ts +7 -7
- package/dist/test/apps/keypress.d.ts.map +1 -1
- package/dist/test/apps/keypress.js +1 -1
- package/dist/test/apps/login.d.ts +14 -14
- package/dist/test/apps/login.d.ts.map +1 -1
- package/dist/test/apps/login.js +9 -2
- package/dist/test/apps/logoutButton.d.ts +3 -3
- package/dist/test/apps/logoutButton.d.ts.map +1 -1
- package/dist/test/apps/logoutButton.js +2 -2
- package/dist/test/apps/multiRole.d.ts +2 -2
- package/dist/test/apps/multiRole.d.ts.map +1 -1
- package/dist/test/apps/multiRole.js +1 -1
- package/dist/test/apps/pointer.d.ts +6 -6
- package/dist/test/apps/pointer.d.ts.map +1 -1
- package/dist/test/apps/pointer.js +1 -1
- package/dist/test/apps/resumeUpload.d.ts +8 -8
- package/dist/test/apps/resumeUpload.d.ts.map +1 -1
- package/dist/test/apps/resumeUpload.js +12 -5
- package/dist/test/internal.js +10 -10
- package/dist/test/matchers.js +1 -1
- package/dist/test/query.d.ts.map +1 -1
- package/dist/test/query.js +13 -13
- package/dist/test/scene.d.ts.map +1 -1
- package/dist/test/scene.js +3 -3
- package/dist/test/story.js +1 -1
- package/dist/ui/animation/schema.d.ts +5 -5
- package/dist/ui/animation/schema.d.ts.map +1 -1
- package/dist/ui/animation/schema.js +9 -3
- package/dist/ui/calendar/index.d.ts +77 -77
- package/dist/ui/calendar/index.d.ts.map +1 -1
- package/dist/ui/calendar/index.js +26 -11
- package/dist/ui/checkbox/index.d.ts +2 -2
- package/dist/ui/combobox/multi.d.ts +38 -42
- package/dist/ui/combobox/multi.d.ts.map +1 -1
- package/dist/ui/combobox/multi.js +4 -1
- package/dist/ui/combobox/shared.d.ts +31 -31
- package/dist/ui/combobox/shared.d.ts.map +1 -1
- package/dist/ui/combobox/shared.js +34 -12
- package/dist/ui/combobox/single.d.ts +39 -43
- package/dist/ui/combobox/single.d.ts.map +1 -1
- package/dist/ui/combobox/single.js +7 -6
- package/dist/ui/datePicker/index.d.ts +86 -86
- package/dist/ui/datePicker/index.d.ts.map +1 -1
- package/dist/ui/datePicker/index.js +10 -3
- package/dist/ui/dialog/index.d.ts +8 -8
- package/dist/ui/dialog/index.d.ts.map +1 -1
- package/dist/ui/dialog/index.js +9 -3
- package/dist/ui/disclosure/index.d.ts +2 -2
- package/dist/ui/disclosure/index.d.ts.map +1 -1
- package/dist/ui/disclosure/index.js +1 -1
- package/dist/ui/dragAndDrop/index.d.ts +76 -76
- package/dist/ui/dragAndDrop/index.d.ts.map +1 -1
- package/dist/ui/dragAndDrop/index.js +47 -29
- package/dist/ui/fileDrop/index.d.ts +8 -8
- package/dist/ui/fileDrop/index.d.ts.map +1 -1
- package/dist/ui/fileDrop/index.js +7 -2
- package/dist/ui/listbox/multi.d.ts +36 -40
- package/dist/ui/listbox/multi.d.ts.map +1 -1
- package/dist/ui/listbox/multi.js +4 -1
- package/dist/ui/listbox/shared.d.ts +32 -32
- package/dist/ui/listbox/shared.d.ts.map +1 -1
- package/dist/ui/listbox/shared.js +36 -11
- package/dist/ui/listbox/single.d.ts +36 -40
- package/dist/ui/listbox/single.d.ts.map +1 -1
- package/dist/ui/listbox/single.js +5 -2
- package/dist/ui/menu/index.d.ts +40 -40
- package/dist/ui/menu/index.d.ts.map +1 -1
- package/dist/ui/menu/index.js +38 -11
- package/dist/ui/popover/index.d.ts +12 -12
- package/dist/ui/popover/index.d.ts.map +1 -1
- package/dist/ui/popover/index.js +17 -2
- package/dist/ui/radioGroup/index.d.ts +6 -6
- package/dist/ui/radioGroup/index.d.ts.map +1 -1
- package/dist/ui/radioGroup/index.js +5 -5
- package/dist/ui/slider/index.d.ts +26 -26
- package/dist/ui/slider/index.d.ts.map +1 -1
- package/dist/ui/slider/index.js +30 -16
- package/dist/ui/switch/index.d.ts +2 -2
- package/dist/ui/tabs/index.d.ts +8 -8
- package/dist/ui/tabs/index.d.ts.map +1 -1
- package/dist/ui/tabs/index.js +3 -3
- package/dist/ui/toast/index.d.ts +75 -75
- package/dist/ui/toast/index.d.ts.map +1 -1
- package/dist/ui/toast/index.js +1 -1
- package/dist/ui/toast/schema.d.ts +63 -63
- package/dist/ui/toast/schema.d.ts.map +1 -1
- package/dist/ui/toast/schema.js +19 -4
- package/dist/ui/toast/update.d.ts +67 -67
- package/dist/ui/toast/update.d.ts.map +1 -1
- package/dist/ui/toast/update.js +2 -2
- package/dist/ui/tooltip/index.d.ts +15 -15
- package/dist/ui/tooltip/index.d.ts.map +1 -1
- package/dist/ui/tooltip/index.js +14 -4
- package/dist/ui/virtualList/index.d.ts +16 -16
- package/dist/ui/virtualList/index.d.ts.map +1 -1
- package/dist/ui/virtualList/index.js +46 -42
- package/dist/url/index.d.ts +8 -8
- package/dist/url/index.d.ts.map +1 -1
- package/dist/url/index.js +14 -14
- package/package.json +12 -8
package/dist/ui/toast/index.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export type EntryHandlers<ParentMessage> = Readonly<{
|
|
|
31
31
|
* ```ts
|
|
32
32
|
* const ToastPayload = S.Struct({
|
|
33
33
|
* bodyText: S.String,
|
|
34
|
-
* maybeLink: S.
|
|
34
|
+
* maybeLink: S.Option(S.Struct({
|
|
35
35
|
* href: S.String,
|
|
36
36
|
* text: S.String,
|
|
37
37
|
* })),
|
|
@@ -39,7 +39,7 @@ export type EntryHandlers<ParentMessage> = Readonly<{
|
|
|
39
39
|
* export const Toast = Ui.Toast.make(ToastPayload)
|
|
40
40
|
* ```
|
|
41
41
|
*/
|
|
42
|
-
export declare const make: <A, I>(payloadSchema: S.
|
|
42
|
+
export declare const make: <A, I>(payloadSchema: S.Codec<A, I>) => {
|
|
43
43
|
readonly view: <ParentMessage>(config: Readonly<{
|
|
44
44
|
model: {
|
|
45
45
|
readonly entries: readonly {
|
|
@@ -49,8 +49,8 @@ export declare const make: <A, I>(payloadSchema: S.Schema<A, I>) => {
|
|
|
49
49
|
readonly isShowing: boolean;
|
|
50
50
|
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
51
51
|
};
|
|
52
|
-
readonly variant: "Info" | "Success" | "Warning" | "Error";
|
|
53
52
|
readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
|
|
53
|
+
readonly variant: "Success" | "Error" | "Info" | "Warning";
|
|
54
54
|
readonly pendingDismissVersion: number;
|
|
55
55
|
readonly isHovered: boolean;
|
|
56
56
|
readonly payload: A;
|
|
@@ -68,8 +68,8 @@ export declare const make: <A, I>(payloadSchema: S.Schema<A, I>) => {
|
|
|
68
68
|
readonly isShowing: boolean;
|
|
69
69
|
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
70
70
|
};
|
|
71
|
-
readonly variant: "Info" | "Success" | "Warning" | "Error";
|
|
72
71
|
readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
|
|
72
|
+
readonly variant: "Success" | "Error" | "Info" | "Warning";
|
|
73
73
|
readonly pendingDismissVersion: number;
|
|
74
74
|
readonly isHovered: boolean;
|
|
75
75
|
readonly payload: A;
|
|
@@ -91,8 +91,8 @@ export declare const make: <A, I>(payloadSchema: S.Schema<A, I>) => {
|
|
|
91
91
|
readonly isShowing: boolean;
|
|
92
92
|
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
93
93
|
};
|
|
94
|
-
readonly variant: "Info" | "Success" | "Warning" | "Error";
|
|
95
94
|
readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
|
|
95
|
+
readonly variant: "Success" | "Error" | "Info" | "Warning";
|
|
96
96
|
readonly pendingDismissVersion: number;
|
|
97
97
|
readonly isHovered: boolean;
|
|
98
98
|
readonly payload: A;
|
|
@@ -110,8 +110,8 @@ export declare const make: <A, I>(payloadSchema: S.Schema<A, I>) => {
|
|
|
110
110
|
readonly isShowing: boolean;
|
|
111
111
|
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
112
112
|
};
|
|
113
|
-
readonly variant: "Info" | "Success" | "Warning" | "Error";
|
|
114
113
|
readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
|
|
114
|
+
readonly variant: "Success" | "Error" | "Info" | "Warning";
|
|
115
115
|
readonly pendingDismissVersion: number;
|
|
116
116
|
readonly isHovered: boolean;
|
|
117
117
|
readonly payload: A;
|
|
@@ -131,8 +131,8 @@ export declare const make: <A, I>(payloadSchema: S.Schema<A, I>) => {
|
|
|
131
131
|
readonly isShowing: boolean;
|
|
132
132
|
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
133
133
|
};
|
|
134
|
-
readonly variant: "Info" | "Success" | "Warning" | "Error";
|
|
135
134
|
readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
|
|
135
|
+
readonly variant: "Success" | "Error" | "Info" | "Warning";
|
|
136
136
|
readonly pendingDismissVersion: number;
|
|
137
137
|
readonly isHovered: boolean;
|
|
138
138
|
readonly payload: A;
|
|
@@ -147,8 +147,8 @@ export declare const make: <A, I>(payloadSchema: S.Schema<A, I>) => {
|
|
|
147
147
|
readonly isShowing: boolean;
|
|
148
148
|
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
149
149
|
};
|
|
150
|
-
readonly variant: "Info" | "Success" | "Warning" | "Error";
|
|
151
150
|
readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
|
|
151
|
+
readonly variant: "Success" | "Error" | "Info" | "Warning";
|
|
152
152
|
readonly pendingDismissVersion: number;
|
|
153
153
|
readonly isHovered: boolean;
|
|
154
154
|
readonly payload: A;
|
|
@@ -156,81 +156,81 @@ export declare const make: <A, I>(payloadSchema: S.Schema<A, I>) => {
|
|
|
156
156
|
dismiss: ParentMessage;
|
|
157
157
|
}>) => Html) => Html);
|
|
158
158
|
readonly Entry: S.Struct<{
|
|
159
|
-
id:
|
|
160
|
-
variant: S.
|
|
161
|
-
animation: S.Struct<{
|
|
162
|
-
id:
|
|
163
|
-
isShowing:
|
|
164
|
-
transitionState: S.
|
|
159
|
+
readonly id: S.String;
|
|
160
|
+
readonly variant: S.Literals<readonly ["Info", "Success", "Warning", "Error"]>;
|
|
161
|
+
readonly animation: S.Struct<{
|
|
162
|
+
readonly id: S.String;
|
|
163
|
+
readonly isShowing: S.Boolean;
|
|
164
|
+
readonly transitionState: S.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
|
|
165
165
|
}>;
|
|
166
|
-
maybeDuration: S.
|
|
167
|
-
pendingDismissVersion:
|
|
168
|
-
isHovered:
|
|
169
|
-
payload: S.
|
|
166
|
+
readonly maybeDuration: S.Option<S.DurationFromMillis>;
|
|
167
|
+
readonly pendingDismissVersion: S.Number;
|
|
168
|
+
readonly isHovered: S.Boolean;
|
|
169
|
+
readonly payload: S.Codec<A, I, never, never>;
|
|
170
170
|
}>;
|
|
171
171
|
readonly Model: S.Struct<{
|
|
172
|
-
id:
|
|
173
|
-
defaultDuration:
|
|
174
|
-
entries: S
|
|
175
|
-
id:
|
|
176
|
-
variant: S.
|
|
177
|
-
animation: S.Struct<{
|
|
178
|
-
id:
|
|
179
|
-
isShowing:
|
|
180
|
-
transitionState: S.
|
|
172
|
+
readonly id: S.String;
|
|
173
|
+
readonly defaultDuration: S.DurationFromMillis;
|
|
174
|
+
readonly entries: S.$Array<S.Struct<{
|
|
175
|
+
readonly id: S.String;
|
|
176
|
+
readonly variant: S.Literals<readonly ["Info", "Success", "Warning", "Error"]>;
|
|
177
|
+
readonly animation: S.Struct<{
|
|
178
|
+
readonly id: S.String;
|
|
179
|
+
readonly isShowing: S.Boolean;
|
|
180
|
+
readonly transitionState: S.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
|
|
181
181
|
}>;
|
|
182
|
-
maybeDuration: S.
|
|
183
|
-
pendingDismissVersion:
|
|
184
|
-
isHovered:
|
|
185
|
-
payload: S.
|
|
182
|
+
readonly maybeDuration: S.Option<S.DurationFromMillis>;
|
|
183
|
+
readonly pendingDismissVersion: S.Number;
|
|
184
|
+
readonly isHovered: S.Boolean;
|
|
185
|
+
readonly payload: S.Codec<A, I, never, never>;
|
|
186
186
|
}>>;
|
|
187
|
-
nextEntryKey:
|
|
187
|
+
readonly nextEntryKey: S.Number;
|
|
188
188
|
}>;
|
|
189
|
-
readonly Message: S.Union<[import("../../schema/index.js").CallableTaggedStruct<"Added", {
|
|
189
|
+
readonly Message: S.Union<readonly [import("../../schema/index.js").CallableTaggedStruct<"Added", {
|
|
190
190
|
entry: S.Struct<{
|
|
191
|
-
id:
|
|
192
|
-
variant: S.
|
|
193
|
-
animation: S.Struct<{
|
|
194
|
-
id:
|
|
195
|
-
isShowing:
|
|
196
|
-
transitionState: S.
|
|
191
|
+
readonly id: S.String;
|
|
192
|
+
readonly variant: S.Literals<readonly ["Info", "Success", "Warning", "Error"]>;
|
|
193
|
+
readonly animation: S.Struct<{
|
|
194
|
+
readonly id: S.String;
|
|
195
|
+
readonly isShowing: S.Boolean;
|
|
196
|
+
readonly transitionState: S.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
|
|
197
197
|
}>;
|
|
198
|
-
maybeDuration: S.
|
|
199
|
-
pendingDismissVersion:
|
|
200
|
-
isHovered:
|
|
201
|
-
payload: S.
|
|
198
|
+
readonly maybeDuration: S.Option<S.DurationFromMillis>;
|
|
199
|
+
readonly pendingDismissVersion: S.Number;
|
|
200
|
+
readonly isHovered: S.Boolean;
|
|
201
|
+
readonly payload: S.Codec<A, I, never, never>;
|
|
202
202
|
}>;
|
|
203
203
|
}>, import("../../schema/index.js").CallableTaggedStruct<"Dismissed", {
|
|
204
|
-
entryId:
|
|
204
|
+
entryId: S.String;
|
|
205
205
|
}>, import("../../schema/index.js").CallableTaggedStruct<"DismissedAll", {}>, import("../../schema/index.js").CallableTaggedStruct<"ElapsedDuration", {
|
|
206
|
-
entryId:
|
|
207
|
-
version:
|
|
206
|
+
entryId: S.String;
|
|
207
|
+
version: S.Number;
|
|
208
208
|
}>, import("../../schema/index.js").CallableTaggedStruct<"HoveredEntry", {
|
|
209
|
-
entryId:
|
|
209
|
+
entryId: S.String;
|
|
210
210
|
}>, import("../../schema/index.js").CallableTaggedStruct<"LeftEntry", {
|
|
211
|
-
entryId:
|
|
211
|
+
entryId: S.String;
|
|
212
212
|
}>, import("../../schema/index.js").CallableTaggedStruct<"GotAnimationMessage", {
|
|
213
|
-
entryId:
|
|
213
|
+
entryId: S.String;
|
|
214
214
|
message: S.Union<[import("../../schema/index.js").CallableTaggedStruct<"Showed", {}>, import("../../schema/index.js").CallableTaggedStruct<"Hid", {}>, import("../../schema/index.js").CallableTaggedStruct<"AdvancedAnimationFrame", {}>, import("../../schema/index.js").CallableTaggedStruct<"EndedAnimation", {}>]>;
|
|
215
215
|
}>]>;
|
|
216
216
|
readonly Added: import("../../schema/index.js").CallableTaggedStruct<"Added", {
|
|
217
217
|
entry: S.Struct<{
|
|
218
|
-
id:
|
|
219
|
-
variant: S.
|
|
220
|
-
animation: S.Struct<{
|
|
221
|
-
id:
|
|
222
|
-
isShowing:
|
|
223
|
-
transitionState: S.
|
|
218
|
+
readonly id: S.String;
|
|
219
|
+
readonly variant: S.Literals<readonly ["Info", "Success", "Warning", "Error"]>;
|
|
220
|
+
readonly animation: S.Struct<{
|
|
221
|
+
readonly id: S.String;
|
|
222
|
+
readonly isShowing: S.Boolean;
|
|
223
|
+
readonly transitionState: S.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
|
|
224
224
|
}>;
|
|
225
|
-
maybeDuration: S.
|
|
226
|
-
pendingDismissVersion:
|
|
227
|
-
isHovered:
|
|
228
|
-
payload: S.
|
|
225
|
+
readonly maybeDuration: S.Option<S.DurationFromMillis>;
|
|
226
|
+
readonly pendingDismissVersion: S.Number;
|
|
227
|
+
readonly isHovered: S.Boolean;
|
|
228
|
+
readonly payload: S.Codec<A, I, never, never>;
|
|
229
229
|
}>;
|
|
230
230
|
}>;
|
|
231
231
|
readonly init: (config: Readonly<{
|
|
232
232
|
id: string;
|
|
233
|
-
defaultDuration?: import("effect/Duration").
|
|
233
|
+
defaultDuration?: import("effect/Duration").Input;
|
|
234
234
|
}>) => {
|
|
235
235
|
readonly entries: readonly {
|
|
236
236
|
readonly id: string;
|
|
@@ -239,8 +239,8 @@ export declare const make: <A, I>(payloadSchema: S.Schema<A, I>) => {
|
|
|
239
239
|
readonly isShowing: boolean;
|
|
240
240
|
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
241
241
|
};
|
|
242
|
-
readonly variant: "Info" | "Success" | "Warning" | "Error";
|
|
243
242
|
readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
|
|
243
|
+
readonly variant: "Success" | "Error" | "Info" | "Warning";
|
|
244
244
|
readonly pendingDismissVersion: number;
|
|
245
245
|
readonly isHovered: boolean;
|
|
246
246
|
readonly payload: A;
|
|
@@ -257,8 +257,8 @@ export declare const make: <A, I>(payloadSchema: S.Schema<A, I>) => {
|
|
|
257
257
|
readonly isShowing: boolean;
|
|
258
258
|
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
259
259
|
};
|
|
260
|
-
readonly variant: "Info" | "Success" | "Warning" | "Error";
|
|
261
260
|
readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
|
|
261
|
+
readonly variant: "Success" | "Error" | "Info" | "Warning";
|
|
262
262
|
readonly pendingDismissVersion: number;
|
|
263
263
|
readonly isHovered: boolean;
|
|
264
264
|
readonly payload: A;
|
|
@@ -302,8 +302,8 @@ export declare const make: <A, I>(payloadSchema: S.Schema<A, I>) => {
|
|
|
302
302
|
readonly isShowing: boolean;
|
|
303
303
|
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
304
304
|
};
|
|
305
|
-
readonly variant: "Info" | "Success" | "Warning" | "Error";
|
|
306
305
|
readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
|
|
306
|
+
readonly variant: "Success" | "Error" | "Info" | "Warning";
|
|
307
307
|
readonly pendingDismissVersion: number;
|
|
308
308
|
readonly isHovered: boolean;
|
|
309
309
|
readonly payload: A;
|
|
@@ -316,8 +316,8 @@ export declare const make: <A, I>(payloadSchema: S.Schema<A, I>) => {
|
|
|
316
316
|
readonly isShowing: boolean;
|
|
317
317
|
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
318
318
|
};
|
|
319
|
-
readonly variant: "Info" | "Success" | "Warning" | "Error";
|
|
320
319
|
readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
|
|
320
|
+
readonly variant: "Success" | "Error" | "Info" | "Warning";
|
|
321
321
|
readonly pendingDismissVersion: number;
|
|
322
322
|
readonly isHovered: boolean;
|
|
323
323
|
readonly payload: A;
|
|
@@ -363,8 +363,8 @@ export declare const make: <A, I>(payloadSchema: S.Schema<A, I>) => {
|
|
|
363
363
|
readonly isShowing: boolean;
|
|
364
364
|
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
365
365
|
};
|
|
366
|
-
readonly variant: "Info" | "Success" | "Warning" | "Error";
|
|
367
366
|
readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
|
|
367
|
+
readonly variant: "Success" | "Error" | "Info" | "Warning";
|
|
368
368
|
readonly pendingDismissVersion: number;
|
|
369
369
|
readonly isHovered: boolean;
|
|
370
370
|
readonly payload: A;
|
|
@@ -379,8 +379,8 @@ export declare const make: <A, I>(payloadSchema: S.Schema<A, I>) => {
|
|
|
379
379
|
readonly isShowing: boolean;
|
|
380
380
|
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
381
381
|
};
|
|
382
|
-
readonly variant: "Info" | "Success" | "Warning" | "Error";
|
|
383
382
|
readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
|
|
383
|
+
readonly variant: "Success" | "Error" | "Info" | "Warning";
|
|
384
384
|
readonly pendingDismissVersion: number;
|
|
385
385
|
readonly isHovered: boolean;
|
|
386
386
|
readonly payload: A;
|
|
@@ -391,7 +391,7 @@ export declare const make: <A, I>(payloadSchema: S.Schema<A, I>) => {
|
|
|
391
391
|
}, input: Readonly<{
|
|
392
392
|
payload: A;
|
|
393
393
|
variant?: Variant;
|
|
394
|
-
duration?: import("effect/Duration").
|
|
394
|
+
duration?: import("effect/Duration").Input;
|
|
395
395
|
sticky?: boolean;
|
|
396
396
|
}>) => readonly [{
|
|
397
397
|
readonly entries: readonly {
|
|
@@ -401,8 +401,8 @@ export declare const make: <A, I>(payloadSchema: S.Schema<A, I>) => {
|
|
|
401
401
|
readonly isShowing: boolean;
|
|
402
402
|
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
403
403
|
};
|
|
404
|
-
readonly variant: "Info" | "Success" | "Warning" | "Error";
|
|
405
404
|
readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
|
|
405
|
+
readonly variant: "Success" | "Error" | "Info" | "Warning";
|
|
406
406
|
readonly pendingDismissVersion: number;
|
|
407
407
|
readonly isHovered: boolean;
|
|
408
408
|
readonly payload: A;
|
|
@@ -448,8 +448,8 @@ export declare const make: <A, I>(payloadSchema: S.Schema<A, I>) => {
|
|
|
448
448
|
readonly isShowing: boolean;
|
|
449
449
|
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
450
450
|
};
|
|
451
|
-
readonly variant: "Info" | "Success" | "Warning" | "Error";
|
|
452
451
|
readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
|
|
452
|
+
readonly variant: "Success" | "Error" | "Info" | "Warning";
|
|
453
453
|
readonly pendingDismissVersion: number;
|
|
454
454
|
readonly isHovered: boolean;
|
|
455
455
|
readonly payload: A;
|
|
@@ -464,8 +464,8 @@ export declare const make: <A, I>(payloadSchema: S.Schema<A, I>) => {
|
|
|
464
464
|
readonly isShowing: boolean;
|
|
465
465
|
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
466
466
|
};
|
|
467
|
-
readonly variant: "Info" | "Success" | "Warning" | "Error";
|
|
468
467
|
readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
|
|
468
|
+
readonly variant: "Success" | "Error" | "Info" | "Warning";
|
|
469
469
|
readonly pendingDismissVersion: number;
|
|
470
470
|
readonly isHovered: boolean;
|
|
471
471
|
readonly payload: A;
|
|
@@ -481,8 +481,8 @@ export declare const make: <A, I>(payloadSchema: S.Schema<A, I>) => {
|
|
|
481
481
|
readonly isShowing: boolean;
|
|
482
482
|
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
483
483
|
};
|
|
484
|
-
readonly variant: "Info" | "Success" | "Warning" | "Error";
|
|
485
484
|
readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
|
|
485
|
+
readonly variant: "Success" | "Error" | "Info" | "Warning";
|
|
486
486
|
readonly pendingDismissVersion: number;
|
|
487
487
|
readonly isHovered: boolean;
|
|
488
488
|
readonly payload: A;
|
|
@@ -528,8 +528,8 @@ export declare const make: <A, I>(payloadSchema: S.Schema<A, I>) => {
|
|
|
528
528
|
readonly isShowing: boolean;
|
|
529
529
|
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
530
530
|
};
|
|
531
|
-
readonly variant: "Info" | "Success" | "Warning" | "Error";
|
|
532
531
|
readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
|
|
532
|
+
readonly variant: "Success" | "Error" | "Info" | "Warning";
|
|
533
533
|
readonly pendingDismissVersion: number;
|
|
534
534
|
readonly isHovered: boolean;
|
|
535
535
|
readonly payload: A;
|
|
@@ -544,8 +544,8 @@ export declare const make: <A, I>(payloadSchema: S.Schema<A, I>) => {
|
|
|
544
544
|
readonly isShowing: boolean;
|
|
545
545
|
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
546
546
|
};
|
|
547
|
-
readonly variant: "Info" | "Success" | "Warning" | "Error";
|
|
548
547
|
readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
|
|
548
|
+
readonly variant: "Success" | "Error" | "Info" | "Warning";
|
|
549
549
|
readonly pendingDismissVersion: number;
|
|
550
550
|
readonly isHovered: boolean;
|
|
551
551
|
readonly payload: A;
|
|
@@ -561,8 +561,8 @@ export declare const make: <A, I>(payloadSchema: S.Schema<A, I>) => {
|
|
|
561
561
|
readonly isShowing: boolean;
|
|
562
562
|
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
563
563
|
};
|
|
564
|
-
readonly variant: "Info" | "Success" | "Warning" | "Error";
|
|
565
564
|
readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
|
|
565
|
+
readonly variant: "Success" | "Error" | "Info" | "Warning";
|
|
566
566
|
readonly pendingDismissVersion: number;
|
|
567
567
|
readonly isHovered: boolean;
|
|
568
568
|
readonly payload: A;
|
|
@@ -608,8 +608,8 @@ export declare const make: <A, I>(payloadSchema: S.Schema<A, I>) => {
|
|
|
608
608
|
readonly isShowing: boolean;
|
|
609
609
|
readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating";
|
|
610
610
|
};
|
|
611
|
-
readonly variant: "Info" | "Success" | "Warning" | "Error";
|
|
612
611
|
readonly maybeDuration: import("effect/Option").Option<import("effect/Duration").Duration>;
|
|
612
|
+
readonly variant: "Success" | "Error" | "Info" | "Warning";
|
|
613
613
|
readonly pendingDismissVersion: number;
|
|
614
614
|
readonly isHovered: boolean;
|
|
615
615
|
readonly payload: A;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/toast/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,MAAM,IAAI,CAAC,EAAE,MAAM,QAAQ,CAAA;AAEhD,OAAO,EACL,KAAK,SAAS,EACd,KAAK,IAAI,EAGV,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,SAAS,EACT,YAAY,EACZ,eAAe,EACf,mBAAmB,EACnB,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,OAAO,EACR,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,YAAY,EAAe,MAAM,aAAa,CAAA;AAEvD,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAC7C,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAE5C,OAAO,EACL,OAAO,EACP,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,SAAS,EACT,mBAAmB,EACnB,YAAY,GACb,CAAA;AA0ED;yDACyD;AACzD,MAAM,MAAM,aAAa,CAAC,aAAa,IAAI,QAAQ,CAAC;IAClD,OAAO,EAAE,aAAa,CAAA;CACvB,CAAC,CAAA;AAIF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,IAAI,GAAI,CAAC,EAAE,CAAC,EAAE,eAAe,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/toast/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,MAAM,IAAI,CAAC,EAAE,MAAM,QAAQ,CAAA;AAEhD,OAAO,EACL,KAAK,SAAS,EACd,KAAK,IAAI,EAGV,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,SAAS,EACT,YAAY,EACZ,eAAe,EACf,mBAAmB,EACnB,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,OAAO,EACR,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,YAAY,EAAe,MAAM,aAAa,CAAA;AAEvD,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAC7C,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAE5C,OAAO,EACL,OAAO,EACP,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,SAAS,EACT,mBAAmB,EACnB,YAAY,GACb,CAAA;AA0ED;yDACyD;AACzD,MAAM,MAAM,aAAa,CAAC,aAAa,IAAI,QAAQ,CAAC;IAClD,OAAO,EAAE,aAAa,CAAA;CACvB,CAAC,CAAA;AAIF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,IAAI,GAAI,CAAC,EAAE,CAAC,EAAE,eAAe,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;oBAyBvC,aAAa;;;;;;;;;;;;;;;;;;;kBAlBf,QAAQ;mCAEP,SAAS,GAAG,YAAY,GAAG,SAAS;;;;;;;;;;;;;;;eAEwB,IAAI;oBAC/D,MAAM;oBACN,MAAM;;yBAED,MAAM;;WAUwC,IAAI;oBA6FvD,aAAa,gBACX,IAAI;;;;;;;;;;;;;;;;;;;kBAhHR,QAAQ;mCAEP,SAAS,GAAG,YAAY,GAAG,SAAS;;;;;;;;;;;;;;;eAEwB,IAAI;oBAC/D,MAAM;oBACN,MAAM;;yBAED,MAAM;;QA0GrB,OAAO,GAAG,iBAAiB,GAAG,aAAa,CAC5C,KACA,CAAC,CACF,KAAK;;;;;;;;;;;;;;;;;KAA2B,EAChC,eAAe,YApHJ,SAAS,GAAG,YAAY,GAAG,SAAS,kBAoHc,EAC7D,WAAW;;;;;;;;;;;;;;WAnH4D,IAmHlB,KAClD,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyBX,CAAA"}
|
package/dist/ui/toast/index.js
CHANGED
|
@@ -4,10 +4,10 @@ import { Duration, Schema as S } from 'effect';
|
|
|
4
4
|
* `data-variant` on each entry for per-variant CSS. This is the only
|
|
5
5
|
* content-adjacent field the component owns — the rest of the entry's
|
|
6
6
|
* content lives in the user-provided payload. */
|
|
7
|
-
export declare const Variant: S.
|
|
7
|
+
export declare const Variant: S.Literals<readonly ["Info", "Success", "Warning", "Error"]>;
|
|
8
8
|
export type Variant = typeof Variant.Type;
|
|
9
9
|
/** Where the toast viewport is anchored on the screen and how entries stack. */
|
|
10
|
-
export declare const Position: S.
|
|
10
|
+
export declare const Position: S.Literals<readonly ["TopLeft", "TopCenter", "TopRight", "BottomLeft", "BottomCenter", "BottomRight"]>;
|
|
11
11
|
export type Position = typeof Position.Type;
|
|
12
12
|
/** Schema factory for a single toast entry. `payloadSchema` is user-provided
|
|
13
13
|
* and defines the shape of per-entry content — whatever the consumer wants
|
|
@@ -15,46 +15,46 @@ export type Position = typeof Position.Type;
|
|
|
15
15
|
* `variant` (for ARIA role), `animation`, `maybeDuration`,
|
|
16
16
|
* `pendingDismissVersion` (for cancellable auto-dismiss), and `isHovered`
|
|
17
17
|
* (for pause-on-hover). */
|
|
18
|
-
export declare const makeEntry: <A, I>(payloadSchema: S.
|
|
19
|
-
id:
|
|
20
|
-
variant: S.
|
|
21
|
-
animation: S.Struct<{
|
|
22
|
-
id:
|
|
23
|
-
isShowing:
|
|
24
|
-
transitionState: S.
|
|
18
|
+
export declare const makeEntry: <A, I>(payloadSchema: S.Codec<A, I>) => S.Struct<{
|
|
19
|
+
readonly id: S.String;
|
|
20
|
+
readonly variant: S.Literals<readonly ["Info", "Success", "Warning", "Error"]>;
|
|
21
|
+
readonly animation: S.Struct<{
|
|
22
|
+
readonly id: S.String;
|
|
23
|
+
readonly isShowing: S.Boolean;
|
|
24
|
+
readonly transitionState: S.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
|
|
25
25
|
}>;
|
|
26
|
-
maybeDuration: S.
|
|
27
|
-
pendingDismissVersion:
|
|
28
|
-
isHovered:
|
|
29
|
-
payload: S.
|
|
26
|
+
readonly maybeDuration: S.Option<S.DurationFromMillis>;
|
|
27
|
+
readonly pendingDismissVersion: S.Number;
|
|
28
|
+
readonly isHovered: S.Boolean;
|
|
29
|
+
readonly payload: S.Codec<A, I, never, never>;
|
|
30
30
|
}>;
|
|
31
31
|
/** Schema factory for the toast container's state. `nextEntryKey` is a
|
|
32
32
|
* monotonic counter used to generate unique entry IDs purely from Model
|
|
33
33
|
* state. Thread the updated model through successive `show()` calls —
|
|
34
34
|
* calling `show()` twice against the same pre-update model in the same tick
|
|
35
35
|
* will produce duplicate entry IDs. */
|
|
36
|
-
export declare const makeModel: <A, I>(payloadSchema: S.
|
|
37
|
-
id:
|
|
38
|
-
defaultDuration:
|
|
39
|
-
entries: S
|
|
40
|
-
id:
|
|
41
|
-
variant: S.
|
|
42
|
-
animation: S.Struct<{
|
|
43
|
-
id:
|
|
44
|
-
isShowing:
|
|
45
|
-
transitionState: S.
|
|
36
|
+
export declare const makeModel: <A, I>(payloadSchema: S.Codec<A, I>) => S.Struct<{
|
|
37
|
+
readonly id: S.String;
|
|
38
|
+
readonly defaultDuration: S.DurationFromMillis;
|
|
39
|
+
readonly entries: S.$Array<S.Struct<{
|
|
40
|
+
readonly id: S.String;
|
|
41
|
+
readonly variant: S.Literals<readonly ["Info", "Success", "Warning", "Error"]>;
|
|
42
|
+
readonly animation: S.Struct<{
|
|
43
|
+
readonly id: S.String;
|
|
44
|
+
readonly isShowing: S.Boolean;
|
|
45
|
+
readonly transitionState: S.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
|
|
46
46
|
}>;
|
|
47
|
-
maybeDuration: S.
|
|
48
|
-
pendingDismissVersion:
|
|
49
|
-
isHovered:
|
|
50
|
-
payload: S.
|
|
47
|
+
readonly maybeDuration: S.Option<S.DurationFromMillis>;
|
|
48
|
+
readonly pendingDismissVersion: S.Number;
|
|
49
|
+
readonly isHovered: S.Boolean;
|
|
50
|
+
readonly payload: S.Codec<A, I, never, never>;
|
|
51
51
|
}>>;
|
|
52
|
-
nextEntryKey:
|
|
52
|
+
readonly nextEntryKey: S.Number;
|
|
53
53
|
}>;
|
|
54
54
|
/** Sent when an entry should begin dismissing. Starts the leave animation;
|
|
55
55
|
* the entry is removed from the stack when `TransitionedOut` fires. */
|
|
56
56
|
export declare const Dismissed: import("../../schema/index.js").CallableTaggedStruct<"Dismissed", {
|
|
57
|
-
entryId:
|
|
57
|
+
entryId: S.String;
|
|
58
58
|
}>;
|
|
59
59
|
/** Sent when every currently-visible entry should begin dismissing. */
|
|
60
60
|
export declare const DismissedAll: import("../../schema/index.js").CallableTaggedStruct<"DismissedAll", {}>;
|
|
@@ -62,22 +62,22 @@ export declare const DismissedAll: import("../../schema/index.js").CallableTagge
|
|
|
62
62
|
* from the scheduling moment so stale timers (from hover or manual dismiss)
|
|
63
63
|
* are discarded. */
|
|
64
64
|
export declare const ElapsedDuration: import("../../schema/index.js").CallableTaggedStruct<"ElapsedDuration", {
|
|
65
|
-
entryId:
|
|
66
|
-
version:
|
|
65
|
+
entryId: S.String;
|
|
66
|
+
version: S.Number;
|
|
67
67
|
}>;
|
|
68
68
|
/** Sent when the pointer enters an entry. Pauses the auto-dismiss timer by
|
|
69
69
|
* advancing the entry's version. */
|
|
70
70
|
export declare const HoveredEntry: import("../../schema/index.js").CallableTaggedStruct<"HoveredEntry", {
|
|
71
|
-
entryId:
|
|
71
|
+
entryId: S.String;
|
|
72
72
|
}>;
|
|
73
73
|
/** Sent when the pointer leaves an entry. Restarts the auto-dismiss timer
|
|
74
74
|
* with the entry's full duration. */
|
|
75
75
|
export declare const LeftEntry: import("../../schema/index.js").CallableTaggedStruct<"LeftEntry", {
|
|
76
|
-
entryId:
|
|
76
|
+
entryId: S.String;
|
|
77
77
|
}>;
|
|
78
78
|
/** Wraps a single entry's Animation submodel message for delegation. */
|
|
79
79
|
export declare const GotAnimationMessage: import("../../schema/index.js").CallableTaggedStruct<"GotAnimationMessage", {
|
|
80
|
-
entryId:
|
|
80
|
+
entryId: S.String;
|
|
81
81
|
message: S.Union<[import("../../schema/index.js").CallableTaggedStruct<"Showed", {}>, import("../../schema/index.js").CallableTaggedStruct<"Hid", {}>, import("../../schema/index.js").CallableTaggedStruct<"AdvancedAnimationFrame", {}>, import("../../schema/index.js").CallableTaggedStruct<"EndedAnimation", {}>]>;
|
|
82
82
|
}>;
|
|
83
83
|
export type Dismissed = typeof Dismissed.Type;
|
|
@@ -88,47 +88,47 @@ export type LeftEntry = typeof LeftEntry.Type;
|
|
|
88
88
|
export type GotAnimationMessage = typeof GotAnimationMessage.Type;
|
|
89
89
|
/** Factory for the `Added` message, which carries a fully-constructed entry
|
|
90
90
|
* whose shape depends on the user-provided payload. */
|
|
91
|
-
export declare const makeAdded: <A, I>(payloadSchema: S.
|
|
91
|
+
export declare const makeAdded: <A, I>(payloadSchema: S.Codec<A, I>) => import("../../schema/index.js").CallableTaggedStruct<"Added", {
|
|
92
92
|
entry: S.Struct<{
|
|
93
|
-
id:
|
|
94
|
-
variant: S.
|
|
95
|
-
animation: S.Struct<{
|
|
96
|
-
id:
|
|
97
|
-
isShowing:
|
|
98
|
-
transitionState: S.
|
|
93
|
+
readonly id: S.String;
|
|
94
|
+
readonly variant: S.Literals<readonly ["Info", "Success", "Warning", "Error"]>;
|
|
95
|
+
readonly animation: S.Struct<{
|
|
96
|
+
readonly id: S.String;
|
|
97
|
+
readonly isShowing: S.Boolean;
|
|
98
|
+
readonly transitionState: S.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
|
|
99
99
|
}>;
|
|
100
|
-
maybeDuration: S.
|
|
101
|
-
pendingDismissVersion:
|
|
102
|
-
isHovered:
|
|
103
|
-
payload: S.
|
|
100
|
+
readonly maybeDuration: S.Option<S.DurationFromMillis>;
|
|
101
|
+
readonly pendingDismissVersion: S.Number;
|
|
102
|
+
readonly isHovered: S.Boolean;
|
|
103
|
+
readonly payload: S.Codec<A, I, never, never>;
|
|
104
104
|
}>;
|
|
105
105
|
}>;
|
|
106
106
|
/** Factory for the union of all messages the toast component can produce. */
|
|
107
|
-
export declare const makeMessage: <A, I>(payloadSchema: S.
|
|
107
|
+
export declare const makeMessage: <A, I>(payloadSchema: S.Codec<A, I>) => S.Union<readonly [import("../../schema/index.js").CallableTaggedStruct<"Added", {
|
|
108
108
|
entry: S.Struct<{
|
|
109
|
-
id:
|
|
110
|
-
variant: S.
|
|
111
|
-
animation: S.Struct<{
|
|
112
|
-
id:
|
|
113
|
-
isShowing:
|
|
114
|
-
transitionState: S.
|
|
109
|
+
readonly id: S.String;
|
|
110
|
+
readonly variant: S.Literals<readonly ["Info", "Success", "Warning", "Error"]>;
|
|
111
|
+
readonly animation: S.Struct<{
|
|
112
|
+
readonly id: S.String;
|
|
113
|
+
readonly isShowing: S.Boolean;
|
|
114
|
+
readonly transitionState: S.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
|
|
115
115
|
}>;
|
|
116
|
-
maybeDuration: S.
|
|
117
|
-
pendingDismissVersion:
|
|
118
|
-
isHovered:
|
|
119
|
-
payload: S.
|
|
116
|
+
readonly maybeDuration: S.Option<S.DurationFromMillis>;
|
|
117
|
+
readonly pendingDismissVersion: S.Number;
|
|
118
|
+
readonly isHovered: S.Boolean;
|
|
119
|
+
readonly payload: S.Codec<A, I, never, never>;
|
|
120
120
|
}>;
|
|
121
121
|
}>, import("../../schema/index.js").CallableTaggedStruct<"Dismissed", {
|
|
122
|
-
entryId:
|
|
122
|
+
entryId: S.String;
|
|
123
123
|
}>, import("../../schema/index.js").CallableTaggedStruct<"DismissedAll", {}>, import("../../schema/index.js").CallableTaggedStruct<"ElapsedDuration", {
|
|
124
|
-
entryId:
|
|
125
|
-
version:
|
|
124
|
+
entryId: S.String;
|
|
125
|
+
version: S.Number;
|
|
126
126
|
}>, import("../../schema/index.js").CallableTaggedStruct<"HoveredEntry", {
|
|
127
|
-
entryId:
|
|
127
|
+
entryId: S.String;
|
|
128
128
|
}>, import("../../schema/index.js").CallableTaggedStruct<"LeftEntry", {
|
|
129
|
-
entryId:
|
|
129
|
+
entryId: S.String;
|
|
130
130
|
}>, import("../../schema/index.js").CallableTaggedStruct<"GotAnimationMessage", {
|
|
131
|
-
entryId:
|
|
131
|
+
entryId: S.String;
|
|
132
132
|
message: S.Union<[import("../../schema/index.js").CallableTaggedStruct<"Showed", {}>, import("../../schema/index.js").CallableTaggedStruct<"Hid", {}>, import("../../schema/index.js").CallableTaggedStruct<"AdvancedAnimationFrame", {}>, import("../../schema/index.js").CallableTaggedStruct<"EndedAnimation", {}>]>;
|
|
133
133
|
}>]>;
|
|
134
134
|
/** Configuration for creating a toast container model. `defaultDuration` is
|
|
@@ -137,7 +137,7 @@ export declare const makeMessage: <A, I>(payloadSchema: S.Schema<A, I>) => S.Uni
|
|
|
137
137
|
* interpreted as milliseconds. */
|
|
138
138
|
export type InitConfig = Readonly<{
|
|
139
139
|
id: string;
|
|
140
|
-
defaultDuration?: Duration.
|
|
140
|
+
defaultDuration?: Duration.Input;
|
|
141
141
|
}>;
|
|
142
142
|
export declare const DEFAULT_DURATION: Duration.Duration;
|
|
143
143
|
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/ui/toast/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,QAAQ,CAAA;AAU9C;;;;kDAIkD;AAClD,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/ui/toast/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,QAAQ,CAAA;AAU9C;;;;kDAIkD;AAClD,eAAO,MAAM,OAAO,8DAAsD,CAAA;AAC1E,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAC,IAAI,CAAA;AAIzC,gFAAgF;AAChF,eAAO,MAAM,QAAQ,wGAOnB,CAAA;AACF,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAC,IAAI,CAAA;AAI3C;;;;;4BAK4B;AAC5B,eAAO,MAAM,SAAS,GAAI,CAAC,EAAE,CAAC,EAAE,eAAe,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;;;;;;;;;;;;EASxD,CAAA;AAIJ;;;;wCAIwC;AACxC,eAAO,MAAM,SAAS,GAAI,CAAC,EAAE,CAAC,EAAE,eAAe,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;;;;;;;;;;;;;;;;;EAMxD,CAAA;AAIJ;wEACwE;AACxE,eAAO,MAAM,SAAS;;EAAwC,CAAA;AAC9D,uEAAuE;AACvE,eAAO,MAAM,YAAY,0EAAoB,CAAA;AAC7C;;qBAEqB;AACrB,eAAO,MAAM,eAAe;;;EAG1B,CAAA;AACF;qCACqC;AACrC,eAAO,MAAM,YAAY;;EAA2C,CAAA;AACpE;sCACsC;AACtC,eAAO,MAAM,SAAS;;EAAwC,CAAA;AAC9D,wEAAwE;AACxE,eAAO,MAAM,mBAAmB;;;EAG9B,CAAA;AAEF,MAAM,MAAM,SAAS,GAAG,OAAO,SAAS,CAAC,IAAI,CAAA;AAC7C,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAC,IAAI,CAAA;AACnD,MAAM,MAAM,eAAe,GAAG,OAAO,eAAe,CAAC,IAAI,CAAA;AACzD,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAC,IAAI,CAAA;AACnD,MAAM,MAAM,SAAS,GAAG,OAAO,SAAS,CAAC,IAAI,CAAA;AAC7C,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAC,IAAI,CAAA;AAEjE;wDACwD;AACxD,eAAO,MAAM,SAAS,GAAI,CAAC,EAAE,CAAC,EAAE,eAAe,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;;;;;;;;;;;;;;EACX,CAAA;AAEjD,6EAA6E;AAC7E,eAAO,MAAM,WAAW,GAAI,CAAC,EAAE,CAAC,EAAE,eAAe,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;IAS1D,CAAA;AAIJ;;;mCAGmC;AACnC,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,eAAe,CAAC,EAAE,QAAQ,CAAC,KAAK,CAAA;CACjC,CAAC,CAAA;AAEF,eAAO,MAAM,gBAAgB,mBAAsB,CAAA"}
|