@ohhwells/bridge 0.1.73 → 0.1.74
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.cjs +9 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -13546,6 +13546,7 @@ import { Link as Link2, Plus as Plus4, Settings } from "lucide-react";
|
|
|
13546
13546
|
import { Fragment as Fragment8, jsx as jsx33, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
13547
13547
|
var PRIMARY3 = "#0885FE";
|
|
13548
13548
|
var IMAGE_FADE_MS = 300;
|
|
13549
|
+
var MEDIA_SETTLE_TIMEOUT_MS = 2500;
|
|
13549
13550
|
function runOpacityFade(el, onDone) {
|
|
13550
13551
|
const anim = el.animate([{ opacity: 0 }, { opacity: 1 }], {
|
|
13551
13552
|
duration: IMAGE_FADE_MS,
|
|
@@ -16468,6 +16469,7 @@ function OhhwellsBridge() {
|
|
|
16468
16469
|
const img = el instanceof HTMLImageElement ? el : el.querySelector("img");
|
|
16469
16470
|
if (img && img.src !== val) {
|
|
16470
16471
|
applyEditableImageSrc(img, val);
|
|
16472
|
+
img.loading = "eager";
|
|
16471
16473
|
imageLoads.push(new Promise((resolve) => {
|
|
16472
16474
|
img.onload = () => resolve();
|
|
16473
16475
|
img.onerror = () => resolve();
|
|
@@ -16510,8 +16512,12 @@ function OhhwellsBridge() {
|
|
|
16510
16512
|
initSectionInstancesFromContent(content, window.location.pathname);
|
|
16511
16513
|
sectionsLoadedRef.current = true;
|
|
16512
16514
|
pendingScheduleConfigRequests.current.splice(0).forEach(processConfigRequest);
|
|
16513
|
-
|
|
16514
|
-
|
|
16515
|
+
if (imageLoads.length === 0) return Promise.resolve();
|
|
16516
|
+
return Promise.race([
|
|
16517
|
+
Promise.all(imageLoads).then(() => {
|
|
16518
|
+
}),
|
|
16519
|
+
new Promise((resolve) => setTimeout(resolve, MEDIA_SETTLE_TIMEOUT_MS))
|
|
16520
|
+
]);
|
|
16515
16521
|
};
|
|
16516
16522
|
const cached = contentCache.get(subdomain);
|
|
16517
16523
|
if (cached) {
|
|
@@ -19525,7 +19531,7 @@ function OhhwellsBridge() {
|
|
|
19525
19531
|
postToParent2({
|
|
19526
19532
|
type: "ow:ready",
|
|
19527
19533
|
version: "1",
|
|
19528
|
-
bridgeVersion: "0.1.
|
|
19534
|
+
bridgeVersion: "0.1.74",
|
|
19529
19535
|
path: pathname,
|
|
19530
19536
|
nodes: collectEditableNodes(editContentRef.current),
|
|
19531
19537
|
sections
|