import { Duration, Schema as S } from 'effect'; /** Semantic category of a toast. Drives the default ARIA role: `status` for * `Info` / `Success`, `alert` for `Warning` / `Error`. Also surfaced as * `data-variant` on each entry for per-variant CSS. This is the only * content-adjacent field the component owns. The rest of the entry's * content lives in the user-provided payload. */ export declare const Variant: S.Literals; export type Variant = typeof Variant.Type; /** Where the toast viewport is anchored on the screen and how entries stack. */ export declare const Position: S.Literals; export type Position = typeof Position.Type; /** Schema factory for a single toast entry. `payloadSchema` is user-provided * and defines the shape of per-entry content, whatever the consumer wants * to encode. The component itself owns only lifecycle + a11y fields: `id`, * `variant` (for ARIA role), `animation`, `maybeDuration`, * `pendingDismissVersion` (for cancellable auto-dismiss), and `isHovered` * (for pause-on-hover). */ export declare const makeEntry: (payloadSchema: S.Codec) => S.Struct<{ readonly id: S.String; readonly variant: S.Literals; readonly animation: S.Struct<{ readonly id: S.String; readonly isShowing: S.Boolean; readonly transitionState: S.Literals; }>; readonly maybeDuration: S.Option; readonly pendingDismissVersion: S.Number; readonly isHovered: S.Boolean; readonly payload: S.Codec; }>; /** Schema factory for the toast container's state. `nextEntryKey` is a * monotonic counter used to generate unique entry IDs purely from Model * state. Thread the updated model through successive `show()` calls. * Calling `show()` twice against the same pre-update model in the same tick * will produce duplicate entry IDs. */ export declare const makeModel: (payloadSchema: S.Codec) => S.Struct<{ readonly id: S.String; readonly defaultDuration: S.DurationFromMillis; readonly entries: S.$Array; readonly animation: S.Struct<{ readonly id: S.String; readonly isShowing: S.Boolean; readonly transitionState: S.Literals; }>; readonly maybeDuration: S.Option; readonly pendingDismissVersion: S.Number; readonly isHovered: S.Boolean; readonly payload: S.Codec; }>>; readonly nextEntryKey: S.Number; }>; /** Payload-independent Message variants shared by every bound Toast module. */ export declare const Message: import("foldkit/message").MessageUnion<{ readonly Dismissed: { readonly entryId: S.String; }; readonly DismissedAll: {}; readonly CompletedWaitBeforeDismissal: { readonly entryId: S.String; readonly version: S.Number; }; readonly HoveredEntry: { readonly entryId: S.String; }; readonly LeftEntry: { readonly entryId: S.String; }; readonly GotAnimationMessage: { readonly entryId: S.String; readonly message: import("foldkit/message").MessageUnion<{ readonly Showed: {}; readonly Hid: {}; readonly CompletedWaitForPaint: {}; readonly EndedAnimation: {}; }>; }; }>; export type Dismissed = typeof Message.Dismissed.Type; export type DismissedAll = typeof Message.DismissedAll.Type; export type CompletedWaitBeforeDismissal = typeof Message.CompletedWaitBeforeDismissal.Type; export type HoveredEntry = typeof Message.HoveredEntry.Type; export type LeftEntry = typeof Message.LeftEntry.Type; export type GotAnimationMessage = typeof Message.GotAnimationMessage.Type; /** Factory for the union of all messages the toast component can produce. */ export declare const makeMessage: (payloadSchema: S.Codec) => import("foldkit/message").MessageUnion<{ readonly Added: { readonly entry: S.Struct<{ readonly id: S.String; readonly variant: S.Literals; readonly animation: S.Struct<{ readonly id: S.String; readonly isShowing: S.Boolean; readonly transitionState: S.Literals; }>; readonly maybeDuration: S.Option; readonly pendingDismissVersion: S.Number; readonly isHovered: S.Boolean; readonly payload: S.Codec; }>; }; readonly Dismissed: { readonly entryId: S.String; }; readonly DismissedAll: {}; readonly CompletedWaitBeforeDismissal: { readonly entryId: S.String; readonly version: S.Number; }; readonly HoveredEntry: { readonly entryId: S.String; }; readonly LeftEntry: { readonly entryId: S.String; }; readonly GotAnimationMessage: { readonly entryId: S.String; readonly message: import("foldkit/message").MessageUnion<{ readonly Showed: {}; readonly Hid: {}; readonly CompletedWaitForPaint: {}; readonly EndedAnimation: {}; }>; }; }>; /** Factory for the union of out-messages the toast component can produce. */ export declare const makeOutMessage: (payloadSchema: S.Codec) => import("foldkit/message").MessageUnion<{ readonly DismissedToast: { readonly payload: S.Codec; }; }>; /** Configuration for creating a toast container model. `defaultDuration` is * applied to any `show()` call that doesn't provide its own `duration` or * pass `sticky: true`. Accepts any Effect Duration input; a bare number is * interpreted as milliseconds. */ export type InitConfig = Readonly<{ id: string; defaultDuration?: Duration.Input; }>; export declare const DEFAULT_DURATION: Duration.Duration; //# sourceMappingURL=schema.d.ts.map