@bendyline/squisq-editor-react 2.11.9 → 2.11.11
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.
|
@@ -3664,6 +3664,7 @@ function PreviewToolbarControls({ displayMode } = {}) {
|
|
|
3664
3664
|
const popoverRef = useRef6(null);
|
|
3665
3665
|
const popoverTriggerRef = useRef6(null);
|
|
3666
3666
|
const popoverPanelRef = useRef6(null);
|
|
3667
|
+
const popoverPointerEventRef = useRef6(null);
|
|
3667
3668
|
const [popoverAnchor, setPopoverAnchor] = useState7(null);
|
|
3668
3669
|
const updatePopoverPosition = useCallback7(() => {
|
|
3669
3670
|
const trigger = popoverTriggerRef.current;
|
|
@@ -3712,6 +3713,7 @@ function PreviewToolbarControls({ displayMode } = {}) {
|
|
|
3712
3713
|
useEffect7(() => {
|
|
3713
3714
|
if (!popoverOpen) return;
|
|
3714
3715
|
const handler = (e2) => {
|
|
3716
|
+
if (e2 === popoverPointerEventRef.current) return;
|
|
3715
3717
|
const target = e2.target;
|
|
3716
3718
|
if (popoverRef.current?.contains(target)) return;
|
|
3717
3719
|
if (popoverPanelRef.current?.contains(target)) return;
|
|
@@ -4016,36 +4018,46 @@ function PreviewToolbarControls({ displayMode } = {}) {
|
|
|
4016
4018
|
children: [
|
|
4017
4019
|
/* @__PURE__ */ jsx7("div", { className: "squisq-preview-controls-probe", ref: probeRef, "aria-hidden": "true", children: controlKeys.map((key) => renderControl(key, false)) }),
|
|
4018
4020
|
visibleKeys.length > 0 && /* @__PURE__ */ jsx7("div", { className: "squisq-preview-controls-inline", children: visibleKeys.map((key) => renderControl(key, false)) }),
|
|
4019
|
-
hasOverflow && /* @__PURE__ */ jsxs6(
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4021
|
+
hasOverflow && /* @__PURE__ */ jsxs6(
|
|
4022
|
+
"div",
|
|
4023
|
+
{
|
|
4024
|
+
className: "squisq-preview-controls-compact",
|
|
4025
|
+
ref: popoverRef,
|
|
4026
|
+
onMouseDown: (event) => {
|
|
4027
|
+
popoverPointerEventRef.current = event.nativeEvent;
|
|
4028
|
+
},
|
|
4029
|
+
children: [
|
|
4030
|
+
/* @__PURE__ */ jsx7(
|
|
4031
|
+
"button",
|
|
4032
|
+
{
|
|
4033
|
+
ref: popoverTriggerRef,
|
|
4034
|
+
className: `squisq-toolbar-button${popoverOpen ? " squisq-toolbar-button--active" : ""}`,
|
|
4035
|
+
onClick: () => {
|
|
4036
|
+
if (popoverOpen) {
|
|
4037
|
+
closePopover();
|
|
4038
|
+
return;
|
|
4039
|
+
}
|
|
4040
|
+
updatePopoverPosition();
|
|
4041
|
+
setPopoverOpen(true);
|
|
4042
|
+
},
|
|
4043
|
+
"aria-label": "More preview settings",
|
|
4044
|
+
title: "More preview settings",
|
|
4045
|
+
"aria-expanded": popoverOpen,
|
|
4046
|
+
children: /* @__PURE__ */ jsx7(Icon, { icon: "fa-solid fa-ellipsis" })
|
|
4029
4047
|
}
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
className: "squisq-preview-controls-popover",
|
|
4044
|
-
style: { top: popoverAnchor.top, left: popoverAnchor.left },
|
|
4045
|
-
children: overflowKeys.map((key) => renderControl(key, true))
|
|
4046
|
-
}
|
|
4047
|
-
)
|
|
4048
|
-
] })
|
|
4048
|
+
),
|
|
4049
|
+
popoverOpen && popoverAnchor && /* @__PURE__ */ jsx7(
|
|
4050
|
+
"div",
|
|
4051
|
+
{
|
|
4052
|
+
ref: popoverPanelRef,
|
|
4053
|
+
className: "squisq-preview-controls-popover",
|
|
4054
|
+
style: { top: popoverAnchor.top, left: popoverAnchor.left },
|
|
4055
|
+
children: overflowKeys.map((key) => renderControl(key, true))
|
|
4056
|
+
}
|
|
4057
|
+
)
|
|
4058
|
+
]
|
|
4059
|
+
}
|
|
4060
|
+
)
|
|
4049
4061
|
]
|
|
4050
4062
|
}
|
|
4051
4063
|
);
|
package/dist/index.js
CHANGED
package/dist/shell/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bendyline/squisq-editor-react",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.11",
|
|
4
4
|
"description": "React editor shell with raw/WYSIWYG/preview modes for Squisq documents",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Bendyline",
|
|
@@ -98,12 +98,12 @@
|
|
|
98
98
|
}
|
|
99
99
|
},
|
|
100
100
|
"dependencies": {
|
|
101
|
-
"@bendyline/squisq": "2.11.
|
|
101
|
+
"@bendyline/squisq": "2.11.9",
|
|
102
102
|
"@bendyline/squisq-calc": "2.11.0",
|
|
103
|
-
"@bendyline/squisq-formats": "2.6.
|
|
104
|
-
"@bendyline/squisq-grid-react": "2.11.
|
|
105
|
-
"@bendyline/squisq-react": "2.11.
|
|
106
|
-
"@bendyline/squisq-video-react": "2.4.
|
|
103
|
+
"@bendyline/squisq-formats": "2.6.9",
|
|
104
|
+
"@bendyline/squisq-grid-react": "2.11.10",
|
|
105
|
+
"@bendyline/squisq-react": "2.11.10",
|
|
106
|
+
"@bendyline/squisq-video-react": "2.4.14",
|
|
107
107
|
"@fortawesome/fontawesome-free": "7.2.0",
|
|
108
108
|
"@tiptap/core": "2.27.3",
|
|
109
109
|
"@tiptap/extension-heading": "2.27.3",
|