v-nuxt-ui 0.2.10 → 0.2.11

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/dist/module.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "dependencies": [
8
8
  "@nuxt/ui"
9
9
  ],
10
- "version": "0.2.10",
10
+ "version": "0.2.11",
11
11
  "builder": {
12
12
  "@nuxt/module-builder": "1.0.2",
13
13
  "unbuild": "3.6.1"
@@ -224,19 +224,21 @@ const flowContainer = ref(null);
224
224
  let resizeObserver = null;
225
225
  let prevWidth = 0;
226
226
  onMounted(() => {
227
- const el = flowContainer.value?.$el ?? flowContainer.value;
228
- if (!el) return;
229
- prevWidth = el.clientWidth;
230
- resizeObserver = new ResizeObserver((entries) => {
231
- const entry = entries[0];
232
- if (!entry) return;
233
- const newWidth = entry.contentRect.width;
234
- if (newWidth !== prevWidth) {
235
- prevWidth = newWidth;
236
- nextTick(() => vueFlowFitView({ padding: props.fitViewPadding }));
237
- }
238
- });
239
- resizeObserver.observe(el);
227
+ setTimeout(() => {
228
+ const el = flowContainer.value?.$el ?? flowContainer.value;
229
+ if (!el) return;
230
+ prevWidth = el.clientWidth;
231
+ resizeObserver = new ResizeObserver((entries) => {
232
+ const entry = entries[0];
233
+ if (!entry) return;
234
+ const newWidth = entry.contentRect.width;
235
+ if (newWidth !== prevWidth) {
236
+ prevWidth = newWidth;
237
+ nextTick(() => vueFlowFitView({ padding: props.fitViewPadding }));
238
+ }
239
+ });
240
+ resizeObserver.observe(el);
241
+ }, 200);
240
242
  });
241
243
  onBeforeUnmount(() => {
242
244
  resizeObserver?.disconnect();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "v-nuxt-ui",
3
- "version": "0.2.10",
3
+ "version": "0.2.11",
4
4
  "description": "Veken UI Component Library - Reusable Nuxt UI components, composables, and utilities for enterprise applications",
5
5
  "type": "module",
6
6
  "style": "./dist/runtime/index.css",