@orion-studios/payload-studio 0.6.0-beta.149 → 0.6.0-beta.150

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.
@@ -789,6 +789,19 @@ var lockPreviewChildren = (component) => {
789
789
  lockPreviewChildren(child);
790
790
  });
791
791
  };
792
+ var refreshProjectPreviewLayout = (editor) => {
793
+ const refresh = () => {
794
+ editor.refresh?.();
795
+ editor.Canvas?.refresh?.();
796
+ };
797
+ queueMicrotask(refresh);
798
+ if (typeof window !== "undefined") {
799
+ window.requestAnimationFrame(() => {
800
+ refresh();
801
+ window.requestAnimationFrame(refresh);
802
+ });
803
+ }
804
+ };
792
805
  var parseJsonArray = (value) => {
793
806
  const decoded = decodeHtmlAttribute2(value);
794
807
  if (!decoded) {
@@ -1156,6 +1169,7 @@ var registerProjectDynamicComponents = (editor, adapter) => {
1156
1169
  lockPreviewChildren(this.model);
1157
1170
  });
1158
1171
  queueMicrotask(() => bindEditablePreview(this, editor));
1172
+ refreshProjectPreviewLayout(editor);
1159
1173
  }
1160
1174
  }
1161
1175
  });
@@ -665,6 +665,19 @@ var lockPreviewChildren = (component) => {
665
665
  lockPreviewChildren(child);
666
666
  });
667
667
  };
668
+ var refreshProjectPreviewLayout = (editor) => {
669
+ const refresh = () => {
670
+ editor.refresh?.();
671
+ editor.Canvas?.refresh?.();
672
+ };
673
+ queueMicrotask(refresh);
674
+ if (typeof window !== "undefined") {
675
+ window.requestAnimationFrame(() => {
676
+ refresh();
677
+ window.requestAnimationFrame(refresh);
678
+ });
679
+ }
680
+ };
668
681
  var parseJsonArray = (value) => {
669
682
  const decoded = decodeHtmlAttribute2(value);
670
683
  if (!decoded) {
@@ -1032,6 +1045,7 @@ var registerProjectDynamicComponents = (editor, adapter) => {
1032
1045
  lockPreviewChildren(this.model);
1033
1046
  });
1034
1047
  queueMicrotask(() => bindEditablePreview(this, editor));
1048
+ refreshProjectPreviewLayout(editor);
1035
1049
  }
1036
1050
  }
1037
1051
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orion-studios/payload-studio",
3
- "version": "0.6.0-beta.149",
3
+ "version": "0.6.0-beta.150",
4
4
  "description": "Base CMS, builder, and custom admin toolkit for Orion Studios websites",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",