@ohhwells/bridge 0.1.52-next.144 → 0.1.53-next.145

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
@@ -280,7 +280,7 @@ function ButtonEl({
280
280
  }) {
281
281
  const secondary = slots.variant === "secondary";
282
282
  const href = str(slots.href);
283
- const linkAttrs = ctx.keyFor && path ? { "data-ohw-key": ctx.keyFor(`${path}.href`), "data-ohw-editable": "link" } : {};
283
+ const linkAttrs = ctx.keyFor && path ? { "data-ohw-href-key": ctx.keyFor(`${path}.href`) } : {};
284
284
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
285
285
  "a",
286
286
  {
@@ -16044,6 +16044,8 @@ function OhhwellsBridge() {
16044
16044
  reconcileFooterOrderFromContent(editContentRef.current);
16045
16045
  syncNavigationDragCursorAttrs();
16046
16046
  enforceLinkHrefs();
16047
+ const hydratedHeight = document.documentElement.scrollHeight;
16048
+ if (hydratedHeight > 50) postToParentRef.current({ type: "ow:height", height: hydratedHeight });
16047
16049
  postToParentRef.current({ type: "ow:hydrate-done" });
16048
16050
  };
16049
16051
  const handleUpdateLogoIdentity = (e) => {
@@ -16115,6 +16117,8 @@ function OhhwellsBridge() {
16115
16117
  const nextValue = serializeAiSectionsState(nextState);
16116
16118
  aiSectionsRef.current = nextValue;
16117
16119
  applyAiSectionsToDom(nextState);
16120
+ const newHeight = document.documentElement.scrollHeight;
16121
+ if (newHeight > 50) postToParentRef.current({ type: "ow:height", height: newHeight });
16118
16122
  postToParentRef.current({ type: "ow:change", nodes: [{ key: AI_SECTIONS_KEY, text: nextValue }] });
16119
16123
  const appliedEl = document.querySelector(`[data-ohw-section="${CSS.escape(payload.id)}"]`);
16120
16124
  const top = appliedEl ? appliedEl.getBoundingClientRect().top + window.scrollY : null;
@@ -16128,6 +16132,8 @@ function OhhwellsBridge() {
16128
16132
  const value = typeof e.data.value === "string" ? e.data.value : "";
16129
16133
  aiSectionsRef.current = value;
16130
16134
  applyAiSectionsToDom(parseAiSectionsState(value));
16135
+ const restoredHeight = document.documentElement.scrollHeight;
16136
+ if (restoredHeight > 50) postToParentRef.current({ type: "ow:height", height: restoredHeight });
16131
16137
  postToParentRef.current({ type: "ow:change", nodes: [{ key: AI_SECTIONS_KEY, text: value }] });
16132
16138
  postAiSectionsChanged();
16133
16139
  };
@@ -16974,7 +16980,7 @@ function OhhwellsBridge() {
16974
16980
  postToParent2({
16975
16981
  type: "ow:ready",
16976
16982
  version: "1",
16977
- bridgeVersion: "0.1.52",
16983
+ bridgeVersion: "0.1.53",
16978
16984
  path: pathname,
16979
16985
  nodes: collectEditableNodes(editContentRef.current),
16980
16986
  sections