@truenas/ui-components 0.7.12 → 0.7.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truenas/ui-components",
3
- "version": "0.7.12",
3
+ "version": "0.7.14",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org",
6
6
  "access": "public"
@@ -8463,8 +8463,22 @@ interface SpriteConfig {
8463
8463
  */
8464
8464
  declare class TnSpriteLoaderService {
8465
8465
  private spriteConfig?;
8466
- private spriteLoaded;
8467
8466
  private spriteLoadPromise?;
8467
+ /**
8468
+ * A signal rather than a plain field, because the fetch below starts from the
8469
+ * constructor and lands whenever it lands: anything that resolves an icon
8470
+ * before it does gets a miss, and needs to be told when to ask again (#341).
8471
+ */
8472
+ private readonly spriteLoadedState;
8473
+ /**
8474
+ * Whether the sprite config has loaded, as a signal — read it inside a
8475
+ * `computed`/`effect` to re-resolve when the sprite arrives.
8476
+ *
8477
+ * `isSpriteLoaded()` reads the same state, so a caller that just wants the
8478
+ * current value needs nothing from here; this is for a caller that wants to
8479
+ * react to it changing.
8480
+ */
8481
+ readonly spriteLoaded: Signal<boolean>;
8468
8482
  private http;
8469
8483
  private sanitizer;
8470
8484
  constructor();
@@ -8493,7 +8507,11 @@ declare class TnSpriteLoaderService {
8493
8507
  */
8494
8508
  getSafeIconUrl(iconName: string): SafeResourceUrl | null;
8495
8509
  /**
8496
- * Check if the sprite is loaded
8510
+ * Check if the sprite is loaded.
8511
+ *
8512
+ * Reads the `spriteLoaded` signal, so a call made from inside a `computed` or
8513
+ * an `effect` is tracked and that consumer re-runs when the sprite arrives —
8514
+ * which is how an icon resolved too early gets a second chance (#341).
8497
8515
  */
8498
8516
  isSpriteLoaded(): boolean;
8499
8517
  /**