@hkdigital/lib-sveltekit 0.1.72 → 0.1.74
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/classes/cache/IndexedDbCache.d.ts +78 -74
- package/dist/classes/cache/IndexedDbCache.js +1004 -300
- package/dist/classes/cache/typedef.d.ts +24 -7
- package/dist/classes/cache/typedef.js +23 -7
- package/dist/util/design-system/tailwind.d.ts +4 -2
- package/dist/util/design-system/tailwind.js +1 -1
- package/package.json +1 -1
@@ -2,33 +2,34 @@ declare const _default: {};
|
|
2
2
|
export default _default;
|
3
3
|
export type CacheEntry = {
|
4
4
|
/**
|
5
|
-
*
|
5
|
+
* - Cached Response object
|
6
6
|
*/
|
7
7
|
response: Response;
|
8
8
|
/**
|
9
|
-
* Cache metadata
|
9
|
+
* - Cache entry metadata
|
10
10
|
*/
|
11
11
|
metadata: any;
|
12
12
|
/**
|
13
|
-
*
|
13
|
+
* - Original URL
|
14
14
|
*/
|
15
15
|
url: string;
|
16
16
|
/**
|
17
|
-
* When the entry was cached
|
17
|
+
* - When the entry was cached
|
18
18
|
*/
|
19
19
|
timestamp: number;
|
20
20
|
/**
|
21
|
-
*
|
21
|
+
* - Expiration timestamp (null if no expiration)
|
22
22
|
*/
|
23
23
|
expires: number | null;
|
24
24
|
/**
|
25
|
-
* ETag
|
25
|
+
* - ETag header if present
|
26
26
|
*/
|
27
27
|
etag: string | null;
|
28
28
|
/**
|
29
|
-
* Last-Modified
|
29
|
+
* - Last-Modified header if present
|
30
30
|
*/
|
31
31
|
lastModified: string | null;
|
32
|
+
cacheVersion: string | null;
|
32
33
|
};
|
33
34
|
export type CacheStorage = {
|
34
35
|
/**
|
@@ -48,3 +49,19 @@ export type CacheStorage = {
|
|
48
49
|
*/
|
49
50
|
clear: () => Promise<void>;
|
50
51
|
};
|
52
|
+
export type IDBRequestEvent = {
|
53
|
+
/**
|
54
|
+
* - The request that generated the event
|
55
|
+
*/
|
56
|
+
target: IDBRequest;
|
57
|
+
};
|
58
|
+
export type IDBVersionChangeEvent = {
|
59
|
+
/**
|
60
|
+
* - The request that generated the event
|
61
|
+
*/
|
62
|
+
target: IDBOpenDBRequest;
|
63
|
+
/**
|
64
|
+
* - The transaction for database upgrade
|
65
|
+
*/
|
66
|
+
transaction?: IDBTransaction;
|
67
|
+
};
|
@@ -1,13 +1,14 @@
|
|
1
1
|
|
2
2
|
/**
|
3
3
|
* @typedef {Object} CacheEntry
|
4
|
-
* @property {Response} response
|
5
|
-
* @property {Object} metadata Cache metadata
|
6
|
-
* @property {string} url
|
7
|
-
* @property {number} timestamp When the entry was cached
|
8
|
-
* @property {number|null} expires
|
9
|
-
* @property {string|null} etag ETag
|
10
|
-
* @property {string|null} lastModified Last-Modified
|
4
|
+
* @property {Response} response - Cached Response object
|
5
|
+
* @property {Object} metadata - Cache entry metadata
|
6
|
+
* @property {string} url - Original URL
|
7
|
+
* @property {number} timestamp - When the entry was cached
|
8
|
+
* @property {number|null} expires - Expiration timestamp (null if no expiration)
|
9
|
+
* @property {string|null} etag - ETag header if present
|
10
|
+
* @property {string|null} lastModified - Last-Modified header if present
|
11
|
+
* @property {string|null} cacheVersion
|
11
12
|
*/
|
12
13
|
|
13
14
|
/**
|
@@ -22,4 +23,19 @@
|
|
22
23
|
* Clear all cached responses
|
23
24
|
*/
|
24
25
|
|
26
|
+
// > IndexedDB
|
27
|
+
|
28
|
+
/**
|
29
|
+
* @typedef {Object} IDBRequestEvent
|
30
|
+
* @property {IDBRequest} target - The request that generated the event
|
31
|
+
*/
|
32
|
+
|
33
|
+
/**
|
34
|
+
* @typedef {Object} IDBVersionChangeEvent
|
35
|
+
* @property {IDBOpenDBRequest} target - The request that generated the event
|
36
|
+
* @property {IDBTransaction} [target.transaction] - The transaction for database upgrade
|
37
|
+
*/
|
38
|
+
|
39
|
+
// > Export default
|
40
|
+
|
25
41
|
export default {};
|
@@ -65,7 +65,7 @@ export function generateViewportBasedSpacing(values: number[]): {
|
|
65
65
|
* (base, UI, or heading). Each style includes a scaled font size and
|
66
66
|
* line height.
|
67
67
|
*
|
68
|
-
* @param {{[key: string]: TextStyleSizes}}
|
68
|
+
* @param {{[key: string]: TextStyleSizes}} sizes
|
69
69
|
* Set of text sizes to generate styles for
|
70
70
|
*
|
71
71
|
* @param {'base' | 'ui' | 'heading'} category
|
@@ -94,7 +94,9 @@ export function generateViewportBasedSpacing(values: number[]): {
|
|
94
94
|
* // ['calc(24px * var(--scale-text-base))', { lineHeight: 1.4 }]
|
95
95
|
* // }
|
96
96
|
*/
|
97
|
-
export function generateTextStyles(sizes:
|
97
|
+
export function generateTextStyles(sizes: {
|
98
|
+
[key: string]: TextStyleSizes;
|
99
|
+
}, category: "base" | "ui" | "heading"): {
|
98
100
|
[key: string]: [string, {
|
99
101
|
lineHeight: number;
|
100
102
|
}];
|
@@ -105,7 +105,7 @@ export function generateViewportBasedSpacing(values) {
|
|
105
105
|
* (base, UI, or heading). Each style includes a scaled font size and
|
106
106
|
* line height.
|
107
107
|
*
|
108
|
-
* @param {{[key: string]: TextStyleSizes}}
|
108
|
+
* @param {{[key: string]: TextStyleSizes}} sizes
|
109
109
|
* Set of text sizes to generate styles for
|
110
110
|
*
|
111
111
|
* @param {'base' | 'ui' | 'heading'} category
|