@widgetic/editor 4.0.5 → 4.0.6

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.
@@ -282,7 +282,7 @@
282
282
  iframeEl.style.height = '';
283
283
  }
284
284
 
285
- /** Fill the available preview stage (e.g. desktop modal) */
285
+ /** Fill the available preview stage (e.g. desktop modal) and re-center. */
286
286
  export function fitToContainer(): void {
287
287
  const attemptFit = (attemptsLeft: number) => {
288
288
  const stageEl = resizeStageEl ?? contentContainerEl;
@@ -296,7 +296,11 @@
296
296
  resizeWidth = limits.maxWidth;
297
297
  resizeHeight = limits.maxHeight;
298
298
  dispatch('resize', { width: limits.maxWidth, height: limits.maxHeight });
299
- requestAnimationFrame(() => nudgeIframePaint());
299
+ previewPositionReady = false;
300
+ requestAnimationFrame(() => {
301
+ resetPreviewPosition();
302
+ nudgeIframePaint();
303
+ });
300
304
  };
301
305
  attemptFit(24);
302
306
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widgetic/editor",
3
- "version": "4.0.5",
3
+ "version": "4.0.6",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -116,7 +116,6 @@
116
116
  "dotenv": "^16.4.5",
117
117
  "fontfaceobserver": "^2.3.0",
118
118
  "lowlight": "^3.1.0",
119
- "lucide-svelte": "^0.546.0",
120
119
  "svelte": "^5.27.0",
121
120
  "svelte-awesome-color-picker": "^3.1.4",
122
121
  "svelte-color-select": "^0.0.14",