@jsenv/navi 0.23.8 → 0.23.9
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/jsenv_navi.js +34 -10
- package/dist/jsenv_navi.js.map +8 -10
- package/package.json +1 -1
package/dist/jsenv_navi.js
CHANGED
|
@@ -7026,11 +7026,29 @@ const PSEUDO_CLASSES = {
|
|
|
7026
7026
|
el.removeEventListener("lostpointercapture", onRelease);
|
|
7027
7027
|
el.removeEventListener("pointercancel", onRelease);
|
|
7028
7028
|
el.removeEventListener("pointerup", onRelease);
|
|
7029
|
+
el.removeEventListener("contextmenu", onContextMenu);
|
|
7029
7030
|
callback();
|
|
7030
7031
|
};
|
|
7032
|
+
const onContextMenu = (e) => {
|
|
7033
|
+
// On touch devices, a long-press triggers the context menu.
|
|
7034
|
+
// If the context menu is not prevented, it means it will open and the
|
|
7035
|
+
// pointer events (pointerup, lostpointercapture) won't fire normally,
|
|
7036
|
+
// leaving the element stuck in pressed state. We clear it manually.
|
|
7037
|
+
// e.button === -1 means the event was synthesized from a long-press (not a real mouse click).
|
|
7038
|
+
if (e.button === -1 && !e.defaultPrevented) {
|
|
7039
|
+
pressedElements.delete(el);
|
|
7040
|
+
el.releasePointerCapture(e.pointerId);
|
|
7041
|
+
el.removeEventListener("lostpointercapture", onRelease);
|
|
7042
|
+
el.removeEventListener("pointercancel", onRelease);
|
|
7043
|
+
el.removeEventListener("pointerup", onRelease);
|
|
7044
|
+
el.removeEventListener("contextmenu", onContextMenu);
|
|
7045
|
+
callback();
|
|
7046
|
+
}
|
|
7047
|
+
};
|
|
7031
7048
|
el.addEventListener("lostpointercapture", onRelease);
|
|
7032
7049
|
el.addEventListener("pointercancel", onRelease);
|
|
7033
7050
|
el.addEventListener("pointerup", onRelease);
|
|
7051
|
+
el.addEventListener("contextmenu", onContextMenu);
|
|
7034
7052
|
callback();
|
|
7035
7053
|
};
|
|
7036
7054
|
el.addEventListener("pointerdown", onPointerDown);
|
|
@@ -21521,10 +21539,10 @@ const css$r = /* css */`
|
|
|
21521
21539
|
}
|
|
21522
21540
|
|
|
21523
21541
|
a.navi_button {
|
|
21524
|
-
color: inherit;
|
|
21525
|
-
text-decoration: none;
|
|
21526
21542
|
display: inline-block;
|
|
21543
|
+
color: inherit;
|
|
21527
21544
|
text-align: center;
|
|
21545
|
+
text-decoration: none;
|
|
21528
21546
|
}
|
|
21529
21547
|
|
|
21530
21548
|
.navi_button {
|
|
@@ -21855,14 +21873,20 @@ const ButtonBasic = props => {
|
|
|
21855
21873
|
rel: innerRel,
|
|
21856
21874
|
ref: ref,
|
|
21857
21875
|
onContextMenu: e => {
|
|
21858
|
-
if (
|
|
21859
|
-
//
|
|
21860
|
-
|
|
21861
|
-
// and the long-press visual state would get stuck if we let the menu open.
|
|
21862
|
-
// Note: e.button === -1 is equivalent — it means no physical button triggered
|
|
21863
|
-
// the event, i.e. it was synthesized from a long-press gesture (right-click gives e.button === 2).
|
|
21864
|
-
e.preventDefault();
|
|
21876
|
+
if (as === "a") {
|
|
21877
|
+
// For link we keep context menu to allow "open in new tab" and other browser features
|
|
21878
|
+
return;
|
|
21865
21879
|
}
|
|
21880
|
+
if (e.pointerType !== "touch") {
|
|
21881
|
+
// right click is allowed
|
|
21882
|
+
return;
|
|
21883
|
+
}
|
|
21884
|
+
// Suppress the native context menu triggered by long-press on touch devices.
|
|
21885
|
+
// Buttons have no meaningful context menu (no text to copy/paste/search),
|
|
21886
|
+
// and the long-press visual state would get stuck if we let the menu open.
|
|
21887
|
+
// Note: e.button === -1 is equivalent — it means no physical button triggered
|
|
21888
|
+
// the event, i.e. it was synthesized from a long-press gesture (right-click gives e.button === 2).
|
|
21889
|
+
e.preventDefault();
|
|
21866
21890
|
},
|
|
21867
21891
|
"data-icon": icon ? "" : undefined,
|
|
21868
21892
|
"data-reveal-on-interaction": revealOnInteraction ? "" : undefined,
|
|
@@ -32661,5 +32685,5 @@ const UserSvg = () => jsx("svg", {
|
|
|
32661
32685
|
})
|
|
32662
32686
|
});
|
|
32663
32687
|
|
|
32664
|
-
export { ActionRenderer, ActiveKeyboardShortcuts, Address, Badge, BadgeCount, Box, Button, ButtonCopyToClipboard, Caption, CheckSvg, Checkbox, CheckboxList, CloseSvg, Code, Col, Colgroup, ConstructionSvg, Details, DialogLayout, Editable, ErrorBoundary, ErrorBoundaryContext, ExclamationSvg, EyeClosedSvg, EyeSvg, Form, Group, Head, HeartSvg, HomeSvg, Icon, Image, Input, Label, Link, LinkAnchorSvg, LinkBlankTargetSvg, LinkCurrentSvg, Loading, MessageBox, Meter, Nav, Paragraph, Quantity, QuantityIntl, Radio, RadioList, Route, RowNumberCol, RowNumberTableCell,
|
|
32688
|
+
export { ActionRenderer, ActiveKeyboardShortcuts, Address, Badge, BadgeCount, Box, Button, ButtonCopyToClipboard, Caption, CheckSvg, Checkbox, CheckboxList, CloseSvg, Code, Col, Colgroup, ConstructionSvg, Details, DialogLayout, Editable, ErrorBoundary, ErrorBoundaryContext, ExclamationSvg, EyeClosedSvg, EyeSvg, Form, Group, Head, HeartSvg, HomeSvg, Icon, Image, Input, Label, Link, LinkAnchorSvg, LinkBlankTargetSvg, LinkCurrentSvg, Loading, MessageBox, Meter, Nav, Paragraph, Quantity, QuantityIntl, Radio, RadioList, Route, RowNumberCol, RowNumberTableCell, SVGMaskOverlay, SearchSvg, Select, SelectionContext, Separator, SettingsSvg, SidePanel, StarSvg, SummaryMarker, Svg, Table, TableCell, Tbody, Text, Thead, Title, Tr, UITransition, UserSvg, ViewportLayout, actionIntegratedVia, actionRunEffect, addCustomMessage, arraySignalMembership, compareTwoJsValues, createAction, createAvailableConstraint, createIntl, createRequestCanceller, createSelectionKeyboardShortcuts, enableDebugActions, enableDebugOnDocumentLoading, filterTableSelection, forwardActionRequested, installCustomConstraintValidation, isCellSelected, isColumnSelected, isRowSelected, localStorageSignal, navBack, navForward, navTo, openCallout, rawUrlPart, reload, removeCustomMessage, requestAction, rerunActions, resource, route, routeAction, setBaseUrl, setupRoutes, stateSignal, stopLoad, stringifyTableSelectionValue, syncOwnedResourceToSignals, syncResourceToSignals, updateActions, useActionStatus, useArraySignalMembership, useAsyncData, useCalloutClose, useCancelPrevious, useCellGridFromRows, useConstraintValidityState, useDarkBackgroundAttribute, useDependenciesDiff, useDocumentResource, useDocumentState, useDocumentUrl, useEditionController, useFocusGroup, useKeyboardShortcuts, useNavState$1 as useNavState, useOrderedColumns, useRouteStatus, useRunOnMount, useSelectableElement, useSelectionController, useSidePanelClose, useSignalSync, useStateArray, useTitleLevel, useUrlSearchParam, valueInLocalStorage };
|
|
32665
32689
|
//# sourceMappingURL=jsenv_navi.js.map
|