@joewinke/jatui 0.1.22 → 0.1.23

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": "@joewinke/jatui",
3
- "version": "0.1.22",
3
+ "version": "0.1.23",
4
4
  "private": false,
5
5
  "description": "Shared Svelte 5 component library for JAT projects",
6
6
  "type": "module",
@@ -121,9 +121,11 @@ export function collapse(node: HTMLElement, options: CollapseOptions = {}) {
121
121
  return {
122
122
  update(next: CollapseOptions = {}) {
123
123
  opts = { ...DEFAULTS, ...next };
124
- // expanded/threshold/fade may have changed — re-apply (and re-measure
125
- // in case threshold moved across the content height).
126
- applied = !applied; // force apply() to re-evaluate against new opts
124
+ // expanded/threshold/fade may have changed — re-measure and let
125
+ // apply() compare the freshly computed shouldCollapse against the
126
+ // real last-applied state. (Force-flipping `applied` here used to make
127
+ // that comparison spuriously match on a plain expand/collapse toggle,
128
+ // silently skipping the style update.)
127
129
  scheduleMeasure();
128
130
  },
129
131
  destroy() {