@arbidocs/react 0.4.46 → 0.4.47
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/{chunk-TM3EAMIR.js → chunk-5H5XZEBX.js} +11 -5
- package/dist/{chunk-TM3EAMIR.js.map → chunk-5H5XZEBX.js.map} +1 -1
- package/dist/{chunk-XKXN2EDC.cjs → chunk-ATX7FAO6.cjs} +11 -4
- package/dist/{chunk-XKXN2EDC.cjs.map → chunk-ATX7FAO6.cjs.map} +1 -1
- package/dist/index.cjs +212 -212
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/ui/index.cjs +124 -124
- package/dist/ui/index.js +1 -1
- package/package.json +3 -3
|
@@ -1545,6 +1545,12 @@ var PopoverContent = React__namespace.forwardRef(({ className, align = "center",
|
|
|
1545
1545
|
PopoverContent.displayName = PopoverPrimitive__namespace.Content.displayName;
|
|
1546
1546
|
var FINE_OPEN_DELAY = 350;
|
|
1547
1547
|
var FINE_CLOSE_DELAY = 180;
|
|
1548
|
+
var silentFocusMarks = /* @__PURE__ */ new WeakSet();
|
|
1549
|
+
function returnFocusToMark(mark) {
|
|
1550
|
+
silentFocusMarks.add(mark);
|
|
1551
|
+
mark.focus({ preventScroll: true });
|
|
1552
|
+
silentFocusMarks.delete(mark);
|
|
1553
|
+
}
|
|
1548
1554
|
function isFocusVisible(el) {
|
|
1549
1555
|
try {
|
|
1550
1556
|
return el.matches(":focus-visible");
|
|
@@ -1624,7 +1630,7 @@ function MarkMenu({
|
|
|
1624
1630
|
const close = (returnFocus = false) => {
|
|
1625
1631
|
clearTimer();
|
|
1626
1632
|
setOpen(false);
|
|
1627
|
-
if (returnFocus) triggerRef.current
|
|
1633
|
+
if (returnFocus && triggerRef.current) returnFocusToMark(triggerRef.current);
|
|
1628
1634
|
};
|
|
1629
1635
|
const schedule = (action, delay) => {
|
|
1630
1636
|
clearTimer();
|
|
@@ -1656,7 +1662,7 @@ function MarkMenu({
|
|
|
1656
1662
|
};
|
|
1657
1663
|
const handleFocus = (e) => {
|
|
1658
1664
|
onFocus?.(e);
|
|
1659
|
-
if (isEmpty) return;
|
|
1665
|
+
if (isEmpty || silentFocusMarks.has(e.currentTarget)) return;
|
|
1660
1666
|
if (isFocusVisible(e.currentTarget)) schedule(() => openWith("focus"), openDelay);
|
|
1661
1667
|
};
|
|
1662
1668
|
const handleBlur = (e) => {
|
|
@@ -4193,7 +4199,8 @@ exports.getStatusVariant = getStatusVariant;
|
|
|
4193
4199
|
exports.getTagTypeIcon = getTagTypeIcon;
|
|
4194
4200
|
exports.getTagTypeLabel = getTagTypeLabel;
|
|
4195
4201
|
exports.getWorkspaceColor = getWorkspaceColor;
|
|
4202
|
+
exports.returnFocusToMark = returnFocusToMark;
|
|
4196
4203
|
exports.toggleVariants = toggleVariants;
|
|
4197
4204
|
exports.useAudioRecorder = useAudioRecorder;
|
|
4198
|
-
//# sourceMappingURL=chunk-
|
|
4199
|
-
//# sourceMappingURL=chunk-
|
|
4205
|
+
//# sourceMappingURL=chunk-ATX7FAO6.cjs.map
|
|
4206
|
+
//# sourceMappingURL=chunk-ATX7FAO6.cjs.map
|