web-push-notifications 3.68.0 → 3.70.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.
@@ -11,6 +11,7 @@ export declare class WebPopupsWidget implements IWebPopupsPublicApi {
11
11
  private visible;
12
12
  private drainTimeoutId;
13
13
  private autoShowEnabled;
14
+ private colorScheme;
14
15
  private isNavigationSubscribed;
15
16
  private openPopupsCount;
16
17
  private bodyOverflowBeforeLock;
@@ -1,4 +1,4 @@
1
- import { type WebPopupChoiceSubmitHandler, type WebPopupParams, type WebPopupRatingSubmitHandler } from 'smart-blocks-utils';
1
+ import { type WebPopupChoiceSubmitHandler, type WebPopupColorSchemePref, type WebPopupParams, type WebPopupRatingSubmitHandler } from 'smart-blocks-utils';
2
2
  /** The device-API handlers, passed in rather than imported: this module renders, it doesn't know the core. */
3
3
  export type WebPopupSubmitHandlers = {
4
4
  onSubmitChoice: WebPopupChoiceSubmitHandler;
@@ -11,7 +11,7 @@ export type WebPopupSubmitHandlers = {
11
11
  * field), which is deliberately unrenderable.
12
12
  */
13
13
  export declare const parseWebPopupContent: (json: string) => WebPopupParams | null;
14
- export declare const renderWebPopup: (container: HTMLElement, params: WebPopupParams, onRequestClose: () => void, handlers: WebPopupSubmitHandlers) => void;
14
+ export declare const renderWebPopup: (container: HTMLElement, params: WebPopupParams, onRequestClose: () => void, handlers: WebPopupSubmitHandlers, colorScheme?: WebPopupColorSchemePref) => void;
15
15
  /**
16
16
  * Unmount a popup rendered by `renderWebPopup`. Dropping the host element alone
17
17
  * leaves the tree mounted on a detached node, so component cleanup never runs —
@@ -1,6 +1,13 @@
1
- import { type WebPopupParams } from 'smart-blocks-utils';
1
+ import { type WebPopupColorSchemePref, type WebPopupParams } from 'smart-blocks-utils';
2
2
  export type IWebPopupsConfig = {
3
- enable: boolean;
3
+ /**
4
+ * `false` turns the widget off entirely: the bundle is never loaded. Defaults
5
+ * to `true`, so web popups run unless the site opts out.
6
+ */
7
+ enable?: boolean;
8
+ /** Which palette a dark-mode popup renders with; 'auto' (default) = the
9
+ * visitor's OS setting, which a site with its own theme can override here. */
10
+ colorScheme?: WebPopupColorSchemePref;
4
11
  /**
5
12
  * `false` turns off automatic display entirely: the SDK still loads the
6
13
  * popups but never shows one by itself, leaving the site to drive everything