@serwist/window 9.5.6 → 9.5.8

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.
@@ -1,14 +0,0 @@
1
- /**
2
- * Sends a data object to a service worker via `postMessage` and resolves with
3
- * a response (if any).
4
- *
5
- * A response can be sent by calling `event.ports[0].postMessage(...)`, which will
6
- * resolve the promise returned by `messageSW()`. If no response is sent, the promise
7
- * will never resolve.
8
- *
9
- * @param sw The service worker to send the message to.
10
- * @param data An object to send to the service worker.
11
- * @returns
12
- */
13
- export declare const messageSW: (sw: ServiceWorker, data: any) => Promise<any>;
14
- //# sourceMappingURL=messageSW.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"messageSW.d.ts","sourceRoot":"","sources":["../src/messageSW.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,SAAS,GAAI,IAAI,aAAa,EAAE,MAAM,GAAG,KAAG,OAAO,CAAC,GAAG,CAQnE,CAAC"}
@@ -1,39 +0,0 @@
1
- import type { SerwistEventTarget } from "./SerwistEventTarget.js";
2
- /**
3
- * A minimal `Event` subclass shim.
4
- * This doesn't *actually* subclass `Event` because not all browsers support
5
- * constructable `EventTarget`, and using a real `Event` will error.
6
- * @private
7
- */
8
- export declare class SerwistEvent<K extends keyof SerwistEventMap> {
9
- type: K;
10
- target?: SerwistEventTarget;
11
- sw?: ServiceWorker;
12
- originalEvent?: Event;
13
- isExternal?: boolean;
14
- constructor(type: K, props: Omit<SerwistEventMap[K], "target" | "type">);
15
- }
16
- export interface SerwistMessageEvent extends SerwistEvent<"message"> {
17
- data: any;
18
- originalEvent: Event;
19
- ports: readonly MessagePort[];
20
- }
21
- export interface SerwistLifecycleEvent extends SerwistEvent<keyof SerwistLifecycleEventMap> {
22
- isUpdate?: boolean;
23
- }
24
- export interface SerwistLifecycleWaitingEvent extends SerwistLifecycleEvent {
25
- wasWaitingBeforeRegister?: boolean;
26
- }
27
- export interface SerwistLifecycleEventMap {
28
- installing: SerwistLifecycleEvent;
29
- installed: SerwistLifecycleEvent;
30
- waiting: SerwistLifecycleWaitingEvent;
31
- activating: SerwistLifecycleEvent;
32
- activated: SerwistLifecycleEvent;
33
- controlling: SerwistLifecycleEvent;
34
- redundant: SerwistLifecycleEvent;
35
- }
36
- export interface SerwistEventMap extends SerwistLifecycleEventMap {
37
- message: SerwistMessageEvent;
38
- }
39
- //# sourceMappingURL=SerwistEvent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SerwistEvent.d.ts","sourceRoot":"","sources":["../../src/utils/SerwistEvent.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE;;;;;GAKG;AACH,qBAAa,YAAY,CAAC,CAAC,SAAS,MAAM,eAAe;IAO9C,IAAI,EAAE,CAAC;IANhB,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,EAAE,CAAC,EAAE,aAAa,CAAC;IACnB,aAAa,CAAC,EAAE,KAAK,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;gBAGZ,IAAI,EAAE,CAAC,EACd,KAAK,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;CAIrD;AAED,MAAM,WAAW,mBAAoB,SAAQ,YAAY,CAAC,SAAS,CAAC;IAClE,IAAI,EAAE,GAAG,CAAC;IACV,aAAa,EAAE,KAAK,CAAC;IACrB,KAAK,EAAE,SAAS,WAAW,EAAE,CAAC;CAC/B;AAED,MAAM,WAAW,qBAAsB,SAAQ,YAAY,CAAC,MAAM,wBAAwB,CAAC;IACzF,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,4BAA6B,SAAQ,qBAAqB;IACzE,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACpC;AAED,MAAM,WAAW,wBAAwB;IACvC,UAAU,EAAE,qBAAqB,CAAC;IAClC,SAAS,EAAE,qBAAqB,CAAC;IACjC,OAAO,EAAE,4BAA4B,CAAC;IACtC,UAAU,EAAE,qBAAqB,CAAC;IAClC,SAAS,EAAE,qBAAqB,CAAC;IACjC,WAAW,EAAE,qBAAqB,CAAC;IACnC,SAAS,EAAE,qBAAqB,CAAC;CAClC;AAED,MAAM,WAAW,eAAgB,SAAQ,wBAAwB;IAC/D,OAAO,EAAE,mBAAmB,CAAC;CAC9B"}
@@ -1,38 +0,0 @@
1
- import type { SerwistEvent, SerwistEventMap } from "./SerwistEvent.js";
2
- export type ListenerCallback = (event: SerwistEvent<any>) => any;
3
- /**
4
- * A minimal `EventTarget` shim.
5
- * This is necessary because not all browsers support constructable
6
- * `EventTarget`, so using a real `EventTarget` will error.
7
- * @private
8
- */
9
- export declare class SerwistEventTarget {
10
- private readonly _eventListenerRegistry;
11
- /**
12
- * @param type
13
- * @param listener
14
- * @private
15
- */
16
- addEventListener<K extends keyof SerwistEventMap>(type: K, listener: (event: SerwistEventMap[K]) => any): void;
17
- /**
18
- * @param type
19
- * @param listener
20
- * @private
21
- */
22
- removeEventListener<K extends keyof SerwistEventMap>(type: K, listener: (event: SerwistEventMap[K]) => any): void;
23
- /**
24
- * @param event
25
- * @private
26
- */
27
- dispatchEvent(event: SerwistEvent<any>): void;
28
- /**
29
- * Returns a Set of listeners associated with the passed event type.
30
- * If no handlers have been registered, an empty Set is returned.
31
- *
32
- * @param type The event type.
33
- * @returns An array of handler functions.
34
- * @private
35
- */
36
- private _getEventListenersByType;
37
- }
38
- //# sourceMappingURL=SerwistEventTarget.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SerwistEventTarget.d.ts","sourceRoot":"","sources":["../../src/utils/SerwistEventTarget.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEvE,MAAM,MAAM,gBAAgB,GAAG,CAAC,KAAK,EAAE,YAAY,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC;AAEjE;;;;;GAKG;AACH,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAgE;IAEvG;;;;OAIG;IACH,gBAAgB,CAAC,CAAC,SAAS,MAAM,eAAe,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,KAAK,GAAG,GAAG,IAAI;IAK9G;;;;OAIG;IACH,mBAAmB,CAAC,CAAC,SAAS,MAAM,eAAe,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,KAAK,GAAG,GAAG,IAAI;IAIjH;;;OAGG;IACH,aAAa,CAAC,KAAK,EAAE,YAAY,CAAC,GAAG,CAAC,GAAG,IAAI;IAS7C;;;;;;;OAOG;IACH,OAAO,CAAC,wBAAwB;CAMjC"}
@@ -1,2 +0,0 @@
1
- export declare const isCurrentPageOutOfScope: (scope: string) => boolean;
2
- //# sourceMappingURL=isCurrentPageOutOfScope.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"isCurrentPageOutOfScope.d.ts","sourceRoot":"","sources":["../../src/utils/isCurrentPageOutOfScope.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,GAAI,OAAO,MAAM,YAIpD,CAAC"}
@@ -1,11 +0,0 @@
1
- /**
2
- * Returns true if two URLs have the same `.href` property. The URLs can be
3
- * relative, and if they are the current location href is used to resolve URLs.
4
- *
5
- * @private
6
- * @param url1
7
- * @param url2
8
- * @returns
9
- */
10
- export declare function urlsMatch(url1: string, url2: string): boolean;
11
- //# sourceMappingURL=urlsMatch.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"urlsMatch.d.ts","sourceRoot":"","sources":["../../src/utils/urlsMatch.ts"],"names":[],"mappings":"AAQA;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAG7D"}