@nypl/web-reader 0.2.0-alpha.8 → 0.2.0-alpha.9
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/cjs/ServiceWorker/sw.js +1 -1
- package/dist/cjs/ServiceWorker/sw.js.map +2 -2
- package/dist/cjs/index.js +27 -27
- package/dist/cjs/index.js.map +2 -2
- package/dist/esm/ServiceWorker/sw.js +66 -0
- package/dist/esm/ServiceWorker/sw.js.map +2 -2
- package/dist/esm/index.js +8 -39
- package/dist/esm/index.js.map +2 -2
- package/dist/types/ServiceWorker/client.d.ts +3 -6
- package/dist/types/ServiceWorker/constants.d.ts +1 -0
- package/dist/types/ServiceWorker/types.d.ts +9 -0
- package/package.json +1 -1
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
manifestUrl: string;
|
|
3
|
-
proxyUrl?: string;
|
|
4
|
-
};
|
|
1
|
+
import { PublicationConfig } from './types';
|
|
5
2
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
3
|
+
* Sends a message to the SW to fetch and cache publication resources
|
|
4
|
+
* in a separate thread.
|
|
8
5
|
*/
|
|
9
6
|
export default function usePublicationSW(publications: PublicationConfig[]): void;
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
import { PRECACHE_PUBLICATIONS } from './constants';
|
|
1
2
|
export declare type WebReaderSWConfig = {
|
|
2
3
|
cacheExpirationSeconds?: number;
|
|
3
4
|
};
|
|
5
|
+
export declare type PublicationConfig = {
|
|
6
|
+
manifestUrl: string;
|
|
7
|
+
proxyUrl?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare type PrecachePublicationsMessage = {
|
|
10
|
+
type: typeof PRECACHE_PUBLICATIONS;
|
|
11
|
+
publications: PublicationConfig[];
|
|
12
|
+
};
|
package/package.json
CHANGED