@ohhwells/bridge 0.1.152-next.409 → 0.1.152-next.414

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
@@ -17089,7 +17089,7 @@ function apiBase() {
17089
17089
  function bridgeVersion() {
17090
17090
  try {
17091
17091
  if (true) {
17092
- return "0.1.152-next.409";
17092
+ return "0.1.152-next.414";
17093
17093
  }
17094
17094
  } catch {
17095
17095
  }
@@ -17103,7 +17103,7 @@ function stampBridgeVersionOnDocument() {
17103
17103
  return;
17104
17104
  }
17105
17105
  try {
17106
- const v = true ? "0.1.152-next.409" : "";
17106
+ const v = true ? "0.1.152-next.414" : "";
17107
17107
  if (v) {
17108
17108
  document.documentElement.setAttribute("data-ohw-bridge-version", v);
17109
17109
  window.__OHW_BRIDGE_VERSION__ = v;
@@ -17111,10 +17111,23 @@ function stampBridgeVersionOnDocument() {
17111
17111
  } catch {
17112
17112
  }
17113
17113
  }
17114
+ var RECOVERABLE_PAGE_ERROR = /Minified React error #(?:418|419|421|422|423|425)\b|Hydration failed because the initial UI does not match|Text content does not match server-rendered HTML|There was an error while hydrating|did not match\. Server:/i;
17115
+ function isVercelPreviewHost() {
17116
+ if (typeof location === "undefined") {
17117
+ return false;
17118
+ }
17119
+ return location.hostname.toLowerCase().endsWith(".vercel.ohhwells.site");
17120
+ }
17114
17121
  function reportOutageBeacon(args) {
17115
17122
  if (typeof window === "undefined" || !args.subdomain) {
17116
17123
  return;
17117
17124
  }
17125
+ if (isVercelPreviewHost()) {
17126
+ return;
17127
+ }
17128
+ if (args.reason === "page_error" && args.detail && RECOVERABLE_PAGE_ERROR.test(args.detail)) {
17129
+ return;
17130
+ }
17118
17131
  const key = `${args.subdomain}|${args.reason}`;
17119
17132
  const now = Date.now();
17120
17133
  const prev = lastSent.get(key) || 0;
@@ -32071,7 +32084,7 @@ function OhhwellsBridge() {
32071
32084
  postToParent2({
32072
32085
  type: "ow:ready",
32073
32086
  version: "1",
32074
- bridgeVersion: "0.1.152-next.409",
32087
+ bridgeVersion: "0.1.152-next.414",
32075
32088
  path: pathname,
32076
32089
  nodes: collectEditableNodes(editContentRef.current),
32077
32090
  sections