@ohhwells/bridge 0.1.42-next.91 → 0.1.42-next.93
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 +44 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +44 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4491,6 +4491,19 @@ var DRAG_SHADOW = "0px 4px 6px -1px rgba(0, 0, 0, 0.1), 0px 2px 4px -2px rgba(0,
|
|
|
4491
4491
|
var TOOLBAR_EDGE_MARGIN = 4;
|
|
4492
4492
|
var SELECTION_CHROME_GAP = 4;
|
|
4493
4493
|
var TOOLBAR_STROKE_GAP = 4;
|
|
4494
|
+
function getChromeZIndex(state) {
|
|
4495
|
+
switch (state) {
|
|
4496
|
+
case "active-top":
|
|
4497
|
+
case "active-bottom":
|
|
4498
|
+
case "dragging":
|
|
4499
|
+
return 2147483644;
|
|
4500
|
+
case "hover":
|
|
4501
|
+
case "sibling-hint":
|
|
4502
|
+
return 2147483643;
|
|
4503
|
+
default:
|
|
4504
|
+
return 2147483642;
|
|
4505
|
+
}
|
|
4506
|
+
}
|
|
4494
4507
|
function getChromeStyle(state) {
|
|
4495
4508
|
switch (state) {
|
|
4496
4509
|
case "hover":
|
|
@@ -4606,7 +4619,7 @@ function ItemInteractionLayer({
|
|
|
4606
4619
|
left: rect.left - chromeGap,
|
|
4607
4620
|
width: rect.width + chromeGap * 2,
|
|
4608
4621
|
height: rect.height + chromeGap * 2,
|
|
4609
|
-
zIndex:
|
|
4622
|
+
zIndex: getChromeZIndex(state)
|
|
4610
4623
|
},
|
|
4611
4624
|
children: [
|
|
4612
4625
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
@@ -8996,6 +9009,16 @@ function OhhwellsBridge() {
|
|
|
8996
9009
|
return;
|
|
8997
9010
|
}
|
|
8998
9011
|
document.documentElement.setAttribute("data-ohw-link-popover-open", "");
|
|
9012
|
+
hoveredItemElRef.current = null;
|
|
9013
|
+
setHoveredItemRect(null);
|
|
9014
|
+
hoveredNavContainerRef.current = null;
|
|
9015
|
+
setHoveredNavContainerRect(null);
|
|
9016
|
+
siblingHintElRef.current = null;
|
|
9017
|
+
setSiblingHintRect(null);
|
|
9018
|
+
setSiblingHintRects([]);
|
|
9019
|
+
if (selectedElRef.current || toolbarVariantRef.current !== "none") {
|
|
9020
|
+
deselectRef.current();
|
|
9021
|
+
}
|
|
8999
9022
|
if (hoveredImageRef.current) {
|
|
9000
9023
|
hoveredImageRef.current = null;
|
|
9001
9024
|
hoveredImageHasTextOverlapRef.current = false;
|
|
@@ -9992,6 +10015,21 @@ function OhhwellsBridge() {
|
|
|
9992
10015
|
outline: none !important;
|
|
9993
10016
|
outline-offset: 0 !important;
|
|
9994
10017
|
}
|
|
10018
|
+
/* Editor chrome owns selection \u2014 suppress native focus rings on nav/footer items. */
|
|
10019
|
+
nav [data-ohw-href-key]:focus,
|
|
10020
|
+
nav [data-ohw-href-key]:focus-visible,
|
|
10021
|
+
nav [data-ohw-href-key]:focus-within,
|
|
10022
|
+
footer [data-ohw-href-key]:focus,
|
|
10023
|
+
footer [data-ohw-href-key]:focus-visible,
|
|
10024
|
+
footer [data-ohw-href-key]:focus-within,
|
|
10025
|
+
nav [data-ohw-href-key] [data-ohw-editable]:focus,
|
|
10026
|
+
nav [data-ohw-href-key] [data-ohw-editable]:focus-visible,
|
|
10027
|
+
footer [data-ohw-href-key] [data-ohw-editable]:focus,
|
|
10028
|
+
footer [data-ohw-href-key] [data-ohw-editable]:focus-visible {
|
|
10029
|
+
outline: none !important;
|
|
10030
|
+
outline-offset: 0 !important;
|
|
10031
|
+
box-shadow: none !important;
|
|
10032
|
+
}
|
|
9995
10033
|
/* Text edit wins over grab/default (must beat [data-ohw-can-drag] *). */
|
|
9996
10034
|
[data-ohw-editing],
|
|
9997
10035
|
[data-ohw-editing] *,
|
|
@@ -11863,8 +11901,8 @@ function OhhwellsBridge() {
|
|
|
11863
11901
|
onVideoSettingsChange: handleVideoSettingsChange
|
|
11864
11902
|
}
|
|
11865
11903
|
),
|
|
11866
|
-
siblingHintRect && !isItemDragging && siblingHintRects.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ItemInteractionLayer, { rect: siblingHintRect, state: "sibling-hint" }),
|
|
11867
|
-
siblingHintRects.map((rect, i) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ItemInteractionLayer, { rect, state: "sibling-hint" }, `sibling-hint-${i}`)),
|
|
11904
|
+
siblingHintRect && !linkPopover && !isItemDragging && siblingHintRects.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ItemInteractionLayer, { rect: siblingHintRect, state: "sibling-hint" }),
|
|
11905
|
+
siblingHintRects.length > 0 && !linkPopover && siblingHintRects.map((rect, i) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ItemInteractionLayer, { rect, state: "sibling-hint" }, `sibling-hint-${i}`)),
|
|
11868
11906
|
isItemDragging && draggedItemRect && selectedElRef.current !== footerDragRef.current?.draggedEl && selectedElRef.current !== navDragRef.current?.draggedEl && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ItemInteractionLayer, { rect: draggedItemRect, state: "dragging" }),
|
|
11869
11907
|
isItemDragging && footerDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
11870
11908
|
"div",
|
|
@@ -11909,8 +11947,9 @@ function OhhwellsBridge() {
|
|
|
11909
11947
|
`nav-drop-${slot.direction}-${slot.parentId ?? "root"}-${slot.insertIndex}-${i}`
|
|
11910
11948
|
)),
|
|
11911
11949
|
hoveredNavContainerRect && toolbarVariant !== "select-frame" && !linkPopover && !isItemDragging && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ItemInteractionLayer, { rect: hoveredNavContainerRect, state: "hover" }),
|
|
11950
|
+
hoveredItemRect && !linkPopover && !hoveredNavContainerRect && !isItemDragging && hoveredItemElRef.current !== selectedElRef.current && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ItemInteractionLayer, { rect: hoveredItemRect, state: "hover" }),
|
|
11912
11951
|
toolbarVariant === "select-frame" && toolbarRect && !linkPopover && !isItemDragging && !isFooterFrameSelection && selectedElRef.current && isNavbarLinksContainer(selectedElRef.current) && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(NavbarContainerChrome, { rect: toolbarRect, onAdd: handleAddTopLevelNavItem }),
|
|
11913
|
-
toolbarRect && (toolbarVariant === "link-action" || toolbarVariant === "select-frame") && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
11952
|
+
toolbarRect && !linkPopover && (toolbarVariant === "link-action" || toolbarVariant === "select-frame") && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
11914
11953
|
ItemInteractionLayer,
|
|
11915
11954
|
{
|
|
11916
11955
|
rect: isItemDragging && draggedItemRect && (footerDragRef.current?.wasSelected || navDragRef.current?.wasSelected) ? draggedItemRect : toolbarRect,
|
|
@@ -11937,8 +11976,7 @@ function OhhwellsBridge() {
|
|
|
11937
11976
|
) : void 0
|
|
11938
11977
|
}
|
|
11939
11978
|
),
|
|
11940
|
-
|
|
11941
|
-
toolbarRect && toolbarVariant === "rich-text" && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
|
|
11979
|
+
toolbarRect && toolbarVariant === "rich-text" && !linkPopover && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
|
|
11942
11980
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
11943
11981
|
EditGlowChrome,
|
|
11944
11982
|
{
|