@react-aria/utils 3.24.0 → 3.24.1
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/chain.main.js +1 -1
- package/dist/chain.mjs +2 -2
- package/dist/chain.module.js +1 -1
- package/dist/domHelpers.main.js +1 -1
- package/dist/domHelpers.mjs +2 -2
- package/dist/domHelpers.module.js +1 -1
- package/dist/filterDOMProps.main.js +12 -12
- package/dist/filterDOMProps.mjs +13 -13
- package/dist/filterDOMProps.module.js +12 -12
- package/dist/focusWithoutScrolling.main.js +1 -1
- package/dist/focusWithoutScrolling.mjs +2 -2
- package/dist/focusWithoutScrolling.module.js +1 -1
- package/dist/getOffset.main.js +3 -3
- package/dist/getOffset.mjs +4 -4
- package/dist/getOffset.module.js +3 -3
- package/dist/getScrollParent.mjs +1 -1
- package/dist/getScrollParents.mjs +1 -1
- package/dist/isScrollable.mjs +1 -1
- package/dist/isVirtualEvent.main.js +2 -2
- package/dist/isVirtualEvent.mjs +3 -3
- package/dist/isVirtualEvent.module.js +2 -2
- package/dist/mergeProps.main.js +4 -4
- package/dist/mergeProps.mjs +5 -5
- package/dist/mergeProps.module.js +4 -4
- package/dist/mergeRefs.main.js +1 -1
- package/dist/mergeRefs.mjs +2 -2
- package/dist/mergeRefs.module.js +1 -1
- package/dist/openLink.main.js +20 -20
- package/dist/openLink.mjs +21 -21
- package/dist/openLink.module.js +20 -20
- package/dist/platform.main.js +3 -3
- package/dist/platform.mjs +4 -4
- package/dist/platform.module.js +3 -3
- package/dist/runAfterTransition.main.js +9 -9
- package/dist/runAfterTransition.mjs +10 -10
- package/dist/runAfterTransition.module.js +9 -9
- package/dist/scrollIntoView.main.js +8 -8
- package/dist/scrollIntoView.mjs +9 -9
- package/dist/scrollIntoView.module.js +8 -8
- package/dist/useDeepMemo.mjs +1 -1
- package/dist/useDescription.main.js +3 -3
- package/dist/useDescription.mjs +4 -4
- package/dist/useDescription.module.js +3 -3
- package/dist/useDrag1D.main.js +21 -21
- package/dist/useDrag1D.mjs +22 -22
- package/dist/useDrag1D.module.js +21 -21
- package/dist/useEffectEvent.mjs +1 -1
- package/dist/useEvent.mjs +1 -1
- package/dist/useFormReset.main.js +2 -2
- package/dist/useFormReset.mjs +3 -3
- package/dist/useFormReset.module.js +2 -2
- package/dist/useGlobalListeners.mjs +1 -1
- package/dist/useId.main.js +1 -1
- package/dist/useId.mjs +2 -2
- package/dist/useId.module.js +1 -1
- package/dist/useLabels.main.js +5 -5
- package/dist/useLabels.mjs +6 -6
- package/dist/useLabels.module.js +5 -5
- package/dist/useLayoutEffect.main.js +1 -1
- package/dist/useLayoutEffect.mjs +2 -2
- package/dist/useLayoutEffect.module.js +1 -1
- package/dist/useObjectRef.main.js +1 -1
- package/dist/useObjectRef.mjs +2 -2
- package/dist/useObjectRef.module.js +1 -1
- package/dist/useResizeObserver.main.js +3 -3
- package/dist/useResizeObserver.mjs +4 -4
- package/dist/useResizeObserver.module.js +3 -3
- package/dist/useSyncRef.mjs +1 -1
- package/dist/useUpdateEffect.mjs +1 -1
- package/dist/useValueEffect.mjs +1 -1
- package/dist/useViewportSize.main.js +5 -5
- package/dist/useViewportSize.mjs +6 -6
- package/dist/useViewportSize.module.js +5 -5
- package/package.json +5 -5
package/dist/chain.main.js
CHANGED
|
@@ -18,7 +18,7 @@ $parcel$export(module.exports, "chain", () => $1e2191638e54f613$export$e08e3b67e
|
|
|
18
18
|
* Calls all functions in the order they were chained with the same arguments.
|
|
19
19
|
*/ function $1e2191638e54f613$export$e08e3b67e392101e(...callbacks) {
|
|
20
20
|
return (...args)=>{
|
|
21
|
-
for (let callback of callbacks)if (typeof callback ===
|
|
21
|
+
for (let callback of callbacks)if (typeof callback === 'function') callback(...args);
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
24
|
|
package/dist/chain.mjs
CHANGED
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
* Calls all functions in the order they were chained with the same arguments.
|
|
13
13
|
*/ function $ff5963eb1fccf552$export$e08e3b67e392101e(...callbacks) {
|
|
14
14
|
return (...args)=>{
|
|
15
|
-
for (let callback of callbacks)if (typeof callback ===
|
|
15
|
+
for (let callback of callbacks)if (typeof callback === 'function') callback(...args);
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
export {$ff5963eb1fccf552$export$e08e3b67e392101e as chain};
|
|
21
|
-
//# sourceMappingURL=chain.
|
|
21
|
+
//# sourceMappingURL=chain.module.js.map
|
package/dist/chain.module.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* Calls all functions in the order they were chained with the same arguments.
|
|
13
13
|
*/ function $ff5963eb1fccf552$export$e08e3b67e392101e(...callbacks) {
|
|
14
14
|
return (...args)=>{
|
|
15
|
-
for (let callback of callbacks)if (typeof callback ===
|
|
15
|
+
for (let callback of callbacks)if (typeof callback === 'function') callback(...args);
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
18
|
|
package/dist/domHelpers.main.js
CHANGED
|
@@ -10,7 +10,7 @@ const $aaa611146751592e$export$b204af158042fbac = (el)=>{
|
|
|
10
10
|
return (_el_ownerDocument = el === null || el === void 0 ? void 0 : el.ownerDocument) !== null && _el_ownerDocument !== void 0 ? _el_ownerDocument : document;
|
|
11
11
|
};
|
|
12
12
|
const $aaa611146751592e$export$f21a1ffae260145a = (el)=>{
|
|
13
|
-
if (el &&
|
|
13
|
+
if (el && 'window' in el && el.window === el) return el;
|
|
14
14
|
const doc = $aaa611146751592e$export$b204af158042fbac(el);
|
|
15
15
|
return doc.defaultView || window;
|
|
16
16
|
};
|
package/dist/domHelpers.mjs
CHANGED
|
@@ -3,11 +3,11 @@ const $431fbd86ca7dc216$export$b204af158042fbac = (el)=>{
|
|
|
3
3
|
return (_el_ownerDocument = el === null || el === void 0 ? void 0 : el.ownerDocument) !== null && _el_ownerDocument !== void 0 ? _el_ownerDocument : document;
|
|
4
4
|
};
|
|
5
5
|
const $431fbd86ca7dc216$export$f21a1ffae260145a = (el)=>{
|
|
6
|
-
if (el &&
|
|
6
|
+
if (el && 'window' in el && el.window === el) return el;
|
|
7
7
|
const doc = $431fbd86ca7dc216$export$b204af158042fbac(el);
|
|
8
8
|
return doc.defaultView || window;
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
export {$431fbd86ca7dc216$export$b204af158042fbac as getOwnerDocument, $431fbd86ca7dc216$export$f21a1ffae260145a as getOwnerWindow};
|
|
13
|
-
//# sourceMappingURL=domHelpers.
|
|
13
|
+
//# sourceMappingURL=domHelpers.module.js.map
|
|
@@ -3,7 +3,7 @@ const $431fbd86ca7dc216$export$b204af158042fbac = (el)=>{
|
|
|
3
3
|
return (_el_ownerDocument = el === null || el === void 0 ? void 0 : el.ownerDocument) !== null && _el_ownerDocument !== void 0 ? _el_ownerDocument : document;
|
|
4
4
|
};
|
|
5
5
|
const $431fbd86ca7dc216$export$f21a1ffae260145a = (el)=>{
|
|
6
|
-
if (el &&
|
|
6
|
+
if (el && 'window' in el && el.window === el) return el;
|
|
7
7
|
const doc = $431fbd86ca7dc216$export$b204af158042fbac(el);
|
|
8
8
|
return doc.defaultView || window;
|
|
9
9
|
};
|
|
@@ -15,23 +15,23 @@ $parcel$export(module.exports, "filterDOMProps", () => $8d15d0e1797d4238$export$
|
|
|
15
15
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
16
16
|
* governing permissions and limitations under the License.
|
|
17
17
|
*/ const $8d15d0e1797d4238$var$DOMPropNames = new Set([
|
|
18
|
-
|
|
18
|
+
'id'
|
|
19
19
|
]);
|
|
20
20
|
const $8d15d0e1797d4238$var$labelablePropNames = new Set([
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
'aria-label',
|
|
22
|
+
'aria-labelledby',
|
|
23
|
+
'aria-describedby',
|
|
24
|
+
'aria-details'
|
|
25
25
|
]);
|
|
26
26
|
// See LinkDOMProps in dom.d.ts.
|
|
27
27
|
const $8d15d0e1797d4238$var$linkPropNames = new Set([
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
'href',
|
|
29
|
+
'hrefLang',
|
|
30
|
+
'target',
|
|
31
|
+
'rel',
|
|
32
|
+
'download',
|
|
33
|
+
'ping',
|
|
34
|
+
'referrerPolicy'
|
|
35
35
|
]);
|
|
36
36
|
const $8d15d0e1797d4238$var$propRe = /^(data-.*)$/;
|
|
37
37
|
function $8d15d0e1797d4238$export$457c3d6518dd4c6f(props, opts = {}) {
|
package/dist/filterDOMProps.mjs
CHANGED
|
@@ -9,23 +9,23 @@
|
|
|
9
9
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/ const $65484d02dcb7eb3e$var$DOMPropNames = new Set([
|
|
12
|
-
|
|
12
|
+
'id'
|
|
13
13
|
]);
|
|
14
14
|
const $65484d02dcb7eb3e$var$labelablePropNames = new Set([
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
'aria-label',
|
|
16
|
+
'aria-labelledby',
|
|
17
|
+
'aria-describedby',
|
|
18
|
+
'aria-details'
|
|
19
19
|
]);
|
|
20
20
|
// See LinkDOMProps in dom.d.ts.
|
|
21
21
|
const $65484d02dcb7eb3e$var$linkPropNames = new Set([
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
'href',
|
|
23
|
+
'hrefLang',
|
|
24
|
+
'target',
|
|
25
|
+
'rel',
|
|
26
|
+
'download',
|
|
27
|
+
'ping',
|
|
28
|
+
'referrerPolicy'
|
|
29
29
|
]);
|
|
30
30
|
const $65484d02dcb7eb3e$var$propRe = /^(data-.*)$/;
|
|
31
31
|
function $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, opts = {}) {
|
|
@@ -37,4 +37,4 @@ function $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, opts = {}) {
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
export {$65484d02dcb7eb3e$export$457c3d6518dd4c6f as filterDOMProps};
|
|
40
|
-
//# sourceMappingURL=filterDOMProps.
|
|
40
|
+
//# sourceMappingURL=filterDOMProps.module.js.map
|
|
@@ -9,23 +9,23 @@
|
|
|
9
9
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/ const $65484d02dcb7eb3e$var$DOMPropNames = new Set([
|
|
12
|
-
|
|
12
|
+
'id'
|
|
13
13
|
]);
|
|
14
14
|
const $65484d02dcb7eb3e$var$labelablePropNames = new Set([
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
'aria-label',
|
|
16
|
+
'aria-labelledby',
|
|
17
|
+
'aria-describedby',
|
|
18
|
+
'aria-details'
|
|
19
19
|
]);
|
|
20
20
|
// See LinkDOMProps in dom.d.ts.
|
|
21
21
|
const $65484d02dcb7eb3e$var$linkPropNames = new Set([
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
'href',
|
|
23
|
+
'hrefLang',
|
|
24
|
+
'target',
|
|
25
|
+
'rel',
|
|
26
|
+
'download',
|
|
27
|
+
'ping',
|
|
28
|
+
'referrerPolicy'
|
|
29
29
|
]);
|
|
30
30
|
const $65484d02dcb7eb3e$var$propRe = /^(data-.*)$/;
|
|
31
31
|
function $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, opts = {}) {
|
|
@@ -29,7 +29,7 @@ function $1117b6c0d4c4c164$var$supportsPreventScroll() {
|
|
|
29
29
|
if ($1117b6c0d4c4c164$var$supportsPreventScrollCached == null) {
|
|
30
30
|
$1117b6c0d4c4c164$var$supportsPreventScrollCached = false;
|
|
31
31
|
try {
|
|
32
|
-
let focusElem = document.createElement(
|
|
32
|
+
let focusElem = document.createElement('div');
|
|
33
33
|
focusElem.focus({
|
|
34
34
|
get preventScroll () {
|
|
35
35
|
$1117b6c0d4c4c164$var$supportsPreventScrollCached = true;
|
|
@@ -23,7 +23,7 @@ function $7215afc6de606d6b$var$supportsPreventScroll() {
|
|
|
23
23
|
if ($7215afc6de606d6b$var$supportsPreventScrollCached == null) {
|
|
24
24
|
$7215afc6de606d6b$var$supportsPreventScrollCached = false;
|
|
25
25
|
try {
|
|
26
|
-
let focusElem = document.createElement(
|
|
26
|
+
let focusElem = document.createElement('div');
|
|
27
27
|
focusElem.focus({
|
|
28
28
|
get preventScroll () {
|
|
29
29
|
$7215afc6de606d6b$var$supportsPreventScrollCached = true;
|
|
@@ -64,4 +64,4 @@ function $7215afc6de606d6b$var$restoreScrollPosition(scrollableElements) {
|
|
|
64
64
|
|
|
65
65
|
|
|
66
66
|
export {$7215afc6de606d6b$export$de79e2c695e052f3 as focusWithoutScrolling};
|
|
67
|
-
//# sourceMappingURL=focusWithoutScrolling.
|
|
67
|
+
//# sourceMappingURL=focusWithoutScrolling.module.js.map
|
|
@@ -23,7 +23,7 @@ function $7215afc6de606d6b$var$supportsPreventScroll() {
|
|
|
23
23
|
if ($7215afc6de606d6b$var$supportsPreventScrollCached == null) {
|
|
24
24
|
$7215afc6de606d6b$var$supportsPreventScrollCached = false;
|
|
25
25
|
try {
|
|
26
|
-
let focusElem = document.createElement(
|
|
26
|
+
let focusElem = document.createElement('div');
|
|
27
27
|
focusElem.focus({
|
|
28
28
|
get preventScroll () {
|
|
29
29
|
$7215afc6de606d6b$var$supportsPreventScrollCached = true;
|
package/dist/getOffset.main.js
CHANGED
|
@@ -14,10 +14,10 @@ $parcel$export(module.exports, "getOffset", () => $16ec41ef3e36c19c$export$622ce
|
|
|
14
14
|
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
15
15
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
16
16
|
* governing permissions and limitations under the License.
|
|
17
|
-
*/ function $16ec41ef3e36c19c$export$622cea445a1c5b7d(element, reverse, orientation =
|
|
17
|
+
*/ function $16ec41ef3e36c19c$export$622cea445a1c5b7d(element, reverse, orientation = 'horizontal') {
|
|
18
18
|
let rect = element.getBoundingClientRect();
|
|
19
|
-
if (reverse) return orientation ===
|
|
20
|
-
return orientation ===
|
|
19
|
+
if (reverse) return orientation === 'horizontal' ? rect.right : rect.bottom;
|
|
20
|
+
return orientation === 'horizontal' ? rect.left : rect.top;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
|
package/dist/getOffset.mjs
CHANGED
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
9
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
|
-
*/ function $ab71dadb03a6fb2e$export$622cea445a1c5b7d(element, reverse, orientation =
|
|
11
|
+
*/ function $ab71dadb03a6fb2e$export$622cea445a1c5b7d(element, reverse, orientation = 'horizontal') {
|
|
12
12
|
let rect = element.getBoundingClientRect();
|
|
13
|
-
if (reverse) return orientation ===
|
|
14
|
-
return orientation ===
|
|
13
|
+
if (reverse) return orientation === 'horizontal' ? rect.right : rect.bottom;
|
|
14
|
+
return orientation === 'horizontal' ? rect.left : rect.top;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
export {$ab71dadb03a6fb2e$export$622cea445a1c5b7d as getOffset};
|
|
19
|
-
//# sourceMappingURL=getOffset.
|
|
19
|
+
//# sourceMappingURL=getOffset.module.js.map
|
package/dist/getOffset.module.js
CHANGED
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
9
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
|
-
*/ function $ab71dadb03a6fb2e$export$622cea445a1c5b7d(element, reverse, orientation =
|
|
11
|
+
*/ function $ab71dadb03a6fb2e$export$622cea445a1c5b7d(element, reverse, orientation = 'horizontal') {
|
|
12
12
|
let rect = element.getBoundingClientRect();
|
|
13
|
-
if (reverse) return orientation ===
|
|
14
|
-
return orientation ===
|
|
13
|
+
if (reverse) return orientation === 'horizontal' ? rect.right : rect.bottom;
|
|
14
|
+
return orientation === 'horizontal' ? rect.left : rect.top;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
|
package/dist/getScrollParent.mjs
CHANGED
package/dist/isScrollable.mjs
CHANGED
|
@@ -24,7 +24,7 @@ function $577e795361f19be9$export$60278871457622de(event) {
|
|
|
24
24
|
// Android TalkBack's detail value varies depending on the event listener providing the event so we have specific logic here instead
|
|
25
25
|
// If pointerType is defined, event is from a click listener. For events from mousedown listener, detail === 0 is a sufficient check
|
|
26
26
|
// to detect TalkBack virtual clicks.
|
|
27
|
-
if ((0, $9e20cff0af27e8cc$exports.isAndroid)() && event.pointerType) return event.type ===
|
|
27
|
+
if ((0, $9e20cff0af27e8cc$exports.isAndroid)() && event.pointerType) return event.type === 'click' && event.buttons === 1;
|
|
28
28
|
return event.detail === 0 && !event.pointerType;
|
|
29
29
|
}
|
|
30
30
|
function $577e795361f19be9$export$29bf1b5f2c56cf63(event) {
|
|
@@ -34,7 +34,7 @@ function $577e795361f19be9$export$29bf1b5f2c56cf63(event) {
|
|
|
34
34
|
// Cannot use "event.pressure === 0" as the sole check due to Safari pointer events always returning pressure === 0
|
|
35
35
|
// instead of .5, see https://bugs.webkit.org/show_bug.cgi?id=206216. event.pointerType === 'mouse' is to distingush
|
|
36
36
|
// Talkback double tap from Windows Firefox touch screen press
|
|
37
|
-
return !(0, $9e20cff0af27e8cc$exports.isAndroid)() && event.width === 0 && event.height === 0 || event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType ===
|
|
37
|
+
return !(0, $9e20cff0af27e8cc$exports.isAndroid)() && event.width === 0 && event.height === 0 || event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === 'mouse';
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
|
package/dist/isVirtualEvent.mjs
CHANGED
|
@@ -17,7 +17,7 @@ function $6a7db85432448f7f$export$60278871457622de(event) {
|
|
|
17
17
|
// Android TalkBack's detail value varies depending on the event listener providing the event so we have specific logic here instead
|
|
18
18
|
// If pointerType is defined, event is from a click listener. For events from mousedown listener, detail === 0 is a sufficient check
|
|
19
19
|
// to detect TalkBack virtual clicks.
|
|
20
|
-
if ((0, $c87311424ea30a05$export$a11b0059900ceec8)() && event.pointerType) return event.type ===
|
|
20
|
+
if ((0, $c87311424ea30a05$export$a11b0059900ceec8)() && event.pointerType) return event.type === 'click' && event.buttons === 1;
|
|
21
21
|
return event.detail === 0 && !event.pointerType;
|
|
22
22
|
}
|
|
23
23
|
function $6a7db85432448f7f$export$29bf1b5f2c56cf63(event) {
|
|
@@ -27,9 +27,9 @@ function $6a7db85432448f7f$export$29bf1b5f2c56cf63(event) {
|
|
|
27
27
|
// Cannot use "event.pressure === 0" as the sole check due to Safari pointer events always returning pressure === 0
|
|
28
28
|
// instead of .5, see https://bugs.webkit.org/show_bug.cgi?id=206216. event.pointerType === 'mouse' is to distingush
|
|
29
29
|
// Talkback double tap from Windows Firefox touch screen press
|
|
30
|
-
return !(0, $c87311424ea30a05$export$a11b0059900ceec8)() && event.width === 0 && event.height === 0 || event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType ===
|
|
30
|
+
return !(0, $c87311424ea30a05$export$a11b0059900ceec8)() && event.width === 0 && event.height === 0 || event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === 'mouse';
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
export {$6a7db85432448f7f$export$60278871457622de as isVirtualClick, $6a7db85432448f7f$export$29bf1b5f2c56cf63 as isVirtualPointerEvent};
|
|
35
|
-
//# sourceMappingURL=isVirtualEvent.
|
|
35
|
+
//# sourceMappingURL=isVirtualEvent.module.js.map
|
|
@@ -17,7 +17,7 @@ function $6a7db85432448f7f$export$60278871457622de(event) {
|
|
|
17
17
|
// Android TalkBack's detail value varies depending on the event listener providing the event so we have specific logic here instead
|
|
18
18
|
// If pointerType is defined, event is from a click listener. For events from mousedown listener, detail === 0 is a sufficient check
|
|
19
19
|
// to detect TalkBack virtual clicks.
|
|
20
|
-
if ((0, $c87311424ea30a05$export$a11b0059900ceec8)() && event.pointerType) return event.type ===
|
|
20
|
+
if ((0, $c87311424ea30a05$export$a11b0059900ceec8)() && event.pointerType) return event.type === 'click' && event.buttons === 1;
|
|
21
21
|
return event.detail === 0 && !event.pointerType;
|
|
22
22
|
}
|
|
23
23
|
function $6a7db85432448f7f$export$29bf1b5f2c56cf63(event) {
|
|
@@ -27,7 +27,7 @@ function $6a7db85432448f7f$export$29bf1b5f2c56cf63(event) {
|
|
|
27
27
|
// Cannot use "event.pressure === 0" as the sole check due to Safari pointer events always returning pressure === 0
|
|
28
28
|
// instead of .5, see https://bugs.webkit.org/show_bug.cgi?id=206216. event.pointerType === 'mouse' is to distingush
|
|
29
29
|
// Talkback double tap from Windows Firefox touch screen press
|
|
30
|
-
return !(0, $c87311424ea30a05$export$a11b0059900ceec8)() && event.width === 0 && event.height === 0 || event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType ===
|
|
30
|
+
return !(0, $c87311424ea30a05$export$a11b0059900ceec8)() && event.width === 0 && event.height === 0 || event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === 'mouse';
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
|
package/dist/mergeProps.main.js
CHANGED
|
@@ -37,10 +37,10 @@ function $f847cd1382ea7cd4$export$9d1611c77c2fe928(...args) {
|
|
|
37
37
|
let a = result[key];
|
|
38
38
|
let b = props[key];
|
|
39
39
|
// Chain events
|
|
40
|
-
if (typeof a ===
|
|
41
|
-
key[0] ===
|
|
42
|
-
else if ((key ===
|
|
43
|
-
else if (key ===
|
|
40
|
+
if (typeof a === 'function' && typeof b === 'function' && // This is a lot faster than a regex.
|
|
41
|
+
key[0] === 'o' && key[1] === 'n' && key.charCodeAt(2) >= /* 'A' */ 65 && key.charCodeAt(2) <= /* 'Z' */ 90) result[key] = (0, $1e2191638e54f613$exports.chain)(a, b);
|
|
42
|
+
else if ((key === 'className' || key === 'UNSAFE_className') && typeof a === 'string' && typeof b === 'string') result[key] = (0, ($parcel$interopDefault($eVrjB$clsx)))(a, b);
|
|
43
|
+
else if (key === 'id' && a && b) result.id = (0, $8c61827343eed941$exports.mergeIds)(a, b);
|
|
44
44
|
else result[key] = b !== undefined ? b : a;
|
|
45
45
|
}
|
|
46
46
|
}
|
package/dist/mergeProps.mjs
CHANGED
|
@@ -27,10 +27,10 @@ function $3ef42575df84b30b$export$9d1611c77c2fe928(...args) {
|
|
|
27
27
|
let a = result[key];
|
|
28
28
|
let b = props[key];
|
|
29
29
|
// Chain events
|
|
30
|
-
if (typeof a ===
|
|
31
|
-
key[0] ===
|
|
32
|
-
else if ((key ===
|
|
33
|
-
else if (key ===
|
|
30
|
+
if (typeof a === 'function' && typeof b === 'function' && // This is a lot faster than a regex.
|
|
31
|
+
key[0] === 'o' && key[1] === 'n' && key.charCodeAt(2) >= /* 'A' */ 65 && key.charCodeAt(2) <= /* 'Z' */ 90) result[key] = (0, $ff5963eb1fccf552$export$e08e3b67e392101e)(a, b);
|
|
32
|
+
else if ((key === 'className' || key === 'UNSAFE_className') && typeof a === 'string' && typeof b === 'string') result[key] = (0, $7jXr9$clsx)(a, b);
|
|
33
|
+
else if (key === 'id' && a && b) result.id = (0, $bdb11010cef70236$export$cd8c9cb68f842629)(a, b);
|
|
34
34
|
else result[key] = b !== undefined ? b : a;
|
|
35
35
|
}
|
|
36
36
|
}
|
|
@@ -39,4 +39,4 @@ function $3ef42575df84b30b$export$9d1611c77c2fe928(...args) {
|
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
export {$3ef42575df84b30b$export$9d1611c77c2fe928 as mergeProps};
|
|
42
|
-
//# sourceMappingURL=mergeProps.
|
|
42
|
+
//# sourceMappingURL=mergeProps.module.js.map
|
|
@@ -27,10 +27,10 @@ function $3ef42575df84b30b$export$9d1611c77c2fe928(...args) {
|
|
|
27
27
|
let a = result[key];
|
|
28
28
|
let b = props[key];
|
|
29
29
|
// Chain events
|
|
30
|
-
if (typeof a ===
|
|
31
|
-
key[0] ===
|
|
32
|
-
else if ((key ===
|
|
33
|
-
else if (key ===
|
|
30
|
+
if (typeof a === 'function' && typeof b === 'function' && // This is a lot faster than a regex.
|
|
31
|
+
key[0] === 'o' && key[1] === 'n' && key.charCodeAt(2) >= /* 'A' */ 65 && key.charCodeAt(2) <= /* 'Z' */ 90) result[key] = (0, $ff5963eb1fccf552$export$e08e3b67e392101e)(a, b);
|
|
32
|
+
else if ((key === 'className' || key === 'UNSAFE_className') && typeof a === 'string' && typeof b === 'string') result[key] = (0, $7jXr9$clsx)(a, b);
|
|
33
|
+
else if (key === 'id' && a && b) result.id = (0, $bdb11010cef70236$export$cd8c9cb68f842629)(a, b);
|
|
34
34
|
else result[key] = b !== undefined ? b : a;
|
|
35
35
|
}
|
|
36
36
|
}
|
package/dist/mergeRefs.main.js
CHANGED
|
@@ -18,7 +18,7 @@ $parcel$export(module.exports, "mergeRefs", () => $f05dc24eafaeb7e2$export$c9058
|
|
|
18
18
|
if (refs.length === 1) return refs[0];
|
|
19
19
|
return (value)=>{
|
|
20
20
|
for (let ref of refs){
|
|
21
|
-
if (typeof ref ===
|
|
21
|
+
if (typeof ref === 'function') ref(value);
|
|
22
22
|
else if (ref != null) ref.current = value;
|
|
23
23
|
}
|
|
24
24
|
};
|
package/dist/mergeRefs.mjs
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
if (refs.length === 1) return refs[0];
|
|
13
13
|
return (value)=>{
|
|
14
14
|
for (let ref of refs){
|
|
15
|
-
if (typeof ref ===
|
|
15
|
+
if (typeof ref === 'function') ref(value);
|
|
16
16
|
else if (ref != null) ref.current = value;
|
|
17
17
|
}
|
|
18
18
|
};
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
export {$5dc95899b306f630$export$c9058316764c140e as mergeRefs};
|
|
23
|
-
//# sourceMappingURL=mergeRefs.
|
|
23
|
+
//# sourceMappingURL=mergeRefs.module.js.map
|
package/dist/mergeRefs.module.js
CHANGED
package/dist/openLink.main.js
CHANGED
|
@@ -59,8 +59,8 @@ function $4068a0fae83b6d84$export$9a302a45f65d0572() {
|
|
|
59
59
|
}
|
|
60
60
|
function $4068a0fae83b6d84$export$efa8c9099e530235(link, modifiers) {
|
|
61
61
|
// Use getAttribute here instead of link.target. Firefox will default link.target to "_parent" when inside an iframe.
|
|
62
|
-
let target = link.getAttribute(
|
|
63
|
-
return (!target || target ===
|
|
62
|
+
let target = link.getAttribute('target');
|
|
63
|
+
return (!target || target === '_self') && link.origin === location.origin && !link.hasAttribute('download') && !modifiers.metaKey && // open in new tab (mac)
|
|
64
64
|
!modifiers.ctrlKey && // open in new tab (windows)
|
|
65
65
|
!modifiers.altKey && // download
|
|
66
66
|
!modifiers.shiftKey;
|
|
@@ -72,19 +72,19 @@ function $4068a0fae83b6d84$export$95185d699e05d4d7(target, modifiers, setOpening
|
|
|
72
72
|
// will prevent links with target="_blank" from opening. However, it does allow the event if the
|
|
73
73
|
// Command/Control key is held, which opens the link in a background tab. This seems like the best we can do.
|
|
74
74
|
// See https://bugzilla.mozilla.org/show_bug.cgi?id=257870 and https://bugzilla.mozilla.org/show_bug.cgi?id=746640.
|
|
75
|
-
if ((0, $9e20cff0af27e8cc$exports.isFirefox)() && ((_window_event = window.event) === null || _window_event === void 0 ? void 0 : (_window_event_type = _window_event.type) === null || _window_event_type === void 0 ? void 0 : _window_event_type.startsWith(
|
|
75
|
+
if ((0, $9e20cff0af27e8cc$exports.isFirefox)() && ((_window_event = window.event) === null || _window_event === void 0 ? void 0 : (_window_event_type = _window_event.type) === null || _window_event_type === void 0 ? void 0 : _window_event_type.startsWith('key')) && target.target === '_blank') {
|
|
76
76
|
if ((0, $9e20cff0af27e8cc$exports.isMac)()) metaKey = true;
|
|
77
77
|
else ctrlKey = true;
|
|
78
78
|
}
|
|
79
79
|
// WebKit does not support firing click events with modifier keys, but does support keyboard events.
|
|
80
80
|
// https://github.com/WebKit/WebKit/blob/c03d0ac6e6db178f90923a0a63080b5ca210d25f/Source/WebCore/html/HTMLAnchorElement.cpp#L184
|
|
81
|
-
let event = (0, $9e20cff0af27e8cc$exports.isWebKit)() && (0, $9e20cff0af27e8cc$exports.isMac)() && !(0, $9e20cff0af27e8cc$exports.isIPad)() && true ? new KeyboardEvent(
|
|
82
|
-
keyIdentifier:
|
|
81
|
+
let event = (0, $9e20cff0af27e8cc$exports.isWebKit)() && (0, $9e20cff0af27e8cc$exports.isMac)() && !(0, $9e20cff0af27e8cc$exports.isIPad)() && true ? new KeyboardEvent('keydown', {
|
|
82
|
+
keyIdentifier: 'Enter',
|
|
83
83
|
metaKey: metaKey,
|
|
84
84
|
ctrlKey: ctrlKey,
|
|
85
85
|
altKey: altKey,
|
|
86
86
|
shiftKey: shiftKey
|
|
87
|
-
}) : new MouseEvent(
|
|
87
|
+
}) : new MouseEvent('click', {
|
|
88
88
|
metaKey: metaKey,
|
|
89
89
|
ctrlKey: ctrlKey,
|
|
90
90
|
altKey: altKey,
|
|
@@ -101,14 +101,14 @@ function $4068a0fae83b6d84$export$95185d699e05d4d7(target, modifiers, setOpening
|
|
|
101
101
|
$4068a0fae83b6d84$export$95185d699e05d4d7.isOpening = false;
|
|
102
102
|
function $4068a0fae83b6d84$var$getSyntheticLink(target, open) {
|
|
103
103
|
if (target instanceof HTMLAnchorElement) open(target);
|
|
104
|
-
else if (target.hasAttribute(
|
|
105
|
-
let link = document.createElement(
|
|
106
|
-
link.href = target.getAttribute(
|
|
107
|
-
if (target.hasAttribute(
|
|
108
|
-
if (target.hasAttribute(
|
|
109
|
-
if (target.hasAttribute(
|
|
110
|
-
if (target.hasAttribute(
|
|
111
|
-
if (target.hasAttribute(
|
|
104
|
+
else if (target.hasAttribute('data-href')) {
|
|
105
|
+
let link = document.createElement('a');
|
|
106
|
+
link.href = target.getAttribute('data-href');
|
|
107
|
+
if (target.hasAttribute('data-target')) link.target = target.getAttribute('data-target');
|
|
108
|
+
if (target.hasAttribute('data-rel')) link.rel = target.getAttribute('data-rel');
|
|
109
|
+
if (target.hasAttribute('data-download')) link.download = target.getAttribute('data-download');
|
|
110
|
+
if (target.hasAttribute('data-ping')) link.ping = target.getAttribute('data-ping');
|
|
111
|
+
if (target.hasAttribute('data-referrer-policy')) link.referrerPolicy = target.getAttribute('data-referrer-policy');
|
|
112
112
|
target.appendChild(link);
|
|
113
113
|
open(link);
|
|
114
114
|
target.removeChild(link);
|
|
@@ -119,12 +119,12 @@ function $4068a0fae83b6d84$var$openSyntheticLink(target, modifiers) {
|
|
|
119
119
|
}
|
|
120
120
|
function $4068a0fae83b6d84$export$51437d503373d223(props) {
|
|
121
121
|
return {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
122
|
+
'data-href': props.href,
|
|
123
|
+
'data-target': props.target,
|
|
124
|
+
'data-rel': props.rel,
|
|
125
|
+
'data-download': props.download,
|
|
126
|
+
'data-ping': props.ping,
|
|
127
|
+
'data-referrer-policy': props.referrerPolicy
|
|
128
128
|
};
|
|
129
129
|
}
|
|
130
130
|
function $4068a0fae83b6d84$export$7e924b3091a3bd18(props) {
|
package/dist/openLink.mjs
CHANGED
|
@@ -44,8 +44,8 @@ function $ea8dcbcb9ea1b556$export$9a302a45f65d0572() {
|
|
|
44
44
|
}
|
|
45
45
|
function $ea8dcbcb9ea1b556$export$efa8c9099e530235(link, modifiers) {
|
|
46
46
|
// Use getAttribute here instead of link.target. Firefox will default link.target to "_parent" when inside an iframe.
|
|
47
|
-
let target = link.getAttribute(
|
|
48
|
-
return (!target || target ===
|
|
47
|
+
let target = link.getAttribute('target');
|
|
48
|
+
return (!target || target === '_self') && link.origin === location.origin && !link.hasAttribute('download') && !modifiers.metaKey && // open in new tab (mac)
|
|
49
49
|
!modifiers.ctrlKey && // open in new tab (windows)
|
|
50
50
|
!modifiers.altKey && // download
|
|
51
51
|
!modifiers.shiftKey;
|
|
@@ -57,19 +57,19 @@ function $ea8dcbcb9ea1b556$export$95185d699e05d4d7(target, modifiers, setOpening
|
|
|
57
57
|
// will prevent links with target="_blank" from opening. However, it does allow the event if the
|
|
58
58
|
// Command/Control key is held, which opens the link in a background tab. This seems like the best we can do.
|
|
59
59
|
// See https://bugzilla.mozilla.org/show_bug.cgi?id=257870 and https://bugzilla.mozilla.org/show_bug.cgi?id=746640.
|
|
60
|
-
if ((0, $c87311424ea30a05$export$b7d78993b74f766d)() && ((_window_event = window.event) === null || _window_event === void 0 ? void 0 : (_window_event_type = _window_event.type) === null || _window_event_type === void 0 ? void 0 : _window_event_type.startsWith(
|
|
60
|
+
if ((0, $c87311424ea30a05$export$b7d78993b74f766d)() && ((_window_event = window.event) === null || _window_event === void 0 ? void 0 : (_window_event_type = _window_event.type) === null || _window_event_type === void 0 ? void 0 : _window_event_type.startsWith('key')) && target.target === '_blank') {
|
|
61
61
|
if ((0, $c87311424ea30a05$export$9ac100e40613ea10)()) metaKey = true;
|
|
62
62
|
else ctrlKey = true;
|
|
63
63
|
}
|
|
64
64
|
// WebKit does not support firing click events with modifier keys, but does support keyboard events.
|
|
65
65
|
// https://github.com/WebKit/WebKit/blob/c03d0ac6e6db178f90923a0a63080b5ca210d25f/Source/WebCore/html/HTMLAnchorElement.cpp#L184
|
|
66
|
-
let event = (0, $c87311424ea30a05$export$78551043582a6a98)() && (0, $c87311424ea30a05$export$9ac100e40613ea10)() && !(0, $c87311424ea30a05$export$7bef049ce92e4224)() && true ? new KeyboardEvent(
|
|
67
|
-
keyIdentifier:
|
|
66
|
+
let event = (0, $c87311424ea30a05$export$78551043582a6a98)() && (0, $c87311424ea30a05$export$9ac100e40613ea10)() && !(0, $c87311424ea30a05$export$7bef049ce92e4224)() && true ? new KeyboardEvent('keydown', {
|
|
67
|
+
keyIdentifier: 'Enter',
|
|
68
68
|
metaKey: metaKey,
|
|
69
69
|
ctrlKey: ctrlKey,
|
|
70
70
|
altKey: altKey,
|
|
71
71
|
shiftKey: shiftKey
|
|
72
|
-
}) : new MouseEvent(
|
|
72
|
+
}) : new MouseEvent('click', {
|
|
73
73
|
metaKey: metaKey,
|
|
74
74
|
ctrlKey: ctrlKey,
|
|
75
75
|
altKey: altKey,
|
|
@@ -86,14 +86,14 @@ function $ea8dcbcb9ea1b556$export$95185d699e05d4d7(target, modifiers, setOpening
|
|
|
86
86
|
$ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening = false;
|
|
87
87
|
function $ea8dcbcb9ea1b556$var$getSyntheticLink(target, open) {
|
|
88
88
|
if (target instanceof HTMLAnchorElement) open(target);
|
|
89
|
-
else if (target.hasAttribute(
|
|
90
|
-
let link = document.createElement(
|
|
91
|
-
link.href = target.getAttribute(
|
|
92
|
-
if (target.hasAttribute(
|
|
93
|
-
if (target.hasAttribute(
|
|
94
|
-
if (target.hasAttribute(
|
|
95
|
-
if (target.hasAttribute(
|
|
96
|
-
if (target.hasAttribute(
|
|
89
|
+
else if (target.hasAttribute('data-href')) {
|
|
90
|
+
let link = document.createElement('a');
|
|
91
|
+
link.href = target.getAttribute('data-href');
|
|
92
|
+
if (target.hasAttribute('data-target')) link.target = target.getAttribute('data-target');
|
|
93
|
+
if (target.hasAttribute('data-rel')) link.rel = target.getAttribute('data-rel');
|
|
94
|
+
if (target.hasAttribute('data-download')) link.download = target.getAttribute('data-download');
|
|
95
|
+
if (target.hasAttribute('data-ping')) link.ping = target.getAttribute('data-ping');
|
|
96
|
+
if (target.hasAttribute('data-referrer-policy')) link.referrerPolicy = target.getAttribute('data-referrer-policy');
|
|
97
97
|
target.appendChild(link);
|
|
98
98
|
open(link);
|
|
99
99
|
target.removeChild(link);
|
|
@@ -104,12 +104,12 @@ function $ea8dcbcb9ea1b556$var$openSyntheticLink(target, modifiers) {
|
|
|
104
104
|
}
|
|
105
105
|
function $ea8dcbcb9ea1b556$export$51437d503373d223(props) {
|
|
106
106
|
return {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
107
|
+
'data-href': props.href,
|
|
108
|
+
'data-target': props.target,
|
|
109
|
+
'data-rel': props.rel,
|
|
110
|
+
'data-download': props.download,
|
|
111
|
+
'data-ping': props.ping,
|
|
112
|
+
'data-referrer-policy': props.referrerPolicy
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
115
|
function $ea8dcbcb9ea1b556$export$7e924b3091a3bd18(props) {
|
|
@@ -126,4 +126,4 @@ function $ea8dcbcb9ea1b556$export$7e924b3091a3bd18(props) {
|
|
|
126
126
|
|
|
127
127
|
|
|
128
128
|
export {$ea8dcbcb9ea1b556$export$323e4fc2fa4753fb as RouterProvider, $ea8dcbcb9ea1b556$export$efa8c9099e530235 as shouldClientNavigate, $ea8dcbcb9ea1b556$export$95185d699e05d4d7 as openLink, $ea8dcbcb9ea1b556$export$9a302a45f65d0572 as useRouter, $ea8dcbcb9ea1b556$export$51437d503373d223 as getSyntheticLinkProps, $ea8dcbcb9ea1b556$export$7e924b3091a3bd18 as useLinkProps};
|
|
129
|
-
//# sourceMappingURL=openLink.
|
|
129
|
+
//# sourceMappingURL=openLink.module.js.map
|