ToastView.make
function · packages/mixins-ui/src/toastView.ts:112
function make<A, I>(payloadSchema: Schema.Codec<A, I>): { view: SubmodelView<{ readonly id: string; readonly defaultDuration: Duration; readonly entries: readonly { readonly id: string; readonly variant: "Info" | "Success" | "Warning" | "Error"; readonly animation: { readonly id: string; readonly isShowing: boolean; readonly transitionState: "Idle" | "EnterStart" | "EnterAnimating" | "LeaveStart" | "LeaveAnimating"; readonly transitionGeneration: number; }; readonly maybeDuration: Option.Option<Duration>; readonly pendingDismissVersion: number; readonly isHovered: boolean; readonly swipeState: { readonly _tag: "Idle"; } | { readonly _tag: "Dragging"; readonly pointerId: number; readonly startX: number; readonly currentX: number; } | { readonly _tag: "Settling"; readonly offsetX: number; } | { readonly _tag: "Dismissing"; readonly offsetX: number; readonly direction: "Left" | "Right"; }; readonly swipeVersion: number; readonly payload: A; }[]; readonly nextEntryKey: number; readonly maybeSwipeConfig: Option.Option<{ readonly direction: "Left" | "Right"; readonly threshold: number; }>; }, { readonly _tag: "GotAnimationMessage"; readonly entryId: string; readonly message: { readonly _tag: "Showed"; } | { readonly _tag: "Hid"; } | { readonly _tag: "CompletedWaitForPaint"; readonly generation: number; } | { readonly _tag: "EndedAnimation"; readonly generation: number; }; } | { readonly _tag: "Added"; readonly entry: { readonly id: string; readonly variant: "Info" | "Success" | "Warning" | "Error"; readonly animation: { readonly id: str …;Binds upstream's Toast.make for the payload and swaps in the forked
view: behavior is untouched, only markup assembly carries the seam.