@ohhwells/bridge 0.1.177 → 0.1.178

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 CHANGED
@@ -840,6 +840,11 @@ function findImages(deps, section) {
840
840
  if (url && style.objectFit === "cover") out.push({ el, url, urlLayer: -1 });
841
841
  continue;
842
842
  }
843
+ if (el.tagName === "VIDEO") {
844
+ const url = el.poster;
845
+ if (url && style.objectFit === "cover") out.push({ el, url, urlLayer: -1 });
846
+ continue;
847
+ }
843
848
  const layers = bgLayers(style);
844
849
  const urlLayer = layers.findIndex((l) => urlOf(l) !== null);
845
850
  if (urlLayer >= 0) out.push({ el, url: urlOf(layers[urlLayer]), urlLayer });
@@ -1412,13 +1417,14 @@ var WATCHED_ATTRS = [
1412
1417
  "class",
1413
1418
  "src",
1414
1419
  "srcset",
1420
+ "poster",
1415
1421
  "data-ohw-style-bg",
1416
1422
  "data-ohw-style-bgcolor",
1417
1423
  "data-ohw-style-cardbg",
1418
1424
  // The editor's Default / Hover toggle forces :hover rules through this attribute.
1419
1425
  "data-ohw-active-state"
1420
1426
  ];
1421
- var VISIBILITY_TRANSITIONS = /* @__PURE__ */ new Set(["opacity", "visibility"]);
1427
+ var RESCAN_TRANSITIONS = /* @__PURE__ */ new Set(["opacity", "visibility", "background-color", "background"]);
1422
1428
  function outermostSection(node) {
1423
1429
  let el = node instanceof Element ? node : node?.parentElement ?? null;
1424
1430
  let top = null;
@@ -1483,7 +1489,7 @@ function mountBackgroundTone(doc = document) {
1483
1489
  });
1484
1490
  const onResize = () => schedule();
1485
1491
  const onTransitionEnd = (event) => {
1486
- if (!VISIBILITY_TRANSITIONS.has(event.propertyName)) return;
1492
+ if (!RESCAN_TRANSITIONS.has(event.propertyName)) return;
1487
1493
  const section = outermostSection(event.target);
1488
1494
  if (section) schedule(section);
1489
1495
  };
@@ -19202,7 +19208,7 @@ function apiBase() {
19202
19208
  function bridgeVersion() {
19203
19209
  try {
19204
19210
  if (true) {
19205
- return "0.1.177";
19211
+ return "0.1.178";
19206
19212
  }
19207
19213
  } catch {
19208
19214
  }
@@ -19216,7 +19222,7 @@ function stampBridgeVersionOnDocument() {
19216
19222
  return;
19217
19223
  }
19218
19224
  try {
19219
- const v = true ? "0.1.177" : "";
19225
+ const v = true ? "0.1.178" : "";
19220
19226
  if (v) {
19221
19227
  document.documentElement.setAttribute("data-ohw-bridge-version", v);
19222
19228
  window.__OHW_BRIDGE_VERSION__ = v;
@@ -34558,7 +34564,7 @@ function OhhwellsBridge() {
34558
34564
  postToParent2({
34559
34565
  type: "ow:ready",
34560
34566
  version: "1",
34561
- bridgeVersion: "0.1.177",
34567
+ bridgeVersion: "0.1.178",
34562
34568
  path: pathname,
34563
34569
  nodes: collectEditableNodes(editContentRef.current),
34564
34570
  sections