@react-aria/utils 3.31.0 → 3.32.0

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.
Files changed (60) hide show
  1. package/dist/filterDOMProps.main.js +1 -1
  2. package/dist/filterDOMProps.main.js.map +1 -1
  3. package/dist/filterDOMProps.mjs +1 -1
  4. package/dist/filterDOMProps.module.js +1 -1
  5. package/dist/filterDOMProps.module.js.map +1 -1
  6. package/dist/mergeProps.main.js.map +1 -1
  7. package/dist/mergeProps.module.js.map +1 -1
  8. package/dist/openLink.main.js +1 -0
  9. package/dist/openLink.main.js.map +1 -1
  10. package/dist/openLink.mjs +1 -0
  11. package/dist/openLink.module.js +1 -0
  12. package/dist/openLink.module.js.map +1 -1
  13. package/dist/scrollIntoView.main.js +10 -37
  14. package/dist/scrollIntoView.main.js.map +1 -1
  15. package/dist/scrollIntoView.mjs +10 -37
  16. package/dist/scrollIntoView.module.js +10 -37
  17. package/dist/scrollIntoView.module.js.map +1 -1
  18. package/dist/types.d.ts +3 -4
  19. package/dist/types.d.ts.map +1 -1
  20. package/dist/useEvent.main.js +1 -2
  21. package/dist/useEvent.main.js.map +1 -1
  22. package/dist/useEvent.mjs +1 -2
  23. package/dist/useEvent.module.js +1 -2
  24. package/dist/useEvent.module.js.map +1 -1
  25. package/dist/useFormReset.main.js +1 -2
  26. package/dist/useFormReset.main.js.map +1 -1
  27. package/dist/useFormReset.mjs +1 -2
  28. package/dist/useFormReset.module.js +1 -2
  29. package/dist/useFormReset.module.js.map +1 -1
  30. package/dist/useLoadMoreSentinel.main.js +0 -1
  31. package/dist/useLoadMoreSentinel.main.js.map +1 -1
  32. package/dist/useLoadMoreSentinel.mjs +0 -1
  33. package/dist/useLoadMoreSentinel.module.js +0 -1
  34. package/dist/useLoadMoreSentinel.module.js.map +1 -1
  35. package/dist/useResizeObserver.main.js +8 -4
  36. package/dist/useResizeObserver.main.js.map +1 -1
  37. package/dist/useResizeObserver.mjs +8 -4
  38. package/dist/useResizeObserver.module.js +8 -4
  39. package/dist/useResizeObserver.module.js.map +1 -1
  40. package/dist/useUpdateEffect.main.js +5 -2
  41. package/dist/useUpdateEffect.main.js.map +1 -1
  42. package/dist/useUpdateEffect.mjs +5 -2
  43. package/dist/useUpdateEffect.module.js +5 -2
  44. package/dist/useUpdateEffect.module.js.map +1 -1
  45. package/dist/useValueEffect.main.js +13 -8
  46. package/dist/useValueEffect.main.js.map +1 -1
  47. package/dist/useValueEffect.mjs +14 -9
  48. package/dist/useValueEffect.module.js +14 -9
  49. package/dist/useValueEffect.module.js.map +1 -1
  50. package/package.json +3 -3
  51. package/src/filterDOMProps.ts +1 -1
  52. package/src/mergeProps.ts +1 -2
  53. package/src/openLink.tsx +1 -1
  54. package/src/scrollIntoView.ts +16 -47
  55. package/src/useEvent.ts +1 -1
  56. package/src/useFormReset.ts +1 -1
  57. package/src/useLoadMoreSentinel.ts +1 -1
  58. package/src/useResizeObserver.ts +8 -4
  59. package/src/useUpdateEffect.ts +5 -3
  60. package/src/useValueEffect.ts +15 -11
@@ -1,5 +1,4 @@
1
1
  import {getScrollParents as $a40c673dc9f6d9c7$export$94ed1c92c7beeb22} from "./getScrollParents.module.js";
2
- import {isChrome as $c87311424ea30a05$export$6446a186d09e379e} from "./platform.module.js";
3
2
 
4
3
  /*
5
4
  * Copyright 2020 Adobe. All rights reserved.
@@ -12,7 +11,6 @@ import {isChrome as $c87311424ea30a05$export$6446a186d09e379e} from "./platform.
12
11
  * OF ANY KIND, either express or implied. See the License for the specific language
13
12
  * governing permissions and limitations under the License.
14
13
  */
15
-
16
14
  function $2f04cbc44ee30ce0$export$53a0910f038337bd(scrollView, element) {
17
15
  let offsetX = $2f04cbc44ee30ce0$var$relativeOffset(scrollView, element, 'left');
18
16
  let offsetY = $2f04cbc44ee30ce0$var$relativeOffset(scrollView, element, 'top');
@@ -22,48 +20,23 @@ function $2f04cbc44ee30ce0$export$53a0910f038337bd(scrollView, element) {
22
20
  let y = scrollView.scrollTop;
23
21
  // Account for top/left border offsetting the scroll top/Left + scroll padding
24
22
  let { borderTopWidth: borderTopWidth, borderLeftWidth: borderLeftWidth, scrollPaddingTop: scrollPaddingTop, scrollPaddingRight: scrollPaddingRight, scrollPaddingBottom: scrollPaddingBottom, scrollPaddingLeft: scrollPaddingLeft } = getComputedStyle(scrollView);
25
- // Account for scroll margin of the element
26
- let { scrollMarginTop: scrollMarginTop, scrollMarginRight: scrollMarginRight, scrollMarginBottom: scrollMarginBottom, scrollMarginLeft: scrollMarginLeft } = getComputedStyle(element);
27
23
  let borderAdjustedX = x + parseInt(borderLeftWidth, 10);
28
24
  let borderAdjustedY = y + parseInt(borderTopWidth, 10);
29
25
  // Ignore end/bottom border via clientHeight/Width instead of offsetHeight/Width
30
26
  let maxX = borderAdjustedX + scrollView.clientWidth;
31
27
  let maxY = borderAdjustedY + scrollView.clientHeight;
32
- // Get scroll padding / margin values as pixels - defaults to 0 if no scroll padding / margin
28
+ // Get scroll padding values as pixels - defaults to 0 if no scroll padding
33
29
  // is used.
34
30
  let scrollPaddingTopNumber = parseInt(scrollPaddingTop, 10) || 0;
35
31
  let scrollPaddingBottomNumber = parseInt(scrollPaddingBottom, 10) || 0;
36
32
  let scrollPaddingRightNumber = parseInt(scrollPaddingRight, 10) || 0;
37
33
  let scrollPaddingLeftNumber = parseInt(scrollPaddingLeft, 10) || 0;
38
- let scrollMarginTopNumber = parseInt(scrollMarginTop, 10) || 0;
39
- let scrollMarginBottomNumber = parseInt(scrollMarginBottom, 10) || 0;
40
- let scrollMarginRightNumber = parseInt(scrollMarginRight, 10) || 0;
41
- let scrollMarginLeftNumber = parseInt(scrollMarginLeft, 10) || 0;
42
- let targetLeft = offsetX - scrollMarginLeftNumber;
43
- let targetRight = offsetX + width + scrollMarginRightNumber;
44
- let targetTop = offsetY - scrollMarginTopNumber;
45
- let targetBottom = offsetY + height + scrollMarginBottomNumber;
46
- let scrollPortLeft = x + parseInt(borderLeftWidth, 10) + scrollPaddingLeftNumber;
47
- let scrollPortRight = maxX - scrollPaddingRightNumber;
48
- let scrollPortTop = y + parseInt(borderTopWidth, 10) + scrollPaddingTopNumber;
49
- let scrollPortBottom = maxY - scrollPaddingBottomNumber;
50
- if (targetLeft > scrollPortLeft || targetRight < scrollPortRight) {
51
- if (targetLeft <= x + scrollPaddingLeftNumber) x = targetLeft - parseInt(borderLeftWidth, 10) - scrollPaddingLeftNumber;
52
- else if (targetRight > maxX - scrollPaddingRightNumber) x += targetRight - maxX + scrollPaddingRightNumber;
53
- }
54
- if (targetTop > scrollPortTop || targetBottom < scrollPortBottom) {
55
- if (targetTop <= borderAdjustedY + scrollPaddingTopNumber) y = targetTop - parseInt(borderTopWidth, 10) - scrollPaddingTopNumber;
56
- else if (targetBottom > maxY - scrollPaddingBottomNumber) y += targetBottom - maxY + scrollPaddingBottomNumber;
57
- }
58
- if (process.env.NODE_ENV === 'test') {
59
- scrollView.scrollLeft = x;
60
- scrollView.scrollTop = y;
61
- return;
62
- }
63
- scrollView.scrollTo({
64
- left: x,
65
- top: y
66
- });
34
+ if (offsetX <= x + scrollPaddingLeftNumber) x = offsetX - parseInt(borderLeftWidth, 10) - scrollPaddingLeftNumber;
35
+ else if (offsetX + width > maxX - scrollPaddingRightNumber) x += offsetX + width - maxX + scrollPaddingRightNumber;
36
+ if (offsetY <= borderAdjustedY + scrollPaddingTopNumber) y = offsetY - parseInt(borderTopWidth, 10) - scrollPaddingTopNumber;
37
+ else if (offsetY + height > maxY - scrollPaddingBottomNumber) y += offsetY + height - maxY + scrollPaddingBottomNumber;
38
+ scrollView.scrollLeft = x;
39
+ scrollView.scrollTop = y;
67
40
  }
68
41
  /**
69
42
  * Computes the offset left or top from child to ancestor by accumulating
@@ -89,9 +62,8 @@ function $2f04cbc44ee30ce0$export$c826860796309d1b(targetElement, opts) {
89
62
  if (targetElement && document.contains(targetElement)) {
90
63
  let root = document.scrollingElement || document.documentElement;
91
64
  let isScrollPrevented = window.getComputedStyle(root).overflow === 'hidden';
92
- // If scrolling is not currently prevented then we aren't in a overlay nor is a overlay open, just use element.scrollIntoView to bring the element into view
93
- // Also ignore in chrome because of this bug: https://issues.chromium.org/issues/40074749
94
- if (!isScrollPrevented && !(0, $c87311424ea30a05$export$6446a186d09e379e)()) {
65
+ // If scrolling is not currently prevented then we arent in a overlay nor is a overlay open, just use element.scrollIntoView to bring the element into view
66
+ if (!isScrollPrevented) {
95
67
  var // use scrollIntoView({block: 'nearest'}) instead of .focus to check if the element is fully in view or not since .focus()
96
68
  // won't cause a scroll if the element is already focused and doesn't behave consistently when an element is partially out of view horizontally vs vertically
97
69
  _targetElement_scrollIntoView;
@@ -114,6 +86,7 @@ function $2f04cbc44ee30ce0$export$c826860796309d1b(targetElement, opts) {
114
86
  } else {
115
87
  let scrollParents = (0, $a40c673dc9f6d9c7$export$94ed1c92c7beeb22)(targetElement);
116
88
  // If scrolling is prevented, we don't want to scroll the body since it might move the overlay partially offscreen and the user can't scroll it back into view.
89
+ if (!isScrollPrevented) scrollParents.push(root);
117
90
  for (let scrollParent of scrollParents)$2f04cbc44ee30ce0$export$53a0910f038337bd(scrollParent, targetElement);
118
91
  }
119
92
  }
@@ -1 +1 @@
1
- {"mappings":";;;AAAA;;;;;;;;;;CAUC;;AAeM,SAAS,0CAAe,UAAuB,EAAE,OAAoB;IAC1E,IAAI,UAAU,qCAAe,YAAY,SAAS;IAClD,IAAI,UAAU,qCAAe,YAAY,SAAS;IAClD,IAAI,QAAQ,QAAQ,WAAW;IAC/B,IAAI,SAAS,QAAQ,YAAY;IACjC,IAAI,IAAI,WAAW,UAAU;IAC7B,IAAI,IAAI,WAAW,SAAS;IAE5B,8EAA8E;IAC9E,IAAI,kBACF,cAAc,mBACd,eAAe,oBACf,gBAAgB,sBAChB,kBAAkB,uBAClB,mBAAmB,qBACnB,iBAAiB,EAClB,GAAG,iBAAiB;IAErB,2CAA2C;IAC3C,IAAI,mBACF,eAAe,qBACf,iBAAiB,sBACjB,kBAAkB,oBAClB,gBAAgB,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,yCAAA,wBAAyB,cAAc,cAAvC,6DAAA,4CAAA,yBAA0C;oBAAC,OAAO;oBAAU,QAAQ;gBAAQ;iBAC5E,iCAAA,cAAc,cAAc,cAA5B,qDAAA,oCAAA,eAA+B;oBAAC,OAAO;gBAAS;YAClD;QACF,OAAO;YACL,IAAI,gBAAgB,CAAA,GAAA,yCAAe,EAAE;YACrC,+JAA+J;YAC/J,KAAK,IAAI,gBAAgB,cACvB,0CAAe,cAA6B;QAEhD;IACF;AACF","sources":["packages/@react-aria/utils/src/scrollIntoView.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {getScrollParents} from './getScrollParents';\nimport {isChrome} from './platform';\n\ninterface ScrollIntoViewportOpts {\n /** The optional containing element of the target to be centered in the viewport. */\n containingElement?: Element | null\n}\n\n/**\n * Scrolls `scrollView` so that `element` is visible.\n * Similar to `element.scrollIntoView({block: 'nearest'})` (not supported in Edge),\n * but doesn't affect parents above `scrollView`.\n */\nexport function scrollIntoView(scrollView: HTMLElement, element: HTMLElement): void {\n let offsetX = relativeOffset(scrollView, element, 'left');\n let offsetY = relativeOffset(scrollView, element, 'top');\n let width = element.offsetWidth;\n let height = element.offsetHeight;\n let x = scrollView.scrollLeft;\n let y = scrollView.scrollTop;\n\n // Account for top/left border offsetting the scroll top/Left + scroll padding\n let {\n borderTopWidth,\n borderLeftWidth,\n scrollPaddingTop,\n scrollPaddingRight,\n scrollPaddingBottom,\n scrollPaddingLeft\n } = getComputedStyle(scrollView);\n\n // Account for scroll margin of the element\n let {\n scrollMarginTop,\n scrollMarginRight,\n scrollMarginBottom,\n scrollMarginLeft\n } = getComputedStyle(element);\n\n let borderAdjustedX = x + parseInt(borderLeftWidth, 10);\n let borderAdjustedY = y + parseInt(borderTopWidth, 10);\n // Ignore end/bottom border via clientHeight/Width instead of offsetHeight/Width\n let maxX = borderAdjustedX + scrollView.clientWidth;\n let maxY = borderAdjustedY + scrollView.clientHeight;\n\n // Get scroll padding / margin values as pixels - defaults to 0 if no scroll padding / margin\n // is used.\n let scrollPaddingTopNumber = parseInt(scrollPaddingTop, 10) || 0;\n let scrollPaddingBottomNumber = parseInt(scrollPaddingBottom, 10) || 0;\n let scrollPaddingRightNumber = parseInt(scrollPaddingRight, 10) || 0;\n let scrollPaddingLeftNumber = parseInt(scrollPaddingLeft, 10) || 0;\n let scrollMarginTopNumber = parseInt(scrollMarginTop, 10) || 0;\n let scrollMarginBottomNumber = parseInt(scrollMarginBottom, 10) || 0;\n let scrollMarginRightNumber = parseInt(scrollMarginRight, 10) || 0;\n let scrollMarginLeftNumber = parseInt(scrollMarginLeft, 10) || 0;\n\n let targetLeft = offsetX - scrollMarginLeftNumber;\n let targetRight = offsetX + width + scrollMarginRightNumber;\n let targetTop = offsetY - scrollMarginTopNumber;\n let targetBottom = offsetY + height + scrollMarginBottomNumber;\n\n let scrollPortLeft = x + parseInt(borderLeftWidth, 10) + scrollPaddingLeftNumber;\n let scrollPortRight = maxX - scrollPaddingRightNumber;\n let scrollPortTop = y + parseInt(borderTopWidth, 10) + scrollPaddingTopNumber;\n let scrollPortBottom = maxY - scrollPaddingBottomNumber;\n\n if (targetLeft > scrollPortLeft || targetRight < scrollPortRight) {\n if (targetLeft <= x + scrollPaddingLeftNumber) {\n x = targetLeft - parseInt(borderLeftWidth, 10) - scrollPaddingLeftNumber;\n } else if (targetRight > maxX - scrollPaddingRightNumber) {\n x += targetRight - maxX + scrollPaddingRightNumber;\n }\n }\n\n if (targetTop > scrollPortTop || targetBottom < scrollPortBottom) {\n if (targetTop <= borderAdjustedY + scrollPaddingTopNumber) {\n y = targetTop - parseInt(borderTopWidth, 10) - scrollPaddingTopNumber;\n } else if (targetBottom > maxY - scrollPaddingBottomNumber) {\n y += targetBottom - maxY + scrollPaddingBottomNumber;\n }\n }\n\n if (process.env.NODE_ENV === 'test') {\n scrollView.scrollLeft = x;\n scrollView.scrollTop = y;\n return;\n }\n\n scrollView.scrollTo({left: x, top: y});\n}\n\n/**\n * Computes the offset left or top from child to ancestor by accumulating\n * offsetLeft or offsetTop through intervening offsetParents.\n */\nfunction relativeOffset(ancestor: HTMLElement, child: HTMLElement, axis: 'left'|'top') {\n const prop = axis === 'left' ? 'offsetLeft' : 'offsetTop';\n let sum = 0;\n while (child.offsetParent) {\n sum += child[prop];\n if (child.offsetParent === ancestor) {\n // Stop once we have found the ancestor we are interested in.\n break;\n } else if (child.offsetParent.contains(ancestor)) {\n // If the ancestor is not `position:relative`, then we stop at\n // _its_ offset parent, and we subtract off _its_ offset, so that\n // we end up with the proper offset from child to ancestor.\n sum -= ancestor[prop];\n break;\n }\n child = child.offsetParent as HTMLElement;\n }\n return sum;\n}\n\n/**\n * Scrolls the `targetElement` so it is visible in the viewport. Accepts an optional `opts.containingElement`\n * that will be centered in the viewport prior to scrolling the targetElement into view. If scrolling is prevented on\n * the body (e.g. targetElement is in a popover), this will only scroll the scroll parents of the targetElement up to but not including the body itself.\n */\nexport function scrollIntoViewport(targetElement: Element | null, opts?: ScrollIntoViewportOpts): void {\n if (targetElement && document.contains(targetElement)) {\n let root = document.scrollingElement || document.documentElement;\n let isScrollPrevented = window.getComputedStyle(root).overflow === 'hidden';\n // If scrolling is not currently prevented then we aren't in a overlay nor is a overlay open, just use element.scrollIntoView to bring the element into view\n // Also ignore in chrome because of this bug: https://issues.chromium.org/issues/40074749\n if (!isScrollPrevented && !isChrome()) {\n let {left: originalLeft, top: originalTop} = targetElement.getBoundingClientRect();\n\n // use scrollIntoView({block: 'nearest'}) instead of .focus to check if the element is fully in view or not since .focus()\n // won't cause a scroll if the element is already focused and doesn't behave consistently when an element is partially out of view horizontally vs vertically\n targetElement?.scrollIntoView?.({block: 'nearest'});\n let {left: newLeft, top: newTop} = targetElement.getBoundingClientRect();\n // Account for sub pixel differences from rounding\n if ((Math.abs(originalLeft - newLeft) > 1) || (Math.abs(originalTop - newTop) > 1)) {\n opts?.containingElement?.scrollIntoView?.({block: 'center', inline: 'center'});\n targetElement.scrollIntoView?.({block: 'nearest'});\n }\n } else {\n let scrollParents = getScrollParents(targetElement);\n // If scrolling is prevented, we don't want to scroll the body since it might move the overlay partially offscreen and the user can't scroll it back into view.\n for (let scrollParent of scrollParents) {\n scrollIntoView(scrollParent as HTMLElement, targetElement as HTMLElement);\n }\n }\n }\n}\n"],"names":[],"version":3,"file":"scrollIntoView.module.js.map"}
1
+ {"mappings":";;AAAA;;;;;;;;;;CAUC;AAcM,SAAS,0CAAe,UAAuB,EAAE,OAAoB;IAC1E,IAAI,UAAU,qCAAe,YAAY,SAAS;IAClD,IAAI,UAAU,qCAAe,YAAY,SAAS;IAClD,IAAI,QAAQ,QAAQ,WAAW;IAC/B,IAAI,SAAS,QAAQ,YAAY;IACjC,IAAI,IAAI,WAAW,UAAU;IAC7B,IAAI,IAAI,WAAW,SAAS;IAE5B,8EAA8E;IAC9E,IAAI,kBACF,cAAc,mBACd,eAAe,oBACf,gBAAgB,sBAChB,kBAAkB,uBAClB,mBAAmB,qBACnB,iBAAiB,EAClB,GAAG,iBAAiB;IAErB,IAAI,kBAAkB,IAAI,SAAS,iBAAiB;IACpD,IAAI,kBAAkB,IAAI,SAAS,gBAAgB;IACnD,gFAAgF;IAChF,IAAI,OAAO,kBAAkB,WAAW,WAAW;IACnD,IAAI,OAAO,kBAAkB,WAAW,YAAY;IAEpD,2EAA2E;IAC3E,WAAW;IACX,IAAI,yBAAyB,SAAS,kBAAkB,OAAO;IAC/D,IAAI,4BAA4B,SAAS,qBAAqB,OAAO;IACrE,IAAI,2BAA2B,SAAS,oBAAoB,OAAO;IACnE,IAAI,0BAA0B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AAC,GAAG,cAAc,qBAAqB;YACtE,kDAAkD;YAClD,IAAI,AAAC,KAAK,GAAG,CAAC,eAAe,WAAW,KAAO,KAAK,GAAG,CAAC,cAAc,UAAU,GAAI;oBAClF,wCAAA,yBACA;gBADA,iBAAA,4BAAA,0BAAA,KAAM,iBAAiB,cAAvB,+CAAA,yCAAA,wBAAyB,cAAc,cAAvC,6DAAA,4CAAA,yBAA0C;oBAAC,OAAO;oBAAU,QAAQ;gBAAQ;iBAC5E,iCAAA,cAAc,cAAc,cAA5B,qDAAA,oCAAA,eAA+B;oBAAC,OAAO;gBAAS;YAClD;QACF,OAAO;YACL,IAAI,gBAAgB,CAAA,GAAA,yCAAe,EAAE;YACrC,+JAA+J;YAC/J,IAAI,CAAC,mBACH,cAAc,IAAI,CAAC;YAErB,KAAK,IAAI,gBAAgB,cACvB,0CAAe,cAA6B;QAEhD;IACF;AACF","sources":["packages/@react-aria/utils/src/scrollIntoView.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {getScrollParents} from './getScrollParents';\n\ninterface ScrollIntoViewportOpts {\n /** The optional containing element of the target to be centered in the viewport. */\n containingElement?: Element | null\n}\n\n/**\n * Scrolls `scrollView` so that `element` is visible.\n * Similar to `element.scrollIntoView({block: 'nearest'})` (not supported in Edge),\n * but doesn't affect parents above `scrollView`.\n */\nexport function scrollIntoView(scrollView: HTMLElement, element: HTMLElement): void {\n let offsetX = relativeOffset(scrollView, element, 'left');\n let offsetY = relativeOffset(scrollView, element, 'top');\n let width = element.offsetWidth;\n let height = element.offsetHeight;\n let x = scrollView.scrollLeft;\n let y = scrollView.scrollTop;\n\n // Account for top/left border offsetting the scroll top/Left + scroll padding\n let {\n borderTopWidth,\n borderLeftWidth,\n scrollPaddingTop,\n scrollPaddingRight,\n scrollPaddingBottom,\n scrollPaddingLeft\n } = getComputedStyle(scrollView);\n\n let borderAdjustedX = x + parseInt(borderLeftWidth, 10);\n let borderAdjustedY = y + parseInt(borderTopWidth, 10);\n // Ignore end/bottom border via clientHeight/Width instead of offsetHeight/Width\n let maxX = borderAdjustedX + scrollView.clientWidth;\n let maxY = borderAdjustedY + scrollView.clientHeight;\n\n // Get scroll padding values as pixels - defaults to 0 if no scroll padding\n // is used.\n let scrollPaddingTopNumber = parseInt(scrollPaddingTop, 10) || 0;\n let scrollPaddingBottomNumber = parseInt(scrollPaddingBottom, 10) || 0;\n let scrollPaddingRightNumber = parseInt(scrollPaddingRight, 10) || 0;\n let scrollPaddingLeftNumber = parseInt(scrollPaddingLeft, 10) || 0;\n\n if (offsetX <= x + scrollPaddingLeftNumber) {\n x = offsetX - parseInt(borderLeftWidth, 10) - scrollPaddingLeftNumber;\n } else if (offsetX + width > maxX - scrollPaddingRightNumber) {\n x += offsetX + width - maxX + scrollPaddingRightNumber;\n }\n if (offsetY <= borderAdjustedY + scrollPaddingTopNumber) {\n y = offsetY - parseInt(borderTopWidth, 10) - scrollPaddingTopNumber;\n } else if (offsetY + height > maxY - scrollPaddingBottomNumber) {\n y += offsetY + height - maxY + scrollPaddingBottomNumber;\n }\n\n scrollView.scrollLeft = x;\n scrollView.scrollTop = y;\n}\n\n/**\n * Computes the offset left or top from child to ancestor by accumulating\n * offsetLeft or offsetTop through intervening offsetParents.\n */\nfunction relativeOffset(ancestor: HTMLElement, child: HTMLElement, axis: 'left'|'top') {\n const prop = axis === 'left' ? 'offsetLeft' : 'offsetTop';\n let sum = 0;\n while (child.offsetParent) {\n sum += child[prop];\n if (child.offsetParent === ancestor) {\n // Stop once we have found the ancestor we are interested in.\n break;\n } else if (child.offsetParent.contains(ancestor)) {\n // If the ancestor is not `position:relative`, then we stop at\n // _its_ offset parent, and we subtract off _its_ offset, so that\n // we end up with the proper offset from child to ancestor.\n sum -= ancestor[prop];\n break;\n }\n child = child.offsetParent as HTMLElement;\n }\n return sum;\n}\n\n/**\n * Scrolls the `targetElement` so it is visible in the viewport. Accepts an optional `opts.containingElement`\n * that will be centered in the viewport prior to scrolling the targetElement into view. If scrolling is prevented on\n * the body (e.g. targetElement is in a popover), this will only scroll the scroll parents of the targetElement up to but not including the body itself.\n */\nexport function scrollIntoViewport(targetElement: Element | null, opts?: ScrollIntoViewportOpts): void {\n if (targetElement && document.contains(targetElement)) {\n let root = document.scrollingElement || document.documentElement;\n let isScrollPrevented = window.getComputedStyle(root).overflow === 'hidden';\n // If scrolling is not currently prevented then we aren’t in a overlay nor is a overlay open, just use element.scrollIntoView to bring the element into view\n if (!isScrollPrevented) {\n let {left: originalLeft, top: originalTop} = targetElement.getBoundingClientRect();\n\n // use scrollIntoView({block: 'nearest'}) instead of .focus to check if the element is fully in view or not since .focus()\n // won't cause a scroll if the element is already focused and doesn't behave consistently when an element is partially out of view horizontally vs vertically\n targetElement?.scrollIntoView?.({block: 'nearest'});\n let {left: newLeft, top: newTop} = targetElement.getBoundingClientRect();\n // Account for sub pixel differences from rounding\n if ((Math.abs(originalLeft - newLeft) > 1) || (Math.abs(originalTop - newTop) > 1)) {\n opts?.containingElement?.scrollIntoView?.({block: 'center', inline: 'center'});\n targetElement.scrollIntoView?.({block: 'nearest'});\n }\n } else {\n let scrollParents = getScrollParents(targetElement);\n // If scrolling is prevented, we don't want to scroll the body since it might move the overlay partially offscreen and the user can't scroll it back into view.\n if (!isScrollPrevented) {\n scrollParents.push(root);\n }\n for (let scrollParent of scrollParents) {\n scrollIntoView(scrollParent as HTMLElement, targetElement as HTMLElement);\n }\n }\n }\n}\n"],"names":[],"version":3,"file":"scrollIntoView.module.js.map"}
package/dist/types.d.ts CHANGED
@@ -82,8 +82,7 @@ type NullToObject<T> = T extends (null | undefined) ? {} : T;
82
82
  type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;
83
83
  /**
84
84
  * Merges multiple props objects together. Event handlers are chained,
85
- * classNames are combined, and ids are deduplicated - different ids
86
- * will trigger a side-effect and re-render components hooked up with `useId`.
85
+ * classNames are combined, and ids are deduplicated.
87
86
  * For all other props, the last prop object overrides all previous ones.
88
87
  * @param args - Multiple sets of props to merge together.
89
88
  */
@@ -194,7 +193,8 @@ export function useLabels(props: DOMProps & AriaLabelingProps, defaultLabel?: st
194
193
  * @see https://react.dev/reference/react/forwardRef
195
194
  */
196
195
  export function useObjectRef<T>(ref?: ((instance: T | null) => (() => void) | void) | MutableRefObject<T | null> | null): MutableRefObject<T | null>;
197
- export function useUpdateEffect(effect: EffectCallback, dependencies: any[]): void;
196
+ export function useEffectEvent<T extends Function>(fn?: T): T;
197
+ export function useUpdateEffect(cb: EffectCallback, dependencies: any[]): void;
198
198
  export function useUpdateLayoutEffect(effect: EffectCallback, dependencies: any[]): void;
199
199
  type useResizeObserverOptionsType<T> = {
200
200
  ref: RefObject<T | undefined | null> | undefined;
@@ -222,7 +222,6 @@ interface ViewportSize {
222
222
  }
223
223
  export function useViewportSize(): ViewportSize;
224
224
  export function useDescription(description?: string): AriaLabelingProps;
225
- export function useEffectEvent<T extends Function>(fn?: T): T;
226
225
  export function useEvent<K extends keyof GlobalEventHandlersEventMap>(ref: RefObject<EventTarget | null>, event: K | (string & {}), handler?: (this: Document, ev: GlobalEventHandlersEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
227
226
  type SetValueAction<S> = (prev: S) => Generator<any, void, unknown>;
228
227
  export function useValueEffect<S>(defaultValue: S | (() => S)): [S, Dispatch<SetValueAction<S>>];
@@ -1 +1 @@
1
- {"mappings":";;AAiBA,OAAO,MAAM,iBAAiB,OAAO,MAAM,eAE/B,CAAC;ACgBb;;;GAGG;AACH,sBAAsB,SAAS,CAAC,EAAE,MAAM,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I,GAC1B,IAAI,CAeN;AClBD;IACE,8CAA8C;IAC9C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,sGAAsG;IACtG,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iCAAiC;IACjC,KAAK,CAAC,EAAE,GAAG,CAAA;CACZ;AAED,4BAA4B,KAAK,EAAE,aAAa,EAAE,GAAG,EAAE,YAAU,WAAW,GAAG,IAAI,CAAC,GAAG,IAAI,CA+C1F;AC/DD,sCAAuC,SAAQ,IAAI,CAAC,aAAa,EAAE,WAAW,CAAC;IAC7E,UAAU,EAAE,WAAW,GAAG,CAAC,CAAC;IAC5B;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,6CAAoC,KAAK,EAAE,qBAAqB,EAAE,GAAG,EAAE,YAAU,WAAW,GAAG,IAAI,CAAC,GAAG,IAAI,CAgC1G;AC5DD,2BAA2B,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAQxE;ACGD,OAAO,MAAM,4CAA4C,CAAC;AAC1D,OAAO,MAAM,gCAAgC,CAAC;ACE9C,kCAAkC,GAAG,EAAE,YAAU,WAAW,GAAG,IAAI,CAAC,EAAE,OAAO,GAAE,OAAc,GAAG,OAAO,CAsBtG;AAED,iCAAiC,GAAG,EAAE,YAAU,WAAW,GAAG,IAAI,CAAC,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,CA+B7F;AEnCD,4BAA4B,OAAO,EAAE,OAAO,GAAG,OAAO,CAErD;AAED,2BAA2B,OAAO,EAAE,OAAO,GAAG,OAAO,CAEpD;ACDD,OAAO,EAAC,KAAK,EAAE,eAAe,EAAC,MAAM,sBAAsB,CAAC","sources":["packages/@react-aria/utils/src/packages/@react-aria/utils/src/useLayoutEffect.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/useId.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/chain.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/domHelpers.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/shadowdom/DOMFunctions.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/shadowdom/ShadowTreeWalker.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/mergeProps.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/mergeRefs.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/filterDOMProps.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/focusWithoutScrolling.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/getOffset.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/platform.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/openLink.tsx","packages/@react-aria/utils/src/packages/@react-aria/utils/src/runAfterTransition.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/useDrag1D.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/useGlobalListeners.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/useLabels.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/useObjectRef.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/useUpdateEffect.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/useUpdateLayoutEffect.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/useResizeObserver.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/useSyncRef.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/isScrollable.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/getScrollParent.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/getScrollParents.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/keyboard.tsx","packages/@react-aria/utils/src/packages/@react-aria/utils/src/useViewportSize.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/useDescription.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/useEffectEvent.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/useEvent.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/useValueEffect.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/scrollIntoView.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/isVirtualEvent.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/useDeepMemo.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/useFormReset.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/useLoadMore.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/useLoadMoreSentinel.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/inertValue.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/constants.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/animation.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/isElementVisible.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/isFocusable.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/index.ts","packages/@react-aria/utils/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nexport {useId, mergeIds, useSlotId} from './useId';\nexport {chain} from './chain';\nexport {createShadowTreeWalker, ShadowTreeWalker} from './shadowdom/ShadowTreeWalker';\nexport {getActiveElement, getEventTarget, nodeContains} from './shadowdom/DOMFunctions';\nexport {getOwnerDocument, getOwnerWindow, isShadowRoot} from './domHelpers';\nexport {mergeProps} from './mergeProps';\nexport {mergeRefs} from './mergeRefs';\nexport {filterDOMProps} from './filterDOMProps';\nexport {focusWithoutScrolling} from './focusWithoutScrolling';\nexport {getOffset} from './getOffset';\nexport {openLink, getSyntheticLinkProps, useSyntheticLinkProps, RouterProvider, shouldClientNavigate, useRouter, useLinkProps, handleLinkClick} from './openLink';\nexport {runAfterTransition} from './runAfterTransition';\nexport {useDrag1D} from './useDrag1D';\nexport {useGlobalListeners} from './useGlobalListeners';\nexport {useLabels} from './useLabels';\nexport {useObjectRef} from './useObjectRef';\nexport {useUpdateEffect} from './useUpdateEffect';\nexport {useUpdateLayoutEffect} from './useUpdateLayoutEffect';\nexport {useLayoutEffect} from './useLayoutEffect';\nexport {useResizeObserver} from './useResizeObserver';\nexport {useSyncRef} from './useSyncRef';\nexport {getScrollParent} from './getScrollParent';\nexport {getScrollParents} from './getScrollParents';\nexport {isScrollable} from './isScrollable';\nexport {useViewportSize} from './useViewportSize';\nexport {useDescription} from './useDescription';\nexport {isMac, isIPhone, isIPad, isIOS, isAppleDevice, isWebKit, isChrome, isAndroid, isFirefox} from './platform';\nexport {useEvent} from './useEvent';\nexport {useValueEffect} from './useValueEffect';\nexport {scrollIntoView, scrollIntoViewport} from './scrollIntoView';\nexport {clamp, snapValueToStep} from '@react-stately/utils';\nexport {isVirtualClick, isVirtualPointerEvent} from './isVirtualEvent';\nexport {useEffectEvent} from './useEffectEvent';\nexport {useDeepMemo} from './useDeepMemo';\nexport {useFormReset} from './useFormReset';\nexport {useLoadMore} from './useLoadMore';\nexport {useLoadMoreSentinel, useLoadMoreSentinel as UNSTABLE_useLoadMoreSentinel} from './useLoadMoreSentinel';\nexport {inertValue} from './inertValue';\nexport {CLEAR_FOCUS_EVENT, FOCUS_EVENT} from './constants';\nexport {isCtrlKeyPressed, willOpenKeyboard} from './keyboard';\nexport {useEnterAnimation, useExitAnimation} from './animation';\nexport {isFocusable, isTabbable} from './isFocusable';\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E,OAAO,GAAG,OAAO,CAEpD;ACDD,OAAO,EAAC,KAAK,EAAE,eAAe,EAAC,MAAM,sBAAsB,CAAC","sources":["packages/@react-aria/utils/src/packages/@react-aria/utils/src/useLayoutEffect.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/useId.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/chain.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/domHelpers.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/shadowdom/DOMFunctions.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/shadowdom/ShadowTreeWalker.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/mergeProps.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/mergeRefs.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/filterDOMProps.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/focusWithoutScrolling.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/getOffset.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/platform.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/openLink.tsx","packages/@react-aria/utils/src/packages/@react-aria/utils/src/runAfterTransition.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/useDrag1D.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/useGlobalListeners.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/useLabels.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/useObjectRef.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/useEffectEvent.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/useUpdateEffect.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/useUpdateLayoutEffect.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/useResizeObserver.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/useSyncRef.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/isScrollable.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/getScrollParent.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/getScrollParents.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/keyboard.tsx","packages/@react-aria/utils/src/packages/@react-aria/utils/src/useViewportSize.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/useDescription.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/useEvent.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/useValueEffect.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/scrollIntoView.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/isVirtualEvent.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/useDeepMemo.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/useFormReset.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/useLoadMore.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/useLoadMoreSentinel.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/inertValue.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/constants.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/animation.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/isElementVisible.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/isFocusable.ts","packages/@react-aria/utils/src/packages/@react-aria/utils/src/index.ts","packages/@react-aria/utils/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nexport {useId, mergeIds, useSlotId} from './useId';\nexport {chain} from './chain';\nexport {createShadowTreeWalker, ShadowTreeWalker} from './shadowdom/ShadowTreeWalker';\nexport {getActiveElement, getEventTarget, nodeContains} from './shadowdom/DOMFunctions';\nexport {getOwnerDocument, getOwnerWindow, isShadowRoot} from './domHelpers';\nexport {mergeProps} from './mergeProps';\nexport {mergeRefs} from './mergeRefs';\nexport {filterDOMProps} from './filterDOMProps';\nexport {focusWithoutScrolling} from './focusWithoutScrolling';\nexport {getOffset} from './getOffset';\nexport {openLink, getSyntheticLinkProps, useSyntheticLinkProps, RouterProvider, shouldClientNavigate, useRouter, useLinkProps, handleLinkClick} from './openLink';\nexport {runAfterTransition} from './runAfterTransition';\nexport {useDrag1D} from './useDrag1D';\nexport {useGlobalListeners} from './useGlobalListeners';\nexport {useLabels} from './useLabels';\nexport {useObjectRef} from './useObjectRef';\nexport {useUpdateEffect} from './useUpdateEffect';\nexport {useUpdateLayoutEffect} from './useUpdateLayoutEffect';\nexport {useLayoutEffect} from './useLayoutEffect';\nexport {useResizeObserver} from './useResizeObserver';\nexport {useSyncRef} from './useSyncRef';\nexport {getScrollParent} from './getScrollParent';\nexport {getScrollParents} from './getScrollParents';\nexport {isScrollable} from './isScrollable';\nexport {useViewportSize} from './useViewportSize';\nexport {useDescription} from './useDescription';\nexport {isMac, isIPhone, isIPad, isIOS, isAppleDevice, isWebKit, isChrome, isAndroid, isFirefox} from './platform';\nexport {useEvent} from './useEvent';\nexport {useValueEffect} from './useValueEffect';\nexport {scrollIntoView, scrollIntoViewport} from './scrollIntoView';\nexport {clamp, snapValueToStep} from '@react-stately/utils';\nexport {isVirtualClick, isVirtualPointerEvent} from './isVirtualEvent';\nexport {useEffectEvent} from './useEffectEvent';\nexport {useDeepMemo} from './useDeepMemo';\nexport {useFormReset} from './useFormReset';\nexport {useLoadMore} from './useLoadMore';\nexport {useLoadMoreSentinel, useLoadMoreSentinel as UNSTABLE_useLoadMoreSentinel} from './useLoadMoreSentinel';\nexport {inertValue} from './inertValue';\nexport {CLEAR_FOCUS_EVENT, FOCUS_EVENT} from './constants';\nexport {isCtrlKeyPressed, willOpenKeyboard} from './keyboard';\nexport {useEnterAnimation, useExitAnimation} from './animation';\nexport {isFocusable, isTabbable} from './isFocusable';\n\nexport type {LoadMoreSentinelProps} from './useLoadMoreSentinel';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
@@ -33,8 +33,7 @@ function $2a8c0bb1629926c8$export$90fc3a17d93f704c(ref, event, handler, options)
33
33
  ref,
34
34
  event,
35
35
  options,
36
- isDisabled,
37
- handleEvent
36
+ isDisabled
38
37
  ]);
39
38
  }
40
39
 
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;AAMM,SAAS,0CACd,GAAkC,EAClC,KAAwB,EACxB,OAAqE,EACrE,OAA2C;IAE3C,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;IACjC,IAAI,aAAa,WAAW;IAE5B,CAAA,GAAA,sBAAQ,EAAE;QACR,IAAI,cAAc,CAAC,IAAI,OAAO,EAC5B;QAGF,IAAI,UAAU,IAAI,OAAO;QACzB,QAAQ,gBAAgB,CAAC,OAAO,aAA8B;QAC9D,OAAO;YACL,QAAQ,mBAAmB,CAAC,OAAO,aAA8B;QACnE;IACF,GAAG;QAAC;QAAK;QAAO;QAAS;QAAY;KAAY;AACnD","sources":["packages/@react-aria/utils/src/useEvent.ts"],"sourcesContent":["/*\n * Copyright 2021 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {RefObject} from '@react-types/shared';\nimport {useEffect} from 'react';\nimport {useEffectEvent} from './useEffectEvent';\n\nexport function useEvent<K extends keyof GlobalEventHandlersEventMap>(\n ref: RefObject<EventTarget | null>,\n event: K | (string & {}),\n handler?: (this: Document, ev: GlobalEventHandlersEventMap[K]) => any,\n options?: boolean | AddEventListenerOptions\n): void {\n let handleEvent = useEffectEvent(handler);\n let isDisabled = handler == null;\n\n useEffect(() => {\n if (isDisabled || !ref.current) {\n return;\n }\n\n let element = ref.current;\n element.addEventListener(event, handleEvent as EventListener, options);\n return () => {\n element.removeEventListener(event, handleEvent as EventListener, options);\n };\n }, [ref, event, options, isDisabled, handleEvent]);\n}\n"],"names":[],"version":3,"file":"useEvent.main.js.map"}
1
+ {"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;AAMM,SAAS,0CACd,GAAkC,EAClC,KAAwB,EACxB,OAAqE,EACrE,OAA2C;IAE3C,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;IACjC,IAAI,aAAa,WAAW;IAE5B,CAAA,GAAA,sBAAQ,EAAE;QACR,IAAI,cAAc,CAAC,IAAI,OAAO,EAC5B;QAGF,IAAI,UAAU,IAAI,OAAO;QACzB,QAAQ,gBAAgB,CAAC,OAAO,aAA8B;QAC9D,OAAO;YACL,QAAQ,mBAAmB,CAAC,OAAO,aAA8B;QACnE;IACF,GAAG;QAAC;QAAK;QAAO;QAAS;KAAW;AACtC","sources":["packages/@react-aria/utils/src/useEvent.ts"],"sourcesContent":["/*\n * Copyright 2021 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {RefObject} from '@react-types/shared';\nimport {useEffect} from 'react';\nimport {useEffectEvent} from './useEffectEvent';\n\nexport function useEvent<K extends keyof GlobalEventHandlersEventMap>(\n ref: RefObject<EventTarget | null>,\n event: K | (string & {}),\n handler?: (this: Document, ev: GlobalEventHandlersEventMap[K]) => any,\n options?: boolean | AddEventListenerOptions\n): void {\n let handleEvent = useEffectEvent(handler);\n let isDisabled = handler == null;\n\n useEffect(() => {\n if (isDisabled || !ref.current) {\n return;\n }\n\n let element = ref.current;\n element.addEventListener(event, handleEvent as EventListener, options);\n return () => {\n element.removeEventListener(event, handleEvent as EventListener, options);\n };\n }, [ref, event, options, isDisabled]);\n}\n"],"names":[],"version":3,"file":"useEvent.main.js.map"}
package/dist/useEvent.mjs CHANGED
@@ -27,8 +27,7 @@ function $e9faafb641e167db$export$90fc3a17d93f704c(ref, event, handler, options)
27
27
  ref,
28
28
  event,
29
29
  options,
30
- isDisabled,
31
- handleEvent
30
+ isDisabled
32
31
  ]);
33
32
  }
34
33
 
@@ -27,8 +27,7 @@ function $e9faafb641e167db$export$90fc3a17d93f704c(ref, event, handler, options)
27
27
  ref,
28
28
  event,
29
29
  options,
30
- isDisabled,
31
- handleEvent
30
+ isDisabled
32
31
  ]);
33
32
  }
34
33
 
@@ -1 +1 @@
1
- {"mappings":";;;AAAA;;;;;;;;;;CAUC;;AAMM,SAAS,0CACd,GAAkC,EAClC,KAAwB,EACxB,OAAqE,EACrE,OAA2C;IAE3C,IAAI,cAAc,CAAA,GAAA,yCAAa,EAAE;IACjC,IAAI,aAAa,WAAW;IAE5B,CAAA,GAAA,gBAAQ,EAAE;QACR,IAAI,cAAc,CAAC,IAAI,OAAO,EAC5B;QAGF,IAAI,UAAU,IAAI,OAAO;QACzB,QAAQ,gBAAgB,CAAC,OAAO,aAA8B;QAC9D,OAAO;YACL,QAAQ,mBAAmB,CAAC,OAAO,aAA8B;QACnE;IACF,GAAG;QAAC;QAAK;QAAO;QAAS;QAAY;KAAY;AACnD","sources":["packages/@react-aria/utils/src/useEvent.ts"],"sourcesContent":["/*\n * Copyright 2021 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {RefObject} from '@react-types/shared';\nimport {useEffect} from 'react';\nimport {useEffectEvent} from './useEffectEvent';\n\nexport function useEvent<K extends keyof GlobalEventHandlersEventMap>(\n ref: RefObject<EventTarget | null>,\n event: K | (string & {}),\n handler?: (this: Document, ev: GlobalEventHandlersEventMap[K]) => any,\n options?: boolean | AddEventListenerOptions\n): void {\n let handleEvent = useEffectEvent(handler);\n let isDisabled = handler == null;\n\n useEffect(() => {\n if (isDisabled || !ref.current) {\n return;\n }\n\n let element = ref.current;\n element.addEventListener(event, handleEvent as EventListener, options);\n return () => {\n element.removeEventListener(event, handleEvent as EventListener, options);\n };\n }, [ref, event, options, isDisabled, handleEvent]);\n}\n"],"names":[],"version":3,"file":"useEvent.module.js.map"}
1
+ {"mappings":";;;AAAA;;;;;;;;;;CAUC;;AAMM,SAAS,0CACd,GAAkC,EAClC,KAAwB,EACxB,OAAqE,EACrE,OAA2C;IAE3C,IAAI,cAAc,CAAA,GAAA,yCAAa,EAAE;IACjC,IAAI,aAAa,WAAW;IAE5B,CAAA,GAAA,gBAAQ,EAAE;QACR,IAAI,cAAc,CAAC,IAAI,OAAO,EAC5B;QAGF,IAAI,UAAU,IAAI,OAAO;QACzB,QAAQ,gBAAgB,CAAC,OAAO,aAA8B;QAC9D,OAAO;YACL,QAAQ,mBAAmB,CAAC,OAAO,aAA8B;QACnE;IACF,GAAG;QAAC;QAAK;QAAO;QAAS;KAAW;AACtC","sources":["packages/@react-aria/utils/src/useEvent.ts"],"sourcesContent":["/*\n * Copyright 2021 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {RefObject} from '@react-types/shared';\nimport {useEffect} from 'react';\nimport {useEffectEvent} from './useEffectEvent';\n\nexport function useEvent<K extends keyof GlobalEventHandlersEventMap>(\n ref: RefObject<EventTarget | null>,\n event: K | (string & {}),\n handler?: (this: Document, ev: GlobalEventHandlersEventMap[K]) => any,\n options?: boolean | AddEventListenerOptions\n): void {\n let handleEvent = useEffectEvent(handler);\n let isDisabled = handler == null;\n\n useEffect(() => {\n if (isDisabled || !ref.current) {\n return;\n }\n\n let element = ref.current;\n element.addEventListener(event, handleEvent as EventListener, options);\n return () => {\n element.removeEventListener(event, handleEvent as EventListener, options);\n };\n }, [ref, event, options, isDisabled]);\n}\n"],"names":[],"version":3,"file":"useEvent.module.js.map"}
@@ -31,8 +31,7 @@ function $1f205e845604a423$export$5add1d006293d136(ref, initialValue, onReset) {
31
31
  form === null || form === void 0 ? void 0 : form.removeEventListener('reset', handleReset);
32
32
  };
33
33
  }, [
34
- ref,
35
- handleReset
34
+ ref
36
35
  ]);
37
36
  }
38
37
 
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;AAMM,SAAS,0CACd,GAA6F,EAC7F,YAAe,EACf,OAA2B;IAE3B,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,IAAI,SACF,QAAQ;IAEZ;IAEA,CAAA,GAAA,sBAAQ,EAAE;YACG;QAAX,IAAI,OAAO,gBAAA,2BAAA,eAAA,IAAK,OAAO,cAAZ,mCAAA,aAAc,IAAI;QAE7B,iBAAA,2BAAA,KAAM,gBAAgB,CAAC,SAAS;QAChC,OAAO;YACL,iBAAA,2BAAA,KAAM,mBAAmB,CAAC,SAAS;QACrC;IACF,GAAG;QAAC;QAAK;KAAY;AACvB","sources":["packages/@react-aria/utils/src/useFormReset.ts"],"sourcesContent":["/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {RefObject} from '@react-types/shared';\nimport {useEffect} from 'react';\nimport {useEffectEvent} from './useEffectEvent';\n\nexport function useFormReset<T>(\n ref: RefObject<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | null> | undefined,\n initialValue: T,\n onReset: (value: T) => void\n): void {\n let handleReset = useEffectEvent(() => {\n if (onReset) {\n onReset(initialValue);\n }\n });\n\n useEffect(() => {\n let form = ref?.current?.form;\n\n form?.addEventListener('reset', handleReset);\n return () => {\n form?.removeEventListener('reset', handleReset);\n };\n }, [ref, handleReset]);\n}\n"],"names":[],"version":3,"file":"useFormReset.main.js.map"}
1
+ {"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;AAMM,SAAS,0CACd,GAA6F,EAC7F,YAAe,EACf,OAA2B;IAE3B,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,IAAI,SACF,QAAQ;IAEZ;IAEA,CAAA,GAAA,sBAAQ,EAAE;YACG;QAAX,IAAI,OAAO,gBAAA,2BAAA,eAAA,IAAK,OAAO,cAAZ,mCAAA,aAAc,IAAI;QAE7B,iBAAA,2BAAA,KAAM,gBAAgB,CAAC,SAAS;QAChC,OAAO;YACL,iBAAA,2BAAA,KAAM,mBAAmB,CAAC,SAAS;QACrC;IACF,GAAG;QAAC;KAAI;AACV","sources":["packages/@react-aria/utils/src/useFormReset.ts"],"sourcesContent":["/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {RefObject} from '@react-types/shared';\nimport {useEffect} from 'react';\nimport {useEffectEvent} from './useEffectEvent';\n\nexport function useFormReset<T>(\n ref: RefObject<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | null> | undefined,\n initialValue: T,\n onReset: (value: T) => void\n): void {\n let handleReset = useEffectEvent(() => {\n if (onReset) {\n onReset(initialValue);\n }\n });\n\n useEffect(() => {\n let form = ref?.current?.form;\n\n form?.addEventListener('reset', handleReset);\n return () => {\n form?.removeEventListener('reset', handleReset);\n };\n }, [ref]);\n}\n"],"names":[],"version":3,"file":"useFormReset.main.js.map"}
@@ -25,8 +25,7 @@ function $99facab73266f662$export$5add1d006293d136(ref, initialValue, onReset) {
25
25
  form === null || form === void 0 ? void 0 : form.removeEventListener('reset', handleReset);
26
26
  };
27
27
  }, [
28
- ref,
29
- handleReset
28
+ ref
30
29
  ]);
31
30
  }
32
31
 
@@ -25,8 +25,7 @@ function $99facab73266f662$export$5add1d006293d136(ref, initialValue, onReset) {
25
25
  form === null || form === void 0 ? void 0 : form.removeEventListener('reset', handleReset);
26
26
  };
27
27
  }, [
28
- ref,
29
- handleReset
28
+ ref
30
29
  ]);
31
30
  }
32
31
 
@@ -1 +1 @@
1
- {"mappings":";;;AAAA;;;;;;;;;;CAUC;;AAMM,SAAS,0CACd,GAA6F,EAC7F,YAAe,EACf,OAA2B;IAE3B,IAAI,cAAc,CAAA,GAAA,yCAAa,EAAE;QAC/B,IAAI,SACF,QAAQ;IAEZ;IAEA,CAAA,GAAA,gBAAQ,EAAE;YACG;QAAX,IAAI,OAAO,gBAAA,2BAAA,eAAA,IAAK,OAAO,cAAZ,mCAAA,aAAc,IAAI;QAE7B,iBAAA,2BAAA,KAAM,gBAAgB,CAAC,SAAS;QAChC,OAAO;YACL,iBAAA,2BAAA,KAAM,mBAAmB,CAAC,SAAS;QACrC;IACF,GAAG;QAAC;QAAK;KAAY;AACvB","sources":["packages/@react-aria/utils/src/useFormReset.ts"],"sourcesContent":["/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {RefObject} from '@react-types/shared';\nimport {useEffect} from 'react';\nimport {useEffectEvent} from './useEffectEvent';\n\nexport function useFormReset<T>(\n ref: RefObject<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | null> | undefined,\n initialValue: T,\n onReset: (value: T) => void\n): void {\n let handleReset = useEffectEvent(() => {\n if (onReset) {\n onReset(initialValue);\n }\n });\n\n useEffect(() => {\n let form = ref?.current?.form;\n\n form?.addEventListener('reset', handleReset);\n return () => {\n form?.removeEventListener('reset', handleReset);\n };\n }, [ref, handleReset]);\n}\n"],"names":[],"version":3,"file":"useFormReset.module.js.map"}
1
+ {"mappings":";;;AAAA;;;;;;;;;;CAUC;;AAMM,SAAS,0CACd,GAA6F,EAC7F,YAAe,EACf,OAA2B;IAE3B,IAAI,cAAc,CAAA,GAAA,yCAAa,EAAE;QAC/B,IAAI,SACF,QAAQ;IAEZ;IAEA,CAAA,GAAA,gBAAQ,EAAE;YACG;QAAX,IAAI,OAAO,gBAAA,2BAAA,eAAA,IAAK,OAAO,cAAZ,mCAAA,aAAc,IAAI;QAE7B,iBAAA,2BAAA,KAAM,gBAAgB,CAAC,SAAS;QAChC,OAAO;YACL,iBAAA,2BAAA,KAAM,mBAAmB,CAAC,SAAS;QACrC;IACF,GAAG;QAAC;KAAI;AACV","sources":["packages/@react-aria/utils/src/useFormReset.ts"],"sourcesContent":["/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {RefObject} from '@react-types/shared';\nimport {useEffect} from 'react';\nimport {useEffectEvent} from './useEffectEvent';\n\nexport function useFormReset<T>(\n ref: RefObject<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | null> | undefined,\n initialValue: T,\n onReset: (value: T) => void\n): void {\n let handleReset = useEffectEvent(() => {\n if (onReset) {\n onReset(initialValue);\n }\n });\n\n useEffect(() => {\n let form = ref?.current?.form;\n\n form?.addEventListener('reset', handleReset);\n return () => {\n form?.removeEventListener('reset', handleReset);\n };\n }, [ref]);\n}\n"],"names":[],"version":3,"file":"useFormReset.module.js.map"}
@@ -49,7 +49,6 @@ function $f6a4874a7c582761$export$ccaea96c28e8b9e7(props, ref) {
49
49
  };
50
50
  }, [
51
51
  collection,
52
- triggerLoadMore,
53
52
  ref,
54
53
  scrollOffset
55
54
  ]);
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAoBM,SAAS,0CAAoB,KAA4B,EAAE,GAAkC;IAClG,IAAI,cAAC,UAAU,cAAE,UAAU,gBAAE,eAAe,GAAE,GAAG;IAEjD,IAAI,mBAAmB,CAAA,GAAA,mBAAK,EAAwB;IAEpD,IAAI,kBAAkB,CAAA,GAAA,wCAAa,EAAE,CAAC;QACpC,4FAA4F;QAC5F,iFAAiF;QACjF,KAAK,IAAI,SAAS,QAChB,yHAAyH;QACzH,4EAA4E;QAC5E,IAAI,MAAM,cAAc,IAAI,YAC1B;IAGN;IAEA,CAAA,GAAA,yCAAc,EAAE;QACd,IAAI,IAAI,OAAO,EAAE;YACf,mKAAmK;YACnK,0MAA0M;YAC1M,yFAAyF;YACzF,iBAAiB,OAAO,GAAG,IAAI,qBAAqB,iBAAiB;gBAAC,MAAM,CAAA,GAAA,yCAAc,EAAE,gBAAA,0BAAA,IAAK,OAAO;gBAAkB,YAAY,CAAC,IAAI,EAAE,MAAM,aAAa,EAAE,EAAE,MAAM,aAAa,EAAE,EAAE,MAAM,aAAa,CAAC,CAAC;YAAA;YAChN,iBAAiB,OAAO,CAAC,OAAO,CAAC,IAAI,OAAO;QAC9C;QAEA,OAAO;YACL,IAAI,iBAAiB,OAAO,EAC1B,iBAAiB,OAAO,CAAC,UAAU;QAEvC;IACF,GAAG;QAAC;QAAY;QAAiB;QAAK;KAAa;AACrD","sources":["packages/@react-aria/utils/src/useLoadMoreSentinel.ts"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport type {AsyncLoadable, Collection} from '@react-types/shared';\nimport {getScrollParent} from './getScrollParent';\nimport {RefObject, useRef} from 'react';\nimport {useEffectEvent} from './useEffectEvent';\nimport {useLayoutEffect} from './useLayoutEffect';\n\nexport interface LoadMoreSentinelProps extends Omit<AsyncLoadable, 'isLoading'> {\n collection: Collection<any>,\n /**\n * The amount of offset from the bottom of your scrollable region that should trigger load more.\n * Uses a percentage value relative to the scroll body's client height. Load more is then triggered\n * when your current scroll position's distance from the bottom of the currently loaded list of items is less than\n * or equal to the provided value. (e.g. 1 = 100% of the scroll region's height).\n * @default 1\n */\n scrollOffset?: number\n}\n\nexport function useLoadMoreSentinel(props: LoadMoreSentinelProps, ref: RefObject<HTMLElement | null>): void {\n let {collection, onLoadMore, scrollOffset = 1} = props;\n\n let sentinelObserver = useRef<IntersectionObserver>(null);\n\n let triggerLoadMore = useEffectEvent((entries: IntersectionObserverEntry[]) => {\n // Use \"isIntersecting\" over an equality check of 0 since it seems like there is cases where\n // a intersection ratio of 0 can be reported when isIntersecting is actually true\n for (let entry of entries) {\n // Note that this will be called if the collection changes, even if onLoadMore was already called and is being processed.\n // Up to user discretion as to how to handle these multiple onLoadMore calls\n if (entry.isIntersecting && onLoadMore) {\n onLoadMore();\n }\n }\n });\n\n useLayoutEffect(() => {\n if (ref.current) {\n // Tear down and set up a new IntersectionObserver when the collection changes so that we can properly trigger additional loadMores if there is room for more items\n // Need to do this tear down and set up since using a large rootMargin will mean the observer's callback isn't called even when scrolling the item into view beause its visibility hasn't actually changed\n // https://codesandbox.io/p/sandbox/magical-swanson-dhgp89?file=%2Fsrc%2FApp.js%3A21%2C21\n sentinelObserver.current = new IntersectionObserver(triggerLoadMore, {root: getScrollParent(ref?.current) as HTMLElement, rootMargin: `0px ${100 * scrollOffset}% ${100 * scrollOffset}% ${100 * scrollOffset}%`});\n sentinelObserver.current.observe(ref.current);\n }\n\n return () => {\n if (sentinelObserver.current) {\n sentinelObserver.current.disconnect();\n }\n };\n }, [collection, triggerLoadMore, ref, scrollOffset]);\n}\n"],"names":[],"version":3,"file":"useLoadMoreSentinel.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAoBM,SAAS,0CAAoB,KAA4B,EAAE,GAAkC;IAClG,IAAI,cAAC,UAAU,cAAE,UAAU,gBAAE,eAAe,GAAE,GAAG;IAEjD,IAAI,mBAAmB,CAAA,GAAA,mBAAK,EAAwB;IAEpD,IAAI,kBAAkB,CAAA,GAAA,wCAAa,EAAE,CAAC;QACpC,4FAA4F;QAC5F,iFAAiF;QACjF,KAAK,IAAI,SAAS,QAChB,yHAAyH;QACzH,4EAA4E;QAC5E,IAAI,MAAM,cAAc,IAAI,YAC1B;IAGN;IAEA,CAAA,GAAA,yCAAc,EAAE;QACd,IAAI,IAAI,OAAO,EAAE;YACf,mKAAmK;YACnK,0MAA0M;YAC1M,yFAAyF;YACzF,iBAAiB,OAAO,GAAG,IAAI,qBAAqB,iBAAiB;gBAAC,MAAM,CAAA,GAAA,yCAAc,EAAE,gBAAA,0BAAA,IAAK,OAAO;gBAAkB,YAAY,CAAC,IAAI,EAAE,MAAM,aAAa,EAAE,EAAE,MAAM,aAAa,EAAE,EAAE,MAAM,aAAa,CAAC,CAAC;YAAA;YAChN,iBAAiB,OAAO,CAAC,OAAO,CAAC,IAAI,OAAO;QAC9C;QAEA,OAAO;YACL,IAAI,iBAAiB,OAAO,EAC1B,iBAAiB,OAAO,CAAC,UAAU;QAEvC;IACF,GAAG;QAAC;QAAY;QAAK;KAAa;AACpC","sources":["packages/@react-aria/utils/src/useLoadMoreSentinel.ts"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport type {AsyncLoadable, Collection} from '@react-types/shared';\nimport {getScrollParent} from './getScrollParent';\nimport {RefObject, useRef} from 'react';\nimport {useEffectEvent} from './useEffectEvent';\nimport {useLayoutEffect} from './useLayoutEffect';\n\nexport interface LoadMoreSentinelProps extends Omit<AsyncLoadable, 'isLoading'> {\n collection: Collection<any>,\n /**\n * The amount of offset from the bottom of your scrollable region that should trigger load more.\n * Uses a percentage value relative to the scroll body's client height. Load more is then triggered\n * when your current scroll position's distance from the bottom of the currently loaded list of items is less than\n * or equal to the provided value. (e.g. 1 = 100% of the scroll region's height).\n * @default 1\n */\n scrollOffset?: number\n}\n\nexport function useLoadMoreSentinel(props: LoadMoreSentinelProps, ref: RefObject<HTMLElement | null>): void {\n let {collection, onLoadMore, scrollOffset = 1} = props;\n\n let sentinelObserver = useRef<IntersectionObserver>(null);\n\n let triggerLoadMore = useEffectEvent((entries: IntersectionObserverEntry[]) => {\n // Use \"isIntersecting\" over an equality check of 0 since it seems like there is cases where\n // a intersection ratio of 0 can be reported when isIntersecting is actually true\n for (let entry of entries) {\n // Note that this will be called if the collection changes, even if onLoadMore was already called and is being processed.\n // Up to user discretion as to how to handle these multiple onLoadMore calls\n if (entry.isIntersecting && onLoadMore) {\n onLoadMore();\n }\n }\n });\n\n useLayoutEffect(() => {\n if (ref.current) {\n // Tear down and set up a new IntersectionObserver when the collection changes so that we can properly trigger additional loadMores if there is room for more items\n // Need to do this tear down and set up since using a large rootMargin will mean the observer's callback isn't called even when scrolling the item into view beause its visibility hasn't actually changed\n // https://codesandbox.io/p/sandbox/magical-swanson-dhgp89?file=%2Fsrc%2FApp.js%3A21%2C21\n sentinelObserver.current = new IntersectionObserver(triggerLoadMore, {root: getScrollParent(ref?.current) as HTMLElement, rootMargin: `0px ${100 * scrollOffset}% ${100 * scrollOffset}% ${100 * scrollOffset}%`});\n sentinelObserver.current.observe(ref.current);\n }\n\n return () => {\n if (sentinelObserver.current) {\n sentinelObserver.current.disconnect();\n }\n };\n }, [collection, ref, scrollOffset]);\n}\n"],"names":[],"version":3,"file":"useLoadMoreSentinel.main.js.map"}
@@ -43,7 +43,6 @@ function $a5fa973c1850dd36$export$ccaea96c28e8b9e7(props, ref) {
43
43
  };
44
44
  }, [
45
45
  collection,
46
- triggerLoadMore,
47
46
  ref,
48
47
  scrollOffset
49
48
  ]);
@@ -43,7 +43,6 @@ function $a5fa973c1850dd36$export$ccaea96c28e8b9e7(props, ref) {
43
43
  };
44
44
  }, [
45
45
  collection,
46
- triggerLoadMore,
47
46
  ref,
48
47
  scrollOffset
49
48
  ]);
@@ -1 +1 @@
1
- {"mappings":";;;;;AAAA;;;;;;;;;;CAUC;;;;AAoBM,SAAS,0CAAoB,KAA4B,EAAE,GAAkC;IAClG,IAAI,cAAC,UAAU,cAAE,UAAU,gBAAE,eAAe,GAAE,GAAG;IAEjD,IAAI,mBAAmB,CAAA,GAAA,aAAK,EAAwB;IAEpD,IAAI,kBAAkB,CAAA,GAAA,yCAAa,EAAE,CAAC;QACpC,4FAA4F;QAC5F,iFAAiF;QACjF,KAAK,IAAI,SAAS,QAChB,yHAAyH;QACzH,4EAA4E;QAC5E,IAAI,MAAM,cAAc,IAAI,YAC1B;IAGN;IAEA,CAAA,GAAA,yCAAc,EAAE;QACd,IAAI,IAAI,OAAO,EAAE;YACf,mKAAmK;YACnK,0MAA0M;YAC1M,yFAAyF;YACzF,iBAAiB,OAAO,GAAG,IAAI,qBAAqB,iBAAiB;gBAAC,MAAM,CAAA,GAAA,yCAAc,EAAE,gBAAA,0BAAA,IAAK,OAAO;gBAAkB,YAAY,CAAC,IAAI,EAAE,MAAM,aAAa,EAAE,EAAE,MAAM,aAAa,EAAE,EAAE,MAAM,aAAa,CAAC,CAAC;YAAA;YAChN,iBAAiB,OAAO,CAAC,OAAO,CAAC,IAAI,OAAO;QAC9C;QAEA,OAAO;YACL,IAAI,iBAAiB,OAAO,EAC1B,iBAAiB,OAAO,CAAC,UAAU;QAEvC;IACF,GAAG;QAAC;QAAY;QAAiB;QAAK;KAAa;AACrD","sources":["packages/@react-aria/utils/src/useLoadMoreSentinel.ts"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport type {AsyncLoadable, Collection} from '@react-types/shared';\nimport {getScrollParent} from './getScrollParent';\nimport {RefObject, useRef} from 'react';\nimport {useEffectEvent} from './useEffectEvent';\nimport {useLayoutEffect} from './useLayoutEffect';\n\nexport interface LoadMoreSentinelProps extends Omit<AsyncLoadable, 'isLoading'> {\n collection: Collection<any>,\n /**\n * The amount of offset from the bottom of your scrollable region that should trigger load more.\n * Uses a percentage value relative to the scroll body's client height. Load more is then triggered\n * when your current scroll position's distance from the bottom of the currently loaded list of items is less than\n * or equal to the provided value. (e.g. 1 = 100% of the scroll region's height).\n * @default 1\n */\n scrollOffset?: number\n}\n\nexport function useLoadMoreSentinel(props: LoadMoreSentinelProps, ref: RefObject<HTMLElement | null>): void {\n let {collection, onLoadMore, scrollOffset = 1} = props;\n\n let sentinelObserver = useRef<IntersectionObserver>(null);\n\n let triggerLoadMore = useEffectEvent((entries: IntersectionObserverEntry[]) => {\n // Use \"isIntersecting\" over an equality check of 0 since it seems like there is cases where\n // a intersection ratio of 0 can be reported when isIntersecting is actually true\n for (let entry of entries) {\n // Note that this will be called if the collection changes, even if onLoadMore was already called and is being processed.\n // Up to user discretion as to how to handle these multiple onLoadMore calls\n if (entry.isIntersecting && onLoadMore) {\n onLoadMore();\n }\n }\n });\n\n useLayoutEffect(() => {\n if (ref.current) {\n // Tear down and set up a new IntersectionObserver when the collection changes so that we can properly trigger additional loadMores if there is room for more items\n // Need to do this tear down and set up since using a large rootMargin will mean the observer's callback isn't called even when scrolling the item into view beause its visibility hasn't actually changed\n // https://codesandbox.io/p/sandbox/magical-swanson-dhgp89?file=%2Fsrc%2FApp.js%3A21%2C21\n sentinelObserver.current = new IntersectionObserver(triggerLoadMore, {root: getScrollParent(ref?.current) as HTMLElement, rootMargin: `0px ${100 * scrollOffset}% ${100 * scrollOffset}% ${100 * scrollOffset}%`});\n sentinelObserver.current.observe(ref.current);\n }\n\n return () => {\n if (sentinelObserver.current) {\n sentinelObserver.current.disconnect();\n }\n };\n }, [collection, triggerLoadMore, ref, scrollOffset]);\n}\n"],"names":[],"version":3,"file":"useLoadMoreSentinel.module.js.map"}
1
+ {"mappings":";;;;;AAAA;;;;;;;;;;CAUC;;;;AAoBM,SAAS,0CAAoB,KAA4B,EAAE,GAAkC;IAClG,IAAI,cAAC,UAAU,cAAE,UAAU,gBAAE,eAAe,GAAE,GAAG;IAEjD,IAAI,mBAAmB,CAAA,GAAA,aAAK,EAAwB;IAEpD,IAAI,kBAAkB,CAAA,GAAA,yCAAa,EAAE,CAAC;QACpC,4FAA4F;QAC5F,iFAAiF;QACjF,KAAK,IAAI,SAAS,QAChB,yHAAyH;QACzH,4EAA4E;QAC5E,IAAI,MAAM,cAAc,IAAI,YAC1B;IAGN;IAEA,CAAA,GAAA,yCAAc,EAAE;QACd,IAAI,IAAI,OAAO,EAAE;YACf,mKAAmK;YACnK,0MAA0M;YAC1M,yFAAyF;YACzF,iBAAiB,OAAO,GAAG,IAAI,qBAAqB,iBAAiB;gBAAC,MAAM,CAAA,GAAA,yCAAc,EAAE,gBAAA,0BAAA,IAAK,OAAO;gBAAkB,YAAY,CAAC,IAAI,EAAE,MAAM,aAAa,EAAE,EAAE,MAAM,aAAa,EAAE,EAAE,MAAM,aAAa,CAAC,CAAC;YAAA;YAChN,iBAAiB,OAAO,CAAC,OAAO,CAAC,IAAI,OAAO;QAC9C;QAEA,OAAO;YACL,IAAI,iBAAiB,OAAO,EAC1B,iBAAiB,OAAO,CAAC,UAAU;QAEvC;IACF,GAAG;QAAC;QAAY;QAAK;KAAa;AACpC","sources":["packages/@react-aria/utils/src/useLoadMoreSentinel.ts"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport type {AsyncLoadable, Collection} from '@react-types/shared';\nimport {getScrollParent} from './getScrollParent';\nimport {RefObject, useRef} from 'react';\nimport {useEffectEvent} from './useEffectEvent';\nimport {useLayoutEffect} from './useLayoutEffect';\n\nexport interface LoadMoreSentinelProps extends Omit<AsyncLoadable, 'isLoading'> {\n collection: Collection<any>,\n /**\n * The amount of offset from the bottom of your scrollable region that should trigger load more.\n * Uses a percentage value relative to the scroll body's client height. Load more is then triggered\n * when your current scroll position's distance from the bottom of the currently loaded list of items is less than\n * or equal to the provided value. (e.g. 1 = 100% of the scroll region's height).\n * @default 1\n */\n scrollOffset?: number\n}\n\nexport function useLoadMoreSentinel(props: LoadMoreSentinelProps, ref: RefObject<HTMLElement | null>): void {\n let {collection, onLoadMore, scrollOffset = 1} = props;\n\n let sentinelObserver = useRef<IntersectionObserver>(null);\n\n let triggerLoadMore = useEffectEvent((entries: IntersectionObserverEntry[]) => {\n // Use \"isIntersecting\" over an equality check of 0 since it seems like there is cases where\n // a intersection ratio of 0 can be reported when isIntersecting is actually true\n for (let entry of entries) {\n // Note that this will be called if the collection changes, even if onLoadMore was already called and is being processed.\n // Up to user discretion as to how to handle these multiple onLoadMore calls\n if (entry.isIntersecting && onLoadMore) {\n onLoadMore();\n }\n }\n });\n\n useLayoutEffect(() => {\n if (ref.current) {\n // Tear down and set up a new IntersectionObserver when the collection changes so that we can properly trigger additional loadMores if there is room for more items\n // Need to do this tear down and set up since using a large rootMargin will mean the observer's callback isn't called even when scrolling the item into view beause its visibility hasn't actually changed\n // https://codesandbox.io/p/sandbox/magical-swanson-dhgp89?file=%2Fsrc%2FApp.js%3A21%2C21\n sentinelObserver.current = new IntersectionObserver(triggerLoadMore, {root: getScrollParent(ref?.current) as HTMLElement, rootMargin: `0px ${100 * scrollOffset}% ${100 * scrollOffset}% ${100 * scrollOffset}%`});\n sentinelObserver.current.observe(ref.current);\n }\n\n return () => {\n if (sentinelObserver.current) {\n sentinelObserver.current.disconnect();\n }\n };\n }, [collection, ref, scrollOffset]);\n}\n"],"names":[],"version":3,"file":"useLoadMoreSentinel.module.js.map"}
@@ -1,3 +1,4 @@
1
+ var $1254e5bb94ac8761$exports = require("./useEffectEvent.main.js");
1
2
  var $aM4zL$react = require("react");
2
3
 
3
4
 
@@ -7,23 +8,27 @@ function $parcel$export(e, n, v, s) {
7
8
 
8
9
  $parcel$export(module.exports, "useResizeObserver", () => $37733e1652f47193$export$683480f191c0e3ea);
9
10
 
11
+
10
12
  function $37733e1652f47193$var$hasResizeObserver() {
11
13
  return typeof window.ResizeObserver !== 'undefined';
12
14
  }
13
15
  function $37733e1652f47193$export$683480f191c0e3ea(options) {
16
+ // Only call onResize from inside the effect, otherwise we'll void our assumption that
17
+ // useEffectEvents are safe to pass in.
14
18
  const { ref: ref, box: box, onResize: onResize } = options;
19
+ let onResizeEvent = (0, $1254e5bb94ac8761$exports.useEffectEvent)(onResize);
15
20
  (0, $aM4zL$react.useEffect)(()=>{
16
21
  let element = ref === null || ref === void 0 ? void 0 : ref.current;
17
22
  if (!element) return;
18
23
  if (!$37733e1652f47193$var$hasResizeObserver()) {
19
- window.addEventListener('resize', onResize, false);
24
+ window.addEventListener('resize', onResizeEvent, false);
20
25
  return ()=>{
21
- window.removeEventListener('resize', onResize, false);
26
+ window.removeEventListener('resize', onResizeEvent, false);
22
27
  };
23
28
  } else {
24
29
  const resizeObserverInstance = new window.ResizeObserver((entries)=>{
25
30
  if (!entries.length) return;
26
- onResize();
31
+ onResizeEvent();
27
32
  });
28
33
  resizeObserverInstance.observe(element, {
29
34
  box: box
@@ -33,7 +38,6 @@ function $37733e1652f47193$export$683480f191c0e3ea(options) {
33
38
  };
34
39
  }
35
40
  }, [
36
- onResize,
37
41
  ref,
38
42
  box
39
43
  ]);
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;AAIA,SAAS;IACP,OAAO,OAAO,OAAO,cAAc,KAAK;AAC1C;AAQO,SAAS,0CAAqC,OAAwC;IAC3F,MAAM,OAAC,GAAG,OAAE,GAAG,YAAE,QAAQ,EAAC,GAAG;IAE7B,CAAA,GAAA,sBAAQ,EAAE;QACR,IAAI,UAAU,gBAAA,0BAAA,IAAK,OAAO;QAC1B,IAAI,CAAC,SACH;QAGF,IAAI,CAAC,2CAAqB;YACxB,OAAO,gBAAgB,CAAC,UAAU,UAAU;YAC5C,OAAO;gBACL,OAAO,mBAAmB,CAAC,UAAU,UAAU;YACjD;QACF,OAAO;YAEL,MAAM,yBAAyB,IAAI,OAAO,cAAc,CAAC,CAAC;gBACxD,IAAI,CAAC,QAAQ,MAAM,EACjB;gBAGF;YACF;YACA,uBAAuB,OAAO,CAAC,SAAS;qBAAC;YAAG;YAE5C,OAAO;gBACL,IAAI,SACF,uBAAuB,SAAS,CAAC;YAErC;QACF;IAEF,GAAG;QAAC;QAAU;QAAK;KAAI;AACzB","sources":["packages/@react-aria/utils/src/useResizeObserver.ts"],"sourcesContent":["\nimport {RefObject} from '@react-types/shared';\nimport {useEffect} from 'react';\n\nfunction hasResizeObserver() {\n return typeof window.ResizeObserver !== 'undefined';\n}\n\ntype useResizeObserverOptionsType<T> = {\n ref: RefObject<T | undefined | null> | undefined,\n box?: ResizeObserverBoxOptions,\n onResize: () => void\n}\n\nexport function useResizeObserver<T extends Element>(options: useResizeObserverOptionsType<T>): void {\n const {ref, box, onResize} = options;\n\n useEffect(() => {\n let element = ref?.current;\n if (!element) {\n return;\n }\n\n if (!hasResizeObserver()) {\n window.addEventListener('resize', onResize, false);\n return () => {\n window.removeEventListener('resize', onResize, false);\n };\n } else {\n\n const resizeObserverInstance = new window.ResizeObserver((entries) => {\n if (!entries.length) {\n return;\n }\n\n onResize();\n });\n resizeObserverInstance.observe(element, {box});\n\n return () => {\n if (element) {\n resizeObserverInstance.unobserve(element);\n }\n };\n }\n\n }, [onResize, ref, box]);\n}\n"],"names":[],"version":3,"file":"useResizeObserver.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;AAKA,SAAS;IACP,OAAO,OAAO,OAAO,cAAc,KAAK;AAC1C;AAQO,SAAS,0CAAqC,OAAwC;IAC3F,sFAAsF;IACtF,uCAAuC;IACvC,MAAM,OAAC,GAAG,OAAE,GAAG,YAAE,QAAQ,EAAC,GAAG;IAC7B,IAAI,gBAAgB,CAAA,GAAA,wCAAa,EAAE;IAEnC,CAAA,GAAA,sBAAQ,EAAE;QACR,IAAI,UAAU,gBAAA,0BAAA,IAAK,OAAO;QAC1B,IAAI,CAAC,SACH;QAGF,IAAI,CAAC,2CAAqB;YACxB,OAAO,gBAAgB,CAAC,UAAU,eAAe;YACjD,OAAO;gBACL,OAAO,mBAAmB,CAAC,UAAU,eAAe;YACtD;QACF,OAAO;YAEL,MAAM,yBAAyB,IAAI,OAAO,cAAc,CAAC,CAAC;gBACxD,IAAI,CAAC,QAAQ,MAAM,EACjB;gBAGF;YACF;YACA,uBAAuB,OAAO,CAAC,SAAS;qBAAC;YAAG;YAE5C,OAAO;gBACL,IAAI,SACF,uBAAuB,SAAS,CAAC;YAErC;QACF;IAEF,GAAG;QAAC;QAAK;KAAI;AACf","sources":["packages/@react-aria/utils/src/useResizeObserver.ts"],"sourcesContent":["\nimport {RefObject} from '@react-types/shared';\nimport {useEffect} from 'react';\nimport {useEffectEvent} from './useEffectEvent';\n\nfunction hasResizeObserver() {\n return typeof window.ResizeObserver !== 'undefined';\n}\n\ntype useResizeObserverOptionsType<T> = {\n ref: RefObject<T | undefined | null> | undefined,\n box?: ResizeObserverBoxOptions,\n onResize: () => void\n}\n\nexport function useResizeObserver<T extends Element>(options: useResizeObserverOptionsType<T>): void {\n // Only call onResize from inside the effect, otherwise we'll void our assumption that\n // useEffectEvents are safe to pass in.\n const {ref, box, onResize} = options;\n let onResizeEvent = useEffectEvent(onResize);\n\n useEffect(() => {\n let element = ref?.current;\n if (!element) {\n return;\n }\n\n if (!hasResizeObserver()) {\n window.addEventListener('resize', onResizeEvent, false);\n return () => {\n window.removeEventListener('resize', onResizeEvent, false);\n };\n } else {\n\n const resizeObserverInstance = new window.ResizeObserver((entries) => {\n if (!entries.length) {\n return;\n }\n\n onResizeEvent();\n });\n resizeObserverInstance.observe(element, {box});\n\n return () => {\n if (element) {\n resizeObserverInstance.unobserve(element);\n }\n };\n }\n\n }, [ref, box]);\n}\n"],"names":[],"version":3,"file":"useResizeObserver.main.js.map"}
@@ -1,23 +1,28 @@
1
+ import {useEffectEvent as $8ae05eaa5c114e9c$export$7f54fc3180508a52} from "./useEffectEvent.mjs";
1
2
  import {useEffect as $Vsl8o$useEffect} from "react";
2
3
 
3
4
 
5
+
4
6
  function $9daab02d461809db$var$hasResizeObserver() {
5
7
  return typeof window.ResizeObserver !== 'undefined';
6
8
  }
7
9
  function $9daab02d461809db$export$683480f191c0e3ea(options) {
10
+ // Only call onResize from inside the effect, otherwise we'll void our assumption that
11
+ // useEffectEvents are safe to pass in.
8
12
  const { ref: ref, box: box, onResize: onResize } = options;
13
+ let onResizeEvent = (0, $8ae05eaa5c114e9c$export$7f54fc3180508a52)(onResize);
9
14
  (0, $Vsl8o$useEffect)(()=>{
10
15
  let element = ref === null || ref === void 0 ? void 0 : ref.current;
11
16
  if (!element) return;
12
17
  if (!$9daab02d461809db$var$hasResizeObserver()) {
13
- window.addEventListener('resize', onResize, false);
18
+ window.addEventListener('resize', onResizeEvent, false);
14
19
  return ()=>{
15
- window.removeEventListener('resize', onResize, false);
20
+ window.removeEventListener('resize', onResizeEvent, false);
16
21
  };
17
22
  } else {
18
23
  const resizeObserverInstance = new window.ResizeObserver((entries)=>{
19
24
  if (!entries.length) return;
20
- onResize();
25
+ onResizeEvent();
21
26
  });
22
27
  resizeObserverInstance.observe(element, {
23
28
  box: box
@@ -27,7 +32,6 @@ function $9daab02d461809db$export$683480f191c0e3ea(options) {
27
32
  };
28
33
  }
29
34
  }, [
30
- onResize,
31
35
  ref,
32
36
  box
33
37
  ]);
@@ -1,23 +1,28 @@
1
+ import {useEffectEvent as $8ae05eaa5c114e9c$export$7f54fc3180508a52} from "./useEffectEvent.module.js";
1
2
  import {useEffect as $Vsl8o$useEffect} from "react";
2
3
 
3
4
 
5
+
4
6
  function $9daab02d461809db$var$hasResizeObserver() {
5
7
  return typeof window.ResizeObserver !== 'undefined';
6
8
  }
7
9
  function $9daab02d461809db$export$683480f191c0e3ea(options) {
10
+ // Only call onResize from inside the effect, otherwise we'll void our assumption that
11
+ // useEffectEvents are safe to pass in.
8
12
  const { ref: ref, box: box, onResize: onResize } = options;
13
+ let onResizeEvent = (0, $8ae05eaa5c114e9c$export$7f54fc3180508a52)(onResize);
9
14
  (0, $Vsl8o$useEffect)(()=>{
10
15
  let element = ref === null || ref === void 0 ? void 0 : ref.current;
11
16
  if (!element) return;
12
17
  if (!$9daab02d461809db$var$hasResizeObserver()) {
13
- window.addEventListener('resize', onResize, false);
18
+ window.addEventListener('resize', onResizeEvent, false);
14
19
  return ()=>{
15
- window.removeEventListener('resize', onResize, false);
20
+ window.removeEventListener('resize', onResizeEvent, false);
16
21
  };
17
22
  } else {
18
23
  const resizeObserverInstance = new window.ResizeObserver((entries)=>{
19
24
  if (!entries.length) return;
20
- onResize();
25
+ onResizeEvent();
21
26
  });
22
27
  resizeObserverInstance.observe(element, {
23
28
  box: box
@@ -27,7 +32,6 @@ function $9daab02d461809db$export$683480f191c0e3ea(options) {
27
32
  };
28
33
  }
29
34
  }, [
30
- onResize,
31
35
  ref,
32
36
  box
33
37
  ]);
@@ -1 +1 @@
1
- {"mappings":";;;AAIA,SAAS;IACP,OAAO,OAAO,OAAO,cAAc,KAAK;AAC1C;AAQO,SAAS,0CAAqC,OAAwC;IAC3F,MAAM,OAAC,GAAG,OAAE,GAAG,YAAE,QAAQ,EAAC,GAAG;IAE7B,CAAA,GAAA,gBAAQ,EAAE;QACR,IAAI,UAAU,gBAAA,0BAAA,IAAK,OAAO;QAC1B,IAAI,CAAC,SACH;QAGF,IAAI,CAAC,2CAAqB;YACxB,OAAO,gBAAgB,CAAC,UAAU,UAAU;YAC5C,OAAO;gBACL,OAAO,mBAAmB,CAAC,UAAU,UAAU;YACjD;QACF,OAAO;YAEL,MAAM,yBAAyB,IAAI,OAAO,cAAc,CAAC,CAAC;gBACxD,IAAI,CAAC,QAAQ,MAAM,EACjB;gBAGF;YACF;YACA,uBAAuB,OAAO,CAAC,SAAS;qBAAC;YAAG;YAE5C,OAAO;gBACL,IAAI,SACF,uBAAuB,SAAS,CAAC;YAErC;QACF;IAEF,GAAG;QAAC;QAAU;QAAK;KAAI;AACzB","sources":["packages/@react-aria/utils/src/useResizeObserver.ts"],"sourcesContent":["\nimport {RefObject} from '@react-types/shared';\nimport {useEffect} from 'react';\n\nfunction hasResizeObserver() {\n return typeof window.ResizeObserver !== 'undefined';\n}\n\ntype useResizeObserverOptionsType<T> = {\n ref: RefObject<T | undefined | null> | undefined,\n box?: ResizeObserverBoxOptions,\n onResize: () => void\n}\n\nexport function useResizeObserver<T extends Element>(options: useResizeObserverOptionsType<T>): void {\n const {ref, box, onResize} = options;\n\n useEffect(() => {\n let element = ref?.current;\n if (!element) {\n return;\n }\n\n if (!hasResizeObserver()) {\n window.addEventListener('resize', onResize, false);\n return () => {\n window.removeEventListener('resize', onResize, false);\n };\n } else {\n\n const resizeObserverInstance = new window.ResizeObserver((entries) => {\n if (!entries.length) {\n return;\n }\n\n onResize();\n });\n resizeObserverInstance.observe(element, {box});\n\n return () => {\n if (element) {\n resizeObserverInstance.unobserve(element);\n }\n };\n }\n\n }, [onResize, ref, box]);\n}\n"],"names":[],"version":3,"file":"useResizeObserver.module.js.map"}
1
+ {"mappings":";;;;;AAKA,SAAS;IACP,OAAO,OAAO,OAAO,cAAc,KAAK;AAC1C;AAQO,SAAS,0CAAqC,OAAwC;IAC3F,sFAAsF;IACtF,uCAAuC;IACvC,MAAM,OAAC,GAAG,OAAE,GAAG,YAAE,QAAQ,EAAC,GAAG;IAC7B,IAAI,gBAAgB,CAAA,GAAA,yCAAa,EAAE;IAEnC,CAAA,GAAA,gBAAQ,EAAE;QACR,IAAI,UAAU,gBAAA,0BAAA,IAAK,OAAO;QAC1B,IAAI,CAAC,SACH;QAGF,IAAI,CAAC,2CAAqB;YACxB,OAAO,gBAAgB,CAAC,UAAU,eAAe;YACjD,OAAO;gBACL,OAAO,mBAAmB,CAAC,UAAU,eAAe;YACtD;QACF,OAAO;YAEL,MAAM,yBAAyB,IAAI,OAAO,cAAc,CAAC,CAAC;gBACxD,IAAI,CAAC,QAAQ,MAAM,EACjB;gBAGF;YACF;YACA,uBAAuB,OAAO,CAAC,SAAS;qBAAC;YAAG;YAE5C,OAAO;gBACL,IAAI,SACF,uBAAuB,SAAS,CAAC;YAErC;QACF;IAEF,GAAG;QAAC;QAAK;KAAI;AACf","sources":["packages/@react-aria/utils/src/useResizeObserver.ts"],"sourcesContent":["\nimport {RefObject} from '@react-types/shared';\nimport {useEffect} from 'react';\nimport {useEffectEvent} from './useEffectEvent';\n\nfunction hasResizeObserver() {\n return typeof window.ResizeObserver !== 'undefined';\n}\n\ntype useResizeObserverOptionsType<T> = {\n ref: RefObject<T | undefined | null> | undefined,\n box?: ResizeObserverBoxOptions,\n onResize: () => void\n}\n\nexport function useResizeObserver<T extends Element>(options: useResizeObserverOptionsType<T>): void {\n // Only call onResize from inside the effect, otherwise we'll void our assumption that\n // useEffectEvents are safe to pass in.\n const {ref, box, onResize} = options;\n let onResizeEvent = useEffectEvent(onResize);\n\n useEffect(() => {\n let element = ref?.current;\n if (!element) {\n return;\n }\n\n if (!hasResizeObserver()) {\n window.addEventListener('resize', onResizeEvent, false);\n return () => {\n window.removeEventListener('resize', onResizeEvent, false);\n };\n } else {\n\n const resizeObserverInstance = new window.ResizeObserver((entries) => {\n if (!entries.length) {\n return;\n }\n\n onResizeEvent();\n });\n resizeObserverInstance.observe(element, {box});\n\n return () => {\n if (element) {\n resizeObserverInstance.unobserve(element);\n }\n };\n }\n\n }, [ref, box]);\n}\n"],"names":[],"version":3,"file":"useResizeObserver.module.js.map"}