@serwist/navigation-preload 9.0.0-preview.1 → 9.0.0-preview.11
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.
- package/dist/disable.d.ts +1 -1
- package/dist/enable.d.ts +4 -5
- package/dist/enable.d.ts.map +1 -1
- package/dist/isSupported.d.ts +4 -2
- package/dist/isSupported.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/disable.ts +1 -1
- package/src/enable.ts +4 -5
- package/src/isSupported.ts +4 -2
package/dist/disable.d.ts
CHANGED
package/dist/enable.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* If the browser supports
|
|
2
|
+
* If the browser supports navigation preloading, then this will enable it.
|
|
3
3
|
*
|
|
4
|
-
* @param headerValue
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* sent to the server when making the navigation request.
|
|
4
|
+
* @param headerValue Optional. Allows developers to override the value of
|
|
5
|
+
* the `Service-Worker-Navigation-Preload` header which will be sent to the
|
|
6
|
+
* server when making the navigation request.
|
|
8
7
|
*/
|
|
9
8
|
export declare const enable: (headerValue?: string) => void;
|
|
10
9
|
//# sourceMappingURL=enable.d.ts.map
|
package/dist/enable.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enable.d.ts","sourceRoot":"","sources":["../src/enable.ts"],"names":[],"mappings":"AAeA
|
|
1
|
+
{"version":3,"file":"enable.d.ts","sourceRoot":"","sources":["../src/enable.ts"],"names":[],"mappings":"AAeA;;;;;;GAMG;AACH,eAAO,MAAM,MAAM,iBAAkB,MAAM,KAAG,IAqB7C,CAAC"}
|
package/dist/isSupported.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* navigation
|
|
2
|
+
* Checks whether the current browser supports
|
|
3
|
+
* navigation preloading.
|
|
4
|
+
*
|
|
5
|
+
* @returns
|
|
4
6
|
*/
|
|
5
7
|
export declare const isSupported: () => boolean;
|
|
6
8
|
//# sourceMappingURL=isSupported.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isSupported.d.ts","sourceRoot":"","sources":["../src/isSupported.ts"],"names":[],"mappings":"AAWA
|
|
1
|
+
{"version":3,"file":"isSupported.d.ts","sourceRoot":"","sources":["../src/isSupported.ts"],"names":[],"mappings":"AAWA;;;;;GAKG;AACH,eAAO,MAAM,WAAW,QAAO,OAE9B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serwist/navigation-preload",
|
|
3
|
-
"version": "9.0.0-preview.
|
|
3
|
+
"version": "9.0.0-preview.11",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "A module that allows developers to enable navigation preloading in their service worker.",
|
|
6
6
|
"files": [
|
|
7
7
|
"src",
|
|
8
8
|
"dist"
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
"./package.json": "./package.json"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@serwist/core": "9.0.0-preview.
|
|
32
|
+
"@serwist/core": "9.0.0-preview.11"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"rollup": "4.9.6",
|
|
36
|
-
"typescript": "5.4.0-dev.
|
|
37
|
-
"@serwist/constants": "9.0.0-preview.
|
|
36
|
+
"typescript": "5.4.0-dev.20240206",
|
|
37
|
+
"@serwist/constants": "9.0.0-preview.11"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"typescript": ">=5.0.0"
|
package/src/disable.ts
CHANGED
|
@@ -14,7 +14,7 @@ import { isSupported } from "./isSupported.js";
|
|
|
14
14
|
declare let self: ServiceWorkerGlobalScope;
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
* If the browser supports
|
|
17
|
+
* If the browser supports navigation preloading, then this will disable it.
|
|
18
18
|
*/
|
|
19
19
|
export const disable = (): void => {
|
|
20
20
|
if (isSupported()) {
|
package/src/enable.ts
CHANGED
|
@@ -14,12 +14,11 @@ import { isSupported } from "./isSupported.js";
|
|
|
14
14
|
declare let self: ServiceWorkerGlobalScope;
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
* If the browser supports
|
|
17
|
+
* If the browser supports navigation preloading, then this will enable it.
|
|
18
18
|
*
|
|
19
|
-
* @param headerValue
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* sent to the server when making the navigation request.
|
|
19
|
+
* @param headerValue Optional. Allows developers to override the value of
|
|
20
|
+
* the `Service-Worker-Navigation-Preload` header which will be sent to the
|
|
21
|
+
* server when making the navigation request.
|
|
23
22
|
*/
|
|
24
23
|
export const enable = (headerValue?: string): void => {
|
|
25
24
|
if (isSupported()) {
|
package/src/isSupported.ts
CHANGED
|
@@ -10,8 +10,10 @@
|
|
|
10
10
|
declare let self: ServiceWorkerGlobalScope;
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
14
|
-
* navigation
|
|
13
|
+
* Checks whether the current browser supports
|
|
14
|
+
* navigation preloading.
|
|
15
|
+
*
|
|
16
|
+
* @returns
|
|
15
17
|
*/
|
|
16
18
|
export const isSupported = (): boolean => {
|
|
17
19
|
return Boolean(self.registration?.navigationPreload);
|