@hkdigital/lib-sveltekit 0.0.89 → 0.0.90
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.
@@ -10,7 +10,14 @@ import {
|
|
10
10
|
* - The loading process can be monitored
|
11
11
|
*/
|
12
12
|
export default class ImageLoader extends NetworkLoader {
|
13
|
-
//
|
13
|
+
//
|
14
|
+
// /**
|
15
|
+
// * Construct ImageLoader
|
16
|
+
// *
|
17
|
+
// * @param {object} _
|
18
|
+
// * @param {string} _.url
|
19
|
+
// */
|
20
|
+
// constructor( { url } ) {}
|
14
21
|
//
|
15
22
|
// /**
|
16
23
|
// * Get object URL that can be used as src parameter of an HTML image
|
@@ -33,6 +33,10 @@ export default class NetworkLoader {
|
|
33
33
|
// @note this exported state is set by $effect's
|
34
34
|
state = $state(STATE_INITIAL);
|
35
35
|
|
36
|
+
initial = $derived.by(() => {
|
37
|
+
return this.state === STATE_INITIAL;
|
38
|
+
});
|
39
|
+
|
36
40
|
loaded = $derived.by(() => {
|
37
41
|
return this.state === STATE_LOADED;
|
38
42
|
});
|