@ohhwells/bridge 0.1.65-next.179 → 0.1.65-next.181
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 +6 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -7711,6 +7711,9 @@ var import_lucide_react7 = require("lucide-react");
|
|
|
7711
7711
|
|
|
7712
7712
|
// src/lib/sections.ts
|
|
7713
7713
|
var LINK_PICKER_EXCLUDED_IDS = /* @__PURE__ */ new Set(["navbar", "footer"]);
|
|
7714
|
+
function isChromeSection(el) {
|
|
7715
|
+
return el.matches("header, nav, footer, aside");
|
|
7716
|
+
}
|
|
7714
7717
|
function titleCaseSectionId(id) {
|
|
7715
7718
|
return id.split("-").filter(Boolean).map((w) => w.charAt(0).toUpperCase() + w.slice(1)).join(" ");
|
|
7716
7719
|
}
|
|
@@ -7783,7 +7786,7 @@ function useLiveSectionRect(sectionId) {
|
|
|
7783
7786
|
}
|
|
7784
7787
|
function computeSectionBoundaryFlags(instanceId) {
|
|
7785
7788
|
const topLevel = Array.from(document.querySelectorAll("[data-ohw-section]")).filter(
|
|
7786
|
-
(el) => !el.parentElement?.closest("[data-ohw-section]")
|
|
7789
|
+
(el) => !el.parentElement?.closest("[data-ohw-section]") && !isChromeSection(el)
|
|
7787
7790
|
);
|
|
7788
7791
|
const index = topLevel.findIndex((el) => (el.dataset.ohwInstance ?? el.dataset.ohwSection) === instanceId);
|
|
7789
7792
|
if (index === -1) return { isFirst: true, isLast: true };
|
|
@@ -7980,7 +7983,8 @@ function AiSectionOverlay({
|
|
|
7980
7983
|
const reviewRect = useLiveSectionRect(reviewId);
|
|
7981
7984
|
const hoverRect = useLiveSectionRect(reviewId || hoveredId === selectedId ? null : hoveredId);
|
|
7982
7985
|
(0, import_react8.useEffect)(() => {
|
|
7983
|
-
|
|
7986
|
+
const selectedEl = activeSelectionId ? findSectionElement(activeSelectionId) : null;
|
|
7987
|
+
if (!activeSelectionId || !selectionRect || selectedEl && isChromeSection(selectedEl)) {
|
|
7984
7988
|
postToParent2({ type: "ow:section-rect", instanceId: null, rect: null });
|
|
7985
7989
|
return;
|
|
7986
7990
|
}
|