@pixerate/editor-svelte 0.199.1 → 0.199.2

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.
@@ -90,6 +90,17 @@
90
90
  updateMetrics();
91
91
  }
92
92
  });
93
+
94
+ // A target can change size with no window or target event (a CSS variable
95
+ // written in an animation frame, a sidebar closing), which would leave the bar
96
+ // at the old left and width. Guarded because jsdom has no ResizeObserver.
97
+ $effect(() => {
98
+ const target = targetElement;
99
+ if (!target || typeof ResizeObserver === 'undefined') return;
100
+ const observer = new ResizeObserver(() => updateMetrics());
101
+ observer.observe(target);
102
+ return () => observer.disconnect();
103
+ });
93
104
  </script>
94
105
 
95
106
  {#if isVisible}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixerate/editor-svelte",
3
- "version": "0.199.1",
3
+ "version": "0.199.2",
4
4
  "description": "Svelte bindings and prompt/rich-text components for @pixerate/editor",
5
5
  "author": "Pixerate",
6
6
  "license": "MIT",