@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.cjs
CHANGED
|
@@ -13623,6 +13623,8 @@ function OhhwellsBridge() {
|
|
|
13623
13623
|
const [isFooterFrameSelection, setIsFooterFrameSelection] = (0, import_react16.useState)(false);
|
|
13624
13624
|
isFooterFrameSelectionRef.current = isFooterFrameSelection;
|
|
13625
13625
|
const [floatingPanel, setFloatingPanel] = (0, import_react16.useState)(null);
|
|
13626
|
+
const floatingPanelOpenRef = (0, import_react16.useRef)(false);
|
|
13627
|
+
floatingPanelOpenRef.current = floatingPanel !== null;
|
|
13626
13628
|
const [floatingPanelPos, setFloatingPanelPos] = (0, import_react16.useState)(null);
|
|
13627
13629
|
const [parentScrollSnap, setParentScrollSnap] = (0, import_react16.useState)(null);
|
|
13628
13630
|
const [navDropdownPreviewOpen, setNavDropdownPreviewOpen] = (0, import_react16.useState)(null);
|
|
@@ -14648,6 +14650,8 @@ function OhhwellsBridge() {
|
|
|
14648
14650
|
const closeFloatingPanelOnly = (0, import_react16.useCallback)(() => {
|
|
14649
14651
|
setFloatingPanel(null);
|
|
14650
14652
|
}, []);
|
|
14653
|
+
const closeFloatingPanelOnlyRef = (0, import_react16.useRef)(closeFloatingPanelOnly);
|
|
14654
|
+
closeFloatingPanelOnlyRef.current = closeFloatingPanelOnly;
|
|
14651
14655
|
const closeFloatingPanelAndDeselect = (0, import_react16.useCallback)(() => {
|
|
14652
14656
|
setFloatingPanel(null);
|
|
14653
14657
|
deselectRef.current();
|
|
@@ -16399,6 +16403,10 @@ function OhhwellsBridge() {
|
|
|
16399
16403
|
closeLinkPopoverRef.current();
|
|
16400
16404
|
return;
|
|
16401
16405
|
}
|
|
16406
|
+
if (floatingPanelOpenRef.current) {
|
|
16407
|
+
closeFloatingPanelOnlyRef.current();
|
|
16408
|
+
return;
|
|
16409
|
+
}
|
|
16402
16410
|
if (activeElRef.current) {
|
|
16403
16411
|
const hrefCtx = getHrefKeyFromElement(activeElRef.current);
|
|
16404
16412
|
const navAnchor = hrefCtx ? getNavigationItemAnchor(hrefCtx.anchor) : null;
|
|
@@ -16462,6 +16470,11 @@ function OhhwellsBridge() {
|
|
|
16462
16470
|
closeLinkPopoverRef.current();
|
|
16463
16471
|
return;
|
|
16464
16472
|
}
|
|
16473
|
+
if (e.key === "Escape" && floatingPanelOpenRef.current) {
|
|
16474
|
+
e.preventDefault();
|
|
16475
|
+
closeFloatingPanelOnlyRef.current();
|
|
16476
|
+
return;
|
|
16477
|
+
}
|
|
16465
16478
|
if (e.key === "Escape" && selectedElRef.current && !activeElRef.current) {
|
|
16466
16479
|
if (toolbarVariantRef.current === "select-frame") {
|
|
16467
16480
|
const parent2 = getNavigationSelectionParent(selectedElRef.current);
|
|
@@ -17162,7 +17175,7 @@ function OhhwellsBridge() {
|
|
|
17162
17175
|
postToParent2({
|
|
17163
17176
|
type: "ow:ready",
|
|
17164
17177
|
version: "1",
|
|
17165
|
-
bridgeVersion: "0.1.
|
|
17178
|
+
bridgeVersion: "0.1.57",
|
|
17166
17179
|
path: pathname,
|
|
17167
17180
|
nodes: collectEditableNodes(editContentRef.current),
|
|
17168
17181
|
sections
|