UNPKG

@namiml/web-sdk

Version:

Nami Web SDK makes subscriptions & in-app purchases easy, with powerful built-in paywalls and A/B testing

41 lines (40 loc) 1.32 kB
export declare const NamiAnimationType: { readonly Wave: "wave"; readonly Pulse: "pulse"; readonly None: "none"; }; export type NamiAnimationType = typeof NamiAnimationType[keyof typeof NamiAnimationType]; export type PulseSpec = typeof NamiAnimationType.Pulse | { type: typeof NamiAnimationType.Pulse; duration?: number; scale?: number; }; export type WaveSpec = typeof NamiAnimationType.Wave | { type: typeof NamiAnimationType.Wave; duration?: number; delay?: number; circle1Color?: string; circle2Color?: string; lineWidth?: number; }; export type NoneSpec = typeof NamiAnimationType.None | { type: typeof NamiAnimationType.None; }; export type NamiAnimationSpec = WaveSpec | PulseSpec | NoneSpec; export type NamiAnimationObjectSpec = Extract<WaveSpec, { type: typeof NamiAnimationType.Wave; }> | Extract<PulseSpec, { type: typeof NamiAnimationType.Pulse; }> | Extract<NoneSpec, { type: typeof NamiAnimationType.None; }>; export type Wave = Required<Extract<WaveSpec, { type: typeof NamiAnimationType.Wave; }>>; export type Pulse = Required<Extract<PulseSpec, { type: typeof NamiAnimationType.Pulse; }>>; export type None = Required<Extract<NoneSpec, { type: typeof NamiAnimationType.None; }>>; export type NamiAnimation = Wave | Pulse | None;