@yoamigo.com/core 0.4.4 → 0.4.5
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/index.js +23 -1
- package/dist/lib.js +23 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -753,8 +753,30 @@ var BuilderSelectionManager = class {
|
|
|
753
753
|
scale: 1,
|
|
754
754
|
logging: false,
|
|
755
755
|
useCORS: true,
|
|
756
|
-
backgroundColor: null
|
|
756
|
+
backgroundColor: null,
|
|
757
757
|
// Preserve transparency if any
|
|
758
|
+
windowHeight: document.body.scrollHeight,
|
|
759
|
+
// Full page height
|
|
760
|
+
height: document.body.scrollHeight,
|
|
761
|
+
// Full page height
|
|
762
|
+
scrollX: 0,
|
|
763
|
+
// Render from left (no visible scroll)
|
|
764
|
+
scrollY: 0,
|
|
765
|
+
// Render from top (no visible scroll)
|
|
766
|
+
onclone: async (clonedDoc) => {
|
|
767
|
+
clonedDoc.querySelectorAll('img[loading="lazy"]').forEach((img) => {
|
|
768
|
+
img.removeAttribute("loading");
|
|
769
|
+
});
|
|
770
|
+
await Promise.all(
|
|
771
|
+
Array.from(clonedDoc.querySelectorAll("img")).map(
|
|
772
|
+
(img) => img.complete && img.naturalHeight !== 0 ? Promise.resolve() : new Promise((r) => {
|
|
773
|
+
img.onload = r;
|
|
774
|
+
img.onerror = r;
|
|
775
|
+
})
|
|
776
|
+
)
|
|
777
|
+
);
|
|
778
|
+
await clonedDoc.fonts?.ready;
|
|
779
|
+
}
|
|
758
780
|
});
|
|
759
781
|
overlays.forEach((el) => {
|
|
760
782
|
;
|
package/dist/lib.js
CHANGED
|
@@ -712,8 +712,30 @@ var BuilderSelectionManager = class {
|
|
|
712
712
|
scale: 1,
|
|
713
713
|
logging: false,
|
|
714
714
|
useCORS: true,
|
|
715
|
-
backgroundColor: null
|
|
715
|
+
backgroundColor: null,
|
|
716
716
|
// Preserve transparency if any
|
|
717
|
+
windowHeight: document.body.scrollHeight,
|
|
718
|
+
// Full page height
|
|
719
|
+
height: document.body.scrollHeight,
|
|
720
|
+
// Full page height
|
|
721
|
+
scrollX: 0,
|
|
722
|
+
// Render from left (no visible scroll)
|
|
723
|
+
scrollY: 0,
|
|
724
|
+
// Render from top (no visible scroll)
|
|
725
|
+
onclone: async (clonedDoc) => {
|
|
726
|
+
clonedDoc.querySelectorAll('img[loading="lazy"]').forEach((img) => {
|
|
727
|
+
img.removeAttribute("loading");
|
|
728
|
+
});
|
|
729
|
+
await Promise.all(
|
|
730
|
+
Array.from(clonedDoc.querySelectorAll("img")).map(
|
|
731
|
+
(img) => img.complete && img.naturalHeight !== 0 ? Promise.resolve() : new Promise((r) => {
|
|
732
|
+
img.onload = r;
|
|
733
|
+
img.onerror = r;
|
|
734
|
+
})
|
|
735
|
+
)
|
|
736
|
+
);
|
|
737
|
+
await clonedDoc.fonts?.ready;
|
|
738
|
+
}
|
|
717
739
|
});
|
|
718
740
|
overlays.forEach((el) => {
|
|
719
741
|
;
|