@ohhwells/bridge 0.1.174-next.468 → 0.1.174-next.471

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 CHANGED
@@ -1009,6 +1009,11 @@ function findImages(deps, section) {
1009
1009
  if (url && style.objectFit === "cover") out.push({ el, url, urlLayer: -1 });
1010
1010
  continue;
1011
1011
  }
1012
+ if (el.tagName === "VIDEO") {
1013
+ const url = el.poster;
1014
+ if (url && style.objectFit === "cover") out.push({ el, url, urlLayer: -1 });
1015
+ continue;
1016
+ }
1012
1017
  const layers = bgLayers(style);
1013
1018
  const urlLayer = layers.findIndex((l) => urlOf(l) !== null);
1014
1019
  if (urlLayer >= 0) out.push({ el, url: urlOf(layers[urlLayer]), urlLayer });
@@ -1581,13 +1586,14 @@ var WATCHED_ATTRS = [
1581
1586
  "class",
1582
1587
  "src",
1583
1588
  "srcset",
1589
+ "poster",
1584
1590
  "data-ohw-style-bg",
1585
1591
  "data-ohw-style-bgcolor",
1586
1592
  "data-ohw-style-cardbg",
1587
1593
  // The editor's Default / Hover toggle forces :hover rules through this attribute.
1588
1594
  "data-ohw-active-state"
1589
1595
  ];
1590
- var VISIBILITY_TRANSITIONS = /* @__PURE__ */ new Set(["opacity", "visibility"]);
1596
+ var RESCAN_TRANSITIONS = /* @__PURE__ */ new Set(["opacity", "visibility", "background-color", "background"]);
1591
1597
  function outermostSection(node) {
1592
1598
  let el = node instanceof Element ? node : node?.parentElement ?? null;
1593
1599
  let top = null;
@@ -1652,7 +1658,7 @@ function mountBackgroundTone(doc = document) {
1652
1658
  });
1653
1659
  const onResize = () => schedule();
1654
1660
  const onTransitionEnd = (event) => {
1655
- if (!VISIBILITY_TRANSITIONS.has(event.propertyName)) return;
1661
+ if (!RESCAN_TRANSITIONS.has(event.propertyName)) return;
1656
1662
  const section = outermostSection(event.target);
1657
1663
  if (section) schedule(section);
1658
1664
  };
@@ -19445,7 +19451,7 @@ function apiBase() {
19445
19451
  function bridgeVersion() {
19446
19452
  try {
19447
19453
  if (true) {
19448
- return "0.1.174-next.468";
19454
+ return "0.1.174-next.471";
19449
19455
  }
19450
19456
  } catch {
19451
19457
  }
@@ -19459,7 +19465,7 @@ function stampBridgeVersionOnDocument() {
19459
19465
  return;
19460
19466
  }
19461
19467
  try {
19462
- const v = true ? "0.1.174-next.468" : "";
19468
+ const v = true ? "0.1.174-next.471" : "";
19463
19469
  if (v) {
19464
19470
  document.documentElement.setAttribute("data-ohw-bridge-version", v);
19465
19471
  window.__OHW_BRIDGE_VERSION__ = v;
@@ -34844,7 +34850,7 @@ function OhhwellsBridge() {
34844
34850
  postToParent2({
34845
34851
  type: "ow:ready",
34846
34852
  version: "1",
34847
- bridgeVersion: "0.1.174-next.468",
34853
+ bridgeVersion: "0.1.174-next.471",
34848
34854
  path: pathname,
34849
34855
  nodes: collectEditableNodes(editContentRef.current),
34850
34856
  sections