@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
- // > Inherited methods
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
@@ -15,6 +15,7 @@ export default class NetworkLoader {
15
15
  });
16
16
  _state: LoadingStateMachine;
17
17
  state: string;
18
+ initial: boolean;
18
19
  loaded: boolean;
19
20
  /** @type {string|null} */
20
21
  _url: string | null;
@@ -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
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hkdigital/lib-sveltekit",
3
- "version": "0.0.89",
3
+ "version": "0.0.90",
4
4
  "author": "Jens Kleinhout, HKdigital (https://hkdigital.nl)",
5
5
  "license": "ISC",
6
6
  "repository": {