@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.
@@ -2,33 +2,34 @@ declare const _default: {};
2
2
  export default _default;
3
3
  export type CacheEntry = {
4
4
  /**
5
- * The cached response
5
+ * - Cached Response object
6
6
  */
7
7
  response: Response;
8
8
  /**
9
- * Cache metadata including expiration
9
+ * - Cache entry metadata
10
10
  */
11
11
  metadata: any;
12
12
  /**
13
- * The request URL
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
- * When the entry expires
21
+ * - Expiration timestamp (null if no expiration)
22
22
  */
23
23
  expires: number | null;
24
24
  /**
25
- * ETag for conditional requests
25
+ * - ETag header if present
26
26
  */
27
27
  etag: string | null;
28
28
  /**
29
- * Last-Modified for conditional requests
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 The cached response
5
- * @property {Object} metadata Cache metadata including expiration
6
- * @property {string} url The request URL
7
- * @property {number} timestamp When the entry was cached
8
- * @property {number|null} expires When the entry expires
9
- * @property {string|null} etag ETag for conditional requests
10
- * @property {string|null} lastModified Last-Modified for conditional requests
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}} configs
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: any, category: "base" | "ui" | "heading"): {
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}} configs
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hkdigital/lib-sveltekit",
3
- "version": "0.1.72",
3
+ "version": "0.1.74",
4
4
  "author": {
5
5
  "name": "HKdigital",
6
6
  "url": "https://hkdigital.nl"