@human-kit/ui 1.5.2 → 1.5.3

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.
@@ -281,7 +281,9 @@
281
281
  }
282
282
 
283
283
  function setTriggerRef(element: HTMLElement | null) {
284
- if (triggerRef === element) return;
284
+ // The trigger calls this from an effect. A tracked read here made that effect depend on the
285
+ // ref it writes, and its cleanup and body then cleared and set it in a loop.
286
+ if (untrack(() => triggerRef) === element) return;
285
287
  triggerRef = element;
286
288
  }
287
289
 
@@ -426,7 +426,9 @@
426
426
  }
427
427
 
428
428
  function setTriggerRef(element: HTMLElement | null) {
429
- if (triggerRef === element) return;
429
+ // The trigger calls this from an effect. A tracked read here made that effect depend on the
430
+ // ref it writes, and its cleanup and body then cleared and set it in a loop.
431
+ if (untrack(() => triggerRef) === element) return;
430
432
  triggerRef = element;
431
433
  }
432
434
 
@@ -183,7 +183,9 @@
183
183
  }
184
184
 
185
185
  function setTriggerRef(element: HTMLElement | null) {
186
- if (triggerRef === element) return;
186
+ // The trigger calls this from an effect. A tracked read here made that effect depend on the
187
+ // ref it writes, and its cleanup and body then cleared and set it in a loop.
188
+ if (untrack(() => triggerRef) === element) return;
187
189
  triggerRef = element;
188
190
  }
189
191
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@human-kit/ui",
3
- "version": "1.5.2",
3
+ "version": "1.5.3",
4
4
  "description": "Accessible, typed UI components for Svelte 5 — shipped as native ESM with per-component subpath exports so bundlers only include what you import.",
5
5
  "license": "MIT",
6
6
  "author": "Agustin Delgado <agustindariodelgado@gmail.com>",