@ohhwells/bridge 0.1.57 → 0.1.58
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 +14 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +14 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -13556,6 +13556,8 @@ function OhhwellsBridge() {
|
|
|
13556
13556
|
const [isFooterFrameSelection, setIsFooterFrameSelection] = useState11(false);
|
|
13557
13557
|
isFooterFrameSelectionRef.current = isFooterFrameSelection;
|
|
13558
13558
|
const [floatingPanel, setFloatingPanel] = useState11(null);
|
|
13559
|
+
const floatingPanelOpenRef = useRef9(false);
|
|
13560
|
+
floatingPanelOpenRef.current = floatingPanel !== null;
|
|
13559
13561
|
const [floatingPanelPos, setFloatingPanelPos] = useState11(null);
|
|
13560
13562
|
const [parentScrollSnap, setParentScrollSnap] = useState11(null);
|
|
13561
13563
|
const [navDropdownPreviewOpen, setNavDropdownPreviewOpen] = useState11(null);
|
|
@@ -14581,6 +14583,8 @@ function OhhwellsBridge() {
|
|
|
14581
14583
|
const closeFloatingPanelOnly = useCallback7(() => {
|
|
14582
14584
|
setFloatingPanel(null);
|
|
14583
14585
|
}, []);
|
|
14586
|
+
const closeFloatingPanelOnlyRef = useRef9(closeFloatingPanelOnly);
|
|
14587
|
+
closeFloatingPanelOnlyRef.current = closeFloatingPanelOnly;
|
|
14584
14588
|
const closeFloatingPanelAndDeselect = useCallback7(() => {
|
|
14585
14589
|
setFloatingPanel(null);
|
|
14586
14590
|
deselectRef.current();
|
|
@@ -16332,6 +16336,10 @@ function OhhwellsBridge() {
|
|
|
16332
16336
|
closeLinkPopoverRef.current();
|
|
16333
16337
|
return;
|
|
16334
16338
|
}
|
|
16339
|
+
if (floatingPanelOpenRef.current) {
|
|
16340
|
+
closeFloatingPanelOnlyRef.current();
|
|
16341
|
+
return;
|
|
16342
|
+
}
|
|
16335
16343
|
if (activeElRef.current) {
|
|
16336
16344
|
const hrefCtx = getHrefKeyFromElement(activeElRef.current);
|
|
16337
16345
|
const navAnchor = hrefCtx ? getNavigationItemAnchor(hrefCtx.anchor) : null;
|
|
@@ -16395,6 +16403,11 @@ function OhhwellsBridge() {
|
|
|
16395
16403
|
closeLinkPopoverRef.current();
|
|
16396
16404
|
return;
|
|
16397
16405
|
}
|
|
16406
|
+
if (e.key === "Escape" && floatingPanelOpenRef.current) {
|
|
16407
|
+
e.preventDefault();
|
|
16408
|
+
closeFloatingPanelOnlyRef.current();
|
|
16409
|
+
return;
|
|
16410
|
+
}
|
|
16398
16411
|
if (e.key === "Escape" && selectedElRef.current && !activeElRef.current) {
|
|
16399
16412
|
if (toolbarVariantRef.current === "select-frame") {
|
|
16400
16413
|
const parent2 = getNavigationSelectionParent(selectedElRef.current);
|
|
@@ -17095,7 +17108,7 @@ function OhhwellsBridge() {
|
|
|
17095
17108
|
postToParent2({
|
|
17096
17109
|
type: "ow:ready",
|
|
17097
17110
|
version: "1",
|
|
17098
|
-
bridgeVersion: "0.1.
|
|
17111
|
+
bridgeVersion: "0.1.57",
|
|
17099
17112
|
path: pathname,
|
|
17100
17113
|
nodes: collectEditableNodes(editContentRef.current),
|
|
17101
17114
|
sections
|