web-push-notifications 3.87.0 → 3.89.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.
@@ -0,0 +1,26 @@
1
+ import { type ISubscriptionWidgetPublicApi } from './types';
2
+ import { type Pushwoosh } from '../../core/Pushwoosh';
3
+ /** The unified subscription widget: launcher bell + prompt, configured by `subscriptionWidget`. */
4
+ export declare class PWSubscriptionWidget implements ISubscriptionWidgetPublicApi {
5
+ private readonly pw;
6
+ private readonly config;
7
+ private permission;
8
+ private open;
9
+ private busy;
10
+ private container;
11
+ private autoShowTimer;
12
+ constructor(pw: Pushwoosh);
13
+ run(): Promise<void>;
14
+ show(): void;
15
+ hide(): void;
16
+ toggle(isShown?: boolean): void;
17
+ isVisible(): boolean;
18
+ private readPermission;
19
+ private mount;
20
+ private render;
21
+ private scheduleAutoShow;
22
+ private accept;
23
+ private decline;
24
+ private listenSubscriptionChanges;
25
+ private cancelAutoShow;
26
+ }
@@ -0,0 +1,3 @@
1
+ import { type SubscriptionWidgetReaderProps } from '@pushwoosh/websdk-common/subscription-widget';
2
+ export declare const renderSubscriptionWidget: (container: HTMLElement, props: SubscriptionWidgetReaderProps) => void;
3
+ export declare const unmountSubscriptionWidget: (container: HTMLElement) => void;
@@ -0,0 +1,14 @@
1
+ import { type SubscriptionWidgetConfig } from '@pushwoosh/websdk-common/subscription-widget';
2
+ type DeepPartial<T> = {
3
+ [K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K];
4
+ };
5
+ /** `subscriptionWidget` init param: any subset of the widget config, the rest takes the defaults. */
6
+ export type ISubscriptionWidgetParams = DeepPartial<SubscriptionWidgetConfig>;
7
+ /** Published as `Pushwoosh.moduleRegistry.subscriptionWidget` once the widget bundle has loaded. */
8
+ export interface ISubscriptionWidgetPublicApi {
9
+ show(): void;
10
+ hide(): void;
11
+ toggle(isShown?: boolean): void;
12
+ isVisible(): boolean;
13
+ }
14
+ export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};